rs6000.c (rs6000_option_override_internal): Display warning message for -mno-speculat...
authorBill Schmidt <wschmidt@linux.vnet.ibm.com>
Tue, 6 Feb 2018 16:55:01 +0000 (16:55 +0000)
committerWilliam Schmidt <wschmidt@gcc.gnu.org>
Tue, 6 Feb 2018 16:55:01 +0000 (16:55 +0000)
[gcc]

2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

* config/rs6000/rs6000.c (rs6000_option_override_internal):
Display warning message for -mno-speculate-indirect-jumps.

[gcc/testsuite]

2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

* 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

gcc/ChangeLog
gcc/config/rs6000/rs6000.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-1.c
gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-2.c
gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-3.c
gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-4.c
gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-5.c
gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-6.c
gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-7.c

index b42a12371402a30036eaabb63debec7908931257..4b4558b016b49412ced402886092030e51d39c08 100644 (file)
@@ -1,3 +1,8 @@
+2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
+
+       * config/rs6000/rs6000.c (rs6000_option_override_internal):
+       Display warning message for -mno-speculate-indirect-jumps.
+
 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
 
        * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
index a37ebd88cce1895258a2de104d8fd03f78f346bd..6a6801aad9ba7499db8fb3c9a56f068a82873f91 100644 (file)
@@ -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;
 }
 
index 2e279b4dea0e4ad9f4f66caa9eff5ce3cb8f5c91..be9f3153c0daccf060241cf187e4ce531937f1da 100644 (file)
@@ -1,3 +1,14 @@
+2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
+
+       * 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  <igor.v.tsimbalist@intel.com>
 
        PR target/84145
index d1ab83a11d4bb819c6f1fc53b47a43437b862a33..16ccfe471f65358775bbad795a3a6ad26fb8be25 100644 (file)
@@ -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.  */
 
index 1c23a5d9addfc4bf3d20764791a0469dea31d203..d3d040fbbf09bc5f7ffe3dcfb9d75f07b86613d2 100644 (file)
@@ -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.  */
 
index d0eccc4f262fa3f6931c0e4d34a2c33d23d7023a..c338e30d01ad971b4931e746781bb7e176037bd7 100644 (file)
@@ -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.  */
 
index ed0000797c93a76582b92b95c82c4a748dfca59a..b55de13af93395fa49e58bfdacd3e71a67f641e3 100644 (file)
@@ -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.  */
 
index 5a4cd9a838e6c13aefcd72271ef3ee89e3e9a3f2..fd04ffd56c7b3dc017a7381243dccfcc6b7edda8 100644 (file)
@@ -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.  */
 
index a78e468fc707d773b7ed493140a0e3f5a7c0c8af..1468a4ee20ded24c628e9482f77c2041336213b3 100644 (file)
@@ -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.  */
 
index b1bdcca852400266ef64c3a2f53367e966004a31..e7d81d40ff0c04ae090b1e671cb8301fcdb4dd4d 100644 (file)
@@ -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.  */