return 0;
}
-static entity *ppc32_get_frame_entity(const void *self, const ir_node *irn) {
+static ir_entity *ppc32_get_frame_entity(const void *self, const ir_node *irn) {
if(!is_ppc32_irn(irn)) return NULL;
if(get_ppc32_type(irn)!=ppc32_ac_FrameEntity) return NULL;
return get_ppc32_frame_entity(irn);
}
-static void ppc32_set_frame_entity(const void *self, const ir_node *irn, entity *ent) {
+static void ppc32_set_frame_entity(const void *self, const ir_node *irn, ir_entity *ent) {
if (! is_ppc32_irn(irn) || get_ppc32_type(irn) != ppc32_ac_FrameEntity)
return;
set_ppc32_frame_entity(irn, ent);
static ir_type *ppc32_abi_get_between_type(void *self)
{
static ir_type *between_type = NULL;
- static entity *old_bp_ent = NULL;
+ static ir_entity *old_bp_ent = NULL;
if(!between_type) {
- entity *ret_addr_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_bp_type = new_type_primitive(new_id_from_str("bp"), mode_P);
}
}
-int is_direct_entity(entity *ent);
+int is_direct_entity(ir_entity *ent);
/**
* Collects all SymConsts which need to be accessed "indirectly"
void ppc32_collect_symconsts_walk(ir_node *node, void *env) {
if(get_irn_op(node) == op_SymConst)
{
- entity *ent = get_SymConst_entity(node);
+ ir_entity *ent = get_SymConst_entity(node);
if(!is_direct_entity(ent))
pset_insert_ptr(symbol_pset, ent);
}
ppc32_isa_t *isa; /**< the isa instance */
const be_irg_t *birg; /**< The be-irg (contains additional information about the irg) */
unsigned area_size; /**< size of call area for the current irg */
- entity *area; /**< the entity representing the call area or NULL for leaf functions */
+ ir_entity *area; /**< the entity representing the call area or NULL for leaf functions */
ir_node *start_succ_block; /**< the block succeeding the start block in the cfg */
ir_node **blk_sched; /**< an array containing the scheduled blocks */
DEBUG_ONLY(firm_dbg_module_t *mod;) /**< debugging module */
*/
static void emit_be_Call(const ir_node *irn, ppc32_emit_env_t *env) {
FILE *F = env->out;
- entity *call_ent = be_Call_get_entity(irn);
+ ir_entity *call_ent = be_Call_get_entity(irn);
if(call_ent)
{
/*static void emit_Spill(const ir_node *irn, ppc32_emit_env_t *emit_env) {
ir_node *context = be_get_Spill_context(irn);
- entity *entity = be_get_spill_entity(irn);
+ ir_entity *entity = be_get_spill_entity(irn);
}*/
/***********************************************************************************
* @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;
void ppc32_dump_indirect_symbols(struct obstack *isyms)
{
- entity *ent;
- for(ent=pset_first(symbol_pset); ent; ent=pset_next(symbol_pset))
- {
- const char *ld_name = get_entity_ld_name(ent);
- obstack_printf(isyms, ".non_lazy_symbol_pointer\n%s:\n\t.indirect_symbol _%s\n\t.long 0\n\n",ld_name,ld_name);
- }
+ ir_entity *ent;
+
+ foreach_pset(symbol_pset, ent) {
+ const char *ld_name = get_entity_ld_name(ent);
+ obstack_printf(isyms, ".non_lazy_symbol_pointer\n%s:\n\t.indirect_symbol _%s\n\t.long 0\n\n",ld_name,ld_name);
+ }
}
/************************************************************************/
/**
* Sets an entity (also updating the content_type)
*/
-void set_ppc32_frame_entity(const ir_node *node, entity *ent) {
+void set_ppc32_frame_entity(const ir_node *node, ir_entity *ent) {
ppc32_attr_t *attr = get_ppc32_attr(node);
attr->content_type = ppc32_ac_FrameEntity;
attr->data.frame_entity = ent;
/**
* Returns an entity
*/
-entity *get_ppc32_frame_entity(const ir_node *node) {
+ir_entity *get_ppc32_frame_entity(const ir_node *node) {
ppc32_attr_t *attr = get_ppc32_attr(node);
return attr->data.frame_entity;
}
void set_ppc32_symconst_ident(const ir_node *node, ident *symconst_ident);
ident *get_ppc32_symconst_ident(const ir_node *node);
-void set_ppc32_frame_entity(const ir_node *node, entity *ent);
-entity *get_ppc32_frame_entity(const ir_node *node);
+void set_ppc32_frame_entity(const ir_node *node, ir_entity *ent);
+ir_entity *get_ppc32_frame_entity(const ir_node *node);
void set_ppc32_rlwimi_const(const ir_node *node, unsigned shift, unsigned maskA, unsigned maskB);
rlwimi_const_t *get_ppc32_rlwimi_const(const ir_node *node);
union {
tarval *constant_tarval;
ident *symconst_ident;
- entity *frame_entity;
+ ir_entity *frame_entity;
rlwimi_const_t rlwimi_const;
int proj_nr;
int offset;
extern pset *symbol_pset;
extern ir_op *get_op_Mulh(void);
-int is_direct_entity(entity *ent);
+int is_direct_entity(ir_entity *ent);
ir_mode* ppc32_mode_Cond = NULL;
}
else if(is_ppc32_SymConst(ptr))
{
- entity *ent = get_ppc32_frame_entity(ptr);
+ ir_entity *ent = get_ppc32_frame_entity(ptr);
if(is_direct_entity(ent))
{
id_symconst = get_entity_ident(ent);
*/
struct tv_ent {
- entity *ent;
+ ir_entity *ent;
tarval *tv;
};
struct tv_ent *entry;
ir_node *cnst,*symcnst;
ir_graph *rem;
- entity *ent;
+ ir_entity *ent;
if(!const_set)
const_set = new_set(cmp_tv_ent, 10);
{
ir_node *addr, *load;
ir_mode *mode = env->mode;
- entity *ent;
+ ir_entity *ent;
env->irn = gen_fp_known_symconst(env, tv_const);
env->mode = mode_P;
ent = get_ppc32_frame_entity(env->irn);
* Returns true, if the entity can be accessed directly,
* or false, if the address must be loaded first
*/
-int is_direct_entity(entity *ent) {
+int is_direct_entity(ir_entity *ent) {
return get_entity_visibility(ent)!=visibility_external_allocated;
/* visibility vis = get_entity_visibility(ent);
if(is_Method_type(get_entity_type(ent)))
* @return the created ppc Load immediate node
*/
static ir_node *gen_ppc32_SymConst(ppc32_transform_env_t *env) {
- entity *ent = get_ppc32_frame_entity(env->irn);
+ ir_entity *ent = get_ppc32_frame_entity(env->irn);
ident *id_symconst = get_entity_ident(ent);
ir_node *node;
switch(get_nice_modecode(env->mode)){
ir_node *current_block;
int conv_nodes_found;
-entity *memslot;
+ir_entity *memslot;
ir_node *memory;
/**
ir_mode *from_mode, ir_mode *to_mode)
{
ir_type *method_type;
- entity *method_ent;
+ ir_entity *method_ent;
ir_node *in[1];
ir_node *call, *callee, *call_results;
*/
struct tv_ent {
- entity *ent;
+ ir_entity *ent;
tarval *tv;
};
struct tv_ent *entry;
ir_node *cnst;
ir_graph *rem;
- entity *ent;
+ ir_entity *ent;
if(!const_set)
const_set = new_set(cmp_tv_ent, 10);