treewide: remove redundant IS_ERR() before error code check
[linux/fpc-iii.git] / arch / nds32 / math-emu / fcmps.c
blob681480758213c27b9f9101c3b44a9c785d5dead9
1 // SPDX-License-Identifier: GPL-2.0
2 // Copyright (C) 2005-2018 Andes Technology Corporation
3 #include <asm/sfp-machine.h>
4 #include <math-emu/soft-fp.h>
5 #include <math-emu/single.h>
6 int fcmps(void *ft, void *fa, void *fb, int cmpop)
8 FP_DECL_S(A);
9 FP_DECL_S(B);
10 FP_DECL_EX;
11 long cmp;
13 FP_UNPACK_SP(A, fa);
14 FP_UNPACK_SP(B, fb);
16 FP_CMP_S(cmp, A, B, SF_CUN);
17 cmp += 2;
18 if (cmp == SF_CGT)
19 *(int *)ft = 0x0;
20 else
21 *(int *)ft = (cmp & cmpop) ? 0x1 : 0x0;
23 return 0;