mirror of
https://github.com/frida/tinycc
synced 2024-11-28 02:29:38 +03:00
A uint64 bug fix on x86-64
64bit unsigned literal was handled as 32bit integer. Added a unittest to catch this.
This commit is contained in:
parent
ae607280c5
commit
62e73da612
@ -1693,6 +1693,8 @@ void longlong_test(void)
|
||||
a = 68719476720LL;
|
||||
b = 4294967295LL;
|
||||
printf("%d %d %d %d\n", a > b, a < b, a >= b, a <= b);
|
||||
|
||||
printf("%Ld\n", 0x123456789LLU);
|
||||
}
|
||||
|
||||
void manyarg_test(void)
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user