glibc/sysdeps/x86
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
..
bits Add <bits/indirect-return.h> 2018-07-24 07:55:47 -07:00
fpu Use round functions not __round functions in glibc libm. 2018-09-27 12:35:23 +00:00
nptl x86: Rename __glibc_reserved1 to feature_1 in tcbhead_t [BZ #22563] 2018-07-14 05:56:46 -07:00
__longjmp_cancel.S x86: Use pad in pthread_unwind_buf to preserve shadow stack register 2018-05-02 06:17:41 -07:00
cacheinfo.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
cet-tunables.h x86: Support IBT and SHSTK in Intel CET [BZ #21598] 2018-07-16 14:08:27 -07:00
check-cet.awk x86: Support IBT and SHSTK in Intel CET [BZ #21598] 2018-07-16 14:08:27 -07:00
configure x86: Support IBT and SHSTK in Intel CET [BZ #21598] 2018-07-16 14:08:27 -07:00
configure.ac x86: Support IBT and SHSTK in Intel CET [BZ #21598] 2018-07-16 14:08:27 -07:00
cpu-features-offsets.sym x86: Cleanup cpu-features-offsets.sym 2018-08-03 06:42:09 -07:00
cpu-features.c Rename the glibc.tune namespace to glibc.cpu 2018-08-02 23:49:19 +05:30
cpu-features.h Invert sense of list of i686-class processors in sysdeps/x86/cpu-features.h. 2018-09-20 12:43:41 +00:00
cpu-tunables.c Rename the glibc.tune namespace to glibc.cpu 2018-08-02 23:49:19 +05:30
dl-cet.c Rename the glibc.tune namespace to glibc.cpu 2018-08-02 23:49:19 +05:30
dl-get-cpu-features.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
dl-hwcap.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
dl-procinfo.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
dl-procinfo.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
dl-procruntime.c x86: Support IBT and SHSTK in Intel CET [BZ #21598] 2018-07-16 14:08:27 -07:00
dl-prop.h x86/CET: Fix property note parser [BZ #23467] 2018-07-30 16:15:38 -07:00
dl-tunables.list Rename the glibc.tune namespace to glibc.cpu 2018-08-02 23:49:19 +05:30
elide.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
float128-abi.h Add float128 support for x86_64, x86. 2017-06-26 22:02:24 +00:00
fpu_control.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
init-arch.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
jmp_buf-ssp.sym x86: Support shadow stack pointer in setjmp/longjmp 2018-07-14 05:59:53 -07:00
ldsodefs.h x86: Add sysdeps/x86/ldsodefs.h 2018-05-14 09:19:41 -07:00
libc-start.c x86/CET: Extend arch_prctl syscall for CET control 2018-07-24 12:23:17 -07:00
libc-start.h x86: Support IBT and SHSTK in Intel CET [BZ #21598] 2018-07-16 14:08:27 -07:00
link_map.h x86: Support IBT and SHSTK in Intel CET [BZ #21598] 2018-07-16 14:08:27 -07:00
linkmap.h Rename bits/linkmap.h to linkmap.h (bug 14912). 2015-09-04 19:44:27 +00:00
longjmp.c x86: Use pad in pthread_unwind_buf to preserve shadow stack register 2018-05-02 06:17:41 -07:00
Makeconfig Add _Float64x function aliases. 2017-11-27 14:16:47 +00:00
Makefile Rename the glibc.tune namespace to glibc.cpu 2018-08-02 23:49:19 +05:30
string_private.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
sysdep.h x86: Move STATE_SAVE_OFFSET/STATE_SAVE_MASK to sysdep.h 2018-08-06 06:25:43 -07:00
tininess.h Use sysdeps/x86/tininess.h for i386 and x86_64 2012-10-30 20:38:31 -07:00
tst-cet-legacy-1.c x86/CET: Add tests with legacy non-CET shared objects 2018-07-25 04:47:05 -07:00
tst-cet-legacy-2.c x86/CET: Add tests with legacy non-CET shared objects 2018-07-25 04:47:05 -07:00
tst-cet-legacy-2a.c x86/CET: Add tests with legacy non-CET shared objects 2018-07-25 04:47:05 -07:00
tst-cet-legacy-3.c x86/CET: Add tests with legacy non-CET shared objects 2018-07-25 04:47:05 -07:00
tst-cet-legacy-4.c x86/CET: Add tests with legacy non-CET shared objects 2018-07-25 04:47:05 -07:00
tst-cet-legacy-4a.c x86/CET: Add tests with legacy non-CET shared objects 2018-07-25 04:47:05 -07:00
tst-cet-legacy-4b.c x86/CET: Add tests with legacy non-CET shared objects 2018-07-25 04:47:05 -07:00
tst-cet-legacy-4c.c x86/CET: Add tests with legacy non-CET shared objects 2018-07-25 04:47:05 -07:00
tst-cet-legacy-mod-1.c x86/CET: Add tests with legacy non-CET shared objects 2018-07-25 04:47:05 -07:00
tst-cet-legacy-mod-2.c x86/CET: Add tests with legacy non-CET shared objects 2018-07-25 04:47:05 -07:00
tst-cet-legacy-mod-4.c x86/CET: Add tests with legacy non-CET shared objects 2018-07-25 04:47:05 -07:00
tst-get-cpu-features-static.c Add _dl_x86_cpu_features to rtld_global 2015-08-13 03:41:22 -07:00
tst-get-cpu-features.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
Versions Add _dl_x86_cpu_features to rtld_global 2015-08-13 03:41:22 -07:00