aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/x86_64
diff options
context:
space:
mode:
authorWilco Dijkstra <Wilco.Dijkstra@arm.com>2019-07-16 12:17:22 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2020-01-03 10:02:04 -0300
commit220622dde5704c95a100c2792a280f18f3deba73 (patch)
treefbf0df37c2671a9bc21a200bd2f587fc5e4cbe2b /sysdeps/x86_64
parentcf4dfd461725b6dbe6f27fbd16913f2c6c5cf7c5 (diff)
downloadglibc-220622dde5704c95a100c2792a280f18f3deba73.tar
glibc-220622dde5704c95a100c2792a280f18f3deba73.tar.gz
glibc-220622dde5704c95a100c2792a280f18f3deba73.tar.bz2
glibc-220622dde5704c95a100c2792a280f18f3deba73.zip
Add libm_alias_finite for _finite symbols
This patch adds a new macro, libm_alias_finite, to define all _finite symbol. It sets all _finite symbol as compat symbol based on its first version (obtained from the definition at built generated first-versions.h). The <fn>f128_finite symbols were introduced in GLIBC 2.26 and so need special treatment in code that is shared between long double and float128. It is done by adding a list, similar to internal symbol redifinition, on sysdeps/ieee754/float128/float128_private.h. Alpha also needs some tricky changes to ensure we still emit 2 compat symbols for sqrt(f). Passes buildmanyglibc. Co-authored-by: Adhemerval Zanella <adhemerval.zanella@linaro.org> Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
Diffstat (limited to 'sysdeps/x86_64')
-rw-r--r--sysdeps/x86_64/fpu/e_exp2l.S3
-rw-r--r--sysdeps/x86_64/fpu/e_expl.S6
-rw-r--r--sysdeps/x86_64/fpu/e_fmodl.S3
-rw-r--r--sysdeps/x86_64/fpu/e_log10l.S2
-rw-r--r--sysdeps/x86_64/fpu/e_log2l.S2
-rw-r--r--sysdeps/x86_64/fpu/e_logl.S3
-rw-r--r--sysdeps/x86_64/fpu/e_powl.S3
-rw-r--r--sysdeps/x86_64/fpu/e_remainderl.S3
-rw-r--r--sysdeps/x86_64/fpu/e_scalbl.S3
-rw-r--r--sysdeps/x86_64/fpu/e_sqrt.c3
-rw-r--r--sysdeps/x86_64/fpu/e_sqrtf.c3
-rw-r--r--sysdeps/x86_64/fpu/multiarch/e_asin.c7
-rw-r--r--sysdeps/x86_64/fpu/multiarch/e_atan2.c4
-rw-r--r--sysdeps/x86_64/fpu/multiarch/e_exp.c3
-rw-r--r--sysdeps/x86_64/fpu/multiarch/e_exp2f.c6
-rw-r--r--sysdeps/x86_64/fpu/multiarch/e_expf.c6
-rw-r--r--sysdeps/x86_64/fpu/multiarch/e_log.c3
-rw-r--r--sysdeps/x86_64/fpu/multiarch/e_log2f.c6
-rw-r--r--sysdeps/x86_64/fpu/multiarch/e_logf.c6
-rw-r--r--sysdeps/x86_64/fpu/multiarch/e_pow.c3
-rw-r--r--sysdeps/x86_64/fpu/multiarch/e_powf.c6
21 files changed, 53 insertions, 31 deletions
diff --git a/sysdeps/x86_64/fpu/e_exp2l.S b/sysdeps/x86_64/fpu/e_exp2l.S
index 0e059b7565..f16760840b 100644
--- a/sysdeps/x86_64/fpu/e_exp2l.S
+++ b/sysdeps/x86_64/fpu/e_exp2l.S
@@ -7,6 +7,7 @@
#include <machine/asm.h>
#include <x86_64-math-asm.h>
+#include <libm-alias-finite.h>
DEFINE_LDBL_MIN
@@ -55,4 +56,4 @@ ENTRY(__ieee754_exp2l)
fldz /* Set result to 0. */
2: ret
END (__ieee754_exp2l)
-strong_alias (__ieee754_exp2l, __exp2l_finite)
+libm_alias_finite (__ieee754_exp2l, __exp2l)
diff --git a/sysdeps/x86_64/fpu/e_expl.S b/sysdeps/x86_64/fpu/e_expl.S
index b75a103803..9835ac2a3b 100644
--- a/sysdeps/x86_64/fpu/e_expl.S
+++ b/sysdeps/x86_64/fpu/e_expl.S
@@ -25,6 +25,7 @@
#include <libm-alias-ldouble.h>
#include <machine/asm.h>
#include <x86_64-math-asm.h>
+#include <libm-alias-finite.h>
#ifdef USE_AS_EXP10L
# define IEEE754_EXPL __ieee754_exp10l
@@ -212,9 +213,12 @@ ENTRY(IEEE754_EXPL)
fadd %st
ret
END(IEEE754_EXPL)
+
#ifdef USE_AS_EXPM1L
libm_hidden_def (__expm1l)
libm_alias_ldouble (__expm1, expm1)
+#elif defined USE_AS_EXP10L
+libm_alias_finite (__ieee754_exp10l, __exp10l)
#else
-strong_alias (IEEE754_EXPL, EXPL_FINITE)
+libm_alias_finite (__ieee754_expl, __expl)
#endif
diff --git a/sysdeps/x86_64/fpu/e_fmodl.S b/sysdeps/x86_64/fpu/e_fmodl.S
index 07c50df8d1..a06ad6833b 100644
--- a/sysdeps/x86_64/fpu/e_fmodl.S
+++ b/sysdeps/x86_64/fpu/e_fmodl.S
@@ -7,6 +7,7 @@
*/
#include <machine/asm.h>
+#include <libm-alias-finite.h>
RCSID("$NetBSD: $")
@@ -20,4 +21,4 @@ ENTRY(__ieee754_fmodl)
fstp %st(1)
ret
END (__ieee754_fmodl)
-strong_alias (__ieee754_fmodl, __fmodl_finite)
+libm_alias_finite (__ieee754_fmodl, __fmodl)
diff --git a/sysdeps/x86_64/fpu/e_log10l.S b/sysdeps/x86_64/fpu/e_log10l.S
index e0cb88e32e..552bc00ad0 100644
--- a/sysdeps/x86_64/fpu/e_log10l.S
+++ b/sysdeps/x86_64/fpu/e_log10l.S
@@ -9,6 +9,7 @@
*/
#include <machine/asm.h>
+#include <libm-alias-finite.h>
.section .rodata.cst8,"aM",@progbits,8
@@ -90,3 +91,4 @@ ENTRY(__log10l_finite)
fyl2xp1 // log10(x)
ret
END(__log10l_finite)
+libm_alias_finite (__log10l_finite, __log10l)
diff --git a/sysdeps/x86_64/fpu/e_log2l.S b/sysdeps/x86_64/fpu/e_log2l.S
index 023ec29164..1459cef3d7 100644
--- a/sysdeps/x86_64/fpu/e_log2l.S
+++ b/sysdeps/x86_64/fpu/e_log2l.S
@@ -8,6 +8,7 @@
*/
#include <machine/asm.h>
+#include <libm-alias-finite.h>
.section .rodata.cst8,"aM",@progbits,8
@@ -89,3 +90,4 @@ ENTRY(__log2l_finite)
fyl2xp1 // log(x)
ret
END (__log2l_finite)
+libm_alias_finite (__log2l_finite, __log2l)
diff --git a/sysdeps/x86_64/fpu/e_logl.S b/sysdeps/x86_64/fpu/e_logl.S
index 0d3576f48b..37cd5b6ae9 100644
--- a/sysdeps/x86_64/fpu/e_logl.S
+++ b/sysdeps/x86_64/fpu/e_logl.S
@@ -7,7 +7,7 @@
*/
#include <machine/asm.h>
-
+#include <libm-alias-finite.h>
.section .rodata.cst8,"aM",@progbits,8
@@ -92,3 +92,4 @@ ENTRY(__logl_finite)
fyl2xp1 // log(x)
ret
END (__logl_finite)
+libm_alias_finite (__logl_finite, __logl)
diff --git a/sysdeps/x86_64/fpu/e_powl.S b/sysdeps/x86_64/fpu/e_powl.S
index dd84af5ac5..e88570cda4 100644
--- a/sysdeps/x86_64/fpu/e_powl.S
+++ b/sysdeps/x86_64/fpu/e_powl.S
@@ -19,6 +19,7 @@
#include <machine/asm.h>
#include <x86_64-math-asm.h>
+#include <libm-alias-finite.h>
.section .rodata.cst8,"aM",@progbits,8
@@ -430,4 +431,4 @@ ENTRY(__ieee754_powl)
ret
END(__ieee754_powl)
-strong_alias (__ieee754_powl, __powl_finite)
+libm_alias_finite (__ieee754_powl, __powl)
diff --git a/sysdeps/x86_64/fpu/e_remainderl.S b/sysdeps/x86_64/fpu/e_remainderl.S
index 4ee0910912..994bfb3e80 100644
--- a/sysdeps/x86_64/fpu/e_remainderl.S
+++ b/sysdeps/x86_64/fpu/e_remainderl.S
@@ -7,6 +7,7 @@
*/
#include <machine/asm.h>
+#include <libm-alias-finite.h>
ENTRY(__ieee754_remainderl)
fldt 24(%rsp)
@@ -18,4 +19,4 @@ ENTRY(__ieee754_remainderl)
fstp %st(1)
ret
END (__ieee754_remainderl)
-strong_alias (__ieee754_remainderl, __remainderl_finite)
+libm_alias_finite (__ieee754_remainderl, __remainderl)
diff --git a/sysdeps/x86_64/fpu/e_scalbl.S b/sysdeps/x86_64/fpu/e_scalbl.S
index 2982dc3b9e..c13cba4b13 100644
--- a/sysdeps/x86_64/fpu/e_scalbl.S
+++ b/sysdeps/x86_64/fpu/e_scalbl.S
@@ -9,6 +9,7 @@
*/
#include <machine/asm.h>
+#include <libm-alias-finite.h>
.section .rodata
@@ -86,4 +87,4 @@ ENTRY(__ieee754_scalbl)
fdiv %st
ret
END(__ieee754_scalbl)
-strong_alias (__ieee754_scalbl, __scalbl_finite)
+libm_alias_finite (__ieee754_scalbl, __scalbl)
diff --git a/sysdeps/x86_64/fpu/e_sqrt.c b/sysdeps/x86_64/fpu/e_sqrt.c
index 7b62c80626..c1708f9b65 100644
--- a/sysdeps/x86_64/fpu/e_sqrt.c
+++ b/sysdeps/x86_64/fpu/e_sqrt.c
@@ -17,6 +17,7 @@
<https://www.gnu.org/licenses/>. */
#include <math_private.h>
+#include <libm-alias-finite.h>
#undef __ieee754_sqrt
double
@@ -28,4 +29,4 @@ __ieee754_sqrt (double x)
return res;
}
-strong_alias (__ieee754_sqrt, __sqrt_finite)
+libm_alias_finite (__ieee754_sqrt, __sqrt)
diff --git a/sysdeps/x86_64/fpu/e_sqrtf.c b/sysdeps/x86_64/fpu/e_sqrtf.c
index 2002250184..6155c7be24 100644
--- a/sysdeps/x86_64/fpu/e_sqrtf.c
+++ b/sysdeps/x86_64/fpu/e_sqrtf.c
@@ -17,6 +17,7 @@
<https://www.gnu.org/licenses/>. */
#include <math_private.h>
+#include <libm-alias-finite.h>
#undef __ieee754_sqrtf
float
@@ -28,4 +29,4 @@ __ieee754_sqrtf (float x)
return res;
}
-strong_alias (__ieee754_sqrtf, __sqrtf_finite)
+libm_alias_finite (__ieee754_sqrtf, __sqrtf)
diff --git a/sysdeps/x86_64/fpu/multiarch/e_asin.c b/sysdeps/x86_64/fpu/multiarch/e_asin.c
index bcd4a973d6..7cdb069e65 100644
--- a/sysdeps/x86_64/fpu/multiarch/e_asin.c
+++ b/sysdeps/x86_64/fpu/multiarch/e_asin.c
@@ -16,6 +16,8 @@
License along with the GNU C Library; if not, see
<https://www.gnu.org/licenses/>. */
+#include <libm-alias-finite.h>
+
extern double __redirect_ieee754_asin (double);
extern double __redirect_ieee754_acos (double);
@@ -24,7 +26,7 @@ extern double __redirect_ieee754_acos (double);
libc_ifunc_redirected (__redirect_ieee754_asin, __ieee754_asin,
IFUNC_SELECTOR ());
-strong_alias (__ieee754_asin, __asin_finite)
+libm_alias_finite (__ieee754_asin, __asin)
#undef SYMBOL_NAME
#define SYMBOL_NAME ieee754_acos
@@ -32,8 +34,7 @@ strong_alias (__ieee754_asin, __asin_finite)
libc_ifunc_redirected (__redirect_ieee754_acos, __ieee754_acos,
IFUNC_SELECTOR ());
-strong_alias (__ieee754_acos, __acos_finite)
-
+libm_alias_finite (__ieee754_acos, __acos)
#define __ieee754_acos __ieee754_acos_sse2
#define __ieee754_asin __ieee754_asin_sse2
diff --git a/sysdeps/x86_64/fpu/multiarch/e_atan2.c b/sysdeps/x86_64/fpu/multiarch/e_atan2.c
index dfd9b4eede..f06e980b1c 100644
--- a/sysdeps/x86_64/fpu/multiarch/e_atan2.c
+++ b/sysdeps/x86_64/fpu/multiarch/e_atan2.c
@@ -16,6 +16,8 @@
License along with the GNU C Library; if not, see
<https://www.gnu.org/licenses/>. */
+#include <libm-alias-finite.h>
+
extern double __redirect_ieee754_atan2 (double, double);
#define SYMBOL_NAME ieee754_atan2
@@ -23,7 +25,7 @@ extern double __redirect_ieee754_atan2 (double, double);
libc_ifunc_redirected (__redirect_ieee754_atan2,
__ieee754_atan2, IFUNC_SELECTOR ());
-strong_alias (__ieee754_atan2, __atan2_finite)
+libm_alias_finite (__ieee754_atan2, __atan2)
#define __ieee754_atan2 __ieee754_atan2_sse2
#include <sysdeps/ieee754/dbl-64/e_atan2.c>
diff --git a/sysdeps/x86_64/fpu/multiarch/e_exp.c b/sysdeps/x86_64/fpu/multiarch/e_exp.c
index 9193e8bcdf..5979909a02 100644
--- a/sysdeps/x86_64/fpu/multiarch/e_exp.c
+++ b/sysdeps/x86_64/fpu/multiarch/e_exp.c
@@ -17,6 +17,7 @@
<https://www.gnu.org/licenses/>. */
#include <math.h>
+#include <libm-alias-finite.h>
extern double __redirect_ieee754_exp (double);
@@ -25,7 +26,7 @@ extern double __redirect_ieee754_exp (double);
libc_ifunc_redirected (__redirect_ieee754_exp, __ieee754_exp,
IFUNC_SELECTOR ());
-strong_alias (__ieee754_exp, __exp_finite)
+libm_alias_finite (__ieee754_exp, __exp)
#define __exp __ieee754_exp_sse2
#include <sysdeps/ieee754/dbl-64/e_exp.c>
diff --git a/sysdeps/x86_64/fpu/multiarch/e_exp2f.c b/sysdeps/x86_64/fpu/multiarch/e_exp2f.c
index 3a90f5cd2d..ea4ae72318 100644
--- a/sysdeps/x86_64/fpu/multiarch/e_exp2f.c
+++ b/sysdeps/x86_64/fpu/multiarch/e_exp2f.c
@@ -17,6 +17,7 @@
<https://www.gnu.org/licenses/>. */
#include <libm-alias-float.h>
+#include <libm-alias-finite.h>
extern float __redirect_exp2f (float);
@@ -26,15 +27,14 @@ extern float __redirect_exp2f (float);
libc_ifunc_redirected (__redirect_exp2f, __exp2f, IFUNC_SELECTOR ());
#ifdef SHARED
-# include <shlib-compat.h>
-versioned_symbol (libm, __exp2f, exp2f, GLIBC_2_27);
+versioned_symbol (libm, __ieee754_exp2f, exp2f, GLIBC_2_27);
libm_alias_float_other (__exp2, exp2)
#else
libm_alias_float (__exp2, exp2)
#endif
strong_alias (__exp2f, __ieee754_exp2f)
-strong_alias (__exp2f, __exp2f_finite)
+libm_alias_finite (__exp2f, __exp2f)
#define __exp2f __exp2f_sse2
#include <sysdeps/ieee754/flt-32/e_exp2f.c>
diff --git a/sysdeps/x86_64/fpu/multiarch/e_expf.c b/sysdeps/x86_64/fpu/multiarch/e_expf.c
index 4ccee5bf13..f685f31089 100644
--- a/sysdeps/x86_64/fpu/multiarch/e_expf.c
+++ b/sysdeps/x86_64/fpu/multiarch/e_expf.c
@@ -17,6 +17,7 @@
<https://www.gnu.org/licenses/>. */
#include <libm-alias-float.h>
+#include <libm-alias-finite.h>
extern float __redirect_expf (float);
@@ -29,15 +30,14 @@ libc_ifunc_redirected (__redirect_expf, __expf, IFUNC_SELECTOR ());
__hidden_ver1 (__expf, __GI___expf, __redirect_expf)
__attribute__ ((visibility ("hidden")));
-# include <shlib-compat.h>
-versioned_symbol (libm, __expf, expf, GLIBC_2_27);
+versioned_symbol (libm, __ieee754_expf, expf, GLIBC_2_27);
libm_alias_float_other (__exp, exp)
#else
libm_alias_float (__exp, exp)
#endif
strong_alias (__expf, __ieee754_expf)
-strong_alias (__expf, __expf_finite)
+libm_alias_finite (__expf, __expf)
#define __expf __expf_sse2
#include <sysdeps/ieee754/flt-32/e_expf.c>
diff --git a/sysdeps/x86_64/fpu/multiarch/e_log.c b/sysdeps/x86_64/fpu/multiarch/e_log.c
index 14c9a94510..81348627c2 100644
--- a/sysdeps/x86_64/fpu/multiarch/e_log.c
+++ b/sysdeps/x86_64/fpu/multiarch/e_log.c
@@ -17,6 +17,7 @@
<https://www.gnu.org/licenses/>. */
#include <math.h>
+#include <libm-alias-finite.h>
extern double __redirect_ieee754_log (double);
@@ -25,7 +26,7 @@ extern double __redirect_ieee754_log (double);
libc_ifunc_redirected (__redirect_ieee754_log, __ieee754_log,
IFUNC_SELECTOR ());
-strong_alias (__ieee754_log, __log_finite)
+libm_alias_finite (__ieee754_log, __log)
#define __log __ieee754_log_sse2
#include <sysdeps/ieee754/dbl-64/e_log.c>
diff --git a/sysdeps/x86_64/fpu/multiarch/e_log2f.c b/sysdeps/x86_64/fpu/multiarch/e_log2f.c
index 53f3d2ffc5..8410cbee0e 100644
--- a/sysdeps/x86_64/fpu/multiarch/e_log2f.c
+++ b/sysdeps/x86_64/fpu/multiarch/e_log2f.c
@@ -17,6 +17,7 @@
<https://www.gnu.org/licenses/>. */
#include <libm-alias-float.h>
+#include <libm-alias-finite.h>
extern float __redirect_log2f (float);
@@ -29,15 +30,14 @@ libc_ifunc_redirected (__redirect_log2f, __log2f, IFUNC_SELECTOR ());
__hidden_ver1 (__log2f, __GI___log2f, __redirect_log2f)
__attribute__ ((visibility ("hidden")));
-# include <shlib-compat.h>
-versioned_symbol (libm, __log2f, log2f, GLIBC_2_27);
+versioned_symbol (libm, __ieee754_log2f, log2f, GLIBC_2_27);
libm_alias_float_other (__log2, log2)
#else
libm_alias_float (__log2, log2)
#endif
strong_alias (__log2f, __ieee754_log2f)
-strong_alias (__log2f, __log2f_finite)
+libm_alias_finite (__log2f, __log2f)
#define __log2f __log2f_sse2
#include <sysdeps/ieee754/flt-32/e_log2f.c>
diff --git a/sysdeps/x86_64/fpu/multiarch/e_logf.c b/sysdeps/x86_64/fpu/multiarch/e_logf.c
index c03cc9464d..71faa7c587 100644
--- a/sysdeps/x86_64/fpu/multiarch/e_logf.c
+++ b/sysdeps/x86_64/fpu/multiarch/e_logf.c
@@ -17,6 +17,7 @@
<https://www.gnu.org/licenses/>. */
#include <libm-alias-float.h>
+#include <libm-alias-finite.h>
extern float __redirect_logf (float);
@@ -29,15 +30,14 @@ libc_ifunc_redirected (__redirect_logf, __logf, IFUNC_SELECTOR ());
__hidden_ver1 (__logf, __GI___logf, __redirect_logf)
__attribute__ ((visibility ("hidden")));
-# include <shlib-compat.h>
-versioned_symbol (libm, __logf, logf, GLIBC_2_27);
+versioned_symbol (libm, __ieee754_logf, logf, GLIBC_2_27);
libm_alias_float_other (__log, log)
#else
libm_alias_float (__log, log)
#endif
strong_alias (__logf, __ieee754_logf)
-strong_alias (__logf, __logf_finite)
+libm_alias_finite (__logf, __logf)
#define __logf __logf_sse2
#include <sysdeps/ieee754/flt-32/e_logf.c>
diff --git a/sysdeps/x86_64/fpu/multiarch/e_pow.c b/sysdeps/x86_64/fpu/multiarch/e_pow.c
index 6636c75c2e..c96aedd9d6 100644
--- a/sysdeps/x86_64/fpu/multiarch/e_pow.c
+++ b/sysdeps/x86_64/fpu/multiarch/e_pow.c
@@ -17,6 +17,7 @@
<https://www.gnu.org/licenses/>. */
#include <math.h>
+#include <libm-alias-finite.h>
extern double __redirect_ieee754_pow (double, double);
@@ -25,7 +26,7 @@ extern double __redirect_ieee754_pow (double, double);
libc_ifunc_redirected (__redirect_ieee754_pow,
__ieee754_pow, IFUNC_SELECTOR ());
-strong_alias (__ieee754_pow, __pow_finite)
+libm_alias_finite (__ieee754_pow, __pow)
#define __pow __ieee754_pow_sse2
#include <sysdeps/ieee754/dbl-64/e_pow.c>
diff --git a/sysdeps/x86_64/fpu/multiarch/e_powf.c b/sysdeps/x86_64/fpu/multiarch/e_powf.c
index d83585bfdd..c5bd42b099 100644
--- a/sysdeps/x86_64/fpu/multiarch/e_powf.c
+++ b/sysdeps/x86_64/fpu/multiarch/e_powf.c
@@ -17,6 +17,7 @@
<https://www.gnu.org/licenses/>. */
#include <libm-alias-float.h>
+#include <libm-alias-finite.h>
#define powf __redirect_powf
#define __DECL_SIMD___redirect_powf
@@ -32,15 +33,14 @@ libc_ifunc_redirected (__redirect_powf, __powf, IFUNC_SELECTOR ());
__hidden_ver1 (__powf, __GI___powf, __redirect_powf)
__attribute__ ((visibility ("hidden")));
-# include <shlib-compat.h>
-versioned_symbol (libm, __powf, powf, GLIBC_2_27);
+versioned_symbol (libm, __ieee754_powf, powf, GLIBC_2_27);
libm_alias_float_other (__pow, pow)
#else
libm_alias_float (__pow, pow)
#endif
strong_alias (__powf, __ieee754_powf)
-strong_alias (__powf, __powf_finite)
+libm_alias_finite (__powf, __powf)
#define __powf __powf_sse2
#include <sysdeps/ieee754/flt-32/e_powf.c>