Commit 973714c2 authored by Christoph Mallon's avatar Christoph Mallon
Browse files

amd64: Lea alters neither flags nor memory.

parent bd1e59e7
......@@ -402,12 +402,13 @@ Cmp => {
Lea => {
irn_flags => [ "rematerializable" ],
arity => "variable",
outs => [ "res", "flags", "M" ],
reg_req => { out => [ "gp", "flags", "none" ] },
outs => [ "res" ],
reg_req => { out => [ "gp" ] },
attr_type => "amd64_addr_attr_t",
attr => "amd64_insn_mode_t insn_mode, amd64_addr_t addr",
fixed => "amd64_op_mode_t op_mode = AMD64_OP_ADDR;\n",
emit => "lea%M %A, %D0",
mode => $mode_gp,
},
Jcc => {
......
......@@ -354,8 +354,7 @@ static ir_node *gen_Address(ir_node *node)
if (mode == REFERENCE_IP_RELATIVE) {
addr.immediate.entity = entity;
ir_node *lea = new_bd_amd64_Lea(dbgi, block, 0, NULL, INSN_MODE_64, addr);
return new_r_Proj(lea, mode_gp, pn_amd64_Lea_res);
return new_bd_amd64_Lea(dbgi, block, 0, NULL, INSN_MODE_64, addr);
} else {
assert(mode == REFERENCE_GOT);
addr.immediate.entity = new_got_entry_entity(entity);
......@@ -836,7 +835,7 @@ static ir_node *create_Lea_as_Add(ir_node *node, ir_node *op1, ir_node *op2)
ir_node *res = new_bd_amd64_Lea(dbgi, new_block, arity, in, insn_mode, addr);
arch_set_irn_register_reqs_in(res, reqs);
return new_r_Proj(res, mode_gp, pn_amd64_Lea_res);
return res;
}
static ir_node *gen_Add(ir_node *const node)
......@@ -1179,7 +1178,7 @@ static ir_node *gen_Member(ir_node *const node)
ir_node *res = new_bd_amd64_Lea(dbgi, new_block, ARRAY_SIZE(in), in,
INSN_MODE_64, addr);
arch_set_irn_register_reqs_in(res, reg_reqs);
return new_r_Proj(res, mode_gp, pn_amd64_Lea_res);
return res;
}
static ir_node *gen_IJmp(ir_node *node)
......
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