mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-09 05:23:40 +00:00
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:
committed by
Ron Evans
parent
b4859240e1
commit
e0ebc75df2
@@ -132,3 +132,9 @@ func libc_memset(ptr unsafe.Pointer, c byte, size uintptr) {
|
|||||||
func libc_memmove(dst, src unsafe.Pointer, size uintptr) {
|
func libc_memmove(dst, src unsafe.Pointer, size uintptr) {
|
||||||
memmove(dst, src, size)
|
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)
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user