[RFC] Port libitm to powerpc

Richard Henderson rth@redhat.com
Thu Dec 1 15:42:00 GMT 2011


On 12/01/2011 06:42 AM, Iain Sandoe wrote:
>> I presume that w should treat this as a normal prologue - and it
>> looks very much like "save the world" -
> 
> BTW, if this is true ( i.e. we should be preserving all call-saved
> regs around the call to GTM_begin_transaction), then I guess we
> should be saving CR2-CR4 (at least on Darwin, possibly elsewhere too).

I didn't notice CR registers being saved in the linux setjmp function, but perhaps I just missed it?

This is really an implementation of setjmp that allows for a call to GTM_begin_transaction in the middle.  I.e. not something you could actually do with any variant of libc's setjmp.

So, if you can lay out the registers in some reasonable way with out-of-line saves, feel free.  You'll probably have to adjust the layout of gtm_jmpbuf in config/powerpc/target.h to match.

If it turns out to be horrible to share code between these different ABIs, feel free to make use of the config/ directory hierarchy and arrange for config/darwin/powerpc to be searched before config/powerpc/, and make new sjlj.S and target.h files.  See configure.tgt for details there.


r~




More information about the Gcc-patches mailing list