guy%gorodish@Sun.COM (Guy Harris) (06/22/87)
> It is worth mentioning another aspect of the VAX Calling Standard: it is > Ghodawful slow. The all-singing-all-dancing CALLS and CALLG are often > slower than "rolling your own" using more primitive instructions. The CCI Power 6/32 (also known as the Harris HCX-whatever, the Sperry 7000/40 or something like that) has a call instruction that is very similar to the VAX one, but is much faster; I believe part of the trick here was that the stack frame was changed a bit so that the words to be written to the frame could be generated in sequential order, so that interleaved memory could be used effectively. I don't know how much of this could be applied to the VAX (for one thing, the 6/32 got rid of the exception handler word that is set to 0 by CALLS). Speaking of CALLS, one thing to note: on the 11/780, at least, the register save mask appears to be scanned from the bit representing R11 down to the bit representing R0, until the processor runs out of bits. Thus, if any registers are required by a routine in addition to any not required to be saved by the calling sequence conventions in effect (the UNIX conventions do not require registers 0-5 to be saved), they should be assigned from R11 down, NOT from R6 up. I don't know whether this applies on other VAX processors or not. Many of the assembly-language routines supplied with various flavors of VAX UNIX use additional registers starting with R6 and going up; they should go from R11 down instead. Guy Harris {ihnp4, decvax, seismo, decwrl, ...}!sun!guy guy@sun.com