aboutsummaryrefslogtreecommitdiff
path: root/x86_64-gen.c
diff options
context:
space:
mode:
authorShinichiro Hamaji <shinichiro.hamaji _at_ gmail.com>2009-03-15 14:50:38 +0900
committergrischka <grischka>2009-04-18 15:07:08 +0200
commit62e73da6124758c2e8c2a75defac2da092a93941 (patch)
tree98a79928bd0c2a32df7d1c24f30e44a006936464 /x86_64-gen.c
parentae607280c5cb9746bdbcfc6916ffeb26ec0bfe8b (diff)
downloadtinycc-62e73da6124758c2e8c2a75defac2da092a93941.tar.gz
tinycc-62e73da6124758c2e8c2a75defac2da092a93941.tar.bz2
A uint64 bug fix on x86-64
64bit unsigned literal was handled as 32bit integer. Added a unittest to catch this.
Diffstat (limited to 'x86_64-gen.c')
-rw-r--r--x86_64-gen.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/x86_64-gen.c b/x86_64-gen.c
index 2435d4d..cfaf84c 100644
--- a/x86_64-gen.c
+++ b/x86_64-gen.c
@@ -312,7 +312,7 @@ void load(int r, SValue *sv)
gen_modrm(r, fr, sv->sym, fc);
} else {
if (v == VT_CONST) {
- if ((ft & VT_TYPE) == VT_LLONG) {
+ if ((ft & VT_BTYPE) == VT_LLONG) {
o(0x48);
o(0xb8 + REG_VALUE(r)); /* mov $xx, r */
gen_addr64(fr, sv->sym, sv->c.ull);