aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2016-09-11 13:23:27 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2016-09-11 13:23:27 +0000
commita846424359772bfe8d76fae153e1cc21f02876a1 (patch)
tree0815e13095e63e030ca2a15736d99e36938b55cb /gcc
parenta1cd04ace88932053e171a2df5d1c7f41329a851 (diff)
downloadgcc-a846424359772bfe8d76fae153e1cc21f02876a1.zip
gcc-a846424359772bfe8d76fae153e1cc21f02876a1.tar.gz
gcc-a846424359772bfe8d76fae153e1cc21f02876a1.tar.bz2
runtime/internal/sys: new package, API copied from Go 1.7
Copy over the Go 1.7 runtime/internal/sys package, but instead of having separate files for each GOARCH and GOOS value, set the values in configure.ac and write them out in Makefile.am. Setting the values in configure.ac should make it easier to add new processors. Remove the automake GOARCH conditionals, which are no longer used. Leave the GOOS conditionals for now, as they are used for the C runtime package. Reviewed-on: https://go-review.googlesource.com/29018 From-SVN: r240083
Diffstat (limited to 'gcc')
-rw-r--r--gcc/go/ChangeLog5
-rw-r--r--gcc/go/go-gcc.cc22
-rw-r--r--gcc/go/gofrontend/MERGE2
3 files changed, 28 insertions, 1 deletions
diff --git a/gcc/go/ChangeLog b/gcc/go/ChangeLog
index 4603308..9351dda 100644
--- a/gcc/go/ChangeLog
+++ b/gcc/go/ChangeLog
@@ -1,3 +1,8 @@
+2016-09-11 Ian Lance Taylor <iant@golang.org>
+
+ * go-gcc.cc (Gcc_backend::Gcc_backend): Add builtin versions of
+ ctz, ctzll, bswap32, bswap64.
+
2016-09-10 Ian Lance Taylor <iant@golang.org>
* go-backend.c (go_trampoline_info): Remove.
diff --git a/gcc/go/go-gcc.cc b/gcc/go/go-gcc.cc
index 13407ea..a332831 100644
--- a/gcc/go/go-gcc.cc
+++ b/gcc/go/go-gcc.cc
@@ -692,6 +692,28 @@ Gcc_backend::Gcc_backend()
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,
+ unsigned_type_node,
+ NULL_TREE),
+ true, false);
+ this->define_builtin(BUILT_IN_CTZLL, "__builtin_ctzll", "ctzll",
+ build_function_type_list(integer_type_node,
+ long_long_unsigned_type_node,
+ NULL_TREE),
+ true, false);
+ this->define_builtin(BUILT_IN_BSWAP32, "__builtin_bswap32", "bswap32",
+ build_function_type_list(uint32_type_node,
+ uint32_type_node,
+ NULL_TREE),
+ true, false);
+ this->define_builtin(BUILT_IN_BSWAP64, "__builtin_bswap64", "bswap64",
+ build_function_type_list(uint64_type_node,
+ uint64_type_node,
+ NULL_TREE),
+ true, false);
+
// We provide some functions for the math library.
tree math_function_type = build_function_type_list(double_type_node,
double_type_node,
diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE
index 7b3a8aa..65badea 100644
--- a/gcc/go/gofrontend/MERGE
+++ b/gcc/go/gofrontend/MERGE
@@ -1,4 +1,4 @@
-d3a145b111a4f4ea772b812c6a0b3a853c207819
+841bea960b1f097e2cff5ad2618800296dcd4ec2
The first line of this file holds the git revision number of the last
merge done from the gofrontend repository.