summaryrefslogtreecommitdiff
path: root/arch/mips/math-emu/ieee754sp.c
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@linux-mips.org>2015-04-03 23:25:38 +0100
committerRalf Baechle <ralf@linux-mips.org>2015-04-08 01:09:35 +0200
commitc9a1084516e35ff4f1d5b83e77530ed019ca364b (patch)
treede1cfa5b17d0e2db63616994f42fb12de8b207c6 /arch/mips/math-emu/ieee754sp.c
parentd5afa7e905544a3d9e2bb29d9cafebc8e544c978 (diff)
MIPS: math-emu: Optimise NaN handling in comparisons
We have the input operands already classified in `ieee754sp_cmp' and `ieee754dp_cmp' comparison operations, so use the class obtained to tell NaNs and numbers apart rather than classifying inputs again for this purpose, reducing the size of code by 24 and 40 instructions or 96 and 160 bytes respectively. Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/9689/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/math-emu/ieee754sp.c')
-rw-r--r--arch/mips/math-emu/ieee754sp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/mips/math-emu/ieee754sp.c b/arch/mips/math-emu/ieee754sp.c
index 21899ce05171..e48aaab1543b 100644
--- a/arch/mips/math-emu/ieee754sp.c
+++ b/arch/mips/math-emu/ieee754sp.c
@@ -32,7 +32,7 @@ int ieee754sp_class(union ieee754sp x)
int ieee754sp_isnan(union ieee754sp x)
{
- return ieee754sp_class(x) >= IEEE754_CLASS_SNAN;
+ return ieee754_class_nan(ieee754sp_class(x));
}
static inline int ieee754sp_issnan(union ieee754sp x)