Simple memcpy() implementation
authorhpa <hpa>
Tue, 15 Apr 2003 19:31:04 +0000 (19:31 +0000)
committerhpa <hpa>
Tue, 15 Apr 2003 19:31:04 +0000 (19:31 +0000)
memdisk/memcpy.S [new file with mode: 0644]

diff --git a/memdisk/memcpy.S b/memdisk/memcpy.S
new file mode 100644 (file)
index 0000000..61c35b9
--- /dev/null
@@ -0,0 +1,29 @@
+# $Id$
+#
+# memcpy.S
+#
+# Simple memcpy() implementation
+#
+
+       .text
+       .globl memcpy
+       .type memcpy, @function
+memcpy:
+       cld
+       pushl %edi
+       pushl %esi
+       movl 12(%esp),%edi
+       movl 16(%esp),%esi
+       movl 20(%esp),%eax
+       movl %eax,%ecx
+       shrl $2,%ecx
+       rep ; movsl
+       movl %eax,%ecx
+       andl $3,%ecx
+       rep ; movsb
+       movl 12(%esp),%eax
+       popl %esi
+       popl %edi
+       ret
+
+       .size memcpy,.-memcpy