summaryrefslogtreecommitdiffhomepage
path: root/ir/be/mips
diff options
context:
space:
mode:
authorChristoph Mallon <christoph.mallon@gmx.de>2018-02-21 08:53:26 +0100
committerChristoph Mallon <christoph.mallon@gmx.de>2018-02-26 14:02:40 +0100
commite3fa1ebd7a23409799ec92a617ed1b59135b05f3 (patch)
treebece90d28803425e2a5b538fc3adfc7a5e8c123e /ir/be/mips
parente914dc9ccfc77ebfeedfeb631d99eec37a8e9557 (diff)
be: Remove the redundant parameter 'sp' from be_new_IncSP().
It only needs the register class, not the specific stack pointer register. So simply get the register class from the parameter 'old_sp'.
Diffstat (limited to 'ir/be/mips')
-rw-r--r--ir/be/mips/mips_bearch.c2
-rw-r--r--ir/be/mips/mips_transform.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/ir/be/mips/mips_bearch.c b/ir/be/mips/mips_bearch.c
index c33793d..9f6a7e1 100644
--- a/ir/be/mips/mips_bearch.c
+++ b/ir/be/mips/mips_bearch.c
@@ -160,7 +160,7 @@ static void mips_assign_spill_slots(ir_graph *const irg)
static ir_node *mips_new_IncSP(ir_node *const block, ir_node *const sp, int const offset, unsigned const align)
{
- return be_new_IncSP(&mips_registers[REG_SP], block, sp, offset, align);
+ return be_new_IncSP(block, sp, offset, align);
}
static void mips_introduce_prologue(ir_graph *const irg, unsigned const size)
diff --git a/ir/be/mips/mips_transform.c b/ir/be/mips/mips_transform.c
index f2f6d4d..bff338c 100644
--- a/ir/be/mips/mips_transform.c
+++ b/ir/be/mips/mips_transform.c
@@ -449,7 +449,7 @@ static ir_node *gen_Call(ir_node *const node)
int const frame_size = cconv.param_stack_size;
ir_node *const block = be_transform_nodes_block(node);
ir_node *const sp = get_Start_sp(irg);
- ir_node *const call_frame = be_new_IncSP(&mips_registers[REG_SP], block, sp, frame_size, 0);
+ ir_node *const call_frame = be_new_IncSP(block, sp, frame_size, 0);
ins[n_mips_jal_stack] = call_frame;
reqs[n_mips_jal_stack] = &mips_single_reg_req_gp_sp;
@@ -488,7 +488,7 @@ static ir_node *gen_Call(ir_node *const node)
}
ir_node *const jal_stack = be_new_Proj(jal, pn_mips_jal_stack);
- ir_node *const new_stack = be_new_IncSP(&mips_registers[REG_SP], block, jal_stack, -frame_size, 0);
+ ir_node *const new_stack = be_new_IncSP(block, jal_stack, -frame_size, 0);
be_stack_record_chain(&stack_env, call_frame, n_be_IncSP_pred, new_stack);
return jal;