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