summaryrefslogtreecommitdiff
path: root/gcc/real.c
diff options
context:
space:
mode:
authorschwab <schwab@138bc75d-0d04-0410-961f-82ee72b054a4>2014-07-17 08:40:15 +0000
committerschwab <schwab@138bc75d-0d04-0410-961f-82ee72b054a4>2014-07-17 08:40:15 +0000
commita2bdefc8fb5ad56bfcfd98a60698e7a6f1945b73 (patch)
treea2204c3cb7ba518a1e3520081612e359fafd92bd /gcc/real.c
parente9457fe5882f5dc3ac1ac3857ae54bcab6342f87 (diff)
downloadgcc-a2bdefc8fb5ad56bfcfd98a60698e7a6f1945b73.tar.gz
Summary: Generate canonical infinity for the Motorola extended real format
* 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
Diffstat (limited to 'gcc/real.c')
-rw-r--r--gcc/real.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/real.c b/gcc/real.c
index 231fc96c932..1c2f709c9d0 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