summaryrefslogtreecommitdiffstats
path: root/mdk-stage1/dietlibc/i386/strcpy.S
diff options
context:
space:
mode:
Diffstat (limited to 'mdk-stage1/dietlibc/i386/strcpy.S')
-rw-r--r--mdk-stage1/dietlibc/i386/strcpy.S24
1 files changed, 24 insertions, 0 deletions
diff --git a/mdk-stage1/dietlibc/i386/strcpy.S b/mdk-stage1/dietlibc/i386/strcpy.S
new file mode 100644
index 000000000..a597436bc
--- /dev/null
+++ b/mdk-stage1/dietlibc/i386/strcpy.S
@@ -0,0 +1,24 @@
+
+.text
+.align 0
+.global strcpy
+.type strcpy,@function
+strcpy:
+ pushl %esi
+ pushl %edi
+
+ movl 12(%esp), %edx
+ movl 16(%esp), %esi
+ movl %edx, %edi
+ cld
+
+.Lloop:
+ lodsb
+ stosb
+ orb %al, %al
+ jnz .Lloop
+
+ popl %edi
+ popl %esi
+ movl %edx,%eax
+ ret