From a42b029101a758127de570b113767977fbce7b2a Mon Sep 17 00:00:00 2001 From: Michael Matz Date: Sun, 10 Jun 2012 09:01:13 +0200 Subject: 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. --- x86_64-gen.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'x86_64-gen.c') diff --git a/x86_64-gen.c b/x86_64-gen.c index 6dfe1e4..1fa8dd5 100644 --- a/x86_64-gen.c +++ b/x86_64-gen.c @@ -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); -- cgit v1.3.1