return 0;
}
-static entity *mips_get_frame_entity(const void *self, const ir_node *irn) {
+static ir_entity *mips_get_frame_entity(const void *self, const ir_node *irn) {
if(is_mips_load_r(irn) || is_mips_store_r(irn)) {
mips_attr_t *attr = get_mips_attr(irn);
return NULL;
}
-static void mips_set_frame_entity(const void *self, ir_node *irn, entity *ent) {
+static void mips_set_frame_entity(const void *self, ir_node *irn, ir_entity *ent) {
mips_attr_t *attr = get_mips_attr(irn);
assert(is_mips_load_r(irn) || is_mips_store_r(irn));
attr->stack_entity = ent;
static ir_type *debug_between_type = NULL;
static ir_type *opt_between_type = NULL;
- static entity *old_fp_ent = NULL;
+ static ir_entity *old_fp_ent = NULL;
if(env->debug && debug_between_type == NULL) {
- entity *a0_ent, *a1_ent, *a2_ent, *a3_ent;
- entity *ret_addr_ent;
+ ir_entity *a0_ent, *a1_ent, *a2_ent, *a3_ent;
+ ir_entity *ret_addr_ent;
ir_type *ret_addr_type = new_type_primitive(new_id_from_str("return_addr"), mode_P);
ir_type *old_fp_type = new_type_primitive(new_id_from_str("fp"), mode_P);
ir_type *old_param_type = new_type_primitive(new_id_from_str("param"), mode_Iu);
set_type_size_bytes(debug_between_type, 24);
} else if(!env->debug && opt_between_type == NULL) {
ir_type *old_fp_type = new_type_primitive(new_id_from_str("fp"), mode_P);
- entity *old_fp_ent;
+ ir_entity *old_fp_ent;
opt_between_type = new_type_class(new_id_from_str("mips_between_type"));
old_fp_ent = new_entity(opt_between_type, new_id_from_str("old_fp"), old_fp_type);
static void mips_emit_Spill(const ir_node* node, mips_emit_env_t *env)
{
- FILE *F = env->out;
- entity *ent = be_get_frame_entity(node);
+ FILE *F = env->out;
+ ir_entity *ent = be_get_frame_entity(node);
lc_efprintf(mips_get_arg_env(), F, "\tsw %1S, %d($fp)\n", node, get_entity_offset(ent));
}
static void mips_emit_Reload(const ir_node* node, mips_emit_env_t *env)
{
- FILE *F = env->out;
- entity *ent = be_get_frame_entity(node);
+ FILE *F = env->out;
+ ir_entity *ent = be_get_frame_entity(node);
lc_efprintf(mips_get_arg_env(), F, "\tlw %1D, %d($fp)\n", node, get_entity_offset(ent));
}
const arch_register_t *callee_reg;
// call to imediate value (label)
- entity *callee = be_Call_get_entity(node);
+ ir_entity *callee = be_Call_get_entity(node);
if(callee != NULL) {
fprintf(F, "\tjal %s\n", get_entity_name(callee));
return;
* @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;
* @param obst The obst to dump on.
* @param ent The entity to dump.
*/
-static void dump_string_cst(struct obstack *obst, entity *ent)
+static void dump_string_cst(struct obstack *obst, ir_entity *ent)
{
int i, n;
* Dumps the initialization of global variables that are not
* "uninitialized".
*/
-static void dump_global(struct obstack *rdata_obstack, struct obstack *data_obstack, struct obstack *comm_obstack, entity *ent)
+static void dump_global(struct obstack *rdata_obstack, struct obstack *data_obstack, struct obstack *comm_obstack, ir_entity *ent)
{
ir_type *ty = get_entity_type(ent);
const char *ld_name = get_entity_ld_name(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)) {
/* We wanna know how many arrays are on the path to the entity. We also have to know how
* many elements each array holds to calculate the offset for the entity. */
for (j = 0; j < graph_length; j++) {
- entity *step = get_compound_graph_path_node(path, j);
- ir_type *step_type = get_entity_type(step);
- int ty_size = (get_type_size_bits(step_type) + 7) >> 3;
- int k, n = 0;
+ ir_entity *step = get_compound_graph_path_node(path, j);
+ ir_type *step_type = get_entity_type(step);
+ int ty_size = (get_type_size_bits(step_type) + 7) >> 3;
+ int k, n = 0;
if (is_Array_type(step_type))
for (k = 0; k < get_array_n_dimensions(step_type); k++)
if (aipos) aipos--;
for (offset = j = 0; j < graph_length; j++) {
- entity *step = get_compound_graph_path_node(path, j);
+ ir_entity *step = get_compound_graph_path_node(path, j);
ir_type *step_type = get_entity_type(step);
int ent_ofs = get_entity_offset(step);
int stepsize = 0;
ir_mode *load_store_mode; /**< contains the mode of a load/store */
ir_mode *original_mode; /**< contains the original mode of the node */
} modes;
- entity *stack_entity; /**< contains the entity on the stack for a load/store mode */
+ ir_entity *stack_entity; /**< contains the entity on the stack for a load/store mode */
int stack_entity_offset; /**< contains the real stack offset for the entity */
int switch_default_pn; /**< proj number of default case in switch */
static ir_node *create_conv_store_load(mips_transform_env_t *env, ir_mode* srcmode, ir_mode* dstmode) {
ir_node *nomem, *store, *mem_proj, *value_proj, *load;
- entity *mem_entity;
+ ir_entity *mem_entity;
ir_node *node = env->irn;
ir_node *pred = get_Conv_op(node);
ir_node *sp;
}
static void mips_transform_Spill(mips_transform_env_t* env) {
- ir_node *node = env->irn;
- ir_node *sched_point = NULL;
- ir_node *store, *proj;
- ir_node *nomem = new_rd_NoMem(env->irg);
- ir_node *ptr = get_irn_n(node, 0);
- ir_node *val = get_irn_n(node, 1);
- entity *ent = be_get_frame_entity(node);
+ ir_node *node = env->irn;
+ ir_node *sched_point = NULL;
+ ir_node *store, *proj;
+ ir_node *nomem = new_rd_NoMem(env->irg);
+ ir_node *ptr = get_irn_n(node, 0);
+ ir_node *val = get_irn_n(node, 1);
+ ir_entity *ent = be_get_frame_entity(node);
mips_attr_t *attr;
if(sched_is_scheduled(node)) {
}
static void mips_transform_Reload(mips_transform_env_t* env) {
- ir_node *node = env->irn;
- ir_node *sched_point = NULL;
- ir_node *load, *proj;
- ir_node *ptr = get_irn_n(node, 0);
- ir_node *mem = get_irn_n(node, 1);
- ir_mode *mode = get_irn_mode(node);
- entity *ent = be_get_frame_entity(node);
+ ir_node *node = env->irn;
+ ir_node *sched_point = NULL;
+ ir_node *load, *proj;
+ ir_node *ptr = get_irn_n(node, 0);
+ ir_node *mem = get_irn_n(node, 1);
+ ir_mode *mode = get_irn_mode(node);
+ ir_entity *ent = be_get_frame_entity(node);
const arch_register_t* reg;
mips_attr_t *attr;