patch to print large constants as hex values
Nick Clifton
nickc@cygnus.com
Fri Apr 2 09:33:00 GMT 1999
Hi Richard,
: On Thu, Apr 01, 1999 at 02:58:28PM -0800, Nick Clifton wrote:
: > It still has the dynamic switching between decimal and hex values for
: > assembler output, since there is no easy way to display both values at
: > the same time.
:
: This is not ok. Consider the ia32 insn
:
: addl $-12345, %eax
:
: This will now be rendered as
:
: addl $0xffffffffffffcfc7, %eax
:
: when cross compiling from Alpha. The assembler will complain
: bitterly about the use of bignums.
:
: Wrt the `or' thing, we already do something like
:
: (const_double:DF (nil) 123456 7890123 [2.0])
:
: for reals. Staying with the brackets seems nicer.
Darn! OK here is a cut down version of the patch. It only affects
RTL dumps and it uses square brackets rather than "or".
OK to apply now ?
Cheers
Nick
Wed Mar 31 11:38:52 1999 Nick Clifton <nickc@cygnus.com>
* print-rtl.c (print_rtx): Use both HOST_WIDE_INT_PRINT_DEC
and HOST_WIDE_INT_PRINT_HEX to display constants.
Index: gcc/print-rtl.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/print-rtl.c,v
retrieving revision 1.25
diff -p -w -r1.25 print-rtl.c
*** print-rtl.c 1999/02/25 23:45:26 1.25
--- print-rtl.c 1999/04/02 17:31:18
*************** print_rtx (in_rtx)
*** 231,236 ****
--- 231,239 ----
case 'w':
fprintf (outfile, " ");
fprintf (outfile, HOST_WIDE_INT_PRINT_DEC, XWINT (in_rtx, i));
+ fprintf (outfile, " [");
+ fprintf (outfile, HOST_WIDE_INT_PRINT_HEX, XWINT (in_rtx, i));
+ fprintf (outfile, "]");
break;
case 'i':
More information about the Gcc-patches
mailing list