git.ucc.asn.au
/
tpg
/
acess2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Usermode/include - A pile of hack known as the Acess fcntl.h
[tpg/acess2.git]
/
Kernel
/
arch
/
x86_64
/
lib.c
diff --git
a/Kernel/arch/x86_64/lib.c
b/Kernel/arch/x86_64/lib.c
index
5f6bdd8
..
6ba12a4
100644
(file)
--- a/
Kernel/arch/x86_64/lib.c
+++ b/
Kernel/arch/x86_64/lib.c
@@
-361,3
+361,15
@@
void *memsetd(void *__dest, Uint32 __val, size_t __count)
return __dest;
}
+Uint64 DivMod64U(Uint64 Num, Uint64 Den, Uint64 *Rem)
+{
+ Uint64 ret, rem;
+ __asm__ __volatile__(
+ "div %4"
+ : "=a" (ret), "=d" (rem)
+ : "a" ( Num ), "d" (0), "r" (Den)
+ );
+ if(Rem) *Rem = rem;
+ return ret;
+}
+
UCC
git Repository :: git.ucc.asn.au