mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-28 04:48:16 +00:00
This is the difference between two commits criu-dev/b0f6f293/Unify own memcpy/memset/memcmp master/0367a1fe/Drop prefix from own memcpy/memset/memcmp that makes criu-dev after rebase on master with latter commit be the same as it was with former commit before rebase. Signed-off-by: Kir Kolyshkin <kir@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
29 lines
518 B
ArmAsm
29 lines
518 B
ArmAsm
#include "common/asm/linkage.h"
|
|
|
|
/* The following code is taken from Linux kernel (arch/x86/lib/memcpy_64.S).
|
|
* There are 3 implementations in there, we use the one that relies on
|
|
* X86_FEATURE_REP_GOOD ("rep microcode works well").
|
|
*/
|
|
|
|
/*
|
|
* memcpy - Copy a memory block.
|
|
*
|
|
* Input:
|
|
* rdi destination
|
|
* rsi source
|
|
* rdx count
|
|
*
|
|
* Output:
|
|
* rax original destination
|
|
*/
|
|
ENTRY(memcpy)
|
|
movq %rdi, %rax
|
|
movq %rdx, %rcx
|
|
shrq $3, %rcx
|
|
andl $7, %edx
|
|
rep movsq
|
|
movl %edx, %ecx
|
|
rep movsb
|
|
ret
|
|
END(memcpy)
|