Kernel - Added pointer to IRQ callbacks
[tpg/acess2.git] / Kernel / arch / x86_64 / lib.c
index 75d544b..6ba12a4 100644 (file)
@@ -240,6 +240,7 @@ Uint32 ind(Uint16 Port)
 }
 
 // === Endianness ===
+/*
 Uint32 BigEndian32(Uint32 Value)
 {
        Uint32  ret;
@@ -254,6 +255,7 @@ Uint16 BigEndian16(Uint16 Value)
 {
        return  (Value>>8)|(Value<<8);
 }
+*/
 
 // === 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;
 }
 
+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