build.sh: pass OPTS also to linking stage, so -static can be passed
[rofl0r-memcpy-test.git] / memcpy-64.s
bloba83edb8295ce3e265ecb7a1f3a7f761c48f2bb6b
1 .global mymemcpy
2 .type mymemcpy,@function
3 mymemcpy:
4 mov %rdi,%rax
5 cmp $8,%rdx
6 jc 1f
7 test $7,%edi
8 jz 1f
9 2: movsb
10 dec %rdx
11 test $7,%edi
12 jnz 2b
13 1: mov %rdx,%rcx
14 shr $3,%rcx
15 rep
16 movsq
17 and $7,%edx
18 jz 1f
19 2: movsb
20 dec %edx
21 jnz 2b
22 1: ret