On Tue, Jul 07, 2015 at 02:25:34PM -0600, Jeff Law wrote:
> On 07/07/2015 11:53 AM, Martin Jambor wrote:
> >Hi,
> >
> >I've been asked to look into the item one of
> >http://permalink.gmane.org/gmane.linux.kernel/1990397 and found out
> >that at least shrink-wrapping happily moves prologue past an asm
> >statement which can be bad if the asm statement contains a call
> >instruction.
> >
> >Am I right concluding that this is a bug?  Looking into the manual and
> >at requires_stack_frame_p() in shrink-wrap.c, I do not see any obvious
> >way of marking the asm statement as requiring the stack frame (but I
> >will not mind being proven wrong).  Do we want to create one, such as
> >only disallowing moving prologue past volatile asm statements?  Any
> >other ideas?
> Shouldn't this be driven by dataflow?

Sure, the correct way of handling this internally would be to put the
stack pointer register into the use set of the asm statement.  Please
disregard my mention of volatile asms, if that is what you are
referring to, that indeed does not seem wise.  But see the other part
of this thread about a possible "stack" input operand.

Thanks,

Martin

Reply via email to