mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-08 13:03:39 +00:00
compiler: really define runtime.mem* as LLVM intrinsic wrappers
This makes it possible to //go:linkname them from other places, like in the reflect package. And is in my opinion a much cleaner solution.
This commit is contained in:
committed by
Ron Evans
parent
1ceb63d14c
commit
4262f0ff1f
@@ -26,19 +26,19 @@ func GOROOT() string {
|
||||
}
|
||||
|
||||
// Copy size bytes from src to dst. The memory areas must not overlap.
|
||||
// Calls to this function are converted to LLVM intrinsic calls such as
|
||||
// llvm.memcpy.p0i8.p0i8.i32(dst, src, size, false).
|
||||
// This function is implemented by the compiler as a call to a LLVM intrinsic
|
||||
// like llvm.memcpy.p0i8.p0i8.i32(dst, src, size, false).
|
||||
func memcpy(dst, src unsafe.Pointer, size uintptr)
|
||||
|
||||
// Copy size bytes from src to dst. The memory areas may overlap and will do the
|
||||
// correct thing.
|
||||
// Calls to this function are converted to LLVM intrinsic calls such as
|
||||
// llvm.memmove.p0i8.p0i8.i32(dst, src, size, false).
|
||||
// This function is implemented by the compiler as a call to a LLVM intrinsic
|
||||
// like llvm.memmove.p0i8.p0i8.i32(dst, src, size, false).
|
||||
func memmove(dst, src unsafe.Pointer, size uintptr)
|
||||
|
||||
// Set the given number of bytes to zero.
|
||||
// Calls to this function are converted to LLVM intrinsic calls such as
|
||||
// llvm.memset.p0i8.i32(ptr, 0, size, false).
|
||||
// This function is implemented by the compiler as a call to a LLVM intrinsic
|
||||
// like llvm.memset.p0i8.i32(ptr, 0, size, false).
|
||||
func memzero(ptr unsafe.Pointer, size uintptr)
|
||||
|
||||
// This intrinsic returns the current stack pointer.
|
||||
|
||||
Reference in New Issue
Block a user