[PATCH] use build_function_type_list in the ia64 backend
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. 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
Re: [PATCH] use build_function_type_list in the ia64 backend
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
Re: [PATCH] use build_function_type_list in the ia64 backend
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 s...@cup.hp.com
Re: [PATCH] use build_function_type_list in the ia64 backend
On Wed, Apr 20, 2011 at 02:09:49PM -0700, Steve Ellcey wrote: 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. Sure. Updated patch below, which probably looks somewhat more sane. -Nathan diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c index 5f22b17..880aa8d 100644 --- a/gcc/config/ia64/ia64.c +++ b/gcc/config/ia64/ia64.c @@ -10165,7 +10165,7 @@ 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); + ftype = build_function_type_list (float128_type, NULL_TREE); decl = add_builtin_function (__builtin_infq, ftype, IA64_BUILTIN_INFQ, BUILT_IN_MD, NULL, NULL_TREE); @@ -10212,13 +10212,13 @@ ia64_init_builtins (void) NULL, NULL_TREE) decl = def_builtin (__builtin_ia64_bsp, - build_function_type (ptr_type_node, void_list_node), - IA64_BUILTIN_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), - IA64_BUILTIN_FLUSHRS); + build_function_type_list (void_type_node, NULL_TREE), + IA64_BUILTIN_FLUSHRS); ia64_builtins[IA64_BUILTIN_FLUSHRS] = decl; #undef def_builtin
Re: [PATCH] use build_function_type_list in the ia64 backend
On Wed, 2011-04-20 at 17:25 -0400, Nathan Froyd wrote: On Wed, Apr 20, 2011 at 02:09:49PM -0700, Steve Ellcey wrote: 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. Sure. Updated patch below, which probably looks somewhat more sane. -Nathan OK, that looks good. Steve Ellcey s...@cup.hp.com