zero AL, not RAX in strlen() (SCASB uses AL, so no need to zero all bits)

This commit is contained in:
2025-07-06 10:53:23 +02:00
parent a193054304
commit a3a128354d

View File

@@ -11,7 +11,7 @@ section .text
; rdi* (arg) Pointer to str[] ; rdi* (arg) Pointer to str[]
; rcx* Counter for scasb ; rcx* Counter for scasb
strlen: strlen:
xor rax, rax xor al, al
mov rcx, -1 mov rcx, -1
cld cld
repne scasb repne scasb