Created
November 9, 2015 21:01
-
-
Save kimwalisch/df939440b89081c39f6a to your computer and use it in GitHub Desktop.
primesieve inner sieving loop
This file contains hidden or 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
| ; primesieve inner sieving loop | |
| ; Uses only 11 instructions (x86-64) to cross-off the next 8 multiples | |
| .L99: | |
| andb $-3, (%rax) | |
| andb $-9, (%rax,%r14) | |
| andb $127, (%rax,%r12) | |
| andb $-33, (%rax,%rbp) | |
| andb $-2, (%rax,%r10) | |
| andb $-65, (%rax,%rbx) | |
| andb $-5, (%rax,%r9) | |
| andb $-17, (%rax,%r11) | |
| addq %r13, %rax | |
| cmpq %rdi, %rax | |
| jb .L99 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment