From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1005) id 04646385E45F; Sat, 9 Mar 2024 03:49:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 04646385E45F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1709956146; bh=4ONXBosymosKxZOrD9iTXnqR/Fdxlz4rOcK8xiyJH/4=; h=From:To:Subject:Date:From; b=GnjgaVTvzn6MRPUkUpGqiHJX1Vgf1j8RXCl1cDzmACOeztjeT/RUb7/TGC7M5GGZ1 9QQ0/MG7DrpYUYDf95nxjWShwlaCW1TLvov862A1yoSwXB5kyyuuDX/pn9epOmCniS UNwoRDumoLPfCMlo2QjhpDroHmvKd3Pykrg+xLDc= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Michael Meissner To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/users/meissner/heads/work162)] Add -mcpu=power11 support part 2 X-Act-Checkin: gcc X-Git-Author: Michael Meissner X-Git-Refname: refs/users/meissner/heads/work162 X-Git-Oldrev: 79df8d6772b1aecab388c0853cac305837a18b18 X-Git-Newrev: a09c97da2830f55b5cc1509f67188867df14cdf3 Message-Id: <20240309034906.04646385E45F@sourceware.org> Date: Sat, 9 Mar 2024 03:49:05 +0000 (GMT) List-Id: https://gcc.gnu.org/g:a09c97da2830f55b5cc1509f67188867df14cdf3 commit a09c97da2830f55b5cc1509f67188867df14cdf3 Author: Michael Meissner Date: Fri Mar 8 22:47:22 2024 -0500 Add -mcpu=power11 support part 2 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 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. Diff: --- gcc/config.gcc | 6 ++++-- gcc/config/rs6000/aix71.h | 1 + gcc/config/rs6000/aix72.h | 1 + gcc/config/rs6000/aix73.h | 1 + gcc/config/rs6000/driver-rs6000.cc | 2 ++ gcc/config/rs6000/ppc-auxv.h | 3 +-- gcc/config/rs6000/rs6000-builtin.cc | 1 + gcc/config/rs6000/rs6000.h | 1 + 8 files changed, 12 insertions(+), 4 deletions(-) diff --git a/gcc/config.gcc b/gcc/config.gcc index 624e0dae191..8adc71d82e9 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -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 \ diff --git a/gcc/config/rs6000/aix71.h b/gcc/config/rs6000/aix71.h index 24bc301e37d..41037b3852d 100644 --- a/gcc/config/rs6000/aix71.h +++ b/gcc/config/rs6000/aix71.h @@ -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; \ diff --git a/gcc/config/rs6000/aix72.h b/gcc/config/rs6000/aix72.h index c43974f577a..fe59f8319b4 100644 --- a/gcc/config/rs6000/aix72.h +++ b/gcc/config/rs6000/aix72.h @@ -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; \ diff --git a/gcc/config/rs6000/aix73.h b/gcc/config/rs6000/aix73.h index b1572bde81f..1318b0b3662 100644 --- a/gcc/config/rs6000/aix73.h +++ b/gcc/config/rs6000/aix73.h @@ -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; \ diff --git a/gcc/config/rs6000/driver-rs6000.cc b/gcc/config/rs6000/driver-rs6000.cc index 3ebbaa42622..f4900724b98 100644 --- a/gcc/config/rs6000/driver-rs6000.cc +++ b/gcc/config/rs6000/driver-rs6000.cc @@ -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" }, diff --git a/gcc/config/rs6000/ppc-auxv.h b/gcc/config/rs6000/ppc-auxv.h index 364bba427d1..ed269e3b72b 100644 --- a/gcc/config/rs6000/ppc-auxv.h +++ b/gcc/config/rs6000/ppc-auxv.h @@ -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 diff --git a/gcc/config/rs6000/rs6000-builtin.cc b/gcc/config/rs6000/rs6000-builtin.cc index 6698274031b..f3ba1eccdbd 100644 --- a/gcc/config/rs6000/rs6000-builtin.cc +++ b/gcc/config/rs6000/rs6000-builtin.cc @@ -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 }, diff --git a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h index 68bc45d65ba..81e2f0a33ef 100644 --- a/gcc/config/rs6000/rs6000.h +++ b/gcc/config/rs6000/rs6000.h @@ -107,6 +107,7 @@ #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; \