Go to the documentation of this file.
22 #ifdef CONFIG_CPU_HAS_NO_MULDIV64
24 #define SI_TYPE_SIZE 32
25 #define __BITS4 (SI_TYPE_SIZE / 4)
26 #define __ll_B (1L << (SI_TYPE_SIZE / 2))
27 #define __ll_lowpart(t) ((USItype) (t) % __ll_B)
28 #define __ll_highpart(t) ((USItype) (t) / __ll_B)
30 #define umul_ppmm(w1, w0, u, v) \
32 USItype __x0, __x1, __x2, __x3; \
33 USItype __ul, __vl, __uh, __vh; \
35 __ul = __ll_lowpart (u); \
36 __uh = __ll_highpart (u); \
37 __vl = __ll_lowpart (v); \
38 __vh = __ll_highpart (v); \
40 __x0 = (USItype) __ul * __vl; \
41 __x1 = (USItype) __ul * __vh; \
42 __x2 = (USItype) __uh * __vl; \
43 __x3 = (USItype) __uh * __vh; \
45 __x1 += __ll_highpart (__x0); \
50 (w1) = __x3 + __ll_highpart (__x1); \
51 (w0) = __ll_lowpart (__x1) * __ll_B + __ll_lowpart (__x0); \
56 #define umul_ppmm(w1, w0, u, v) \
57 __asm__ ("mulu%.l %3,%1:%0" \
58 : "=d" ((USItype)(w0)), \
59 "=d" ((USItype)(w1)) \
60 : "%0" ((USItype)(u)), \
65 #define __umulsidi3(u, v) \
67 umul_ppmm (__w.s.high, __w.s.low, u, v); \