{"id":2232293,"url":"http://patchwork.ozlabs.org/api/patches/2232293/?format=json","web_url":"http://patchwork.ozlabs.org/project/gcc/patch/20260504090830.3526306-1-kishan@linux.ibm.com/","project":{"id":17,"url":"http://patchwork.ozlabs.org/api/projects/17/?format=json","name":"GNU Compiler Collection","link_name":"gcc","list_id":"gcc-patches.gcc.gnu.org","list_email":"gcc-patches@gcc.gnu.org","web_url":null,"scm_url":null,"webscm_url":null,"list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20260504090830.3526306-1-kishan@linux.ibm.com>","list_archive_url":null,"date":"2026-05-04T09:08:30","name":"[COMMITTED] rs6000: Add -mcpu=future support and built-in gating infrastructure","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"4e3a56f6b928555f42f15d52cf196523149b9d81","submitter":{"id":90920,"url":"http://patchwork.ozlabs.org/api/people/90920/?format=json","name":"Kishan Parmar","email":"kishan@linux.ibm.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/gcc/patch/20260504090830.3526306-1-kishan@linux.ibm.com/mbox/","series":[{"id":502628,"url":"http://patchwork.ozlabs.org/api/series/502628/?format=json","web_url":"http://patchwork.ozlabs.org/project/gcc/list/?series=502628","date":"2026-05-04T09:08:30","name":"[COMMITTED] rs6000: Add -mcpu=future support and built-in gating infrastructure","version":1,"mbox":"http://patchwork.ozlabs.org/series/502628/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2232293/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2232293/checks/","tags":{},"related":[],"headers":{"Return-Path":"<gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org>","X-Original-To":["incoming@patchwork.ozlabs.org","gcc-patches@gcc.gnu.org"],"Delivered-To":["patchwork-incoming@legolas.ozlabs.org","gcc-patches@gcc.gnu.org"],"Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256\n header.s=pp1 header.b=pASlPlSY;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org\n (client-ip=38.145.34.32; helo=vm01.sourceware.org;\n envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org;\n receiver=patchwork.ozlabs.org)","sourceware.org;\n\tdkim=pass (2048-bit key,\n unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256\n header.s=pp1 header.b=pASlPlSY","sourceware.org;\n dmarc=none (p=none dis=none) header.from=linux.ibm.com","sourceware.org; spf=pass smtp.mailfrom=linux.ibm.com","server2.sourceware.org;\n arc=none smtp.remote-ip=148.163.156.1"],"Received":["from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g8G701pfyz1yJ9\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 04 May 2026 19:09:10 +1000 (AEST)","from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 8B3CF4BAE7FA\n\tfor <incoming@patchwork.ozlabs.org>; Mon,  4 May 2026 09:09:08 +0000 (GMT)","from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com\n [148.163.156.1])\n by sourceware.org (Postfix) with ESMTPS id 3BE384BA79A8\n for <gcc-patches@gcc.gnu.org>; Mon,  4 May 2026 09:08:39 +0000 (GMT)","from pps.filterd (m0360083.ppops.net [127.0.0.1])\n by mx0a-001b2d01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id\n 6446lsYN963512; Mon, 4 May 2026 09:08:37 GMT","from ppma13.dal12v.mail.ibm.com\n (dd.9e.1632.ip4.static.sl-reverse.com [50.22.158.221])\n by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 4dw9v7698t-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);\n Mon, 04 May 2026 09:08:37 +0000 (GMT)","from pps.filterd (ppma13.dal12v.mail.ibm.com [127.0.0.1])\n by ppma13.dal12v.mail.ibm.com (8.18.1.7/8.18.1.7) with ESMTP id\n 6448sY3R021883;\n Mon, 4 May 2026 09:08:36 GMT","from smtprelay02.fra02v.mail.ibm.com ([9.218.2.226])\n by ppma13.dal12v.mail.ibm.com (PPS) with ESMTPS id 4dwwtg49sn-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);\n Mon, 04 May 2026 09:08:36 +0000 (GMT)","from smtpav03.fra02v.mail.ibm.com (smtpav03.fra02v.mail.ibm.com\n [10.20.54.102])\n by smtprelay02.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id\n 64498Xr351118514\n (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);\n Mon, 4 May 2026 09:08:33 GMT","from smtpav03.fra02v.mail.ibm.com (unknown [127.0.0.1])\n by IMSVA (Postfix) with ESMTP id 08A6220040;\n Mon,  4 May 2026 09:08:33 +0000 (GMT)","from smtpav03.fra02v.mail.ibm.com (unknown [127.0.0.1])\n by IMSVA (Postfix) with ESMTP id 0161B2004E;\n Mon,  4 May 2026 09:08:32 +0000 (GMT)","from kubota.pok.stglabs.ibm.com (unknown [9.114.39.181])\n by smtpav03.fra02v.mail.ibm.com (Postfix) with ESMTP;\n Mon,  4 May 2026 09:08:31 +0000 (GMT)"],"DKIM-Filter":["OpenDKIM Filter v2.11.0 sourceware.org 8B3CF4BAE7FA","OpenDKIM Filter v2.11.0 sourceware.org 3BE384BA79A8"],"DMARC-Filter":"OpenDMARC Filter v1.4.2 sourceware.org 3BE384BA79A8","ARC-Filter":"OpenARC Filter v1.0.0 sourceware.org 3BE384BA79A8","ARC-Seal":"i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1777885719; cv=none;\n b=qtcWuEcREXc1iaCOrWjDj0n0uC388sHGSSJIUBxlFXp1V0xVQIIbu766JttVkfv3R7gE9gOWeReXlgsz8HbwsC6jRf88P213SV60S49WbbGJC1DN+7m+t/I1aAzQlnIPmbosF2C5vmRDJX+NRtzafrGdW+Mh3Fk57ilj2NalgYs=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1777885719; c=relaxed/simple;\n bh=sEyY+enD/hZZY2P2Ec3eOcUxHsbTaL7wqR1bj5JxFL0=;\n h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version;\n b=n+dtUeZ4A0FVDQQoN5O9/+URPxscMVpZndwbIzA+VSZX84W40imqK6Kl/bf+nFtVgrAqYi7kMfaRIAgovnhzeqFSTU1XaNSkthy8sYYmXmUvbBQ8JbFpbubzKgGXcqrSciVknoAFFnwC1kE2HLvZzr6i1bCzYDF9AYFmu0S5d6M=","ARC-Authentication-Results":"i=1; server2.sourceware.org","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc\n :content-transfer-encoding:date:from:message-id:mime-version\n :subject:to; s=pp1; bh=E3jmXVpyHsCNAFUvNRVvWebBXcDRivGKlSUQI2Edo\n j4=; b=pASlPlSYAXXubShdR9M1s53AVGsaMDUi9Z8iB5AJCX9ZyDXFV/1WoEeI2\n fTfaiF+dNV74WpkHi0w5V7x/DKQH6f0X8hWrdp66xGxBLjlBjdYo9yiZTrsMElWl\n /xb2dwxTDpdQ6fkTvLCs39pTtnPMp45SVfF/vOU1GT6UjnnAz/ypTeys0ZUzN6b0\n E0UiNfeyCuqdBHF+X6jCgBOex/MMPSUpwFKHqaSpGjdfNRXvh70USOqtNEtoVqck\n DVZO0jiiFBpjCy9lq7SGTWgtXNkJdotFIhfd5gGMhJRStNJEigLTrVSLFdyornw7\n j3a7FM4sK0HrvY+5Cs7qPy48/uyQA==","From":"Kishan Parmar <kishan@linux.ibm.com>","To":"meissner@linux.ibm.com, jskumari@linux.ibm.com","Cc":"segher@kernel.crashing.org, mmatti@linux.ibm.com, gcc-patches@gcc.gnu.org,\n avinashd@linux.ibm.com, vijay@linux.ibm.com,\n Kishan Parmar <kishan@linux.ibm.com>","Subject":"[COMMITTED] rs6000: Add -mcpu=future support and built-in gating\n infrastructure","Date":"Mon,  4 May 2026 14:38:30 +0530","Message-ID":"<20260504090830.3526306-1-kishan@linux.ibm.com>","X-Mailer":"git-send-email 2.47.3","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","X-TM-AS-GCONF":"00","X-Proofpoint-Spam-Details-Enc":"AW1haW4tMjYwNTA0MDA5NyBTYWx0ZWRfX8rTHfMEF/ea1\n ycrHrnF9neEJdx4/PV2M07QY94Wi2PkH4y4+aPWmDDP1k0IPC4sOm+bsTwmTr3+fdlj3IO1N7Ah\n ONdofEJizEcvnjX78mLd/J6fRi3NKAnxQRUXCca46dGru4izbHCMBaCVwVvaltakRim8zVF1sFn\n 8I2+/TDbt83Me/OGucNJ+//mj2tJwUrVWB/0KtePSC3LhxJwRfYyuaqwheEMXSBbZiD00qo8zqV\n f345wrStOwvWlDkUXoJ+IplZDghHySHAJgisgCL/aTJR44zSZNIKyK3Hql81yobArjFh+vWSU20\n AnczDFE1Xl+Wkb9M5+72WeH7iq3A6pkdclTt4xBNlwq/dlmokf8BFwj9URAjVteBtlciQvFqBVm\n MVXmkkmc6m1vvxi3eg/EQJJOZYYkFtN06yrAqCmgyyrCpUmrH/UYTgx1QX8PQeWvz2UHwdr41CD\n K6EGw308PLqIz6rX4mQ==","X-Proofpoint-GUID":"mOTDcCWmeDQKBnX-3b8pseishHJ19X80","X-Proofpoint-ORIG-GUID":"mOTDcCWmeDQKBnX-3b8pseishHJ19X80","X-Authority-Analysis":"v=2.4 cv=eu/vCIpX c=1 sm=1 tr=0 ts=69f86215 cx=c_pps\n a=AfN7/Ok6k8XGzOShvHwTGQ==:117 a=AfN7/Ok6k8XGzOShvHwTGQ==:17\n a=NGcC8JguVDcA:10 a=VkNPw1HP01LnGYTKEx00:22 a=RnoormkPH1_aCDwRdu11:22\n a=iQ6ETzBq9ecOQQE5vZCe:22 a=VnNF1IyMAAAA:8 a=z6p5yyXHg3596L_sHI4A:9","X-Proofpoint-Virus-Version":"vendor=baseguard\n engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49\n definitions=2026-05-04_03,2026-04-30_02,2025-10-01_01","X-Proofpoint-Spam-Details":"rule=outbound_notspam policy=outbound score=0\n priorityscore=1501 phishscore=0 lowpriorityscore=0 clxscore=1015 adultscore=0\n suspectscore=0 malwarescore=0 bulkscore=0 impostorscore=0 spamscore=0\n classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0\n reason=mlx scancount=1 engine=8.22.0-2604200000 definitions=main-2605040097","X-BeenThere":"gcc-patches@gcc.gnu.org","X-Mailman-Version":"2.1.30","Precedence":"list","List-Id":"Gcc-patches mailing list <gcc-patches.gcc.gnu.org>","List-Unsubscribe":"<https://gcc.gnu.org/mailman/options/gcc-patches>,\n <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe>","List-Archive":"<https://gcc.gnu.org/pipermail/gcc-patches/>","List-Post":"<mailto:gcc-patches@gcc.gnu.org>","List-Help":"<mailto:gcc-patches-request@gcc.gnu.org?subject=help>","List-Subscribe":"<https://gcc.gnu.org/mailman/listinfo/gcc-patches>,\n <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe>","Errors-To":"gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org"},"content":"This patch introduces support for the -mcpu=future option, intended to\nenable experimental processor features that may or may not be included\nin future Power processors. The option serves as a placeholder for\ndevelopment and evaluation purposes, and may be renamed if a\ncorresponding processor is defined.\n\nIn addition, this change adds support for gating rs6000 built-ins using\na new target predicate \"future\", corresponding to -mcpu=future. This\nextends rs6000-gen-builtins.cc and rs6000-builtin.cc to recognize\n[future] as a valid predicate, allowing new built-ins defined in .bif\nfiles to be conditionally enabled.\n\nBootstrapped and Regtested on Power10 little-endian system, using the\n--with-cpu=future configuration option.\n\n2026-05-04  Kishan Parmar  <kishan@linux.ibm.com>\n\ngcc/\n\t* config.gcc (powerpc*-*-*): Add support for supporting\n\t--with-cpu=future.\n\t* config/rs6000/aix71.h (ASM_CPU_SPEC): Pass -mfuture to the assembler\n\tif the user used the -mcpu=future option.\n\t* config/rs6000/aix72.h (ASM_CPU_SPEC): Likewise.\n\t* config/rs6000/aix73.h (ASM_CPU_SPEC): Likewise.\n\t* config/rs6000/rs6000-builtin.cc (rs6000_invalid_builtin): Handle\n\tENB_FUTURE and issue diagnostic requiring -mcpu=future.\n\t(rs6000_builtin_is_supported): Return TARGET_FUTURE for\n\tENB_FUTURE built-ins.\n\t* config/rs6000/rs6000-c.cc (rs6000_target_modify_macros): Define\n\t_ARCH_FUTURE if -mcpu=future.\n\t* config/rs6000/rs6000-cpus.def (FUTURE_MASKS_SERVER): New macro.\n\t(POWERPC_MASKS): Add OPTION_MASK_FUTURE.\n\t(rs6000_cpu_opt_value): New entry for 'future' via the RS6000_CPU macro.\n\t* config/rs6000/rs6000-gen-builtins.cc (enum bif_stanza): Add\n\tBSTZ_FUTURE for future.\n\t(write_decls): Add ENB_FUTURE in bif_enable enum of generated header\n\tfile.\n\t* config/rs6000/rs6000-opts.h (PROCESSOR_FUTURE): New macro.\n\t* config/rs6000/rs6000-tables.opt: Regenerate.\n\t* config/rs6000/rs6000.cc (rs6000_machine_from_flags) If -mcpu=future,\n\tset the .machine directive to \"future\".\n\t(rs6000_opt_masks): Add entry for -mfuture.\n\t* config/rs6000/rs6000.h (ASM_CPU_SPEC): Pass -mfuture to the assembler\n\tif the user used the -mcpu=future option.\n\t* config/rs6000/rs6000.opt (-mfuture): New option.\n\t* doc/invoke.texi (IBM RS/6000 and PowerPC Options): Document\n\t-mcpu=future.\n\ngcc/testsuite/\n\t* gcc.target/powerpc/future-1.c: New test.\n\t* gcc.target/powerpc/future-2.c: Likewise.\n---\n gcc/config.gcc                              |  4 ++--\n gcc/config/rs6000/aix71.h                   |  1 +\n gcc/config/rs6000/aix72.h                   |  1 +\n gcc/config/rs6000/aix73.h                   |  1 +\n gcc/config/rs6000/rs6000-builtin.cc         |  5 +++++\n gcc/config/rs6000/rs6000-c.cc               |  2 ++\n gcc/config/rs6000/rs6000-cpus.def           |  6 ++++++\n gcc/config/rs6000/rs6000-gen-builtins.cc    | 10 ++++++---\n gcc/config/rs6000/rs6000-opts.h             |  2 ++\n gcc/config/rs6000/rs6000-tables.opt         | 11 ++++++----\n gcc/config/rs6000/rs6000.cc                 |  3 +++\n gcc/config/rs6000/rs6000.h                  |  1 +\n gcc/config/rs6000/rs6000.opt                |  4 ++++\n gcc/doc/invoke.texi                         |  4 ++--\n gcc/testsuite/gcc.target/powerpc/future-1.c | 13 +++++++++++\n gcc/testsuite/gcc.target/powerpc/future-2.c | 24 +++++++++++++++++++++\n 16 files changed, 81 insertions(+), 11 deletions(-)\n create mode 100644 gcc/testsuite/gcc.target/powerpc/future-1.c\n create mode 100644 gcc/testsuite/gcc.target/powerpc/future-2.c","diff":"diff --git a/gcc/config.gcc b/gcc/config.gcc\nindex 0d4b7897c21..562780ea615 100644\n--- a/gcc/config.gcc\n+++ b/gcc/config.gcc\n@@ -555,7 +555,7 @@ powerpc*-*-*)\n \textra_headers=\"${extra_headers} ppu_intrinsics.h spu2vmx.h vec_types.h si2vmx.h\"\n \textra_headers=\"${extra_headers} amo.h\"\n \tcase x$with_cpu in\n-\t    xpowerpc64|xdefault64|x6[23]0|x970|xG5|xpower[3456789]|xpower1[01]|xpower6x|xrs64a|xcell|xa2|xe500mc64|xe5500|xe6500)\n+\t    xpowerpc64|xdefault64|x6[23]0|x970|xG5|xpower[3456789]|xpower1[01]|xfuture|xpower6x|xrs64a|xcell|xa2|xe500mc64|xe5500|xe6500)\n \t\tcpu_is_64bit=yes\n \t\t;;\n \tesac\n@@ -5870,7 +5870,7 @@ case \"${target}\" in\n \t\t\t\teval \"with_$which=405\"\n \t\t\t\t;;\n \t\t\t\"\" | common | native \\\n-\t\t\t| power[3456789] | power1[01] | power5+ | power6x \\\n+\t\t\t| power[3456789] | power1[01] | future | power5+ | power6x \\\n \t\t\t| powerpc | powerpc64 | powerpc64le \\\n \t\t\t| rs64 \\\n \t\t\t| 401 | 403 | 405 | 405fp | 440 | 440fp | 464 | 464fp \\\ndiff --git a/gcc/config/rs6000/aix71.h b/gcc/config/rs6000/aix71.h\nindex 3093de62088..2331004344f 100644\n--- a/gcc/config/rs6000/aix71.h\n+++ b/gcc/config/rs6000/aix71.h\n@@ -79,6 +79,7 @@ do {\t\t\t\t\t\t\t\t\t\\\n #undef ASM_CPU_SPEC\n #define ASM_CPU_SPEC \\\n \"%{mcpu=native: %(asm_cpu_native); \\\n+  mcpu=future: -mfuture; \\\n   mcpu=power11: -mpwr11; \\\n   mcpu=power10: -mpwr10; \\\n   mcpu=power9: -mpwr9; \\\ndiff --git a/gcc/config/rs6000/aix72.h b/gcc/config/rs6000/aix72.h\nindex 515eeebe5aa..9105f4254d0 100644\n--- a/gcc/config/rs6000/aix72.h\n+++ b/gcc/config/rs6000/aix72.h\n@@ -79,6 +79,7 @@ do {\t\t\t\t\t\t\t\t\t\\\n #undef ASM_CPU_SPEC\n #define ASM_CPU_SPEC \\\n \"%{mcpu=native: %(asm_cpu_native); \\\n+  mcpu=future: -mfuture; \\\n   mcpu=power11: -mpwr11; \\\n   mcpu=power10: -mpwr10; \\\n   mcpu=power9: -mpwr9; \\\ndiff --git a/gcc/config/rs6000/aix73.h b/gcc/config/rs6000/aix73.h\nindex d89a4a197b3..8316decceae 100644\n--- a/gcc/config/rs6000/aix73.h\n+++ b/gcc/config/rs6000/aix73.h\n@@ -79,6 +79,7 @@ do {\t\t\t\t\t\t\t\t\t\\\n #undef ASM_CPU_SPEC\n #define ASM_CPU_SPEC \\\n \"%{mcpu=native: %(asm_cpu_native); \\\n+  mcpu=future: -mfuture; \\\n   mcpu=power11: -mpwr11; \\\n   mcpu=power10: -mpwr10; \\\n   mcpu=power9: -mpwr9; \\\ndiff --git a/gcc/config/rs6000/rs6000-builtin.cc b/gcc/config/rs6000/rs6000-builtin.cc\nindex 45c88fe063b..4d0e541351f 100644\n--- a/gcc/config/rs6000/rs6000-builtin.cc\n+++ b/gcc/config/rs6000/rs6000-builtin.cc\n@@ -139,6 +139,9 @@ rs6000_invalid_builtin (enum rs6000_gen_builtins fncode)\n     case ENB_MMA:\n       error (\"%qs requires the %qs option\", name, \"-mmma\");\n       break;\n+    case ENB_FUTURE:\n+      error (\"%qs requires the %qs option\", name, \"-mcpu=future\");\n+      break;\n     default:\n     case ENB_ALWAYS:\n       gcc_unreachable ();\n@@ -194,6 +197,8 @@ rs6000_builtin_is_supported (enum rs6000_gen_builtins fncode)\n       return TARGET_HTM;\n     case ENB_MMA:\n       return TARGET_MMA;\n+    case ENB_FUTURE:\n+      return TARGET_FUTURE;\n     default:\n       gcc_unreachable ();\n     }\ndiff --git a/gcc/config/rs6000/rs6000-c.cc b/gcc/config/rs6000/rs6000-c.cc\nindex f6cc8923775..3fa7c04a7ce 100644\n--- a/gcc/config/rs6000/rs6000-c.cc\n+++ b/gcc/config/rs6000/rs6000-c.cc\n@@ -437,6 +437,8 @@ rs6000_target_modify_macros (bool define_p, HOST_WIDE_INT flags)\n     rs6000_define_or_undefine_macro (define_p, \"_ARCH_PWR10\");\n   if ((flags & OPTION_MASK_POWER11) != 0)\n     rs6000_define_or_undefine_macro (define_p, \"_ARCH_PWR11\");\n+  if ((flags & OPTION_MASK_FUTURE) != 0)\n+    rs6000_define_or_undefine_macro (define_p, \"_ARCH_FUTURE\");\n   if ((flags & OPTION_MASK_SOFT_FLOAT) != 0)\n     rs6000_define_or_undefine_macro (define_p, \"_SOFT_FLOAT\");\n   if ((flags & OPTION_MASK_RECIP_PRECISION) != 0)\ndiff --git a/gcc/config/rs6000/rs6000-cpus.def b/gcc/config/rs6000/rs6000-cpus.def\nindex 36be338493e..a110860acce 100644\n--- a/gcc/config/rs6000/rs6000-cpus.def\n+++ b/gcc/config/rs6000/rs6000-cpus.def\n@@ -83,6 +83,10 @@\n #define POWER11_MASKS_SERVER (ISA_3_1_MASKS_SERVER\t\t\t\\\n \t\t\t      | OPTION_MASK_POWER11)\n \n+/* -mcpu=future flags.  */\n+#define FUTURE_MASKS_SERVER\t(POWER11_MASKS_SERVER\t\t\t\\\n+\t\t\t\t | OPTION_MASK_FUTURE)\n+\n /* Flags that need to be turned off if -mno-vsx.  */\n #define OTHER_VSX_VECTOR_MASKS\t(OPTION_MASK_EFFICIENT_UNALIGNED_VSX\t\\\n \t\t\t\t | OPTION_MASK_FLOAT128_KEYWORD\t\t\\\n@@ -121,6 +125,7 @@\n \t\t\t\t | OPTION_MASK_FPRND\t\t\t\\\n \t\t\t\t | OPTION_MASK_POWER10\t\t\t\\\n \t\t\t\t | OPTION_MASK_POWER11\t\t\t\\\n+\t\t\t\t | OPTION_MASK_FUTURE\t\t\t\\\n \t\t\t\t | OPTION_MASK_P10_FUSION\t\t\\\n \t\t\t\t | OPTION_MASK_HTM\t\t\t\\\n \t\t\t\t | OPTION_MASK_ISEL\t\t\t\\\n@@ -249,6 +254,7 @@ RS6000_CPU (\"power9\", PROCESSOR_POWER9, MASK_POWERPC64 | ISA_3_0_MASKS_SERVER\n \t    | OPTION_MASK_HTM)\n RS6000_CPU (\"power10\", PROCESSOR_POWER10, MASK_POWERPC64 | ISA_3_1_MASKS_SERVER)\n RS6000_CPU (\"power11\", PROCESSOR_POWER11, MASK_POWERPC64 | POWER11_MASKS_SERVER)\n+RS6000_CPU (\"future\", PROCESSOR_FUTURE, MASK_POWERPC64 | FUTURE_MASKS_SERVER)\n RS6000_CPU (\"powerpc\", PROCESSOR_POWERPC, 0)\n RS6000_CPU (\"powerpc64\", PROCESSOR_POWERPC64, OPTION_MASK_PPC_GFXOPT\n \t    | MASK_POWERPC64)\ndiff --git a/gcc/config/rs6000/rs6000-gen-builtins.cc b/gcc/config/rs6000/rs6000-gen-builtins.cc\nindex c7ae5899c5c..7436404cff5 100644\n--- a/gcc/config/rs6000/rs6000-gen-builtins.cc\n+++ b/gcc/config/rs6000/rs6000-gen-builtins.cc\n@@ -232,6 +232,7 @@ enum bif_stanza\n  BSTZ_P10,\n  BSTZ_P10_64,\n  BSTZ_MMA,\n+ BSTZ_FUTURE,\n  NUMBIFSTANZAS\n };\n \n@@ -265,7 +266,8 @@ static stanza_entry stanza_map[NUMBIFSTANZAS] =\n     { \"htm\",\t\tBSTZ_HTM\t},\n     { \"power10\",\tBSTZ_P10\t},\n     { \"power10-64\",\tBSTZ_P10_64\t},\n-    { \"mma\",\t\tBSTZ_MMA\t}\n+    { \"mma\",\t\tBSTZ_MMA\t},\n+    { \"future\",\tBSTZ_FUTURE\t}\n   };\n \n static const char *enable_string[NUMBIFSTANZAS] =\n@@ -290,7 +292,8 @@ static const char *enable_string[NUMBIFSTANZAS] =\n     \"ENB_HTM\",\n     \"ENB_P10\",\n     \"ENB_P10_64\",\n-    \"ENB_MMA\"\n+    \"ENB_MMA\",\n+    \"ENB_FUTURE\"\n   };\n \n /* Function modifiers provide special handling for const, pure, and fpmath\n@@ -2249,7 +2252,8 @@ write_decls (void)\n   fprintf (header_file, \"  ENB_HTM,\\n\");\n   fprintf (header_file, \"  ENB_P10,\\n\");\n   fprintf (header_file, \"  ENB_P10_64,\\n\");\n-  fprintf (header_file, \"  ENB_MMA\\n\");\n+  fprintf (header_file, \"  ENB_MMA,\\n\");\n+  fprintf (header_file, \"  ENB_FUTURE\\n\");\n   fprintf (header_file, \"};\\n\\n\");\n \n   fprintf (header_file, \"#define PPC_MAXRESTROPNDS 3\\n\");\ndiff --git a/gcc/config/rs6000/rs6000-opts.h b/gcc/config/rs6000/rs6000-opts.h\nindex db308065a43..c98cdc7d5c8 100644\n--- a/gcc/config/rs6000/rs6000-opts.h\n+++ b/gcc/config/rs6000/rs6000-opts.h\n@@ -71,6 +71,8 @@ enum processor_type\n    PROCESSOR_TITAN\n };\n \n+/* Make -mtune=future use the same tuning decisions as -mtune=power11.  */\n+#define PROCESSOR_FUTURE\tPROCESSOR_POWER11\n \n /* Types of costly dependences.  */\n enum rs6000_dependence_cost\ndiff --git a/gcc/config/rs6000/rs6000-tables.opt b/gcc/config/rs6000/rs6000-tables.opt\nindex 040c246c2f6..efc55260b2a 100644\n--- a/gcc/config/rs6000/rs6000-tables.opt\n+++ b/gcc/config/rs6000/rs6000-tables.opt\n@@ -189,14 +189,17 @@ EnumValue\n Enum(rs6000_cpu_opt_value) String(power11) Value(53)\n \n EnumValue\n-Enum(rs6000_cpu_opt_value) String(powerpc) Value(54)\n+Enum(rs6000_cpu_opt_value) String(future) Value(54)\n \n EnumValue\n-Enum(rs6000_cpu_opt_value) String(powerpc64) Value(55)\n+Enum(rs6000_cpu_opt_value) String(powerpc) Value(55)\n \n EnumValue\n-Enum(rs6000_cpu_opt_value) String(powerpc64le) Value(56)\n+Enum(rs6000_cpu_opt_value) String(powerpc64) Value(56)\n \n EnumValue\n-Enum(rs6000_cpu_opt_value) String(rs64) Value(57)\n+Enum(rs6000_cpu_opt_value) String(powerpc64le) Value(57)\n+\n+EnumValue\n+Enum(rs6000_cpu_opt_value) String(rs64) Value(58)\n \ndiff --git a/gcc/config/rs6000/rs6000.cc b/gcc/config/rs6000/rs6000.cc\nindex 3838059a7e2..7d61001cb34 100644\n--- a/gcc/config/rs6000/rs6000.cc\n+++ b/gcc/config/rs6000/rs6000.cc\n@@ -5913,6 +5913,8 @@ rs6000_machine_from_flags (void)\n   flags &= ~(OPTION_MASK_PPC_GFXOPT | OPTION_MASK_PPC_GPOPT | OPTION_MASK_ISEL\n \t     | OPTION_MASK_ALTIVEC);\n \n+  if ((flags & (FUTURE_MASKS_SERVER & ~POWER11_MASKS_SERVER)) != 0)\n+    return \"future\";\n   if ((flags & (POWER11_MASKS_SERVER & ~ISA_3_1_MASKS_SERVER)) != 0)\n     return \"power11\";\n   if ((flags & (ISA_3_1_MASKS_SERVER & ~ISA_3_0_MASKS_SERVER)) != 0)\n@@ -24465,6 +24467,7 @@ static struct rs6000_opt_mask const rs6000_opt_masks[] =\n   { \"fprnd\",\t\t\tOPTION_MASK_FPRND,\t\tfalse, true  },\n   { \"power10\",\t\t\tOPTION_MASK_POWER10,\t\tfalse, true  },\n   { \"power11\",\t\t\tOPTION_MASK_POWER11,\t\tfalse, false },\n+  { \"future\",\t\t\tOPTION_MASK_FUTURE,\t\tfalse, false },\n   { \"hard-dfp\",\t\t\tOPTION_MASK_DFP,\t\tfalse, true  },\n   { \"htm\",\t\t\tOPTION_MASK_HTM,\t\tfalse, true  },\n   { \"isel\",\t\t\tOPTION_MASK_ISEL,\t\tfalse, true  },\ndiff --git a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h\nindex 2b90694cef1..2d3016db513 100644\n--- a/gcc/config/rs6000/rs6000.h\n+++ b/gcc/config/rs6000/rs6000.h\n@@ -101,6 +101,7 @@\n    you make changes here, make them also there.  */\n #define ASM_CPU_SPEC \\\n \"%{mcpu=native: %(asm_cpu_native); \\\n+  mcpu=future: -mfuture; \\\n   mcpu=power11: -mpower11; \\\n   mcpu=power10: -mpower10; \\\n   mcpu=power9: -mpower9; \\\ndiff --git a/gcc/config/rs6000/rs6000.opt b/gcc/config/rs6000/rs6000.opt\nindex 2eeb45a4b71..2b6ec5222fc 100644\n--- a/gcc/config/rs6000/rs6000.opt\n+++ b/gcc/config/rs6000/rs6000.opt\n@@ -595,6 +595,10 @@ Target Undocumented Mask(POWER10) Var(rs6000_isa_flags) WarnRemoved\n mpower11\n Target Undocumented Mask(POWER11) Var(rs6000_isa_flags) WarnRemoved\n \n+;; Potential future machine\n+mfuture\n+Target Undocumented Mask(FUTURE) Var(rs6000_isa_flags) Warn(Do not use %<-mfuture>, use %<-mcpu=future>)\n+\n mprefixed\n Target Mask(PREFIXED) Var(rs6000_isa_flags)\n Generate (do not generate) prefixed memory instructions.\ndiff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi\nindex fb69dc5fb80..16dc2179073 100644\n--- a/gcc/doc/invoke.texi\n+++ b/gcc/doc/invoke.texi\n@@ -31647,8 +31647,8 @@ Supported values for @var{cpu_type} are @samp{401}, @samp{403},\n @samp{e6500}, @samp{ec603e}, @samp{G3}, @samp{G4}, @samp{G5},\n @samp{titan}, @samp{power3}, @samp{power4}, @samp{power5}, @samp{power5+},\n @samp{power6}, @samp{power6x}, @samp{power7}, @samp{power8},\n-@samp{power9}, @samp{power10}, @samp{power11}, @samp{powerpc}, @samp{powerpc64},\n-@samp{powerpc64le}, @samp{rs64}, and @samp{native}.\n+@samp{power9}, @samp{power10}, @samp{power11}, @samp{future}, @samp{powerpc},\n+@samp{powerpc64}, @samp{powerpc64le}, @samp{rs64}, and @samp{native}.\n \n @option{-mcpu=powerpc}, @option{-mcpu=powerpc64}, and\n @option{-mcpu=powerpc64le} specify pure 32-bit PowerPC (either\ndiff --git a/gcc/testsuite/gcc.target/powerpc/future-1.c b/gcc/testsuite/gcc.target/powerpc/future-1.c\nnew file mode 100644\nindex 00000000000..7bd8e5ddbd0\n--- /dev/null\n+++ b/gcc/testsuite/gcc.target/powerpc/future-1.c\n@@ -0,0 +1,13 @@\n+/* { dg-do compile } */\n+/* { dg-options \"-mdejagnu-cpu=future -O2\" } */\n+\n+/* Basic check to see if the compiler supports -mcpu=future and if it defines\n+   _ARCH_FUTURE.  */\n+\n+#ifndef _ARCH_FUTURE\n+#error \"-mcpu=future is not supported\"\n+#endif\n+\n+void foo (void)\n+{\n+}\ndiff --git a/gcc/testsuite/gcc.target/powerpc/future-2.c b/gcc/testsuite/gcc.target/powerpc/future-2.c\nnew file mode 100644\nindex 00000000000..5552cefa3c2\n--- /dev/null\n+++ b/gcc/testsuite/gcc.target/powerpc/future-2.c\n@@ -0,0 +1,24 @@\n+/* { dg-do compile } */\n+/* { dg-options \"-O2\" } */\n+\n+/* Check if we can set the future target via a target attribute.  */\n+\n+__attribute__((__target__(\"cpu=power9\")))\n+void foo_p9 (void)\n+{\n+}\n+\n+__attribute__((__target__(\"cpu=power10\")))\n+void foo_p10 (void)\n+{\n+}\n+\n+__attribute__((__target__(\"cpu=power11\")))\n+void foo_p11 (void)\n+{\n+}\n+\n+__attribute__((__target__(\"cpu=future\")))\n+void foo_future (void)\n+{\n+}\n","prefixes":["COMMITTED"]}