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

ia32: Pass the store mode to the constructor of Push.

parent 0133e48f
......@@ -823,11 +823,10 @@ static ir_node *create_push(ir_node *node, ir_node *schedpoint, ir_node *sp,
ir_node *noreg = ia32_new_NoReg_gp(irg);
ir_node *frame = get_irg_frame(irg);
ir_node *push = new_bd_ia32_Push(dbgi, block, frame, noreg, mem, noreg, sp);
ir_node *const push = new_bd_ia32_Push(dbgi, block, frame, noreg, mem, noreg, sp, mode);
set_ia32_frame_ent(push, ent);
set_ia32_op_type(push, ia32_AddrModeS);
set_ia32_ls_mode(push, mode);
set_ia32_is_spill(push);
sched_add_before(schedpoint, push);
......@@ -1108,10 +1107,8 @@ static void introduce_prologue(ir_graph *const irg)
ir_node *mem = get_irg_initial_mem(irg);
ir_node *noreg = ia32_new_NoReg_gp(irg);
ir_node *initial_bp = be_get_initial_reg_value(irg, bp);
ir_node *push = new_bd_ia32_Push(NULL, block, noreg, noreg, mem,
initial_bp, initial_sp);
ir_node *push = new_bd_ia32_Push(NULL, block, noreg, noreg, mem, initial_bp, initial_sp, mode_gp);
ir_node *curr_sp = new_r_Proj(push, mode_gp, pn_ia32_Push_stack);
set_ia32_ls_mode(push, ia32_mode_gp);
arch_set_irn_register(curr_sp, sp);
sched_add_after(start, push);
......
......@@ -424,9 +424,7 @@ static void peephole_IncSP_Store_to_push(ir_node *irn)
ir_node *mem = get_irn_n(store, n_ia32_mem);
const arch_register_t *spreg = arch_get_irn_register(curr_sp);
ir_node *push = new_bd_ia32_Push(get_irn_dbg_info(store), block, noreg, noreg,
mem, val, curr_sp);
set_ia32_ls_mode(push, ia32_mode_gp);
ir_node *const push = new_bd_ia32_Push(get_irn_dbg_info(store), block, noreg, noreg, mem, val, curr_sp, ia32_mode_gp);
copy_mark(store, push);
if (first_push == NULL)
......
......@@ -1034,6 +1034,8 @@ Push => {
outs => [ "M", "stack" ],
am => "source,unary",
latency => 2,
attr => "ir_mode *store_mode",
init_attr => "attr->ls_mode = store_mode;",
},
PushEax => {
......
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