diff --git a/tools/testrunner/base_runner.py b/tools/testrunner/base_runner.py index b60718c164bd370da9e27e8d08a49350e30eecee..009893a23a2ceb37bf3a1d4f5ad8201ad4c0ba6b 100644 --- a/tools/testrunner/base_runner.py +++ b/tools/testrunner/base_runner.py @@ -663,6 +663,12 @@ class BaseTestRunner(object): self.build_config.arch == 'mipsel': no_simd_hardware = not simd_mips + # S390 hosts without VEF1 do not support Simd. + if self.build_config.arch == 's390x' and \ + not self.build_config.simulator_run and \ + not utils.IsS390SimdSupported(): + no_simd_hardware = True + # Ppc64 processors earlier than POWER9 do not support Simd instructions if self.build_config.arch == 'ppc64' and \ not self.build_config.simulator_run and \ diff --git a/tools/testrunner/local/utils.py b/tools/testrunner/local/utils.py index 94429a9fde9e4546369c8a338d8b3d2b6719281c..05d1ef7d5e94f64d7e5e716e9bb119fc5f22a3dc 100644 --- a/tools/testrunner/local/utils.py +++ b/tools/testrunner/local/utils.py @@ -97,6 +97,18 @@ def GuessOS(): return None +# Check if Vector Enhancement Facility 1 is available on the +# host S390 machine. This facility is required for supporting Simd on V8. +def IsS390SimdSupported(): + import subprocess + cpuinfo = subprocess.check_output("cat /proc/cpuinfo", shell=True) + cpuinfo_list = cpuinfo.strip().decode("utf-8").splitlines() + facilities = "".join(x for x in cpuinfo_list if x.startswith("facilities")) + facilities_list = facilities.split(" ") + # Having bit 135 set indicates VEF1 is available. + return "135" in facilities_list + + # Returns power processor version, taking compatibility mode into account. # (Power9 running in Power8 compatibility mode returns 8) # Only useful if arch is ppc64