Commit e6d96d23 authored by Ng Zhi An's avatar Ng Zhi An Committed by Commit Bot

[wasm-simd] Move v128 load32_zero load64_zero out of post-mvp

And remove all ifdefs guarding the tests.

Bug: v8:11038
Change-Id: I91487a4bd60b6f2e327d1c2348289e446d6e93d1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2501967Reviewed-by: 's avatarBill Budge <bbudge@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70811}
parent 07371c52
......@@ -1742,12 +1742,6 @@ class WasmDecoder : public Decoder {
UINT32_MAX);
return length + imm.length;
}
case kExprS128Load32Zero:
case kExprS128Load64Zero: {
MemoryAccessImmediate<validate> imm(decoder, pc + length,
UINT32_MAX);
return length + imm.length;
}
case kExprS128Load8Lane:
case kExprS128Load16Lane:
case kExprS128Load32Lane:
......@@ -3535,16 +3529,10 @@ class WasmFullDecoder : public WasmDecoder<validate> {
case kExprS128StoreMem:
return DecodeStoreMem(StoreType::kS128Store, opcode_length);
case kExprS128Load32Zero:
if (!CheckSimdPostMvp(opcode)) {
return 0;
}
return DecodeLoadTransformMem(LoadType::kI32Load,
LoadTransformationKind::kZeroExtend,
opcode_length);
case kExprS128Load64Zero:
if (!CheckSimdPostMvp(opcode)) {
return 0;
}
return DecodeLoadTransformMem(LoadType::kI64Load,
LoadTransformationKind::kZeroExtend,
opcode_length);
......
......@@ -288,7 +288,9 @@ bool V8_EXPORT_PRIVATE IsJSCompatibleSignature(const FunctionSig* sig,
V(S128Load16Splat, 0xfd08, s_i) \
V(S128Load32Splat, 0xfd09, s_i) \
V(S128Load64Splat, 0xfd0a, s_i) \
V(S128StoreMem, 0xfd0b, v_is)
V(S128StoreMem, 0xfd0b, v_is) \
V(S128Load32Zero, 0xfdfc, s_i) \
V(S128Load64Zero, 0xfdfd, s_i)
#define FOREACH_SIMD_CONST_OPCODE(V) V(S128Const, 0xfd0c, _)
......@@ -460,8 +462,6 @@ bool V8_EXPORT_PRIVATE IsJSCompatibleSignature(const FunctionSig* sig,
V(F64x2NearestInt, 0xfddf, s_s)
#define FOREACH_SIMD_POST_MVP_MEM_OPCODE(V) \
V(S128Load32Zero, 0xfdfc, s_i) \
V(S128Load64Zero, 0xfdfd, s_i) \
V(S128Load8Lane, 0xfd58, s_is) \
V(S128Load16Lane, 0xfd59, s_is) \
V(S128Load32Lane, 0xfd5a, s_is) \
......
......@@ -3696,13 +3696,9 @@ WASM_SIMD_TEST(S128Load32x2S) {
kExprS128Load32x2S);
}
// TODO(v8:10713): Prototyping v128.load32_zero and v128.load64_zero.
#if V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_IA32 || \
V8_TARGET_ARCH_ARM
template <typename S>
void RunLoadZeroTest(TestExecutionTier execution_tier, LowerSimd lower_simd,
WasmOpcode op) {
FLAG_SCOPE(wasm_simd_post_mvp);
constexpr int lanes_s = kSimd128Size / sizeof(S);
constexpr int mem_index = 16; // Load from mem index 16 (bytes).
constexpr S sentinel = S{-1};
......@@ -3778,8 +3774,6 @@ WASM_SIMD_TEST_NO_LOWERING(S128Load32Zero) {
WASM_SIMD_TEST_NO_LOWERING(S128Load64Zero) {
RunLoadZeroTest<int64_t>(execution_tier, lower_simd, kExprS128Load64Zero);
}
#endif // V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_IA32 ||
// V8_TARGET_ARCH_ARM
#if V8_TARGET_ARCH_X64
// TODO(v8:10975): Prototyping load lane and store lane.
......
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