From: Rich Felker Date: Tue, 11 Sep 2018 15:04:35 +0000 (-0400) Subject: apply hidden visibility to internal math functions X-Git-Tag: v1.1.21~125 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=46e3895b6c986857b5759c5cb307e7fcb3fad39f;p=oweals%2Fmusl.git apply hidden visibility to internal math functions this makes significant differences to codegen on archs with an expensive PLT-calling ABI; on i386 and gcc 7.3 for example, the sin and sinf functions no longer touch call-saved registers or the stack except for pushing outgoing arguments. performance is likely improved too, but no measurements were taken. --- diff --git a/src/internal/libm.h b/src/internal/libm.h index f1bf0a61..fd916277 100644 --- a/src/internal/libm.h +++ b/src/internal/libm.h @@ -167,33 +167,33 @@ do { \ /* fdlibm kernel functions */ -int __rem_pio2_large(double*,double*,int,int,int); - -int __rem_pio2(double,double*); -double __sin(double,double,int); -double __cos(double,double); -double __tan(double,double,int); -double __expo2(double); -double complex __ldexp_cexp(double complex,int); - -int __rem_pio2f(float,double*); -float __sindf(double); -float __cosdf(double); -float __tandf(double,int); -float __expo2f(float); -float complex __ldexp_cexpf(float complex,int); - -int __rem_pio2l(long double, long double *); -long double __sinl(long double, long double, int); -long double __cosl(long double, long double); -long double __tanl(long double, long double, int); +hidden int __rem_pio2_large(double*,double*,int,int,int); + +hidden int __rem_pio2(double,double*); +hidden double __sin(double,double,int); +hidden double __cos(double,double); +hidden double __tan(double,double,int); +hidden double __expo2(double); +hidden double complex __ldexp_cexp(double complex,int); + +hidden int __rem_pio2f(float,double*); +hidden float __sindf(double); +hidden float __cosdf(double); +hidden float __tandf(double,int); +hidden float __expo2f(float); +hidden float complex __ldexp_cexpf(float complex,int); + +hidden int __rem_pio2l(long double, long double *); +hidden long double __sinl(long double, long double, int); +hidden long double __cosl(long double, long double); +hidden long double __tanl(long double, long double, int); /* polynomial evaluation */ -long double __polevll(long double, const long double *, int); -long double __p1evll(long double, const long double *, int); +hidden long double __polevll(long double, const long double *, int); +hidden long double __p1evll(long double, const long double *, int); extern int __signgam; -double __lgamma_r(double, int *); -float __lgammaf_r(float, int *); +hidden double __lgamma_r(double, int *); +hidden float __lgammaf_r(float, int *); #endif diff --git a/src/math/__invtrigl.h b/src/math/__invtrigl.h index 91a8a3b6..2d97133b 100644 --- a/src/math/__invtrigl.h +++ b/src/math/__invtrigl.h @@ -1,6 +1,6 @@ /* shared by acosl, asinl and atan2l */ #define pio2_hi __pio2_hi #define pio2_lo __pio2_lo -extern const long double pio2_hi, pio2_lo; +hidden extern const long double pio2_hi, pio2_lo; -long double __invtrigl_R(long double z); +hidden long double __invtrigl_R(long double z);