glibc/sysdeps/ieee754/ldbl-128
Joseph Myers 81dca813cc Use copysign functions not __copysign functions in glibc libm.
Continuing the move to use, within libm, public names for libm
functions that can be inlined as built-in functions on many
architectures, this patch moves calls to __copysign functions to call
the corresponding copysign names instead, with asm redirection to
__copysign when the calls are not inlined (all cases are inlined
except for IBM long double for powerpc soft-float / e500v1).  This
eliminates the need for an inline function defining __copysign in
terms of __builtin_copysign.

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

	* include/math.h [!_ISOMAC && !(__FINITE_MATH_ONLY__ &&
	__FINITE_MATH_ONLY__ > 0) && !NO_MATH_REDIRECT]
	(MATH_REDIRECT_BINARY_ARGS): New macro.
	[!_ISOMAC && !(__FINITE_MATH_ONLY__ && __FINITE_MATH_ONLY__ > 0)
	&& !NO_MATH_REDIRECT] (copysign): Redirect using MATH_REDIRECT.
	* sysdeps/alpha/fpu/s_copysign.c: Define NO_MATH_REDIRECT before
	header inclusion.
	* sysdeps/alpha/fpu/s_copysignf.c: Likewise.
	* sysdeps/ieee754/dbl-64/s_copysign.c: Likewise.
	* sysdeps/ieee754/float128/s_copysignf128.c: Likewise.
	* sysdeps/ieee754/flt-32/s_copysignf.c: Likewise.
	* sysdeps/ieee754/ldbl-128/s_copysignl.c: Likewise.
	* sysdeps/ieee754/ldbl-128ibm/s_copysignl.c: Likewise.
	* sysdeps/ieee754/ldbl-96/s_copysignl.c: Likewise.
	* sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_copysign.c:
	Likewise.
	* sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_copysignf.c:
	Likewise.
	* sysdeps/powerpc/powerpc64/fpu/multiarch/s_copysign.c: Likewise.
	* sysdeps/powerpc/powerpc64/fpu/multiarch/s_copysignf.c: Likewise.
	* sysdeps/riscv/rvd/s_copysign.c: Likewise.
	* sysdeps/riscv/rvf/s_copysignf.c: Likewise.
	* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysign.c:
	Likewise.
	* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysignf.c:
	Likewise.
	* sysdeps/generic/math_private_calls.h
	[!__MATH_DECLARING_LONG_DOUBLE || !NO_LONG_DOUBLE] (__copysign):
	Do not declare and define as an inline function.
	* math/divtc3.c (__divtc3): Use copysign functions instead of
	__copysign variants.
	* math/multc3.c (__multc3): Likewise.
	* sysdeps/generic/math-type-macros.h (M_COPYSIGN): Likewise.
	* sysdeps/ieee754/dbl-64/e_atan2.c (signArctan2): Likewise.
	* sysdeps/ieee754/dbl-64/e_atanh.c (__ieee754_atanh): Likewise.
	* sysdeps/ieee754/dbl-64/e_gamma_r.c (__ieee754_gamma_r):
	Likewise.
	* sysdeps/ieee754/dbl-64/e_jn.c (__ieee754_jn): Likewise.
	(__ieee754_yn): Likewise.
	* sysdeps/ieee754/dbl-64/s_asinh.c (__asinh): Likewise.
	* sysdeps/ieee754/dbl-64/s_atan.c (__signArctan): Likewise.
	* sysdeps/ieee754/dbl-64/s_scalbln.c (__scalbln): Likewise.
	* sysdeps/ieee754/dbl-64/s_scalbn.c (__scalbn): Likewise.
	* sysdeps/ieee754/dbl-64/s_sin.c (do_sin): Likewise.
	(__sin): Likewise.
	* sysdeps/ieee754/dbl-64/s_sincos.c (__sincos): Likewise.
	* sysdeps/ieee754/dbl-64/wordsize-64/s_nearbyint.c (__nearbyint):
	Likewise.
	* sysdeps/ieee754/dbl-64/wordsize-64/s_scalbln.c (__scalbln):
	Likewise.
	* sysdeps/ieee754/dbl-64/wordsize-64/s_scalbn.c (__scalbn):
	Likewise.
	* sysdeps/ieee754/flt-32/e_atanhf.c (__ieee754_atanhf): Likewise.
	* sysdeps/ieee754/flt-32/e_gammaf_r.c (__ieee754_gammaf_r):
	Likewise.
	* sysdeps/ieee754/flt-32/e_jnf.c (__ieee754_jnf): Likewise.
	(__ieee754_ynf): Likewise.
	* sysdeps/ieee754/flt-32/s_asinhf.c (__asinhf): Likewise.
	* sysdeps/ieee754/flt-32/s_scalbnf.c (__scalbnf): Likewise.
	* sysdeps/ieee754/k_standard.c (__kernel_standard): Likewise.
	* sysdeps/ieee754/ldbl-128/e_gammal_r.c (__ieee754_gammal_r):
	Likewise.
	* sysdeps/ieee754/ldbl-128/e_jnl.c (__ieee754_jnl): Likewise.
	(__ieee754_ynl): Likewise.
	* sysdeps/ieee754/ldbl-128/s_scalblnl.c (__scalblnl): Likewise.
	* sysdeps/ieee754/ldbl-128/s_scalbnl.c (__scalbnl): Likewise.
	* sysdeps/ieee754/ldbl-128ibm/e_gammal_r.c (__ieee754_gammal_r):
	Likewise.
	* sysdeps/ieee754/ldbl-128ibm/e_jnl.c (__ieee754_jnl): Likewise.
	(__ieee754_ynl): Likewise.
	* sysdeps/ieee754/ldbl-128ibm/s_fmal.c (__fmal): Likewise.
	* sysdeps/ieee754/ldbl-128ibm/s_scalblnl.c (__scalblnl): Likewise.
	* sysdeps/ieee754/ldbl-128ibm/s_scalbnl.c (__scalbnl): Likewise.
	* sysdeps/ieee754/ldbl-96/e_gammal_r.c (__ieee754_gammal_r):
	Likewise.
	* sysdeps/ieee754/ldbl-96/e_jnl.c (__ieee754_jnl): Likewise.
	(__ieee754_ynl)
	* sysdeps/ieee754/ldbl-96/s_asinhl.c (__asinhl): Likewise.
	* sysdeps/ieee754/ldbl-96/s_scalblnl.c (__scalblnl): Likewise.
	* sysdeps/ieee754/ldbl-opt/nldbl-copysign.c (copysignl): Likewise.
	* sysdeps/powerpc/power5+/fpu/s_modf.c (__modf): Likewise.
	* sysdeps/powerpc/power5+/fpu/s_modff.c (__modff): Likewise.
