Go patch committed: Define builtin functions

Message ID CAOyqgcWc4b_LdY2hUaFdqSXXSfCm95ujA0qft8wcBb4fxRSM9g@mail.gmail.com
State Accepted
Headers
Series Go patch committed: Define builtin functions |

Checks

Context Check Description
snail/gcc-patch-check success Github commit url

Commit Message

Ian Lance Taylor Jan. 17, 2023, 5:05 p.m. UTC
  This patch by Andrew Pinski defines two builtin functions that are
used by the middle-end.  This fixes PR 108426.  Bootstrapped and
tested on x86_64-pc-linux-gnu.  Committed to mainline.

Ian

            PR go/108426
            * go-gcc.cc (Gcc_backend::Gcc_backend): Define __builtin_ctzl and
            __builtin_clzl.  Patch by Andrew Pinski.
2bee478038d75487b52e35e29e54c70e4bfa1e2b
  

Patch

diff --git a/gcc/go/go-gcc.cc b/gcc/go/go-gcc.cc
index a4a0e5d903e..07c34a58241 100644
--- a/gcc/go/go-gcc.cc
+++ b/gcc/go/go-gcc.cc
@@ -627,6 +627,11 @@  Gcc_backend::Gcc_backend()
 						unsigned_type_node,
 						NULL_TREE),
 		       builtin_const);
+  this->define_builtin(BUILT_IN_CTZL, "__builtin_ctzl", "ctzl",
+		      build_function_type_list(integer_type_node,
+					       long_unsigned_type_node,
+					       NULL_TREE),
+		      builtin_const);
   this->define_builtin(BUILT_IN_CTZLL, "__builtin_ctzll", "ctzll",
 		       build_function_type_list(integer_type_node,
 						long_long_unsigned_type_node,
@@ -637,6 +642,11 @@  Gcc_backend::Gcc_backend()
 						unsigned_type_node,
 						NULL_TREE),
 		       builtin_const);
+  this->define_builtin(BUILT_IN_CLZL, "__builtin_clzl", "clzl",
+		      build_function_type_list(integer_type_node,
+					       long_unsigned_type_node,
+					       NULL_TREE),
+		      builtin_const);
   this->define_builtin(BUILT_IN_CLZLL, "__builtin_clzll", "clzll",
 		       build_function_type_list(integer_type_node,
 						long_long_unsigned_type_node,