Remove the unused parameter const arch_env_t *env from arch_perform_memory_operand().
[libfirm] / ir / be / mips / mips_emitter.c
index bcd4f4d..d1d3475 100644 (file)
@@ -160,7 +160,7 @@ static const char *get_symconst_str(ir_node *node)
                id = get_entity_ident(get_SymConst_entity(node));
                return get_id_str(id);
        default:
-               assert(0);
+               panic("Unsupported SymConst kind");
        }
 
        return NULL;
@@ -311,13 +311,11 @@ void mips_emit_IncSP(const ir_node *node)
        int   offset = be_get_IncSP_offset(node);
 
        if(offset == 0) {
-               be_emit_cstring("\t/* omitted IncSP with 0 */");
-               be_emit_finish_line_gas(node);
                return;
        }
 
        if(offset > 0xffff || offset < -0xffff) {
-               panic("stackframe > 2^16 bytes not supported yet\n");
+               panic("stackframe > 2^16 bytes not supported yet");
        }
 
        if(offset > 0) {
@@ -436,7 +434,7 @@ static void mips_emit_block_label(const ir_node *block)
                be_emit_irprintf("%lu", get_Block_label(block));
        } else {
                be_emit_cstring(BLOCK_PREFIX);
-               be_emit_irprintf("%d", get_irn_node_nr(block));
+               be_emit_irprintf("%ld", get_irn_node_nr(block));
 
        }
 }
@@ -556,11 +554,11 @@ void emit_mips_jump_table(const ir_node *irn)
        const mips_attr_t *attr = get_mips_attr_const(irn);
 
        /* fill the table structure */
-       tbl.label        = xmalloc(SNPRINTF_BUF_LEN);
+       tbl.label        = XMALLOCN(char, SNPRINTF_BUF_LEN);
        tbl.label        = get_unique_label(tbl.label, SNPRINTF_BUF_LEN, "JMPTBL_");
        tbl.defBlock     = NULL;
        tbl.num_branches = get_irn_n_edges(irn);
-       tbl.branches     = xcalloc(tbl.num_branches, sizeof(tbl.branches[0]));
+       tbl.branches     = XMALLOCNZ(branch_t, tbl.num_branches);
        tbl.min_value    = INT_MAX;
        tbl.max_value    = INT_MIN;
 
@@ -816,10 +814,9 @@ void mips_gen_routine(mips_code_gen_t *mips_cg, ir_graph *irg)
 
        mips_emit_func_prolog(irg);
 
-       dump_ir_block_graph_sched(irg, "-kaputtelist");
-
-       for (i = 0, n = mips_get_sched_n_blocks(cg); i < n; ++i) {
-               ir_node *block = mips_get_sched_block(cg, i);
+       n = ARR_LEN(cg->block_schedule);
+       for (i = 0; i < n; ++i) {
+               ir_node *block = cg->block_schedule[i];
                mips_gen_block(block);
        }