[RFD] MIPS/gas: Optimisation cannot be set to 0
Paul Koning
pkoning@equallogic.com
Fri Nov 9 17:56:00 GMT 2007
>>>>> "Ian" == Ian Lance Taylor <iant@google.com> writes:
Ian> "Maciej W. Rozycki" <macro@mips.com> writes:
>> Wed Feb 12 14:36:29 1997 Ian Lance Taylor <ian@cygnus.com>
>>
>> * config/tc-mips.c (md_parse_option): When debugging, set
>> mips_optimize to 1, not 0.
Ian> My vague recollection of the problem is that at least at that
Ian> time gcc would always pass a -O option to the assembler. When
Ian> not optimizing, it would pass -O0. However, inserting NOPs for
Ian> MIPS variants which do not need them does not help debugging.
Ian> Clearly failing to provide a way to set mips_optimize to 0 was
Ian> an oversight.
I thought that GCC these days (as of V3.4 or so) tells the assembler
not to do any of those silly transformations -- instead the compiler
does it, because the compiler's code generator has a lot more
information and can do a much better job.
This is as it should be. "optimizing assembler" is a contradiction in
terms.
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.
paul
More information about the Binutils
mailing list