about summary refs log tree commit diff
path: root/sysdeps/x86_64/fpu
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2017-11-29 19:01:21 +0000
committerJoseph Myers <joseph@codesourcery.com>2017-11-29 19:01:21 +0000
commit011fba7e4802051c7ed7e3b6fdafad407b17094b (patch)
tree0aa543faafc5c425806ccee06c152a00be587970 /sysdeps/x86_64/fpu
parent21bfcc3d245734618f4fcb710b91c41b1483975b (diff)
downloadglibc-011fba7e4802051c7ed7e3b6fdafad407b17094b.tar.gz
glibc-011fba7e4802051c7ed7e3b6fdafad407b17094b.tar.xz
glibc-011fba7e4802051c7ed7e3b6fdafad407b17094b.zip
Use libm_alias_double for x86_64.
Continuing the preparation for additional _FloatN / _FloatNx function
aliases, this patch makes x86_64 libm function implementations use
libm_alias_double to define function aliases.

Tested with the glibc testsuite for x86_64, and tested with
build-many-glibcs.py for all its x86_64 configurations that installed
stripped shared libraries are unchanged by the patch.

	* sysdeps/x86_64/fpu/multiarch/s_atan.c: Include
	<libm-alias-double.h>.
	(atan): Define using libm_alias_double.
	* sysdeps/x86_64/fpu/multiarch/s_ceil.c: Include
	<libm-alias-double.h>.
	(ceil): Define using libm_alias_double.
	* sysdeps/x86_64/fpu/multiarch/s_floor.c: Include
	<libm-alias-double.h>.
	(floor): Define using libm_alias_double.
	* sysdeps/x86_64/fpu/multiarch/s_fma.c: Include
	<libm-alias-double.h>.
	(fma): Define using libm_alias_double.
	* sysdeps/x86_64/fpu/multiarch/s_nearbyint.c: Include
	<libm-alias-double.h>.
	(nearbyint): Define using libm_alias_double.
	* sysdeps/x86_64/fpu/multiarch/s_rint.c: Include
	<libm-alias-double.h>.
	(rint): Define using libm_alias_double.
	* sysdeps/x86_64/fpu/multiarch/s_sin.c: Include
	<libm-alias-double.h>.
	(sin): Define using libm_alias_double.
	(cos): Likewise.
	* sysdeps/x86_64/fpu/multiarch/s_tan.c: Include
	<libm-alias-double.h>.
	(tan): Define using libm_alias_double.
	* sysdeps/x86_64/fpu/multiarch/s_trunc.c: Include
	<libm-alias-double.h>.
	(trunc): Define using libm_alias_double.
	* sysdeps/x86_64/fpu/s_copysign.S: Include <libm-alias-double.h>.
	(copysign): Define using libm_alias_double.
	* sysdeps/x86_64/fpu/s_fabs.c: Include <libm-alias-double.h>.
	(fabs): Define using libm_alias_double.
	* sysdeps/x86_64/fpu/s_fmax.S: Include <libm-alias-double.h>.
	(fmax): Define using libm_alias_double.
	* sysdeps/x86_64/fpu/s_fmin.S: Include <libm-alias-double.h>.
	(fmin): Define using libm_alias_double.
	* sysdeps/x86_64/fpu/s_llrint.S: Include <libm-alias-double.h>.
	(llrint): Define using libm_alias_double.
	[!__ILP32__] (lrint): Likewise.
	* sysdeps/x86_64/x32/fpu/s_lrint.S: Include <libm-alias-double.h>.
	(lrint): Define using libm_alias_double.
