Using the stack from inline assembly
Florian Weimer
fweimer@redhat.com
Tue Dec 13 16:20:00 GMT 2016
On 12/13/2016 05:06 PM, Jeff Law wrote:
> On 12/13/2016 09:00 AM, Florian Weimer wrote:
>> On 12/13/2016 04:56 PM, Jeff Law wrote:
>>
>>> It's probably wise to ensure the stack pointer keeps proper alignment
>>> and such, but that's entirely within the asm itself.
>>
>> Right. But I still need a way to express that the red zone is
>> clobbered. I just don't see *anything* that would allow me to express
>> that.
>>
>>> No idea what's going on with Andrew's example, I haven't dug into it.
>>
>> Without optimization, GCC keeps a temporary in the red zone (%rbp is
>> equal to %rsp), and the push/pop pair destroys that:
> Good grief. How lame (on GCC's part). So with GCC using the red zone
> like this, then obviously you can't use push/pop like you want.
Oh well. I filed a glibc bug:
https://sourceware.org/bugzilla/show_bug.cgi?id=20965
Thanks,
Florian
More information about the Gcc-help
mailing list