From 2d3458363e4e529d80030a648a806fef0c13cf71 Mon Sep 17 00:00:00 2001 From: Philip Date: Sun, 26 Apr 2015 17:31:39 +0000 Subject: fix another x86_64 ABI bug The old code assumed that if an argument doesn't fit into the available registers, none of the subsequent arguments do, either. But that's wrong: passing 7 doubles, then a two-double struct, then another double should generate code that passes the 9th argument in the 8th register and the two-double struct on the stack. We now do so. However, this patch does not yet fix the function calling code to do the right thing in the same case. --- x86_64-gen.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'x86_64-gen.c') diff --git a/x86_64-gen.c b/x86_64-gen.c index 90c8247..c7a35d8 100644 --- a/x86_64-gen.c +++ b/x86_64-gen.c @@ -1568,7 +1568,6 @@ void gfunc_prolog(CType *func_type) addr = (addr + align - 1) & -align; param_addr = addr; addr += size; - sse_param_index += reg_count; } break; @@ -1592,7 +1591,6 @@ void gfunc_prolog(CType *func_type) addr = (addr + align - 1) & -align; param_addr = addr; addr += size; - reg_param_index += reg_count; } break; } -- cgit v1.3.1