From 621bb117eb930f4d64bda78fc99fbcb8578fec7a Mon Sep 17 00:00:00 2001 From: kargl Date: Mon, 30 May 2011 19:41:28 +0000 Subject: Clean up the unneeded cpp macro INLINE_REM_PIO2L. Reviewed by: das Approved by: das (mentor) --- lib/msun/src/s_cosl.c | 1 - lib/msun/src/s_sinl.c | 1 - lib/msun/src/s_tanl.c | 1 - 3 files changed, 3 deletions(-) (limited to 'lib/msun/src') diff --git a/lib/msun/src/s_cosl.c b/lib/msun/src/s_cosl.c index 77611c1..8d43626 100644 --- a/lib/msun/src/s_cosl.c +++ b/lib/msun/src/s_cosl.c @@ -35,7 +35,6 @@ __FBSDID("$FreeBSD$"); #include #include "math.h" -#define INLINE_REM_PIO2L #include "math_private.h" #if LDBL_MANT_DIG == 64 #include "../ld80/e_rem_pio2l.h" diff --git a/lib/msun/src/s_sinl.c b/lib/msun/src/s_sinl.c index 19d9572..919deb9 100644 --- a/lib/msun/src/s_sinl.c +++ b/lib/msun/src/s_sinl.c @@ -30,7 +30,6 @@ __FBSDID("$FreeBSD$"); #include #include "math.h" -#define INLINE_REM_PIO2L #include "math_private.h" #if LDBL_MANT_DIG == 64 #include "../ld80/e_rem_pio2l.h" diff --git a/lib/msun/src/s_tanl.c b/lib/msun/src/s_tanl.c index 3cf4a69..9562cf8 100644 --- a/lib/msun/src/s_tanl.c +++ b/lib/msun/src/s_tanl.c @@ -36,7 +36,6 @@ __FBSDID("$FreeBSD$"); #include #include "math.h" -#define INLINE_REM_PIO2L #include "math_private.h" #if LDBL_MANT_DIG == 64 #include "../ld80/e_rem_pio2l.h" -- cgit v1.1 From 6842f5f27fa5682989254819297be4d8c24cf281 Mon Sep 17 00:00:00 2001 From: kargl Date: Sun, 19 Jun 2011 17:07:58 +0000 Subject: In the libm access macros for the double type, z can sometimes be used uninitialized. This can lead to spurious exceptions and bit clobbering. Submitted by: bde Approved by: das (mentor) --- lib/msun/src/e_rem_pio2.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/msun/src') diff --git a/lib/msun/src/e_rem_pio2.c b/lib/msun/src/e_rem_pio2.c index a58a81b..fde9660 100644 --- a/lib/msun/src/e_rem_pio2.c +++ b/lib/msun/src/e_rem_pio2.c @@ -171,9 +171,8 @@ medium: } /* set z = scalbn(|x|,ilogb(x)-23) */ GET_LOW_WORD(low,x); - SET_LOW_WORD(z,low); e0 = (ix>>20)-1046; /* e0 = ilogb(z)-23; */ - SET_HIGH_WORD(z, ix - ((int32_t)(e0<<20))); + INSERT_WORDS(z, ix - ((int32_t)(e0<<20)), low); for(i=0;i<2;i++) { tx[i] = (double)((int32_t)(z)); z = (z-tx[i])*two24; -- cgit v1.1