This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [RFD] MIPS/gas: Optimisation cannot be set to 0
"Maciej W. Rozycki" <macro@mips.com> writes:
> On Fri, 9 Nov 2007, Paul Koning wrote:
>> In other words, I thought that gcc now tells the assembler ".set
>> noreorder; .set nomacro; .set noat" so the assembler isn't going to do
>> ANY transformations.
>
> Not for inline asms (understandable) and (to my surprise!) not for MIPS16
> code.
Right. There's not really any point doing it for MIPS16 code. The only
kind of reordering you get is when GAS fills a delay slot that GCC didn't
know how to fill, so ".set noreorder" would mean "don't make this
function as small as you can". That'd be a bit perverse on a target
where size is really the only thing that matters. (In contrast,
GCC might have had good reasons to do what it did for non-MIPS16 code,
especially on targets like the VR413x.)
It would be quite hard for GCC to calculate precise (rather than
conversatively-correct) lengths for every MIPS16 instruction.
One of the problems is that the range of unextended PC-relative
instructions depends on the low bits of the instruction's address,
and GCC's length calculation code isn't yet ready for that kind of
headache.
Richard