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
Kernel/x86_64 - Unbroke user stack creation
[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
75d544b
..
6ba12a4
100644
(file)
--- a/
Kernel/arch/x86_64/lib.c
+++ b/
Kernel/arch/x86_64/lib.c
@@
-240,6
+240,7
@@
Uint32 ind(Uint16 Port)
}
// === Endianness ===
}
// === Endianness ===
+/*
Uint32 BigEndian32(Uint32 Value)
{
Uint32 ret;
Uint32 BigEndian32(Uint32 Value)
{
Uint32 ret;
@@
-254,6
+255,7
@@
Uint16 BigEndian16(Uint16 Value)
{
return (Value>>8)|(Value<<8);
}
{
return (Value>>8)|(Value<<8);
}
+*/
// === Memory Manipulation ===
int memcmp(const void *__dest, const void *__src, size_t __count)
// === Memory Manipulation ===
int memcmp(const void *__dest, const void *__src, size_t __count)
@@
-359,3
+361,15
@@
void *memsetd(void *__dest, Uint32 __val, size_t __count)
return __dest;
}
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