Go to the documentation of this file.
14 #if BITS_PER_LONG == 64
16 #include <linux/types.h>
22 #define __div64_32(n, base) \
24 unsigned long __cf, __tmp, __tmp2, __i; \
25 unsigned long __quot32, __mod32; \
26 unsigned long __high, __low; \
27 unsigned long long __n; \
29 __high = *__n >> 32; \
34 " .set noreorder \n" \
40 " sll $1, %0, 0x1 \n" \
41 " srl %3, %0, 0x1f \n" \
43 " sll %1, %1, 0x1 \n" \
44 " sll %2, %2, 0x1 \n" \
47 " sltu %5, %0, %z6 \n" \
50 " addiu %4, %4, -1 \n" \
51 " subu %0, %0, %z6 \n" \
52 " addiu %2, %2, 1 \n" \
55 " srl %5, %1, 0x1f\n\t" \
57 : "=&r" (__mod32), "=&r" (__tmp), \
58 "=&r" (__quot32), "=&r" (__cf), \
59 "=&r" (__i), "=&r" (__tmp2) \
60 : "Jr" (base), "0" (__high), "1" (__low)); \