opti: use xor instead mov 0

This commit is contained in:
starnakin 2024-09-03 10:44:54 +02:00
parent 50d50092bf
commit a05124885e
3 changed files with 3 additions and 3 deletions

View File

@ -2,7 +2,7 @@ section .text
global ft_strcmp
ft_strcmp:
mov rcx, 0
xor rcx, rcx
loop:
mov dl, [rsi + rcx]

View File

@ -2,7 +2,7 @@ section .text
global ft_strcpy
ft_strcpy:
mov rcx, 0
xor rcx, rcx
loop:
mov al, [rsi + rcx]

View File

@ -2,7 +2,7 @@ section .text
global ft_strlen
ft_strlen:
mov rcx, 0
xor rcx, rcx
loop:
cmp BYTE [rdi + rcx], 0
je out