Commit 1f74c79b authored by Christoph Mallon's avatar Christoph Mallon
Browse files

cleanup: Make some version of gcc more happy by reformulating initializers.

This avoids some (mostly false) warnings about missing initializers.
parent 5481520a
......@@ -70,9 +70,11 @@ static void transform_sub_to_neg_add(ir_node *node,
ir_entity *sign_bit_const = create_float_const_entity(tv);
amd64_binop_addr_attr_t xor_attr = {
.base.base = {
.op_mode = AMD64_OP_REG_ADDR,
.size = INSN_SIZE_64,
.base = {
.base = {
.op_mode = AMD64_OP_REG_ADDR,
.size = INSN_SIZE_64,
},
},
};
init_lconst_addr(&xor_attr.base.addr, sign_bit_const);
......
......@@ -2595,15 +2595,6 @@ ir_node *amd64_new_spill(ir_node *value, ir_node *after)
ir_node *const mem = get_irg_no_mem(irg);
ir_mode *const mode = get_irn_mode(value);
amd64_binop_addr_attr_t attr = {
.base.base.op_mode = AMD64_OP_ADDR_REG,
.base.addr = {
.immediate.kind = X86_IMM_FRAMEENT,
.variant = X86_ADDR_BASE,
.base_input = 1,
},
.u.reg_input = 0,
};
ir_node *in[] = { value, frame, mem };
amd64_insn_size_t size;
......@@ -2627,7 +2618,21 @@ ir_node *amd64_new_spill(ir_node *value, ir_node *after)
reqs = reg_reg_mem_reqs;
}
attr.base.base.size = size;
amd64_binop_addr_attr_t const attr = {
.base = {
.base = {
.op_mode = AMD64_OP_ADDR_REG,
.size = size,
},
.addr = {
.immediate.kind = X86_IMM_FRAMEENT,
.variant = X86_ADDR_BASE,
.base_input = 1,
},
},
.u.reg_input = 0,
};
ir_node *const store = cons(NULL, block, ARRAY_SIZE(in), in, reqs, &attr);
arch_add_irn_flags(store, arch_irn_flag_spill);
sched_add_after(after, store);
......
......@@ -331,8 +331,10 @@ static ir_node *make_mov_imm32_to_offset_mem(dbg_info *dbgi, ir_node *block, ir_
int32_t const offset = get_entity_offset(offset_ent);
amd64_binop_addr_attr_t mov_attr = {
.base = {
.base.op_mode = AMD64_OP_ADDR_IMM,
.base.size = INSN_SIZE_32,
.base = {
.op_mode = AMD64_OP_ADDR_IMM,
.size = INSN_SIZE_32,
},
.addr = {
.immediate = {
.offset = offset,
......@@ -363,8 +365,10 @@ static ir_node *make_mov_val64_to_offset_mem(dbg_info *dbgi, ir_node *block, ir_
int32_t const offset = get_entity_offset(offset_ent);
amd64_binop_addr_attr_t mov_attr = {
.base = {
.base.op_mode = AMD64_OP_ADDR_REG,
.base.size = INSN_SIZE_64,
.base = {
.op_mode = AMD64_OP_ADDR_REG,
.size = INSN_SIZE_64,
},
.addr = {
.immediate = {
.entity = entity,
......@@ -393,8 +397,10 @@ static ir_node *make_mov_xmmval64_to_offset_mem(dbg_info *dbgi, ir_node *block,
int32_t const offset = get_entity_offset(offset_ent);
amd64_binop_addr_attr_t mov_attr = {
.base = {
.base.op_mode = AMD64_OP_ADDR_REG,
.base.size = INSN_SIZE_64,
.base = {
.op_mode = AMD64_OP_ADDR_REG,
.size = INSN_SIZE_64,
},
.addr = {
.immediate = {
.entity = entity,
......
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