[Bug target/70162] [RX] const_int printing causes wrong code on 32 bit host

nickc at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Mar 21 17:27:00 GMT 2016


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70162

--- Comment #10 from Nick Clifton <nickc at gcc dot gnu.org> ---
Hi Oleg,

> Just out of curiosity ... what's with the 64 in rx_print_integer?

It is totally arbitrary...

> Why do numbers in that range need to be printed in decimal?

They don't.  It is just that in my experience, when looking at assembler source
files, large constant values are almost always associated with some kind of
binary operation - bit masks, binary encoded floating point constants, power of
two limits, etc.  So I decided, completely arbitrarily, to print out large
constants as hex values rather than decimal.  In theory it does not matter to
the assembler whether the value is in hex or decimal (modulo bugs parsing the
values of course), but it mattered to me, as it made it easier to read the
assembler source when I was trying to track down a compiler bug.

Of course I never really expected anyone else to ever look at these assembler
output files, so I never bothered to implement a command line option to select
the type of constant to generate.

Cheers
  Nick


More information about the Gcc-bugs mailing list