From 946afd2343b1f129af4014740ee8876fa20b6f64 Mon Sep 17 00:00:00 2001 From: James Lyon Date: Fri, 19 Apr 2013 18:31:24 +0100 Subject: Fixed problems with XMM1 use on Linux/x86-64. All tests pass. I think I've caught all the cases assuming only XMM0 is used. I expect that Win64 is horribly broken by this point though, because I haven't altered it to cope with XMM1. --- tccgen.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'tccgen.c') diff --git a/tccgen.c b/tccgen.c index f8efb12..f4de9f4 100644 --- a/tccgen.c +++ b/tccgen.c @@ -626,15 +626,16 @@ ST_FUNC void save_regs(int n) } } -/* move register 's' to 'r', and flush previous value of r to memory +/* move register 's' (of type 't') to 'r', and flush previous value of r to memory if needed */ -static void move_reg(int r, int s) +static void move_reg(int r, int s, int t) { SValue sv; if (r != s) { save_reg(r); - sv.type.t = VT_INT; + sv.type.t = t; + sv.type.ref = NULL; sv.r = s; sv.c.ul = 0; load(r, &sv); @@ -4271,7 +4272,7 @@ static void expr_cond(void) if (VT_STRUCT == (vtop->type.t & VT_BTYPE)) gaddrof(); r1 = gv(rc); - move_reg(r2, r1); + move_reg(r2, r1, type.t); vtop->r = r2; gsym(tt); } -- cgit v1.3.1