Andrew Haley <[EMAIL PROTECTED]> writes:

> On i386 we replace (add sp -4) with (push reg).  This generates faster
> and smaller code.
> 
> However, we are not copying RTX_FRAME_RELATED_P from the old
> instructions to the new, and so we are not emitting unwind information
> for the stack pointer adjustment.  The breaks stack traces on gcj, and
> I suspect it breaks a bunch of stuff elsewhere too.
> 
> This very crude patch sets RTX_FRAME_RELATED_P on every one of the new
> instructions if any of the old instructions had RTX_FRAME_RELATED_P
> set.  It seems to do the trick, but I suspect there must be a more
> subtle way to do it.
> 
> Can anyone suggest a neater way to do this?

I don't have a suggestion for a neater way to do this, but I do want
to note that, in the general case, just copying RTX_FRAME_RELATED_P is
insufficient.  We also need to copy any REG_FRAME_RELATED_EXPR reg
notes.

Ian

Reply via email to