[jit] Fix the check for emulation of div instructions in 9f253965d02d20b7fd39549ba07b...
authorZoltan Varga <vargaz@gmail.com>
Tue, 17 Nov 2015 03:27:35 +0000 (22:27 -0500)
committerZoltan Varga <vargaz@gmail.com>
Tue, 17 Nov 2015 03:28:38 +0000 (22:28 -0500)
mono/mini/arch-stubs.c
mono/mini/decompose.c

index 3d40a0097fac62e31f3b58497eee1f386d3a4d09..a75bab23586eab4d4d92fadbde33c865897c48b0 100644 (file)
@@ -61,7 +61,7 @@ mono_arch_decompose_opts (MonoCompile *cfg, MonoInst *ins)
 gboolean
 mono_arch_opcode_needs_emulation (MonoCompile *cfg, int opcode)
 {
-       return FALSE;
+       return TRUE;
 }
 #endif
 
index 3c48cbd36893c06f0910179720518317c5fafef7..d3fc7f2e92305f7f6cabeb442b61774466a2fe58 100644 (file)
@@ -447,7 +447,7 @@ mono_decompose_opcode (MonoCompile *cfg, MonoInst *ins)
        case OP_IREM:
        case OP_IDIV_UN:
        case OP_IREM_UN:
-               if (!(cfg->backend->emulate_div && !mono_arch_opcode_needs_emulation (cfg, ins->opcode)))
+               if (cfg->backend->emulate_div && mono_arch_opcode_needs_emulation (cfg, ins->opcode))
                        emulate = TRUE;
                if (!emulate) {
                        if (cfg->backend->need_div_check) {