summaryrefslogtreecommitdiff
path: root/libgo/go/runtime
diff options
context:
space:
mode:
authorCherry Zhang <cherryyz@google.com>2019-05-08 17:40:45 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2019-05-08 17:40:45 +0000
commitfbe4e644c0c8f1303ec91a25b8da6e626976500c (patch)
tree87a1cfc98677c590f437af9209a3c78b34b5e9ef /libgo/go/runtime
parent5345ac5a110a5fcafaa9bdf3116b8252de2d96c6 (diff)
runtime: use builtin memmove directly
We can use the intrinsic memmove directly, without going through C. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/170004 * go-gcc.cc (Gcc_backend::Gcc_backend): Define memmove builtin. From-SVN: r271016
Diffstat (limited to 'libgo/go/runtime')
-rw-r--r--libgo/go/runtime/stubs.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/libgo/go/runtime/stubs.go b/libgo/go/runtime/stubs.go
index dfdb38e8010..435cdf7ce92 100644
--- a/libgo/go/runtime/stubs.go
+++ b/libgo/go/runtime/stubs.go
@@ -100,6 +100,7 @@ func reflect_memclrNoHeapPointers(ptr unsafe.Pointer, n uintptr) {
// memmove copies n bytes from "from" to "to".
//go:noescape
+//extern __builtin_memmove
func memmove(to, from unsafe.Pointer, n uintptr)
//go:linkname reflect_memmove reflect.memmove