about summary refs log tree commit diff
path: root/sysdeps/sparc/sparc32/sparcv9
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2017-11-29 23:40:07 +0000
committerJoseph Myers <joseph@codesourcery.com>2017-11-29 23:40:07 +0000
commit875cd54855034ff0f328ce8bf797843a1ca33667 (patch)
tree5836c61ac5a115be45c10f1f04a1766d598115e0 /sysdeps/sparc/sparc32/sparcv9
parentcf4ebc27fe3a66637c5fc8824d9591191786b5fd (diff)
downloadglibc-875cd54855034ff0f328ce8bf797843a1ca33667.tar.gz
glibc-875cd54855034ff0f328ce8bf797843a1ca33667.tar.xz
glibc-875cd54855034ff0f328ce8bf797843a1ca33667.zip
Use libm_alias_double for sparc.
Continuing the preparation for additional _FloatN / _FloatNx function
aliases, this patch makes sparc libm function implementations use
libm_alias_double to define function aliases (with consequent
simplification where compat symbol handling is now done by those
macros rather than locally in architecture-specific code).

Tested with build-many-glibcs.py for all its sparc configurations that
installed stripped shared libraries are unchanged by the patch.

	* sysdeps/sparc/sparc32/fpu/s_copysign.S: Include
	<libm-alias-double.h>.
	(copysign): Define using libm_alias_double.
	* sysdeps/sparc/sparc32/fpu/s_fabs.S: Include
	<libm-alias-double.h>.
	(fabs): Define using libm_alias_double.
	* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysign.S:
	Include <libm-alias-double.h>.
	(copysign): Define using libm_alias_double.
	* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabs.S: Include
	<libm-alias-double.h>.
	(fabs): Define using libm_alias_double.
	* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdim.c: Include
	<libm-alias-double.h>.
	(fdim): Define using libm_alias_double.
	* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fma.c: Include
	<libm-alias-double.h>.
	(fma): Define using libm_alias_double.
	* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrint.S: Include
	<libm-alias-double.h>.
	(llrint): Define using libm_alias_double.
	* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_nearbyint.S:
	Include <libm-alias-double.h>.
	(nearbyint): Define using libm_alias_double.
	* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rint.S: Include
	<libm-alias-double.h>.
	(rint): Define using libm_alias_double.
	* sysdeps/sparc/sparc32/sparcv9/fpu/s_fabs.S: Include
	<libm-alias-double.h>.
	(fabs): Define using libm_alias_double.
	* sysdeps/sparc/sparc32/sparcv9/fpu/s_llrint.S: Include
	<libm-alias-double.h>.
	(llrint): Define using libm_alias_double.
	* sysdeps/sparc/sparc32/sparcv9/fpu/s_nearbyint.S: Include
	<libm-alias-double.h>.
	(nearbyint): Define using libm_alias_double.
	* sysdeps/sparc/sparc32/sparcv9/fpu/s_rint.S: Include
	<libm-alias-double.h>.
	(rint): Define using libm_alias_double.
	* sysdeps/sparc/sparc64/fpu/multiarch/s_ceil.c: Include
	<libm-alias-double.h>.
	(ceil): Define using libm_alias_double.
	* sysdeps/sparc/sparc64/fpu/multiarch/s_floor.c: Include
	<libm-alias-double.h>.
	(floor): Define using libm_alias_double.
	* sysdeps/sparc/sparc64/fpu/multiarch/s_fma.c: Include
	<libm-alias-double.h>.
	(fma): Define using libm_alias_double.
	* sysdeps/sparc/sparc64/fpu/multiarch/s_lrint.c: Include
	<libm-alias-double.h>.
	(lrint): Define using libm_alias_double.
	(llrint): Likewise.
	* sysdeps/sparc/sparc64/fpu/multiarch/s_nearbyint.c: Include
	<libm-alias-double.h>.
	(nearbyint): Define using libm_alias_double.
	* sysdeps/sparc/sparc64/fpu/multiarch/s_rint.c: Include
	<libm-alias-double.h>.
	(rint): Define using libm_alias_double.
	* sysdeps/sparc/sparc64/fpu/multiarch/s_trunc.c: Include
	<libm-alias-double.h>.
	(trunc): Define using libm_alias_double.
	* sysdeps/sparc/sparc64/fpu/s_copysign.S: Include
	<libm-alias-double.h>.
	(copysign): Define using libm_alias_double.
	* sysdeps/sparc/sparc64/fpu/s_fabs.c: Include
	<libm-alias-double.h>.
	(fabs): Define using libm_alias_double.
	* sysdeps/sparc/sparc64/fpu/s_lrint.S: Include
	<libm-alias-double.h>.
	(lrint): Define using libm_alias_double.
	(llrint): Likewise.
	* sysdeps/sparc/sparc64/fpu/s_nearbyint.S: Include
	<libm-alias-double.h>.
	(nearbyint): Define using libm_alias_double.
	* sysdeps/sparc/sparc64/fpu/s_rint.S: Include
	<libm-alias-double.h>.
	(rint): Define using libm_alias_double.
