about summary refs log tree commit diff
path: root/math/w_acoshl.c
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2017-01-04 17:15:39 +0000
committerJoseph Myers <joseph@codesourcery.com>2017-01-04 17:15:39 +0000
commitf5ee5362bf8c50e5a85bf758f3f5d91f262a446f (patch)
tree8b5b7b42f97e28d660d34eef7254510c197569f3 /math/w_acoshl.c
parent2b18fe78fe7217430ed42d3284636c732793e352 (diff)
downloadglibc-f5ee5362bf8c50e5a85bf758f3f5d91f262a446f.tar.gz
glibc-f5ee5362bf8c50e5a85bf758f3f5d91f262a446f.tar.xz
glibc-f5ee5362bf8c50e5a85bf758f3f5d91f262a446f.zip
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.
Diffstat (limited to 'math/w_acoshl.c')
0 files changed, 0 insertions, 0 deletions