wasm: implement memcpy and memset

This was reported in issue #805.
This commit is contained in:
Ayke van Laethem
2019-12-30 18:39:46 +01:00
committed by Ron Evans
parent eee1b995f6
commit ab7dc45288
+14
View File
@@ -76,3 +76,17 @@ func memset(ptr unsafe.Pointer, c byte, size uintptr) unsafe.Pointer {
}
return ptr
}
// Implement memmove for LLVM and compiler-rt.
//go:export memmove
func libc_memmove(dst, src unsafe.Pointer, size uintptr) unsafe.Pointer {
memmove(dst, src, size)
return dst
}
// Implement memcpy for LLVM and compiler-rt.
//go:export memcpy
func libc_memcpy(dst, src unsafe.Pointer, size uintptr) unsafe.Pointer {
memcpy(dst, src, size)
return dst
}