rs6000.h: Add conditional preprocessing directives to disable Power9-specific compiler...
authorKelvin Nilsen <kelvin@gcc.gnu.org>
Tue, 21 Jun 2016 21:39:49 +0000 (21:39 +0000)
committerKelvin Nilsen <kelvin@gcc.gnu.org>
Tue, 21 Jun 2016 21:39:49 +0000 (21:39 +0000)
gcc/ChangeLog:

2016-06-21  Kelvin Nilsen  <kelvin@gcc.gnu.org>

* config/rs6000/rs6000.h: Add conditional preprocessing directives
to disable Power9-specific compiler features if HAVE_AS_POWER9 is
not defined.

gcc/testsuite/ChangeLog:

2016-06-21  Kelvin Nilsen  <kelvin@gcc.gnu.org>

* gcc.target/powerpc/darn-0.c: Add dejagnu directives to disable
test if effective-target is not powerpc_p9vector_ok, or if a -mcpu
override other than -mcpu=power9 command-line option is specified,
or if the target operating system is aix.
* gcc.target/powerpc/darn-1.c: Likewise.
* gcc.target/powerpc/darn-2.c: Likewise.
* gcc.target/powerpc/vslv-0.c: Add dejagnu directives to disable
test if effective-target is not powerpc_p9vector_ok or if the
target operating system is not defined.
* gcc.target/powerpc/vslv-1.c: Likewise.
* gcc.target/powerpc/vsrv-0.c: Likewise.
* gcc.target/powerpc/vsrv-1.c: Likewise.

From-SVN: r237659

gcc/ChangeLog
gcc/config/rs6000/rs6000.h
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/powerpc/darn-0.c
gcc/testsuite/gcc.target/powerpc/darn-1.c
gcc/testsuite/gcc.target/powerpc/darn-2.c
gcc/testsuite/gcc.target/powerpc/vslv-0.c
gcc/testsuite/gcc.target/powerpc/vslv-1.c
gcc/testsuite/gcc.target/powerpc/vsrv-0.c
gcc/testsuite/gcc.target/powerpc/vsrv-1.c

index ff7bf8f867465fa029fc2e6b1ebb50cebcbbdd81..020e08d5b87e53088ddfa6b62a4e0920b04fa0b7 100644 (file)
@@ -1,3 +1,9 @@
+2016-06-21  Kelvin Nilsen  <kelvin@gcc.gnu.org>
+
+       * config/rs6000/rs6000.h: Add conditional preprocessing directives
+       to disable Power9-specific compiler features if HAVE_AS_POWER9 is
+       not defined.
+
 2016-06-21  Eric Botcazou  <ebotcazou@adacore.com>
 
        * tree.c (verify_type_variant): Skip TYPE_SIZE and TYPE_SIZE_UNIT if
index e1f01732074413eddd7f9c62850b75298ac87596..d3cba82748b78c5e929fbdb32c3b77067a0e0435 100644 (file)
@@ -302,6 +302,26 @@ extern const char *host_detect_local_cpu (int argc, const char **argv);
 #define TARGET_P8_VECTOR 0
 #endif
 
+/* Define the ISA 3.0 flags as 0 if the target assembler does not support
+   Power9 instructions.  Allow -mpower9-fusion, since it does not add new
+   instructions.  Allow -misel, since it predates ISA 3.0 and does
+   not require any Power9 features.  */
+
+#ifndef HAVE_AS_POWER9
+#undef  TARGET_FLOAT128_HW
+#undef  TARGET_MODULO
+#undef  TARGET_P9_VECTOR
+#undef  TARGET_P9_MINMAX
+#undef  TARGET_P9_DFORM_SCALAR
+#undef  TARGET_P9_DFORM_VECTOR
+#define TARGET_FLOAT128_HW 0
+#define TARGET_MODULO 0
+#define TARGET_P9_VECTOR 0
+#define TARGET_P9_MINMAX 0
+#define TARGET_P9_DFORM_SCALAR 0
+#define TARGET_P9_DFORM_VECTOR 0
+#endif
+
 /* Define TARGET_LWSYNC_INSTRUCTION if the assembler knows about lwsync.  If
    not, generate the lwsync code as an integer constant.  */
 #ifdef HAVE_AS_LWSYNC
index 7f5720997eb451a67a23cbf27197d35b964f99ea..51d7a3082fbb1fcebbaff3d4181065338a0610bd 100644 (file)
@@ -1,3 +1,18 @@
+2016-06-21  Kelvin Nilsen  <kelvin@gcc.gnu.org>
+
+       * gcc.target/powerpc/darn-0.c: Add dejagnu directives to disable
+       test if effective-target is not powerpc_p9vector_ok, or if a -mcpu
+       override other than -mcpu=power9 command-line option is specified,
+       or if the target operating system is aix.
+       * gcc.target/powerpc/darn-1.c: Likewise.
+       * gcc.target/powerpc/darn-2.c: Likewise.
+       * gcc.target/powerpc/vslv-0.c: Add dejagnu directives to disable
+       test if effective-target is not powerpc_p9vector_ok or if the
+       target operating system is not defined.
+       * gcc.target/powerpc/vslv-1.c: Likewise.
+       * gcc.target/powerpc/vsrv-0.c: Likewise.
+       * gcc.target/powerpc/vsrv-1.c: Likewise.
+
 2016-06-21  Tobias Burnus  <burnus@net-b.de>
 
        PR fortran/71068
index ce2e25e22a18051e2153c8b2f410f3e7135bac36..fc150766108a24af720cf4ceab6fc4d45df9f23a 100644 (file)
@@ -1,4 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
 /* { dg-options "-mcpu=power9" } */
 
 /* This test should succeed on both 32- and 64-bit configurations.  */
index d79e5c1b4d9cc88b1c231c9fed49cde0746620c3..9b7482d6551ab1339104451bba98a5db8d8fde6c 100644 (file)
@@ -1,6 +1,9 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
-/* { dg-options "-mcpu=power9" } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
 /* { dg-require-effective-target lp64 } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-options "-mcpu=power9" } */
 
 #include <altivec.h>
 
index 7f47332ec499c5d87a3ba9bc24ab7e7c029ad6b0..84493602cfcfb82d2b3a7a1c033a2290c8d5f605 100644 (file)
@@ -1,6 +1,9 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
-/* { dg-options "-mcpu=power9" } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
 /* { dg-require-effective-target lp64 } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-options "-mcpu=power9" } */
 
 #include <altivec.h>
 
index 1414be107f8ac35291c7491006640d783f7192d3..9ad04dd92e7efe3187f3fedeffb8d0485d5aa8d6 100644 (file)
@@ -1,5 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
 /* { dg-options "-mcpu=power9" } */
 
 #include <altivec.h>
index 293f6d4e54b14a3d0dfd523bf64eeb4231dcd3cc..2d09543c814dc2daea102754f3425f1ef2c3b277 100644 (file)
@@ -1,5 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
 /* { dg-options "-mcpu=power9" } */
 
 #include <altivec.h>
index 29e7716566b8658558010181ceffde34931fe51e..29c7e3fde200ab13b5be1f0bb77274d72fb7d89c 100644 (file)
@@ -1,5 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
 /* { dg-options "-mcpu=power9" } */
 
 #include <altivec.h>
index fd743220c3bdfc4532e8ec4675b7f4f917582fbb..cd3f714bd64dc28c4fb53b1dcb50250c124a5ede 100644 (file)
@@ -1,5 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
 /* { dg-options "-mcpu=power9" } */
 
 #include <altivec.h>