aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBlue Swirl <blauwirbel@gmail.com>2009-08-06 20:19:15 +0000
committerChristopher Li <sparse@chrisli.org>2009-08-01 20:30:19 -0700
commit94a27dcf4ac83ca900be9e3f78bb545290a46f79 (patch)
tree27c4da9a030f2020c52e5c43663b7ea623e3081f /evaluate.c
parentlinearize.h: sanitize header (diff)
downloadsparse-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 'evaluate.c')
-rw-r--r--evaluate.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/evaluate.c b/evaluate.c
index 1ab5ae8..805ae90 100644
--- a/evaluate.c
+++ b/evaluate.c
@@ -165,7 +165,7 @@ static struct symbol *bigger_int_type(struct symbol *left, struct symbol *right)
if ((lmod ^ rmod) & MOD_UNSIGNED) {
if (lmod & MOD_UNSIGNED)
goto left;
- } else if ((lmod & ~rmod) & (MOD_LONG | MOD_LONGLONG))
+ } else if ((lmod & ~rmod) & (MOD_LONG_ALL))
goto left;
right:
left = right;
@@ -512,7 +512,7 @@ Normal:
} else if (rclass & TYPE_FLOAT) {
unsigned long lmod = ltype->ctype.modifiers;
unsigned long rmod = rtype->ctype.modifiers;
- if (rmod & ~lmod & (MOD_LONG | MOD_LONGLONG))
+ if (rmod & ~lmod & (MOD_LONG_ALL))
return rtype;
else
return ltype;
@@ -2114,7 +2114,7 @@ static int evaluate_arguments(struct symbol *f, struct symbol *fn, struct expres
*p = cast_to(expr, integer_promotion(type));
} else if (class & TYPE_FLOAT) {
unsigned long mod = type->ctype.modifiers;
- if (!(mod & (MOD_LONG|MOD_LONGLONG)))
+ if (!(mod & (MOD_LONG_ALL)))
*p = cast_to(expr, &double_ctype);
} else if (class & TYPE_PTR) {
if (expr->ctype == &null_ctype)