From: Kelvin Nilsen Date: Tue, 21 Jun 2016 21:39:49 +0000 (+0000) Subject: rs6000.h: Add conditional preprocessing directives to disable Power9-specific compiler... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=caea59ff66c4ec159f4a5bb29c1fec0556cd991a;p=gcc.git rs6000.h: Add conditional preprocessing directives to disable Power9-specific compiler... gcc/ChangeLog: 2016-06-21 Kelvin Nilsen * 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 * 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ff7bf8f8674..020e08d5b87 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2016-06-21 Kelvin Nilsen + + * 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 * tree.c (verify_type_variant): Skip TYPE_SIZE and TYPE_SIZE_UNIT if diff --git a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h index e1f01732074..d3cba82748b 100644 --- a/gcc/config/rs6000/rs6000.h +++ b/gcc/config/rs6000/rs6000.h @@ -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 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 7f5720997eb..51d7a3082fb 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,18 @@ +2016-06-21 Kelvin Nilsen + + * 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 PR fortran/71068 diff --git a/gcc/testsuite/gcc.target/powerpc/darn-0.c b/gcc/testsuite/gcc.target/powerpc/darn-0.c index ce2e25e22a1..fc150766108 100644 --- a/gcc/testsuite/gcc.target/powerpc/darn-0.c +++ b/gcc/testsuite/gcc.target/powerpc/darn-0.c @@ -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. */ diff --git a/gcc/testsuite/gcc.target/powerpc/darn-1.c b/gcc/testsuite/gcc.target/powerpc/darn-1.c index d79e5c1b4d9..9b7482d6551 100644 --- a/gcc/testsuite/gcc.target/powerpc/darn-1.c +++ b/gcc/testsuite/gcc.target/powerpc/darn-1.c @@ -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 diff --git a/gcc/testsuite/gcc.target/powerpc/darn-2.c b/gcc/testsuite/gcc.target/powerpc/darn-2.c index 7f47332ec49..84493602cfc 100644 --- a/gcc/testsuite/gcc.target/powerpc/darn-2.c +++ b/gcc/testsuite/gcc.target/powerpc/darn-2.c @@ -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 diff --git a/gcc/testsuite/gcc.target/powerpc/vslv-0.c b/gcc/testsuite/gcc.target/powerpc/vslv-0.c index 1414be107f8..9ad04dd92e7 100644 --- a/gcc/testsuite/gcc.target/powerpc/vslv-0.c +++ b/gcc/testsuite/gcc.target/powerpc/vslv-0.c @@ -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 diff --git a/gcc/testsuite/gcc.target/powerpc/vslv-1.c b/gcc/testsuite/gcc.target/powerpc/vslv-1.c index 293f6d4e54b..2d09543c814 100644 --- a/gcc/testsuite/gcc.target/powerpc/vslv-1.c +++ b/gcc/testsuite/gcc.target/powerpc/vslv-1.c @@ -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 diff --git a/gcc/testsuite/gcc.target/powerpc/vsrv-0.c b/gcc/testsuite/gcc.target/powerpc/vsrv-0.c index 29e7716566b..29c7e3fde20 100644 --- a/gcc/testsuite/gcc.target/powerpc/vsrv-0.c +++ b/gcc/testsuite/gcc.target/powerpc/vsrv-0.c @@ -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 diff --git a/gcc/testsuite/gcc.target/powerpc/vsrv-1.c b/gcc/testsuite/gcc.target/powerpc/vsrv-1.c index fd743220c3b..cd3f714bd64 100644 --- a/gcc/testsuite/gcc.target/powerpc/vsrv-1.c +++ b/gcc/testsuite/gcc.target/powerpc/vsrv-1.c @@ -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