2010-05-01 Zoltan Varga <vargaz@gmail.com>
authorZoltan Varga <vargaz@gmail.com>
Sat, 1 May 2010 17:18:30 +0000 (17:18 -0000)
committerZoltan Varga <vargaz@gmail.com>
Sat, 1 May 2010 17:18:30 +0000 (17:18 -0000)
* mini-ppc.c (mono_arch_decompose_long_opts): Fix LNEG.

svn path=/trunk/mono/; revision=156570

mono/mini/ChangeLog
mono/mini/mini-ppc.c

index 62ad16a8cfb2c1528113df255a3af61f114480e1..cc1d89039d110f3620f52c6bd08231395f3b7f2f 100755 (executable)
@@ -1,3 +1,7 @@
+2010-05-01  Zoltan Varga  <vargaz@gmail.com>
+
+       * mini-ppc.c (mono_arch_decompose_long_opts): Fix LNEG.
+
 2010-05-01  Zoltan Varga  <vargaz@gmail.com>
 
        * mini-ppc.c (mono_arch_emit_exceptions): Initialize exc_throw_pos/found
index d307744a3434f2f0d21bde59658e84c09fc49a16..42846e7941eeca04582ac666c8b16072a5e73a9f 100755 (executable)
@@ -2278,12 +2278,9 @@ mono_arch_decompose_long_opts (MonoCompile *cfg, MonoInst *ins)
                NULLIFY_INS (ins);
                break;
        case OP_LNEG:
-               /* This is the old version from inssel-long32.brg */
-               MONO_EMIT_NEW_UNALU (cfg, OP_INOT, ins->dreg + 1, ins->sreg1 + 1);
-               MONO_EMIT_NEW_UNALU (cfg, OP_INOT, ins->dreg + 2, ins->sreg1 + 2);
-               /* ADC sets the condition codes */
-               MONO_EMIT_NEW_BIALU_IMM (cfg, OP_ADC_IMM, ins->dreg + 1, ins->dreg + 1, 1);
-               MONO_EMIT_NEW_BIALU_IMM (cfg, OP_ADC_IMM, ins->dreg + 2, ins->dreg + 2, 0);
+               /* From gcc generated code */
+               MONO_EMIT_NEW_BIALU_IMM (cfg, OP_PPC_SUBFIC, ins->dreg + 1, ins->sreg1 + 1, 0);
+               MONO_EMIT_NEW_UNALU (cfg, OP_PPC_SUBFZE, ins->dreg + 2, ins->sreg1 + 2);
                NULLIFY_INS (ins);
                break;
        default: