diff options
author | Dominik Vogt <vogt@linux.vnet.ibm.com> | 2016-12-22 14:46:46 +0000 |
---|---|---|
committer | Andreas Krebbel <krebbel@gcc.gnu.org> | 2016-12-22 14:46:46 +0000 |
commit | cbbb9dabbb498b27ca4cf7337a7c8aa013498bb0 (patch) | |
tree | 90e366ab002fef48ff08fe6cc4eef5afa99f265a /gcc/config | |
parent | a71dcca81e3bdc9b387a6c6d1496f1f1d414f3d7 (diff) | |
download | gcc-cbbb9dabbb498b27ca4cf7337a7c8aa013498bb0.zip gcc-cbbb9dabbb498b27ca4cf7337a7c8aa013498bb0.tar.gz gcc-cbbb9dabbb498b27ca4cf7337a7c8aa013498bb0.tar.bz2 |
Run tests only if the machine supports the instruction set.
gcc/ChangeLog:
2016-12-22 Dominik Vogt <vogt@linux.vnet.ibm.com>
* config/s390/s390-c.c (s390_cpu_cpp_builtins_internal): Define
__S390_ARCH_LEVEL__.
gcc/testsuite/ChangeLog:
2016-12-22 Dominik Vogt <vogt@linux.vnet.ibm.com>
* gcc.target/s390/md/setmem_long-1.c: Use "s390_useable_hw".
* gcc.target/s390/md/rXsbg_mode_sXl.c: Likewise.
* gcc.target/s390/md/andc-splitter-1.c: Likewise.
* gcc.target/s390/md/andc-splitter-2.c: Likewise.
* lib/gcc-dg.exp (gcc-dg-runtest): Export torture_current_flags.
* gcc.target/s390/s390.exp: Import torture_current_flags.
(check_effective_target_s390_useable_hw): New.
(check_effective_target_s390_z900_hw): New.
(check_effective_target_s390_z990_hw): New.
(check_effective_target_s390_z9_ec_hw): New.
(check_effective_target_s390_z10_hw): New.
(check_effective_target_s390_z196_hw): New.
(check_effective_target_s390_zEC12_hw): New.
(check_effective_target_s390_z13_hw): New.
(check_effective_target_z10_instructions): Removed.
(torture tests): Add optimization level without -march=.
Reorder torture tests for good cache usage.
From-SVN: r243887
Diffstat (limited to 'gcc/config')
-rw-r--r-- | gcc/config/s390/s390-c.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/config/s390/s390-c.c b/gcc/config/s390/s390-c.c index fcf7477..e841365 100644 --- a/gcc/config/s390/s390-c.c +++ b/gcc/config/s390/s390-c.c @@ -320,6 +320,8 @@ s390_cpu_cpp_builtins_internal (cpp_reader *pfile, { s390_def_or_undef_macro (pfile, MASK_OPT_HTM, old_opts, opts, "__HTM__", "__HTM__"); + s390_def_or_undef_macro (pfile, MASK_OPT_VX, old_opts, opts, + "__S390_VX__", "__S390_VX__"); s390_def_or_undef_macro (pfile, MASK_ZVECTOR, old_opts, opts, "__VEC__=10301", "__VEC__"); s390_def_or_undef_macro (pfile, MASK_ZVECTOR, old_opts, opts, @@ -328,6 +330,21 @@ s390_cpu_cpp_builtins_internal (cpp_reader *pfile, s390_def_or_undef_macro (pfile, MASK_ZVECTOR, old_opts, opts, "__bool=__attribute__((s390_vector_bool)) unsigned", "__bool"); + { + char macro_def[64]; + int arch_level; + gcc_assert (s390_arch != PROCESSOR_NATIVE); + arch_level = (int)s390_arch + 3; + if (s390_arch >= PROCESSOR_2094_Z9_EC) + /* Z9_EC has the same level as Z9_109. */ + arch_level--; + /* Review when a new arch is added and increase the value. */ + char dummy[23 - 2 * PROCESSOR_max] __attribute__((unused)); + sprintf (macro_def, "__S390_ARCH_LEVEL__=%d", arch_level); + cpp_undef (pfile, "__S390_ARCH_LEVEL__"); + cpp_define (pfile, macro_def); + } + if (!flag_iso) { s390_def_or_undef_macro (pfile, MASK_ZVECTOR, old_opts, opts, |