diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1996-11-15 14:13:58 -0500 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1996-11-15 14:13:58 -0500 |
commit | 21e3a81b9381daa3d068c47b481291474f6e42ea (patch) | |
tree | c7ebc194fa5ff70effacd569714677fe83f447dd /gcc | |
parent | 29cad4a46caadcd54bb746298a392adeef958571 (diff) | |
download | gcc-21e3a81b9381daa3d068c47b481291474f6e42ea.zip gcc-21e3a81b9381daa3d068c47b481291474f6e42ea.tar.gz gcc-21e3a81b9381daa3d068c47b481291474f6e42ea.tar.bz2 |
(asm_fprintf): Use "ll" prefix for a long long HOST_WIDE_INT.
(output_{asm_insn,addr_const}): Use HOST_WIDE_INT_PRINT_*.
From-SVN: r13174
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/final.c | 54 |
1 files changed, 12 insertions, 42 deletions
diff --git a/gcc/final.c b/gcc/final.c index 107a893..c38aada 100644 --- a/gcc/final.c +++ b/gcc/final.c @@ -2560,12 +2560,7 @@ output_asm_insn (template, operands) else if (letter == 'n') { if (GET_CODE (operands[c]) == CONST_INT) - fprintf (asm_out_file, -#if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_INT - "%d", -#else - "%ld", -#endif + fprintf (asm_out_file, HOST_WIDE_INT_PRINT_DEC, - INTVAL (operands[c])); else { @@ -2701,13 +2696,7 @@ output_addr_const (file, x) break; case CONST_INT: - fprintf (file, -#if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_INT - "%d", -#else - "%ld", -#endif - INTVAL (x)); + fprintf (file, HOST_WIDE_INT_PRINT_DEC, INTVAL (x)); break; case CONST: @@ -2721,37 +2710,12 @@ output_addr_const (file, x) { /* We can use %d if the number is one word and positive. */ if (CONST_DOUBLE_HIGH (x)) - fprintf (file, -#if HOST_BITS_PER_WIDE_INT == 64 -#if HOST_BITS_PER_WIDE_INT != HOST_BITS_PER_INT - "0x%lx%016lx", -#else - "0x%x%016x", -#endif -#else -#if HOST_BITS_PER_WIDE_INT != HOST_BITS_PER_INT - "0x%lx%08lx", -#else - "0x%x%08x", -#endif -#endif + fprintf (file, HOST_WIDE_INT_PRINT_DOUBLE_HEX, CONST_DOUBLE_HIGH (x), CONST_DOUBLE_LOW (x)); else if (CONST_DOUBLE_LOW (x) < 0) - fprintf (file, -#if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_INT - "0x%x", -#else - "0x%lx", -#endif - CONST_DOUBLE_LOW (x)); + fprintf (file, HOST_WIDE_INT_PRINT_HEX, CONST_DOUBLE_LOW (x)); else - fprintf (file, -#if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_INT - "%d", -#else - "%ld", -#endif - CONST_DOUBLE_LOW (x)); + fprintf (file, HOST_WIDE_INT_PRINT_DEC, CONST_DOUBLE_LOW (x)); } else /* We can't handle floating point constants; @@ -2892,9 +2856,15 @@ asm_fprintf VPROTO((FILE *file, char *p, ...)) but we do not check for those cases. It means that the value is a HOST_WIDE_INT, which may be either `int' or `long'. */ -#if HOST_BITS_PER_WIDE_INT != HOST_BITS_PER_INT +#if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_INT +#else +#if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_LONG + *q++ = 'l'; +#else + *q++ = 'l'; *q++ = 'l'; #endif +#endif *q++ = *p++; *q = 0; |