glibc/sysdeps
Aurelien Jarno 2cbec36566 SPARC: fix nearbyint on sNaN input
nearbyint and nearbyintf should not trigger inexact exceptions, but
should still trigger an invalid exception for a sNaN input.

The SPARC specific implementations of these functions save the FSR at
the beginning of the function and restore it at the end to not trigger
an inexact exception. This however doesn't work for an sNaN input which
need to trigger an invalid exception. Fix that by adding a fcmp
instruction using the input value before saving FSR, so that an invalid
exception is triggered for a sNaN input.

This fixes the math/test-nearbyint-except test on SPARC.

Changelog:
	* sparc/sparc32/sparcv9/fpu/s_nearbyint.S (__nearbyint): Trigger an
	invalid exception for a sNaN input.
	* sparc/sparc32/sparcv9/fpu/s_nearbyintf.S (__nearbyintf): Likewise.
	* sparc/sparc32/sparcv9/fpu/multiarch/s_nearbyint-vis3.S
	(__nearbyint_vis3): Likewise
	* sparc/sparc32/sparcv9/fpu/multiarch/s_nearbyintf-vis3.S
	(__nearbyintf_vis3): Likewise
	* sparc/sparc64/fpu/s_nearbyint.S (__nearbyint): Likewise.
	* sparc/sparc64/fpu/s_nearbyintf.S (__nearbyintf): Likewise.
	* sparc/sparc64/fpu/multiarch/s_nearbyint-vis3.S (__nearbyint_vis3):
	Likewise.
	* sparc/sparc64/fpu/multiarch/s_nearbyintf-vis3.S (__nearbyintf_vis3):
	Likewise.
2016-07-01 16:36:41 +02:00
..
aarch64 Remove atomic_compare_and_exchange_bool_rel. 2016-06-24 23:04:40 +03:00
alpha Remove atomic_compare_and_exchange_bool_rel. 2016-06-24 23:04:40 +03:00
arm Remove atomic_compare_and_exchange_bool_rel. 2016-06-24 23:04:40 +03:00
generic Move sysdeps/generic/bits/hwcap.h to top-level bits/ 2016-06-22 05:51:12 -07:00
gnu Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
hppa hppa: fix loading of global pointer in _start [BZ #20277] 2016-06-30 11:37:08 -04:00
i386 i686/multiarch: Regenerate ulps 2016-06-30 00:31:11 +02:00
ia64 elf: Consolidate machine-agnostic DTV definitions in <dl-dtv.h> 2016-06-20 14:31:40 +02:00
ieee754 Add nextup and nextdown math functions 2016-06-16 21:37:45 +05:30
init_array Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
m68k elf: Consolidate machine-agnostic DTV definitions in <dl-dtv.h> 2016-06-20 14:31:40 +02:00
mach elf: Consolidate machine-agnostic DTV definitions in <dl-dtv.h> 2016-06-20 14:31:40 +02:00
microblaze Remove atomic_compare_and_exchange_bool_rel. 2016-06-24 23:04:40 +03:00
mips MIPS: run tst-mode-switch-{1,2,3}.c using test-skeleton.c 2016-06-27 23:57:40 +02:00
nacl Add nextup and nextdown math functions 2016-06-16 21:37:45 +05:30
nios2 elf: Consolidate machine-agnostic DTV definitions in <dl-dtv.h> 2016-06-20 14:31:40 +02:00
nptl Increase fork signal safety for single-threaded processes [BZ #19703] 2016-05-12 15:26:55 +02:00
posix getaddrinfo: Convert from extend_alloca to struct scratch_buffer 2016-05-12 14:07:56 +02:00
powerpc powerpc: Add a POWER8-optimized version of sinf() 2016-06-30 16:08:49 -03:00
pthread Revert "aio: fix newp->running data race" 2016-05-04 15:52:30 +02:00
s390 elf: Consolidate machine-agnostic DTV definitions in <dl-dtv.h> 2016-06-20 14:31:40 +02:00
sh elf: Consolidate machine-agnostic DTV definitions in <dl-dtv.h> 2016-06-20 14:31:40 +02:00
sparc SPARC: fix nearbyint on sNaN input 2016-07-01 16:36:41 +02:00
tile Remove atomic_compare_and_exchange_bool_rel. 2016-06-24 23:04:40 +03:00
unix SPARC64: update localplt.data 2016-07-01 11:09:38 +02:00
wordsize-32 Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
wordsize-64 Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
x86 Fixed wrong vector sincos/sincosf ABI to have it compatible with 2016-07-01 14:15:38 +03:00
x86_64 Require binutils 2.24 to build x86-64 glibc [BZ #20139] 2016-07-01 06:03:05 -07:00