From 5432c3bec331c46f558633174df196abadbcdfa7 Mon Sep 17 00:00:00 2001 From: Bruce Evans Date: Sun, 4 Sep 2016 14:12:19 +0000 Subject: [PATCH] Disconnect the "optimized" asm variants of cos(), sin() and tan() from the build on i386. Leave them in the source tree for regression tests. The asm functions were always much less accurate (by a factor of more than 10**18 in the worst case). They were faster on old CPUs. But with each new generation of CPUs they get relatively slower. The double precision C version's average advantage is about a factor of 2 on Haswell. The asm functions were already intentionally avoided in float and long double precision on i386 and in all precisions on amd64. Float precision and amd64 give larger advantages to the C version. The long double precision C code and compilers' understanding of long double precision are not so good, so the i387 is still slightly faster for long double precision, except for the unimportant subcase of huge args where the sub-optimal C code now somehow beats the i387 by about a factor of 2. --- lib/msun/i387/Makefile.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/msun/i387/Makefile.inc b/lib/msun/i387/Makefile.inc index 960120d21a9a..daa93f68c36e 100644 --- a/lib/msun/i387/Makefile.inc +++ b/lib/msun/i387/Makefile.inc @@ -2,8 +2,8 @@ ARCH_SRCS = e_exp.S e_fmod.S e_log.S e_log10.S \ e_remainder.S e_sqrt.S s_ceil.S s_copysign.S \ - s_cos.S s_finite.S s_floor.S s_llrint.S s_logb.S s_lrint.S \ - s_remquo.S s_rint.S s_scalbn.S s_significand.S s_sin.S s_tan.S \ + s_finite.S s_floor.S s_llrint.S s_logb.S s_lrint.S \ + s_remquo.S s_rint.S s_scalbn.S s_significand.S \ s_trunc.S # float counterparts