[gcc(refs/vendors/ibm/heads/mmaplus2)] Add -mcpu=future.
Michael Meissner
meissner@gcc.gnu.org
Wed Mar 4 03:52:29 GMT 2026
https://gcc.gnu.org/g:33bc62df733a69d95de7e7d8274d49b18ef8369e
commit 33bc62df733a69d95de7e7d8274d49b18ef8369e
Author: Michael Meissner <meissner@linux.ibm.com>
Date: Tue Mar 3 17:10:58 2026 -0500
Add -mcpu=future.
This patch adds support for the -mcpu=future option. New processor features,
that may or may not be supported in a future processor, will be supported in gcc
under this option. This option will be renamed to an actual future processor,
whenever such a processor is announced.
This is version 12 of the -mcpu=future patch.
Can I check this patch into the GCC trunk? I have built bootstrap
builds on both a little endian Power10 system and a big endian Power9
system and there were no regressions. On the little endian Power10
system, I built the last run using the --with-cpu=future configuration
option.
2026-03-03 Michael Meissner <meissner@linux.ibm.com>
gcc/
* config.gcc (powerpc*-*-*): Add support for supporting --with-cpu=future.
* config/rs6000/aix71.h (ASM_CPU_SPEC): Pass -mfuture to the assembler
if the user used the -mcpu=future option.
* config/rs6000/aix72.h (ASM_CPU_SPEC): Likewise.
* config/rs6000/aix73.h (ASM_CPU_SPEC): Likewise.
* config/rs6000/rs6000-c.cc (rs6000_target_modify_macros): Define
_ARCH_FUTURE if -mcpu=future.
* config/rs6000/rs6000-cpus.def (FUTURE_MASKS_SERVER): New macro.
(POWERPC_MASKS): Add OPTION_MASK_FUTURE.
(rs6000_cpu_opt_value): New entry for 'future' via the RS6000_CPU macro.
* config/rs6000/rs6000-opts.h (PROCESSOR_FUTURE): New macro.
* config/rs6000/rs6000-tables.opt: Regenerate.
* config/rs6000/rs6000.cc (rs6000_machine_from_flags) If -mcpu=future,
set the .machine directive to "future".
(rs6000_opt_masks): Add entry for -mfuture.
* config/rs6000/rs6000.h (ASM_CPU_SPEC): Pass -mfuture to the assembler
if the user used the -mcpu=future option.
* config/rs6000/rs6000.opt (-mfuture): New option.
* doc/invoke.texi (IBM RS/6000 and PowerPC Options): Document
-mcpu=future.
gcc/testsuite/
* gcc.target/powerpc/future-1.c: New test.
* gcc.target/powerpc/future-2.c: Likewise.
Diff:
---
gcc/config/rs6000/rs6000-cpus.def | 1 -
1 file changed, 1 deletion(-)
diff --git a/gcc/config/rs6000/rs6000-cpus.def b/gcc/config/rs6000/rs6000-cpus.def
index 3e51848481f4..74910b58ac54 100644
--- a/gcc/config/rs6000/rs6000-cpus.def
+++ b/gcc/config/rs6000/rs6000-cpus.def
@@ -83,7 +83,6 @@
#define POWER11_MASKS_SERVER (ISA_3_1_MASKS_SERVER \
| OPTION_MASK_POWER11)
-/* -mcpu=future flags.
During the development of the power10 support for GCC, using load/store
vector pair instructions for string operations was turned off by default,
More information about the Gcc-cvs
mailing list