Go to the documentation of this file.
14 #include <linux/types.h>
25 #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
26 # define CLOBBER_MDR_CC "mdr", "cc"
28 # define CLOBBER_MDR_CC "cc"
36 #define do_div(n, base) \
39 if (sizeof(n) <= 4) { \
43 : "+r"(n), "=d"(__rem) \
44 : "r"(base), "1"(__rem) \
47 } else if (sizeof(n) <= 8) { \
49 unsigned long long l; \
61 : "=d"(__rem), "=r"(__quot.w[1]), "=r"(__quot.w[0]) \
62 : "r"(base), "0"(__rem), "1"(__quot.w[1]), \
68 ____unhandled_size_in_do_div___(); \
79 unsigned __muldiv64u(
unsigned val,
unsigned mult,
unsigned div)
87 :
"0"(val),
"ir"(
mult),
"r"(div)
100 signed __muldiv64s(
signed val,
signed mult,
signed div)
108 :
"0"(val),
"ir"(
mult),
"r"(div)