summaryrefslogtreecommitdiff
path: root/arch/mips/math-emu/sp_fmax.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/math-emu/sp_fmax.c')
-rw-r--r--arch/mips/math-emu/sp_fmax.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/mips/math-emu/sp_fmax.c b/arch/mips/math-emu/sp_fmax.c
index 7efa772..fb41497 100644
--- a/arch/mips/math-emu/sp_fmax.c
+++ b/arch/mips/math-emu/sp_fmax.c
@@ -243,7 +243,11 @@ union ieee754sp ieee754sp_fmaxa(union ieee754sp x, union ieee754sp 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;
}