Re: Using the stack from inline assembly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/14/2016 11:01 AM, Segher Boessenkool wrote:
On Wed, Dec 14, 2016 at 09:49:32AM +0000, Andrew Haley wrote:
On 13/12/16 18:15, Segher Boessenkool wrote:
Clobbering "memory" does not work here.  Clobbering "rsp" however seems
to work.  But, "seems to", I don't think there is a guarantee anywhere.
Clobbering the stack pointer forces the use of the frame pointer, but is
that guaranteed even?

No, I think we shouldn't do that.  If it's necessary to save things on
the stack all we need to do is to avoid the red zone.  That really isn't
hard.

That was a workaround for doing this with released compiler versions,
like e.g. anything you build current glibc with.

I think Andrew suggested bracing such inline assembly with

  sub $128, %rsp
  …
  add $128, %rsp

For glibc, we plan to remove such complicated inline assembly completely.

Florian



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux