From 4e577910050d6e18977525f0302a175542ffd610 Mon Sep 17 00:00:00 2001 From: Segher Boessenkool Date: Fri, 24 Jul 2020 23:12:08 +0000 Subject: [PATCH] rs6000: Remove -mpower10 option (PR95907) The only way to enable or disable Power10 insns (ISA 3.1 insns) should be via the -mcpu= switch. This patch disables the -mpower10 options the same way the -mdirect-move switch is neutered already. That is not an ideal way, but it works, it is not the first, and doing it properly is more work, and will happen later. 2020-07-24 Segher Boessenkool * config/rs6000/rs6000.opt: Delete -mpower10. gcc/testsuite/ * gcc.target/powerpc/pr95907.c: New. --- gcc/config/rs6000/rs6000.opt | 3 +-- gcc/testsuite/gcc.target/powerpc/pr95907.c | 7 +++++++ 2 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 gcc/testsuite/gcc.target/powerpc/pr95907.c diff --git a/gcc/config/rs6000/rs6000.opt b/gcc/config/rs6000/rs6000.opt index 6b426f2aaf1..59106753997 100644 --- a/gcc/config/rs6000/rs6000.opt +++ b/gcc/config/rs6000/rs6000.opt @@ -568,8 +568,7 @@ mspeculate-indirect-jumps Target Undocumented Var(rs6000_speculate_indirect_jumps) Init(1) Save mpower10 -Target Report Mask(POWER10) Var(rs6000_isa_flags) -Use instructions added in ISA 3.1. +Target Undocumented Mask(POWER10) Var(rs6000_isa_flags) WarnRemoved mprefixed Target Report Mask(PREFIXED) Var(rs6000_isa_flags) diff --git a/gcc/testsuite/gcc.target/powerpc/pr95907.c b/gcc/testsuite/gcc.target/powerpc/pr95907.c new file mode 100644 index 00000000000..f2512b0d606 --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/pr95907.c @@ -0,0 +1,7 @@ +/* PR target/95907 */ +/* { dg-do compile } */ +/* { dg-require-effective-target power10_ok } */ +/* { dg-options "-mpower10" } */ +/* { dg-warning "switch .-mpower10. is no longer supported" "" {target *-*-*} 0 } */ + +void f(void) { } -- 2.30.2