Diffstat (limited to 'sysdeps/sparc/sparc32/sparcv9')
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysign.S6
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabs.S6
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdim.c6
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fma.c6
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrint.S7
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_nearbyint.S7
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rint.S7
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/s_fabs.S6
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/s_llrint.S7
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/s_nearbyint.S7
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/s_rint.S7
11 files changed, 22 insertions, 50 deletions
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysign.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysign.S
index 5d26430f70..affe541fae 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysign.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysign.S
@@ -1,12 +1,10 @@
 #include <sparc-ifunc.h>
 #include <math_ldbl_opt.h>
+#include <libm-alias-double.h>
 
 SPARC_ASM_VIS3_IFUNC(copysign)
 
-weak_alias (__copysign, copysign)
-#if LONG_DOUBLE_COMPAT (libm, GLIBC_2_0)
-compat_symbol (libm, __copysign, copysignl, GLIBC_2_0);
-#endif
+libm_alias_double (__copysign, copysign)
 #if LONG_DOUBLE_COMPAT (libc, GLIBC_2_0)
 compat_symbol (libc, __copysign, copysignl, GLIBC_2_0);
 #endif
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabs.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabs.S
index 72cc08fd66..642df18b3e 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabs.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabs.S
@@ -1,12 +1,10 @@
 #include <sparc-ifunc.h>
 #include <math_ldbl_opt.h>
+#include <libm-alias-double.h>
 
 SPARC_ASM_VIS3_IFUNC(fabs)
 
-weak_alias (__fabs, fabs)
-#if LONG_DOUBLE_COMPAT (libm, GLIBC_2_0)
-compat_symbol (libm, __fabs, fabsl, GLIBC_2_0);
-#endif
+libm_alias_double (__fabs, fabs)
 
 # undef weak_alias
 # define weak_alias(a, b)
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdim.c b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdim.c
index fe483f6406..c8e84fce9d 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdim.c
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdim.c
@@ -20,12 +20,10 @@
 #include <first-versions.h>
 #include <sparc-ifunc.h>
 #include <math.h>
+#include <libm-alias-double.h>
 
 extern double __fdim_vis3 (double, double);
 extern double __fdim_generic (double, double);
 
 sparc_libm_ifunc(__fdim, hwcap & HWCAP_SPARC_VIS3 ? __fdim_vis3 : __fdim_generic);
-weak_alias (__fdim, fdim)
-#if LONG_DOUBLE_COMPAT (libm, FIRST_VERSION_libm_fdiml)
-compat_symbol (libm, __fdim, fdiml, FIRST_VERSION_libm_fdiml);
-#endif
+libm_alias_double (__fdim, fdim)
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fma.c b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fma.c
index 3d0c1650cf..804272ff8e 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fma.c
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fma.c
@@ -1,12 +1,10 @@
 #include <sparc-ifunc.h>
 #include <math.h>
 #include <math_ldbl_opt.h>
+#include <libm-alias-double.h>
 
 extern double __fma_vis3 (double, double, double);
 extern double __fma_generic (double, double, double);
 
 sparc_libm_ifunc(__fma, hwcap & HWCAP_SPARC_FMAF ? __fma_vis3 : __fma_generic);
-weak_alias (__fma, fma)
-#if LONG_DOUBLE_COMPAT (libm, GLIBC_2_1)
-compat_symbol (libm, __fma, fmal, GLIBC_2_1);
-#endif
+libm_alias_double (__fma, fma)
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrint.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrint.S
index fd23041404..f7cf8780a4 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrint.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrint.S
@@ -1,17 +1,14 @@
 #include <sparc-ifunc.h>
 #include <math_ldbl_opt.h>
+#include <libm-alias-double.h>
 
 SPARC_ASM_VIS3_IFUNC(llrint)
 
-weak_alias (__llrint, llrint)
+libm_alias_double (__llrint, llrint)
 
 strong_alias (__llrint, __lllrint)
 weak_alias (__lllrint, lllrint)
 
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
-compat_symbol (libm, __llrint, llrintl, GLIBC_2_1)
-#endif
-
 # undef weak_alias
 # define weak_alias(a, b)
 # undef strong_alias
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_nearbyint.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_nearbyint.S
index 47da9eaafe..c39d0aee65 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_nearbyint.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_nearbyint.S
@@ -1,13 +1,10 @@
 #include <sparc-ifunc.h>
 #include <math_ldbl_opt.h>
