aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/lib/udivdi3.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh/lib/udivdi3.c')
-rw-r--r--arch/sh/lib/udivdi3.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/sh/lib/udivdi3.c b/arch/sh/lib/udivdi3.c
new file mode 100644
index 000000000000..68f038bf3c50
--- /dev/null
+++ b/arch/sh/lib/udivdi3.c
@@ -0,0 +1,16 @@
1/*
2 * Simple __udivdi3 function which doesn't use FPU.
3 */
4
5#include <linux/types.h>
6
7extern u64 __xdiv64_32(u64 n, u32 d);
8extern void panic(const char * fmt, ...);
9
10u64 __udivdi3(u64 n, u64 d)
11{
12 if (d & ~0xffffffff)
13 panic("Need true 64-bit/64-bit division");
14 return __xdiv64_32(n, (u32)d);
15}
16