Using the stack from inline assembly
Segher Boessenkool
segher@kernel.crashing.org
Wed Dec 14 10:01:00 GMT 2016
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.
Segher
More information about the Gcc-help
mailing list