public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-5796] aix: Move AIX math builtins before new builtin machinery.
@ 2021-12-05  1:24 David Edelsohn
  0 siblings, 0 replies; only message in thread
From: David Edelsohn @ 2021-12-05  1:24 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:8d4ef2299cbf9517877dab60d48f34835758a6ee

commit r12-5796-g8d4ef2299cbf9517877dab60d48f34835758a6ee
Author: David Edelsohn <dje.gcc@gmail.com>
Date:   Sat Dec 4 20:23:09 2021 -0500

    aix: Move AIX math builtins before new builtin machinery.
    
    The new builtin machinery has an early exit, so move the AIX-specific
    builtins before the new machinery.
    
    gcc/ChangeLog:
    
            * config/rs6000/rs6000-call.c (rs6000_init_builtins): Move
            AIX math builtin initialization before new_builtins_are_live.

Diff:
---
 gcc/config/rs6000/rs6000-call.c | 46 ++++++++++++++++++++---------------------
 1 file changed, 23 insertions(+), 23 deletions(-)

diff --git a/gcc/config/rs6000/rs6000-call.c b/gcc/config/rs6000/rs6000-call.c
index 141d2fc0c2a..d9736eaf21c 100644
--- a/gcc/config/rs6000/rs6000-call.c
+++ b/gcc/config/rs6000/rs6000-call.c
@@ -16479,6 +16479,29 @@ rs6000_init_builtins (void)
       fprintf (stderr, "\nEnd autogenerated built-in functions.\n\n\n");
      }
 
+  if (TARGET_XCOFF)
+    {
+      /* AIX libm provides clog as __clog.  */
+      if ((tdecl = builtin_decl_explicit (BUILT_IN_CLOG)) != NULL_TREE)
+	set_user_assembler_name (tdecl, "__clog");
+
+      /* When long double is 64 bit, some long double builtins of libc
+	 functions (like __builtin_frexpl) must call the double version
+	 (frexp) not the long double version (frexpl) that expects a 128 bit
+	 argument.  */
+      if (! TARGET_LONG_DOUBLE_128)
+	{
+	  if ((tdecl = builtin_decl_explicit (BUILT_IN_FMODL)) != NULL_TREE)
+	    set_user_assembler_name (tdecl, "fmod");
+	  if ((tdecl = builtin_decl_explicit (BUILT_IN_FREXPL)) != NULL_TREE)
+	    set_user_assembler_name (tdecl, "frexp");
+	  if ((tdecl = builtin_decl_explicit (BUILT_IN_LDEXPL)) != NULL_TREE)
+	    set_user_assembler_name (tdecl, "ldexp");
+	  if ((tdecl = builtin_decl_explicit (BUILT_IN_MODFL)) != NULL_TREE)
+	    set_user_assembler_name (tdecl, "modf");
+	}
+    }
+
   if (new_builtins_are_live)
     {
       altivec_builtin_mask_for_load
@@ -16578,29 +16601,6 @@ rs6000_init_builtins (void)
   def_builtin ("__builtin_cpu_is", ftype, RS6000_BUILTIN_CPU_IS);
   def_builtin ("__builtin_cpu_supports", ftype, RS6000_BUILTIN_CPU_SUPPORTS);
 
-  if (TARGET_XCOFF)
-    {
-      /* AIX libm provides clog as __clog.  */
-      if ((tdecl = builtin_decl_explicit (BUILT_IN_CLOG)) != NULL_TREE)
-	set_user_assembler_name (tdecl, "__clog");
-
-      /* When long double is 64 bit, some long double builtins of libc
-	 functions (like __builtin_frexpl) must call the double version
-	 (frexp) not the long double version (frexpl) that expects a 128 bit
-	 argument.  */
-      if (! TARGET_LONG_DOUBLE_128)
-	{
-	  if ((tdecl = builtin_decl_explicit (BUILT_IN_FMODL)) != NULL_TREE)
-	    set_user_assembler_name (tdecl, "fmod");
-	  if ((tdecl = builtin_decl_explicit (BUILT_IN_FREXPL)) != NULL_TREE)
-	    set_user_assembler_name (tdecl, "frexp");
-	  if ((tdecl = builtin_decl_explicit (BUILT_IN_LDEXPL)) != NULL_TREE)
-	    set_user_assembler_name (tdecl, "ldexp");
-	  if ((tdecl = builtin_decl_explicit (BUILT_IN_MODFL)) != NULL_TREE)
-	    set_user_assembler_name (tdecl, "modf");
-	}
-    }
-
 #ifdef SUBTARGET_INIT_BUILTINS
   SUBTARGET_INIT_BUILTINS;
 #endif


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

only message in thread, other threads:[~2021-12-05  1:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-05  1:24 [gcc r12-5796] aix: Move AIX math builtins before new builtin machinery David Edelsohn

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).