treewide: remove redundant IS_ERR() before error code check
[linux/fpc-iii.git] / arch / nds32 / math-emu / fsubs.c
blob61ddd9708465dcb8f1418e7ff634445d9c7cdfdd
1 // SPDX-License-Identifier: GPL-2.0
2 // Copyright (C) 2005-2018 Andes Technology Corporation
3 #include <linux/uaccess.h>
5 #include <asm/sfp-machine.h>
6 #include <math-emu/soft-fp.h>
7 #include <math-emu/single.h>
8 void fsubs(void *ft, void *fa, void *fb)
11 FP_DECL_S(A);
12 FP_DECL_S(B);
13 FP_DECL_S(R);
14 FP_DECL_EX;
16 FP_UNPACK_SP(A, fa);
17 FP_UNPACK_SP(B, fb);
19 if (B_c != FP_CLS_NAN)
20 B_s ^= 1;
22 FP_ADD_S(R, A, B);
24 FP_PACK_SP(ft, R);
26 __FPU_FPCSR |= FP_CUR_EXCEPTIONS;