return NULL;
}
+static void mips_set_frame_entity(const void *self, ir_node *irn, 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;
+}
+
/**
* This function is called by the generic backend to correct offsets for
* nodes accessing the stack.
mips_classify,
mips_get_flags,
mips_get_frame_entity,
+ mips_set_frame_entity,
mips_set_frame_offset,
- NULL
+ NULL, /* get_inverse */
+ NULL, /* get_op_estimated_cost */
+ NULL, /* possible_memory_operand */
+ NULL, /* perform_memory_operand */
};
mips_irn_ops_t mips_irn_ops = {
/**
* Called immediately before emit phase.
*/
-static void mips_finish_irg(ir_graph *irg, mips_code_gen_t *cg) {
- /* TODO: - fix offsets for nodes accessing stack
- - ...
- */
+static void mips_finish_irg(void *self) {
+ mips_code_gen_t *cg = self;
+ ir_graph *irg = cg->irg;
+
+ dump_ir_block_graph_sched(irg, "-mips-finished");
}
cg->emit_decls = 0;
}
- mips_finish_irg(irg, cg);
- dump_ir_block_graph_sched(irg, "-mips-finished");
mips_gen_routine(out, irg, cg);
cur_reg_set = NULL;
mips_before_sched, /* before scheduling hook */
mips_before_ra, /* before register allocation hook */
mips_after_ra,
+ mips_finish_irg,
mips_emit_and_done
};
NULL, /* will be set later */
1, /* need dword lowering */
NULL, /* but yet no creator function */
+ NULL, /* context for create_intrinsic_fkt */
};
p.dep_param = &ad;