aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/ieee754
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2022-05-31 17:55:27 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2022-06-01 10:47:44 -0300
commitda39afa4ffcc94a97de33222f3cda236daac410e (patch)
tree954d918b89078214ec5ee6eae4abd795b0e8065f /sysdeps/ieee754
parentc1176b62a9ffcde7fb4c0252db342fe21fbd524e (diff)
downloadglibc-da39afa4ffcc94a97de33222f3cda236daac410e.tar
glibc-da39afa4ffcc94a97de33222f3cda236daac410e.tar.gz
glibc-da39afa4ffcc94a97de33222f3cda236daac410e.tar.bz2
glibc-da39afa4ffcc94a97de33222f3cda236daac410e.zip
i686: Use generic cosf implementation for SSE2 version
Performance seems to be similar (gcc 11.2.1 on a Ryzen 9 5900X): * s_cosf-sse2.S: "cosf": { "workload-random": { "duration": 3.74987e+09, "iterations": 9.616e+07, "reciprocal-throughput": 15.8141, "latency": 62.1782, "max-throughput": 6.32346e+07, "min-throughput": 1.60828e+07 } } * generic s_cosf.c: "cosf": { "workload-random": { "duration": 3.87298e+09, "iterations": 1.00968e+08, "reciprocal-throughput": 18.3448, "latency": 58.3722, "max-throughput": 5.45113e+07, "min-throughput": 1.71314e+07 } } Checked on i686-linux-gnu.
Diffstat (limited to 'sysdeps/ieee754')
-rw-r--r--sysdeps/ieee754/flt-32/s_cosf.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sysdeps/ieee754/flt-32/s_cosf.c b/sysdeps/ieee754/flt-32/s_cosf.c
index ee9fa8565b..1236244244 100644
--- a/sysdeps/ieee754/flt-32/s_cosf.c
+++ b/sysdeps/ieee754/flt-32/s_cosf.c
@@ -23,6 +23,10 @@
#include "math_config.h"
#include "s_sincosf.h"
+#ifndef SECTION
+# define SECTION
+#endif
+
#ifndef COSF
# define COSF_FUNC __cosf
#else
@@ -35,6 +39,7 @@
arithmetic.
*/
float
+SECTION
COSF_FUNC (float y)
{
double x = y;