adapted to new code generator callback (spill)
[libfirm] / ir / be / arm / arm_emitter.c
index 988a160..685c68b 100644 (file)
@@ -103,12 +103,10 @@ static const char *node_offset_to_str(ir_node *n, char *buf, int buflen) {
                entity *ent = be_get_frame_entity(n);
                offset = get_entity_offset_bytes(ent);
        } else if (irn_op == op_be_Reload || irn_op == op_be_Spill) {
-               entity * ent = be_get_spill_entity(n);
+               entity *ent = be_get_frame_entity(n);
                offset = get_entity_offset_bytes(ent);
        } else if (irn_op == op_be_IncSP) {
-               int offs = be_get_IncSP_offset(n);
-               be_stack_dir_t dir  = be_get_IncSP_direction(n);
-               offset = (dir == be_stack_dir_expand) ? -offs : offs;
+               offset = - be_get_IncSP_offset(n);
        } else {
                return "node_offset_to_str will fuer diesen Knotentyp noch implementiert werden";
        }
@@ -624,8 +622,9 @@ static void emit_be_Call(ir_node *irn, void *env) {
 /** Emit an IncSP node */
 static void emit_be_IncSP(const ir_node *irn, arm_emit_env_t *emit_env) {
        FILE *F = emit_env->out;
-       unsigned offs = be_get_IncSP_offset(irn);
-       if (offs) {
+       int offs = be_get_IncSP_offset(irn);
+
+       if (offs != 0) {
                char cmd_buf[SNPRINTF_BUF_LEN], cmnt_buf[SNPRINTF_BUF_LEN];
                lc_esnprintf(arm_get_arg_env(), cmd_buf, SNPRINTF_BUF_LEN, "add %1D, %1S, #%O", irn, irn, irn );
                lc_esnprintf(arm_get_arg_env(), cmnt_buf, SNPRINTF_BUF_LEN, "/* IncSP(%O) */", irn);
@@ -960,7 +959,7 @@ void arm_gen_routine(FILE *F, ir_graph *irg, const arm_code_gen_t *cg) {
        arm_register_emitters();
 
        /* create the block schedule. For now, we don't need it earlier. */
-       blk_sched = sched_create_block_schedule(cg->irg);
+       blk_sched = sched_create_block_schedule(cg->irg, cg->birg->exec_freq);
 
        arm_emit_start(F, irg);
        irg_block_walk_graph(irg, arm_gen_labels, NULL, &emit_env);