summaryrefslogtreecommitdiff
path: root/libquadmath
diff options
context:
space:
mode:
authorjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>2011-02-01 02:29:18 +0000
committerjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>2011-02-01 02:29:18 +0000
commit1e2cd889176b630cd27a3b92b17744a6f13e5c78 (patch)
tree0335cf15e77b4cf1808bbaabe7c91dd4a6555fce /libquadmath
parenta484fc356e716397e5545f3c48005268e28b632d (diff)
downloadgcc-1e2cd889176b630cd27a3b92b17744a6f13e5c78.tar.gz
2011-01-31 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libquadmath/47293 * gdtoa/qd_qnan.h: Fix NAN bit patterns. * gdtoa/strtopQ.c (strtoflt128): Handle endianess with NAN. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@169466 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libquadmath')
-rw-r--r--libquadmath/ChangeLog6
-rw-r--r--libquadmath/gdtoa/gd_qnan.h12
-rw-r--r--libquadmath/gdtoa/strtopQ.c8
3 files changed, 16 insertions, 10 deletions
diff --git a/libquadmath/ChangeLog b/libquadmath/ChangeLog
index b6929df0258..d2dcf45ae6d 100644
--- a/libquadmath/ChangeLog
+++ b/libquadmath/ChangeLog
@@ -1,3 +1,9 @@
+2011-01-31 Jerry DeLisle <jvdelisle@gcc.gnu.org>
+
+ PR libquadmath/47293
+ * gdtoa/qd_qnan.h: Fix NAN bit patterns.
+ * gdtoa/strtopQ.c (strtoflt128): Handle endianess with NAN.
+
2011-01-17 Tobias Burnus <burnus@net-b.de>
PR fortran/47295
diff --git a/libquadmath/gdtoa/gd_qnan.h b/libquadmath/gdtoa/gd_qnan.h
index 87eba8fb319..68d90e440f2 100644
--- a/libquadmath/gdtoa/gd_qnan.h
+++ b/libquadmath/gdtoa/gd_qnan.h
@@ -1,12 +1,12 @@
-#define f_QNAN 0xffc00000
+#define f_QNAN 0x7fc00000
#define d_QNAN0 0x0
-#define d_QNAN1 0xfff80000
+#define d_QNAN1 0x7ff80000
#define ld_QNAN0 0x0
-#define ld_QNAN1 0xc0000000
-#define ld_QNAN2 0xffff
-#define ld_QNAN3 0x0
+#define ld_QNAN1 0x0
+#define ld_QNAN2 0x0
+#define ld_QNAN3 0x7fff8000
#define ldus_QNAN0 0x0
#define ldus_QNAN1 0x0
#define ldus_QNAN2 0x0
#define ldus_QNAN3 0xc000
-#define ldus_QNAN4 0xffff
+#define ldus_QNAN4 0x7fff
diff --git a/libquadmath/gdtoa/strtopQ.c b/libquadmath/gdtoa/strtopQ.c
index 0d34c1c0454..6a84173a47f 100644
--- a/libquadmath/gdtoa/strtopQ.c
+++ b/libquadmath/gdtoa/strtopQ.c
@@ -92,10 +92,10 @@ strtoflt128(CONST char *s, char **sp)
break;
case STRTOG_NaN:
- L[0] = ld_QNAN0;
- L[1] = ld_QNAN1;
- L[2] = ld_QNAN2;
- L[3] = ld_QNAN3;
+ L[_0] = ld_QNAN3;
+ L[_1] = ld_QNAN2;
+ L[_2] = ld_QNAN1;
+ L[_3] = ld_QNAN0;
}
if (k & STRTOG_Neg)
L[_0] |= 0x80000000L;