1 #ifndef _ASM_IA64_DIV64_H
2 #define _ASM_IA64_DIV64_H
3 
4 /*
5  * Copyright (C) 1999 Hewlett-Packard Co
6  * Copyright (C) 1999 David Mosberger-Tang <davidm@hpl.hp.com>
7  *
8  * vsprintf uses this to divide a 64-bit integer N by a small integer BASE.
9  * This is incredibly hard on IA-64...
10  */
11 
12 #define do_div(n,base)						\
13 ({								\
14 	int _res;						\
15 	_res = ((unsigned long) (n)) % (unsigned) (base);	\
16 	(n) = ((unsigned long) (n)) / (unsigned) (base);	\
17 	_res;							\
18 })
19 
20 #endif /* _ASM_IA64_DIV64_H */
21