[PATCH] MIPS/GAS: Disable branch relaxation for BPOSGE32/64

Richard Sandiford rdsandiford@googlemail.com
Sat Feb 26 09:38:00 GMT 2011


"Maciej W. Rozycki" <macro@codesourcery.com> writes:
>  Here's a change to disable branch relaxation for the BPOSGE32 and 
> BPOSGE64 MIPS DSP instructions.  They have no complementing branches and 
> therefore cannot be relaxed using our current infrastructure -- an extra 
> unconditional branch over the long jump would have to be produced and I 
> think there's little demand for such a feature, hence my simple change.  

Agreed.

> 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.

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 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.

Thanks,
Richard



More information about the Binutils mailing list