a667bbcb34588418d4b5a0cc014edfe9049b3dee
[reactos.git] / lib / crtdll / string / memmove.s
1 /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
2         .file "memmove.s"
3         .globl  _memmove
4 _memmove:
5         pushl   %ebp
6         movl    %esp,%ebp
7         pushl   %esi
8         pushl   %edi
9         movl    8(%ebp),%edi
10         movl    12(%ebp),%esi
11         movl    16(%ebp),%ecx
12         jecxz   L2
13         cld
14         cmpl    %esi,%edi
15         jb      L3
16
17         std
18         addl    %ecx,%esi
19         addl    %ecx,%edi
20         decl    %esi
21         decl    %edi
22 L3:
23         rep
24         movsb
25
26 L2:
27         cld
28         popl    %edi
29         popl    %esi
30         movl    8(%ebp),%eax
31         leave
32         ret
33