summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/mips/math-emu/ieee754dp.c11
-rw-r--r--arch/mips/math-emu/ieee754sp.c11
2 files changed, 6 insertions, 16 deletions
diff --git a/arch/mips/math-emu/ieee754dp.c b/arch/mips/math-emu/ieee754dp.c
index 068f45a415fc..9723a518e5ad 100644
--- a/arch/mips/math-emu/ieee754dp.c
+++ b/arch/mips/math-emu/ieee754dp.c
@@ -49,14 +49,9 @@ union ieee754dp __cold ieee754dp_nanxcpt(union ieee754dp r)
if (!ieee754dp_issnan(r)) /* QNAN does not cause invalid op !! */
return r;
- if (!ieee754_setandtestcx(IEEE754_INVALID_OPERATION)) {
- /* not enabled convert to a quiet NaN */
- DPMANT(r) &= (~DP_MBIT(DP_FBITS-1));
- if (ieee754dp_isnan(r))
- return r;
- else
- return ieee754dp_indef();
- }
+ /* If not enabled convert to a quiet NaN. */
+ if (!ieee754_setandtestcx(IEEE754_INVALID_OPERATION))
+ return ieee754dp_indef();
return r;
}
diff --git a/arch/mips/math-emu/ieee754sp.c b/arch/mips/math-emu/ieee754sp.c
index ba88301579c2..7bde3c204d02 100644
--- a/arch/mips/math-emu/ieee754sp.c
+++ b/arch/mips/math-emu/ieee754sp.c
@@ -49,14 +49,9 @@ union ieee754sp __cold ieee754sp_nanxcpt(union ieee754sp r)
if (!ieee754sp_issnan(r)) /* QNAN does not cause invalid op !! */
return r;
- if (!ieee754_setandtestcx(IEEE754_INVALID_OPERATION)) {
- /* not enabled convert to a quiet NaN */
- SPMANT(r) &= (~SP_MBIT(SP_FBITS-1));
- if (ieee754sp_isnan(r))
- return r;
- else
- return ieee754sp_indef();
- }
+ /* If not enabled convert to a quiet NaN. */
+ if (!ieee754_setandtestcx(IEEE754_INVALID_OPERATION))
+ return ieee754sp_indef();
return r;
}