Commit 241c044a authored by Christoph Mallon's avatar Christoph Mallon
Browse files

amd64: Use the precise count of parameters in XMM registers on the caller side.

Before it always said 8, because it took the callee perspective, which adds the artificial parameters.
This caused calls to variadic functions to get 8 passed in %eax, which is unnecessary for most calls.
parent fbadd2bd
......@@ -139,7 +139,7 @@ x86_cconv_t *amd64_decide_calling_convention(ir_type *function_type,
/* If the function is variadic, we add all unused parameter
* passing registers to the end of the params array, first GP,
* then XMM. */
if (is_method_variadic(function_type)) {
if (irg && is_method_variadic(function_type)) {
if (amd64_use_x64_abi) {
panic("Variadic functions on Windows ABI not supported");
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment