From: Bill Schmidt Date: Tue, 6 Feb 2018 16:55:01 +0000 (+0000) Subject: rs6000.c (rs6000_option_override_internal): Display warning message for -mno-speculat... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=97770004f3bd40b6b0af466ddb00a3144120c0c7;p=gcc.git rs6000.c (rs6000_option_override_internal): Display warning message for -mno-speculate-indirect-jumps. [gcc] 2018-02-06 Bill Schmidt * config/rs6000/rs6000.c (rs6000_option_override_internal): Display warning message for -mno-speculate-indirect-jumps. [gcc/testsuite] 2018-02-06 Bill Schmidt * gcc.target/powerpc/safe-indirect-jump-1.c: Detect deprecation warning for -mno-speculate-indirect-jumps. * gcc.target/powerpc/safe-indirect-jump-2.c: Likewise. * gcc.target/powerpc/safe-indirect-jump-3.c: Likewise. * gcc.target/powerpc/safe-indirect-jump-4.c: Likewise. * gcc.target/powerpc/safe-indirect-jump-5.c: Likewise. * gcc.target/powerpc/safe-indirect-jump-6.c: Likewise. * gcc.target/powerpc/safe-indirect-jump-7.c: Likewise. From-SVN: r257419 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b42a1237140..4b4558b016b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2018-02-06 Bill Schmidt + + * config/rs6000/rs6000.c (rs6000_option_override_internal): + Display warning message for -mno-speculate-indirect-jumps. + 2018-02-06 Andrew Jenner * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index a37ebd88cce..6a6801aad9b 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -5295,6 +5295,11 @@ rs6000_option_override_internal (bool global_init_p) if (TARGET_LINK_STACK == -1) SET_TARGET_LINK_STACK (rs6000_tune == PROCESSOR_PPC476 && flag_pic); + /* Deprecate use of -mno-speculate-indirect-jumps. */ + if (!rs6000_speculate_indirect_jumps) + warning (0, "%qs is deprecated and not recommended in any circumstances", + "-mno-speculate-indirect-jumps"); + return ret; } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 2e279b4dea0..be9f3153c0d 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,14 @@ +2018-02-06 Bill Schmidt + + * gcc.target/powerpc/safe-indirect-jump-1.c: Detect deprecation + warning for -mno-speculate-indirect-jumps. + * gcc.target/powerpc/safe-indirect-jump-2.c: Likewise. + * gcc.target/powerpc/safe-indirect-jump-3.c: Likewise. + * gcc.target/powerpc/safe-indirect-jump-4.c: Likewise. + * gcc.target/powerpc/safe-indirect-jump-5.c: Likewise. + * gcc.target/powerpc/safe-indirect-jump-6.c: Likewise. + * gcc.target/powerpc/safe-indirect-jump-7.c: Likewise. + 2018-02-06 Igor Tsimbalist PR target/84145 diff --git a/gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-1.c b/gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-1.c index d1ab83a11d4..16ccfe471f6 100644 --- a/gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-1.c +++ b/gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-1.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-additional-options "-mno-speculate-indirect-jumps" } */ +/* { dg-warning "'-mno-speculate-indirect-jumps' is deprecated" "" { target *-*-* } 0 } */ /* Test for deliberate misprediction of indirect calls. */ diff --git a/gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-2.c b/gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-2.c index 1c23a5d9add..d3d040fbbf0 100644 --- a/gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-2.c +++ b/gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-2.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-mno-speculate-indirect-jumps" } */ +/* { dg-warning "'-mno-speculate-indirect-jumps' is deprecated" "" { target *-*-* } 0 } */ /* Test for deliberate misprediction of computed goto. */ diff --git a/gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-3.c b/gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-3.c index d0eccc4f262..c338e30d01a 100644 --- a/gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-3.c +++ b/gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-3.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-mno-speculate-indirect-jumps" } */ +/* { dg-warning "'-mno-speculate-indirect-jumps' is deprecated" "" { target *-*-* } 0 } */ /* Test for deliberate misprediction of jump tables. */ diff --git a/gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-4.c b/gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-4.c index ed0000797c9..b55de13af93 100644 --- a/gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-4.c +++ b/gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-4.c @@ -1,5 +1,6 @@ /* { dg-do run } */ /* { dg-additional-options "-mno-speculate-indirect-jumps" } */ +/* { dg-warning "'-mno-speculate-indirect-jumps' is deprecated" "" { target *-*-* } 0 } */ /* Test for deliberate misprediction of indirect calls for ELFv2. */ diff --git a/gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-5.c b/gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-5.c index 5a4cd9a838e..fd04ffd56c7 100644 --- a/gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-5.c +++ b/gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-5.c @@ -1,5 +1,6 @@ /* { dg-do run } */ /* { dg-additional-options "-mno-speculate-indirect-jumps -Wno-pedantic" } */ +/* { dg-warning "'-mno-speculate-indirect-jumps' is deprecated" "" { target *-*-* } 0 } */ /* Test for deliberate misprediction of computed goto. */ diff --git a/gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-6.c b/gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-6.c index a78e468fc70..1468a4ee20d 100644 --- a/gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-6.c +++ b/gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-6.c @@ -1,5 +1,6 @@ /* { dg-do run } */ /* { dg-additional-options "-mno-speculate-indirect-jumps" } */ +/* { dg-warning "'-mno-speculate-indirect-jumps' is deprecated" "" { target *-*-* } 0 } */ /* Test for deliberate misprediction of jump tables. */ diff --git a/gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-7.c b/gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-7.c index b1bdcca8524..e7d81d40ff0 100644 --- a/gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-7.c +++ b/gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-7.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-additional-options "-mno-speculate-indirect-jumps" } */ +/* { dg-warning "'-mno-speculate-indirect-jumps' is deprecated" "" { target *-*-* } 0 } */ /* Test for deliberate misprediction of indirect calls. */