From 2848b105856e49d98f3c5026b6d8d790f9723c0c Mon Sep 17 00:00:00 2001 From: "Maciej W. Rozycki" Date: Thu, 16 May 2013 23:33:55 +0100 Subject: 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. --- soft-fp/testit.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'soft-fp/testit.c') diff --git a/soft-fp/testit.c b/soft-fp/testit.c index 46a50c4..f1e9b54 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: -- cgit v1.1