aboutsummaryrefslogtreecommitdiff
path: root/gcc/go/go-gcc.cc
diff options
context:
space:
mode:
authorTobias Burnus <burnus@net-b.de>2016-09-20 21:49:12 +0000
committerTobias Burnus <burnus@net-b.de>2016-09-20 21:49:12 +0000
commitabf704d05073530028336551d8565aca6403e985 (patch)
tree0ac440db6513ee01deb5e5dc6142769d1e5b7b2d /gcc/go/go-gcc.cc
parentc720aaa3bf123cbfabe14016711f3683d840b6a5 (diff)
parent168ff71ac9c1c9ad651456fc6350b3ab43e6aa2a (diff)
Merge from trunk (r239915 to r240230)fortran-dev
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/fortran-dev@240290 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/go/go-gcc.cc')
-rw-r--r--gcc/go/go-gcc.cc22
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/go/go-gcc.cc b/gcc/go/go-gcc.cc
index 13407ea5d37..a332831b310 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,