diff options
author | Blue Swirl <blauwirbel@gmail.com> | 2009-08-06 20:19:15 +0000 |
---|---|---|
committer | Christopher Li <sparse@chrisli.org> | 2009-08-01 20:30:19 -0700 |
commit | 94a27dcf4ac83ca900be9e3f78bb545290a46f79 (patch) | |
tree | 27c4da9a030f2020c52e5c43663b7ea623e3081f /cgcc | |
parent | linearize.h: sanitize header (diff) | |
download | sparse-94a27dcf4ac83ca900be9e3f78bb545290a46f79.tar.gz sparse-94a27dcf4ac83ca900be9e3f78bb545290a46f79.tar.bz2 sparse-94a27dcf4ac83ca900be9e3f78bb545290a46f79.zip |
Add support for TImode type (__int128_t)
GCC provides a 128 bit type called internally as TImode (__int128_t)on 64 bit
platforms (at least x86_64 and Sparc64). These types are used by OpenBIOS.
Add support for types "long long long", __mode__(TI) and __(u)int128_t.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Christopher Li <sparse@chrisli.org>
Diffstat (limited to 'cgcc')
-rwxr-xr-x | cgcc | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -128,8 +128,9 @@ sub integer_types { 16 => '32767', 32 => '2147483647', 64 => '9223372036854775807', + 128 => '170141183460469231731687303715884105727', ); - my @types = (['SCHAR',''], ['SHRT',''], ['INT',''], ['LONG','L'], ['LONG_LONG','LL']); + my @types = (['SCHAR',''], ['SHRT',''], ['INT',''], ['LONG','L'], ['LONG_LONG','LL'], ['LONG_LONG_LONG','LLL']); my $result = " -D__CHAR_BIT__=$char"; while (@types) { @@ -260,12 +261,12 @@ sub add_specs { &define_size_t ($m64 ? "long unsigned int" : "unsigned int")); } elsif ($spec eq 'sparc64') { return (' -Dsparc=1 -D__sparc=1 -D__sparc__=1 -D__sparcv9__=1 -D__sparc64__=1 -D__arch64__=1 -D__LP64__=1' . - &integer_types (8, 16, 32, 64, 64) . + &integer_types (8, 16, 32, 64, 64, 128) . &float_types (1, 1, 33, [24,8], [53,11], [113,15]) . &define_size_t ("long unsigned int")); } elsif ($spec eq 'x86_64') { return (' -Dx86_64=1 -D__x86_64=1 -D__x86_64__=1' . - &integer_types (8, 16, 32, $m32 ? 32 : 64, 64) . + &integer_types (8, 16, 32, $m32 ? 32 : 64, 64, 128) . &float_types (1, 1, 33, [24,8], [53,11], [113,15]) . &define_size_t ($m32 ? "unsigned int" : "long unsigned int")); } elsif ($spec eq 'ppc') { |