Mercurial > hg > CbC > CbC_gcc
comparison gcc/hwint.h @ 55:77e2b8dfacca gcc-4.4.5
update it from 4.4.3 to 4.5.0
author | ryoma <e075725@ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 12 Feb 2010 23:39:51 +0900 |
parents | a06113de4d67 |
children | b7f97abdc517 |
comparison
equal
deleted
inserted
replaced
52:c156f1bd5cd9 | 55:77e2b8dfacca |
---|---|
1 /* HOST_WIDE_INT definitions for the GNU compiler. | 1 /* HOST_WIDE_INT definitions for the GNU compiler. |
2 Copyright (C) 1998, 2002, 2004, 2008 Free Software Foundation, Inc. | 2 Copyright (C) 1998, 2002, 2004, 2008, 2009 Free Software Foundation, Inc. |
3 | 3 |
4 This file is part of GCC. | 4 This file is part of GCC. |
5 | 5 |
6 Provide definitions for macros which depend on HOST_BITS_PER_INT | 6 Provide definitions for macros which depend on HOST_BITS_PER_INT |
7 and HOST_BITS_PER_LONG. */ | 7 and HOST_BITS_PER_LONG. */ |
14 #define HOST_BITS_PER_SHORT (CHAR_BIT * SIZEOF_SHORT) | 14 #define HOST_BITS_PER_SHORT (CHAR_BIT * SIZEOF_SHORT) |
15 #define HOST_BITS_PER_INT (CHAR_BIT * SIZEOF_INT) | 15 #define HOST_BITS_PER_INT (CHAR_BIT * SIZEOF_INT) |
16 #define HOST_BITS_PER_LONG (CHAR_BIT * SIZEOF_LONG) | 16 #define HOST_BITS_PER_LONG (CHAR_BIT * SIZEOF_LONG) |
17 | 17 |
18 /* The string that should be inserted into a printf style format to | 18 /* The string that should be inserted into a printf style format to |
19 indicate a "long" operand. */ | |
20 #ifndef HOST_LONG_FORMAT | |
21 #define HOST_LONG_FORMAT "l" | |
22 #endif | |
23 | |
24 /* The string that should be inserted into a printf style format to | |
19 indicate a "long long" operand. */ | 25 indicate a "long long" operand. */ |
20 #ifndef HOST_LONG_LONG_FORMAT | 26 #ifndef HOST_LONG_LONG_FORMAT |
21 #define HOST_LONG_LONG_FORMAT "ll" | 27 #define HOST_LONG_LONG_FORMAT "ll" |
22 #endif | 28 #endif |
23 | 29 |
24 /* If HAVE_LONG_LONG and SIZEOF_LONG_LONG aren't defined, but | 30 /* If HAVE_LONG_LONG and SIZEOF_LONG_LONG aren't defined, but |
25 GCC_VERSION >= 3000, assume this is the second or later stage of a | 31 GCC_VERSION >= 3000, assume this is the second or later stage of a |
68 #endif | 74 #endif |
69 | 75 |
70 /* Various printf format strings for HOST_WIDE_INT. */ | 76 /* Various printf format strings for HOST_WIDE_INT. */ |
71 | 77 |
72 #if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_LONG | 78 #if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_LONG |
73 # define HOST_WIDE_INT_PRINT "l" | 79 # define HOST_WIDE_INT_PRINT HOST_LONG_FORMAT |
74 # define HOST_WIDE_INT_PRINT_C "L" | 80 # define HOST_WIDE_INT_PRINT_C "L" |
75 /* 'long' might be 32 or 64 bits, and the number of leading zeroes | 81 /* 'long' might be 32 or 64 bits, and the number of leading zeroes |
76 must be tweaked accordingly. */ | 82 must be tweaked accordingly. */ |
77 # if HOST_BITS_PER_WIDE_INT == 64 | 83 # if HOST_BITS_PER_WIDE_INT == 64 |
78 # define HOST_WIDE_INT_PRINT_DOUBLE_HEX "0x%lx%016lx" | 84 # define HOST_WIDE_INT_PRINT_DOUBLE_HEX \ |
85 "0x%" HOST_LONG_FORMAT "x%016" HOST_LONG_FORMAT "x" | |
79 # else | 86 # else |
80 # define HOST_WIDE_INT_PRINT_DOUBLE_HEX "0x%lx%08lx" | 87 # define HOST_WIDE_INT_PRINT_DOUBLE_HEX \ |
88 "0x%" HOST_LONG_FORMAT "x%08" HOST_LONG_FORMAT "x" | |
81 # endif | 89 # endif |
82 #else | 90 #else |
83 # define HOST_WIDE_INT_PRINT HOST_LONG_LONG_FORMAT | 91 # define HOST_WIDE_INT_PRINT HOST_LONG_LONG_FORMAT |
84 # define HOST_WIDE_INT_PRINT_C "LL" | 92 # define HOST_WIDE_INT_PRINT_C "LL" |
85 /* We can assume that 'long long' is at least 64 bits. */ | 93 /* We can assume that 'long long' is at least 64 bits. */ |
97 | 105 |
98 #if HOST_BITS_PER_WIDE_INT >= 64 \ | 106 #if HOST_BITS_PER_WIDE_INT >= 64 \ |
99 || (HOST_BITS_PER_LONGLONG < 64 && HOST_BITS_PER___INT64 < 64) | 107 || (HOST_BITS_PER_LONGLONG < 64 && HOST_BITS_PER___INT64 < 64) |
100 # define HOST_WIDEST_INT HOST_WIDE_INT | 108 # define HOST_WIDEST_INT HOST_WIDE_INT |
101 # define HOST_BITS_PER_WIDEST_INT HOST_BITS_PER_WIDE_INT | 109 # define HOST_BITS_PER_WIDEST_INT HOST_BITS_PER_WIDE_INT |
110 # define HOST_WIDEST_INT_PRINT HOST_WIDE_INT_PRINT | |
102 # define HOST_WIDEST_INT_PRINT_DEC HOST_WIDE_INT_PRINT_DEC | 111 # define HOST_WIDEST_INT_PRINT_DEC HOST_WIDE_INT_PRINT_DEC |
103 # define HOST_WIDEST_INT_PRINT_DEC_C HOST_WIDE_INT_PRINT_DEC_C | 112 # define HOST_WIDEST_INT_PRINT_DEC_C HOST_WIDE_INT_PRINT_DEC_C |
104 # define HOST_WIDEST_INT_PRINT_UNSIGNED HOST_WIDE_INT_PRINT_UNSIGNED | 113 # define HOST_WIDEST_INT_PRINT_UNSIGNED HOST_WIDE_INT_PRINT_UNSIGNED |
105 # define HOST_WIDEST_INT_PRINT_HEX HOST_WIDE_INT_PRINT_HEX | 114 # define HOST_WIDEST_INT_PRINT_HEX HOST_WIDE_INT_PRINT_HEX |
106 # define HOST_WIDEST_INT_PRINT_DOUBLE_HEX HOST_WIDE_INT_PRINT_DOUBLE_HEX | 115 # define HOST_WIDEST_INT_PRINT_DOUBLE_HEX HOST_WIDE_INT_PRINT_DOUBLE_HEX |
114 # define HOST_WIDEST_INT __int64 | 123 # define HOST_WIDEST_INT __int64 |
115 # else | 124 # else |
116 #error "This line should be impossible to reach" | 125 #error "This line should be impossible to reach" |
117 # endif | 126 # endif |
118 # endif | 127 # endif |
128 # define HOST_WIDEST_INT_PRINT HOST_LONG_LONG_FORMAT | |
119 # define HOST_WIDEST_INT_PRINT_DEC "%" HOST_LONG_LONG_FORMAT "d" | 129 # define HOST_WIDEST_INT_PRINT_DEC "%" HOST_LONG_LONG_FORMAT "d" |
120 # define HOST_WIDEST_INT_PRINT_DEC_C "%" HOST_LONG_LONG_FORMAT "dLL" | 130 # define HOST_WIDEST_INT_PRINT_DEC_C "%" HOST_LONG_LONG_FORMAT "dLL" |
121 # define HOST_WIDEST_INT_PRINT_UNSIGNED "%" HOST_LONG_LONG_FORMAT "u" | 131 # define HOST_WIDEST_INT_PRINT_UNSIGNED "%" HOST_LONG_LONG_FORMAT "u" |
122 # define HOST_WIDEST_INT_PRINT_HEX "0x%" HOST_LONG_LONG_FORMAT "x" | 132 # define HOST_WIDEST_INT_PRINT_HEX "0x%" HOST_LONG_LONG_FORMAT "x" |
123 # define HOST_WIDEST_INT_PRINT_DOUBLE_HEX \ | 133 # define HOST_WIDEST_INT_PRINT_DOUBLE_HEX \ |