setjmp/longjmp
Henry Spencer
henry at utzoo.UUCP
Fri Nov 9 03:11:39 AEST 1984
> Ummm... it's easy to push the register mask when you moveml the registers
> to be saved on entry to a subroutine in the 68000, but moveml mask,(a7)-
> and moveml mask,(a7)+ expect the mask reversed from each other! How
> do you propose to invert a 16-bit mask end-for-end (i.e. 11100...001
> <=> 100...00111 ) and still have a fast calling sequence?
Easy; you're pushing a constant. The inversion gets done at compile time.
Bear in mind also that the only thing that ever has to decipher that mask
is longjmp(), which doesn't have to be fast.
Alas, even pushing a constant on every function call is a lot of expense
when every call has to pay it just so a few can do longjmp().
--
Henry Spencer @ U of Toronto Zoology
{allegra,ihnp4,linus,decvax}!utzoo!henry
More information about the Comp.lang.c
mailing list