Commit 55772c88 authored by Matthias Braun's avatar Matthias Braun
Browse files

amd64: Set correct immediate kind

parent 3efc2d32
......@@ -99,9 +99,7 @@ static void transform_sub_to_neg_add(ir_node *node,
memset(&xor_attr, 0, sizeof(xor_attr));
xor_attr.base.insn_mode = INSN_MODE_64;
xor_attr.base.base.op_mode = AMD64_OP_REG_ADDR;
xor_attr.base.addr.base_input = NO_INPUT;
xor_attr.base.addr.index_input = NO_INPUT;
xor_attr.base.addr.immediate.entity = sign_bit_const;
init_lconst_addr(&xor_attr.base.addr, sign_bit_const);
ir_node *xor_in[] = { in2 };
ir_node *xor = new_bd_amd64_xorp(dbgi, block, ARRAY_SIZE(xor_in),
......
......@@ -303,7 +303,7 @@ ir_entity *create_float_const_entity(ir_tarval *const tv)
return entity;
}
static void init_lconst_addr(amd64_addr_t *addr, ir_entity *entity)
void init_lconst_addr(amd64_addr_t *addr, ir_entity *entity)
{
assert(entity_has_definition(entity));
assert(get_entity_linkage(entity) == IR_LINKAGE_CONSTANT);
......
......@@ -35,6 +35,8 @@ ir_node *amd64_new_IncSP(ir_node *block, ir_node *old_sp, int offset,
*/
ir_entity *create_float_const_entity(ir_tarval *const tv);
void init_lconst_addr(amd64_addr_t *addr, ir_entity *entity);
/** Creates a tarval with the given mode and only
* the most-significant (first) bit set.
*
......
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