This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
constant that doesn't fit in 32bits in alpha.c
- From: Jay K <jay dot krell at cornell dot edu>
- To: gcc <gcc at gcc dot gnu dot org>
- Date: Sun, 10 Jun 2012 09:18:44 +0000
- Subject: constant that doesn't fit in 32bits in alpha.c
gcc-4.7.0/gcc/config/alpha/alpha.c
????? word1 = expand_and (DImode, word1, GEN_INT (0xffff0fff0000fff0), NULL);
That "big" constant isn't portable since it doesn't fit in 32bits.
1) append LL
or 2) break it up into an expression, like
? ((HOST_WIDE_INT)0xffff0fff) << 8) | 0x0fff0
or such.
#2 is more portable, i.e. to compilers with "__int64" and "0xFFi64" instead of "long long" and "LL".
#3) something involving a double-precision integer using two longs, as I believe gcc does elsewhere.
#2 Depending on HOST_WIDE_INT being portable suffices imho.
?- Jay