diff options
author | Richard Biener <rguenther@suse.de> | 2014-05-28 14:17:45 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2014-05-28 14:17:45 +0000 |
commit | 47f9fca8551dcb661bc73e340790b68d2f971c25 (patch) | |
tree | 7e99fd84a98ed507f8f0ebd262907a7fc13e2f55 /gcc | |
parent | 7fbf8a3ede761711ffed9a8658746db31bfbd0e1 (diff) | |
download | gcc-47f9fca8551dcb661bc73e340790b68d2f971c25.zip gcc-47f9fca8551dcb661bc73e340790b68d2f971c25.tar.gz gcc-47f9fca8551dcb661bc73e340790b68d2f971c25.tar.bz2 |
revert: hwint.h (HOST_WIDE_INT_PRINT_*): Define in terms of PRI*64.
2014-05-28 Richard Biener <rguenther@suse.de>
Revert
2014-05-28 Richard Biener <rguenther@suse.de>
* hwint.h (HOST_WIDE_INT_PRINT_*): Define in terms of PRI*64.
From-SVN: r211021
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/hwint.h | 61 |
2 files changed, 39 insertions, 29 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7d888f8..1460f2a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2014-05-28 Richard Biener <rguenther@suse.de> + + Revert + 2014-05-28 Richard Biener <rguenther@suse.de> + + * hwint.h (HOST_WIDE_INT_PRINT_*): Define in terms of PRI*64. + 2014-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de> * expr.c (expand_assignment): Fold the bitpos in the to_rtx if diff --git a/gcc/hwint.h b/gcc/hwint.h index f2ecc04..e3b8a8a 100644 --- a/gcc/hwint.h +++ b/gcc/hwint.h @@ -75,45 +75,48 @@ extern char sizeof_long_long_must_be_8[sizeof (long long) == 8 ? 1 : -1]; typedef before using the __asm_fprintf__ format attribute. */ typedef HOST_WIDE_INT __gcc_host_wide_int__; +/* Various printf format strings for HOST_WIDE_INT. */ + +#if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_LONG +# define HOST_WIDE_INT_PRINT HOST_LONG_FORMAT +# define HOST_WIDE_INT_PRINT_C "L" + /* HOST_BITS_PER_WIDE_INT is 64 bits. */ +# define HOST_WIDE_INT_PRINT_DOUBLE_HEX \ + "0x%" HOST_LONG_FORMAT "x%016" HOST_LONG_FORMAT "x" +# define HOST_WIDE_INT_PRINT_PADDED_HEX \ + "%016" HOST_LONG_FORMAT "x" +#else +# define HOST_WIDE_INT_PRINT HOST_LONG_LONG_FORMAT +# define HOST_WIDE_INT_PRINT_C "LL" + /* HOST_BITS_PER_WIDE_INT is 64 bits. */ +# define HOST_WIDE_INT_PRINT_DOUBLE_HEX \ + "0x%" HOST_LONG_LONG_FORMAT "x%016" HOST_LONG_LONG_FORMAT "x" +# define HOST_WIDE_INT_PRINT_PADDED_HEX \ + "%016" HOST_LONG_LONG_FORMAT "x" +#endif /* HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_LONG */ + +#define HOST_WIDE_INT_PRINT_DEC "%" HOST_WIDE_INT_PRINT "d" +#define HOST_WIDE_INT_PRINT_DEC_C HOST_WIDE_INT_PRINT_DEC HOST_WIDE_INT_PRINT_C +#define HOST_WIDE_INT_PRINT_UNSIGNED "%" HOST_WIDE_INT_PRINT "u" +#define HOST_WIDE_INT_PRINT_HEX "%#" HOST_WIDE_INT_PRINT "x" +#define HOST_WIDE_INT_PRINT_HEX_PURE "%" HOST_WIDE_INT_PRINT "x" + /* Provide C99 <inttypes.h> style format definitions for 64bits. */ #ifndef HAVE_INTTYPES_H -#if HOST_BITS_PER_LONG == 64 -# define GCC_PRI64 HOST_LONG_FORMAT -#else -# define GCC_PRI64 HOST_LONG_LONG_FORMAT -#endif #undef PRId64 -#define PRId64 GCC_PRI64 "d" +#define PRId64 HOST_WIDE_INT_PRINT "d" #undef PRIi64 -#define PRIi64 GCC_PRI64 "i" +#define PRIi64 HOST_WIDE_INT_PRINT "i" #undef PRIo64 -#define PRIo64 GCC_PRI64 "o" +#define PRIo64 HOST_WIDE_INT_PRINT "o" #undef PRIu64 -#define PRIu64 GCC_PRI64 "u" +#define PRIu64 HOST_WIDE_INT_PRINT "u" #undef PRIx64 -#define PRIx64 GCC_PRI64 "x" +#define PRIx64 HOST_WIDE_INT_PRINT "x" #undef PRIX64 -#define PRIX64 GCC_PRI64 "X" +#define PRIX64 HOST_WIDE_INT_PRINT "X" #endif -/* Various printf format strings for HOST_WIDE_INT. */ - -#if HOST_BITS_PER_LONG == 64 -# define HOST_WIDE_INT_PRINT HOST_LONG_FORMAT -# define HOST_WIDE_INT_PRINT_C "L" -#else -# define HOST_WIDE_INT_PRINT HOST_LONG_LONG_FORMAT -# define HOST_WIDE_INT_PRINT_C "LL" -#endif - -#define HOST_WIDE_INT_PRINT_DEC "%" PRId64 -#define HOST_WIDE_INT_PRINT_DEC_C "%" PRId64 HOST_WIDE_INT_PRINT_C -#define HOST_WIDE_INT_PRINT_UNSIGNED "%" PRIu64 -#define HOST_WIDE_INT_PRINT_HEX "%#" PRIx64 -#define HOST_WIDE_INT_PRINT_HEX_PURE "%" PRIx64 -#define HOST_WIDE_INT_PRINT_DOUBLE_HEX "0x%" PRIx64 "%016" PRIx64 -#define HOST_WIDE_INT_PRINT_PADDED_HEX "%016" PRIx64 - /* Define HOST_WIDEST_FAST_INT to the widest integer type supported efficiently in hardware. (That is, the widest integer type that fits in a hardware register.) Normally this is "long" but on some hosts it |