mirror of
https://github.com/mirror/tinycc.git
synced 2025-02-06 06:40:07 +08:00
arm64: Fix largeptr test
VT_PTR needs to be handled like VT_LLONG.
This commit is contained in:
parent
b5b12b89a0
commit
b155432b65
@ -1326,7 +1326,8 @@ static int arm64_iconst(uint64_t *val, SValue *sv)
|
||||
return 0;
|
||||
if (val) {
|
||||
int t = sv->type.t;
|
||||
*val = ((t & VT_BTYPE) == VT_LLONG ? sv->c.i :
|
||||
int bt = t & VT_BTYPE;
|
||||
*val = ((bt == VT_LLONG || bt == VT_PTR) ? sv->c.i :
|
||||
(uint32_t)sv->c.i |
|
||||
(t & VT_UNSIGNED ? 0 : -(sv->c.i & 0x80000000)));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user