summaryrefslogtreecommitdiff
path: root/arch/mips/math-emu/dp_fmax.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/math-emu/dp_fmax.c')
-rw-r--r--arch/mips/math-emu/dp_fmax.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/mips/math-emu/dp_fmax.c b/arch/mips/math-emu/dp_fmax.c
index 0b53c78..81d12bf 100644
--- a/arch/mips/math-emu/dp_fmax.c
+++ b/arch/mips/math-emu/dp_fmax.c
@@ -243,7 +243,11 @@ union ieee754dp ieee754dp_fmaxa(union ieee754dp x, union ieee754dp y)
return y;
/* Compare mantissa */
- if (xm <= ym)
+ if (xm < ym)
return y;
- return x;
+ else if (xm > ym)
+ return x;
+ else if (xs == 0)
+ return x;
+ return y;
}