Diffstat (limited to 'sysdeps/x86_64/fpu')
-rw-r--r--sysdeps/x86_64/fpu/multiarch/s_atan.c4
-rw-r--r--sysdeps/x86_64/fpu/multiarch/s_ceil.c4
-rw-r--r--sysdeps/x86_64/fpu/multiarch/s_floor.c4
-rw-r--r--sysdeps/x86_64/fpu/multiarch/s_fma.c3
-rw-r--r--sysdeps/x86_64/fpu/multiarch/s_nearbyint.c4
-rw-r--r--sysdeps/x86_64/fpu/multiarch/s_rint.c4
-rw-r--r--sysdeps/x86_64/fpu/multiarch/s_sin.c6
-rw-r--r--sysdeps/x86_64/fpu/multiarch/s_tan.c4
-rw-r--r--sysdeps/x86_64/fpu/multiarch/s_trunc.c4
-rw-r--r--sysdeps/x86_64/fpu/s_copysign.S3
-rw-r--r--sysdeps/x86_64/fpu/s_fabs.c3
-rw-r--r--sysdeps/x86_64/fpu/s_fmax.S3
-rw-r--r--sysdeps/x86_64/fpu/s_fmin.S3
-rw-r--r--sysdeps/x86_64/fpu/s_llrint.S5
14 files changed, 38 insertions, 16 deletions
diff --git a/sysdeps/x86_64/fpu/multiarch/s_atan.c b/sysdeps/x86_64/fpu/multiarch/s_atan.c
index 5d864dd4f0..a65b94e2c8 100644
--- a/sysdeps/x86_64/fpu/multiarch/s_atan.c
+++ b/sysdeps/x86_64/fpu/multiarch/s_atan.c
@@ -16,13 +16,15 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+#include <libm-alias-double.h>
+
 extern double __redirect_atan (double);
 
 #define SYMBOL_NAME atan
 #include "ifunc-avx-fma4.h"
 
 libc_ifunc_redirected (__redirect_atan, __atan, IFUNC_SELECTOR ());
-weak_alias (__atan, atan)
+libm_alias_double (__atan, atan)
 
 #define __atan __atan_sse2
 #include <sysdeps/ieee754/dbl-64/s_atan.c>
diff --git a/sysdeps/x86_64/fpu/multiarch/s_ceil.c b/sysdeps/x86_64/fpu/multiarch/s_ceil.c
index 2c01957963..e9b1b7ba67 100644
--- a/sysdeps/x86_64/fpu/multiarch/s_ceil.c
+++ b/sysdeps/x86_64/fpu/multiarch/s_ceil.c
@@ -16,6 +16,8 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+#include <libm-alias-double.h>
+
 #define ceil __redirect_ceil
 #define __ceil __redirect___ceil
 #include <math.h>
@@ -26,4 +28,4 @@
 #include "ifunc-sse4_1.h"
 
 libc_ifunc_redirected (__redirect_ceil, __ceil, IFUNC_SELECTOR ());
-weak_alias (__ceil, ceil)
+libm_alias_double (__ceil, ceil)
diff --git a/sysdeps/x86_64/fpu/multiarch/s_floor.c b/sysdeps/x86_64/fpu/multiarch/s_floor.c
index 3dd0f81da5..a692578ea4 100644
--- a/sysdeps/x86_64/fpu/multiarch/s_floor.c
+++ b/sysdeps/x86_64/fpu/multiarch/s_floor.c
@@ -16,6 +16,8 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+#include <libm-alias-double.h>
+
 #define floor __redirect_floor
 #define __floor __redirect___floor
 #include <math.h>
@@ -26,4 +28,4 @@
 #include "ifunc-sse4_1.h"
 
 libc_ifunc_redirected (__redirect_floor, __floor, IFUNC_SELECTOR ());
-weak_alias (__floor, floor)
+libm_alias_double (__floor, floor)
diff --git a/sysdeps/x86_64/fpu/multiarch/s_fma.c b/sysdeps/x86_64/fpu/multiarch/s_fma.c
index 3ac4fed660..00528256a3 100644
--- a/sysdeps/x86_64/fpu/multiarch/s_fma.c
+++ b/sysdeps/x86_64/fpu/multiarch/s_fma.c
@@ -20,6 +20,7 @@
 #include <config.h>
 #include <math.h>
 #include <init-arch.h>
+#include <libm-alias-double.h>
 
 extern double __fma_sse2 (double x, double y, double z) attribute_hidden;
 
@@ -43,7 +44,7 @@ __fma_fma4 (double x, double y, double z)
 libm_ifunc (__fma, HAS_ARCH_FEATURE (FMA_Usable)
 	    ? __fma_fma3 : (HAS_ARCH_FEATURE (FMA4_Usable)
 			    ? __fma_fma4 : __fma_sse2));
-weak_alias (__fma, fma)
+libm_alias_double (__fma, fma)
 
 #define __fma __fma_sse2
 
