* real.c (do_multiply): Normalize U before addition.
authorRichard Henderson <rth@redhat.com>
Mon, 23 Sep 2002 11:26:40 +0000 (04:26 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Mon, 23 Sep 2002 11:26:40 +0000 (04:26 -0700)
From-SVN: r57435

gcc/ChangeLog
gcc/real.c

index fd6d5ad45f558eb76d9f79c8a409032150896bed..64a48018ca6dffab647e3aec4a35903cccd3c24b 100644 (file)
@@ -1,3 +1,7 @@
+2002-09-23  Richard Henderson  <rth@redhat.com>
+
+       * real.c (do_multiply): Normalize U before addition.
+
 2002-09-23  Mark Mitchell  <mark@codesourcery.com>
 
        * c-common.c (flag_abi_version): New variable.
index 1f73f9de2e959453d0768087b5c83c0c5e5462e4..ad0b160f3d50cd6b482630fcdc5a65764cca351a 100644 (file)
@@ -741,9 +741,6 @@ do_multiply (r, a, b)
     rr = r;
   get_zero (rr, 0);
 
-  u.class = rvc_normal;
-  u.sign = 0;
-
   /* Collect all the partial products.  Since we don't have sure access
      to a widening multiply, we split each long into two half-words.
 
@@ -784,6 +781,8 @@ do_multiply (r, a, b)
            /* Would underflow to zero, which we shouldn't bother adding.  */
            continue;
 
+         u.class = rvc_normal;
+         u.sign = 0;
          u.exp = exp;
 
          for (k = j; k < SIGSZ * 2; k += 2)
@@ -797,6 +796,7 @@ do_multiply (r, a, b)
              u.sig[k / 2] = ai * bi;
            }
 
+         normalize (&u);
          do_add (rr, rr, &u, 0);
        }
     }