fixed debug output of unary x87 nodes
[libfirm] / ir / be / beabi.c
index d326f64..ef81cd9 100644 (file)
@@ -1718,14 +1718,18 @@ be_abi_irg_t *be_abi_introduce(be_irg_t *birg)
        restore_optimization_state(&state);
        FIRM_DBG_REGISTER(env->dbg, "firm.be.abi");
 
-       env->cb = env->call->cb->init(env->call, birg->main_env->arch_env, irg);
-
        memcpy(&env->irn_handler, &abi_irn_handler, sizeof(abi_irn_handler));
        env->irn_ops.impl = &abi_irn_ops;
 
        /* Lower all call nodes in the IRG. */
        process_calls(env);
 
+       /*
+               Beware: init backend abi call object after processing calls,
+               otherwise some information might be not yet available.
+       */
+       env->cb = env->call->cb->init(env->call, birg->main_env->arch_env, irg);
+
        /* Process the IRG */
        modify_irg(env);
 
@@ -1789,8 +1793,14 @@ struct fix_stack_walker_info {
 static void collect_stack_nodes_walker(ir_node *irn, void *data)
 {
        struct fix_stack_walker_info *info = data;
+       ir_mode *mode;
+
+       if (is_Block(irn))
+               return;
+
+       mode = get_irn_mode(irn);
 
-       if(arch_irn_is(info->aenv, irn, modify_sp))
+       if (arch_irn_is(info->aenv, irn, modify_sp) && mode != mode_T && mode != mode_M)
                pset_insert_ptr(info->nodes, irn);
 }
 
@@ -1992,7 +2002,7 @@ static entity *abi_get_frame_entity(const void *_self, const ir_node *irn)
        return NULL;
 }
 
-static void abi_set_frame_entity(const void *_self, const ir_node *irn, entity *ent)
+static void abi_set_frame_entity(const void *_self, ir_node *irn, entity *ent)
 {
 }