From da39afa4ffcc94a97de33222f3cda236daac410e Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Tue, 31 May 2022 17:55:27 -0300 Subject: 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. --- sysdeps/ieee754/flt-32/s_cosf.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'sysdeps/ieee754/flt-32') 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; -- cgit 1.4.1