diff options
| author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2025-10-30 10:27:10 -0300 |
|---|---|---|
| committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2025-10-30 15:41:22 -0300 |
| commit | f92aba68bc0b37526fa863a90ea6d3129f683c98 (patch) | |
| tree | 09ac98280672240b932edccb48d056da245911b0 /math | |
| parent | 9f8dea5b5dd0585fd2032fa8781f6d6505e23dc1 (diff) | |
math: Remove the SVID error handling from asinf
It improves latency for about 2% and throughput for about 5%.
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_asinf.c | 8 | ||||
| -rw-r--r-- | math/w_asinf_compat.c | 10 |
3 files changed, 16 insertions, 3 deletions
diff --git a/math/Versions b/math/Versions index 4d7cbeb21d..31818c273e 100644 --- a/math/Versions +++ b/math/Versions @@ -689,6 +689,7 @@ libm { GLIBC_2.43 { # No SVID compatible error handling. acosf; + asinf; log10f; } } diff --git a/math/w_asinf.c b/math/w_asinf.c new file mode 100644 index 0000000000..5b6c152639 --- /dev/null +++ b/math/w_asinf.c @@ -0,0 +1,8 @@ +#include <math-type-macros-float.h> +#undef __USE_WRAPPER_TEMPLATE +#define __USE_WRAPPER_TEMPLATE 1 +#undef declare_mgen_alias +#define declare_mgen_alias(a, b) +#include <w_asin_template.c> +versioned_symbol (libm, __asinf, asinf, GLIBC_2_43); +libm_alias_float_other (__asinf, asinf) diff --git a/math/w_asinf_compat.c b/math/w_asinf_compat.c index e4927426f7..5fcb741188 100644 --- a/math/w_asinf_compat.c +++ b/math/w_asinf_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 asinf */ float -__asinf (float x) +__asin_compatf (float x) { if (__builtin_expect (isgreater (fabsf (x), 1.0f), 0) && _LIB_VERSION != _IEEE_) @@ -37,5 +37,9 @@ __asinf (float x) return __ieee754_asinf (x); } -libm_alias_float (__asin, asin) +# ifdef NO_COMPAT_NEEDED +libm_alias_float (__asin_compat, asin) +# else +compat_symbol (libm, __asin_compatf, asinf, GLIBC_2_0); +# endif #endif |