diff --git a/sysdeps/x86_64/fpu/multiarch/s_nearbyint.c b/sysdeps/x86_64/fpu/multiarch/s_nearbyint.c
index 05579c66ea..b2c7b3607d 100644
--- a/sysdeps/x86_64/fpu/multiarch/s_nearbyint.c
+++ b/sysdeps/x86_64/fpu/multiarch/s_nearbyint.c
@@ -16,6 +16,8 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+#include <libm-alias-double.h>
+
 #define nearbyint __redirect_nearbyint
 #define __nearbyint __redirect___nearbyint
 #include <math.h>
@@ -27,4 +29,4 @@
 
 libc_ifunc_redirected (__redirect_nearbyint, __nearbyint,
 		       IFUNC_SELECTOR ());
-weak_alias (__nearbyint, nearbyint)
+libm_alias_double (__nearbyint, nearbyint)
diff --git a/sysdeps/x86_64/fpu/multiarch/s_rint.c b/sysdeps/x86_64/fpu/multiarch/s_rint.c
index ad44e7cf8c..95e377f907 100644
--- a/sysdeps/x86_64/fpu/multiarch/s_rint.c
+++ b/sysdeps/x86_64/fpu/multiarch/s_rint.c
@@ -16,6 +16,8 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+#include <libm-alias-double.h>
+
 #define rint __redirect_rint
 #define __rint __redirect___rint
 #include <math.h>
@@ -26,4 +28,4 @@
 #include "ifunc-sse4_1.h"
 
 libc_ifunc_redirected (__redirect_rint, __rint, IFUNC_SELECTOR ());
-weak_alias (__rint, rint)
+libm_alias_double (__rint, rint)
diff --git a/sysdeps/x86_64/fpu/multiarch/s_sin.c b/sysdeps/x86_64/fpu/multiarch/s_sin.c
index eafc06374f..9f1e05b6f2 100644
--- a/sysdeps/x86_64/fpu/multiarch/s_sin.c
+++ b/sysdeps/x86_64/fpu/multiarch/s_sin.c
@@ -16,6 +16,8 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+#include <libm-alias-double.h>
+
 extern double __redirect_sin (double);
 extern double __redirect_cos (double);
 
@@ -23,14 +25,14 @@ extern double __redirect_cos (double);
 #include "ifunc-avx-fma4.h"
 
 libc_ifunc_redirected (__redirect_sin, __sin, IFUNC_SELECTOR ());
-weak_alias (__sin, sin)
+libm_alias_double (__sin, sin)
 
 #undef SYMBOL_NAME
 #define SYMBOL_NAME cos
 #include "ifunc-avx-fma4.h"
 
 libc_ifunc_redirected (__redirect_cos, __cos, IFUNC_SELECTOR ());
-weak_alias (__cos, cos)
+libm_alias_double (__cos, cos)
 
 #define __cos __cos_sse2
 #define __sin __sin_sse2
diff --git a/sysdeps/x86_64/fpu/multiarch/s_tan.c b/sysdeps/x86_64/fpu/multiarch/s_tan.c
index 86377a8766..3eb11274d8 100644
--- a/sysdeps/x86_64/fpu/multiarch/s_tan.c
+++ b/sysdeps/x86_64/fpu/multiarch/s_tan.c
@@ -16,13 +16,15 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+#include <libm-alias-double.h>
+
 extern double __redirect_tan (double);
 
 #define SYMBOL_NAME tan
 #include "ifunc-avx-fma4.h"
 
 libc_ifunc_redirected (__redirect_tan, __tan, IFUNC_SELECTOR ());
-weak_alias (__tan, tan)
+libm_alias_double (__tan, tan)
 
 #define __tan __tan_sse2
 #include <sysdeps/ieee754/dbl-64/s_tan.c>
diff --git a/sysdeps/x86_64/fpu/multiarch/s_trunc.c b/sysdeps/x86_64/fpu/multiarch/s_trunc.c
index fb27fc3ec9..6b35c7b7b6 100644
--- a/sysdeps/x86_64/fpu/multiarch/s_trunc.c
+++ b/sysdeps/x86_64/fpu/multiarch/s_trunc.c
@@ -16,6 +16,8 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+#include <libm-alias-double.h>
+
 #define trunc __redirect_trunc
 #define __trunc __redirect___trunc
 #include <math.h>
