summaryrefslogtreecommitdiff
path: root/memdisk
diff options
context:
space:
mode:
authorhpa <hpa>2003-04-15 19:31:04 +0000
committerhpa <hpa>2003-04-15 19:31:04 +0000
commitab763517436a177edc160c73656aba35db0f368d (patch)
tree52e6f9f9bb1f8a7599bdb07d5132970262ca607c /memdisk
parent46a381fa0c970ffb89315db92614fa0b4eff912c (diff)
downloadsyslinux-ab763517436a177edc160c73656aba35db0f368d.tar.gz
Simple memcpy() implementationsyslinux-2.03
Diffstat (limited to 'memdisk')
-rw-r--r--memdisk/memcpy.S29
1 files changed, 29 insertions, 0 deletions
diff --git a/memdisk/memcpy.S b/memdisk/memcpy.S
new file mode 100644
index 00000000..61c35b9b
--- /dev/null
+++ b/memdisk/memcpy.S
@@ -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