diff options
| author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2025-10-08 10:55:10 -0300 |
|---|---|---|
| committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2025-10-30 15:41:20 -0300 |
| commit | 9f8dea5b5dd0585fd2032fa8781f6d6505e23dc1 (patch) | |
| tree | 54825993bc8f00b53bc106e174c9ab596b927f5b /math | |
| parent | 0b484d7b779f8a4158e165769759c358a29ced6a (diff) | |
math: Remove the SVID error handling from acosf
It improves latency for about 2-10% and throughput for about 5-10%.
Tested on x86_64-linux-gnu and i686-linux-gnu.
Reviewed-by: Wilco Dijkstra <Wilco.Dijkstra@arm.com>
Diffstat (limited to 'math')
| -rw-r--r-- | math/Versions | 1 | ||||
| -rw-r--r-- | math/w_acosf_compat.c | 10 |
2 files changed, 8 insertions, 3 deletions
diff --git a/math/Versions b/math/Versions index c772cb61c6..4d7cbeb21d 100644 --- a/math/Versions +++ b/math/Versions @@ -688,6 +688,7 @@ libm { } GLIBC_2.43 { # No SVID compatible error handling. + acosf; log10f; } } diff --git a/math/w_acosf_compat.c b/math/w_acosf_compat.c index e7037989f0..c97087f83a 100644 --- a/math/w_acosf_compat.c +++ b/math/w_acosf_compat.c @@ -22,10 +22,10 @@ #include <libm-alias-float.h> -#if LIBM_SVID_COMPAT +#if LIBM_SVID_COMPAT && SHLIB_COMPAT (libm, GLIBC_2_0, GLIBC_2_43) /* wrapper acosf */ float -__acosf (float x) +__acos_compatf (float x) { if (__builtin_expect (isgreater (fabsf (x), 1.0f), 0) && _LIB_VERSION != _IEEE_) @@ -37,5 +37,9 @@ __acosf (float x) return __ieee754_acosf (x); } -libm_alias_float (__acos, acos) +# ifdef NO_COMPAT_NEEDED +libm_alias_float (__acos_compat, acos) +# else +compat_symbol (libm, __acos_compatf, acosf, GLIBC_2_0); +# endif #endif |
