Commit ccb254d3 authored by Matthias Braun's avatar Matthias Braun
Browse files

x86: Rename X86_IMM_FRAMEOFFSET to X86_IMM_FRAMEENT

parent 2c5bd74e
......@@ -228,7 +228,7 @@ static void emit_relocation_no_offset(x86_immediate_kind_t const kind,
case X86_IMM_TLS_IE:
case X86_IMM_TLS_LE:
case X86_IMM_PICBASE_REL:
case X86_IMM_FRAMEOFFSET:
case X86_IMM_FRAMEENT:
case X86_IMM_GOT:
case X86_IMM_GOTOFF:
break;
......
......@@ -1495,7 +1495,7 @@ static ir_node *gen_Member(ir_node *const node)
amd64_addr_t addr = {
.immediate = {
.entity = entity,
.kind = X86_IMM_FRAMEOFFSET,
.kind = X86_IMM_FRAMEENT,
},
.variant = X86_ADDR_BASE,
.base_input = 0,
......@@ -2259,7 +2259,7 @@ static void store_to_temp(construct_binop_func const new_store,
.size = size,
.addr = {
.immediate = {
.kind = X86_IMM_FRAMEOFFSET,
.kind = X86_IMM_FRAMEENT,
},
.variant = X86_ADDR_BASE,
.base_input = 1,
......@@ -2597,7 +2597,7 @@ ir_node *amd64_new_spill(ir_node *value, ir_node *after)
amd64_binop_addr_attr_t attr = {
.base.base.op_mode = AMD64_OP_ADDR_REG,
.base.addr = {
.immediate.kind = X86_IMM_FRAMEOFFSET,
.immediate.kind = X86_IMM_FRAMEENT,
.variant = X86_ADDR_BASE,
.base_input = 1,
},
......@@ -2651,7 +2651,7 @@ ir_node *amd64_new_reload(ir_node *value, ir_node *spill, ir_node *before)
ir_mode *const mode = get_irn_mode(value);
amd64_addr_t addr = {
.immediate.kind = X86_IMM_FRAMEOFFSET,
.immediate.kind = X86_IMM_FRAMEENT,
.variant = X86_ADDR_BASE,
.base_input = 0,
.mem_input = 1,
......@@ -2681,7 +2681,7 @@ ir_node *amd64_new_reload(ir_node *value, ir_node *spill, ir_node *before)
arch_add_irn_flags(load, arch_irn_flag_reload);
sched_add_before(before, load);
amd64_addr_attr_t *attr = get_amd64_addr_attr(load);
attr->addr.immediate.kind = X86_IMM_FRAMEOFFSET;
attr->addr.immediate.kind = X86_IMM_FRAMEENT;
return be_new_Proj(load, pn_res);
}
......
......@@ -369,7 +369,7 @@ static ir_node *make_mov_val64_to_offset_mem(dbg_info *dbgi, ir_node *block, ir_
.immediate = {
.entity = entity,
.offset = offset,
.kind = entity ? X86_IMM_FRAMEOFFSET : X86_IMM_VALUE,
.kind = entity ? X86_IMM_FRAMEENT : X86_IMM_VALUE,
},
.variant = X86_ADDR_BASE,
.base_input = 1,
......@@ -399,7 +399,7 @@ static ir_node *make_mov_xmmval64_to_offset_mem(dbg_info *dbgi, ir_node *block,
.immediate = {
.entity = entity,
.offset = offset,
.kind = X86_IMM_FRAMEOFFSET,
.kind = X86_IMM_FRAMEENT,
},
.variant = X86_ADDR_BASE,
.base_input = 1,
......@@ -424,7 +424,7 @@ static ir_node *make_lea_with_offset_entity(dbg_info *dbgi, ir_node *block,
amd64_addr_t lea_addr = {
.immediate = {
.entity = offset,
.kind = X86_IMM_FRAMEOFFSET,
.kind = X86_IMM_FRAMEENT,
},
.variant = X86_ADDR_BASE,
.base_input = 0,
......
......@@ -51,7 +51,7 @@ static ir_entity *amd64_get_frame_entity(const ir_node *node)
if (!amd64_has_addr_attr(get_amd64_attr_const(node)->op_mode))
return NULL;
const amd64_addr_attr_t *attr = get_amd64_addr_attr_const(node);
if (attr->addr.immediate.kind != X86_IMM_FRAMEOFFSET)
if (attr->addr.immediate.kind != X86_IMM_FRAMEENT)
return NULL;
return attr->addr.immediate.entity;
}
......@@ -85,7 +85,7 @@ static void amd64_set_frame_offset(ir_node *node, int offset)
if (layout->sp_relative)
attr->addr.immediate.offset -= get_insn_size_bytes(attr->size);
}
assert(attr->addr.immediate.kind == X86_IMM_FRAMEOFFSET);
assert(attr->addr.immediate.kind == X86_IMM_FRAMEENT);
attr->addr.immediate.kind = X86_IMM_VALUE;
attr->addr.immediate.entity = NULL;
}
......@@ -119,7 +119,7 @@ static ir_node *create_push(ir_node *node, ir_node *schedpoint, ir_node *sp,
amd64_addr_t addr = {
.immediate = {
.kind = X86_IMM_FRAMEOFFSET,
.kind = X86_IMM_FRAMEENT,
.entity = ent,
},
.variant = X86_ADDR_BASE,
......@@ -141,7 +141,7 @@ static ir_node *create_pop(ir_node *node, ir_node *schedpoint, ir_node *sp,
amd64_addr_t addr = {
.immediate = {
.kind = X86_IMM_FRAMEOFFSET,
.kind = X86_IMM_FRAMEENT,
.entity = ent,
},
.variant = X86_ADDR_BASE,
......@@ -485,7 +485,7 @@ static void amd64_collect_frame_entity_nodes(ir_node *node, void *data)
const amd64_addr_attr_t *attr = get_amd64_addr_attr_const(node);
x86_imm32_t const *imm = &attr->addr.immediate;
if (imm->kind == X86_IMM_FRAMEOFFSET && imm->entity == NULL) {
if (imm->kind == X86_IMM_FRAMEENT && imm->entity == NULL) {
const ir_type *type = get_type_for_insn_size(attr->size);
be_load_needs_frame_entity(env, node, type);
}
......
......@@ -137,7 +137,7 @@ static ir_entity *ia32_get_frame_entity(const ir_node *node)
if (!is_ia32_irn(node))
return NULL;
ia32_attr_t const *const attr = get_ia32_attr_const(node);
if (attr->am_imm.kind == X86_IMM_FRAMEOFFSET) {
if (attr->am_imm.kind == X86_IMM_FRAMEENT) {
assert(get_ia32_frame_use(node) != IA32_FRAME_USE_NONE);
return attr->am_imm.entity;
}
......@@ -150,7 +150,7 @@ static void ia32_set_frame_entity(ir_node *node, ir_entity *entity,
{
ia32_attr_t *const attr = get_ia32_attr(node);
attr->am_imm = (x86_imm32_t) {
.kind = X86_IMM_FRAMEOFFSET,
.kind = X86_IMM_FRAMEENT,
.entity = entity,
.offset = attr->am_imm.offset,
};
......@@ -173,7 +173,7 @@ static void ia32_set_frame_entity(ir_node *node, ir_entity *entity,
static void ia32_set_frame_offset(ir_node *node, int bias)
{
ia32_attr_t *const attr = get_ia32_attr(node);
assert(attr->am_imm.kind == X86_IMM_FRAMEOFFSET);
assert(attr->am_imm.kind == X86_IMM_FRAMEENT);
/* Pop nodes modify the stack pointer before calculating the
* destination address, fix this here */
......@@ -755,7 +755,7 @@ static ir_node *create_push(ir_node *node, ir_node *schedpoint, ir_node *sp,
noreg, sp, mode);
ia32_attr_t *const attr = get_ia32_attr(push);
attr->am_imm = (x86_imm32_t) {
.kind = X86_IMM_FRAMEOFFSET,
.kind = X86_IMM_FRAMEENT,
.entity = ent,
};
set_ia32_frame_use(push, IA32_FRAME_USE_AUTO);
......@@ -778,7 +778,7 @@ static ir_node *create_pop(ir_node *node, ir_node *schedpoint, ir_node *sp,
get_irg_no_mem(irg), sp);
ia32_attr_t *const attr = get_ia32_attr(pop);
attr->am_imm = (x86_imm32_t) {
.kind = X86_IMM_FRAMEOFFSET,
.kind = X86_IMM_FRAMEENT,
.entity = ent,
};
set_ia32_frame_use(pop, IA32_FRAME_USE_AUTO);
......@@ -931,7 +931,7 @@ static void ia32_collect_frame_entity_nodes(ir_node *node, void *data)
if (!is_ia32_irn(node) || get_ia32_op_type(node) != ia32_AddrModeS)
return;
ia32_attr_t const *const attr = get_ia32_attr_const(node);
if (attr->am_imm.kind != X86_IMM_FRAMEOFFSET) {
if (attr->am_imm.kind != X86_IMM_FRAMEENT) {
assert(get_ia32_frame_use(node) == IA32_FRAME_USE_NONE);
return;
}
......@@ -941,7 +941,7 @@ static void ia32_collect_frame_entity_nodes(ir_node *node, void *data)
ir_type const *type;
switch (get_ia32_frame_use(node)) {
case IA32_FRAME_USE_NONE:
panic("X86_IMM_FRAMEOFFSET but IA32_FRAME_USE_NONE");
panic("X86_IMM_FRAMEENT but IA32_FRAME_USE_NONE");
case IA32_FRAME_USE_32BIT:
type = get_type_for_mode(ia32_mode_gp);
goto request_entity;
......
......@@ -201,7 +201,7 @@ static void ia32_emit_relocation(x86_imm32_t const *const imm)
be_emit_char('-');
be_emit_string(pic_base_label);
return;
case X86_IMM_FRAMEOFFSET:
case X86_IMM_FRAMEENT:
case X86_IMM_GOTPCREL:
case X86_IMM_VALUE:
break;
......
......@@ -739,7 +739,7 @@ static int ia32_attrs_equal_(const ia32_attr_t *a, const ia32_attr_t *b)
{
/* nodes with not yet assigned entities shouldn't be CSEd (important for
* unsigned int -> double conversions */
if (a->am_imm.kind == X86_IMM_FRAMEOFFSET && a->am_imm.entity == NULL)
if (a->am_imm.kind == X86_IMM_FRAMEENT && a->am_imm.entity == NULL)
return false;
return a->tp == b->tp
......
......@@ -167,8 +167,8 @@ static inline void set_ia32_frame_use(ir_node *const node, ia32_frame_use_t cons
attr->frame_use = val;
if (val != IA32_FRAME_USE_NONE) {
assert(attr->am_imm.kind == X86_IMM_VALUE ||
attr->am_imm.kind == X86_IMM_FRAMEOFFSET);
attr->am_imm.kind = X86_IMM_FRAMEOFFSET;
attr->am_imm.kind == X86_IMM_FRAMEENT);
attr->am_imm.kind = X86_IMM_FRAMEENT;
}
}
......
......@@ -866,7 +866,7 @@ static void peephole_ia32_Lea(ir_node *node)
return;
/* Frame entities should already be expressed in the offsets. */
assert(get_ia32_attr_const(node)->am_imm.kind != X86_IMM_FRAMEOFFSET);
assert(get_ia32_attr_const(node)->am_imm.kind != X86_IMM_FRAMEENT);
/* We can transform Leas where the out register is the same as either the
* base or index register back to an Add or Shl. */
......
......@@ -886,7 +886,7 @@ 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)
if (addr->imm.kind == X86_IMM_FRAMEENT)
set_ia32_frame_use(node, IA32_FRAME_USE_AUTO);
}
......@@ -1435,7 +1435,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->imm.kind == X86_IMM_FRAMEOFFSET;
|| addr->imm.kind == X86_IMM_FRAMEENT;
}
typedef ir_node* (*new_shiftd_func)(dbg_info *dbgi, ir_node *block,
......@@ -3955,7 +3955,7 @@ static void store_gp(dbg_info *dbgi, ia32_address_mode_t *am, ir_node *block,
addr->base = frame;
addr->index = noreg_GP;
addr->mem = store_mem;
addr->imm = (x86_imm32_t) { .kind = X86_IMM_FRAMEOFFSET };
addr->imm = (x86_imm32_t) { .kind = X86_IMM_FRAMEENT };
am->op_type = ia32_AddrModeS;
am->ls_mode = store_mode;
am->pinned = false;
......@@ -3978,7 +3978,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->imm.kind == X86_IMM_FRAMEOFFSET && addr->imm.entity == NULL
if (addr->imm.kind == X86_IMM_FRAMEENT && addr->imm.entity == NULL
&& get_mode_arithmetic(am.ls_mode) != irma_twos_complement)
force_int_stackent(fild, am.ls_mode);
......@@ -4139,7 +4139,7 @@ static void store_fp(dbg_info *dbgi, ia32_address_mode_t *am, ir_node *block,
addr->base = frame;
addr->index = noreg_GP;
addr->mem = mem;
addr->imm = (x86_imm32_t) { .kind = X86_IMM_FRAMEOFFSET };
addr->imm = (x86_imm32_t) { .kind = X86_IMM_FRAMEENT };
am->op_type = ia32_AddrModeS;
am->ls_mode = mode;
am->pinned = false;
......@@ -5170,7 +5170,7 @@ static ir_node *make_load_from_frame(ir_node *const node,
set_ia32_ls_mode(load, ia32_mode_gp);
ia32_attr_t *const attr = get_ia32_attr(load);
attr->am_imm = (x86_imm32_t) {
.kind = X86_IMM_FRAMEOFFSET,
.kind = X86_IMM_FRAMEENT,
.entity = get_ent(irg),
};
set_ia32_frame_use(load, IA32_FRAME_USE_AUTO);
......@@ -5567,7 +5567,7 @@ static ir_node *gen_va_start(ir_node *node)
set_ia32_frame_use(ap, IA32_FRAME_USE_AUTO);
ia32_attr_t *const attr = get_ia32_attr(ap);
attr->am_imm = (x86_imm32_t){
.kind = X86_IMM_FRAMEOFFSET,
.kind = X86_IMM_FRAMEENT,
.entity = va_start_entity,
};
......
......@@ -143,7 +143,7 @@ static ir_node *eat_immediates(x86_address_t *addr, ir_node *node,
} else if (is_Member(node)) {
assert(addr->imm.entity == NULL);
addr->imm.entity = get_Member_entity(node);
addr->imm.kind = X86_IMM_FRAMEOFFSET;
addr->imm.kind = X86_IMM_FRAMEENT;
ir_node *ptr = get_Member_ptr(node);
assert(is_Start(get_Proj_pred(ptr)));
return ptr;
......
......@@ -95,7 +95,7 @@ char const *x86_get_immediate_kind_str(x86_immediate_kind_t const kind)
case X86_IMM_PICBASE_REL: return "picbase_rel";
case X86_IMM_TLS_IE: return "tls_ie";
case X86_IMM_TLS_LE: return "tls_le";
case X86_IMM_FRAMEOFFSET: return "frameoffset";
case X86_IMM_FRAMEENT: return "frameent";
case X86_IMM_GOTPCREL: return "gotpcrel";
case X86_IMM_GOTOFF: return "gotoff";
case X86_IMM_GOT: return "got";
......
......@@ -25,7 +25,7 @@ typedef enum x86_immediate_kind_t {
X86_IMM_PICBASE_REL, /**< relative to pic base address */
X86_IMM_TLS_IE, /**< thread local storage, initial exec */
X86_IMM_TLS_LE, /**< thread local storage, load exec */
X86_IMM_FRAMEOFFSET, /**< offset to entity on stackframe */
X86_IMM_FRAMEENT, /**< offset to entity on stackframe */
X86_IMM_GOTPCREL, /**< global offset table entry PC relative (elf64) */
X86_IMM_GOTOFF, /**< address relative to global offset table */
X86_IMM_GOT, /**< global offset table entry offset */
......
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