From 91d733e1ca11bfb60afa7191b1fba12cc4966f76 Mon Sep 17 00:00:00 2001 From: ian Date: Sun, 11 Sep 2016 13:23:27 +0000 Subject: 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 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@240083 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/go/go-gcc.cc | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'gcc/go/go-gcc.cc') 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, -- cgit v1.2.1