glibc/sysdeps/aarch64/fpu
Adhemerval Zanella 58a813bf6e aarch64: Fix f{max,min}{f} build for GCC 4.9 and 5
GCC 4.9 and 5 do not generate a correct f{max,min}nm instruction for
__builtin_{fmax,fmin}{f} without -ffinite-math-only.  It is clear a
compiler issue since the instruction can handle NaN and Inf correctly
and GCC6+ does not show this issue.

We can backport a fix to GCC 5, raise the minimum required GCC version
for aarch64 (since GCC 4.9 branch is now closed [1]) and/or add
configure check to check for this issue.  However I think
-ffinite-math-only should be safe for these specific implementations
and it is a simpler solution.

Checked on aarch64-linux-gnu with GCC 5.3.1.

	* sysdeps/aarch64/fpu/Makefile (CFLAGS-s_fmax.c, CFLAGS-s_fmaxf.c,
	CFLAGS-s_fmin.c, CFLAGS-s_fminf.c): New rule: add -ffinite-math-only.

[1] https://gcc.gnu.org/ml/gcc/2016-08/msg00010.html

Signed-off-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Reviewed-by: Szabolcs Nagy <szabolcs.nagy@arm.com>
2017-11-17 09:23:07 -02:00
..
e_sqrt.c aarch64: Implement math acceleration via builtins 2017-10-23 10:32:56 +01:00
e_sqrtf.c aarch64: Implement math acceleration via builtins 2017-10-23 10:32:56 +01:00
fclrexcpt.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
fedisblxcpt.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
feenablxcpt.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
fegetenv.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
fegetexcept.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
fegetmode.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
fegetround.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
feholdexcpt.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
fesetenv.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
fesetexcept.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
fesetmode.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
fesetround.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
feupdateenv.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
fgetexcptflg.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
fpu_control.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
fraiseexcpt.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
fsetexcptflg.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
ftestexcept.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
get-rounding-mode.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
Makefile aarch64: Fix f{max,min}{f} build for GCC 4.9 and 5 2017-11-17 09:23:07 -02:00
math_private.h Optimized generic expf and exp2f with wrappers 2017-09-25 10:44:39 +01:00
s_ceil.c aarch64: Implement math acceleration via builtins 2017-10-23 10:32:56 +01:00
s_ceilf.c aarch64: Implement math acceleration via builtins 2017-10-23 10:32:56 +01:00
s_floor.c aarch64: Implement math acceleration via builtins 2017-10-23 10:32:56 +01:00
s_floorf.c aarch64: Implement math acceleration via builtins 2017-10-23 10:32:56 +01:00
s_fma.c aarch64: Implement math acceleration via builtins 2017-10-23 10:32:56 +01:00
s_fmaf.c aarch64: Implement math acceleration via builtins 2017-10-23 10:32:56 +01:00
s_fmax.c aarch64: Implement math acceleration via builtins 2017-10-23 10:32:56 +01:00
s_fmaxf.c aarch64: Implement math acceleration via builtins 2017-10-23 10:32:56 +01:00
s_fmin.c aarch64: Implement math acceleration via builtins 2017-10-23 10:32:56 +01:00
s_fminf.c aarch64: Implement math acceleration via builtins 2017-10-23 10:32:56 +01:00
s_llrint.c aarch64: Implement math acceleration via builtins 2017-10-23 10:32:56 +01:00
s_llrintf.c aarch64: Implement math acceleration via builtins 2017-10-23 10:32:56 +01:00
s_llround.c aarch64: Implement math acceleration via builtins 2017-10-23 10:32:56 +01:00
s_llroundf.c aarch64: Implement math acceleration via builtins 2017-10-23 10:32:56 +01:00
s_lrint.c aarch64: Implement math acceleration via builtins 2017-10-23 10:32:56 +01:00
s_lrintf.c aarch64: Implement math acceleration via builtins 2017-10-23 10:32:56 +01:00
s_lround.c aarch64: Implement math acceleration via builtins 2017-10-23 10:32:56 +01:00
s_lroundf.c aarch64: Implement math acceleration via builtins 2017-10-23 10:32:56 +01:00
s_nearbyint.c aarch64: Implement math acceleration via builtins 2017-10-23 10:32:56 +01:00
s_nearbyintf.c aarch64: Implement math acceleration via builtins 2017-10-23 10:32:56 +01:00
s_rint.c aarch64: Implement math acceleration via builtins 2017-10-23 10:32:56 +01:00
s_rintf.c aarch64: Implement math acceleration via builtins 2017-10-23 10:32:56 +01:00
s_round.c aarch64: Implement math acceleration via builtins 2017-10-23 10:32:56 +01:00
s_roundf.c aarch64: Implement math acceleration via builtins 2017-10-23 10:32:56 +01:00
s_trunc.c aarch64: Implement math acceleration via builtins 2017-10-23 10:32:56 +01:00
s_truncf.c aarch64: Implement math acceleration via builtins 2017-10-23 10:32:56 +01:00