projects
/
drnoksnes
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
d9ca4f8
)
trivial amd64 implementation of memcpy32
author
Javier S. Pedro
<maemo@javispedro.com>
Wed, 22 Dec 2010 02:36:57 +0000
(
03:36
+0100)
committer
Javier S. Pedro
<maemo@javispedro.com>
Wed, 22 Dec 2010 02:36:57 +0000
(
03:36
+0100)
misc_amd64.s
[new file with mode: 0644]
patch
|
blob
diff --git a/misc_amd64.s
b/misc_amd64.s
new file mode 100644
(file)
index 0000000..
c963818
--- /dev/null
+++ b/
misc_amd64.s
@@ -0,0
+1,25
@@
+
+.text
+.global memset32 # int *dest, int c, int count
+
+# rdi = dest, rsi = c, rdx = count
+# stosl: src = eax, dest = es:rdi, rcx = count
+
+memset32:
+ movl %esi, %eax
+ movl %edx, %ecx
+ cld
+ rep stosl
+ ret
+
+.global memcpy32 # int *dest, int *src, int count
+
+# rdi = dest, rsi = src, rdx = count
+# stosl: src = rsi, dest = es:rdi, ecx = count
+
+memcpy32:
+ movl %edx, %ecx
+ cld
+ rep movsl
+ ret
+