Saving to 32 bits of GPRs in signal context

Kumar Gala galak at kernel.crashing.org
Wed May 30 22:15:46 EST 2007


On May 30, 2007, at 6:44 AM, Benjamin Herrenschmidt wrote:

> On Wed, 2007-05-30 at 00:32 -0500, Kumar Gala wrote:
>>> 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).
>>
>> I like this, it means we can error if HW doesn't support it and
>> requires applications to do something specific to enable the feature.
>
> Yeah well.... I liked the prctl at first.. but then, I though  
> twice :-)
>
> Thing is, a typical usage pattern would be some library having a hand
> optimized tigh loop or something like that using 64 bits registers. An
> example, would be some memcpy-type thing in glibc.
>
> You don't want those things to do prctl's all over the place on behalf
> of the host application.

Yeah, I can see that being a pain.  However, how would the AT_HWCAP  
make this any easier on the library to detect?  (I might have missed  
that discussion of that magic in the thread).

- k



More information about the Linuxppc-dev mailing list