aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-x86
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-x86')
-rw-r--r--include/asm-x86/div64.h18
1 files changed, 0 insertions, 18 deletions
diff --git a/include/asm-x86/div64.h b/include/asm-x86/div64.h
index 32fdbddaae55..9a2d644c08ef 100644
--- a/include/asm-x86/div64.h
+++ b/include/asm-x86/div64.h
@@ -33,24 +33,6 @@
33 __mod; \ 33 __mod; \
34}) 34})
35 35
36/*
37 * (long)X = ((long long)divs) / (long)div
38 * (long)rem = ((long long)divs) % (long)div
39 *
40 * Warning, this will do an exception if X overflows.
41 */
42#define div_long_long_rem(a, b, c) div_ll_X_l_rem(a, b, c)
43
44static inline long div_ll_X_l_rem(long long divs, long div, long *rem)
45{
46 long dum2;
47 asm("divl %2":"=a"(dum2), "=d"(*rem)
48 : "rm"(div), "A"(divs));
49
50 return dum2;
51
52}
53
54static inline u64 div_u64_rem(u64 dividend, u32 divisor, u32 *remainder) 36static inline u64 div_u64_rem(u64 dividend, u32 divisor, u32 *remainder)
55{ 37{
56 union { 38 union {