This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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: [PATCH] powerpc: fix ifunc-sel.h with GCC 6


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


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