aboutsummaryrefslogtreecommitdiff
path: root/S/byte_copyr.S
diff options
context:
space:
mode:
authorKlaatu <[email protected]>2015-05-17 15:33:21 +1200
committerKlaatu <[email protected]>2015-05-17 15:33:21 +1200
commitb0de699679e8f1e39af847ed172d1ba605b4370c (patch)
tree01dac00471d61f727394e508c613b29cff0ceae5 /S/byte_copyr.S
bulk upload of source
Diffstat (limited to 'S/byte_copyr.S')
-rw-r--r--S/byte_copyr.S22
1 files changed, 22 insertions, 0 deletions
diff --git a/S/byte_copyr.S b/S/byte_copyr.S
new file mode 100644
index 0000000..bcc9b21
--- /dev/null
+++ b/S/byte_copyr.S
@@ -0,0 +1,22 @@
+.text
+.globl byte_copyr
+.type byte_copyr, @function
+byte_copyr:
+ pushl %edi
+ pushl %esi
+ movl 12(%esp), %edi
+ movl 20(%esp), %esi
+ movl 16(%esp), %ecx
+
+ decl %edi
+ decl %esi
+ addl %ecx, %edi
+ addl %ecx, %esi
+
+ std
+ rep movsb
+ cld
+
+ popl %esi
+ popl %edi
+ ret