glibc/sysdeps/sparc/sparc32/sparcv9/fpu
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
..
multiarch SPARC: fix nearbyint on sNaN input 2016-07-01 16:36:41 +02:00
s_ceil.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
s_ceilf.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
s_fabs.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
s_fdim.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
s_fdimf.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
s_floor.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
s_floorf.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
s_fmax.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
s_fmaxf.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
s_fmin.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
s_fminf.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
s_isnan.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
s_llrint.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
s_llrintf.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
s_lrint.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
s_lrintf.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
s_nearbyint.S SPARC: fix nearbyint on sNaN input 2016-07-01 16:36:41 +02:00
s_nearbyintf.S SPARC: fix nearbyint on sNaN input 2016-07-01 16:36:41 +02:00
s_rint.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
s_rintf.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
s_trunc.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
s_truncf.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
w_sqrt.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
w_sqrtf.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00