[Gc] Re: Saving all register of Boehm's Stop-World of hypermodern i686, is it reliable?

Hans Boehm Hans.Boehm@hp.com
Sun Feb 11 23:08:00 GMT 2007

[Followups: Please drop the java list.]

I think setjmp implementations generally have two choices:

1) Save the callee-save registers in the buffer.  Longjmp restores the

2) Save little more than the position on the stack in the buffer.  Longjmp
unwinds the stack, restoring callee-saves registers as it goes.

(Type 2 implementations probably perform better, since they do less
work in setjmp, but can't handle certain kinds of (ab)uses.)

Type (1) implementations are more common, but not universal.  Type (2)
implementations save way too little state for the GC, which is why it now
prefers something like getcontext if it's available.


On Sun, 11 Feb 2007, Bruce Hoult wrote:

> On 2/11/07, Hans Boehm <Hans.Boehm@hp.com> wrote:
> > Sometimes setjmp has also been used in this way, but that sometimes
> > doesn't save a sufficient part of the register set.
> Do you have an example of what setjmp misses?
> Of course it typically doesn't save the volatile/caller save registers
> (e.g. r0-r3 on ARM/Thumb, r3-r10/r12 (depending on ABI) on PPC), but
> that's fine because it's a function call so the compiler doesn't leave
> live values in those anyway.

More information about the Java mailing list