1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 23:17:45 +00:00

Optimize the Painter::blit() loop a bit. ~3% fewer cycles, I'll take it.

This commit is contained in:
Andreas Kling 2019-01-16 19:43:01 +01:00
parent 7750e6952b
commit f651405694
4 changed files with 22 additions and 15 deletions

View file

@ -20,7 +20,7 @@ ALWAYS_INLINE void fast_dword_copy(dword* dest, const dword* src, size_t count)
#ifdef SERENITY
asm volatile(
"rep movsl\n"
: "=S"(src), "=D"(dest)
: "=S"(src), "=D"(dest), "=c"(count)
: "S"(src), "D"(dest), "c"(count)
: "memory"
);
@ -34,7 +34,7 @@ ALWAYS_INLINE void fast_dword_fill(dword* dest, dword value, size_t count)
#ifdef SERENITY
asm volatile(
"rep stosl\n"
: "=D"(dest)
: "=D"(dest), "=c"(count)
: "D"(dest), "c"(count), "a"(value)
: "memory"
);