build.sh: pass OPTS also to linking stage, so -static can be passed
[rofl0r-memcpy-test.git] / memcpy_1_i386.s
blob16e7b59b593a5593f5fa21c91eeaa6c1b667ec27
1 .global mymemcpy
2 .type mymemcpy,@function
3 mymemcpy:
4 push %esi
5 push %edi
6 mov 12(%esp),%edi
7 mov 16(%esp),%esi
8 mov 20(%esp),%ecx
9 mov %edi,%eax
10 mov %ecx,%edx
11 shr $2,%ecx
12 rep
13 movsl
14 and $3,%edx
15 jz 1f
16 2: mov (%esi),%cl
17 mov %cl,(%edi)
18 inc %esi
19 inc %edi
20 dec %edx
21 jnz 2b
22 1: pop %edi
23 pop %esi
24 ret