Commit 83741d06 authored by Tobias Rapp's avatar Tobias Rapp
Browse files

amd64: Small fix for the new IJmp node

parent b332d1d4
...@@ -340,8 +340,7 @@ IJmp => { ...@@ -340,8 +340,7 @@ IJmp => {
reg_req => { in => [ "gp" ], out => [ "none" ] }, reg_req => { in => [ "gp" ], out => [ "none" ] },
arity => "variable", arity => "variable",
attr_type => "amd64_addr_attr_t", attr_type => "amd64_addr_attr_t",
attr => "amd64_insn_mode_t insn_mode, amd64_addr_t addr", attr => "amd64_insn_mode_t insn_mode, amd64_op_mode_t op_mode, amd64_addr_t addr",
fixed => "amd64_op_mode_t op_mode = AMD64_OP_CALL_ADDR;\n",
mode => "mode_X", mode => "mode_X",
emit => "jmp %AM", emit => "jmp %AM",
}, },
......
...@@ -970,8 +970,15 @@ static ir_node *gen_IJmp(ir_node *node) ...@@ -970,8 +970,15 @@ static ir_node *gen_IJmp(ir_node *node)
reqs = reg_mem_reqs; reqs = reg_mem_reqs;
} }
amd64_op_mode_t op_mode;
if (addr.immediate.entity == NULL) {
op_mode = AMD64_OP_CALL_ADDR;
} else {
op_mode = AMD64_OP_ADDR;
}
ir_node *jmp = new_bd_amd64_IJmp(dbgi, new_block, arity, in, ir_node *jmp = new_bd_amd64_IJmp(dbgi, new_block, arity, in,
INSN_MODE_64, addr); INSN_MODE_64, op_mode, addr);
arch_set_irn_register_reqs_in(jmp, reqs); arch_set_irn_register_reqs_in(jmp, reqs);
return jmp; return jmp;
......
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