Commit c898fb31 authored by Milad Farazmand's avatar Milad Farazmand Committed by Commit Bot

s390: [wasm-simd] Enable LoadTransform tests on the simulator

LoadTransform is not implemented on BE machines and instead,
it is divided into 2 separate "Load" and "operation" nodes.
We need to assure same behaviour applies on S390 simulator, however,
S390 Sim does not execute BE code, it assume generated code is in
LE format hence "V8_TARGET_BIG_ENDIAN" is set to false when running
on Sim.

This CL includes V8_TARGET_ARCH_S390_LE_SIM to assure same
behaviour occurs when running on the Sim until V8_TARGET_BIG_ENDIAN
can also include the simulator.


Change-Id: If1decf9eccb43ac721b57d58362b8934d49cbff2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2124847
Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66895}
parent b10799f4
......@@ -3698,7 +3698,10 @@ LoadKind GetLoadKind(MachineGraph* mcgraph, MachineType memtype,
}
} // namespace
#if defined(V8_TARGET_BIG_ENDIAN)
// S390 simulator does not execute BE code, hence needs to also check if we are
// running on a LE simulator.
// TODO(miladfar): Remove SIM once V8_TARGET_BIG_ENDIAN includes the Sim.
#if defined(V8_TARGET_BIG_ENDIAN) || defined(V8_TARGET_ARCH_S390_LE_SIM)
Node* WasmGraphBuilder::LoadTransformBigEndian(
MachineType memtype, wasm::LoadTransformationKind transform, Node* value) {
Node* result;
......@@ -3746,7 +3749,7 @@ Node* WasmGraphBuilder::LoadTransform(wasm::ValueType type, MachineType memtype,
Node* load;
#if defined(V8_TARGET_BIG_ENDIAN)
#if defined(V8_TARGET_BIG_ENDIAN) || defined(V8_TARGET_ARCH_S390_LE_SIM)
// LoadTransform cannot efficiently be executed on BE machines as a
// single operation since loaded bytes need to be reversed first,
// therefore we divide them into separate "load" and "operation" nodes.
......
......@@ -285,7 +285,7 @@ class WasmGraphBuilder {
Node* LoadMem(wasm::ValueType type, MachineType memtype, Node* index,
uint32_t offset, uint32_t alignment,
wasm::WasmCodePosition position);
#if defined(V8_TARGET_BIG_ENDIAN)
#if defined(V8_TARGET_BIG_ENDIAN) || defined(V8_TARGET_ARCH_S390_LE_SIM)
Node* LoadTransformBigEndian(MachineType memtype,
wasm::LoadTransformationKind transform,
Node* value);
......
......@@ -616,17 +616,4 @@
'test-cpu-profiler/DeoptUntrackedFunction': [SKIP],
}], # variant == turboprop
##############################################################################
['arch == s390x and simulator_run', {
# LoadTransform must also follow BE behaviour on sim (see http://crrev.com/c/2050811).
# Skip tests until V8_TARGET_BIG_ENDIAN also applies to the simulator.
'test-run-wasm-simd/RunWasm_I64x2Load*': [SKIP],
'test-run-wasm-simd/RunWasm_I32x4Load*': [SKIP],
'test-run-wasm-simd/RunWasm_I16x8Load*': [SKIP],
'test-run-wasm-simd/RunWasm_S64x2Load*': [SKIP],
'test-run-wasm-simd/RunWasm_S32x4Load*': [SKIP],
'test-run-wasm-simd/RunWasm_S16x8Load*': [SKIP],
'test-run-wasm-simd/RunWasm_S8x16Load*': [SKIP],
}], # 'arch == s390x and simulator_run'
]
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