Commit 110ec5d1 authored by Michael Beck's avatar Michael Beck
Browse files

rename type entity into ir_entity

parent 213c4b9f
......@@ -296,11 +296,11 @@ typedef struct {
ir_graph *irg; /**< The associated graph. */
} ia32_abi_env_t;
static entity *ia32_get_frame_entity(const void *self, const ir_node *irn) {
static ir_entity *ia32_get_frame_entity(const void *self, const ir_node *irn) {
return is_ia32_irn(irn) ? get_ia32_frame_ent(irn) : NULL;
}
static void ia32_set_frame_entity(const void *self, ir_node *irn, entity *ent) {
static void ia32_set_frame_entity(const void *self, ir_node *irn, ir_entity *ent) {
set_ia32_frame_ent(irn, ent);
}
......@@ -512,9 +512,9 @@ static ir_type *ia32_abi_get_between_type(void *self)
ia32_abi_env_t *env = self;
if (! between_type) {
entity *old_bp_ent;
entity *ret_addr_ent;
entity *omit_fp_ret_addr_ent;
ir_entity *old_bp_ent;
ir_entity *ret_addr_ent;
ir_entity *omit_fp_ret_addr_ent;
ir_type *old_bp_type = new_type_primitive(IDENT("bp"), mode_P);
ir_type *ret_addr_type = new_type_primitive(IDENT("return_addr"), mode_P);
......@@ -984,7 +984,7 @@ static void ia32_before_ra(void *self) {
*/
static void transform_to_Load(ia32_transform_env_t *env) {
ir_node *irn = env->irn;
entity *ent = be_get_frame_entity(irn);
ir_entity *ent = be_get_frame_entity(irn);
ir_mode *mode = env->mode;
ir_node *noreg = ia32_new_NoReg_gp(env->cg);
ir_node *sched_point = NULL;
......@@ -1038,7 +1038,7 @@ static void transform_to_Load(ia32_transform_env_t *env) {
*/
static void transform_to_Store(ia32_transform_env_t *env) {
ir_node *irn = env->irn;
entity *ent = be_get_frame_entity(irn);
ir_entity *ent = be_get_frame_entity(irn);
ir_mode *mode = env->mode;
ir_node *noreg = ia32_new_NoReg_gp(env->cg);
ir_node *nomem = new_rd_NoMem(env->irg);
......@@ -1085,7 +1085,7 @@ static void transform_to_Store(ia32_transform_env_t *env) {
exchange(irn, proj);
}
static ir_node *create_push(ia32_transform_env_t *env, ir_node *schedpoint, ir_node *sp, ir_node *mem, entity *ent) {
static ir_node *create_push(ia32_transform_env_t *env, ir_node *schedpoint, ir_node *sp, ir_node *mem, ir_entity *ent) {
ir_node *noreg = ia32_new_NoReg_gp(env->cg);
ir_node *frame = get_irg_frame(env->irg);
......@@ -1101,7 +1101,7 @@ static ir_node *create_push(ia32_transform_env_t *env, ir_node *schedpoint, ir_n
return push;
}
static ir_node *create_pop(ia32_transform_env_t *env, ir_node *schedpoint, ir_node *sp, entity *ent) {
static ir_node *create_pop(ia32_transform_env_t *env, ir_node *schedpoint, ir_node *sp, ir_entity *ent) {
ir_node *noreg = ia32_new_NoReg_gp(env->cg);
ir_node *frame = get_irg_frame(env->irg);
......@@ -1148,7 +1148,7 @@ static void transform_MemPerm(ia32_transform_env_t *env) {
// create pushs
for(i = 0; i < arity; ++i) {
entity *ent = be_get_MemPerm_in_entity(node, i);
ir_entity *ent = be_get_MemPerm_in_entity(node, i);
ir_type *enttype = get_entity_type(ent);
int entbits = get_type_size_bits(enttype);
ir_node *mem = get_irn_n(node, i + 1);
......@@ -1170,7 +1170,7 @@ static void transform_MemPerm(ia32_transform_env_t *env) {
// create pops
for(i = arity - 1; i >= 0; --i) {
entity *ent = be_get_MemPerm_out_entity(node, i);
ir_entity *ent = be_get_MemPerm_out_entity(node, i);
ir_type *enttype = get_entity_type(ent);
int entbits = get_type_size_bits(enttype);
......
......@@ -99,8 +99,8 @@ typedef struct _ia32_code_gen_t {
const be_irg_t *birg; /**< The be-irg (contains additional information about the irg) */
ir_node **blk_sched; /**< an array containing the scheduled blocks */
ia32_optimize_t opt; /**< contains optimization information */
entity *fp_to_gp; /**< allocated entity for fp to gp conversion */
entity *gp_to_fp; /**< allocated entity for gp to fp conversion */
ir_entity *fp_to_gp; /**< allocated entity for fp to gp conversion */
ir_entity *gp_to_fp; /**< allocated entity for gp to fp conversion */
nodeset *kill_conv; /**< Remember all convs to be killed */
int arch; /**< instruction architecture */
int opt_arch; /**< optimize for architecture */
......@@ -150,11 +150,11 @@ typedef struct _ia32_transform_env_t {
} ia32_transform_env_t;
typedef struct _ia32_intrinsic_env_t {
ir_graph *irg; /**< the irg, these entities belong to */
entity *ll_div_op1; /**< entity for first div operand (move into FPU) */
entity *ll_div_op2; /**< entity for second div operand (move into FPU) */
entity *ll_d_conv; /**< entity for converts ll -> d */
entity *d_ll_conv; /**< entity for converts d -> ll */
ir_graph *irg; /**< the irg, these entities belong to */
ir_entity *ll_div_op1; /**< entity for first div operand (move into FPU) */
ir_entity *ll_div_op2; /**< entity for second div operand (move into FPU) */
ir_entity *ll_d_conv; /**< entity for converts ll -> d */
ir_entity *d_ll_conv; /**< entity for converts d -> ll */
} ia32_intrinsic_env_t;
/**
......@@ -188,8 +188,8 @@ void ia32_handle_intrinsics(void);
* @param omode the output mode of the emulated opcode
* @param context the context parameter
*/
entity *ia32_create_intrinsic_fkt(ir_type *method, const ir_op *op,
const ir_mode *imode, const ir_mode *omode,
void *context);
ir_entity *ia32_create_intrinsic_fkt(ir_type *method, const ir_op *op,
const ir_mode *imode, const ir_mode *omode,
void *context);
#endif /* _BEARCH_IA32_T_H_ */
......@@ -1690,7 +1690,7 @@ void emit_ia32_Conv_I2I8Bit(const ir_node *irn, ia32_emit_env_t *emit_env) {
*/
static void emit_be_Call(const ir_node *irn, ia32_emit_env_t *emit_env) {
FILE *F = emit_env->out;
entity *ent = be_Call_get_entity(irn);
ir_entity *ent = be_Call_get_entity(irn);
char cmd_buf[SNPRINTF_BUF_LEN], cmnt_buf[SNPRINTF_BUF_LEN];
if (ent) {
......@@ -2279,7 +2279,7 @@ static void ia32_gen_block(ir_node *block, ir_node *last_block, ia32_emit_env_t
* Emits code for function start.
*/
static void ia32_emit_func_prolog(FILE *F, ir_graph *irg, ia32_emit_env_t *emit_env) {
entity *irg_ent = get_irg_entity(irg);
ir_entity *irg_ent = get_irg_entity(irg);
const char *irg_name = get_entity_ld_name(irg_ent);
cpu_support cpu = emit_env->isa->opt_arch;
const be_irg_t *birg = emit_env->cg->birg;
......
......@@ -254,7 +254,7 @@ static void dump_atomic_init(obstack_t *obst, ir_node *init)
* @param ent The entity
* @return 1 if it is a string constant, 0 otherwise
*/
static int ent_is_string_const(entity *ent)
static int ent_is_string_const(ir_entity *ent)
{
int res = 0;
ir_type *ty;
......@@ -305,7 +305,7 @@ static int ent_is_string_const(entity *ent)
* @param obst The obst to dump on.
* @param ent The entity to dump.
*/
static void dump_string_cst(obstack_t *obst, entity *ent)
static void dump_string_cst(obstack_t *obst, ir_entity *ent)
{
int i, n;
......@@ -336,7 +336,7 @@ static void dump_string_cst(obstack_t *obst, entity *ent)
obstack_printf(obst, "\"\n");
}
static void dump_array_init(obstack_t *obst, entity *ent)
static void dump_array_init(obstack_t *obst, ir_entity *ent)
{
const ir_type *ty = get_entity_type(ent);
int i;
......@@ -345,7 +345,7 @@ static void dump_array_init(obstack_t *obst, entity *ent)
/* potential spare values should be already included! */
for (i = 0; i < get_compound_ent_n_values(ent); ++i) {
entity *step = get_compound_ent_value_member(ent, i);
ir_entity *step = get_compound_ent_value_member(ent, i);
ir_type *stype = get_entity_type(step);
if (get_type_mode(stype)) {
......@@ -379,7 +379,7 @@ typedef struct {
} v;
} normal_or_bitfield;
static void dump_compound_init(obstack_t *obst, entity *ent)
static void dump_compound_init(obstack_t *obst, ir_entity *ent)
{
ir_type *ty = get_entity_type(ent);
normal_or_bitfield *vals;
......@@ -407,7 +407,7 @@ static void dump_compound_init(obstack_t *obst, entity *ent)
int offset = get_compound_ent_value_offset_bytes(ent, i);
int offset_bits = get_compound_ent_value_offset_bit_remainder(ent, i);
ir_node *value = get_compound_ent_value(ent, i);
entity *last_ent = get_compound_graph_path_node(path, path_len - 1);
ir_entity *last_ent = get_compound_graph_path_node(path, path_len - 1);
int value_len = get_type_size_bits(get_entity_type(last_ent));
if(offset_bits != 0 || value_len % 8 != 0) {
......@@ -469,7 +469,7 @@ static void dump_compound_init(obstack_t *obst, entity *ent)
}
}
static void dump_global(ia32_decl_env_t *env, entity *ent)
static void dump_global(ia32_decl_env_t *env, ir_entity *ent)
{
obstack_t *obst;
ir_type *type = get_entity_type(ent);
......@@ -548,7 +548,7 @@ static void ia32_dump_globals(ir_type *gt, ia32_decl_env_t *env)
int i, n = get_compound_n_members(gt);
for (i = 0; i < n; i++) {
entity *ent = get_compound_member(gt, i);
ir_entity *ent = get_compound_member(gt, i);
dump_global(env, ent);
}
}
......
......@@ -27,7 +27,7 @@
static i_record *intrinsics;
/** An array to cache all entities */
static entity *i_ents[iro_MaxOpcode];
static ir_entity *i_ents[iro_MaxOpcode];
/*
* Maps all intrinsic calls that the backend support
......@@ -321,24 +321,24 @@ typedef enum {
*/
static int DivMod_mapper(ir_node *call, void *ctx, ia32_intrinsic_divmod_t dmtp) {
ia32_intrinsic_env_t *env = ctx;
ir_graph *irg = current_ir_graph;
dbg_info *dbg = get_irn_dbg_info(call);
ir_node *block = get_nodes_block(call);
ir_node **params = get_Call_param_arr(call);
ir_type *method = get_Call_type(call);
ir_node *a_l = params[BINOP_Left_Low];
ir_node *a_h = params[BINOP_Left_High];
ir_node *b_l = params[BINOP_Right_Low];
ir_node *b_h = params[BINOP_Right_High];
ir_mode *l_res_mode = get_type_mode(get_method_res_type(method, 0));
ir_mode *h_res_mode = get_type_mode(get_method_res_type(method, 1));
int mode_bytes = get_mode_size_bytes(ia32_reg_classes[CLASS_ia32_gp].mode);
entity *ent_a = env->irg == irg ? env->ll_div_op1 : NULL;
entity *ent_b = env->irg == irg ? env->ll_div_op2 : NULL;
ir_node *l_res, *h_res, *frame;
ir_node *store_l, *store_h;
ir_node *op_mem[2], *mem, *fa_mem, *fb_mem;
ir_node *fa, *fb, *fres;
ir_graph *irg = current_ir_graph;
dbg_info *dbg = get_irn_dbg_info(call);
ir_node *block = get_nodes_block(call);
ir_node **params = get_Call_param_arr(call);
ir_type *method = get_Call_type(call);
ir_node *a_l = params[BINOP_Left_Low];
ir_node *a_h = params[BINOP_Left_High];
ir_node *b_l = params[BINOP_Right_Low];
ir_node *b_h = params[BINOP_Right_High];
ir_mode *l_res_mode = get_type_mode(get_method_res_type(method, 0));
ir_mode *h_res_mode = get_type_mode(get_method_res_type(method, 1));
int mode_bytes = get_mode_size_bytes(ia32_reg_classes[CLASS_ia32_gp].mode);
ir_entity *ent_a = env->irg == irg ? env->ll_div_op1 : NULL;
ir_entity *ent_b = env->irg == irg ? env->ll_div_op2 : NULL;
ir_node *l_res, *h_res, *frame;
ir_node *store_l, *store_h;
ir_node *op_mem[2], *mem, *fa_mem, *fb_mem;
ir_node *fa, *fb, *fres;
/* allocate memory on frame to store args */
......@@ -462,17 +462,17 @@ static int map_Mod(ir_node *call, void *ctx) {
*/
static int map_Conv(ir_node *call, void *ctx) {
ia32_intrinsic_env_t *env = ctx;
ir_graph *irg = current_ir_graph;
dbg_info *dbg = get_irn_dbg_info(call);
ir_node *block = get_nodes_block(call);
ir_node **params = get_Call_param_arr(call);
ir_type *method = get_Call_type(call);
int n = get_Call_n_params(call);
int gp_bytes = get_mode_size_bytes(ia32_reg_classes[CLASS_ia32_gp].mode);
entity *ent;
ir_node *l_res, *h_res, *frame, *fres;
ir_node *store_l, *store_h;
ir_node *op_mem[2], *mem;
ir_graph *irg = current_ir_graph;
dbg_info *dbg = get_irn_dbg_info(call);
ir_node *block = get_nodes_block(call);
ir_node **params = get_Call_param_arr(call);
ir_type *method = get_Call_type(call);
int n = get_Call_n_params(call);
int gp_bytes = get_mode_size_bytes(ia32_reg_classes[CLASS_ia32_gp].mode);
ir_entity *ent;
ir_node *l_res, *h_res, *frame, *fres;
ir_node *store_l, *store_h;
ir_node *op_mem[2], *mem;
if (n == 1) {
/* We have a Conv float -> long long here */
......@@ -595,12 +595,12 @@ static int map_Conv(ir_node *call, void *ctx) {
}
/* Ia32 implementation of intrinsic mapping. */
entity *ia32_create_intrinsic_fkt(ir_type *method, const ir_op *op,
const ir_mode *imode, const ir_mode *omode,
void *context)
ir_entity *ia32_create_intrinsic_fkt(ir_type *method, const ir_op *op,
const ir_mode *imode, const ir_mode *omode,
void *context)
{
i_record elt;
entity **ent = NULL;
ir_entity **ent = NULL;
i_mapper_func mapper;
if (! intrinsics)
......
......@@ -43,9 +43,9 @@
* @return The ident of the SymConst
*/
static ident *get_sc_ident(ir_node *symc) {
entity *ent;
ir_type *owner;
ident *id;
ir_entity *ent;
ir_type *owner;
ident *id;
switch (get_SymConst_kind(symc)) {
case symconst_addr_name:
......@@ -909,7 +909,7 @@ void set_ia32_tgt_mode(ir_node *node, ir_mode *mode) {
/**
* Gets the frame entity assigned to this node.
*/
entity *get_ia32_frame_ent(const ir_node *node) {
ir_entity *get_ia32_frame_ent(const ir_node *node) {
ia32_attr_t *attr = get_ia32_attr(node);
return attr->frame_ent;
}
......@@ -917,7 +917,7 @@ entity *get_ia32_frame_ent(const ir_node *node) {
/**
* Sets the frame entity for this node.
*/
void set_ia32_frame_ent(ir_node *node, entity *ent) {
void set_ia32_frame_ent(ir_node *node, ir_entity *ent) {
ia32_attr_t *attr = get_ia32_attr(node);
attr->frame_ent = ent;
set_ia32_use_frame(node);
......
......@@ -276,12 +276,12 @@ void set_ia32_tgt_mode(ir_node *node, ir_mode *mode);
/**
* Gets the frame entity assigned to this node;
*/
entity *get_ia32_frame_ent(const ir_node *node);
ir_entity *get_ia32_frame_ent(const ir_node *node);
/**
* Sets the frame entity for this node;
*/
void set_ia32_frame_ent(ir_node *node, entity *ent);
void set_ia32_frame_ent(ir_node *node, ir_entity *ent);
/**
* Returns the argument register requirements of an ia32 node.
......
......@@ -119,7 +119,7 @@ typedef struct _ia32_attr_t {
ir_mode *src_mode; /**< source mode for conversion */
ir_mode *tgt_mode; /**< target mode for conversion */
entity *frame_ent; /**< the frame entity attached to this node */
ir_entity *frame_ent; /**< the frame entity attached to this node */
long pn_code; /**< projnum "types" (e.g. indicate compare operators and argument numbers) */
......
......@@ -139,11 +139,11 @@ static ir_type *get_prim_type(pmap *types, ir_mode *mode)
/**
* Get an entity that is initialized with a tarval
*/
static entity *get_entity_for_tv(ia32_code_gen_t *cg, ir_node *cnst)
static ir_entity *get_entity_for_tv(ia32_code_gen_t *cg, ir_node *cnst)
{
tarval *tv = get_Const_tarval(cnst);
pmap_entry *e = pmap_find(cg->isa->tv_ent, tv);
entity *res;
ir_entity *res;
ir_graph *rem;
if (! e) {
......@@ -896,13 +896,13 @@ static ia32_am_cand_t is_am_candidate(ia32_code_gen_t *cg, heights_t *h, const i
static int load_store_addr_is_equal(const ir_node *load, const ir_node *store,
const ir_node *addr_b, const ir_node *addr_i)
{
int is_equal = (addr_b == get_irn_n(load, 0)) && (addr_i == get_irn_n(load, 1));
entity *lent = get_ia32_frame_ent(load);
entity *sent = get_ia32_frame_ent(store);
ident *lid = get_ia32_am_sc(load);
ident *sid = get_ia32_am_sc(store);
char *loffs = get_ia32_am_offs(load);
char *soffs = get_ia32_am_offs(store);
int is_equal = (addr_b == get_irn_n(load, 0)) && (addr_i == get_irn_n(load, 1));
ir_entity *lent = get_ia32_frame_ent(load);
ir_entity *sent = get_ia32_frame_ent(store);
ident *lid = get_ia32_am_sc(load);
ident *sid = get_ia32_am_sc(store);
char *loffs = get_ia32_am_offs(load);
char *soffs = get_ia32_am_offs(store);
/* are both entities set and equal? */
if (is_equal && (lent || sent))
......@@ -938,11 +938,11 @@ typedef enum _ia32_take_lea_attr {
static int do_new_lea(ir_node *irn, ir_node *base, ir_node *index, ir_node *lea,
int have_am_sc, ia32_code_gen_t *cg)
{
entity *irn_ent = get_ia32_frame_ent(irn);
entity *lea_ent = get_ia32_frame_ent(lea);
int ret_val = 0;
int is_noreg_base = be_is_NoReg(cg, base);
int is_noreg_index = be_is_NoReg(cg, index);
ir_entity *irn_ent = get_ia32_frame_ent(irn);
ir_entity *lea_ent = get_ia32_frame_ent(lea);
int ret_val = 0;
int is_noreg_base = be_is_NoReg(cg, base);
int is_noreg_index = be_is_NoReg(cg, index);
ia32_am_flavour_t am_flav = get_ia32_am_flavour(lea);
/* If the Add and the LEA both have a different frame entity set: keep */
......@@ -1085,7 +1085,7 @@ static ir_node *fold_addr(ia32_code_gen_t *cg, ir_node *irn, ir_node *noreg) {
int have_am_sc = 0;
int am_sc_sign = 0;
ident *am_sc = NULL;
entity *lea_ent = NULL;
ir_entity *lea_ent = NULL;
ir_node *left, *right, *temp;
ir_node *base, *index;
int consumed_left_shift;
......@@ -1388,8 +1388,8 @@ static ir_node *fold_addr(ia32_code_gen_t *cg, ir_node *irn, ir_node *noreg) {
* @param lea The LEA
*/
static void merge_loadstore_lea(ir_node *irn, ir_node *lea) {
entity *irn_ent = get_ia32_frame_ent(irn);
entity *lea_ent = get_ia32_frame_ent(lea);
ir_entity *irn_ent = get_ia32_frame_ent(irn);
ir_entity *lea_ent = get_ia32_frame_ent(lea);
/* If the irn and the LEA both have a different frame entity set: do not merge */
if (irn_ent && lea_ent && (irn_ent != lea_ent))
......
......@@ -208,13 +208,13 @@ static ident *gen_fp_known_const(ia32_known_const_t kct) {
{ TP_SFP_ABS, ENT_SFP_ABS, SFP_ABS }, /* ia32_SABS */
{ TP_DFP_ABS, ENT_DFP_ABS, DFP_ABS } /* ia32_DABS */
};
static entity *ent_cache[ia32_known_const_max];
static ir_entity *ent_cache[ia32_known_const_max];
const char *tp_name, *ent_name, *cnst_str;
ir_type *tp;
ir_node *cnst;
ir_graph *rem;
entity *ent;
ir_entity *ent;
tarval *tv;
ir_mode *mode;
......@@ -2007,7 +2007,7 @@ static ir_node *gen_Psi(ia32_transform_env_t *env) {
*/
static ir_node *gen_x87_fp_to_gp(ia32_transform_env_t *env, ir_mode *tgt_mode) {
ia32_code_gen_t *cg = env->cg;
entity *ent = cg->fp_to_gp;
ir_entity *ent = cg->fp_to_gp;
ir_graph *irg = env->irg;
ir_node *block = env->block;
ir_node *noreg = ia32_new_NoReg_gp(env->cg);
......@@ -2050,14 +2050,14 @@ static ir_node *gen_x87_fp_to_gp(ia32_transform_env_t *env, ir_mode *tgt_mode) {
*/
static ir_node *gen_x87_gp_to_fp(ia32_transform_env_t *env, ir_mode *src_mode) {
ia32_code_gen_t *cg = env->cg;
entity *ent = cg->gp_to_fp;
ir_graph *irg = env->irg;
ir_node *block = env->block;
ir_node *noreg = ia32_new_NoReg_gp(env->cg);
ir_node *nomem = get_irg_no_mem(irg);
ir_node *op = get_Conv_op(env->irn);
ir_node *fild, *store, *mem;
int src_bits;
ir_entity *ent = cg->gp_to_fp;
ir_graph *irg = env->irg;
ir_node *block = env->block;
ir_node *noreg = ia32_new_NoReg_gp(env->cg);
ir_node *nomem = get_irg_no_mem(irg);
ir_node *op = get_Conv_op(env->irn);
ir_node *fild, *store, *mem;
int src_bits;
if (! ent) {
int size = get_mode_size_bytes(ia32_reg_classes[CLASS_ia32_gp].mode);
......@@ -2250,14 +2250,14 @@ static ir_node *gen_Conv(ia32_transform_env_t *env) {
********************************************/
static ir_node *gen_be_StackParam(ia32_transform_env_t *env) {
ir_node *new_op = NULL;
ir_node *node = env->irn;
ir_node *noreg = ia32_new_NoReg_gp(env->cg);
ir_node *mem = new_rd_NoMem(env->irg);
ir_node *ptr = get_irn_n(node, 0);
entity *ent = arch_get_frame_entity(env->cg->arch_env, node);
ir_mode *mode = env->mode;
long pn_res;
ir_node *new_op = NULL;
ir_node *node = env->irn;
ir_node *noreg = ia32_new_NoReg_gp(env->cg);
ir_node *mem = new_rd_NoMem(env->irg);
ir_node *ptr = get_irn_n(node, 0);
ir_entity *ent = arch_get_frame_entity(env->cg->arch_env, node);
ir_mode *mode = env->mode;
long pn_res;
if (mode_is_float(mode)) {
FP_USED(env->cg);
......@@ -2315,14 +2315,14 @@ static ir_node *gen_be_FrameAddr(ia32_transform_env_t *env) {
* Transforms a FrameLoad into an ia32 Load.
*/
static ir_node *gen_be_FrameLoad(ia32_transform_env_t *env) {
ir_node *new_op = NULL;
ir_node *node = env->irn;
ir_node *noreg = ia32_new_NoReg_gp(env->cg);
ir_node *mem = get_irn_n(node, 0);
ir_node *ptr = get_irn_n(node, 1);
entity *ent = arch_get_frame_entity(env->cg->arch_env, node);
ir_mode *mode = get_type_mode(get_entity_type(ent));
ir_node *projs[pn_Load_max];
ir_node *new_op = NULL;
ir_node *node = env->irn;
ir_node *noreg = ia32_new_NoReg_gp(env->cg);
ir_node *mem = get_irn_n(node, 0);
ir_node *ptr = get_irn_n(node, 1);
ir_entity *ent = arch_get_frame_entity(env->cg->arch_env, node);
ir_mode *mode = get_type_mode(get_entity_type(ent));
ir_node *projs[pn_Load_max];
ia32_collect_Projs(env->irn, projs, pn_Load_max);
......@@ -2363,15 +2363,15 @@ static ir_node *gen_be_FrameLoad(ia32_transform_env_t *env) {
* Transforms a FrameStore into an ia32 Store.
*/
static ir_node *gen_be_FrameStore(ia32_transform_env_t *env) {
ir_node *new_op = NULL;
ir_node *node = env->irn;
ir_node *noreg = ia32_new_NoReg_gp(env->cg);
ir_node *mem = get_irn_n(node, 0);
ir_node *ptr = get_irn_n(node, 1);
ir_node *val = get_irn_n(node, 2);
entity *ent = arch_get_frame_entity(env->cg->arch_env, node);
ir_mode *mode = get_irn_mode(val);
ir_node *projs[pn_Store_max];
ir_node *new_op = NULL;
ir_node *node = env->irn;
ir_node *noreg = ia32_new_NoReg_gp(env->cg);
ir_node *mem = get_irn_n(node, 0);
ir_node *ptr = get_irn_n(node, 1);
ir_node *val = get_irn_n(node, 2);
ir_entity *ent = arch_get_frame_entity(env->cg->arch_env, node);
ir_mode *mode = get_irn_mode(val);
ir_node *projs[pn_Store_max];
ia32_collect_Projs(env->irn, projs, pn_Store_max);
......@@ -2427,13 +2427,13 @@ static ir_node *gen_be_Call(ia32_transform_env_t *env) {
if (mode_is_float(mode)) {
/* store st(0) onto stack */
ir_node *frame = get_irg_frame(env->irg);
ir_node *fstp = new_rd_ia32_GetST0(env->dbg, env->irg, env->block, frame, get_irg_no_mem(env->irg));
ir_node *mproj = new_r_Proj(env->irg, env->block, fstp, mode_M, pn_ia32_GetST0_M);
entity *ent = frame_alloc_area(get_irg_frame_type(env->irg), get_mode_size_bytes(mode), 16, 0);
ir_node *sse_load, *p, *bad, *keep;
ir_node **in_keep;
int keep_arity, i;
ir_node *frame = get_irg_frame(env->irg);
ir_node *fstp = new_rd_ia32_GetST0(env->dbg, env->irg, env->block, frame, get_irg_no_mem(env->irg));
ir_node *mproj = new_r_Proj(env->irg, env->block, fstp, mode_M, pn_ia32_GetST0_M);
ir_entity *ent = frame_alloc_area(get_irg_frame_type(env->irg), get_mode_size_bytes(mode), 16, 0);
ir_node *sse_load, *p, *bad, *keep;
ir_node **in_keep;
int keep_arity, i;
set_ia32_ls_mode(fstp, mode);
set_ia32_op_type(fstp, ia32_AddrModeD);
......@@ -2502,10 +2502,10 @@ static ir_node *gen_be_Call(ia32_transform_env_t *env) {
* In case SSE is used we need to copy the result from XMM0 to FPU TOS before return.
*/
static ir_node *gen_be_Return(ia32_transform_env_t *env) {
ir_node *ret_val = get_irn_n(env->irn, be_pos_Return_val);
ir_node *ret_mem = get_irn_n(env->irn, be_pos_Return_mem);
entity *ent = get_irg_entity(get_irn_irg(ret_val));
ir_type *tp = get_entity_type(ent);
ir_node *ret_val = get_irn_n(env->irn, be_pos_Return_val);
ir_node *ret_mem = get_irn_n(env->irn, be_pos_Return_mem);
ir_entity *ent = get_irg_entity(get_irn_irg(ret_val));
ir_type *tp = get_entity_type(ent);
if (be_Return_get_n_rets(env->irn) < 1 || ! ret_val || ! USE_SSE2(env->cg))
return NULL;
......@@ -2517,11 +2517,11 @@ static ir_node *gen_be_Return(ia32_transform_env_t *env) {
if (is_Primitive_type(res_type)) {
mode = get_type_mode(res_type);
if (mode_is_float(mode)) {
ir_node *frame;
entity *ent;
ir_node *sse_store, *fld, *mproj, *barrier;
int pn_ret_val = get_Proj_proj(ret_val);
int pn_ret_mem = get_Proj_proj(ret_mem);
ir_node *frame;
ir_entity *ent;
ir_node *sse_store, *fld, *mproj, *barrier;
int pn_ret_val = get_Proj_proj(ret_val);