From a48212cb65e09669ed243581556529681cebba0a Mon Sep 17 00:00:00 2001 From: "iap10@labyrinth.cl.cam.ac.uk" Date: Mon, 24 Feb 2003 16:55:07 +0000 Subject: bitkeeper revision 1.93 (3e5a4e6bkPheUp3x1uufN2MS3LAB7A) Latest and Greatest version of XenoLinux based on the Linux-2.4.21-pre4 kernel. --- xenolinux-2.4.21-pre4-sparse/include/asm-xeno/div64.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 xenolinux-2.4.21-pre4-sparse/include/asm-xeno/div64.h (limited to 'xenolinux-2.4.21-pre4-sparse/include/asm-xeno/div64.h') diff --git a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/div64.h b/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/div64.h new file mode 100644 index 0000000000..ef915df700 --- /dev/null +++ b/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/div64.h @@ -0,0 +1,17 @@ +#ifndef __I386_DIV64 +#define __I386_DIV64 + +#define do_div(n,base) ({ \ + unsigned long __upper, __low, __high, __mod; \ + asm("":"=a" (__low), "=d" (__high):"A" (n)); \ + __upper = __high; \ + if (__high) { \ + __upper = __high % (base); \ + __high = __high / (base); \ + } \ + asm("divl %2":"=a" (__low), "=d" (__mod):"rm" (base), "0" (__low), "1" (__upper)); \ + asm("":"=A" (n):"a" (__low),"d" (__high)); \ + __mod; \ +}) + +#endif -- cgit v1.2.3