about summary refs log tree commit diff
path: root/sysdeps/ieee754/dbl-64/s_tan.c
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2017-10-02 20:20:52 +0000
committerJoseph Myers <joseph@codesourcery.com>2017-10-02 20:20:52 +0000
commit527cd19c3d39288ae170fe09de87c05a27f4e12b (patch)
tree69fff3a2dca2c69df65eff598d6a963de0a079ac /sysdeps/ieee754/dbl-64/s_tan.c
parentbdc5c59214a9e4bd9a299deead29c04ddf141256 (diff)
downloadglibc-527cd19c3d39288ae170fe09de87c05a27f4e12b.tar.gz
glibc-527cd19c3d39288ae170fe09de87c05a27f4e12b.tar.xz
glibc-527cd19c3d39288ae170fe09de87c05a27f4e12b.zip
Make dbl-64 atan and tan into weak aliases.
This patch converts the dbl-64 implementations of atan and tan into
weak aliases of __atan and __tan, in preparation for making them use
libm_alias_double.  Consequent changes are made to the x86_64
multiarch versions wrapping round them (with the dbl-64 functions,
like other such functions, being made not to define their aliases at
all if __atan or __tan are defined as macros by an including file).

Tested for x86_64, and with build-many-glibcs.py.

	* sysdeps/ieee754/dbl-64/s_atan.c (atan): Rename to __atan and
	define as weak alias of __atan.  Do not define any aliases if
	[__atan].
	[NO_LONG_DOUBLE] (__atanl): Define as strong alias of __atan.
	[NO_LONG_DOUBLE] (atanl): Define as weak alias of __atanl.
	* sysdeps/ieee754/dbl-64/s_tan.c (tan): Rename to __tan and define
	as weak alias of __tan.  Do not define any aliases if [__tan].
	[NO_LONG_DOUBLE] (__tanl): Define as strong alias of __tan.
	[NO_LONG_DOUBLE] (tanl): Define as weak alias of __tanl.
	* sysdeps/x86_64/fpu/multiarch/s_atan-avx.c (atan): Rename to
	__atan.
	* sysdeps/x86_64/fpu/multiarch/s_atan-fma.c (atan): Likewise.
	* sysdeps/x86_64/fpu/multiarch/s_atan-fma4.c (atan): Likewise.
	* sysdeps/x86_64/fpu/multiarch/s_atan.c (atan): Rename to __atan
	and define as weak alias of __atan.
	* sysdeps/x86_64/fpu/multiarch/s_tan-avx.c (tan): Rename to
	__atan.
	* sysdeps/x86_64/fpu/multiarch/s_tan-fma.c (tan): Likewise.
	* sysdeps/x86_64/fpu/multiarch/s_tan-fma4.c (tan): Likewise.
	* sysdeps/x86_64/fpu/multiarch/s_tan.c (tan): Rename to __tan and
	define as weak alias of __tan.
Diffstat (limited to 'sysdeps/ieee754/dbl-64/s_tan.c')
-rw-r--r--sysdeps/ieee754/dbl-64/s_tan.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/sysdeps/ieee754/dbl-64/s_tan.c b/sysdeps/ieee754/dbl-64/s_tan.c
index b2a8681a6d..feec826237 100644
--- a/sysdeps/ieee754/dbl-64/s_tan.c
+++ b/sysdeps/ieee754/dbl-64/s_tan.c
@@ -53,7 +53,7 @@ void __mptan (double, mp_no *, int);
 
 double
 SECTION
-tan (double x)
+__tan (double x)
 {
 #include "utan.h"
 #include "utan.tbl"
@@ -843,6 +843,10 @@ tanMp (double x)
   return y;
 }
 
-#ifdef NO_LONG_DOUBLE
-weak_alias (tan, tanl)
+#ifndef __tan
+weak_alias (__tan, tan)
+# ifdef NO_LONG_DOUBLE
+strong_alias (__tan, __tanl)
+weak_alias (__tanl, tanl)
+# endif
 #endif