|
@@ -11,14 +11,18 @@
|
|
|
|
|
|
#include <AK/Types.h>
|
|
#include <AK/Types.h>
|
|
|
|
|
|
|
|
+#ifndef KERNEL
|
|
extern "C" void* mmx_memcpy(void* to, const void* from, size_t);
|
|
extern "C" void* mmx_memcpy(void* to, const void* from, size_t);
|
|
|
|
+#endif
|
|
|
|
|
|
[[gnu::always_inline]] inline void fast_dword_copy(dword* dest, const dword* src, size_t count)
|
|
[[gnu::always_inline]] inline void fast_dword_copy(dword* dest, const dword* src, size_t count)
|
|
{
|
|
{
|
|
|
|
+#ifndef KERNEL
|
|
if (count >= 256) {
|
|
if (count >= 256) {
|
|
mmx_memcpy(dest, src, count * sizeof(count));
|
|
mmx_memcpy(dest, src, count * sizeof(count));
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
+#endif
|
|
asm volatile(
|
|
asm volatile(
|
|
"rep movsl\n"
|
|
"rep movsl\n"
|
|
: "=S"(src), "=D"(dest), "=c"(count)
|
|
: "=S"(src), "=D"(dest), "=c"(count)
|