about summary refs log tree commit diff
path: root/ports
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@codesourcery.com>2013-02-28 17:12:25 +0100
committerThomas Schwinge <thomas@codesourcery.com>2013-03-15 19:06:02 +0100
commit67e971f18ffc9b3ea57cbccba54d5203d1e6a988 (patch)
treef62ff6123ac01815295b6d6f6f9dba73c1c65862 /ports
parent64487e126468f91ecdfe7ab7a0f3a82762874d5a (diff)
downloadglibc-67e971f18ffc9b3ea57cbccba54d5203d1e6a988.tar.gz
glibc-67e971f18ffc9b3ea57cbccba54d5203d1e6a988.tar.xz
glibc-67e971f18ffc9b3ea57cbccba54d5203d1e6a988.zip
Better distinguish between NaN/qNaN/sNaN.
Diffstat (limited to 'ports')
-rw-r--r--ports/sysdeps/mips/bits/nan.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/ports/sysdeps/mips/bits/nan.h b/ports/sysdeps/mips/bits/nan.h
index 7aa157b1d6..80f7866a97 100644
--- a/ports/sysdeps/mips/bits/nan.h
+++ b/ports/sysdeps/mips/bits/nan.h
@@ -22,10 +22,10 @@
 
 
 /* IEEE Not A Number.  */
-/* Note that MIPS has the QNaN and SNaN patterns reversed compared to most
-   other architectures.  The IEEE spec left the definition of this open to
+/* Note that MIPS has the qNaN and sNaN patterns reversed compared to most
+   other architectures.  IEEE 754-1985 left the definition of this open to
    implementations, and for MIPS the top bit of the mantissa must be SET to
-   indicate a SNaN.  */
+   indicate a sNaN.  */
 
 #if __GNUC_PREREQ(3,3)
 
@@ -43,14 +43,14 @@
 # include <endian.h>
 
 # if __BYTE_ORDER == __BIG_ENDIAN
-#  define __nan_bytes		{ 0x7f, 0xbf, 0xff, 0xff }
+#  define __qnan_bytes		{ 0x7f, 0xbf, 0xff, 0xff }
 # endif
 # if __BYTE_ORDER == __LITTLE_ENDIAN
-#  define __nan_bytes		{ 0xff, 0xff, 0xbf, 0x7f }
+#  define __qnan_bytes		{ 0xff, 0xff, 0xbf, 0x7f }
 # endif
 
-static union { unsigned char __c[4]; float __d; } __nan_union
-  __attribute__ ((__unused__)) = { __nan_bytes };
-# define NAN	(__nan_union.__d)
+static union { unsigned char __c[4]; float __d; } __qnan_union
+  __attribute__ ((__unused__)) = { __qnan_bytes };
+# define NAN	(__qnan_union.__d)
 
 #endif	/* GCC.  */