Commit Graph

2 Commits

Author SHA1 Message Date
Joseph Myers f5ee5362bf Make MIPS soft-fp preserve NaN payloads for NAN2008.
This corresponds to a patch applied to libgcc.  In glibc it doesn't
actually affect much (only fma, I think).

The MIPS sfp-machine.h files have an _FP_CHOOSENAN implementation
which emulates hardware semantics of not preserving signaling NaN
payloads for an operation with two NaN arguments (although that
doesn't suffice to avoid sNaN payload preservation in any case with
just one NaN argument).

However, those are only hardware semantics in the legacy NaN case; in
the NAN2008 case, the architecture documentation says hardware
preserves payloads in such cases.  Furthermore, this implementation
assumes legacy NaN semantics, so in the NAN2008 case the
implementation actually has the effect of preserving sNaN payloads but
not preserving qNaN payloads, when both should be preserved.

This patch fixes the code just to copy from the first argument.

Tested for mips64 soft-float.

	* sysdeps/mips/mips32/sfp-machine.h (_FP_CHOOSENAN): Always
	preserve NaN payload if [__mips_nan2008].
	* sysdeps/mips/mips64/sfp-machine.h (_FP_CHOOSENAN): Likewise.
2017-01-04 17:15:39 +00:00
Joseph Myers 306bc0d1ed Remove sysdeps/mips soft-fp subdirectories.
As noted in
<https://sourceware.org/ml/libc-alpha/2014-10/msg00369.html>, soft-fp
sysdeps subdirectories (and more generally, subdirectories where
sysdeps/foo/Implies contains foo/bar) are unnecessary and should be
eliminated.  This patch does so for MIPS.

Tested for MIPS64 (all three ABIs, soft-float) that installed stripped
shared libraries are unchanged by this patch.

	* sysdeps/mips/soft-fp/sfp-machine.h: Move to ....
	* sysdeps/mips/mips32/sfp-machine.h: ... here.
	* sysdeps/mips/mips64/soft-fp/Makefile: Move to ....
	* sysdeps/mips/mips64/Makefile: ... here.
	* sysdeps/mips/mips64/soft-fp/e_sqrtl.c: Move to ....
	* sysdeps/mips/mips64/e_sqrtl.c: ... here.
	* sysdeps/mips/mips64/soft-fp/sfp-machine.h: Move to ....
	* sysdeps/mips/mips64/sfp-machine.h: ... here.
	* sysdeps/mips/mips32/Implies: Remove mips/soft-fp.
	* sysdeps/mips/mips64/n32/Implies: Remove mips/mips64/soft-fp.
	* sysdeps/mips/mips64/n64/Implies: Likewise.
2015-02-10 22:01:39 +00:00