]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
go: define two builtin functions used by middle-end
authorIan Lance Taylor <iant@golang.org>
Tue, 17 Jan 2023 17:02:49 +0000 (09:02 -0800)
committerIan Lance Taylor <iant@golang.org>
Tue, 17 Jan 2023 17:05:20 +0000 (09:05 -0800)
PR go/108426
* go-gcc.cc (Gcc_backend::Gcc_backend): Define __builtin_ctzl and
__builtin_clzl.  Patch by Andrew Pinski.

gcc/go/go-gcc.cc

index a4a0e5d903eb5e508ed7a28ecf65d7a785265e7c..07c34a58241b164825cacfe2c94f79c522fed8c1 100644 (file)
@@ -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,