about summary refs log tree commit diff
path: root/sysdeps/powerpc/fpu
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2017-12-01 22:23:28 +0000
committerJoseph Myers <joseph@codesourcery.com>2017-12-01 22:23:28 +0000
commitec2cf3f4445af7d729308350edf1e890eeebdd1d (patch)
treea5e44c3ef01d513ecabb158e1408e1cbb124d08a /sysdeps/powerpc/fpu
parent15e84c63c05e0652047ba5e738c54d79d62ba74b (diff)
downloadglibc-ec2cf3f4445af7d729308350edf1e890eeebdd1d.tar.gz
glibc-ec2cf3f4445af7d729308350edf1e890eeebdd1d.tar.xz
glibc-ec2cf3f4445af7d729308350edf1e890eeebdd1d.zip
Use libm_alias_double for powerpc fabs, fma.
Continuing the preparation for additional _FloatN / _FloatNx function
aliases, this patch makes powerpc fabs and fma use libm_alias_double
to define function aliases.  This brings in automatic symbol
versioning compat handling, so the powerpc32 and powerpc64 wrappers
that added such handling to the generic sysdeps/powerpc/fpu versions
are removed as no longer required (there are no sysdeps directory
ordering issues that would necessitate keeping trivial wrappers
there).

Tested with build-many-glibcs.py that installed stripped shared
libraries are unchanged for all its hard-float powerpc configurations.

	* sysdeps/powerpc/fpu/s_fabs.S: Include <libm-alias-double.h>.
	(fabs): Define using libm_alias_double.
	* sysdeps/powerpc/fpu/s_fma.S: Include <libm-alias-double.h>.
	(fma): Define using libm_alias_double.
	* sysdeps/powerpc/powerpc32/fpu/s_fabs.S: Remove file.
	* sysdeps/powerpc/powerpc32/fpu/s_fma.S: Likewise.
	* sysdeps/powerpc/powerpc64/fpu/s_fabs.S: Likewise.
	* sysdeps/powerpc/powerpc64/fpu/s_fma.S: Likewise.
Diffstat (limited to 'sysdeps/powerpc/fpu')
-rw-r--r--sysdeps/powerpc/fpu/s_fabs.S8
-rw-r--r--sysdeps/powerpc/fpu/s_fma.S8
2 files changed, 4 insertions, 12 deletions
diff --git a/sysdeps/powerpc/fpu/s_fabs.S b/sysdeps/powerpc/fpu/s_fabs.S
index 87dc82eb28..68f8801427 100644
--- a/sysdeps/powerpc/fpu/s_fabs.S
+++ b/sysdeps/powerpc/fpu/s_fabs.S
@@ -17,6 +17,7 @@
    <http://www.gnu.org/licenses/>.  */
 
 #include <sysdep.h>
+#include <libm-alias-double.h>
 
 ENTRY(__fabs)
 /* double [f1] fabs (double [f1] x); */
@@ -24,13 +25,8 @@ ENTRY(__fabs)
 	blr
 END(__fabs)
 
-weak_alias (__fabs,fabs)
+libm_alias_double (__fabs, fabs)
 
 /* It turns out that it's safe to use this code even for single-precision.  */
 strong_alias(__fabs,__fabsf)
 weak_alias (__fabs,fabsf)
-
-#ifdef NO_LONG_DOUBLE
-weak_alias (__fabs,__fabsl)
-weak_alias (__fabs,fabsl)
-#endif
diff --git a/sysdeps/powerpc/fpu/s_fma.S b/sysdeps/powerpc/fpu/s_fma.S
index 19d2717f51..8a1a8e5780 100644
--- a/sysdeps/powerpc/fpu/s_fma.S
+++ b/sysdeps/powerpc/fpu/s_fma.S
@@ -17,6 +17,7 @@
    <http://www.gnu.org/licenses/>.  */
 
 #include <sysdep.h>
+#include <libm-alias-double.h>
 
 ENTRY_TOCLESS(__fma)
 /* double [f1] fma (double [f1] x, double [f2] y, double [f3] z); */
@@ -24,9 +25,4 @@ ENTRY_TOCLESS(__fma)
 	blr
 END(__fma)
 
-weak_alias (__fma,fma)
-
-#ifdef NO_LONG_DOUBLE
-weak_alias (__fma,__fmal)
-weak_alias (__fma,fmal)
-#endif
+libm_alias_double (__fma, fma)