atoi(): Don't use extra loop for calculating base^n; r9 already holds previous value so just do r9*rsi ( [previous base^n] * base)

This commit is contained in:
2025-07-20 11:47:31 +02:00
parent 3510139c25
commit aef72931a3

View File

@@ -116,14 +116,8 @@ atoi:
mov r9, rsi
jmp .calcNum
.calcBase_otherLoops:
mov rax, rsi
mov r9, r8
dec r9
.calcBaseLoop:
imul rsi
dec r9
test r9, r9
jnz .calcBaseLoop
mov rax, r9
imul rsi
mov r9, rax
; Calculate number