24 lines
339 B
ArmAsm
24 lines
339 B
ArmAsm
|
/*
|
||
|
* Support Functions
|
||
|
*/
|
||
|
|
||
|
#include <errno.h>
|
||
|
#include <machine/asm.h>
|
||
|
|
||
|
.text
|
||
|
|
||
|
// copy_unsafe(to, from, len)
|
||
|
FUNC_BEGIN(copy_unsafe)
|
||
|
movq %rdx, %rcx
|
||
|
rep movsb
|
||
|
.globl copy_unsafe_done
|
||
|
copy_unsafe_done:
|
||
|
xorq %rax, %rax
|
||
|
retq
|
||
|
.globl copy_unsafe_fault
|
||
|
copy_unsafe_fault:
|
||
|
movq $EFAULT, %rax
|
||
|
retq
|
||
|
FUNC_END(copy_unsafe)
|
||
|
|