public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Go patch committed: Correct type of long double builtin math functions
@ 2018-01-06  1:11 Ian Lance Taylor
  0 siblings, 0 replies; only message in thread
From: Ian Lance Taylor @ 2018-01-06  1:11 UTC (permalink / raw)
  To: gcc-patches, gofrontend-dev

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

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.

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

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,

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

only message in thread, other threads:[~2018-01-06  1:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-06  1:11 Go patch committed: Correct type of long double builtin math 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).