Outputting assembler constants in octal

Joseph S. Myers jsm28@cam.ac.uk
Thu Apr 29 14:19:00 GMT 1999


On Thu, 29 Apr 1999, Richard Henderson wrote:

> On Thu, Apr 29, 1999 at 07:55:14PM +0100, Joseph S. Myers wrote:
> > or is there already a better way to define target-specific ways of
> > outputting constants?
> 
> There is a complete set of ASM_OUTPUT_INT and suchlike.

ASM_OUTPUT_INT and suchlike are documented to take an RTL expression and
later pass it to output_addr_const to output it as an assembler
expression, having first output a .word or similar pseudo-op.  The problem
is that when the expression passed to output_addr_const gets down to a
CONST_INT, it doesn't go back through ASM_OUTPUT_INT - output_addr_const
`knows' to output it in decimal (and likewise knows how to form
expressions with "+" and "-"); duplicating all the logic of
output_addr_const in the target code in order to vary integer output
format doesn't really seem to make sense (and there are still calls of
output_addr_const elsewhere in the complier, though I think they are
irrelevant in this case).

-- 
Joseph S. Myers
jsm28@cam.ac.uk



More information about the Gcc mailing list