Proper SYS V ABI use (don't restore rsi in itoa)

This commit is contained in:
2025-06-25 13:31:48 +02:00
parent f5e1143138
commit 266cb57d1c
2 changed files with 3 additions and 2 deletions

View File

@ -110,7 +110,9 @@ printf:
push rdx
push r8
push r10
push rsi
call itoa
pop rsi
pop r10
pop r8
pop rdx

View File

@ -173,7 +173,6 @@ itoa:
mov byte [rsi], 0
.quit:
pop rsi
mov rax, rsi
pop rax
leave
ret