Behaviour of setjmp/longjmp and registers

Henry Spencer henry at utzoo.uucp
Tue Jan 24 05:04:46 AEST 1989


In article <8812 at alice.UUCP> ark at alice.UUCP (Andrew Koenig) writes:
>...John Reiser figured out a way around it -- a nifty version of
>longjmp that unwound the stack, restoring the correct registers
>at each iteration -- and that went into at least some VAX C
>implementations.
>
>However, when it came to the ANSI committee, they decided it
>would be too hard to mandate this kind of implementation...

Don't forget that it was (relatively) easy on the VAX because one of the
things that the all-singing-all-dancing VAX procedure call does is to save
a register mask.  This makes the VAX stack pretty much self-describing,
at the cost of slowing down every function call and increasing the use
of stack space.  Most other implementations consider that too high a
price to pay.
-- 
Allegedly heard aboard Mir: "A |     Henry Spencer at U of Toronto Zoology
toast to comrade Van Allen!!"  | uunet!attcan!utzoo!henry henry at zoo.toronto.edu



More information about the Comp.lang.c mailing list