From 246ec411990908950e96332213bc6d11d19a17f9 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 12 Apr 2008 00:51:34 +0000 Subject: * sysdeps/powerpc/fpu/fenv_libc.h: Add libm_hidden_proto for __fe_nomask_env. * sysdeps/powerpc/fpu/fe_nomask.c: Add libm_hidden_def. * sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/fe_nomask.c: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/fpu/fe_nomask.c: Likewise. * sysdeps/powerpc/bits/fenv.h: Make safe for C++. * sysdeps/unix/sysv/linux/powerpc/bits/mathinline.h: New file. * sysdeps/powerpc/fpu/fegetexcept.c (__fegetexcept): Rename function from fegetexcept and make old name weak alias. * include/fenv.h: Declare __fegetexcept. * sysdeps/powerpc/fpu/fedisblxcpt.c: Use __fegetexcept instead of fegetexcept. * sysdeps/powerpc/fpu/feenablxcpt.c: Likewise. * sysdeps/powerpc/fpu/fraiseexcpt.c (__feraiseexcept): Avoid call to fetestexcept. * sysdeps/ieee754/ldbl-128ibm/s_log1pl.c (__log1pl): Use __frexpl instead of frexpl to avoid local PLT. * math/s_significandl.c (__significandl): Use __ilogbl instead of ilogbl to avoid local PLT. * sysdeps/ieee754/ldbl-128ibm/s_expm1l.c (__expm1l): Use __ldexpl instead of ldexpl to avoid local PLT. * sysdeps/ieee754/ldbl-128ibm/e_expl.c (__ieee754_expl): Use __roundl not roundl to avoid local PLT. * sysdeps/ieee754/ldbl-128/e_j0l.c: Use function names which avoid local PLTs. Use __sincosl instead of separate sinl and cosl calls. * sysdeps/ieee754/ldbl-128/e_j1l.c: Likewise. --- sysdeps/ieee754/ldbl-128/e_j0l.c | 16 +++++++--------- sysdeps/ieee754/ldbl-128/e_j1l.c | 16 +++++++--------- 2 files changed, 14 insertions(+), 18 deletions(-) (limited to 'sysdeps/ieee754/ldbl-128') diff --git a/sysdeps/ieee754/ldbl-128/e_j0l.c b/sysdeps/ieee754/ldbl-128/e_j0l.c index 67ef371153..f235372916 100644 --- a/sysdeps/ieee754/ldbl-128/e_j0l.c +++ b/sysdeps/ieee754/ldbl-128/e_j0l.c @@ -768,16 +768,15 @@ __ieee754_j0l (long double x) = 1/sqrt(2) * (sin(x) - cos(x)) sin(x) +- cos(x) = -cos(2x)/(sin(x) -+ cos(x)) cf. Fdlibm. */ - c = cosl (xx); - s = sinl (xx); + __sincosl (xx, &s, &c); ss = s - c; cc = s + c; - z = -cosl (xx + xx); + z = -__cosl (xx + xx); if ((s * c) < 0) cc = z / ss; else ss = z / cc; - z = ONEOSQPI * (p * cc - q * ss) / sqrtl (xx); + z = ONEOSQPI * (p * cc - q * ss) / __ieee754_sqrtl (xx); return z; } @@ -836,7 +835,7 @@ long double /* 0 <= x <= 2 */ z = xx * xx; p = neval (z, Y0_2N, NY0_2N) / deval (z, Y0_2D, NY0_2D); - p = TWOOPI * logl(x) * __ieee754_j0l(x) + p; + p = TWOOPI * __ieee754_logl (x) * __ieee754_j0l (x) + p; return p; } @@ -908,15 +907,14 @@ long double = 1/sqrt(2) * (sin(x) - cos(x)) sin(x) +- cos(x) = -cos(2x)/(sin(x) -+ cos(x)) cf. Fdlibm. */ - c = cosl (x); - s = sinl (x); + __sincosl (x, &s, &c); ss = s - c; cc = s + c; - z = -cosl (x + x); + z = -__cosl (x + x); if ((s * c) < 0) cc = z / ss; else ss = z / cc; - z = ONEOSQPI * (p * ss + q * cc) / sqrtl (x); + z = ONEOSQPI * (p * ss + q * cc) / __ieee754_sqrtl (x); return z; } diff --git a/sysdeps/ieee754/ldbl-128/e_j1l.c b/sysdeps/ieee754/ldbl-128/e_j1l.c index 3a977c2a84..7ec073d9e2 100644 --- a/sysdeps/ieee754/ldbl-128/e_j1l.c +++ b/sysdeps/ieee754/ldbl-128/e_j1l.c @@ -773,16 +773,15 @@ __ieee754_j1l (long double x) sin(X) = sin(x) cos(3 pi/4) - cos(x) sin(3 pi/4) = -1/sqrt(2) * (sin(x) + cos(x)) cf. Fdlibm. */ - c = cosl (xx); - s = sinl (xx); + __sincosl (xx, &s, &c); ss = -s - c; cc = s - c; - z = cosl (xx + xx); + z = __cosl (xx + xx); if ((s * c) > 0) cc = z / ss; else ss = z / cc; - z = ONEOSQPI * (p * cc - q * ss) / sqrtl (xx); + z = ONEOSQPI * (p * cc - q * ss) / __ieee754_sqrtl (xx); if (x < 0) z = -z; return z; @@ -844,7 +843,7 @@ __ieee754_y1l (long double x) z = xx * xx; p = xx * neval (z, Y0_2N, NY0_2N) / deval (z, Y0_2D, NY0_2D); p = -TWOOPI / xx + p; - p = TWOOPI * logl(x) * __ieee754_j1l (x) + p; + p = TWOOPI * __ieee754_logl (x) * __ieee754_j1l (x) + p; return p; } @@ -915,15 +914,14 @@ __ieee754_y1l (long double x) sin(X) = sin(x) cos(3 pi/4) - cos(x) sin(3 pi/4) = -1/sqrt(2) * (sin(x) + cos(x)) cf. Fdlibm. */ - c = cosl (xx); - s = sinl (xx); + __sincosl (xx, &s, &c); ss = -s - c; cc = s - c; - z = cosl (xx + xx); + z = __cosl (xx + xx); if ((s * c) > 0) cc = z / ss; else ss = z / cc; - z = ONEOSQPI * (p * ss + q * cc) / sqrtl (xx); + z = ONEOSQPI * (p * ss + q * cc) / __ieee754_sqrtl (xx); return z; } -- cgit 1.4.1