gboolean emulate = FALSE;
/* FIXME: Instead of = NOP, don't emit the original ins at all */
-
-#ifdef MONO_ARCH_HAVE_DECOMPOSE_OPTS
mono_arch_decompose_opts (cfg, ins);
-#endif
/*
* The code below assumes that we are called immediately after emitting
cfg->exception_message = g_strdup_printf ("float conv.ovf.un opcodes not supported.");
break;
-#if defined(MONO_ARCH_EMULATE_DIV) && defined(MONO_ARCH_HAVE_OPCODE_NEEDS_EMULATION)
+#if defined(MONO_ARCH_EMULATE_DIV)
case OP_IDIV:
case OP_IREM:
case OP_IDIV_UN:
MONO_EMIT_NEW_UNALU (cfg, OP_ICEQ, reg2, -1);
MONO_EMIT_NEW_BIALU (cfg, OP_IAND, reg1, reg1, reg2);
MONO_EMIT_NEW_ICOMPARE_IMM (cfg, reg1, 1);
- MONO_EMIT_NEW_COND_EXC (cfg, IEQ, "DivideByZeroException");
+ MONO_EMIT_NEW_COND_EXC (cfg, IEQ, "OverflowException");
}
#endif
MONO_EMIT_NEW_BIALU (cfg, ins->opcode, ins->dreg, ins->sreg1, ins->sreg2);
}
}
- call = mono_emit_native_call (cfg, mono_icall_get_wrapper (info), info->sig, args);
+ call = mono_emit_jit_icall_by_info (cfg, info, args);
call->dreg = ins->dreg;
NULLIFY_INS (ins);
first_bb = cfg->cbb;
for (bb = cfg->bb_entry; bb; bb = bb->next_bb) {
- MonoInst *tree = bb->code;
+ MonoInst *tree = mono_bb_first_inst(bb, FILTER_IL_SEQ_POINT);
MonoInst *prev = NULL;
/*
mono_print_bb (bb, "BEFORE LOWER_LONG_OPTS");
*/
- tree = bb->code;
cfg->cbb->code = cfg->cbb->last_ins = NULL;
while (tree) {
-
-#ifdef MONO_ARCH_HAVE_DECOMPOSE_LONG_OPTS
mono_arch_decompose_long_opts (cfg, tree);
-#endif
switch (tree->opcode) {
case OP_I8CONST:
break;
case OP_LCOMPARE: {
- MonoInst *next = tree->next;
+ MonoInst *next = mono_inst_next (tree, FILTER_IL_SEQ_POINT);
g_assert (next);
/* Not yet used, since lcompare is decomposed before local cprop */
case OP_LCOMPARE_IMM: {
- MonoInst *next = tree->next;
+ MonoInst *next = mono_inst_next (tree, FILTER_IL_SEQ_POINT);
guint32 low_imm = tree->inst_ls_word;
guint32 high_imm = tree->inst_ms_word;
int low_reg = tree->sreg1 + 1;
/* Process the newly added ops again since they can be long ops too */
if (prev)
- tree = prev->next;
+ tree = mono_inst_next (prev, FILTER_IL_SEQ_POINT);
else
- tree = bb->code;
+ tree = mono_bb_first_inst (bb, FILTER_IL_SEQ_POINT);
first_bb->code = first_bb->last_ins = NULL;
first_bb->in_count = first_bb->out_count = 0;
}
else {
prev = tree;
- tree = tree->next;
+ tree = mono_inst_next (tree, FILTER_IL_SEQ_POINT);
}
}
}