mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2025-02-21 09:21:52 +00:00
gcc: powerpc: Fix asm machine directive for some CPUs
Bring in upstream fix for gcc outputting an incorrect .machine directive. Signed-off-by: Chris Packham <judge.packham@gmail.com>
This commit is contained in:
parent
0822a8a2e4
commit
1e47ca1e70
59
packages/gcc/10.3.0/0023-powerpc-Fix-asm-machine-directive-for-some-CPUs.patch
vendored
Normal file
59
packages/gcc/10.3.0/0023-powerpc-Fix-asm-machine-directive-for-some-CPUs.patch
vendored
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
From d568abb25fc799123168aac840372b28bb81f85d Mon Sep 17 00:00:00 2001
|
||||||
|
From: Sebastian Huber <sebastian.huber@embedded-brains.de>
|
||||||
|
Date: Tue, 18 Jan 2022 12:44:53 +0100
|
||||||
|
Subject: [PATCH] powerpc: 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.c (rs6000_machine_from_flags): Use also
|
||||||
|
rs6000_cpu.
|
||||||
|
---
|
||||||
|
gcc/config/rs6000/rs6000.c | 28 ++++++++++++++++++++++++++++
|
||||||
|
1 file changed, 28 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
|
||||||
|
index 4b473e00be39..5404fb187556 100644
|
||||||
|
--- a/gcc/config/rs6000/rs6000.c
|
||||||
|
+++ b/gcc/config/rs6000/rs6000.c
|
||||||
|
@@ -5547,6 +5547,34 @@ 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";
|
||||||
|
+
|
||||||
|
+ default:
|
||||||
|
+ break;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
HOST_WIDE_INT flags = rs6000_isa_flags;
|
||||||
|
|
||||||
|
/* Disable the flags that should never influence the .machine selection. */
|
||||||
|
--
|
||||||
|
2.35.1
|
||||||
|
|
59
packages/gcc/11.2.0/0010-powerpc-Fix-asm-machine-directive-for-some-CPUs.patch
vendored
Normal file
59
packages/gcc/11.2.0/0010-powerpc-Fix-asm-machine-directive-for-some-CPUs.patch
vendored
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
From 3cb53c10831be59d967d9dce8e7980fee4703500 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Sebastian Huber <sebastian.huber@embedded-brains.de>
|
||||||
|
Date: Tue, 18 Jan 2022 12:44:53 +0100
|
||||||
|
Subject: [PATCH] powerpc: 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.c (rs6000_machine_from_flags): Use also
|
||||||
|
rs6000_cpu.
|
||||||
|
---
|
||||||
|
gcc/config/rs6000/rs6000.c | 28 ++++++++++++++++++++++++++++
|
||||||
|
1 file changed, 28 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
|
||||||
|
index c4f5c53932c7..9b1c3a8b5eae 100644
|
||||||
|
--- a/gcc/config/rs6000/rs6000.c
|
||||||
|
+++ b/gcc/config/rs6000/rs6000.c
|
||||||
|
@@ -5766,6 +5766,34 @@ 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";
|
||||||
|
+
|
||||||
|
+ default:
|
||||||
|
+ break;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
HOST_WIDE_INT flags = rs6000_isa_flags;
|
||||||
|
|
||||||
|
/* Disable the flags that should never influence the .machine selection. */
|
||||||
|
--
|
||||||
|
2.35.1
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user