summaryrefslogtreecommitdiff
path: root/math
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2025-10-08 10:55:15 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2025-10-30 15:41:28 -0300
commit03eeeba705cc714e77b0b2710fea2e956ff34f24 (patch)
tree2d7abf8b1a4342eb8d78809eba763866176c867f /math
parent555c39c0fcefde195c06adb5145217947bf4ff03 (diff)
math: Remove the SVID error handling from coshf
It improves latency for about 3-10% and throughput for about 5-15%. 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/Versions1
-rw-r--r--math/w_coshf_compat.c12
2 files changed, 10 insertions, 3 deletions
diff --git a/math/Versions b/math/Versions
index cf79a6107e..642bb9242e 100644
--- a/math/Versions
+++ b/math/Versions
@@ -692,6 +692,7 @@ libm {
acoshf;
asinf;
atanhf;
+ coshf;
log10f;
}
}
diff --git a/math/w_coshf_compat.c b/math/w_coshf_compat.c
index ce5e196c07..bef703becd 100644
--- a/math/w_coshf_compat.c
+++ b/math/w_coshf_compat.c
@@ -20,10 +20,11 @@
#include <math_private.h>
#include <math-svid-compat.h>
#include <libm-alias-float.h>
+#include <shlib-compat.h>
-#if LIBM_SVID_COMPAT
+#if LIBM_SVID_COMPAT && SHLIB_COMPAT (libm, GLIBC_2_0, GLIBC_2_43)
float
-__coshf (float x)
+__cosh_compatf (float x)
{
float z = __ieee754_coshf (x);
if (__builtin_expect (!isfinite (z), 0) && isfinite (x)
@@ -32,5 +33,10 @@ __coshf (float x)
return z;
}
-libm_alias_float (__cosh, cosh)
+# ifdef NO_COMPAT_NEEDED
+strong_alias (__cosh_compatf, __coshf)
+libm_alias_float (__cosh_compat, cosh)
+# else
+compat_symbol (libm, __cosh_compatf, coshf, GLIBC_2_0);
+# endif
#endif