Commit e4a85c03 authored by Christoph Mallon's avatar Christoph Mallon
Browse files

sparc: Calculate the offset of the first variadic parameter correctly.

This was broken when rewriting stack frame handling. (b6787e36)
Though the below test case did not work before either, because the correct code path was not entered due to inspecting the wrong type.
The latter was accidentally corrected while getting rid of higher types. (ae42d217)
This fixes gcc/va-arg-12.c.
parent 98f67e17
......@@ -234,7 +234,7 @@ static void sparc_layout_param_entities(ir_graph *const irg, calling_convention_
assert(param_map[orig_n_params] != NULL);
offset = get_entity_offset(param_map[orig_n_params]);
} else {
offset = cconv->param_stack_size;
offset = cconv->param_stack_size + SPARC_MIN_STACKSIZE;
}
set_entity_offset(va_start_addr, offset);
......
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