recreate project as DLL

This commit is contained in:
2017-12-26 15:20:04 +01:00
parent 357d3178aa
commit 51118baca8
14 changed files with 103 additions and 61 deletions

39
test_cases/backwards.asm Normal file
View File

@@ -0,0 +1,39 @@
format ms64 coff
section '.text' code readable executable
use64
public _loop
_loop:
xor eax, eax
inc eax
mov rbx, rdx ; RDX is overwritten by mul
@again:
cmp rbx, 0
je @loop_end
mul rcx
dec rbx
jmp @again
@loop_end:
ret
public _tail_recursion
_tail_recursion:
test ecx, ecx
je @is_0
mov eax, ecx
dec ecx
@loop:
test ecx, ecx
jz @tr_end
mul ecx
dec ecx
jnz @loop
jmp @tr_end
@is_0:
mov eax, 1
@tr_end:
ret