public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-6721] powerc: Fix asm machine directive for some CPUs
@ 2022-01-19 6:51 Sebastian Huber
0 siblings, 0 replies; only message in thread
From: Sebastian Huber @ 2022-01-19 6:51 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:1ead972cef7622682c5e6c4fa563c4a894d6e0c3
commit r12-6721-g1ead972cef7622682c5e6c4fa563c4a894d6e0c3
Author: Sebastian Huber <sebastian.huber@embedded-brains.de>
Date: Tue Jan 18 12:44:53 2022 +0100
powerc: Fix asm machine directive for some CPUs
For some CPUs, the assembler machine directive cannot be determined by ISA
flags.
gcc/
PR target/104090
* config/rs6000/rs6000.cc (rs6000_machine_from_flags): Use also
rs6000_cpu.
Diff:
---
gcc/config/rs6000/rs6000.cc | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/gcc/config/rs6000/rs6000.cc b/gcc/config/rs6000/rs6000.cc
index 7a4ef5e6c0a..2a338a222c1 100644
--- a/gcc/config/rs6000/rs6000.cc
+++ b/gcc/config/rs6000/rs6000.cc
@@ -5935,6 +5935,31 @@ const char *rs6000_machine;
const char *
rs6000_machine_from_flags (void)
{
+ /* For some CPUs, the machine cannot be determined by ISA flags. We have to
+ check them first. */
+ switch (rs6000_cpu)
+ {
+ case PROCESSOR_PPC8540:
+ case PROCESSOR_PPC8548:
+ return "e500";
+
+ case PROCESSOR_PPCE300C2:
+ case PROCESSOR_PPCE300C3:
+ return "e300";
+
+ case PROCESSOR_PPCE500MC:
+ return "e500mc";
+
+ case PROCESSOR_PPCE500MC64:
+ return "e500mc64";
+
+ case PROCESSOR_PPCE5500:
+ return "e5500";
+
+ case PROCESSOR_PPCE6500:
+ return "e6500";
+ }
+
HOST_WIDE_INT flags = rs6000_isa_flags;
/* Disable the flags that should never influence the .machine selection. */
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-01-19 6:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-19 6:51 [gcc r12-6721] powerc: Fix asm machine directive for some CPUs Sebastian Huber
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).