public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Sebastian Huber <sh@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r11-10084] rs6000: Do not use rs6000_cpu for .machine ppc and ppc64 (PR104829)
Date: Mon, 20 Jun 2022 20:41:08 +0000 (GMT)	[thread overview]
Message-ID: <20220620204108.ACC343856DD9@sourceware.org> (raw)

https://gcc.gnu.org/g:d87e0e297b1cba73a0c055d2a3e9267d288f435a

commit r11-10084-gd87e0e297b1cba73a0c055d2a3e9267d288f435a
Author: Segher Boessenkool <segher@kernel.crashing.org>
Date:   Fri Mar 11 21:15:18 2022 +0000

    rs6000: Do not use rs6000_cpu for .machine ppc and ppc64 (PR104829)
    
    Fixes: 77eccbf39ed5
    
    rs6000.h has
      #define PROCESSOR_POWERPC   PROCESSOR_PPC604
      #define PROCESSOR_POWERPC64 PROCESSOR_RS64A
    which means that if you use things like  -mcpu=powerpc -mvsx  it will no
    longer work after my latest .machine patch.  This causes GCC build errors
    in some cases, not a good idea (even if the errors are actually
    pre-existing: using -mvsx with a machine that does not have VSX cannot
    work properly).
    
    2022-03-11  Segher Boessenkool  <segher@kernel.crashing.org>
    
            PR target/104829
            * config/rs6000/rs6000.c (rs6000_machine_from_flags): Don't output
            "ppc" and "ppc64" based on rs6000_cpu.
    
    (cherry picked from commit 80fcc4b6afee72443bef551064826b3b4b6785e6)

Diff:
---
 gcc/config/rs6000/rs6000.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 3ef83ae9f4c..8c89b45922f 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -5782,20 +5782,28 @@ rs6000_machine_from_flags (void)
   if (rs6000_cpu == PROCESSOR_MPCCORE)
     return "\"821\"";
 
+#if 0
+  /* This (and ppc64 below) are disabled here (for now at least) because
+     PROCESSOR_POWERPC, PROCESSOR_POWERPC64, and PROCESSOR_COMMON
+     are #define'd as some of these.  Untangling that is a job for later.  */
+
   /* 600 series and 700 series, "classic" */
   if (rs6000_cpu == PROCESSOR_PPC601 || rs6000_cpu == PROCESSOR_PPC603
       || rs6000_cpu == PROCESSOR_PPC604 || rs6000_cpu == PROCESSOR_PPC604e
-      || rs6000_cpu == PROCESSOR_PPC750 || rs6000_cpu == PROCESSOR_POWERPC)
+      || rs6000_cpu == PROCESSOR_PPC750)
     return "ppc";
+#endif
 
   /* Classic with AltiVec, "G4" */
   if (rs6000_cpu == PROCESSOR_PPC7400 || rs6000_cpu == PROCESSOR_PPC7450)
     return "\"7450\"";
 
+#if 0
   /* The older 64-bit CPUs */
   if (rs6000_cpu == PROCESSOR_PPC620 || rs6000_cpu == PROCESSOR_PPC630
-      || rs6000_cpu == PROCESSOR_RS64A || rs6000_cpu == PROCESSOR_POWERPC64)
+      || rs6000_cpu == PROCESSOR_RS64A)
     return "ppc64";
+#endif
 
   HOST_WIDE_INT flags = rs6000_isa_flags;


                 reply	other threads:[~2022-06-20 20:41 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220620204108.ACC343856DD9@sourceware.org \
    --to=sh@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).