aboutsummaryrefslogtreecommitdiff
path: root/libquadmath
diff options
context:
space:
mode:
authorJerry DeLisle <jvdelisle@gcc.gnu.org>2011-02-01 02:29:18 +0000
committerJerry DeLisle <jvdelisle@gcc.gnu.org>2011-02-01 02:29:18 +0000
commit21ac7f65b8d16f21a6143d637697ef28e77e57ac (patch)
tree0335cf15e77b4cf1808bbaabe7c91dd4a6555fce /libquadmath
parent30f276c1dc32c199f42be0efd4b79771768ce40d (diff)
downloadgcc-21ac7f65b8d16f21a6143d637697ef28e77e57ac.zip
gcc-21ac7f65b8d16f21a6143d637697ef28e77e57ac.tar.gz
gcc-21ac7f65b8d16f21a6143d637697ef28e77e57ac.tar.bz2
re PR libquadmath/47293 (libquadmath: strtoflt128 - NAN not correctly read and C99 hex floating point format missing)
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. From-SVN: r169466
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 b6929df..d2dcf45 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 87eba8f..68d90e4 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 0d34c1c..6a84173 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;