File: div64.h

package info (click to toggle)
linux-kernel-headers 2.5.999-test7-bk-17
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 28,268 kB
  • ctags: 214,024
  • sloc: ansic: 324,929; cpp: 783; makefile: 79; asm: 61; sh: 61
file content (18 lines) | stat: -rw-r--r-- 382 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#ifndef __ASM_ARM_DIV64
#define __ASM_ARM_DIV64

/* We're not 64-bit, but... */
#define do_div(n,base)						\
({								\
	register int __res asm("r2") = base;			\
	register unsigned long long __n asm("r0") = n;		\
	asm("bl do_div64"					\
		: "=r" (__n), "=r" (__res)			\
		: "0" (__n), "1" (__res)			\
		: "r3", "ip", "lr", "cc");			\
	n = __n;						\
	__res;							\
})

#endif