summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhpa <hpa>2003-04-14 22:28:30 +0000
committerhpa <hpa>2003-04-14 22:28:30 +0000
commit6d306e65c4900e19f4cd0edac89747a8b4844c7e (patch)
tree561de57e0e0849b4e72a2a716ab65c05fc613145
parent476c12b58c2ffce36ae7e99df0e55a0feb69ed35 (diff)
downloadsyslinux-6d306e65c4900e19f4cd0edac89747a8b4844c7e.tar.gz
Use standard memset()
-rw-r--r--memdisk/memset.S30
1 files changed, 30 insertions, 0 deletions
diff --git a/memdisk/memset.S b/memdisk/memset.S
new file mode 100644
index 00000000..d7dabe12
--- /dev/null
+++ b/memdisk/memset.S
@@ -0,0 +1,30 @@
+# $Id$
+#
+# memset.S
+#
+# Simple memset() implementation
+#
+
+ .text
+ .globl memset
+ .type memset, @function
+memset:
+ cld
+ pushl %edi
+ pushl %esi
+ movl 12(%esp),%edi
+ movzbl 16(%esp),%eax
+ movl 20(%esp),%esi
+ imull $0x01010101,%eax
+ movl %esi,%ecx
+ shrl $2,%ecx
+ rep ; stosl
+ movl %esi,%ecx
+ andl $3,%ecx
+ rep ; stosb
+ movl 12(%esp),%eax
+ popl %esi
+ popl %edi
+ ret
+
+ .size memcpy,.-memcpy