Go to the documentation of this file. 1 #include <linux/module.h>
5 #define DWtype long long
6 #define UWtype unsigned long
7 #define UHWtype unsigned short
11 #define __ll_B ((UWtype) 1 << (W_TYPE_SIZE / 2))
12 #define __ll_lowpart(t) ((UWtype) (t) & (__ll_B - 1))
13 #define __ll_highpart(t) ((UWtype) (t) >> (W_TYPE_SIZE / 2))
16 #if !defined(umul_ppmm)
17 #define umul_ppmm(w1, w0, u, v) \
19 UWtype __x0, __x1, __x2, __x3; \
20 UHWtype __ul, __vl, __uh, __vh; \
22 __ul = __ll_lowpart(u); \
23 __uh = __ll_highpart(u); \
24 __vl = __ll_lowpart(v); \
25 __vh = __ll_highpart(v); \
27 __x0 = (UWtype) __ul * __vl; \
28 __x1 = (UWtype) __ul * __vh; \
29 __x2 = (UWtype) __uh * __vl; \
30 __x3 = (UWtype) __uh * __vh; \
32 __x1 += __ll_highpart(__x0); \
37 (w1) = __x3 + __ll_highpart(__x1); \
38 (w0) = __ll_lowpart(__x1) * __ll_B + __ll_lowpart(__x0);\
42 #if !defined(__umulsidi3)
43 #define __umulsidi3(u, v) ({ \
45 umul_ppmm(__w.s.high, __w.s.low, u, v); \