1 #include <linux/kernel.h>
2 #include <linux/sched.h>
3 #include <linux/types.h>
4 #include <asm/byteorder.h>
6 #define add_ssaaaa(sh, sl, ah, al, bh, bl) ({ \
7 unsigned int __sh = (ah); \
8 unsigned int __sl = (al); \
14 : "+&d" (__sh), "+d" (__sl) \
15 : "d" (bh), "d" (bl) : "cc"); \
20 #define sub_ddmmss(sh, sl, ah, al, bh, bl) ({ \
21 unsigned int __sh = (ah); \
22 unsigned int __sl = (al); \
28 : "+&d" (__sh), "+d" (__sl) \
29 : "d" (bh), "d" (bl) : "cc"); \
34 /* a umul b = a mul b + (a>=2<<31) ? b<<32:0 + (b>=2<<31) ? a<<32:0 */
35 #define umul_ppmm(wh, wl, u, v) ({ \
36 unsigned int __wh = u; \
37 unsigned int __wl = v; \
48 : "+d" (__wh), "+d" (__wl) \
49 : : "0", "1", "cc"); \
54 #define udiv_qrnnd(q, r, n1, n0, d) \
55 do { unsigned long __n; \
56 unsigned int __r, __d; \
57 __n = ((unsigned long)(n1) << 32) + n0; \
63 #define UDIV_NEEDS_NORMALIZATION 0
67 #define __BYTE_ORDER __BIG_ENDIAN