This patch to the GCC portion of the Go frontend corrects the type
used for long double builtin math functions with one argument.  This
lets gccgo inline calls to sqrt, cos, etc., on 32-bit x86.  The math
package in libgo uses this feature.  Previously it was generating
function calls rather than using the direct instruction (fsqrt, etc.).
Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu.  Committed
to mainline.

Ian

2018-01-05  Ian Lance Taylor  <i...@golang.org>

* go-gcc.cc (Gcc_backend::Gcc_backend): Correct
math_function_type_long to take one argument.
Index: go-gcc.cc
===================================================================
--- go-gcc.cc   (revision 256262)
+++ go-gcc.cc   (working copy)
@@ -633,7 +633,7 @@ Gcc_backend::Gcc_backend()
                                                     NULL_TREE);
   tree math_function_type_long =
     build_function_type_list(long_double_type_node, long_double_type_node,
-                            long_double_type_node, NULL_TREE);
+                            NULL_TREE);
   tree math_function_type_two = build_function_type_list(double_type_node,
                                                         double_type_node,
                                                         double_type_node,

Reply via email to