Created
March 4, 2017 21:03
-
-
Save travisdowns/207f4c43e08d196e4280b2d89bd13336 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; compile this like: | |
; nasm -f elf64 decode-test.s | |
default rel | |
BITS 64 | |
GLOBAL _start | |
_start: | |
; iteration count, doesn't really matter much for the purposes of this test | |
mov rsi, 1_000_000 | |
xor eax, eax | |
ALIGN 32 | |
; uncomment the nop below to misalign all the blocks by 1 byte | |
; nop | |
top: | |
; change the number below to affect the total size of the loop | |
%rep 2000 | |
add r8, r8 | |
add r9, r9 | |
add r10, r10 | |
add r11, r11 | |
add r12, 1 | |
%endrep | |
dec esi | |
jnz top | |
.end: | |
xor edi, edi | |
mov eax, 231 ; exit(0) | |
syscall | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment