about summary refs log tree commit diff
path: root/sysdeps/x86_64/fpu
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/x86_64/fpu')
-rw-r--r--sysdeps/x86_64/fpu/multiarch/Makefile7
-rw-r--r--sysdeps/x86_64/fpu/multiarch/e_atan2-fma4.c8
-rw-r--r--sysdeps/x86_64/fpu/multiarch/e_log-fma4.c6
-rw-r--r--sysdeps/x86_64/fpu/multiarch/mpa-avx.c2
-rw-r--r--sysdeps/x86_64/fpu/multiarch/mpatan-fma4.c6
-rw-r--r--sysdeps/x86_64/fpu/multiarch/mpatan2-fma4.c4
-rw-r--r--sysdeps/x86_64/fpu/multiarch/mpexp-fma4.c6
-rw-r--r--sysdeps/x86_64/fpu/multiarch/mplog-fma4.c4
-rw-r--r--sysdeps/x86_64/fpu/multiarch/mpsqrt-fma4.c4
-rw-r--r--sysdeps/x86_64/fpu/multiarch/mptan-fma4.c2
-rw-r--r--sysdeps/x86_64/fpu/multiarch/mul-avx.c8
-rw-r--r--sysdeps/x86_64/fpu/multiarch/mul-fma4.c (renamed from sysdeps/x86_64/fpu/multiarch/mpa-fma4.c)4
-rw-r--r--sysdeps/x86_64/fpu/multiarch/s_atan-fma4.c6
-rw-r--r--sysdeps/x86_64/fpu/multiarch/s_tan-fma4.c4
-rw-r--r--sysdeps/x86_64/fpu/multiarch/sincos32-fma4.c6
-rw-r--r--sysdeps/x86_64/fpu/multiarch/slowexp-fma4.c6
-rw-r--r--sysdeps/x86_64/fpu/multiarch/slowpow-fma4.c6
17 files changed, 47 insertions, 42 deletions
diff --git a/sysdeps/x86_64/fpu/multiarch/Makefile b/sysdeps/x86_64/fpu/multiarch/Makefile
index 12b0526e50..b3e5658464 100644
--- a/sysdeps/x86_64/fpu/multiarch/Makefile
+++ b/sysdeps/x86_64/fpu/multiarch/Makefile
@@ -5,7 +5,7 @@ libm-sysdep_routines += s_floor-c s_ceil-c s_floorf-c s_ceilf-c \
 ifeq ($(have-mfma4),yes)
 libm-sysdep_routines += e_exp-fma4 e_log-fma4 e_pow-fma4 s_atan-fma4 \
 			e_asin-fma4 e_atan2-fma4 s_sin-fma4 s_tan-fma4 \
-			mplog-fma4 mpa-fma4 slowexp-fma4 slowpow-fma4 \
+			mplog-fma4 mul-fma4 slowexp-fma4 slowpow-fma4 \
 			sincos32-fma4 doasin-fma4 dosincos-fma4 \
 			halfulp-fma4 mpexp-fma4 \
 			mpatan2-fma4 mpatan-fma4 mpsqrt-fma4 mptan-fma4
@@ -18,13 +18,13 @@ CFLAGS-e_exp-fma4.c = -mfma4
 CFLAGS-e_log-fma4.c = -mfma4
 CFLAGS-e_pow-fma4.c = -mfma4
 CFLAGS-halfulp-fma4.c = -mfma4
-CFLAGS-mpa-fma4.c = -mfma4
 CFLAGS-mpatan-fma4.c = -mfma4
 CFLAGS-mpatan2-fma4.c = -mfma4
 CFLAGS-mpexp-fma4.c = -mfma4
 CFLAGS-mplog-fma4.c = -mfma4
 CFLAGS-mpsqrt-fma4.c = -mfma4
 CFLAGS-mptan-fma4.c = -mfma4
+CFLAGS-mul-fma4.c = -mfma4
 CFLAGS-s_atan-fma4.c = -mfma4
 CFLAGS-sincos32-fma4.c = -mfma4
 CFLAGS-slowexp-fma4.c = -mfma4
@@ -37,7 +37,7 @@ ifeq ($(config-cflags-sse2avx),yes)
 libm-sysdep_routines += e_exp-avx e_log-avx s_atan-avx \
 			e_atan2-avx s_sin-avx s_tan-avx \
 			mplog-avx mpa-avx slowexp-avx \
-			mpexp-avx
+			mpexp-avx mul-avx
 
 CFLAGS-e_atan2-avx.c = -msse2avx -DSSE2AVX
 CFLAGS-e_exp-avx.c = -msse2avx -DSSE2AVX
@@ -45,6 +45,7 @@ CFLAGS-e_log-avx.c = -msse2avx -DSSE2AVX
 CFLAGS-mpa-avx.c = -msse2avx -DSSE2AVX
 CFLAGS-mpexp-avx.c = -msse2avx -DSSE2AVX
 CFLAGS-mplog-avx.c = -msse2avx -DSSE2AVX
+CFLAGS-mul-avx.c = -msse2avx -DSSE2AVX
 CFLAGS-s_atan-avx.c = -msse2avx -DSSE2AVX
 CFLAGS-s_sin-avx.c = -msse2avx -DSSE2AVX
 CFLAGS-slowexp-avx.c = -msse2avx -DSSE2AVX
diff --git a/sysdeps/x86_64/fpu/multiarch/e_atan2-fma4.c b/sysdeps/x86_64/fpu/multiarch/e_atan2-fma4.c
index f4e986293e..f8c8eb6f0a 100644
--- a/sysdeps/x86_64/fpu/multiarch/e_atan2-fma4.c
+++ b/sysdeps/x86_64/fpu/multiarch/e_atan2-fma4.c
@@ -1,10 +1,10 @@
 #define __ieee754_atan2 __ieee754_atan2_fma4
-#define __add __add_fma4
-#define __dbl_mp __dbl_mp_fma4
-#define __dvd __dvd_fma4
+#define __add __add_avx
+#define __dbl_mp __dbl_mp_avx
+#define __dvd __dvd_avx
 #define __mpatan2 __mpatan2_fma4
 #define __mul __mul_fma4
-#define __sub __sub_fma4
+#define __sub __sub_avx
 #define SECTION __attribute__ ((section (".text.fma4")))
 
 #include <sysdeps/ieee754/dbl-64/e_atan2.c>
diff --git a/sysdeps/x86_64/fpu/multiarch/e_log-fma4.c b/sysdeps/x86_64/fpu/multiarch/e_log-fma4.c
index a2346cc618..d4b1819278 100644
--- a/sysdeps/x86_64/fpu/multiarch/e_log-fma4.c
+++ b/sysdeps/x86_64/fpu/multiarch/e_log-fma4.c
@@ -1,8 +1,8 @@
 #define __ieee754_log __ieee754_log_fma4
 #define __mplog __mplog_fma4
-#define __add __add_fma4
-#define __dbl_mp __dbl_mp_fma4
-#define __sub __sub_fma4
+#define __add __add_avx
+#define __dbl_mp __dbl_mp_avx
+#define __sub __sub_avx
 #define SECTION __attribute__ ((section (".text.fma4")))
 
 #include <sysdeps/ieee754/dbl-64/e_log.c>
diff --git a/sysdeps/x86_64/fpu/multiarch/mpa-avx.c b/sysdeps/x86_64/fpu/multiarch/mpa-avx.c
index a92dbedc05..90d93e87f9 100644
--- a/sysdeps/x86_64/fpu/multiarch/mpa-avx.c
+++ b/sysdeps/x86_64/fpu/multiarch/mpa-avx.c
@@ -1,5 +1,4 @@
 #define __add __add_avx
-#define __mul __mul_avx
 #define __sub __sub_avx
 #define __dbl_mp __dbl_mp_avx
 #define __dvd __dvd_avx
@@ -7,6 +6,7 @@
 #define NO___CPY 1
 #define NO___MP_DBL 1
 #define NO___ACR 1
+#define NO___MUL 1
 #define SECTION __attribute__ ((section (".text.avx")))
 
 #include <sysdeps/ieee754/dbl-64/mpa.c>
diff --git a/sysdeps/x86_64/fpu/multiarch/mpatan-fma4.c b/sysdeps/x86_64/fpu/multiarch/mpatan-fma4.c
index fbd3bd49a2..a665e6844d 100644
--- a/sysdeps/x86_64/fpu/multiarch/mpatan-fma4.c
+++ b/sysdeps/x86_64/fpu/multiarch/mpatan-fma4.c
@@ -1,9 +1,9 @@
 #define __mpatan __mpatan_fma4
-#define __add __add_fma4
-#define __dvd __dvd_fma4
+#define __add __add_avx
+#define __dvd __dvd_avx
 #define __mpsqrt __mpsqrt_fma4
 #define __mul __mul_fma4
-#define __sub __sub_fma4
+#define __sub __sub_avx
 #define AVOID_MPATAN_H 1
 #define SECTION __attribute__ ((section (".text.fma4")))
 
diff --git a/sysdeps/x86_64/fpu/multiarch/mpatan2-fma4.c b/sysdeps/x86_64/fpu/multiarch/mpatan2-fma4.c
index e6e44d49b0..c41b887129 100644
--- a/sysdeps/x86_64/fpu/multiarch/mpatan2-fma4.c
+++ b/sysdeps/x86_64/fpu/multiarch/mpatan2-fma4.c
@@ -1,6 +1,6 @@
 #define __mpatan2 __mpatan2_fma4
