#include "mini.h"
-extern guint8 mono_burg_arity [];
-
static char *
convert_name (const char *str)
{
fprintf (fp, "}\n");
}
+#if 0
+
static void
mono_print_label (FILE *fp, MonoInst *tree) {
int arity;
switch (tree->opcode) {
case OP_ICONST:
- fprintf (fp, "[%d]", tree->inst_c0);
+ fprintf (fp, "[%ld]", (long)tree->inst_c0);
break;
case OP_I8CONST:
- fprintf (fp, "[%lld]", tree->inst_l);
+ fprintf (fp, "[%lld]", (long long)tree->inst_l);
break;
case OP_R8CONST:
fprintf (fp, "[%f]", *(double*)tree->inst_p0);
break;
case OP_ARG:
case OP_LOCAL:
- fprintf (fp, "[%d]", tree->inst_c0);
+ fprintf (fp, "[%d]", (int)tree->inst_c0);
break;
case OP_REGOFFSET:
- fprintf (fp, "[0x%x(%s)]", tree->inst_offset, mono_arch_regname (tree->inst_basereg));
+ fprintf (fp, "[0x%x(%s)]", (int)tree->inst_offset, mono_arch_regname (tree->inst_basereg));
break;
case OP_REGVAR:
fprintf (fp, "[%s]", mono_arch_regname (tree->dreg));
fprintf (fp, "[%s]", tree->inst_newa_class->name);
mono_print_label (fp, tree->inst_newa_len);
break;
- case CEE_CALL:
- case CEE_CALLVIRT:
+ case OP_CALL:
+ case OP_CALLVIRT:
case OP_FCALL:
case OP_FCALLVIRT:
case OP_LCALL:
}
case OP_PHI: {
int i;
- fprintf (fp, "[%d\\ (", tree->inst_c0);
+ fprintf (fp, "[%d\\ (", (int)tree->inst_c0);
for (i = 0; i < tree->inst_phi_args [0]; i++) {
if (i)
fprintf (fp, ",\\ ");
fprintf (fp, ")]");
break;
}
- case OP_RENAME:
- case OP_RETARG:
- case CEE_NOP:
- case CEE_JMP:
- case CEE_BREAK:
+ case OP_NOP:
+ case OP_JMP:
+ case OP_BREAK:
break;
- case CEE_BR:
+ case OP_BR:
fprintf (fp, "[B%d]", tree->inst_target_bb->block_num);
break;
- case CEE_SWITCH:
+ case OP_SWITCH:
case CEE_ISINST:
case CEE_CASTCLASS:
- case OP_OUTARG:
case OP_CALL_REG:
case OP_FCALL_REG:
case OP_LCALL_REG:
fprintf (fp, ")");
}
+#endif
+
static void
mono_draw_code_cfg (MonoCompile *cfg, FILE *fp)
{
fprintf (fp, "BB%d [%sshape=record,labeljust=l,label=\"{BB%d|", bb->block_num, color, bb->block_num);
- for (inst = bb->code; inst; inst = inst->next) {
- mono_print_label (fp, inst);
+ MONO_BB_FOR_EACH_INS (bb, inst) {
+ //mono_print_label (fp, inst);
fprintf (fp, "\\n");
}