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:
Ayke van Laethem
2022-06-20 15:19:57 +02:00
committed by Ron Evans
parent 1ceb63d14c
commit 4262f0ff1f
4 changed files with 23 additions and 22 deletions
+1 -2
View File
@@ -808,8 +808,7 @@ func (e *ValueError) Error() string {
return "reflect: call of " + e.Method + " on " + e.Kind.String() + " Value"
}
// Calls to this function are converted to LLVM intrinsic calls such as
// llvm.memcpy.p0i8.p0i8.i32().
//go:linkname memcpy runtime.memcpy
func memcpy(dst, src unsafe.Pointer, size uintptr)
//go:linkname alloc runtime.alloc