Commit dffa5284 authored by Yang Qin's avatar Yang Qin Committed by Commit Bot

s390: add if statement to check if SIMD instructions are available

Added if statements to check if VECTOR_FACILITY are supported in order to avoid “illegal instruction” errors during SIMD tests on old s390 machines.

Change-Id: I1ab841db02e6c47de54d4a15b973e5366f88e117
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1704937Reviewed-by: 's avatarJunliang Yan <jyan@ca.ibm.com>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#62852}
parent 479e5267
......@@ -600,6 +600,11 @@ TEST(12) {
// vector basics
TEST(13) {
// check if the VECTOR_FACILITY is supported
if (!CpuFeatures::IsSupported(VECTOR_FACILITY)) {
return;
}
CcTest::InitializeVM();
Isolate* isolate = CcTest::i_isolate();
HandleScope scope(isolate);
......@@ -659,6 +664,11 @@ TEST(13) {
// vector sum, packs, unpacks
TEST(14) {
// check if the VECTOR_FACILITY is supported
if (!CpuFeatures::IsSupported(VECTOR_FACILITY)) {
return;
}
CcTest::InitializeVM();
Isolate* isolate = CcTest::i_isolate();
HandleScope scope(isolate);
......@@ -743,6 +753,11 @@ TEST(14) {
// vector comparisons
TEST(15) {
// check if the VECTOR_FACILITY is supported
if (!CpuFeatures::IsSupported(VECTOR_FACILITY)) {
return;
}
CcTest::InitializeVM();
Isolate* isolate = CcTest::i_isolate();
HandleScope scope(isolate);
......@@ -827,6 +842,11 @@ TEST(15) {
// vector select and test mask
TEST(16) {
// check if the VECTOR_FACILITY is supported
if (!CpuFeatures::IsSupported(VECTOR_FACILITY)) {
return;
}
CcTest::InitializeVM();
Isolate* isolate = CcTest::i_isolate();
HandleScope scope(isolate);
......@@ -868,6 +888,11 @@ TEST(16) {
// vector fp instructions
TEST(17) {
// check if the VECTOR_FACILITY is supported
if (!CpuFeatures::IsSupported(VECTOR_FACILITY)) {
return;
}
CcTest::InitializeVM();
Isolate* isolate = CcTest::i_isolate();
HandleScope scope(isolate);
......
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