From c9a1084516e35ff4f1d5b83e77530ed019ca364b Mon Sep 17 00:00:00 2001 From: Maciej W. Rozycki Date: Fri, 3 Apr 2015 23:25:38 +0100 Subject: 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 Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/9689/ Signed-off-by: Ralf Baechle --- arch/mips/math-emu/ieee754dp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/mips/math-emu/ieee754dp.c') diff --git a/arch/mips/math-emu/ieee754dp.c b/arch/mips/math-emu/ieee754dp.c index 49c811a920b5..921535b5c3a6 100644 --- a/arch/mips/math-emu/ieee754dp.c +++ b/arch/mips/math-emu/ieee754dp.c @@ -32,7 +32,7 @@ int ieee754dp_class(union ieee754dp x) int ieee754dp_isnan(union ieee754dp x) { - return ieee754dp_class(x) >= IEEE754_CLASS_SNAN; + return ieee754_class_nan(ieee754dp_class(x)); } static inline int ieee754dp_issnan(union ieee754dp x) -- cgit v1.2.3-55-g7522