S390: Skip Simd tests if VEF1 is not available on the host machine

Change-Id: I57c6989ff0ca872b66567c701c2b9bf8ee6e83d9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2983069
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75398}
This commit is contained in:
Milad Fa 2021-06-25 09:04:42 -04:00 committed by V8 LUCI CQ
parent e24896559a
commit 0d0a8b3ff9
2 changed files with 18 additions and 0 deletions

View File

@ -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 \

View File

@ -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