From ff6bb9dde10ab665a35bb75527313cd9f7d52f8e Mon Sep 17 00:00:00 2001 From: Bill Schmidt Date: Fri, 27 Aug 2021 09:55:29 -0500 Subject: [PATCH] rs6000: Execute the automatic built-in initialization code 2021-08-27 Bill Schmidt gcc/ * config/rs6000/rs6000-call.c (rs6000-builtins.h): New #include. (rs6000_init_builtins): Call rs6000_init_generated_builtins. Skip the old initialization logic when new builtins are enabled. * config/rs6000/rs6000-gen-builtins.c (write_decls): Rename rs6000_autoinit_builtins to rs6000_init_generated_builtins. (write_init_file): Likewise. --- gcc/config/rs6000/rs6000-call.c | 12 ++++++++++++ gcc/config/rs6000/rs6000-gen-builtins.c | 4 ++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/gcc/config/rs6000/rs6000-call.c b/gcc/config/rs6000/rs6000-call.c index 3a07118..87f9709 100644 --- a/gcc/config/rs6000/rs6000-call.c +++ b/gcc/config/rs6000/rs6000-call.c @@ -69,6 +69,7 @@ #include "opts.h" #include "rs6000-internal.h" +#include "rs6000-builtins.h" #if TARGET_MACHO #include "gstab.h" /* for N_SLINE */ @@ -13647,6 +13648,17 @@ rs6000_init_builtins (void) = build_pointer_type (build_qualified_type (void_type_node, TYPE_QUAL_CONST)); + /* Execute the autogenerated initialization code for builtins. */ + rs6000_init_generated_builtins (); + + if (new_builtins_are_live) + { +#ifdef SUBTARGET_INIT_BUILTINS + SUBTARGET_INIT_BUILTINS; +#endif + return; + } + /* Create Altivec, VSX and MMA builtins on machines with at least the general purpose extensions (970 and newer) to allow the use of the target attribute. */ diff --git a/gcc/config/rs6000/rs6000-gen-builtins.c b/gcc/config/rs6000/rs6000-gen-builtins.c index 000e5f9..f3d6156 100644 --- a/gcc/config/rs6000/rs6000-gen-builtins.c +++ b/gcc/config/rs6000/rs6000-gen-builtins.c @@ -2312,7 +2312,7 @@ write_decls (void) "extern ovlddata rs6000_instance_info[RS6000_INST_MAX];\n"); fprintf (header_file, "extern ovldrecord rs6000_overload_info[];\n\n"); - fprintf (header_file, "extern void rs6000_autoinit_builtins ();\n\n"); + fprintf (header_file, "extern void rs6000_init_generated_builtins ();\n\n"); fprintf (header_file, "extern bool rs6000_new_builtin_is_supported_p " "(rs6000_gen_builtins);\n"); @@ -2794,7 +2794,7 @@ write_init_file (void) fprintf (init_file, "\n"); fprintf (init_file, "void\n"); - fprintf (init_file, "rs6000_autoinit_builtins ()\n"); + fprintf (init_file, "rs6000_init_generated_builtins ()\n"); fprintf (init_file, "{\n"); fprintf (init_file, " tree t;\n"); rbt_inorder_callback (&fntype_rbt, fntype_rbt.rbt_root, write_fntype_init); -- 2.7.4