sync hh.org
[hh.org.git] / arch / sh / lib / udivdi3.c
blob68f038bf3c50283545363d06e54839666395ab55
1 /*
2 * Simple __udivdi3 function which doesn't use FPU.
3 */
5 #include <linux/types.h>
7 extern u64 __xdiv64_32(u64 n, u32 d);
8 extern void panic(const char * fmt, ...);
10 u64 __udivdi3(u64 n, u64 d)
12 if (d & ~0xffffffff)
13 panic("Need true 64-bit/64-bit division");
14 return __xdiv64_32(n, (u32)d);