@@ -26,4 +28,4 @@
 #include "ifunc-sse4_1.h"
 
 libc_ifunc_redirected (__redirect_trunc, __trunc, IFUNC_SELECTOR ());
-weak_alias (__trunc, trunc)
+libm_alias_double (__trunc, trunc)
diff --git a/sysdeps/x86_64/fpu/s_copysign.S b/sysdeps/x86_64/fpu/s_copysign.S
index 8939dffd99..45729cf132 100644
--- a/sysdeps/x86_64/fpu/s_copysign.S
+++ b/sysdeps/x86_64/fpu/s_copysign.S
@@ -18,6 +18,7 @@
    <http://www.gnu.org/licenses/>.  */
 
 #include <machine/asm.h>
+#include <libm-alias-double.h>
 
 	.section .rodata.cst16,"aM",@progbits,16
 
@@ -47,4 +48,4 @@ ENTRY(__copysign)
 	ret
 END (__copysign)
 
-weak_alias (__copysign, copysign)
+libm_alias_double (__copysign, copysign)
diff --git a/sysdeps/x86_64/fpu/s_fabs.c b/sysdeps/x86_64/fpu/s_fabs.c
index f5d3ee87e9..313183db85 100644
--- a/sysdeps/x86_64/fpu/s_fabs.c
+++ b/sysdeps/x86_64/fpu/s_fabs.c
@@ -17,10 +17,11 @@
    <http://www.gnu.org/licenses/>.  */
 
 #include <math.h>
+#include <libm-alias-double.h>
 
 double
 __fabs (double x)
 {
   return __builtin_fabs (x);
 }
-weak_alias (__fabs, fabs)
+libm_alias_double (__fabs, fabs)
diff --git a/sysdeps/x86_64/fpu/s_fmax.S b/sysdeps/x86_64/fpu/s_fmax.S
index f93c9f9371..08027bd4a8 100644
--- a/sysdeps/x86_64/fpu/s_fmax.S
+++ b/sysdeps/x86_64/fpu/s_fmax.S
@@ -18,6 +18,7 @@
    <http://www.gnu.org/licenses/>.  */
 
 #include <sysdep.h>
+#include <libm-alias-double.h>
 
 	.text
 ENTRY(__fmax)
@@ -49,4 +50,4 @@ ENTRY(__fmax)
 
 2:	ret
 END(__fmax)
-weak_alias (__fmax, fmax)
+libm_alias_double (__fmax, fmax)
diff --git a/sysdeps/x86_64/fpu/s_fmin.S b/sysdeps/x86_64/fpu/s_fmin.S
index 718bf489df..3d11bf3baf 100644
--- a/sysdeps/x86_64/fpu/s_fmin.S
+++ b/sysdeps/x86_64/fpu/s_fmin.S
@@ -18,6 +18,7 @@
    <http://www.gnu.org/licenses/>.  */
 
 #include <sysdep.h>
+#include <libm-alias-double.h>
 
 	.text
 ENTRY(__fmin)
@@ -49,4 +50,4 @@ ENTRY(__fmin)
 
 2:	ret
 END(__fmin)
-weak_alias (__fmin, fmin)
+libm_alias_double (__fmin, fmin)
diff --git a/sysdeps/x86_64/fpu/s_llrint.S b/sysdeps/x86_64/fpu/s_llrint.S
index af7bbce585..b5272ac586 100644
--- a/sysdeps/x86_64/fpu/s_llrint.S
+++ b/sysdeps/x86_64/fpu/s_llrint.S
@@ -19,14 +19,15 @@
    <http://www.gnu.org/licenses/>.  */
 
 #include <sysdep.h>
+#include <libm-alias-double.h>
 
 	.text
 ENTRY(__llrint)
 	cvtsd2si %xmm0,%rax
 	ret
 END(__llrint)
-weak_alias (__llrint, llrint)
+libm_alias_double (__llrint, llrint)
 #ifndef __ILP32__
 strong_alias (__llrint, __lrint)
-weak_alias (__llrint, lrint)
+libm_alias_double (__llrint, lrint)
 #endif