runtime: implement memcpy

A call to memcpy is sometimes created by the compiler, for example when
compiling with -opt=s or opt=2.
This commit is contained in:
Ayke van Laethem
2019-09-16 14:11:53 +02:00
committed by Ron Evans
parent b4859240e1
commit e0ebc75df2
+6
View File
@@ -132,3 +132,9 @@ func libc_memset(ptr unsafe.Pointer, c byte, size uintptr) {
func libc_memmove(dst, src unsafe.Pointer, size uintptr) {
memmove(dst, src, size)
}
// Implement memcpy for LLVM and compiler-rt.
//go:export memcpy
func libc_memcpy(dst, src unsafe.Pointer, size uintptr) {
memcpy(dst, src, size)
}