2008-06-03 Zoltan Varga <vargaz@gmail.com>
authorZoltan Varga <vargaz@gmail.com>
Tue, 3 Jun 2008 21:26:44 +0000 (21:26 -0000)
committerZoltan Varga <vargaz@gmail.com>
Tue, 3 Jun 2008 21:26:44 +0000 (21:26 -0000)
* decimal.c (rescale128): Put back one line which was accidently commented
out.

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

mono/metadata/ChangeLog
mono/metadata/decimal.c

index 088dbb25e321053199744e741656d2a0d84eabd2..1ba9955971805187a90ee2afdb19524162fe7c38 100644 (file)
@@ -1,5 +1,8 @@
 2008-06-03  Zoltan Varga  <vargaz@gmail.com>
 
+       * decimal.c (rescale128): Put back one line which was accidently commented
+       out.
+       
        * decimal.c (rescale128): Disable the code added by the last patch, as it seems
        to cause crashes.
 
index 60584644d334b3ff07d5d4402a130df5485409d2..32475755fd1f81d465eb52ecfe465d08768f8b37 100644 (file)
@@ -673,7 +673,7 @@ DECINLINE static int rescale128(guint64* pclo, guint64* pchi, int* pScale, int t
 
                        /* The original loop was this: */
                        /*
-            while (texp > 1 && (overhang > (2<<DECIMAL_MAX_INTFACTORS) || (*pclo & 1) == 0)) {
+            while (texp > 0 && (overhang > (2<<DECIMAL_MAX_INTFACTORS) || (*pclo & 1) == 0)) {
                                if (--texp == 0)
                                        roundBit = (int)(*pclo & 1);
                 rshift128(pclo, pchi);
@@ -681,10 +681,10 @@ DECINLINE static int rescale128(guint64* pclo, guint64* pchi, int* pScale, int t
             }
                        */
 
+                       prev_lo = *pclo;
                        /*
                         * FIXME: This code seems to cause crashes on the x86 buildbot during the
                         * System.Data.DataSetExtensions tests.
-                       prev_lo = *pclo;
                        if (overhang > 0) {
                                int msf = my_g_bit_nth_msf (overhang);
                                int shift = msf - (DECIMAL_MAX_INTFACTORS + 2);