[comp.arch] Submission for news

amos@SHUM.HUJI.AC.IL (amos shapir) (03/12/91)

Newsgroups: comp.arch
Subject: Tahoe calls (was: bizarre instructions)
References: <3062@charon.cwi.nl>
Distribution: world
Reply-To: amos@shum.huji.ac.il
Organization: The Hebrew University of Jerusalem
X-Hdate: 26 Adar 5751

[Quoted from the referenced article by dik@cwi.nl (Dik T. Winter)]
>
>We see indeed that the subroutine call overhead decreases when subroutines
>become larger.  What is extremely surprising is the position of the Tahoe
>in this table!  This is not a modern machine by any means, nor is it RISC
>(it is the smaller brother of the Vax).  But while the base routines use
>only 5 resp. 4 instructions (4 only because of a bug? in the hardware, it
>would have been 3 otherwise), we see nearly no effect of the CALL.
(...)
>In all, it would be good to look at how the Tahoe
>does subroutine calls.

Actually, the Tahoe (designed in 1982, BTW) has two call-subroutine
instructions: CALLS (call slow) which works more or less like the VAX's,
and CALLF (call fast), which is probably what is measured here.  CALLF is
implemented directly in hardware - no microcode.  It requires very specific
operands: only PC-relative or absolute address for the destination;
the size (in bytes) to bump the stack by should be an immediate short constant,
which means the number of arguments should be known at compile time and
be smaller than 14.  Luckily, more than 95% of all calls can comply with
these limitations.

In addition to that, stack handling is done in parallel with execution
of the target routine, i.e. the first few instructions are fetched while
registers are still being pushed.

All this makes CALLF a very useful tool indeed: while on the whole, the
Tahoe is about 8-10 times as fast as a VAX780, subroutine call is 22 times
faster!

(I hope I didn't botch any of the details - it's been a long time...)

--
	Amos Shapir		amos@shum.huji.ac.il
The Hebrew Univ. of Jerusalem, Dept. of Comp. Science.
Tel. +972 2 585690 GEO: 35 14 E / 31 46 N city