Commit 6bd1f80e authored by Matthias Braun's avatar Matthias Braun
Browse files

amd64: Match immediates for integer stores

parent cc365d84
......@@ -2517,15 +2517,19 @@ static ir_node *gen_Store(ir_node *const node)
amd64_binop_addr_attr_t attr;
memset(&attr, 0, sizeof(attr));
attr.base.base.op_mode = AMD64_OP_ADDR_REG;
ir_node *in[4];
int arity = 0;
/* TODO match immediates for integer stores. */
int reg_input = arity++;
in[reg_input] = be_transform_node(val);
attr.u.reg_input = reg_input;
if (mode_needs_gp_reg(mode)
&& match_immediate_32(&attr.u.immediate, val, false, true)) {
attr.base.base.op_mode = AMD64_OP_ADDR_IMM;
} else {
attr.base.base.op_mode = AMD64_OP_ADDR_REG;
int reg_input = arity++;
in[reg_input] = be_transform_node(val);
attr.u.reg_input = reg_input;
}
ir_node *ptr = get_Store_ptr(node);
perform_address_matching(ptr, &arity, in, &attr.base.addr);
......
Markdown is supported
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