]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Summary: Generate canonical infinity for the Motorola extended real format
authorschwab <schwab@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 17 Jul 2014 08:40:15 +0000 (08:40 +0000)
committerschwab <schwab@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 17 Jul 2014 08:40:15 +0000 (08:40 +0000)
* real.c (encode_ieee_extended_motorola): Clear integer bit in the
infinity format.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@212744 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/real.c

index ee335f2176e482a75227ca33ccc16e85af596cc2..c1b2a285886436eb1c3d5a57b84e62de890e4404 100644 (file)
@@ -1,3 +1,8 @@
+2014-07-17  Andreas Schwab  <schwab@linux-m68k.org>
+
+       * real.c (encode_ieee_extended_motorola): Clear integer bit in the
+       infinity format.
+
 2014-07-17  Richard Biener  <rguenther@suse.de>
 
        PR rtl-optimization/61801
index 231fc96c932a7bc43d4cbf339d39f57d2ee70b9a..1c2f709c9d01a68c112e02d7d7a9eeaa55383903 100644 (file)
@@ -3481,6 +3481,11 @@ encode_ieee_extended_motorola (const struct real_format *fmt, long *buf,
   long intermed[3];
   encode_ieee_extended (fmt, intermed, r);
 
+  if (r->cl == rvc_inf)
+    /* For infinity clear the explicit integer bit again, so that the
+       format matches the canonical infinity generated by the FPU.  */
+    intermed[1] = 0;
+
   /* Motorola chips are assumed always to be big-endian.  Also, the
      padding in a Motorola extended real goes between the exponent and
      the mantissa.  At this point the mantissa is entirely within