projects
/
xen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
229492e
)
x86/memcpy: reduce code size
author
Andrew Cooper
<andrew.cooper3@citrix.com>
Wed, 3 Jun 2015 07:28:05 +0000
(09:28 +0200)
committer
Jan Beulich
<jbeulich@suse.com>
Wed, 3 Jun 2015 07:28:05 +0000
(09:28 +0200)
'n % BYTES_PER_LONG' is at most 7, and doesn't need a 64bit register mov.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/string.c
patch
|
blob
|
history
diff --git
a/xen/arch/x86/string.c
b/xen/arch/x86/string.c
index 3af0ea8bec4a7a0e84d4d1fdd0241f39aec634e0..043ae6615d79826783cc10ff6437fb88922e6d64 100644
(file)
--- a/
xen/arch/x86/string.c
+++ b/
xen/arch/x86/string.c
@@
-15,7
+15,7
@@
void *memcpy(void *dest, const void *src, size_t n)
asm volatile (
" rep ; movs"__OS" ; "
- " mov %
4,%3
; "
+ " mov %
k4,%k3
; "
" rep ; movsb "
: "=&c" (d0), "=&D" (d1), "=&S" (d2)
: "0" (n/BYTES_PER_LONG), "r" (n%BYTES_PER_LONG), "1" (dest), "2" (src)