Save/restore rdi to r10 instead of stack in strcat(),puts()

This commit is contained in:
2025-06-24 15:06:21 +02:00
parent f4162ed21a
commit f10b2f3c88
2 changed files with 4 additions and 8 deletions

View File

@ -54,13 +54,11 @@ strcat:
push rbp
mov rbp, rsp
push rdi
sub rsp, 8
mov r10, rdi
call strlen
add rdi, rax
call strcpy
add rsp, 8
pop rax
mov rax, r10
leave
ret