Commit 0d0a8b3f authored by Milad Fa's avatar Milad Fa Committed by V8 LUCI CQ

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: 's avatarMichael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75398}
parent e2489655
...@@ -663,6 +663,12 @@ class BaseTestRunner(object): ...@@ -663,6 +663,12 @@ class BaseTestRunner(object):
self.build_config.arch == 'mipsel': self.build_config.arch == 'mipsel':
no_simd_hardware = not simd_mips 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 # Ppc64 processors earlier than POWER9 do not support Simd instructions
if self.build_config.arch == 'ppc64' and \ if self.build_config.arch == 'ppc64' and \
not self.build_config.simulator_run and \ not self.build_config.simulator_run and \
......
...@@ -97,6 +97,18 @@ def GuessOS(): ...@@ -97,6 +97,18 @@ def GuessOS():
return None 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. # Returns power processor version, taking compatibility mode into account.
# (Power9 running in Power8 compatibility mode returns 8) # (Power9 running in Power8 compatibility mode returns 8)
# Only useful if arch is ppc64 # Only useful if arch is ppc64
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment