[PATCH] powerpc: fix ifunc-sel.h with GCC 6
Florian Weimer
fweimer@redhat.com
Thu Jul 21 12:22:00 GMT 2016
On 07/21/2016 01:53 PM, Florian Weimer wrote:
> On 07/21/2016 11:36 AM, Aurelien Jarno wrote:
>> On 32-bit PowerPC GCC 6 always saves the PIC register on the stack in
>> the prologue and adjust the stack in the epilogue. It is therefore not
>> possible anymore to just exit the function in the inline asm code,
>> otherwise it corrupts the stack pointer. This causes the following tests
>> to fail when using GCC 6:
>
>> : "=r" (ret)
>> : "X" (&global), "X" (f1), "X" (f2), "X" (f3));
>> return ret;
>
> The inline assembly still lacks clobbers for registers 11 and 12, and
> the "X" constraint is incorrect (it should be "i", I think).
And a comment why bcl 20,31 is used instead of bl wouldn't hurt, either.
A colleague explained to me it's a hint to the implementation not to
perform return stack optimization, although the observable effect is
identical to bl.
Florian
More information about the Libc-alpha
mailing list