public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Go patch committed: Define builtin functions
@ 2023-01-17 17:05 Ian Lance Taylor
  0 siblings, 0 replies; only message in thread
From: Ian Lance Taylor @ 2023-01-17 17:05 UTC (permalink / raw)
  To: gcc-patches, gofrontend-dev

[-- Attachment #1: Type: text/plain, Size: 349 bytes --]

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.

[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 1144 bytes --]

2bee478038d75487b52e35e29e54c70e4bfa1e2b
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,

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-01-17 17:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-17 17:05 Go patch committed: Define builtin functions Ian Lance Taylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).