diff options
author | das <das@FreeBSD.org> | 2008-01-18 22:19:04 +0000 |
---|---|---|
committer | das <das@FreeBSD.org> | 2008-01-18 22:19:04 +0000 |
commit | 6cc44c600b906a61a18878b032c4380eea2814ec (patch) | |
tree | aa3851c02f4fdecc3c96f6a16c93c2d4f4a2d82b /lib/msun/src/s_exp2f.c | |
parent | 8a38a2ddf2dcdd33ce3459224eb04b8a66814202 (diff) | |
download | FreeBSD-src-6cc44c600b906a61a18878b032c4380eea2814ec.zip FreeBSD-src-6cc44c600b906a61a18878b032c4380eea2814ec.tar.gz |
Use volatile hacks to make sure these functions generate an underflow
exception when they're supposed to. Previously, gcc -O2 was optimizing
away the statement that generated it.
Diffstat (limited to 'lib/msun/src/s_exp2f.c')
-rw-r--r-- | lib/msun/src/s_exp2f.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/msun/src/s_exp2f.c b/lib/msun/src/s_exp2f.c index 1bc026a..0a6142f 100644 --- a/lib/msun/src/s_exp2f.c +++ b/lib/msun/src/s_exp2f.c @@ -35,13 +35,14 @@ __FBSDID("$FreeBSD$"); static const float huge = 0x1p100f, - twom100 = 0x1p-100f, redux = 0x1.8p23f / TBLSIZE, P1 = 0x1.62e430p-1f, P2 = 0x1.ebfbe0p-3f, P3 = 0x1.c6b348p-5f, P4 = 0x1.3b2c9cp-7f; +static volatile float twom100 = 0x1p-100f; + static const double exp2ft[TBLSIZE] = { 0x1.6a09e667f3bcdp-1, 0x1.7a11473eb0187p-1, |