aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbellard <bellard>2006-10-28 14:10:07 +0000
committerbellard <bellard>2006-10-28 14:10:07 +0000
commit38d2e8b9d8dae9680603d66fe51c1b287141bd7e (patch)
treecd5bd4c330d9b25b919452e97290e57678363811
parent3b8cd565be2bed270baa495310051de50cd1cf93 (diff)
downloadtinycc-38d2e8b9d8dae9680603d66fe51c1b287141bd7e.tar.gz
tinycc-38d2e8b9d8dae9680603d66fe51c1b287141bd7e.tar.bz2
Bug fix: A long long value used as a test expression ignores the upper 32 bits at runtime (Dave Dodge)
-rw-r--r--i386-gen.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/i386-gen.c b/i386-gen.c
index b1024a7..77505d7 100644
--- a/i386-gen.c
+++ b/i386-gen.c
@@ -600,7 +600,8 @@ int gtst(int inv, int t)
gsym(vtop->c.i);
}
} else {
- if (is_float(vtop->type.t)) {
+ if (is_float(vtop->type.t) ||
+ (vtop->type.t & VT_BTYPE) == VT_LLONG) {
vpushi(0);
gen_op(TOK_NE);
}