Commit 17f0e0cb authored by Christoph Mallon's avatar Christoph Mallon
Browse files

amd64: Rename push_rbp to push_reg and add an operand for the value, which it pushes.

parent 6d7f9e79
......@@ -219,15 +219,15 @@ push_am => {
emit => "push%M %A",
},
push_rbp => {
push_reg => {
op_flags => [ "uses_memory" ],
state => "exc_pinned",
in_reqs => [ "rsp" ],
in_reqs => [ "rsp", "gp" ],
out_reqs => [ "rsp:I|S" ],
ins => [ "stack" ],
ins => [ "stack", "val" ],
outs => [ "stack" ],
fixed => "amd64_op_mode_t op_mode = AMD64_OP_NONE;\n",
emit => "pushq %%rbp",
emit => "pushq %^S1",
},
pop_am => {
......
......@@ -93,7 +93,7 @@ static int amd64_get_sp_bias(const ir_node *node)
if (is_amd64_push_am(node)) {
const amd64_addr_attr_t *attr = get_amd64_addr_attr_const(node);
return get_insn_mode_bytes(attr->insn_mode);
} else if (is_amd64_push_rbp(node)) {
} else if (is_amd64_push_reg(node)) {
/* 64-bit register size */
return AMD64_REGISTER_SIZE;
} else if (is_amd64_pop_am(node)) {
......@@ -569,8 +569,8 @@ static void introduce_prologue(ir_graph *const irg)
if (!layout->sp_relative) {
/* push rbp */
ir_node *const initial_bp = be_get_initial_reg_value(irg, bp);
ir_node *push = new_bd_amd64_push_rbp(NULL, block, initial_sp);
ir_node *curr_sp = new_r_Proj(push, mode_gp, pn_amd64_push_rbp_stack);
ir_node *const push = new_bd_amd64_push_reg(NULL, block, initial_sp, initial_bp);
ir_node *const curr_sp = new_r_Proj(push, mode_gp, pn_amd64_push_reg_stack);
arch_set_irn_register(curr_sp, sp);
sched_add_after(start, push);
......
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