Commit e40d1594 authored by Michael Beck's avatar Michael Beck
Browse files

- renamed access offset functions

parent 3997b3ce
......@@ -101,10 +101,10 @@ static const char *node_offset_to_str(ir_node *n, char *buf, int buflen) {
if (irn_op == op_be_StackParam) {
entity *ent = be_get_frame_entity(n);
offset = get_entity_offset_bytes(ent);
offset = get_entity_offset(ent);
} else if (irn_op == op_be_Reload || irn_op == op_be_Spill) {
entity *ent = be_get_frame_entity(n);
offset = get_entity_offset_bytes(ent);
offset = get_entity_offset(ent);
} else if (irn_op == op_be_IncSP) {
offset = - be_get_IncSP_offset(n);
} else {
......
......@@ -178,7 +178,7 @@ static void do_dump_atomic_init(struct obstack *obst, ir_node *init)
break;
case symconst_ofs_ent:
obstack_printf(obst, "%d", get_entity_offset_bytes(get_SymConst_entity(init)));
obstack_printf(obst, "%d", get_entity_offset(get_SymConst_entity(init)));
break;
case symconst_type_size:
......@@ -479,7 +479,7 @@ static void dump_global(struct obstack *rdata_obstack, struct obstack *data_obst
for (offset = j = 0; j < graph_length; j++) {
entity *step = get_compound_graph_path_node(path, j);
ir_type *step_type = get_entity_type(step);
int ent_ofs = get_entity_offset_bytes(step);
int ent_ofs = get_entity_offset(step);
int stepsize = 0;
/* add all positive offsets (= offsets in structs) */
......
......@@ -1006,7 +1006,7 @@ static ir_node *gen_StackParam(ir_node *irn, arm_code_gen_t *cg) {
static ir_node *gen_be_FrameAddr(ir_node *irn, arm_code_gen_t *cg) {
ir_node *block = get_nodes_block(irn);
entity *ent = be_get_frame_entity(irn);
int offset = get_entity_offset_bytes(ent);
int offset = get_entity_offset(ent);
ir_node *op = get_irn_n(irn, 0);
ir_node *cnst;
ir_mode *mode = get_irn_mode(irn);
......
......@@ -825,8 +825,8 @@ static ir_type *arm_get_between_type(void *self) {
old_bp_ent = new_entity(between_type, new_id_from_str("old_bp"), old_bp_type);
ret_addr_ent = new_entity(between_type, new_id_from_str("old_bp"), ret_addr_type);
set_entity_offset_bytes(old_bp_ent, 0);
set_entity_offset_bytes(ret_addr_ent, get_type_size_bytes(old_bp_type));
set_entity_offset(old_bp_ent, 0);
set_entity_offset(ret_addr_ent, get_type_size_bytes(old_bp_type));
set_type_size_bytes(between_type, get_type_size_bytes(old_bp_type) + get_type_size_bytes(ret_addr_type));
}
......
......@@ -523,15 +523,15 @@ static ir_type *ia32_abi_get_between_type(void *self)
old_bp_ent = new_entity(between_type, IDENT("old_bp"), old_bp_type);
ret_addr_ent = new_entity(between_type, IDENT("ret_addr"), ret_addr_type);
set_entity_offset_bytes(old_bp_ent, 0);
set_entity_offset_bytes(ret_addr_ent, get_type_size_bytes(old_bp_type));
set_entity_offset(old_bp_ent, 0);
set_entity_offset(ret_addr_ent, get_type_size_bytes(old_bp_type));
set_type_size_bytes(between_type, get_type_size_bytes(old_bp_type) + get_type_size_bytes(ret_addr_type));
set_type_state(between_type, layout_fixed);
omit_fp_between_type = new_type_struct(IDENT("ia32_between_type_omit_fp"));
omit_fp_ret_addr_ent = new_entity(omit_fp_between_type, IDENT("ret_addr"), ret_addr_type);
set_entity_offset_bytes(omit_fp_ret_addr_ent, 0);
set_entity_offset(omit_fp_ret_addr_ent, 0);
set_type_size_bytes(omit_fp_between_type, get_type_size_bytes(ret_addr_type));
set_type_state(omit_fp_between_type, layout_fixed);
}
......
......@@ -92,7 +92,7 @@ static tarval *get_atomic_init_tv(ir_node *init)
case iro_SymConst:
switch (get_SymConst_kind(init)) {
case symconst_ofs_ent:
return new_tarval_from_long(get_entity_offset_bytes(get_SymConst_entity(init)), mode);
return new_tarval_from_long(get_entity_offset(get_SymConst_entity(init)), mode);
break;
case symconst_type_size:
......@@ -155,7 +155,7 @@ static void do_dump_atomic_init(obstack_t *obst, ir_node *init)
break;
case symconst_ofs_ent:
obstack_printf(obst, "%d", get_entity_offset_bytes(get_SymConst_entity(init)));
obstack_printf(obst, "%d", get_entity_offset(get_SymConst_entity(init)));
break;
case symconst_type_size:
......@@ -405,7 +405,7 @@ static void dump_compound_init(obstack_t *obst, entity *ent)
const compound_graph_path *path = get_compound_ent_value_path(ent, i);
int path_len = get_compound_graph_path_length(path);
int offset = get_compound_ent_value_offset_bytes(ent, i);
int offset_bits = get_compound_ent_value_offset_bit_part(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);
int value_len = get_type_size_bits(get_entity_type(last_ent));
......
......@@ -815,12 +815,12 @@ static ir_type *mips_abi_get_between_type(void *self) {
old_fp_ent = new_entity(debug_between_type, new_id_from_str("old_fp"), old_fp_type);
ret_addr_ent = new_entity(debug_between_type, new_id_from_str("ret_addr"), ret_addr_type);
set_entity_offset_bytes(a0_ent, 0);
set_entity_offset_bytes(a1_ent, 4);
set_entity_offset_bytes(a2_ent, 8);
set_entity_offset_bytes(a3_ent, 12);
set_entity_offset_bytes(old_fp_ent, 16);
set_entity_offset_bytes(ret_addr_ent, 20);
set_entity_offset(a0_ent, 0);
set_entity_offset(a1_ent, 4);
set_entity_offset(a2_ent, 8);
set_entity_offset(a3_ent, 12);
set_entity_offset(old_fp_ent, 16);
set_entity_offset(ret_addr_ent, 20);
set_type_size_bytes(debug_between_type, 24);
} else if(!env->debug && opt_between_type == NULL) {
......@@ -829,7 +829,7 @@ static ir_type *mips_abi_get_between_type(void *self) {
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);
set_entity_offset_bytes(old_fp_ent, 0);
set_entity_offset(old_fp_ent, 0);
set_type_size_bytes(opt_between_type, 4);
}
......
......@@ -390,7 +390,7 @@ 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);
lc_efprintf(mips_get_arg_env(), F, "\tsw %1S, %d($fp)\n", node, get_entity_offset_bytes(ent));
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)
......@@ -398,7 +398,7 @@ 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);
lc_efprintf(mips_get_arg_env(), F, "\tlw %1D, %d($fp)\n", node, get_entity_offset_bytes(ent));
lc_efprintf(mips_get_arg_env(), F, "\tlw %1D, %d($fp)\n", node, get_entity_offset(ent));
}
/************************************************************************/
......
......@@ -146,7 +146,7 @@ static void do_dump_atomic_init(struct obstack *obst, ir_node *init)
break;
case symconst_ofs_ent:
obstack_printf(obst, "%d", get_entity_offset_bytes(get_SymConst_entity(init)));
obstack_printf(obst, "%d", get_entity_offset(get_SymConst_entity(init)));
break;
case symconst_type_size:
......@@ -436,7 +436,7 @@ static void dump_global(struct obstack *rdata_obstack, struct obstack *data_obst
for (offset = j = 0; j < graph_length; j++) {
entity *step = get_compound_graph_path_node(path, j);
ir_type *step_type = get_entity_type(step);
int ent_ofs = get_entity_offset_bytes(step);
int ent_ofs = get_entity_offset(step);
int stepsize = 0;
/* add all positive offsets (= offsets in structs) */
......
......@@ -301,8 +301,8 @@ static ir_type *ppc32_abi_get_between_type(void *self)
old_bp_ent = new_entity(between_type, new_id_from_str("old_bp"), old_bp_type);
ret_addr_ent = new_entity(between_type, new_id_from_str("old_bp"), ret_addr_type);
set_entity_offset_bytes(old_bp_ent, 0);
set_entity_offset_bytes(ret_addr_ent, get_type_size_bytes(old_bp_type));
set_entity_offset(old_bp_ent, 0);
set_entity_offset(ret_addr_ent, get_type_size_bytes(old_bp_type));
set_type_size_bytes(between_type, get_type_size_bytes(old_bp_type) + get_type_size_bytes(ret_addr_type));
}
......
......@@ -180,7 +180,7 @@ static void do_dump_atomic_init(struct obstack *obst, ir_node *init)
break;
case symconst_ofs_ent:
obstack_printf(obst, "%d", get_entity_offset_bytes(get_SymConst_entity(init)));
obstack_printf(obst, "%d", get_entity_offset(get_SymConst_entity(init)));
break;
case symconst_type_size:
......@@ -481,7 +481,7 @@ static void dump_global(struct obstack *rdata_obstack, struct obstack *data_obst
for (offset = j = 0; j < graph_length; j++) {
entity *step = get_compound_graph_path_node(path, j);
ir_type *step_type = get_entity_type(step);
int ent_ofs = get_entity_offset_bytes(step);
int ent_ofs = get_entity_offset(step);
int stepsize = 0;
/* add all positive offsets (= offsets in structs) */
......
Supports Markdown
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