treewide: remove redundant IS_ERR() before error code check
[linux/fpc-iii.git] / arch / alpha / math-emu / sfp-util.h
blobae30f3417522673f88b7b8402f7ba64c249de628
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #include <linux/kernel.h>
3 #include <linux/sched.h>
4 #include <linux/types.h>
5 #include <asm/byteorder.h>
6 #include <asm/fpu.h>
8 #define add_ssaaaa(sh, sl, ah, al, bh, bl) \
9 ((sl) = (al) + (bl), (sh) = (ah) + (bh) + ((sl) < (al)))
11 #define sub_ddmmss(sh, sl, ah, al, bh, bl) \
12 ((sl) = (al) - (bl), (sh) = (ah) - (bh) - ((al) < (bl)))
14 #define umul_ppmm(wh, wl, u, v) \
15 __asm__ ("mulq %2,%3,%1; umulh %2,%3,%0" \
16 : "=r" ((UDItype)(wh)), \
17 "=&r" ((UDItype)(wl)) \
18 : "r" ((UDItype)(u)), \
19 "r" ((UDItype)(v)))
21 #define udiv_qrnnd(q, r, n1, n0, d) \
22 do { unsigned long __r; \
23 (q) = __udiv_qrnnd (&__r, (n1), (n0), (d)); \
24 (r) = __r; \
25 } while (0)
26 extern unsigned long __udiv_qrnnd (unsigned long *, unsigned long,
27 unsigned long , unsigned long);
29 #define UDIV_NEEDS_NORMALIZATION 1
31 #define abort() goto bad_insn
33 #ifndef __LITTLE_ENDIAN
34 #define __LITTLE_ENDIAN -1
35 #endif
36 #define __BYTE_ORDER __LITTLE_ENDIAN