Skip to content
Snippets Groups Projects
Verified Commit 28a99667 authored by abrahas55's avatar abrahas55
Browse files

added asm to gitignore

parent bb52e634
Branches asm-example
No related tags found
No related merge requests found
# ignore everything # ignore everything
* *.*
# specify files to track # specify files to track
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
# specifics for C # specifics for C
!*.c !*.c
!*.h !*.h
!*.asm
!Makefile !Makefile
# specifics for java # specifics for java
......
; author: Brahms (brahms@spline.de)
global collatz
section .text
collatz:
xor rax, rax
.go:
cmp rdi, 1
jle .end
mov rcx, rdi
lea rdx, [rdi+1+rdi*2]
shr rdi, 1
cmovc rdi, rcx
cmovc rdi, rdx
inc rax
jmp .go
.end:
ret
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment