diff mbox series

Patch [6 of 7]: Set future machine type in assembler if -mcpu=future

Message ID ZcxtehueURuIwI8O@cowardly-lion.the-meissners.org
State New
Headers show
Series Patch [6 of 7]: Set future machine type in assembler if -mcpu=future | expand

Commit Message

Michael Meissner Feb. 14, 2024, 7:36 a.m. UTC
This patch uses the .machine directive to tell the assembler to use any
possible future instructions.

2024-02-14  Michael Meissner  <meissner@linux.ibm.com>

gcc/

	* config/rs6000/rs6000.cc (rs6000_machine_from_flags): Output .machine
	future if -mcpu=future.
---
 gcc/config/rs6000/rs6000.cc | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/gcc/config/rs6000/rs6000.cc b/gcc/config/rs6000/rs6000.cc
index 5e5e677e153..6bd537836d1 100644
--- a/gcc/config/rs6000/rs6000.cc
+++ b/gcc/config/rs6000/rs6000.cc
@@ -5968,6 +5968,8 @@  rs6000_machine_from_flags (void)
   /* Disable the flags that should never influence the .machine selection.  */
   flags &= ~(OPTION_MASK_PPC_GFXOPT | OPTION_MASK_PPC_GPOPT | OPTION_MASK_ISEL);
 
+  if ((flags & (ISA_FUTURE_MASKS_SERVER & ~ISA_3_1_MASKS_SERVER)) != 0)
+    return "future";
   if ((flags & (ISA_3_1_MASKS_SERVER & ~ISA_3_0_MASKS_SERVER)) != 0)
     return "power10";
   if ((flags & (ISA_3_0_MASKS_SERVER & ~ISA_2_7_MASKS_SERVER)) != 0)