summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2017-01-04 17:06:33 +0000
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2017-01-04 17:06:33 +0000
commit4ed499e56f11ad2e337aa9c312521682402e1d37 (patch)
tree1f779d04a8a371cdb55a64c7a6a80b9043c4f1ca /contrib
parent0aff9f2b18b74f8388dc2edc64f61c601df2717e (diff)
Make MIPS soft-fp preserve NaN payloads for NAN2008.
The MIPS sfp-machine.h has 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 (at the level of libgcc, it's not meaningful which argument is the first and which is the second). Tested for mips64-linux-gnu (soft float, NAN2008) with the glibc math/ tests. * config/mips/sfp-machine.h (_FP_CHOOSENAN): Always preserve NaN payload if [__mips_nan2008]. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@244059 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'contrib')
0 files changed, 0 insertions, 0 deletions