id = get_entity_ident(get_SymConst_entity(node));
return get_id_str(id);
default:
- assert(0);
+ panic("Unsupported SymConst kind");
}
return NULL;
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) {
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));
}
}
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;
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);
}