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:
Michael Matz
2012-06-10 09:01:13 +02:00
parent 9a81dcab0a
commit a42b029101
2 changed files with 22 additions and 2 deletions

View File

@ -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);