Get rid of unneeded function prologues/epilogues

This commit is contained in:
2025-06-26 07:23:29 +02:00
parent 3730086281
commit fc28643c1a
4 changed files with 6 additions and 103 deletions

View File

@ -19,24 +19,16 @@ section .text
;----- print (char* string) -----;
; return value: N/A
print:
push rbp
mov rbp, rsp
call strlen
mov rdx, rax
mov rax, NR_write
mov rsi, rdi
mov rdi, 1
syscall
leave
ret
;----- puts (char* string) -----;
; return value: N/A
puts:
push rbp
mov rbp, rsp
mov r10, rdi
call print
mov rdi, r10
@ -45,8 +37,6 @@ puts:
mov rsi, NL
mov rdx, 1
syscall
leave
ret
;----- printf(const char* string, ...) -----;
; Currently only supports specifiers: %d, %c, %s, %%