-#define __add __add_fma4
-#define __dvd __dvd_fma4
+#define __add __add_avx
+#define __dvd __dvd_avx
 #define __mpatan __mpatan_fma4
 #define __mpsqrt __mpsqrt_fma4
 #define __mul __mul_fma4
diff --git a/sysdeps/x86_64/fpu/multiarch/mpexp-fma4.c b/sysdeps/x86_64/fpu/multiarch/mpexp-fma4.c
index 07ca6e9ad0..5950aef1af 100644
--- a/sysdeps/x86_64/fpu/multiarch/mpexp-fma4.c
+++ b/sysdeps/x86_64/fpu/multiarch/mpexp-fma4.c
@@ -1,7 +1,7 @@
 #define __mpexp __mpexp_fma4
-#define __add __add_fma4
-#define __dbl_mp __dbl_mp_fma4
-#define __dvd __dvd_fma4
+#define __add __add_avx
+#define __dbl_mp __dbl_mp_avx
+#define __dvd __dvd_avx
 #define __mul __mul_fma4
 #define AVOID_MPEXP_H 1
 #define SECTION __attribute__ ((section (".text.fma4")))
diff --git a/sysdeps/x86_64/fpu/multiarch/mplog-fma4.c b/sysdeps/x86_64/fpu/multiarch/mplog-fma4.c
index b4733118d7..dd1f46eaa6 100644
--- a/sysdeps/x86_64/fpu/multiarch/mplog-fma4.c
+++ b/sysdeps/x86_64/fpu/multiarch/mplog-fma4.c
@@ -1,8 +1,8 @@
 #define __mplog __mplog_fma4
-#define __add __add_fma4
+#define __add __add_avx
 #define __mpexp __mpexp_fma4
 #define __mul __mul_fma4
-#define __sub __sub_fma4
+#define __sub __sub_avx
 #define SECTION __attribute__ ((section (".text.fma4")))
 
 #include <sysdeps/ieee754/dbl-64/mplog.c>
diff --git a/sysdeps/x86_64/fpu/multiarch/mpsqrt-fma4.c b/sysdeps/x86_64/fpu/multiarch/mpsqrt-fma4.c
index f8a1ba2d92..85996db9de 100644
--- a/sysdeps/x86_64/fpu/multiarch/mpsqrt-fma4.c
+++ b/sysdeps/x86_64/fpu/multiarch/mpsqrt-fma4.c
@@ -1,7 +1,7 @@
 #define __mpsqrt __mpsqrt_fma4
-#define __dbl_mp __dbl_mp_fma4
+#define __dbl_mp __dbl_mp_avx
 #define __mul __mul_fma4
-#define __sub __sub_fma4
+#define __sub __sub_avx
 #define AVOID_MPSQRT_H 1
 #define SECTION __attribute__ ((section (".text.fma4")))
 
diff --git a/sysdeps/x86_64/fpu/multiarch/mptan-fma4.c b/sysdeps/x86_64/fpu/multiarch/mptan-fma4.c
index fb4a9d48ca..87e4dec54d 100644
--- a/sysdeps/x86_64/fpu/multiarch/mptan-fma4.c
+++ b/sysdeps/x86_64/fpu/multiarch/mptan-fma4.c
@@ -1,6 +1,6 @@
 #define __mptan __mptan_fma4
 #define __c32 __c32_fma4
-#define __dvd __dvd_fma4
+#define __dvd __dvd_avx
 #define __mpranred __mpranred_fma4
 #define SECTION __attribute__ ((section (".text.fma4")))
 
diff --git a/sysdeps/x86_64/fpu/multiarch/mul-avx.c b/sysdeps/x86_64/fpu/multiarch/mul-avx.c
new file mode 100644
index 0000000000..b4f0477b6f
--- /dev/null
+++ b/sysdeps/x86_64/fpu/multiarch/mul-avx.c
@@ -0,0 +1,8 @@
+#define __mul __mul_avx
+
+#define NO___CPY 1
+#define NO___MP_DBL 1
+#define NO___ACR 1
+#define SECTION __attribute__ ((section (".text.avx")))
+
+#include <sysdeps/ieee754/dbl-64/mpa.c>
diff --git a/sysdeps/x86_64/fpu/multiarch/mpa-fma4.c b/sysdeps/x86_64/fpu/multiarch/mul-fma4.c
index f8ed8f3464..230b0e5c4a 100644
--- a/sysdeps/x86_64/fpu/multiarch/mpa-fma4.c
+++ b/sysdeps/x86_64/fpu/multiarch/mul-fma4.c
@@ -1,8 +1,4 @@
-#define __add __add_fma4
 #define __mul __mul_fma4
-#define __sub __sub_fma4
-#define __dbl_mp __dbl_mp_fma4
-#define __dvd __dvd_fma4
 
 #define NO___CPY 1
 #define NO___MP_DBL 1
