diff mbox series

[38/57] rs6000: Execute the automatic built-in initialization code

Message ID 6d32a918a957cc6a3b9d981cc71570f0bdef6690.1619537141.git.wschmidt@linux.ibm.com
State New
Headers show
Series Replace the Power target-specific built-in machinery | expand

Commit Message

Bill Schmidt April 27, 2021, 3:33 p.m. UTC
2021-03-04  Bill Schmidt  <wschmidt@linux.ibm.com>

gcc/
	* config/rs6000/rs6000-call.c (rs6000-builtins.h): New #include.
	(rs6000_init_builtins): Call rs6000_autoinit_builtins; skip the old
	initialization logic when new builtins are enabled.
---
 gcc/config/rs6000/rs6000-call.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)
diff mbox series

Patch

diff --git a/gcc/config/rs6000/rs6000-call.c b/gcc/config/rs6000/rs6000-call.c
index c207d3719e9..dd548edd1b8 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 */
@@ -13488,6 +13489,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_autoinit_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.  */