summaryrefslogtreecommitdiffstats
path: root/lib/libc/ia64/_fpmath.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/ia64/_fpmath.h')
-rw-r--r--lib/libc/ia64/_fpmath.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/libc/ia64/_fpmath.h b/lib/libc/ia64/_fpmath.h
index 5ece910..7f24e76 100644
--- a/lib/libc/ia64/_fpmath.h
+++ b/lib/libc/ia64/_fpmath.h
@@ -49,9 +49,17 @@ union IEEEl2bits {
};
#if _BYTE_ORDER == _LITTLE_ENDIAN
-#define mask_nbit_l(u) ((u).bits.manh &= 0x7fffffff)
+#define LDBL_NBIT 0x80000000
+#define mask_nbit_l(u) ((u).bits.manh &= ~LDBL_NBIT)
#else /* _BIG_ENDIAN */
-#define mask_nbit_l(u) ((u).bits.manh &= 0xffffff7f)
+/*
+ * XXX This doesn't look right. Very few machines have a different
+ * endianness for integers and floating-point, and in nextafterl()
+ * we assume that none do. If you have an environment for testing
+ * this, please let me know. --das
+ */
+#define LDBL_NBIT 0x80
+#define mask_nbit_l(u) ((u).bits.manh &= ~LDBL_NBIT)
#endif
#define LDBL_MANH_SIZE 32
OpenPOWER on IntegriCloud