summaryrefslogtreecommitdiff
path: root/AK/Memory.h
diff options
context:
space:
mode:
authorIdan Horowitz <idan.horowitz@gmail.com>2022-01-25 23:41:26 +0200
committerIdan Horowitz <idan.horowitz@gmail.com>2022-01-26 01:16:43 +0200
commit6e38076b48164ddebf4f83ac99a11ca9385b8e6e (patch)
tree43f3edcee9b120f4705fabf4de6e3b3e7cc7fcbb /AK/Memory.h
parent59ca435172aa0bb60b7723b9bcb8d46132dcb2c8 (diff)
downloadserenity-6e38076b48164ddebf4f83ac99a11ca9385b8e6e.zip
AK: Use x86 specific fast path in fast_u32{fill, copy} on x86_64
Diffstat (limited to 'AK/Memory.h')
-rw-r--r--AK/Memory.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/AK/Memory.h b/AK/Memory.h
index 8b5546f729..a23ca5d219 100644
--- a/AK/Memory.h
+++ b/AK/Memory.h
@@ -17,7 +17,7 @@
ALWAYS_INLINE void fast_u32_copy(u32* dest, const u32* src, size_t count)
{
-#if ARCH(I386)
+#if ARCH(I386) || ARCH(X86_64)
asm volatile(
"rep movsl\n"
: "+S"(src), "+D"(dest), "+c"(count)::"memory");
@@ -28,7 +28,7 @@ ALWAYS_INLINE void fast_u32_copy(u32* dest, const u32* src, size_t count)
ALWAYS_INLINE void fast_u32_fill(u32* dest, u32 value, size_t count)
{
-#if ARCH(I386)
+#if ARCH(I386) || ARCH(X86_64)
asm volatile(
"rep stosl\n"
: "=D"(dest), "=c"(count)