Commit 91cd56b8 authored by Christoph Mallon's avatar Christoph Mallon
Browse files

ia32: Turn PopEbp into a constructor variant of Pop.

parent 90bac0d2
......@@ -1030,10 +1030,10 @@ static void introduce_epilogue(ir_node *const ret)
sched_add_before(ret, curr_sp);
/* Pop ebp. */
restore = new_bd_ia32_PopEbp(NULL, block, curr_mem, curr_sp);
curr_bp = new_r_Proj(restore, mode_gp, pn_ia32_PopEbp_res);
curr_sp = new_r_Proj(restore, mode_gp, pn_ia32_PopEbp_stack);
curr_mem = new_r_Proj(restore, mode_M, pn_ia32_PopEbp_M);
restore = new_bd_ia32_Pop_ebp(NULL, block, curr_mem, curr_sp);
curr_bp = new_r_Proj(restore, mode_gp, pn_ia32_Pop_res);
curr_sp = new_r_Proj(restore, mode_gp, pn_ia32_Pop_stack);
curr_mem = new_r_Proj(restore, mode_M, pn_ia32_Pop_M);
}
sched_add_before(ret, restore);
arch_set_irn_register(curr_bp, bp);
......
......@@ -3101,7 +3101,6 @@ static void ia32_register_binary_emitters(void)
be_set_emitter(op_ia32_Or, bemit_or);
be_set_emitter(op_ia32_OrMem, bemit_ormem);
be_set_emitter(op_ia32_Pop, bemit_pop);
be_set_emitter(op_ia32_PopEbp, bemit_pop);
be_set_emitter(op_ia32_PopMem, bemit_popmem);
be_set_emitter(op_ia32_Popcnt, bemit_popcnt);
be_set_emitter(op_ia32_Push, bemit_push);
......
......@@ -1022,20 +1022,20 @@ PushEax => {
Pop => {
state => "exc_pinned",
reg_req => { in => [ "none", "esp" ], out => [ "gp", "none", "none", "esp:I|S" ] },
ins => [ "mem", "stack" ],
outs => [ "res", "unused", "M", "stack" ],
emit => "pop%M %D0",
latency => 3, # Pop is more expensive than Push on Athlon
},
PopEbp => {
state => "exc_pinned",
reg_req => { in => [ "none", "esp" ], out => [ "ebp:I", "none", "none", "esp:I|S" ] },
constructors => {
"" => {
reg_req => { in => [ "none", "esp" ],
out => [ "gp", "none", "none", "esp:I|S" ] },
},
"ebp" => {
reg_req => { in => [ "none", "esp" ],
out => [ "ebp:I", "none", "none", "esp:I|S" ] },
init_attr => "attr->ls_mode = ia32_mode_gp;",
}
},
ins => [ "mem", "stack" ],
outs => [ "res", "unused", "M", "stack" ],
emit => "pop%M %D0",
init_attr => "attr->ls_mode = ia32_mode_gp;",
latency => 3, # Pop is more expensive than Push on Athlon
},
......
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