summaryrefslogtreecommitdiffstats
path: root/lib/libc/amd64
diff options
context:
space:
mode:
authordas <das@FreeBSD.org>2005-03-07 04:55:22 +0000
committerdas <das@FreeBSD.org>2005-03-07 04:55:22 +0000
commit5bfaaf046488af0dd3a30704b1de957d8e998484 (patch)
tree0587ae7e38dc49cbd8c4f33e5beaf44770486b0f /lib/libc/amd64
parente08a3e75cadf3db2f91c84aa1fb0e266b4334fc4 (diff)
downloadFreeBSD-src-5bfaaf046488af0dd3a30704b1de957d8e998484.zip
FreeBSD-src-5bfaaf046488af0dd3a30704b1de957d8e998484.tar.gz
Define LDBL_NBIT to be a mask indicating the position of the integer
bit in a long double. For architectures that don't have such a bit, LDBL_NBIT is 0. This makes it possible to say `mantissa & ~LDBL_NBIT' in places that previously used an #ifdef to select the right expression. The optimizer should dispense with the extra arithmetic when LDBL_NBIT is 0.
Diffstat (limited to 'lib/libc/amd64')
-rw-r--r--lib/libc/amd64/_fpmath.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libc/amd64/_fpmath.h b/lib/libc/amd64/_fpmath.h
index 08ec6f2..8f8cf6f 100644
--- a/lib/libc/amd64/_fpmath.h
+++ b/lib/libc/amd64/_fpmath.h
@@ -38,7 +38,8 @@ union IEEEl2bits {
} bits;
};
-#define mask_nbit_l(u) ((u).bits.manh &= 0x7fffffff)
+#define LDBL_NBIT 0x80000000
+#define mask_nbit_l(u) ((u).bits.manh &= ~LDBL_NBIT)
#define LDBL_MANH_SIZE 32
#define LDBL_MANL_SIZE 32
OpenPOWER on IntegriCloud