This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Outputting assembler constants in octal
- To: Richard Henderson <rth at cygnus dot com>
- Subject: Re: Outputting assembler constants in octal
- From: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- Date: Thu, 29 Apr 1999 22:18:59 +0100 (BST)
- cc: egcs at egcs dot cygnus dot com
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