about summary refs log tree commit diff
path: root/soft-fp/testit.c
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@codesourcery.com>2013-05-16 23:33:55 +0100
committerMaciej W. Rozycki <macro@codesourcery.com>2013-05-16 23:33:55 +0100
commit2848b105856e49d98f3c5026b6d8d790f9723c0c (patch)
tree66e6cc9d3c1c6d95324e50ceb1140d0eed52ec37 /soft-fp/testit.c
parentc58b274f01658400ba75886b04cb044ba9467a94 (diff)
downloadglibc-2848b105856e49d98f3c5026b6d8d790f9723c0c.tar.gz
glibc-2848b105856e49d98f3c5026b6d8d790f9723c0c.tar.xz
glibc-2848b105856e49d98f3c5026b6d8d790f9723c0c.zip
MIPS: soft-fp NaN representation corrections
[BZ #15442] This adds support for the inverse interpretation of the
quiet bit of IEEE 754 floating-point NaN data that some processors
use.  This includes in particular MIPS architecture processors; the
payload used for the canonical qNaN encoding is updated accordingly
so as not to interfere with the quiet bit.
Diffstat (limited to 'soft-fp/testit.c')
-rw-r--r--soft-fp/testit.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/soft-fp/testit.c b/soft-fp/testit.c
index 46a50c4401..f1e9b54758 100644
--- a/soft-fp/testit.c
+++ b/soft-fp/testit.c
@@ -200,17 +200,17 @@ double gen_special_double(int i)
       case 0:
 	X_c = FP_CLS_NAN;
 #if _FP_W_TYPE_SIZE < _FP_FRACBITS_D
-	__FP_FRAC_SET_2(X, _FP_QNANBIT_D, 0x1234);
+	__FP_FRAC_SET_2(X, _FP_QNANNEGATEDP ? 0 : _FP_QNANBIT_D, 0x1234);
 #else
-	_FP_FRAC_SET_1(X, _FP_QNANBIT_D | 0x1234);
+	_FP_FRAC_SET_1(X, (_FP_QNANNEGATEDP ? 0 : _FP_QNANBIT_D) | 0x1234);
 #endif
 	break;
       case 2:
 	X_c = FP_CLS_NAN;
 #if _FP_W_TYPE_SIZE < _FP_FRACBITS_D
-	__FP_FRAC_SET_2(X, _FP_QNANBIT_D, 0x1);
+	__FP_FRAC_SET_2(X, _FP_QNANNEGATEDP ? 0 : _FP_QNANBIT_D, 0x1);
 #else
-	_FP_FRAC_SET_1(X, _FP_QNANBIT_D | 0x1);
+	_FP_FRAC_SET_1(X, (_FP_QNANNEGATEDP ? 0 : _FP_QNANBIT_D) | 0x1);
 #endif
 	break;
       case 4: