These are already identical ... 508 lines of code, goodbye.
[linux-2.6/linux-mips.git] / include / asm-mips64 / div64.h
blob3ec1fadcfd7ed60fe771821bb9c497cc198452bf
1 /*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 */
6 #ifndef _ASM_DIV64_H
7 #define _ASM_DIV64_H
9 /*
10 * Don't use this one in new code
12 #define do_div64_32(res, high, low, base) ({ \
13 unsigned int __quot, __mod; \
14 unsigned long __div; \
15 unsigned int __low, __high, __base; \
17 __high = (high); \
18 __low = (low); \
19 __div = __high; \
20 __div = __div << 32 | __low; \
21 __base = (base); \
23 __mod = __div % __base; \
24 __div = __div / __base; \
26 __quot = __div; \
27 (res) = __quot; \
28 __mod; })
31 * Hey, we're already 64-bit, no
32 * need to play games..
34 #define do_div(n, base) ({ \
35 unsigned long __quot; \
36 unsigned int __mod; \
37 unsigned long __div; \
38 unsigned int __base; \
40 __div = (n); \
41 __base = (base); \
43 __mod = __div % __base; \
44 __quot = __div / __base; \
46 (n) = __quot; \
47 __mod; })
49 #endif /* _ASM_DIV64_H */