aboutsummaryrefslogblamecommitdiffstats
path: root/arch/sh/lib/udivdi3.c
blob: 68f038bf3c50283545363d06e54839666395ab55 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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);
}