OSDN Git Service

2011-01-31 Jerry DeLisle <jvdelisle@gcc.gnu.org>
authorjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 1 Feb 2011 02:29:18 +0000 (02:29 +0000)
committerjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 1 Feb 2011 02:29:18 +0000 (02:29 +0000)
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

libquadmath/ChangeLog
libquadmath/gdtoa/gd_qnan.h
libquadmath/gdtoa/strtopQ.c

index b6929df..d2dcf45 100644 (file)
@@ -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
index 87eba8f..68d90e4 100644 (file)
@@ -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
index 0d34c1c..6a84173 100644 (file)
@@ -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;