aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/real.c5
2 files changed, 10 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index ee335f2..c1b2a28 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/real.c b/gcc/real.c
index 231fc96..1c2f709 100644
--- a/gcc/real.c
+++ b/gcc/real.c
@@ -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