[PATCH] Ignore the clobbered stack pointer in asm statment

Jakub Jelinek jakub@redhat.com
Sat Sep 12 17:52:15 GMT 2020


On Sat, Sep 12, 2020 at 07:37:36PM +0200, Florian Weimer wrote:
> * H. J. Lu via Gcc-patches:
> 
> > +	  inform (input_location, "the value of the stack pointer after"
> > +		  " an %<asm%> statement must be the same as it was"
> > +		  " before the statement");
> 
> Would it make sense to generate a stronger worded warning when
> generating asynchronous unwind tables?  If an asm statement changes
> the stackpointer even temporarily, the unwind information won't be
> correct.

It can be, at least when using .cfi_* directives, the inline asm writers
have the possibility to support that (they can check a macro if compiler is
emitting .cfi_* directives and use .cfi_* directives in their snippets.

	Jakub



More information about the Gcc-patches mailing list