summaryrefslogtreecommitdiff
path: root/include/asm-ppc64/div64.h
blob: 22ba87033456548464503d26c266348f4ecf777f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#ifndef __PPC_DIV64
#define __PPC_DIV64

/* Copyright 2001 PPC64 Team, IBM Corp
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version
 * 2 of the License, or (at your option) any later version.
 */

#define do_div(n,base) ({ \
	int __res; \
	__res = ((unsigned long) (n)) % (unsigned) (base); \
	(n) = ((unsigned long) (n)) / (unsigned) (base); \
	__res; })

#endif