glibc/sysdeps/mips
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
..
bits Move mips from ports to libc. 2014-02-10 23:30:21 +00:00
fpu Fix whitespace in MIPS files to allow move. 2014-02-10 23:31:30 +00:00
ieee754 Move mips from ports to libc. 2014-02-10 23:30:21 +00:00
include/sys Move mips from ports to libc. 2014-02-10 23:30:21 +00:00
mips32 Don't include individual test ulps in libm-test-ulps. 2014-03-05 15:02:38 +00:00
mips64 Don't include individual test ulps in libm-test-ulps. 2014-03-05 15:02:38 +00:00
nptl Move mips from ports to libc. 2014-02-10 23:30:21 +00:00
soft-fp soft-fp: support after-rounding tininess detection. 2014-02-12 18:27:12 +00:00
sys Move mips from ports to libc. 2014-02-10 23:30:21 +00:00
__longjmp.c Move mips from ports to libc. 2014-02-10 23:30:21 +00:00
abort-instr.h Move mips from ports to libc. 2014-02-10 23:30:21 +00:00
add_n.S Move mips from ports to libc. 2014-02-10 23:30:21 +00:00
addmul_1.S Move mips from ports to libc. 2014-02-10 23:30:21 +00:00
backtrace.c Move mips from ports to libc. 2014-02-10 23:30:21 +00:00
bsd-_setjmp.S Move mips from ports to libc. 2014-02-10 23:30:21 +00:00
bsd-setjmp.S Move mips from ports to libc. 2014-02-10 23:30:21 +00:00
configure Move mips from ports to libc. 2014-02-10 23:30:21 +00:00
configure.ac Move mips from ports to libc. 2014-02-10 23:30:21 +00:00
dl-dtprocnum.h Move mips from ports to libc. 2014-02-10 23:30:21 +00:00
dl-machine.h Merge MIPS dl-lookup.c into generic file. 2014-02-11 22:33:07 +00:00
dl-procinfo.c Move mips from ports to libc. 2014-02-10 23:30:21 +00:00
dl-procinfo.h Move mips from ports to libc. 2014-02-10 23:30:21 +00:00
dl-tls.h Move mips from ports to libc. 2014-02-10 23:30:21 +00:00
dl-trampoline.c Move mips from ports to libc. 2014-02-10 23:30:21 +00:00
fpregdef.h Move mips from ports to libc. 2014-02-10 23:30:21 +00:00
fpu_control.h Move mips from ports to libc. 2014-02-10 23:30:21 +00:00
gccframe.h Move mips from ports to libc. 2014-02-10 23:30:21 +00:00
Implies Move mips from ports to libc. 2014-02-10 23:30:21 +00:00
jmpbuf-unwind.h Move mips from ports to libc. 2014-02-10 23:30:21 +00:00
ldsodefs.h Move mips from ports to libc. 2014-02-10 23:30:21 +00:00
libc-tls.c Move mips from ports to libc. 2014-02-10 23:30:21 +00:00
lshift.S Move mips from ports to libc. 2014-02-10 23:30:21 +00:00
machine-gmon.h Move mips from ports to libc. 2014-02-10 23:30:21 +00:00
Makefile Move mips from ports to libc. 2014-02-10 23:30:21 +00:00
math_private.h Fix MIPS libc_feresetround*_ctx to preserve exceptions. 2014-03-11 22:30:40 +00:00
math-tests.h Update MIPS math-tests.h for GCC 4.9 using soft-fp. 2014-02-13 00:46:45 +00:00
memcpy.S Move mips from ports to libc. 2014-02-10 23:30:21 +00:00
memset.S Move mips from ports to libc. 2014-02-10 23:30:21 +00:00
memusage.h Move mips from ports to libc. 2014-02-10 23:30:21 +00:00
mul_1.S Move mips from ports to libc. 2014-02-10 23:30:21 +00:00
preconfigure Move mips from ports to libc. 2014-02-10 23:30:21 +00:00
regdef.h Fix whitespace in MIPS files to allow move. 2014-02-10 23:31:30 +00:00
rshift.S Move mips from ports to libc. 2014-02-10 23:30:21 +00:00
setjmp_aux.c Move mips from ports to libc. 2014-02-10 23:30:21 +00:00
setjmp.S Move mips from ports to libc. 2014-02-10 23:30:21 +00:00
sgidefs.h Move mips from ports to libc. 2014-02-10 23:30:21 +00:00
shlib-versions Move mips from ports to libc. 2014-02-10 23:30:21 +00:00
sotruss-lib.c Move mips from ports to libc. 2014-02-10 23:30:21 +00:00
stackinfo.h Move mips from ports to libc. 2014-02-10 23:30:21 +00:00
start.S Move mips from ports to libc. 2014-02-10 23:30:21 +00:00
sub_n.S Move mips from ports to libc. 2014-02-10 23:30:21 +00:00
submul_1.S Move mips from ports to libc. 2014-02-10 23:30:21 +00:00
tininess.h Move mips from ports to libc. 2014-02-10 23:30:21 +00:00
tls-macros.h Move mips from ports to libc. 2014-02-10 23:30:21 +00:00
tst-audit.h Move mips from ports to libc. 2014-02-10 23:30:21 +00:00