diff mbox series

Go patch committed: Correct type of long double builtin math functions

Message ID CAOyqgcXOCBAoZ=btUk+OqvMWbnUcvYhwQTc_NhwcnseLNzE6HQ@mail.gmail.com
State New
Headers show
Series Go patch committed: Correct type of long double builtin math functions | expand

Commit Message

Ian Lance Taylor Jan. 6, 2018, 1:11 a.m. UTC
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  <iant@golang.org>

* go-gcc.cc (Gcc_backend::Gcc_backend): Correct
math_function_type_long to take one argument.
diff mbox series

Patch

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,