]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Update. cvs/fedora-glibc-20041210T0634
authorUlrich Drepper <drepper@redhat.com>
Fri, 10 Dec 2004 04:41:46 +0000 (04:41 +0000)
committerUlrich Drepper <drepper@redhat.com>
Fri, 10 Dec 2004 04:41:46 +0000 (04:41 +0000)
2004-11-29  Jakub Jelinek  <jakub@redhat.com>

* stdlib/strtod_l.c (INTERNAL (__STRTOF)): If densize > 2
and numsize < densize, always shift num up by empty + 1 limbs.

ChangeLog
stdlib/strtod_l.c

index 6841abec3b1bc6f98aecf694f9b7fb9686da2398..b89cecfc68dc5678313faa02fbc8c95b5467363e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2004-11-29  Jakub Jelinek  <jakub@redhat.com>
+
+       * stdlib/strtod_l.c (INTERNAL (__STRTOF)): If densize > 2
+       and numsize < densize, always shift num up by empty + 1 limbs.
+
 2004-12-07  Paolo Bonzini  <bonzini@gnu.org>
 
        * posix/regexec.c (proceed_next_node): Simplify treatment of epsilon
index dce65cb83c7904e61aa82348e3c9d2e73a7bffbd..a656789f4c17072dc59965b98d0d48e48b626eea 100644 (file)
@@ -1442,15 +1442,10 @@ INTERNAL (__STRTOF) (nptr, endptr, group, loc)
          if (numsize < densize)
            {
              mp_size_t empty = densize - numsize;
+             register int i;
 
              if (bits <= 0)
-               {
-                 register int i;
-                 for (i = numsize; i > 0; --i)
-                   num[i + empty] = num[i - 1];
-                 MPN_ZERO (num, empty + 1);
-                 exponent -= empty * BITS_PER_MP_LIMB;
-               }
+               exponent -= empty * BITS_PER_MP_LIMB;
              else
                {
                  if (bits + empty * BITS_PER_MP_LIMB <= MANT_DIG)
@@ -1459,7 +1454,6 @@ INTERNAL (__STRTOF) (nptr, endptr, group, loc)
                         cannot optimize the `else' case that good and
                         this reflects all currently used FLOAT types
                         and GMP implementations.  */
-                     register int i;
 #if RETURN_LIMB_SIZE <= 2
                      assert (empty == 1);
                      __mpn_lshift_1 (retval, RETURN_LIMB_SIZE,
@@ -1470,9 +1464,6 @@ INTERNAL (__STRTOF) (nptr, endptr, group, loc)
                      while (i >= 0)
                        retval[i--] = 0;
 #endif
-                     for (i = numsize; i > 0; --i)
-                       num[i + empty] = num[i - 1];
-                     MPN_ZERO (num, empty + 1);
                    }
                  else
                    {
@@ -1492,6 +1483,9 @@ INTERNAL (__STRTOF) (nptr, endptr, group, loc)
                    }
                  bits += empty * BITS_PER_MP_LIMB;
                }
+             for (i = numsize; i > 0; --i)
+               num[i + empty] = num[i - 1];
+             MPN_ZERO (num, empty + 1);
            }
          else
            {