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.
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user