diff --git a/sysdeps/x86_64/fpu/multiarch/s_atan-fma4.c b/sysdeps/x86_64/fpu/multiarch/s_atan-fma4.c
index 9e83e6cdab..2b3516a077 100644
--- a/sysdeps/x86_64/fpu/multiarch/s_atan-fma4.c
+++ b/sysdeps/x86_64/fpu/multiarch/s_atan-fma4.c
@@ -1,9 +1,9 @@
 #define atan __atan_fma4
-#define __add __add_fma4
-#define __dbl_mp __dbl_mp_fma4
+#define __add __add_avx
+#define __dbl_mp __dbl_mp_avx
 #define __mpatan __mpatan_fma4
 #define __mul __mul_fma4
-#define __sub __sub_fma4
+#define __sub __sub_avx
 #define SECTION __attribute__ ((section (".text.fma4")))
 
 #include <sysdeps/ieee754/dbl-64/s_atan.c>
diff --git a/sysdeps/x86_64/fpu/multiarch/s_tan-fma4.c b/sysdeps/x86_64/fpu/multiarch/s_tan-fma4.c
index a805440b46..39556a80fa 100644
--- a/sysdeps/x86_64/fpu/multiarch/s_tan-fma4.c
+++ b/sysdeps/x86_64/fpu/multiarch/s_tan-fma4.c
@@ -1,8 +1,8 @@
 #define tan __tan_fma4
-#define __dbl_mp __dbl_mp_fma4
+#define __dbl_mp __dbl_mp_avx
 #define __mpranred __mpranred_fma4
 #define __mptan __mptan_fma4
-#define __sub __sub_fma4
+#define __sub __sub_avx
 #define SECTION __attribute__ ((section (".text.fma4")))
 
 #include <sysdeps/ieee754/dbl-64/s_tan.c>
diff --git a/sysdeps/x86_64/fpu/multiarch/sincos32-fma4.c b/sysdeps/x86_64/fpu/multiarch/sincos32-fma4.c
index ebbfa18cca..14b9d098a0 100644
--- a/sysdeps/x86_64/fpu/multiarch/sincos32-fma4.c
+++ b/sysdeps/x86_64/fpu/multiarch/sincos32-fma4.c
@@ -6,10 +6,10 @@
 #define __mpcos __mpcos_fma4
 #define __mpcos1 __mpcos1_fma4
 #define __mpranred __mpranred_fma4
-#define __add __add_fma4
-#define __dbl_mp __dbl_mp_fma4
+#define __add __add_avx
+#define __dbl_mp __dbl_mp_avx
 #define __mul __mul_fma4
-#define __sub __sub_fma4
+#define __sub __sub_avx
 #define SECTION __attribute__ ((section (".text.fma4")))
 
 #include <sysdeps/ieee754/dbl-64/sincos32.c>
diff --git a/sysdeps/x86_64/fpu/multiarch/slowexp-fma4.c b/sysdeps/x86_64/fpu/multiarch/slowexp-fma4.c
index 3bcde84233..df90752356 100644
--- a/sysdeps/x86_64/fpu/multiarch/slowexp-fma4.c
+++ b/sysdeps/x86_64/fpu/multiarch/slowexp-fma4.c
@@ -1,9 +1,9 @@
 #define __slowexp __slowexp_fma4
-#define __add __add_fma4
-#define __dbl_mp __dbl_mp_fma4
+#define __add __add_avx
+#define __dbl_mp __dbl_mp_avx
 #define __mpexp __mpexp_fma4
 #define __mul __mul_fma4
-#define __sub __sub_fma4
+#define __sub __sub_avx
 #define SECTION __attribute__ ((section (".text.fma4")))
 
 #include <sysdeps/ieee754/dbl-64/slowexp.c>
diff --git a/sysdeps/x86_64/fpu/multiarch/slowpow-fma4.c b/sysdeps/x86_64/fpu/multiarch/slowpow-fma4.c
index 69d69823bb..162aaa5d5c 100644
--- a/sysdeps/x86_64/fpu/multiarch/slowpow-fma4.c
+++ b/sysdeps/x86_64/fpu/multiarch/slowpow-fma4.c
@@ -1,10 +1,10 @@
 #define __slowpow __slowpow_fma4
-#define __add __add_fma4
-#define __dbl_mp __dbl_mp_fma4
+#define __add __add_avx
+#define __dbl_mp __dbl_mp_avx
 #define __mpexp __mpexp_fma4
 #define __mplog __mplog_fma4
 #define __mul __mul_fma4
-#define __sub __sub_fma4
+#define __sub __sub_avx
 #define __halfulp __halfulp_fma4
 #define SECTION __attribute__ ((section (".text.fma4")))