kernel: utility: change memcpy back to rep movsb

This commit is contained in:
Benji Dial 2025-12-28 20:15:07 -05:00
parent 35725e0cd0
commit e2188aa407
2 changed files with 11 additions and 21 deletions

View file

@ -20,15 +20,15 @@ default rel
section .text section .text
;global memcpy global memcpy
;memcpy: memcpy:
; mov rcx, rdx mov rcx, rdx
; rep movsb rep movsb
; ret ret
;global memzero global memzero
;memzero: memzero:
; xor al, al xor al, al
; mov rcx, rsi mov rcx, rsi
; rep stosb rep stosb
; ret ret

View file

@ -28,16 +28,6 @@ int strequ(const char *str1, const char *str2) {
} }
} }
void memcpy(void *to, const void *from, uint64_t bytes) {
for (uint64_t i = 0; i < bytes; ++i)
*(uint8_t *)(to + i) = *(const uint8_t *)(from + i);
}
void memzero(void *start, uint64_t bytes) {
for (uint64_t i = 0; i < bytes; ++i)
*(uint8_t *)(start + i) = 0;
}
uint32_t end_swap_u32(uint32_t value) { uint32_t end_swap_u32(uint32_t value) {
return return
(value >> 24) | (value >> 24) |