On Mon, 2015-12-07 at 12:30 -0700, Jeff Law wrote:
> On 12/07/2015 12:28 PM, Bernd Schmidt wrote:
> > On 12/07/2015 07:54 PM, Steve Ellcey wrote:
> >> if (must_annul)
> >> - used_annul = 1;
> >> + {
> >> + /* Frame related instructions cannot go into annulled delay
> >> + slots, it messes up the dwarf info. */
> >> + if (RTX_FRAME_RELATED_P (trial))
> >> + return;
> >
> > Don't you need to use break rather than return?
> >
> >> + else if (!RTX_FRAME_RELATED_P (trial) \
> >
> > Stray backslash
> > Other than that I think this is OK. There are some preexisting tests for
> > frame related insns already in this code.
> Also note there's probably port cleanup that could happen once this goes
> in. IIRC the PA port (for example) explicitly disallows frame related
> insns from many (most, all?) delay slots. Other targets may be doing
> something similar.
>
> jeff
If I had remembered/seen that code in pa.md earlier I might have fixed
MIPS the same way. Oh well, I guess changing reorg.c is the better way
to do it since it can be shared now.
It looks like steal_delay_list_from_fallthrough is missing a lot of
FRAME_RELATED checks (and other things) that
steal_delay_list_from_target has in it (not just my changes). I think
that means most of the work/fixing has been on machines like MIPS where
the code in the delay slot is either always executed or only
executed when the branch is taken (vs. untaken). I think
steal_delay_list_from_fallthrough is only going to be used when the
delay slot is executed on a branch-not-taken. Are there any machines
like that?
Steve Ellcey
[email protected]