Saving to 32 bits of GPRs in signal context

Paul Mackerras paulus at samba.org
Wed May 30 13:37:34 EST 2007


Steve Munroe writes:

> But unless you take the time to write it up like a full ABI change you are
> never sure that it IS compatible. And any change to the size/shape of
> ucontext_t is an ABI change.

There is no change to the size or shape of the ucontext_t.  There is
no change to the ABI at all, in the sense that everything that is
currently guaranteed by the ABI is still guaranteed.  An extra
guarantee is added: the top 32 bits of the GPRs will not change
unpredictably as long as you don't call a function and don't use
setcontext or swapcontext to return from a signal handler.

I think actually it would be useful to have the saving/restoring of
the high 32 bits controlled by a prctl, so that programs have to ask
explicitly for the new behaviour (and programs that don't want to use
the high 32 bits don't incur the extra overhead).

Paul.



More information about the Linuxppc-dev mailing list