printf: Shorten code; MOV RDX, R13 instead of bunch of checks (originally I intended to use NOT R12 if padding with zeroes)

This commit is contained in:
2025-07-12 08:10:43 +02:00
parent ee17ec68e0
commit b327248e0c
2 changed files with 2 additions and 17 deletions

View File

@@ -195,9 +195,6 @@ printf:
loop .getPaddingLoop
pop rax
pop rdi
test r13, r13
jz .noPadding
not r12
.noPadding:
cmp byte [rdi + 1], 'c'
je .rep_c
@@ -278,20 +275,8 @@ printf:
load_arg rsi
push_regs
mov rdi, rsi
;
mov rdx, 0
test r12, r12
jz .callB2S
test r12, r12
js .notB2S
jmp .callB2S
.notB2S:
not r12
mov rdx, 1
jmp .callB2S
;
.callB2S:
mov rsi, r12
mov rdx, r13
call bin2str
mov rsi, rax
pop_regs