2018-09-27 20:04:48 +00:00
..
bits Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
Makeconfig Add _Float64x function aliases. 2017-11-27 14:16:47 +00:00
Makefile
e_acoshl.c Rename all __ieee754_sqrt(f/l) calls to sqrt(f/l) 2018-03-15 19:21:36 +00:00
e_acosl.c Rename all __ieee754_sqrt(f/l) calls to sqrt(f/l) 2018-03-15 19:21:36 +00:00
e_asinl.c Do not include math-barriers.h in math_private.h. 2018-05-11 15:11:38 +00:00
e_atan2l.c Consistently use uintN_t not u_intN_t in libm. 2017-08-03 19:55:04 +00:00
e_atanhl.c Move math_check_force_underflow macros to separate math-underflow.h. 2018-05-10 00:53:04 +00:00
e_coshl.c ldbl-128: Use L(x) macro for long double constants 2016-09-13 15:33:59 -05:00
e_exp10l.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
e_expl.c Move fenv.h soft-float inlines from fenv_private.h to include/fenv.h. 2018-09-04 19:52:06 +00:00
e_fmodl.c Consistently use uintN_t not u_intN_t in libm. 2017-08-03 19:55:04 +00:00
e_gammal_r.c Use copysign functions not __copysign functions in glibc libm. 2018-09-27 20:04:48 +00:00
e_hypotl.c Move math_check_force_underflow macros to separate math-underflow.h. 2018-05-10 00:53:04 +00:00
e_ilogbl.c ldbl-128: Rename 'long double' to '_Float128' 2016-08-31 10:38:11 -05:00
e_j0l.c Rename all __ieee754_sqrt(f/l) calls to sqrt(f/l) 2018-03-15 19:21:36 +00:00
e_j1l.c Do not include fenv_private.h in math_private.h. 2018-09-03 21:09:04 +00:00
e_jnl.c Use copysign functions not __copysign functions in glibc libm. 2018-09-27 20:04:48 +00:00
e_lgammal_r.c Use floor functions not __floor functions in glibc libm. 2018-09-14 13:09:01 +00:00
e_log2l.c Use fabs(f/l) rather than __fabs 2017-09-29 18:54:24 +01:00
e_log10l.c Use fabs(f/l) rather than __fabs 2017-09-29 18:54:24 +01:00
e_logl.c Remove unneeded declarations from math_private.h 2017-04-10 12:20:47 -03:00
e_powl.c Use floor functions not __floor functions in glibc libm. 2018-09-14 13:09:01 +00:00
e_rem_pio2l.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
e_remainderl.c Consistently use uintN_t not u_intN_t in libm. 2017-08-03 19:55:04 +00:00
e_sinhl.c Move math_check_force_underflow macros to separate math-underflow.h. 2018-05-10 00:53:04 +00:00
float128-abi.h Add _Float128 function aliases. 2017-10-18 17:37:18 +00:00
gamma_productl.c Do not include fenv_private.h in math_private.h. 2018-09-03 21:09:04 +00:00
ieee754.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
k_cosl.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
k_sincosl.c Move math_check_force_underflow macros to separate math-underflow.h. 2018-05-10 00:53:04 +00:00
k_sinl.c Move math_check_force_underflow macros to separate math-underflow.h. 2018-05-10 00:53:04 +00:00
k_tanl.c Move math_check_force_underflow macros to separate math-underflow.h. 2018-05-10 00:53:04 +00:00
ldbl2mpn.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
lgamma_negl.c Use floor functions not __floor functions in glibc libm. 2018-09-14 13:09:01 +00:00
lgamma_productl.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
math-nan-payload-ldouble.h math: Merge strtod_nan_*.h into math-type-macros-*.h 2018-05-16 06:03:08 +02:00
math_ldbl.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
mpn2ldbl.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
printf_fphex.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
printf_fphex_macros.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
s_asinhl.c Move math_check_force_underflow macros to separate math-underflow.h. 2018-05-10 00:53:04 +00:00
s_atanl.c Move math_check_force_underflow macros to separate math-underflow.h. 2018-05-10 00:53:04 +00:00
s_cbrtl.c Use libm_alias_ldouble for ldbl-128 functions. 2017-10-06 17:45:05 +00:00
s_ceill.c Use ceil functions not __ceil functions in glibc libm. 2018-09-17 20:42:06 +00:00
s_copysignl.c Use copysign functions not __copysign functions in glibc libm. 2018-09-27 20:04:48 +00:00
s_cosl.c Use libm_alias_ldouble for ldbl-128 functions. 2017-10-06 17:45:05 +00:00
s_daddl.c Add narrowing add functions. 2018-02-10 02:08:43 +00:00
s_ddivl.c Add narrowing divide functions. 2018-05-17 00:40:52 +00:00
s_dmull.c Add narrowing multiply functions. 2018-05-16 00:05:28 +00:00
s_dsubl.c Add narrowing subtract functions. 2018-03-20 00:34:52 +00:00
s_erfl.c Move math_check_force_underflow macros to separate math-underflow.h. 2018-05-10 00:53:04 +00:00
s_expm1l.c Use floor functions not __floor functions in glibc libm. 2018-09-14 13:09:01 +00:00
s_f64xaddf128.c Add narrowing add functions. 2018-02-10 02:08:43 +00:00
s_f64xdivf128.c Add narrowing divide functions. 2018-05-17 00:40:52 +00:00
s_f64xmulf128.c Add narrowing multiply functions. 2018-05-16 00:05:28 +00:00
s_f64xsubf128.c Add narrowing subtract functions. 2018-03-20 00:34:52 +00:00
s_fabsl.c Use libm_alias_ldouble for ldbl-128 functions. 2017-10-06 17:45:05 +00:00
s_faddl.c Add narrowing add functions. 2018-02-10 02:08:43 +00:00
s_fdivl.c Add narrowing divide functions. 2018-05-17 00:40:52 +00:00
s_finitel.c Consistently use uintN_t not u_intN_t in libm. 2017-08-03 19:55:04 +00:00
s_floorl.c Use floor functions not __floor functions in glibc libm. 2018-09-14 13:09:01 +00:00
s_fma.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
s_fmal.c Move fenv.h soft-float inlines from fenv_private.h to include/fenv.h. 2018-09-04 19:52:06 +00:00
s_fmull.c Add narrowing multiply functions. 2018-05-16 00:05:28 +00:00
s_fpclassifyl.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
s_frexpl.c Use libm_alias_ldouble for ldbl-128 functions. 2017-10-06 17:45:05 +00:00
s_fromfpl.c Use libm_alias_ldouble for ldbl-128 functions. 2017-10-06 17:45:05 +00:00
s_fromfpl_main.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
s_fromfpxl.c Use libm_alias_ldouble for ldbl-128 functions. 2017-10-06 17:45:05 +00:00
s_fsubl.c Add narrowing subtract functions. 2018-03-20 00:34:52 +00:00
s_getpayloadl.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
s_isinfl.c ldbl-128: Use mathx_hidden_def inplace of hidden_def 2017-05-04 14:47:27 -03:00
s_isnanl.c Consistently use uintN_t not u_intN_t in libm. 2017-08-03 19:55:04 +00:00
s_issignalingl.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
s_llrintl.c Move fenv.h soft-float inlines from fenv_private.h to include/fenv.h. 2018-09-04 19:52:06 +00:00
s_llroundl.c Move fenv.h soft-float inlines from fenv_private.h to include/fenv.h. 2018-09-04 19:52:06 +00:00
s_log1pl.c Move math_check_force_underflow macros to separate math-underflow.h. 2018-05-10 00:53:04 +00:00
s_logbl.c Use libm_alias_ldouble for ldbl-128 functions. 2017-10-06 17:45:05 +00:00
s_lrintl.c Move fenv.h soft-float inlines from fenv_private.h to include/fenv.h. 2018-09-04 19:52:06 +00:00
s_lroundl.c Move fenv.h soft-float inlines from fenv_private.h to include/fenv.h. 2018-09-04 19:52:06 +00:00
s_modfl.c Use libm_alias_ldouble for ldbl-128 functions. 2017-10-06 17:45:05 +00:00
s_nearbyintl.c Move fenv.h soft-float inlines from fenv_private.h to include/fenv.h. 2018-09-04 19:52:06 +00:00
s_nextafterl.c Do not include math-barriers.h in math_private.h. 2018-05-11 15:11:38 +00:00
s_nexttoward.c Do not include math-barriers.h in math_private.h. 2018-05-11 15:11:38 +00:00
s_nexttowardf.c Do not include math-barriers.h in math_private.h. 2018-05-11 15:11:38 +00:00
s_nextupl.c Move math_check_force_underflow macros to separate math-underflow.h. 2018-05-10 00:53:04 +00:00
s_remquol.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
s_rintl.c Use rint functions not __rint functions in glibc libm. 2018-09-14 13:10:39 +00:00
s_roundevenl.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
s_roundl.c Use round functions not __round functions in glibc libm. 2018-09-27 12:35:23 +00:00
s_scalblnl.c Use copysign functions not __copysign functions in glibc libm. 2018-09-27 20:04:48 +00:00
s_scalbnl.c Use copysign functions not __copysign functions in glibc libm. 2018-09-27 20:04:48 +00:00
s_setpayloadl.c Use libm_alias_ldouble for ldbl-128 functions. 2017-10-06 17:45:05 +00:00
s_setpayloadl_main.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
s_setpayloadsigl.c Use libm_alias_ldouble for ldbl-128 functions. 2017-10-06 17:45:05 +00:00
s_signbitl.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
s_sincosl.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
s_sinl.c Use libm_alias_ldouble for ldbl-128 functions. 2017-10-06 17:45:05 +00:00
s_tanhl.c Move math_check_force_underflow macros to separate math-underflow.h. 2018-05-10 00:53:04 +00:00
s_tanl.c Use libm_alias_ldouble for ldbl-128 functions. 2017-10-06 17:45:05 +00:00
s_totalorderl.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
s_totalordermagl.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
s_truncl.c Use trunc functions not __trunc functions in glibc libm. 2018-09-20 21:11:10 +00:00
s_ufromfpl.c Use libm_alias_ldouble for ldbl-128 functions. 2017-10-06 17:45:05 +00:00
s_ufromfpxl.c Use libm_alias_ldouble for ldbl-128 functions. 2017-10-06 17:45:05 +00:00
strtold_l.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
t_expl.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
t_sincosl.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
x2y2m1l.c Do not include fenv_private.h in math_private.h. 2018-09-03 21:09:04 +00:00