glibc/sysdeps/powerpc/powerpc32/fpu
Adhemerval Zanella a1cb1888b7 powerpc: round/roundf refactor
This patches consolidates all the powerpc round{f} implementations on
the generic sysdeps/powerpc/fpu/s_round{f}.  The generic implementation
uses either the compiler builts for ISA 2.03+ (which generates the
frim instruction) or a generic implementation which uses FP only
operations.

The IFUNC organization for powerpc64 is also change to be enabled only
for powerpc64 and not for powerpc64le (since minium ISA of 2.08 does not
require the fallback generic implementation).

Checked on powerpc-linux-gnu (built without --with-cpu, with
--with-cpu=power4 and with --with-cpu=power5+ and --disable-multi-arch),
powerpc64-linux-gnu (built without --with-cp and with --with-cpu=power5+
and --disable-multi-arch).

	* sysdeps/powerpc/fpu/round_to_integer.h (set_fenv_mode): Add
	ROUND handling.
	(round_mode): Add definition for ROUND.
	(round_to_integer_float): Likewise.
	* sysdeps/powerpc/fpu/s_round.c: New file.
	* sysdeps/powerpc/fpu/s_roundf.c: New file.
	* sysdeps/powerpc/powerpc32/fpu/s_round.S: Remove file.
	* sysdeps/powerpc/powerpc32/fpu/s_roundf.S: Likewise.
	* sysdep/powerpc/powepc32/power4/fpu/multiarch/s_round-power5+.S:
	Likewise.
	* sysdep/powerpc/powepc32/power4/fpu/multiarch/s_round-ppc32.S:
	Likewise.
	* sysdep/powerpc/powepc32/power4/fpu/multiarch/s_roundf-power5+.S:
	Likewise.
	* sysdep/powerpc/powepc32/power4/fpu/multiarch/s_roundf-ppc32.S:
	Likewise.
	* sysdep/powerpc/powepc32/power4/fpu/multiarch/s_round-power5+.c: New
	file.
	* sysdep/powerpc/powepc32/power4/fpu/multiarch/s_round-ppc32.c:
	Likewise.
	* sysdep/powerpc/powepc32/power4/fpu/multiarch/s_roundf-power5+.c:
	Likewise.
	* sysdep/powerpc/powepc32/power4/fpu/multiarch/s_roundf-ppc32.c:
	Likewise.
	* sysdep/powerpc/powerpc32/power5+/fpu/s_round.S: Remove file.
	* sysdep/powerpc/powerpc32/power5+/fpu/s_roundf.S: Likewise.
	* sysdep/powerpc/powerpc64/be/fpu/multiarch/Makefile
	(libm-sysdep_routines): Add s_round-power5+, s_round-ppc64,
	s_roundf-power5+, and s_roundf-ppc64.
	(CFLAGS-s_round-power5+.c, CFLAGS-s_roundf-power5+.c): New rule.
	* sysdep/powerpc/powercp64/be/fpu/multiarch/s_round-power5+.c: New
	file.
	* sysdep/powerpc/powercp64/be/fpu/multiarch/s_round-ppc64.c: Likewise.
	* sysdeps/powerpc/powerpc64/fpu/multiarch/s_round.c: Move to ...
	* sysdeps/powerpc/powerpc64/be/fpu/multiarch/s_round.c: ... here.
	* sysdep/powerpc/powercp64/be/fpu/multiarch/s_roundf-power5+.c: New
	file.
	* sysdep/powerpc/powercp64/be/fpu/multiarch/s_roundf-ppc64.c:
	Likewise.
	* sysdeps/powerpc/powerpc64/fpu/multiarch/s_roundf.c: Move to ...
	* sysdeps/powerpc/powerpc64/be/fpu/multiarch/s_roundf.c: ... here.
	* sysdeps/powerpc/powerpc64/fpu/multiarch/Makefile
	(libm-sysdep_routines): Remove s_round-power5+, s_round-ppc64,
	s_roundf-power5+, and s_roundf-ppc64.
	* sysdep/powerpc/powerpc64/fpu/multiarch/s_round-power5+.S: Remove
	file.
	* sysdep/powerpc/powerpc64/fpu/multiarch/s_round-ppc64.S: Likewise.
	* sysdep/powerpc/powerpc64/fpu/multiarch/s_roundf-power5+.S:
	Likewise.
	* sysdep/powerpc/powerpc64/fpu/multiarch/s_roundf-ppc64.S: Likewise.
	* sysdeps/powerpc/powerpc64/fpu/s_round.S: Likewise.
	* sysdeps/powerpc/powerpc64/fpu/s_roundf.S: Likewise.
	* sysdep/powerpc/powerpc64/power5+/fpu/s_round.S: Likewise.
	* sysdep/powerpc/powerpc64/power5+/fpu/s_roundf.S: Likewise.

Reviewed-by: Gabriel F. T. Gomes <gabriel@inconstante.eti.br>
2019-05-09 09:39:07 -03:00
..
__longjmp-common.S Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
__longjmp.S Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
configure Fix powerpc32 llrint, llrintf bad exceptions (bug 16422). 2015-10-13 00:52:54 +00:00
configure.ac Fix powerpc32 llrint, llrintf bad exceptions (bug 16422). 2015-10-13 00:52:54 +00:00
fix-int-fp-convert-zero.h Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
fprrest.S Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
fprsave.S Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
Makefile Update. 2002-09-05 10:28:51 +00:00
s_copysign.S Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
s_copysignf.S Update. 2002-09-05 10:28:51 +00:00
s_copysignl.S Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
s_fabsl.S Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
s_isnan.S Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
s_llrint.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
s_llrintf.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
s_llround.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
s_llroundf.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
s_lrint.S Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
s_lround.S Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
s_lroundf.S * include/features.h (__GLIBC_MINOR__): Bump to 8. 2008-04-11 17:33:24 +00:00
s_nearbyint.S Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
s_nearbyintf.S Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
s_rint.S Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
s_rintf.S Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
s_trunc.S Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
s_truncf.S Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
setjmp-common.S Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
setjmp.S Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00