- Raw vaargs with optional return not lowered correctly #2819

This commit is contained in:
Christoffer Lerno
2026-01-24 23:54:20 +01:00
parent b5e25e3857
commit 378b35265b
3 changed files with 27 additions and 2 deletions

View File

@@ -5817,7 +5817,7 @@ INLINE void llvm_emit_call_invocation(GenContext *c, BEValue *result_value,
for (unsigned i = 0; i < vararg_count; i++)
{
ABIArgInfo *info = abi_varargs[index];
BEValue value_copy = values[i + param_count];
BEValue value_copy = values[i + param_count - start];
llvm_emit_parameter(c, arg_values, &arg_count, info, &value_copy);
index++;
}
@@ -5828,7 +5828,7 @@ INLINE void llvm_emit_call_invocation(GenContext *c, BEValue *result_value,
for (unsigned i = 0; i < vararg_count; i++)
{
REMINDER("Varargs should be expanded correctly");
arg_values[arg_count++] = llvm_load_value_store(c, &values[i + param_count]);
arg_values[arg_count++] = llvm_load_value_store(c, &values[i + param_count - start]);
}
}
}