simplify _loop so that the "prologe" is shorter and the jump is back into
the first < 5 bytes
This commit is contained in:
@@ -6,16 +6,13 @@ use64
|
||||
|
||||
public _loop
|
||||
_loop:
|
||||
xor eax, eax
|
||||
inc eax
|
||||
mov rbx, rdx ; RDX is overwritten by mul
|
||||
@again:
|
||||
cmp rbx, 0
|
||||
je @loop_end
|
||||
mov rax, rcx
|
||||
@loop_loop:
|
||||
mul rcx
|
||||
dec rbx
|
||||
jmp @again
|
||||
@loop_end:
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
loop @loop_loop ; lol
|
||||
ret
|
||||
|
||||
public _tail_recursion
|
||||
|
||||
Reference in New Issue
Block a user