Behaviour of setjmp/longjmp and registers

96 more school days cquenel at polyslo.CalPoly.EDU
Sun Jan 22 07:39:01 AEST 1989


Since we're on the subject again, I have a question coming from
the IMPLEMENTATION department.

Assuming that volatile variables are written out to memory
before any procedure call.  (Even if this is not sufficient,
assume that volatile variables have been dealt with.)

Should it ever be necessary/desirable to restore any registers
on a long-jump BESIDES the frame-pointer and/or stack-pointer ?

That is to say:
	If I can get all my volatile variables out of my
	registers, then I don't need to restore ANY of them ?
	(According to ANSI)

I mention this because I remember implementing it once,
and at the time, I seem to recall the "common", vax-ish, old-fashioned
implementation restored a gob of regular registers as well.

--chris


What you don't know can hurt you, only you won't know it.
-------------------------------------------------------------------------------
| Nothing the God of Bio-Mechanics wouldn't let you in heaven for ?           |
-------------------------------------------------------------------------------
| Chris Quenelle            | Smart Mailers -> cquenel at polyslo.CalPoly.EDU    |
| Cal Poly State Univ.      |-------------------------------------------------|
| San Luis Obispo, CA 93407 | On a clear disk you can seek forever.           |
-------------------------------------------------------------------------------



More information about the Comp.lang.c mailing list