glibc/sysdeps
Joseph Myers 76c96cf7ec Fix MIPS libc_feresetround*_ctx to preserve exceptions.
Testing on mips64 showed missing underflow exceptions (from exp, for
example) in non-default rounding modes, caused by
libc_feresetround*_ctx wrongly restoring a saved environment without
preserving exceptions, when that's only valid for the _noex variants.
(I don't know why Steve didn't see this in his testing.)  This patch
fixes this by using libc_feupdateenv_mips_ctx for the relevant macros
and removing the problem definitions.

The problem definitions aren't suitable for the _noex macros either
because they only discard exceptions in non-default rounding modes,
and while for some uses of *_noex/*_NOEX it doesn't matter whether
exceptions are discarded, dbl-64/e_remainder.c requires
SET_RESTORE_ROUND_NOEX to cause exceptions to be discarded.  I think
the accumulated set of macros / functions for optimized exception /
rounding mode handling could do with a careful review by now, and
possible refactoring, and at least one new feature (extracting the
saved rounding mode from an environment / context variable - see
dbl-64/e_sqrt.c for a case where this could be used).

Tested mips64.

	* sysdeps/mips/math_private.h [__mips_hard_float]
	(libc_feresetround_ctx): Define to libc_feupdateenv_mips_ctx not
	libc_feresetround_mips_ctx.
	[__mips_hard_float] (libc_feresetroundf_ctx): Likewise.
	[__mips_hard_float] (libc_feresetroundl_ctx): Likewise.
	[__mips_hard_float] (libc_feresetround_mips_ctx): Remove.
2014-03-11 22:30:40 +00:00
..
aarch64 [PATCH] [AArch64] Optional trapping exceptions support. 2014-03-07 14:05:20 +00:00
alpha Don't include individual test ulps in libm-test-ulps. 2014-03-05 15:02:38 +00:00
arm ARM: Fix up setjmp/longjmp changes sfi_* macro use. 2014-03-11 10:59:01 -07:00
generic BZ #16613: Support TLS in audit libraries. 2014-02-25 13:18:15 -05:00
gnu Combine __USE_BSD and __USE_SVID into __USE_MISC. 2014-02-12 23:41:01 +00:00
i386 Fix nextafter overflow in non-default rounding modes (bug 16677). 2014-03-11 22:24:00 +00:00
ia64 Don't include individual test ulps in libm-test-ulps. 2014-03-05 15:02:38 +00:00
ieee754 Fix nextafter overflow in non-default rounding modes (bug 16677). 2014-03-11 22:24:00 +00:00
init_array Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
m68k Fix nextafter overflow in non-default rounding modes (bug 16677). 2014-03-11 22:24:00 +00:00
mach Complete _BSD_SOURCE / _SVID_source followup cleanup. 2014-02-21 21:45:26 +00:00
microblaze Don't include individual test ulps in libm-test-ulps. 2014-03-05 15:02:38 +00:00
mips Fix MIPS libc_feresetround*_ctx to preserve exceptions. 2014-03-11 22:30:40 +00:00
posix Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
powerpc PowerPC: Fix bzero definition for static libc for PPC64 2014-03-11 09:31:59 -05:00
pthread Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
s390 Don't include individual test ulps in libm-test-ulps. 2014-03-05 15:02:38 +00:00
sh Don't include individual test ulps in libm-test-ulps. 2014-03-05 15:02:38 +00:00
sparc Don't include individual test ulps in libm-test-ulps. 2014-03-05 15:02:38 +00:00
tile Don't include individual test ulps in libm-test-ulps. 2014-03-05 15:02:38 +00:00
unix Fix POSIX namespace for <bits/siginfo.h> (bug 16674). 2014-03-07 23:57:56 +00:00
wordsize-32 Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
wordsize-64 Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
x86 Enumerate tests with special rules in tests-special variable. 2014-03-06 22:35:33 +00:00
x86_64 Don't include individual test ulps in libm-test-ulps. 2014-03-05 15:02:38 +00:00