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

sparc: Let cconv calculate the optional stack offset for register parameters.

This fixes backend/sparc_stackframe.
parent 461ef096
......@@ -220,6 +220,7 @@ calling_convention_t *sparc_decide_calling_convention(ir_type *function_type,
}
if (regnum < n_param_regs) {
param->offset = SPARC_PARAMS_SPILL_OFFSET + regnum * SPARC_REGISTER_SIZE;
arch_register_t const *reg = param_regs[regnum++];
if (irg == NULL || omit_fp)
reg = map_i_to_o_reg(reg);
......
......@@ -238,10 +238,8 @@ static ir_type *compute_arg_type(ir_graph *irg, calling_convention_t *cconv,
if (param->reg0 != NULL) {
/* use reserved spill space on between type */
if (entity != NULL) {
long offset = SPARC_PARAMS_SPILL_OFFSET + i * SPARC_REGISTER_SIZE;
assert(i < SPARC_N_PARAM_REGS);
set_entity_owner(entity, between_type);
set_entity_offset(entity, offset);
set_entity_offset(entity, param->offset);
}
continue;
}
......
Markdown is supported
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