+#include <libm-alias-double.h>
 
 SPARC_ASM_VIS3_IFUNC(nearbyint)
 
-weak_alias (__nearbyint, nearbyint)
-
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
-compat_symbol (libm, __nearbyint, nearbyintl, GLIBC_2_1)
-#endif
+libm_alias_double (__nearbyint, nearbyint)
 
 # undef weak_alias
 # define weak_alias(a, b)
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rint.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rint.S
index de893faebf..e6b8654776 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rint.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rint.S
@@ -1,13 +1,10 @@
 #include <sparc-ifunc.h>
 #include <math_ldbl_opt.h>
+#include <libm-alias-double.h>
 
 SPARC_ASM_VIS3_IFUNC(rint)
 
-weak_alias (__rint, rint)
-
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
-compat_symbol (libm, __rint, rintl, GLIBC_2_0)
-#endif
+libm_alias_double (__rint, rint)
 
 # undef weak_alias
 # define weak_alias(a, b)
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/s_fabs.S b/sysdeps/sparc/sparc32/sparcv9/fpu/s_fabs.S
index 716144630c..db84a5c66d 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/s_fabs.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/s_fabs.S
@@ -18,6 +18,7 @@
 
 #include <sysdep.h>
 #include <math_ldbl_opt.h>
+#include <libm-alias-double.h>
 
 ENTRY (__fabs)
 	st	%o0, [%sp+72]
@@ -26,7 +27,4 @@ ENTRY (__fabs)
 	retl
 	 fabsd	%f0, %f0
 END (__fabs)
-weak_alias (__fabs, fabs)
-#if LONG_DOUBLE_COMPAT (libm, GLIBC_2_0)
-compat_symbol (libm, __fabs, fabsl, GLIBC_2_0);
-#endif
+libm_alias_double (__fabs, fabs)
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/s_llrint.S b/sysdeps/sparc/sparc32/sparcv9/fpu/s_llrint.S
index 62bd9f50c7..edf7eafac5 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/s_llrint.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/s_llrint.S
@@ -19,6 +19,7 @@
 
 #include <sysdep.h>
 #include <math_ldbl_opt.h>
+#include <libm-alias-double.h>
 
 	/* We pop constants into the FPU registers using the incoming
 	   argument stack slots, since this avoid having to use any PIC
@@ -65,8 +66,4 @@ ENTRY (__llrint)
 	retl
 	 ldd	[%sp + 72], %o0
 END (__llrint)
-weak_alias (__llrint, llrint)
-
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
-compat_symbol (libm, __llrint, llrintl, GLIBC_2_1)
-#endif
+libm_alias_double (__llrint, llrint)
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/s_nearbyint.S b/sysdeps/sparc/sparc32/sparcv9/fpu/s_nearbyint.S
index c26d2e3e44..f1a4b1d2ea 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/s_nearbyint.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/s_nearbyint.S
@@ -21,6 +21,7 @@
 
 #include <sysdep.h>
 #include <math_ldbl_opt.h>
+#include <libm-alias-double.h>
 
 	/* We pop constants into the FPU registers using the incoming
 	   argument stack slots, since this avoid having to use any PIC
@@ -66,8 +67,4 @@ ENTRY (__nearbyint)
 	retl
 	 ld	[%sp + 88], %fsr
 END (__nearbyint)
-weak_alias (__nearbyint, nearbyint)
-
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
-compat_symbol (libm, __nearbyint, nearbyintl, GLIBC_2_1)
-#endif
+libm_alias_double (__nearbyint, nearbyint)
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/s_rint.S b/sysdeps/sparc/sparc32/sparcv9/fpu/s_rint.S
index f3560ccc79..64b78d3500 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/s_rint.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/s_rint.S
@@ -19,6 +19,7 @@
 
 #include <sysdep.h>
 #include <math_ldbl_opt.h>
+#include <libm-alias-double.h>
 
 	/* We pop constants into the FPU registers using the incoming
 	   argument stack slots, since this avoid having to use any PIC
@@ -62,8 +63,4 @@ ENTRY (__rint)
 	retl
 	 for	%f0, SIGN_BIT, %f0
 END (__rint)
-weak_alias (__rint, rint)
-
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
-compat_symbol (libm, __rint, rintl, GLIBC_2_0)
-#endif
+libm_alias_double (__rint, rint)