]> pilppa.org Git - linux-2.6-omap-h63xx.git/blob - arch/x86_64/lib/memcpy.S
Merge branch 'linville-e1000' of git://git.tuxdriver.com/git/netdev-jwl
[linux-2.6-omap-h63xx.git] / arch / x86_64 / lib / memcpy.S
1 /* Copyright 2002 Andi Kleen */
2         
3         #include <asm/cpufeature.h>             
4 /*
5  * memcpy - Copy a memory block.
6  *
7  * Input:       
8  * rdi destination
9  * rsi source
10  * rdx count
11  * 
12  * Output:
13  * rax original destination
14  * 
15  * TODO: check best memcpy for PSC
16  */     
17
18         .globl __memcpy
19         .globl memcpy
20         .p2align 4
21 __memcpy:
22 memcpy:         
23         movq %rdi,%rax
24         movl %edx,%ecx
25         shrl $3,%ecx
26         andl $7,%edx    
27         rep 
28         movsq 
29         movl %edx,%ecx
30         rep
31         movsb
32         ret