From 2e17280a398d1297103517f456ac114b70cf015a Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Wed, 16 Mar 2011 10:23:18 +0100 Subject: math: avoid jump relocation in libm add hidden significand, lgamma_r, scalb, log2, gamma Signed-off-by: Peter S. Mazinger Signed-off-by: Bernhard Reutner-Fischer --- libc/sysdeps/linux/common/bits/mathcalls.h | 10 ++++++---- libm/e_lgamma_r.c | 2 ++ libm/e_log2.c | 1 + libm/e_scalb.c | 1 + libm/s_significand.c | 1 + 5 files changed, 11 insertions(+), 4 deletions(-) diff --git a/libc/sysdeps/linux/common/bits/mathcalls.h b/libc/sysdeps/linux/common/bits/mathcalls.h index ea53a5198..d566c186f 100644 --- a/libc/sysdeps/linux/common/bits/mathcalls.h +++ b/libc/sysdeps/linux/common/bits/mathcalls.h @@ -155,7 +155,7 @@ __BEGIN_NAMESPACE_C99 __MATHCALLI (exp2,, (_Mdouble_ __x)) /* Compute base-2 logarithm of X. */ -__MATHCALL (log2,, (_Mdouble_ __x)) +__MATHCALLI (log2,, (_Mdouble_ __x)) __END_NAMESPACE_C99 #endif @@ -223,7 +223,7 @@ __MATHCALL (drem,, (_Mdouble_ __x, _Mdouble_ __y)) /* Return the fractional part of X after dividing out `ilogb (X)'. */ -__MATHCALL (significand,, (_Mdouble_ __x)) +__MATHCALLI (significand,, (_Mdouble_ __x)) #endif /* Use misc. */ #if defined __USE_MISC || defined __USE_ISOC99 @@ -278,7 +278,7 @@ __END_NAMESPACE_C99 #if defined __USE_MISC || defined __USE_XOPEN /* Obsolete alias for `lgamma'. */ -__MATHCALL (gamma,, (_Mdouble_)) +__MATHCALLI (gamma,, (_Mdouble_)) #endif #ifdef __USE_MISC @@ -286,6 +286,8 @@ __MATHCALL (gamma,, (_Mdouble_)) `signgam'. The reentrant version instead takes a pointer and stores the value through it. */ __MATHCALL (lgamma,_r, (_Mdouble_, int *__signgamp)) +/* __MATHCALLI does not work here, probably due to ,_r, */ +libm_hidden_proto(lgamma_r) #endif @@ -376,5 +378,5 @@ __END_NAMESPACE_C99 #if (defined __USE_MISC || defined __USE_XOPEN_EXTENDED) \ && defined __UCLIBC_SUSV3_LEGACY__ /* Return X times (2 to the Nth power). */ -__MATHCALL (scalb,, (_Mdouble_ __x, _Mdouble_ __n)) +__MATHCALLI (scalb,, (_Mdouble_ __x, _Mdouble_ __n)) #endif diff --git a/libm/e_lgamma_r.c b/libm/e_lgamma_r.c index 519dd90bf..c91166a19 100644 --- a/libm/e_lgamma_r.c +++ b/libm/e_lgamma_r.c @@ -314,6 +314,7 @@ double lgamma_r(double x, int *signgamp) #else strong_alias(__ieee754_lgamma_r, lgamma_r) #endif +libm_hidden_def(lgamma_r) /* __ieee754_lgamma(x) * Return the logarithm of the Gamma function of x. @@ -358,6 +359,7 @@ strong_alias(lgamma, gamma) strong_alias(__ieee754_lgamma_r, gamma_r) strong_alias(__ieee754_lgamma, gamma) #endif +libm_hidden_def(gamma) /* double tgamma(double x) diff --git a/libm/e_log2.c b/libm/e_log2.c index 70e604b3c..b5dfc802d 100644 --- a/libm/e_log2.c +++ b/libm/e_log2.c @@ -116,3 +116,4 @@ double __ieee754_log2(double x) } } strong_alias(__ieee754_log2,log2) +libm_hidden_def(log2) diff --git a/libm/e_scalb.c b/libm/e_scalb.c index 8d8f69c78..9e1a3f742 100644 --- a/libm/e_scalb.c +++ b/libm/e_scalb.c @@ -55,5 +55,6 @@ double scalb(double x, double fn) #else strong_alias(__ieee754_scalb, scalb) #endif +libm_hidden_def(scalb) #endif /* UCLIBC_SUSV3_LEGACY */ diff --git a/libm/s_significand.c b/libm/s_significand.c index 8c74ce24b..2d681dcb1 100644 --- a/libm/s_significand.c +++ b/libm/s_significand.c @@ -22,3 +22,4 @@ double significand(double x) { return __ieee754_scalb(x,(double) -ilogb(x)); } +libm_hidden_def(significand) -- cgit v1.2.3