aboutsummaryrefslogtreecommitdiff
path: root/libquadmath
diff options
context:
space:
mode:
authorJerry DeLisle <jvdelisle@gcc.gnu.org>2011-02-02 18:14:22 +0000
committerDiego Novillo <dnovillo@google.com>2011-02-02 18:14:22 +0000
commitfde1a8a71aa1f1faf2bbd0306d2a155d605d5c07 (patch)
treef34b8ffe4ace14b9732dc0f35fd007b68abbd287 /libquadmath
parentef1e66286f9d18dd33e047f41a76da52e032ae94 (diff)
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: https://gcc.gnu.org/svn/gcc/branches/google/integration@169738 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;