glibc/sysdeps/ieee754/flt-32
Joseph Myers 9755bc4686 Use round functions not __round 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 __round functions to call the
corresponding round names instead, with asm redirection to __round
when the calls are not inlined.

An additional complication arises in
sysdeps/ieee754/ldbl-128ibm/e_expl.c, where a call to roundl, with the
result converted to int, gets converted by the compiler to call
lroundl in the case of 32-bit long, so resulting in localplt test
failures.  It's logically correct to let the compiler make such an
optimization; an appropriate asm redirection of lroundl to __lroundl
is thus added to that file (it's not needed anywhere else).

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

	* include/math.h [!_ISOMAC && !(__FINITE_MATH_ONLY__ &&
	__FINITE_MATH_ONLY__ > 0) && !NO_MATH_REDIRECT] (round): Redirect
	using MATH_REDIRECT.
	* sysdeps/aarch64/fpu/s_round.c: Define NO_MATH_REDIRECT before
	header inclusion.
	* sysdeps/aarch64/fpu/s_roundf.c: Likewise.
	* sysdeps/ieee754/dbl-64/s_round.c: Likewise.
	* sysdeps/ieee754/dbl-64/wordsize-64/s_round.c: Likewise.
	* sysdeps/ieee754/float128/s_roundf128.c: Likewise.
	* sysdeps/ieee754/flt-32/s_roundf.c: Likewise.
	* sysdeps/ieee754/ldbl-128/s_roundl.c: Likewise.
	* sysdeps/ieee754/ldbl-96/s_roundl.c: Likewise.
	* sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_round.c: Likewise.
	* sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_roundf.c: Likewise.
	* sysdeps/powerpc/powerpc64/fpu/multiarch/s_round.c: Likewise.
	* sysdeps/powerpc/powerpc64/fpu/multiarch/s_roundf.c: Likewise.
	* sysdeps/riscv/rv64/rvd/s_round.c: Likewise.
	* sysdeps/riscv/rvf/s_roundf.c: Likewise.
	* sysdeps/ieee754/ldbl-128ibm/s_roundl.c: Likewise.
	(round): Redirect to __round.
	(__roundl): Call round instead of __round.
	* sysdeps/powerpc/fpu/math_private.h [_ARCH_PWR5X] (__round):
	Remove macro.
	[_ARCH_PWR5X] (__roundf): Likewise.
	* sysdeps/ieee754/dbl-64/e_gamma_r.c (gamma_positive): Use round
	functions instead of __round variants.
	* sysdeps/ieee754/flt-32/e_gammaf_r.c (gammaf_positive): Likewise.
	* sysdeps/ieee754/ldbl-128/e_gammal_r.c (gammal_positive):
	Likewise.
	* sysdeps/ieee754/ldbl-128ibm/e_gammal_r.c (gammal_positive):
	Likewise.
	* sysdeps/ieee754/ldbl-96/e_gammal_r.c (gammal_positive):
	Likewise.
	* sysdeps/x86/fpu/powl_helper.c (__powl_helper): Likewise.
	* sysdeps/ieee754/ldbl-128ibm/e_expl.c (lroundl): Redirect to
	__lroundl.
	(__ieee754_expl): Call roundl instead of __roundl.
2018-09-27 12:35:23 +00:00
..
e_acosf.c Rename all __ieee754_sqrt(f/l) calls to sqrt(f/l) 2018-03-15 19:21:36 +00:00
e_acoshf.c Rename all __ieee754_sqrt(f/l) calls to sqrt(f/l) 2018-03-15 19:21:36 +00:00
e_asinf.c Move math_check_force_underflow macros to separate math-underflow.h. 2018-05-10 00:53:04 +00:00
e_atan2f.c Consistently use uintN_t not u_intN_t in libm. 2017-08-03 19:55:04 +00:00
e_atanhf.c Do not include math-barriers.h in math_private.h. 2018-05-11 15:11:38 +00:00
e_coshf.c Move math_narrow_eval to separate math-narrow-eval.h. 2018-05-09 00:15:10 +00:00
e_exp2f.c Move math_narrow_eval to separate math-narrow-eval.h. 2018-05-09 00:15:10 +00:00
e_exp2f_data.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
e_expf.c Clean up converttoint handling and document the semantics 2018-08-10 17:23:16 +01:00
e_fmodf.c Consistently use uintN_t not u_intN_t in libm. 2017-08-03 19:55:04 +00:00
e_gammaf_r.c Use round functions not __round functions in glibc libm. 2018-09-27 12:35:23 +00:00
e_hypotf.c Rename all __ieee754_sqrt(f/l) calls to sqrt(f/l) 2018-03-15 19:21:36 +00:00
e_ilogbf.c
e_j0f.c Do not include math-barriers.h in math_private.h. 2018-05-11 15:11:38 +00:00
e_j1f.c Do not include fenv_private.h in math_private.h. 2018-09-03 21:09:04 +00:00
e_jnf.c Do not include fenv_private.h in math_private.h. 2018-09-03 21:09:04 +00:00
e_lgammaf_r.c Use floor functions not __floor functions in glibc libm. 2018-09-14 13:09:01 +00:00
e_log2f.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
e_log2f_data.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
e_log10f.c Use fabs(f/l) rather than __fabs 2017-09-29 18:54:24 +01:00
e_logf.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
e_logf_data.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
e_powf.c Fix the documentation comment of checkint in powf 2018-09-19 10:13:20 +01:00
e_powf_log2_data.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
e_remainderf.c Consistently use uintN_t not u_intN_t in libm. 2017-08-03 19:55:04 +00:00
e_sinhf.c Move math_check_force_underflow macros to separate math-underflow.h. 2018-05-10 00:53:04 +00:00
e_sqrtf.c Consistently use uintN_t not u_intN_t in libm. 2017-08-03 19:55:04 +00:00
k_tanf.c Move math_check_force_underflow macros to separate math-underflow.h. 2018-05-10 00:53:04 +00:00
lgamma_negf.c Use floor functions not __floor functions in glibc libm. 2018-09-14 13:09:01 +00:00
lgamma_productf.c Fix lgamma (negative) inaccuracy (bug 2542, bug 2543, bug 2558). 2015-09-10 22:27:58 +00:00
math_config.h Clean up converttoint handling and document the semantics 2018-08-10 17:23:16 +01:00
math_errf.c Use uint32_t sign in single precision math error handling functions 2018-07-02 09:29:04 +01:00
mpn2flt.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
s_asinhf.c Move math_check_force_underflow macros to separate math-underflow.h. 2018-05-10 00:53:04 +00:00
s_atanf.c Move math_check_force_underflow macros to separate math-underflow.h. 2018-05-10 00:53:04 +00:00
s_cbrtf.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
s_ceilf.c Use ceil functions not __ceil functions in glibc libm. 2018-09-17 20:42:06 +00:00
s_copysignf.c Use libm_alias_float in flt-32. 2017-09-22 20:24:12 +00:00
s_cosf.c Improve performance of sinf and cosf 2018-08-14 10:45:59 +01:00
s_erff.c Move math_check_force_underflow macros to separate math-underflow.h. 2018-05-10 00:53:04 +00:00
s_expm1f.c Do not include math-barriers.h in math_private.h. 2018-05-11 15:11:38 +00:00
s_fabsf.c Use libm_alias_float in flt-32. 2017-09-22 20:24:12 +00:00
s_finitef.c Consistently use uintN_t not u_intN_t in libm. 2017-08-03 19:55:04 +00:00
s_floorf.c Use floor functions not __floor functions in glibc libm. 2018-09-14 13:09:01 +00:00
s_fpclassifyf.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
s_frexpf.c Use libm_alias_float in flt-32. 2017-09-22 20:24:12 +00:00
s_fromfpf.c Use libm_alias_float in flt-32. 2017-09-22 20:24:12 +00:00
s_fromfpf_main.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
s_fromfpxf.c Use libm_alias_float in flt-32. 2017-09-22 20:24:12 +00:00
s_getpayloadf.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
s_isinff.c
s_isnanf.c Consistently use uintN_t not u_intN_t in libm. 2017-08-03 19:55:04 +00:00
s_issignalingf.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
s_llrintf.c Move fenv.h soft-float inlines from fenv_private.h to include/fenv.h. 2018-09-04 19:52:06 +00:00
s_llroundf.c Move fenv.h soft-float inlines from fenv_private.h to include/fenv.h. 2018-09-04 19:52:06 +00:00
s_log1pf.c Do not include math-barriers.h in math_private.h. 2018-05-11 15:11:38 +00:00
s_logbf.c Use libm_alias_float in flt-32. 2017-09-22 20:24:12 +00:00
s_lrintf.c Move fenv.h soft-float inlines from fenv_private.h to include/fenv.h. 2018-09-04 19:52:06 +00:00
s_lroundf.c Move fenv.h soft-float inlines from fenv_private.h to include/fenv.h. 2018-09-04 19:52:06 +00:00
s_modff.c Use libm_alias_float in flt-32. 2017-09-22 20:24:12 +00:00
s_nearbyintf.c Do not include fenv_private.h in math_private.h. 2018-09-03 21:09:04 +00:00
s_nextafterf.c Do not include math-barriers.h in math_private.h. 2018-05-11 15:11:38 +00:00
s_nextupf.c Move math_check_force_underflow macros to separate math-underflow.h. 2018-05-10 00:53:04 +00:00
s_remquof.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
s_rintf.c Use rint functions not __rint functions in glibc libm. 2018-09-14 13:10:39 +00:00
s_roundevenf.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
s_roundf.c Use round functions not __round functions in glibc libm. 2018-09-27 12:35:23 +00:00
s_scalblnf.c [BZ #6803] Set errno for scalbln, scalbn 2014-06-20 07:48:20 +05:30
s_scalbnf.c Make scalbn set errno (bug 6803). 2015-09-16 21:11:00 +00:00
s_setpayloadf.c Use libm_alias_float in flt-32. 2017-09-22 20:24:12 +00:00
s_setpayloadf_main.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
s_setpayloadsigf.c Use libm_alias_float in flt-32. 2017-09-22 20:24:12 +00:00
s_signbitf.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
s_sincosf.c Improve performance of sincosf 2018-08-10 17:34:39 +01:00
s_sincosf.h Improve performance of sinf and cosf 2018-08-14 10:45:59 +01:00
s_sincosf_data.c Improve performance of sincosf 2018-08-10 17:34:39 +01:00
s_sinf.c Improve performance of sinf and cosf 2018-08-14 10:45:59 +01:00
s_tanf.c Speedup tanf range reduction 2018-08-23 12:38:16 +01:00
s_tanhf.c Move math_check_force_underflow macros to separate math-underflow.h. 2018-05-10 00:53:04 +00:00
s_totalorderf.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
s_totalordermagf.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
s_truncf.c Use trunc functions not __trunc functions in glibc libm. 2018-09-20 21:11:10 +00:00
s_ufromfpf.c Use libm_alias_float in flt-32. 2017-09-22 20:24:12 +00:00
s_ufromfpxf.c Use libm_alias_float in flt-32. 2017-09-22 20:24:12 +00:00
w_exp2f.c Do not wrap expf and exp2f 2017-10-02 14:38:54 +01:00
w_expf.c Do not wrap expf and exp2f 2017-10-02 14:38:54 +01:00
w_log2f.c Do not wrap logf, log2f and powf 2017-10-02 14:39:38 +01:00
w_logf.c Do not wrap logf, log2f and powf 2017-10-02 14:39:38 +01:00
w_powf.c Do not wrap logf, log2f and powf 2017-10-02 14:39:38 +01:00