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 rdx
push r8 push r8
push r10 push r10
push rsi
call itoa call itoa
pop rsi
pop r10 pop r10
pop r8 pop r8
pop rdx pop rdx

View File

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