setjmp/longjmp

Brandon Allbery bsa at ncoast.UUCP
Wed Nov 7 04:39:02 AEST 1984


> Article <1 at imd.UUCP>, from david at imd.UUCP
+----------------
| >I agree with Dennis Ritchie that longjmp should resume after the call
| >to setjmp with all accessible data containing values as of the time of
| >the longjmp.  This can always be implemented, although some C run-time
| >designs seem to have not saved enough information on the call stack to
| >support longjmp.  Such implementations need to be changed.  Any system
| >where a subroutine call saves all the non-scratch registers (e.g., PDP-11,
| >Gould) is in good shape, as is any system where the number of registers
| >actually saved is recorded in the call frame (e.g. VAX).  Other systems
| >may have to have their calling sequences re-engineered, but that is what
| >they deserve for taking shortcuts.

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?

--bsa
--
  Brandon Allbery @ North Coast Xenix  |   the.world!ucbvax!decvax!cwruecmp!
6504 Chestnut Road, Independence, Ohio |       {atvax!}ncoast!{tdi1!}bsa
   (216) 524-1416             \ 44131  | E1439 at CSUOHIO.BITNET (friend's acct.)
---------------------------------------+---------------------------------------
			`Confusion is my natural state.'
-- 
  Brandon Allbery @ North Coast Xenix  |   the.world!ucbvax!decvax!cwruecmp!
6504 Chestnut Road, Independence, Ohio |       {atvax!}ncoast!{tdi1!}bsa
   (216) 524-1416             \ 44131  | E1439 at CSUOHIO.BITNET (friend's acct.)
---------------------------------------+---------------------------------------
			`Confusion is my natural state.'



More information about the Comp.lang.c mailing list