metal-cos/sys/amd64/support.S

24 lines
339 B
ArmAsm
Raw Normal View History

2014-10-12 20:17:18 +00:00
/*
* 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)