x86-64: Fix call saved register restore
Loads of VT_LLOCAL values (which effectively represent saved addresses of lvalues) were done in VT_INT type, loosing the upper 32 bits. Needs to be done in VT_PTR type.
This commit is contained in:
@ -1460,7 +1460,7 @@ void gen_opf(int op)
|
||||
if ((r & VT_VALMASK) == VT_LLOCAL) {
|
||||
SValue v1;
|
||||
r = get_reg(RC_INT);
|
||||
v1.type.t = VT_INT;
|
||||
v1.type.t = VT_PTR;
|
||||
v1.r = VT_LOCAL | VT_LVAL;
|
||||
v1.c.ul = fc;
|
||||
load(r, &v1);
|
||||
@ -1531,7 +1531,7 @@ void gen_opf(int op)
|
||||
if ((r & VT_VALMASK) == VT_LLOCAL) {
|
||||
SValue v1;
|
||||
r = get_reg(RC_INT);
|
||||
v1.type.t = VT_INT;
|
||||
v1.type.t = VT_PTR;
|
||||
v1.r = VT_LOCAL | VT_LVAL;
|
||||
v1.c.ul = fc;
|
||||
load(r, &v1);
|
||||
|
||||
Reference in New Issue
Block a user