* real.c (encode_ibm_extended): Do round low word.
authorAlan Modra <amodra@bigpond.net.au>
Thu, 11 Mar 2004 13:39:57 +0000 (13:39 +0000)
committerAlan Modra <amodra@gcc.gnu.org>
Thu, 11 Mar 2004 13:39:57 +0000 (00:09 +1030)
From-SVN: r79321

gcc/ChangeLog
gcc/real.c

index 1f7162451ec3fc255babd70174cd7f8e636dac8d..318b12f554ab67979a9bb52c088bbb7a0f8f2380 100644 (file)
@@ -1,3 +1,7 @@
+2004-03-11  Alan Modra  <amodra@bigpond.net.au>
+
+       * real.c (encode_ibm_extended): Do round low word.
+
 2004-03-11  Ben Elliston  <bje@wasabisystems.com>
 
        * config/arm/arm.md (is_xscale): Comment this attribute and move
index d578ace08831ee4578f6efe89a932dd1acfffa28..72766bbec76ca378a8a9650c657b8db9b891e624 100644 (file)
@@ -3248,9 +3248,8 @@ encode_ibm_extended (const struct real_format *fmt, long *buf,
   if (u.class == rvc_normal)
     {
       do_add (&v, &normr, &u, 1);
-      /* The low double won't need rounding, since we round to a 106 bit
-        mantissa before calling this function, and we've just
-        subtracted off the top 54 bits.  (53+1 because u is rounded.)  */
+      /* Call round_for_format since we might need to denormalize.  */
+      round_for_format (base_fmt, &v);
       encode_ieee_double (base_fmt, &buf[2], &v);
     }
   else