Commit 5d432832 authored by Matthias Braun's avatar Matthias Braun
Browse files

ia32: Remove unnecessary use_frame field form x86_address_t

parent cee90757
......@@ -860,7 +860,6 @@ static void build_address(ia32_address_mode_t *am, ir_node *node,
};
adjust_relocation(&addr->imm);
addr->tls_segment = false;
addr->use_frame = false;
am->ls_mode = get_type_mode(get_entity_type(entity));
am->pinned = false;
return;
......@@ -889,12 +888,8 @@ static void set_address(ir_node *node, const x86_address_t *addr)
attr->am_imm = addr->imm;
set_ia32_am_scale(node, addr->scale);
set_ia32_am_tls_segment(node, addr->tls_segment);
if (addr->imm.kind == X86_IMM_FRAMEOFFSET) {
assert(addr->use_frame);
if (addr->imm.kind == X86_IMM_FRAMEOFFSET)
set_ia32_frame_use(node, IA32_FRAME_USE_AUTO);
} else {
assert(!addr->use_frame);
}
}
/**
......@@ -1442,7 +1437,7 @@ static ir_node *create_lea_from_address(dbg_info *dbgi, ir_node *block,
static bool am_has_immediates(const x86_address_t *addr)
{
return addr->imm.offset != 0 || addr->imm.entity != NULL
|| addr->use_frame;
|| addr->imm.kind == X86_IMM_FRAMEOFFSET;
}
typedef ir_node* (*new_shiftd_func)(dbg_info *dbgi, ir_node *block,
......@@ -3937,7 +3932,6 @@ static void store_gp(dbg_info *dbgi, ia32_address_mode_t *am, ir_node *block,
addr->index = noreg_GP;
addr->mem = store_mem;
addr->imm = (x86_imm32_t) { .kind = X86_IMM_FRAMEOFFSET };
addr->use_frame = true;
am->op_type = ia32_AddrModeS;
am->ls_mode = store_mode;
am->pinned = false;
......@@ -3960,7 +3954,7 @@ static ir_node *gen_x87_gp_to_fp(ir_node *node)
ir_node *const fild = new_bd_ia32_fild(dbgi, new_block, addr->base, addr->index, addr->mem);
ir_node *const new_node = be_new_Proj(fild, pn_ia32_fild_res);
set_am_attributes(fild, &am);
if (addr->use_frame && addr->imm.entity == NULL
if (addr->imm.kind == X86_IMM_FRAMEOFFSET && addr->imm.entity == NULL
&& get_mode_arithmetic(am.ls_mode) != irma_twos_complement)
force_int_stackent(fild, am.ls_mode);
......@@ -4122,7 +4116,6 @@ static void store_fp(dbg_info *dbgi, ia32_address_mode_t *am, ir_node *block,
addr->index = noreg_GP;
addr->mem = mem;
addr->imm = (x86_imm32_t) { .kind = X86_IMM_FRAMEOFFSET };
addr->use_frame = true;
am->op_type = ia32_AddrModeS;
am->ls_mode = mode;
am->pinned = false;
......
......@@ -144,7 +144,6 @@ static ir_node *eat_immediates(x86_address_t *addr, ir_node *node,
assert(addr->imm.entity == NULL);
addr->imm.entity = get_Member_entity(node);
addr->imm.kind = X86_IMM_FRAMEOFFSET;
addr->use_frame = true;
ir_node *ptr = get_Member_ptr(node);
assert(is_Start(get_Proj_pred(ptr)));
return ptr;
......
......@@ -25,7 +25,6 @@ typedef struct x86_address_t {
ir_node *mem; /**< value for memory input (if any). */
x86_imm32_t imm;
unsigned scale : 8; /**< An integer scale. {0,1,2,3} */
bool use_frame : 1; /**< Set, if the frame is accessed */
bool tls_segment : 1; /**< Set if AM is relative to TLS */
bool ip_base : 1; /**< Base is instruction pointer (IP) */
} x86_address_t;
......
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