mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-21 15:14:13 +00:00
Kernel/LibC: Make memset implementations the same
I dont know why we do a fast path in the Kernel, but not in Userspace Also simplified the byte explosion in memset to "explode_byte" it even seemed so, that we missed the highest byte when memseting something
This commit is contained in:
committed by
Andreas Kling
parent
74de4795dc
commit
e8ef10e2a6
@@ -282,9 +282,7 @@ void* memset(void* dest_ptr, int c, size_t n)
|
||||
// FIXME: Support starting at an unaligned address.
|
||||
if (!(dest & 0x3) && n >= 12) {
|
||||
size_t size_ts = n / sizeof(size_t);
|
||||
size_t expanded_c = (u8)c;
|
||||
expanded_c |= expanded_c << 8;
|
||||
expanded_c |= expanded_c << 16;
|
||||
size_t expanded_c = explode_byte((u8)c);
|
||||
asm volatile(
|
||||
"rep stosl\n"
|
||||
: "=D"(dest)
|
||||
|
||||
Reference in New Issue
Block a user