metal-cos/sys/amd64/support.S
2014-10-12 13:17:18 -07:00

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)