diff mbox

use build_function_type_list in the ia64 backend

Message ID 20110420192919.GE6507@nightcrawler
State New
Headers show

Commit Message

Nathan Froyd April 20, 2011, 7:29 p.m. UTC
As $SUBJECT suggests.  Tested with cross to ia64-linux-gnu.  OK to
commit?

-Nathan

	* config/ia64/ia64.c (ia64_init_builtins): Call
	build_function_type_list instead of builtin_function_type.

Comments

Nathan Froyd April 20, 2011, 8:03 p.m. UTC | #1
On Wed, Apr 20, 2011 at 03:29:19PM -0400, Nathan Froyd wrote:
> As $SUBJECT suggests.  Tested with cross to ia64-linux-gnu.  OK to
> commit?
>
> -      ftype = build_function_type (float128_type, void_list_node);
> -      decl = add_builtin_function ("__builtin_infq", ftype,
> -				   IA64_BUILTIN_INFQ, BUILT_IN_MD,
> -				   NULL, NULL_TREE);
> -      ia64_builtins[IA64_BUILTIN_INFQ] = decl;
> +      ftype = build_function_type_list (float128_type, NULL_TREE);
> +      add_builtin_function ("__builtin_infq", ftype,
> +			    IA64_BUILTIN_INFQ, BUILT_IN_MD,
> +			    NULL, NULL_TREE);

Of course, the patch I tested didn't delete the assignment to
ia64_builtins.  Please disregard that bit.

-Nathan
Steve Ellcey April 20, 2011, 9:09 p.m. UTC | #2
On Wed, 2011-04-20 at 13:03 -0700, Nathan Froyd wrote:
> On Wed, Apr 20, 2011 at 03:29:19PM -0400, Nathan Froyd wrote:
> > As $SUBJECT suggests.  Tested with cross to ia64-linux-gnu.  OK to
> > commit?
> >
> > -      ftype = build_function_type (float128_type, void_list_node);
> > -      decl = add_builtin_function ("__builtin_infq", ftype,
> > -				   IA64_BUILTIN_INFQ, BUILT_IN_MD,
> > -				   NULL, NULL_TREE);
> > -      ia64_builtins[IA64_BUILTIN_INFQ] = decl;
> > +      ftype = build_function_type_list (float128_type, NULL_TREE);
> > +      add_builtin_function ("__builtin_infq", ftype,
> > +			    IA64_BUILTIN_INFQ, BUILT_IN_MD,
> > +			    NULL, NULL_TREE);
> 
> Of course, the patch I tested didn't delete the assignment to
> ia64_builtins.  Please disregard that bit.
> 
> -Nathan

I am not sure what the patch would look like then.  You removed the
assignment to decl, so what are you putting in ia64_builtins?  Can you
send the full correct patch.

Steve Ellcey
sje@cup.hp.com
diff mbox

Patch

diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c
index 5f22b17..166ec43 100644
--- a/gcc/config/ia64/ia64.c
+++ b/gcc/config/ia64/ia64.c
@@ -10165,11 +10165,10 @@  ia64_init_builtins (void)
       (*lang_hooks.types.register_builtin_type) (float128_type, "__float128");
 
       /* TFmode support builtins.  */
-      ftype = build_function_type (float128_type, void_list_node);
-      decl = add_builtin_function ("__builtin_infq", ftype,
-				   IA64_BUILTIN_INFQ, BUILT_IN_MD,
-				   NULL, NULL_TREE);
-      ia64_builtins[IA64_BUILTIN_INFQ] = decl;
+      ftype = build_function_type_list (float128_type, NULL_TREE);
+      add_builtin_function ("__builtin_infq", ftype,
+			    IA64_BUILTIN_INFQ, BUILT_IN_MD,
+			    NULL, NULL_TREE);
 
       decl = add_builtin_function ("__builtin_huge_valq", ftype,
 				   IA64_BUILTIN_HUGE_VALQ, BUILT_IN_MD,
@@ -10211,15 +10210,13 @@  ia64_init_builtins (void)
   add_builtin_function ((name), (type), (code), BUILT_IN_MD,	\
 		       NULL, NULL_TREE)
 
-  decl = def_builtin ("__builtin_ia64_bsp",
-	       build_function_type (ptr_type_node, void_list_node),
+  def_builtin ("__builtin_ia64_bsp",
+	       build_function_type_list (ptr_type_node, NULL_TREE),
 	       IA64_BUILTIN_BSP);
-  ia64_builtins[IA64_BUILTIN_BSP] = decl;
 
-  decl = def_builtin ("__builtin_ia64_flushrs",
-	       build_function_type (void_type_node, void_list_node),
+  def_builtin ("__builtin_ia64_flushrs",
+	       build_function_type_list (void_type_node, NULL_TREE),
 	       IA64_BUILTIN_FLUSHRS);
-  ia64_builtins[IA64_BUILTIN_FLUSHRS] = decl;
 
 #undef def_builtin