mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-05 07:15:46 +00:00
Add a fast memcpy() using MMX when we're moving >= 1KB.
This is a nice speedup for WindowServer. I'll eventually have to do this with SSE but the kernel doesn't support SSE yet so this is it for now.
This commit is contained in:
@@ -102,8 +102,11 @@ int memcmp(const void* v1, const void* v2, size_t n)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void* memcpy(void *dest_ptr, const void *src_ptr, dword n)
|
||||
void* memcpy(void* dest_ptr, const void* src_ptr, dword n)
|
||||
{
|
||||
if (n >= 1024)
|
||||
return mmx_memcpy(dest_ptr, src_ptr, n);
|
||||
|
||||
dword dest = (dword)dest_ptr;
|
||||
dword src = (dword)src_ptr;
|
||||
// FIXME: Support starting at an unaligned address.
|
||||
|
||||
Reference in New Issue
Block a user