Archived
14
0
Fork 0
This repository has been archived on 2022-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
linux-2.6/arch/x86_64/lib/memcpy.S

33 lines
422 B
ArmAsm
Raw Normal View History

/* Copyright 2002 Andi Kleen */
#include <asm/cpufeature.h>
/*
* memcpy - Copy a memory block.
*
* Input:
* rdi destination
* rsi source
* rdx count
*
* Output:
* rax original destination
*
* TODO: check best memcpy for PSC
*/
.globl __memcpy
.globl memcpy
.p2align 4
__memcpy:
memcpy:
movq %rdi,%rax
movl %edx,%ecx
shrl $3,%ecx
andl $7,%edx
rep
movsq
movl %edx,%ecx
rep
movsb
ret