This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Fix ieee float decoding
- From: Andreas Schwab <schwab at suse dot de>
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 01 Apr 2003 21:50:49 +0200
- Subject: Fix ieee float decoding
This fixes a bug in the ieee float decoder. The image has been shifted up
by HOST_BITS_PER_LONG - 24, so that the SNaN bit is now at position
HOST_BITS_PER_LONG - 2. Regtested on ia64-linux (there are some new
failures due to an ICE in reg_overlap_mentioned_p, more about that later).
Andreas.
2003-04-01 Andreas Schwab <schwab at suse dot de>
* real.c (decode_ieee_single): Fix decoding of SNaN bit.
--- gcc/real.c.~1.114.~ 2003-04-01 09:25:43.000000000 +0200
+++ gcc/real.c 2003-04-01 09:27:16.000000000 +0200
@@ -2687,7 +2687,8 @@ decode_ieee_single (fmt, r, buf)
{
r->class = rvc_nan;
r->sign = sign;
- r->signalling = ((image >> 22) & 1) ^ fmt->qnan_msb_set;
+ r->signalling = (((image >> (HOST_BITS_PER_LONG - 2)) & 1)
+ ^ fmt->qnan_msb_set);
r->sig[SIGSZ-1] = image;
}
else
--
Andreas Schwab, SuSE Labs, schwab at suse dot de
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."