patch-2.4.23 linux-2.4.23/arch/sh/lib/udivdi3.c

Next file: linux-2.4.23/arch/sh/mm/__clear_user_page-sh4.S
Previous file: linux-2.4.23/arch/sh/lib/div64.S
Back to the patch index
Back to the overall index

diff -urN linux-2.4.22/arch/sh/lib/udivdi3.c linux-2.4.23/arch/sh/lib/udivdi3.c
@@ -0,0 +1,16 @@
+/*
+ * Simple __udivdi3 function which doesn't use FPU.
+ */
+
+#include <linux/types.h>
+
+extern u64 __xdiv64_32(u64 n, u32 d);
+extern void panic(const char * fmt, ...);
+
+u64 __udivdi3(u64 n, u64 d)
+{
+	if (d & ~0xffffffff)
+		panic("Need true 64-bit/64-bit division");
+	return __xdiv64_32(n, (u32)d);
+}
+

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)