glibc/sysdeps/powerpc/powerpc32/fpu
Adhemerval Zanella ae45cf84af powerpc: trunc/truncf refactor
This patches consolidates all the powerpc trunc{f} implementations on
the generic sysdeps/powerpc/fpu/s_trunc{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/trunc_to_integer.h (set_fenv_mode): Add
	 TRUNC handling.
	(round_mode): Add definition for TRUNC.
	* sysdeps/powerpc/fpu/s_trunc.c: New file.
	* sysdeps/powerpc/fpu/s_truncf.c: New file.
	* sysdeps/powerpc/powerpc32/fpu/s_trunc.S: Remove file.
	* sysdeps/powerpc/powerpc32/fpu/s_truncf.S: Likewise.
	* sysdep/powerpc/powepc32/power4/fpu/multiarch/s_trunc-power5+.S:
	Likewise.
	* sysdep/powerpc/powepc32/power4/fpu/multiarch/s_trunc-ppc32.S:
	Likewise.
	* sysdep/powerpc/powepc32/power4/fpu/multiarch/s_truncf-power5+.S:
	Likewise.
	* sysdep/powerpc/powepc32/power4/fpu/multiarch/s_truncf-ppc32.S:
	Likewise.
	* sysdep/powerpc/powepc32/power4/fpu/multiarch/s_trunc-power5+.c: New
	file.
	* sysdep/powerpc/powepc32/power4/fpu/multiarch/s_trunc-ppc32.c:
	Likewise.
	* sysdep/powerpc/powepc32/power4/fpu/multiarch/s_truncf-power5+.c:
	Likewise.
	* sysdep/powerpc/powepc32/power4/fpu/multiarch/s_truncf-ppc32.c:
	Likewise.
	* sysdep/powerpc/powerpc32/power5+/fpu/s_trunc.S: Remove file.
	* sysdep/powerpc/powerpc32/power5+/fpu/s_truncf.S: Likewise.
	* sysdep/powerpc/powerpc64/be/fpu/multiarch/Makefile
	(libm-sysdep_routines): Add s_trunc-power5+, s_trunc-ppc64,
	s_truncf-power5+, and s_truncf-ppc64.
	(CFLAGS-s_trunc-power5+.c, CFLAGS-s_truncf-power5+.c): New rule.
	* sysdep/powerpc/powercp64/be/fpu/multiarch/s_trunc-power5+.c: New
	file.
	* sysdep/powerpc/powercp64/be/fpu/multiarch/s_trunc-ppc64.c: Likewise.
	* sysdeps/powerpc/powerpc64/fpu/multiarch/s_trunc.c: Move to ...
	* sysdeps/powerpc/powerpc64/be/fpu/multiarch/s_trunc.c: ... here.
	* sysdep/powerpc/powercp64/be/fpu/multiarch/s_truncf-power5+.c: New
	file.
	* sysdep/powerpc/powercp64/be/fpu/multiarch/s_truncf-ppc64.c:
	Likewise.
	* sysdeps/powerpc/powerpc64/fpu/multiarch/s_truncf.c: Move to ...
	* sysdeps/powerpc/powerpc64/be/fpu/multiarch/s_truncf.c: ... here.
	* sysdeps/powerpc/powerpc64/fpu/multiarch/Makefile
	(libm-sysdep_routines): Remove s_trunc-power5+, s_trunc-ppc64,
	s_truncf-power5+, and s_truncf-ppc64.
	* sysdep/powerpc/powerpc64/fpu/multiarch/s_trunc-power5+.S: Remove
	file.
	* sysdep/powerpc/powerpc64/fpu/multiarch/s_trunc-ppc64.S: Likewise.
	* sysdep/powerpc/powerpc64/fpu/multiarch/s_truncf-power5+.S:
	Likewise.
	* sysdep/powerpc/powerpc64/fpu/multiarch/s_truncf-ppc64.S: Likewise.
	* sysdeps/powerpc/powerpc64/fpu/s_trunc.S: Likewise.
	* sysdeps/powerpc/powerpc64/fpu/s_truncf.S: Likewise.
	* sysdep/powerpc/powerpc64/power5+/fpu/s_trunc.S: Likewise.
	* sysdep/powerpc/powerpc64/power5+/fpu/s_truncf.S: Likewise.

Reviewed-by: Gabriel F. T. Gomes <gabriel@inconstante.eti.br>
2019-05-09 09:39:28 -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
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