aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorAndreas Krebbel <krebbel@linux.ibm.com>2019-11-05 13:27:59 +0000
committerAndreas Krebbel <krebbel@gcc.gnu.org>2019-11-05 13:27:59 +0000
commitd8e5ca292046561482b3aad266b1ac1558c9bd95 (patch)
tree21d59ec37757d323bd1c84e7bfe372dbf1d5ef33 /gcc
parent76d8b4d1ada1d9a6c1408b9b94b0baa31d1f3c0c (diff)
downloadgcc-d8e5ca292046561482b3aad266b1ac1558c9bd95.zip
gcc-d8e5ca292046561482b3aad266b1ac1558c9bd95.tar.gz
gcc-d8e5ca292046561482b3aad266b1ac1558c9bd95.tar.bz2
IBM Z: Fix testsuite useable_hw check
This fixes various issues with the useable_hw check in s390.exp. The check is supposed to verify whether a testcase can be run on the current hardware. - the test never returned true for -m31 because vzero is not available in ESA mode and -m31 defaults to -mesa - the missing v0 clobber on the vzero instruction made the check fail if the stack pointer got saved in f0 - the lcbb instruction used for checking whether we are on a z13 also requires vx. Replace it with an instruction from the generic instruction set extensions. - no support for z14 and z15 so far gcc/testsuite/ChangeLog: 2019-11-05 Andreas Krebbel <krebbel@linux.ibm.com> * gcc.target/s390/s390.exp (check_effective_target_s390_useable_hw): Add inline asm for z14 and z15. Replace instruction for z13 with lochiz. Add register clobbers. Check also for __zarch__ when doing the __VX__ test. From-SVN: r277830
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog7
-rw-r--r--gcc/testsuite/gcc.target/s390/s390.exp22
2 files changed, 20 insertions, 9 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index e122e25..2af8f73 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,10 @@
+2019-11-05 Andreas Krebbel <krebbel@linux.ibm.com>
+
+ * gcc.target/s390/s390.exp
+ (check_effective_target_s390_useable_hw): Add inline asm for z14
+ and z15. Replace instruction for z13 with lochiz. Add register
+ clobbers. Check also for __zarch__ when doing the __VX__ test.
+
2019-11-05 Christophe Lyon <christophe.lyon@linaro.org>
* gcc.target/arm/attr-crypto.c: Skip if -mpure-code is used.
diff --git a/gcc/testsuite/gcc.target/s390/s390.exp b/gcc/testsuite/gcc.target/s390/s390.exp
index 925eb56..b4057b0 100644
--- a/gcc/testsuite/gcc.target/s390/s390.exp
+++ b/gcc/testsuite/gcc.target/s390/s390.exp
@@ -87,18 +87,22 @@ proc check_effective_target_s390_useable_hw { } {
int main (void)
{
asm (".machinemode zarch" : : );
- #if __ARCH__ >= 11
- asm ("lcbb %%r2,0(%%r15),0" : : );
+ #if __ARCH__ >= 13
+ asm ("ncrk %%r2,%%r2,%%r2" : : : "r2");
+ #elif __ARCH__ >= 12
+ asm ("agh %%r2,0(%%r15)" : : : "r2");
+ #elif __ARCH__ >= 11
+ asm ("lochiz %%r2,42" : : : "r2");
#elif __ARCH__ >= 10
- asm ("risbgn %%r2,%%r2,0,0,0" : : );
+ asm ("risbgn %%r2,%%r2,0,0,0" : : : "r2");
#elif __ARCH__ >= 9
- asm ("sgrk %%r2,%%r2,%%r2" : : );
+ asm ("sgrk %%r2,%%r2,%%r2" : : : "r2");
#elif __ARCH__ >= 8
- asm ("rosbg %%r2,%%r2,0,0,0" : : );
+ asm ("rosbg %%r2,%%r2,0,0,0" : : : "r2");
#elif __ARCH__ >= 7
- asm ("nilf %%r2,0" : : );
+ asm ("nilf %%r2,0" : : : "r2");
#elif __ARCH__ >= 6
- asm ("lay %%r2,0(%%r15)" : : );
+ asm ("lay %%r2,0(%%r15)" : : : "r2");
#elif __ARCH__ >= 5
asm ("tam" : : );
#endif
@@ -108,8 +112,8 @@ proc check_effective_target_s390_useable_hw { } {
asm ("etnd %0" : "=d" (nd));
}
#endif
- #ifdef __VX__
- asm ("vzero %%v0" : : );
+ #if defined (__VX__) && defined (__zarch__)
+ asm ("vzero %%v0" : : : "v0");
#endif
return 0;
}