diff options
author | Andreas Schwab <schwab@linux-m68k.org> | 2014-07-17 08:40:15 +0000 |
---|---|---|
committer | Andreas Schwab <schwab@gcc.gnu.org> | 2014-07-17 08:40:15 +0000 |
commit | 4b1d78b48a8b83b6016f7570c2aa49eb2f13143d (patch) | |
tree | a2204c3cb7ba518a1e3520081612e359fafd92bd /gcc/real.c | |
parent | cfe309a158dcd4ab2c2839c2f2a4e413300fa75a (diff) | |
download | gcc-4b1d78b48a8b83b6016f7570c2aa49eb2f13143d.zip gcc-4b1d78b48a8b83b6016f7570c2aa49eb2f13143d.tar.gz gcc-4b1d78b48a8b83b6016f7570c2aa49eb2f13143d.tar.bz2 |
Summary: Generate canonical infinity for the Motorola extended real format
* real.c (encode_ieee_extended_motorola): Clear integer bit in the
infinity format.
From-SVN: r212744
Diffstat (limited to 'gcc/real.c')
-rw-r--r-- | gcc/real.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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 |