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:
@@ -116,14 +116,8 @@ atoi:
|
||||
mov r9, rsi
|
||||
jmp .calcNum
|
||||
.calcBase_otherLoops:
|
||||
mov rax, rsi
|
||||
mov r9, r8
|
||||
dec r9
|
||||
.calcBaseLoop:
|
||||
mov rax, r9
|
||||
imul rsi
|
||||
dec r9
|
||||
test r9, r9
|
||||
jnz .calcBaseLoop
|
||||
mov r9, rax
|
||||
|
||||
; Calculate number
|
||||
|
Reference in New Issue
Block a user