]> gcc.gnu.org Git - gcc.git/commitdiff
Add -mcpu=power11 support part 2
authorMichael Meissner <meissner@linux.ibm.com>
Fri, 8 Mar 2024 22:06:33 +0000 (17:06 -0500)
committerMichael Meissner <meissner@linux.ibm.com>
Fri, 8 Mar 2024 22:06:33 +0000 (17:06 -0500)
This patch allows GCC to be configured with the --with-cpu=power11 and
--with-tune=power11 options.

This patch passes -mpwr11 to the assembler if the user uses -mcpu=power11.

This patch adds support for using "power11" in the __builtin_cpu_is built-in
function.

2024-03-08  Michael Meissner  <meissner@linux.ibm.com>

gcc/

* config.gcc (rs6000*-*-*, powerpc*-*-*): Add support for power11.
* config/rs6000/aix71.h (ASM_CPU_SPEC): Add support for -mcpu=power11.
* config/rs6000/aix72.h (ASM_CPU_SPEC): Likewise.
* config/rs6000/aix73.h (ASM_CPU_SPEC): Likewise.
* config/rs6000/driver-rs6000.cc (asm_names): Likewise.
* config/rs6000/ppc-auxv.h (PPC_PLATFORM_POWER11): New define.
* config/rs6000/rs6000-builtin.cc (cpu_is_info): Add power11.
* config/rs6000/rs6000.h (ASM_CPU_SPEC): Likewise.

gcc/config.gcc
gcc/config/rs6000/aix71.h
gcc/config/rs6000/aix72.h
gcc/config/rs6000/aix73.h
gcc/config/rs6000/driver-rs6000.cc
gcc/config/rs6000/ppc-auxv.h
gcc/config/rs6000/rs6000-builtin.cc
gcc/config/rs6000/rs6000.h

index 624e0dae191abaad974f2078b2e1b5084505bbd6..8adc71d82e9cec102a053b0c7977b3f3401f3e3c 100644 (file)
@@ -531,7 +531,9 @@ powerpc*-*-*)
        extra_headers="${extra_headers} ppu_intrinsics.h spu2vmx.h vec_types.h si2vmx.h"
        extra_headers="${extra_headers} amo.h"
        case x$with_cpu in
-           xpowerpc64|xdefault64|x6[23]0|x970|xG5|xpower[3456789]|xpower10|xpower6x|xrs64a|xcell|xa2|xe500mc64|xe5500|xe6500)
+           xpowerpc64 | xdefault64 | x6[23]0 | x970 | xG5 | xpower[3456789] \
+           | xpower1[01] | xpower6x | xrs64a | xcell | xa2 | xe500mc64 \
+           | xe5500 | xe6500)
                cpu_is_64bit=yes
                ;;
        esac
@@ -5558,7 +5560,7 @@ case "${target}" in
                                eval "with_$which=405"
                                ;;
                        "" | common | native \
-                       | power[3456789] | power10 | power5+ | power6x \
+                       | power[3456789] | power1[01] | power5+ | power6x \
                        | powerpc | powerpc64 | powerpc64le \
                        | rs64 \
                        | 401 | 403 | 405 | 405fp | 440 | 440fp | 464 | 464fp \
index 24bc301e37d6a47091b35b216f81b2209c3cb260..41037b3852d74eeb88c2d59bfdaf25d997198acb 100644 (file)
@@ -79,6 +79,7 @@ do {                                                                  \
 #undef ASM_CPU_SPEC
 #define ASM_CPU_SPEC \
 "%{mcpu=native: %(asm_cpu_native); \
+  mcpu=power11: -mpwr11; \
   mcpu=power10: -mpwr10; \
   mcpu=power9: -mpwr9; \
   mcpu=power8: -mpwr8; \
index c43974f577afd44b3d350309a1e396c8e65509f2..fe59f8319b48c022b2d11183661fccc4f31d59a7 100644 (file)
@@ -79,6 +79,7 @@ do {                                                                  \
 #undef ASM_CPU_SPEC
 #define ASM_CPU_SPEC \
 "%{mcpu=native: %(asm_cpu_native); \
+  mcpu=power11: -mpwr11; \
   mcpu=power10: -mpwr10; \
   mcpu=power9: -mpwr9; \
   mcpu=power8: -mpwr8; \
index b1572bde81f963592d1cffd9fac2fbed579e4da9..1318b0b3662d1ba0a380965e6949fb8e6be9d5e9 100644 (file)
@@ -79,6 +79,7 @@ do {                                                                  \
 #undef ASM_CPU_SPEC
 #define ASM_CPU_SPEC \
 "%{mcpu=native: %(asm_cpu_native); \
+  mcpu=power11: -mpwr11; \
   mcpu=power10: -mpwr10; \
   mcpu=power9: -mpwr9; \
   mcpu=power8: -mpwr8; \
index 3ebbaa42622ab24edbc7d6f34a89f26f8ee34886..f4900724b98a2b374bc0cd0e8aa032bccf392c0e 100644 (file)
@@ -451,6 +451,7 @@ static const struct asm_name asm_names[] = {
   { "power8",  "-mpwr8" },
   { "power9",  "-mpwr9" },
   { "power10", "-mpwr10" },
+  { "power11", "-mpwr11" },
   { "powerpc", "-mppc" },
   { "rs64",    "-mppc" },
   { "603",     "-m603" },
@@ -479,6 +480,7 @@ static const struct asm_name asm_names[] = {
   { "power8",  "-mpower8" },
   { "power9",  "-mpower9" },
   { "power10", "-mpower10" },
+  { "power11", "-mpower11" },
   { "a2",      "-ma2" },
   { "powerpc", "-mppc" },
   { "powerpc64", "-mppc64" },
index 364bba427d14bb811d8ce6505eadc09e12d256a1..ed269e3b72b38cc7f59b37c13fd32f56183d1f62 100644 (file)
@@ -47,9 +47,8 @@
 #define PPC_PLATFORM_PPC476            12
 #define PPC_PLATFORM_POWER8            13
 #define PPC_PLATFORM_POWER9            14
-
-/* This is not yet official.  */
 #define PPC_PLATFORM_POWER10           15
+#define PPC_PLATFORM_POWER11           16
 
 /* AT_HWCAP bits.  These must match the values defined in the Linux kernel.  */
 #define PPC_FEATURE_32              0x80000000
index 6698274031b903447187b98153fa20342e2d51e4..f3ba1eccdbdc4a0acb392d4ee784b3d447edf014 100644 (file)
@@ -2493,6 +2493,7 @@ static const struct
   const char *cpu;
   unsigned int cpuid;
 } cpu_is_info[] = {
+  { "power11",    PPC_PLATFORM_POWER11 },
   { "power10",    PPC_PLATFORM_POWER10 },
   { "power9",     PPC_PLATFORM_POWER9 },
   { "power8",     PPC_PLATFORM_POWER8 },
index 68bc45d65baaa8198c6a5f6984102a13f4860d35..81e2f0a33ef39bdde58b02aab5988a747cc8e1ba 100644 (file)
 #define ASM_CPU_SPEC \
 "%{mcpu=native: %(asm_cpu_native); \
   mcpu=power10: -mpower10; \
+  mcpu=power11: -mpower11; \
   mcpu=power9: -mpower9; \
   mcpu=power8|mcpu=powerpc64le: -mpower8; \
   mcpu=power7: -mpower7; \
This page took 0.079585 seconds and 5 git commands to generate.