1 #include <linux/kernel.h>
2 #include <linux/sched.h>
3 #include <linux/types.h>
4 #include <asm/byteorder.h>
7 #define add_ssaaaa(sh, sl, ah, al, bh, bl) \
8 ((sl) = (al) + (bl), (sh) = (ah) + (bh) + ((sl) < (al)))
10 #define sub_ddmmss(sh, sl, ah, al, bh, bl) \
11 ((sl) = (al) - (bl), (sh) = (ah) - (bh) - ((al) < (bl)))
13 #define umul_ppmm(wh, wl, u, v) \
14 __asm__ ("mulq %2,%3,%1; umulh %2,%3,%0" \
15 : "=r" ((UDItype)(wh)), \
16 "=&r" ((UDItype)(wl)) \
17 : "r" ((UDItype)(u)), \
20 #define udiv_qrnnd(q, r, n1, n0, d) \
21 do { unsigned long __r; \
22 (q) = __udiv_qrnnd (&__r, (n1), (n0), (d)); \
25 extern unsigned long __udiv_qrnnd (unsigned long *, unsigned long,
26 unsigned long , unsigned long);
28 #define UDIV_NEEDS_NORMALIZATION 1
30 #define abort() goto bad_insn
32 #ifndef __LITTLE_ENDIAN
33 #define __LITTLE_ENDIAN -1
35 #define __BYTE_ORDER __LITTLE_ENDIAN