aboutsummaryrefslogtreecommitdiff
path: root/gcc/go
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 /gcc/go
parent5345ac5a110a5fcafaa9bdf3116b8252de2d96c6 (diff)
downloadgcc-fbe4e644c0c8f1303ec91a25b8da6e626976500c.zip
gcc-fbe4e644c0c8f1303ec91a25b8da6e626976500c.tar.gz
gcc-fbe4e644c0c8f1303ec91a25b8da6e626976500c.tar.bz2
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 'gcc/go')
-rw-r--r--gcc/go/ChangeLog4
-rw-r--r--gcc/go/go-gcc.cc9
-rw-r--r--gcc/go/gofrontend/MERGE2
3 files changed, 14 insertions, 1 deletions
diff --git a/gcc/go/ChangeLog b/gcc/go/ChangeLog
index a73072f..10c2b69 100644
--- a/gcc/go/ChangeLog
+++ b/gcc/go/ChangeLog
@@ -1,3 +1,7 @@
+2019-05-08 Cherry Zhang <cherryyz@google.com>
+
+ * go-gcc.cc (Gcc_backend::Gcc_backend): Define memmove builtin.
+
2019-05-07 Cherry Zhang <cherryyz@google.com>
* lang.opt (-fgo-debug-optimization): New option.
diff --git a/gcc/go/go-gcc.cc b/gcc/go/go-gcc.cc
index 1a52d9b..e0e4333 100644
--- a/gcc/go/go-gcc.cc
+++ b/gcc/go/go-gcc.cc
@@ -604,6 +604,15 @@ Gcc_backend::Gcc_backend()
NULL_TREE),
false, false);
+ // We use __builtin_memmove for copying data.
+ this->define_builtin(BUILT_IN_MEMMOVE, "__builtin_memmove", "memmove",
+ build_function_type_list(void_type_node,
+ ptr_type_node,
+ const_ptr_type_node,
+ size_type_node,
+ NULL_TREE),
+ false, false);
+
// Used by runtime/internal/sys.
this->define_builtin(BUILT_IN_CTZ, "__builtin_ctz", "ctz",
build_function_type_list(integer_type_node,
diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE
index 9a80682..c7caf1e 100644
--- a/gcc/go/gofrontend/MERGE
+++ b/gcc/go/gofrontend/MERGE
@@ -1,4 +1,4 @@
-0b4cf8ded107ccbfbd4af7f4e056f23f941d0f86
+3a9bccfbf4af1c756978c40967838d9f6a4e7a62
The first line of this file holds the git revision number of the last
merge done from the gofrontend repository.