syslinux-3.08-2 sources from FC4
[bootcd.git] / syslinux / memdisk / memcpy.S
1 # $Id: memcpy.S,v 1.1 2003/04/15 19:31:04 hpa Exp $
2 #
3 # memcpy.S
4 #
5 # Simple memcpy() implementation
6 #
7
8         .text
9         .globl memcpy
10         .type memcpy, @function
11 memcpy:
12         cld
13         pushl %edi
14         pushl %esi
15         movl 12(%esp),%edi
16         movl 16(%esp),%esi
17         movl 20(%esp),%eax
18         movl %eax,%ecx
19         shrl $2,%ecx
20         rep ; movsl
21         movl %eax,%ecx
22         andl $3,%ecx
23         rep ; movsb
24         movl 12(%esp),%eax
25         popl %esi
26         popl %edi
27         ret
28
29         .size memcpy,.-memcpy