Alan Burlison <[EMAIL PROTECTED]> writes:
>> 1. When you call deep enough to fall off the end of the large register
>>    file an expensive "system call" is needed to save some registers
>>    at the other end to memory and "wrap", and then again when you
>>    come "back" to the now-in-memory registers.
>
>Not a system call but a trap - they aren't the same thing (pedant mode off
>;-).  The register spill trap handler copies the relevant registers onto the
>stack - each stack frame has space allocated for this.

Pedant mode accepted - and I concur. But trap handler is still significant
overhead compared to just doing the moves (scheduled) inline 
as part of normal code. So register windows win if you stay in bounds
but loose quite seriously if you have "active" deep calls.

(My own style is to write small functions rather than #define or inline,
for cache reasons - this has tended to make above show. I am delighted to 
say that _modern_ (Sun) SPARCs have deep enough windows even for me - 
but SPARCStation1+ and some of the lowcost CPUs didn't.)


>
>Alan Burlison
-- 
Nick Ing-Simmons
who is looking for a new job see http://www.ni-s.u-net.com/

Reply via email to