diff options
author | Ingo Molnar <mingo@kernel.org> | 2015-05-08 14:33:33 +0300 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2015-05-08 14:33:33 +0300 |
commit | 7ae383be81781c5e1347f71c3eb0d53ce5188200 (patch) | |
tree | d2dfedb78cf4ee2bc9cc460af3be106b08e01050 /arch/mips/math-emu/dp_cmp.c | |
parent | 2a4e90b18c256d52a7f3f77d58114f6d4e4a7f9f (diff) | |
parent | 3e0283a53f7d2f2dae7bc4aa7f3104cb5988018f (diff) | |
download | linux-7ae383be81781c5e1347f71c3eb0d53ce5188200.tar.xz |
Merge branch 'linus' into x86/asm, before applying dependent patch
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/mips/math-emu/dp_cmp.c')
-rw-r--r-- | arch/mips/math-emu/dp_cmp.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/arch/mips/math-emu/dp_cmp.c b/arch/mips/math-emu/dp_cmp.c index 30f95f6e9ac4..a29880e29ae4 100644 --- a/arch/mips/math-emu/dp_cmp.c +++ b/arch/mips/math-emu/dp_cmp.c @@ -35,16 +35,11 @@ int ieee754dp_cmp(union ieee754dp x, union ieee754dp y, int cmp, int sig) FLUSHYDP; ieee754_clearcx(); /* Even clear inexact flag here */ - if (ieee754dp_isnan(x) || ieee754dp_isnan(y)) { - if (sig || xc == IEEE754_CLASS_SNAN || yc == IEEE754_CLASS_SNAN) + if (ieee754_class_nan(xc) || ieee754_class_nan(yc)) { + if (sig || + xc == IEEE754_CLASS_SNAN || yc == IEEE754_CLASS_SNAN) ieee754_setcx(IEEE754_INVALID_OPERATION); - if (cmp & IEEE754_CUN) - return 1; - if (cmp & (IEEE754_CLT | IEEE754_CGT)) { - if (sig && ieee754_setandtestcx(IEEE754_INVALID_OPERATION)) - return 0; - } - return 0; + return (cmp & IEEE754_CUN) != 0; } else { vx = x.bits; vy = y.bits; |