+2017-01-04 Joseph Myers <joseph@codesourcery.com>
+
+ * config/mips/sfp-machine.h (_FP_CHOOSENAN): Always preserve NaN
+ payload if [__mips_nan2008].
+
2017-01-04 Alan Modra <amodra@gmail.com>
* Makefile.in (configure_deps): Update.
# define _FP_QNANNEGATEDP 1
#endif
+#ifdef __mips_nan2008
+/* NaN payloads should be preserved for NAN2008. */
+# define _FP_CHOOSENAN(fs, wc, R, X, Y, OP) \
+ do \
+ { \
+ R##_s = X##_s; \
+ _FP_FRAC_COPY_##wc (R, X); \
+ R##_c = FP_CLS_NAN; \
+ } \
+ while (0)
+#else
/* Comment from glibc: */
/* From my experiments it seems X is chosen unless one of the
NaNs is sNaN, in which case the result is NANSIGN/NANFRAC. */
-#define _FP_CHOOSENAN(fs, wc, R, X, Y, OP) \
+# define _FP_CHOOSENAN(fs, wc, R, X, Y, OP) \
do { \
if ((_FP_FRAC_HIGH_RAW_##fs(X) | \
_FP_FRAC_HIGH_RAW_##fs(Y)) & _FP_QNANBIT_##fs) \
} \
R##_c = FP_CLS_NAN; \
} while (0)
+#endif
#ifdef __mips_hard_float
#define FP_EX_INVALID 0x40