This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] Port libitm to powerpc


Hi Richard,

On 2 Dec 2011, at 23:36, Iain Sandoe wrote:

On 2 Dec 2011, at 22:59, Richard Henderson wrote:

I personally think the whole thing would be much easier to read without relying on the redzone. Aside from that, there's actually very little real difference in the two files. Essentially, you're storing the registers in a different order because the prologue does, just so you can make use of the redzone.

OK - I guess I got carried away with thinking that I might be able to re-use the save_world () routine - but that doesn't look feasible after all so....


The aix abi saves r2; darwin 32-bit saves r13. One extra register in both cases, which could use the same slot.

... will take another look tomorrow....
.... although we still have some syntax issues that might make sharing the original code somewhat ugly....

Two versions attached, both of which produce working code on darwin (although the attached modification to yours will be broken on assemblers needing % in front of reg names).


version 1 is a tidied up red-zone implementation.

===

version 2 is a modification of your original:

a) -FRAME+BASE(r1) cannot be guaranteed to be vec-aligned in general (it isn't on m32 darwin)

... so I've taken the liberty of rounding the gtm_buffer object and then pointing r4 at original_sp-rounded_size, which is what we want for the call to GTM_begin_transaction anyway.

b) I've added the CR etc. wrapped in __MACH__ ifdefs.

c) ";" is a comment introducer for Darwin's asm .. so I unwrapped those lines ...

d) I put in the logic for handling __USER_LABEL_PREFIX__ .

===

e) The real problem is finding a non-horrible way of dealing with the %r <=> r issue - and I've not done that so far...

... pending your opinion on the best way forward....

cheers
Iain


Attachment: 181968-ppc-darwin-libitm-redzone-version-diff.txt
Description: Text document






Attachment: 181968-ppc-darwin-libitm-norz.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]