Re: [PATCH 16/55] rs6000: Write output to the builtin definition include file
On Thu, Jun 17, 2021 at 10:19:00AM -0500, Bill Schmidt wrote: > 2021-06-07 Bill Schmidt > > gcc/ > * config/rs6000/rs6000-gen-builtins.c (write_defines_file): > Implement. Okay for trunk. Thanks! Segher
[PATCH 16/55] rs6000: Write output to the builtin definition include file
2021-06-07 Bill Schmidt gcc/ * config/rs6000/rs6000-gen-builtins.c (write_defines_file): Implement. --- gcc/config/rs6000/rs6000-gen-builtins.c | 17 + 1 file changed, 17 insertions(+) diff --git a/gcc/config/rs6000/rs6000-gen-builtins.c b/gcc/config/rs6000/rs6000-gen-builtins.c index 466fce1cdd2..18922d829ff 100644 --- a/gcc/config/rs6000/rs6000-gen-builtins.c +++ b/gcc/config/rs6000/rs6000-gen-builtins.c @@ -2006,6 +2006,23 @@ write_init_file (void) static int write_defines_file (void) { + fprintf (defines_file, "#ifndef _RS6000_VECDEFINES_H\n"); + fprintf (defines_file, "#define _RS6000_VECDEFINES_H 1\n\n"); + fprintf (defines_file, "#if defined(_ARCH_PPC64) && defined (_ARCH_PWR9)\n"); + fprintf (defines_file, " #define _ARCH_PPC64_PWR9 1\n"); + fprintf (defines_file, "#endif\n\n"); + for (int i = 0; i < num_ovld_stanzas; i++) +if (strcmp (ovld_stanzas[i].extern_name, "SKIP")) + { + if (ovld_stanzas[i].ifdef) + fprintf (defines_file, "#ifdef %s\n", ovld_stanzas[i].ifdef); + fprintf (defines_file, "#define %s %s\n", +ovld_stanzas[i].extern_name, +ovld_stanzas[i].intern_name); + if (ovld_stanzas[i].ifdef) + fprintf (defines_file, "#endif\n"); + } + fprintf (defines_file, "\n#endif\n"); return 1; } -- 2.27.0
[PATCH 16/55] rs6000: Write output to the builtin definition include file
2021-06-07 Bill Schmidt gcc/ * config/rs6000/rs6000-gen-builtins.c (write_defines_file): Implement. --- gcc/config/rs6000/rs6000-gen-builtins.c | 17 + 1 file changed, 17 insertions(+) diff --git a/gcc/config/rs6000/rs6000-gen-builtins.c b/gcc/config/rs6000/rs6000-gen-builtins.c index fd5b4bd0211..fbc5e06c207 100644 --- a/gcc/config/rs6000/rs6000-gen-builtins.c +++ b/gcc/config/rs6000/rs6000-gen-builtins.c @@ -2006,6 +2006,23 @@ write_init_file (void) static int write_defines_file (void) { + fprintf (defines_file, "#ifndef _RS6000_VECDEFINES_H\n"); + fprintf (defines_file, "#define _RS6000_VECDEFINES_H 1\n\n"); + fprintf (defines_file, "#if defined(_ARCH_PPC64) && defined (_ARCH_PWR9)\n"); + fprintf (defines_file, " #define _ARCH_PPC64_PWR9 1\n"); + fprintf (defines_file, "#endif\n\n"); + for (int i = 0; i < num_ovld_stanzas; i++) +if (strcmp (ovld_stanzas[i].extern_name, "SKIP")) + { + if (ovld_stanzas[i].ifdef) + fprintf (defines_file, "#ifdef %s\n", ovld_stanzas[i].ifdef); + fprintf (defines_file, "#define %s %s\n", +ovld_stanzas[i].extern_name, +ovld_stanzas[i].intern_name); + if (ovld_stanzas[i].ifdef) + fprintf (defines_file, "#endif\n"); + } + fprintf (defines_file, "\n#endif\n"); return 1; } -- 2.27.0