This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] MIPS/GAS: Disable branch relaxation for BPOSGE32/64
On Sat, 26 Feb 2011, Richard Sandiford wrote:
> > 2011-02-21 Maciej W. Rozycki <macro@codesourcery.com>
> >
> > gas/
> > * config/tc-mips.c (append_insn): Disable branch relaxation for
> > DSP instructions.
> >
> > gas/testsuite/
> > * gas/mips/relax-bposge.l: New test for DSP branch relaxation.
> > * gas/mips/relax-bposge.s: Source for the new test.
> > * gas/mips/mips.exp: Run the new test.
>
> OK.
Checked in, thanks.
> For the record, I wasn't sure at first whether keying off ISA_DSP* was
> conceptually a good idea, because there doesn't seem to be anything
> inherent in the DSP extensions that would prevent complementing branches
> from being defined in DSPr3. Of course, if that happened, the change is
> still conservatively correct. We'd just lack a potential feature for
> those branches. But I was wondering whether it would be better to have
> a separate flag for branches without complements.
I've been somewhat conservative about new flag consumption through the
course of recent development. Long-term I think it may make sense to add
a flag for these branches though, for two reasons. First is this issue
and second is the DSP_VOLA flag -- it disables reordering of the affected
instructions into delay slots of any branches even though only these two
have a data dependency. It looks to me two flags will be needed though
and I don't plan to investigate it any further now.
> I agree that that's probably overkill as things stand though.
> If we ever need to use the condition elsewhere, or if more branches
> of this kind are added, then we can add a separate flag at that stage.
Indeed, I don't think a specific flag for branches with no complements is
really needed now (as opposed to one for DSP braches) -- these two are an
exception rather than the rule and I gather only because of the
asymmetrical nature of DSP programming specifics. I wouldn't expect more
such branches to be added and certainly not outside some future revision
of the DSP ASE. And if complements are indeed added, then we can relax
this restriction.
Maciej