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

[wasm-simd][ia32] Implement v128.load32_zero v128.load64_zero

Prototype these two instructions on ia32. They are movss and movsd
respectively, so the implementation is pretty simple, as we support
these instructions already.

Bug: v8:11038
Change-Id: Iebf4afab2bf1edfb4b14a4855d5036677f999ca9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2486232Reviewed-by: 's avatarBill Budge <bbudge@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70634}
parent fe9f8045
...@@ -396,6 +396,12 @@ void InstructionSelector::VisitLoadTransform(Node* node) { ...@@ -396,6 +396,12 @@ void InstructionSelector::VisitLoadTransform(Node* node) {
case LoadTransformation::kS128Load32x2U: case LoadTransformation::kS128Load32x2U:
opcode = kIA32S128Load32x2U; opcode = kIA32S128Load32x2U;
break; break;
case LoadTransformation::kS128Load32Zero:
opcode = kIA32Movss;
break;
case LoadTransformation::kS128Load64Zero:
opcode = kIA32Movsd;
break;
default: default:
UNREACHABLE(); UNREACHABLE();
} }
......
...@@ -3697,7 +3697,7 @@ WASM_SIMD_TEST(S128Load32x2S) { ...@@ -3697,7 +3697,7 @@ WASM_SIMD_TEST(S128Load32x2S) {
} }
// TODO(v8:10713): Prototyping v128.load32_zero and v128.load64_zero. // TODO(v8:10713): Prototyping v128.load32_zero and v128.load64_zero.
#if V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_ARM64 #if V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_IA32
template <typename S> template <typename S>
void RunLoadZeroTest(TestExecutionTier execution_tier, LowerSimd lower_simd, void RunLoadZeroTest(TestExecutionTier execution_tier, LowerSimd lower_simd,
WasmOpcode op) { WasmOpcode op) {
...@@ -3729,7 +3729,7 @@ WASM_SIMD_TEST_NO_LOWERING(S128Load32Zero) { ...@@ -3729,7 +3729,7 @@ WASM_SIMD_TEST_NO_LOWERING(S128Load32Zero) {
WASM_SIMD_TEST_NO_LOWERING(S128Load64Zero) { WASM_SIMD_TEST_NO_LOWERING(S128Load64Zero) {
RunLoadZeroTest<int64_t>(execution_tier, lower_simd, kExprS128Load64Zero); RunLoadZeroTest<int64_t>(execution_tier, lower_simd, kExprS128Load64Zero);
} }
#endif // V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_ARM64 #endif // V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_IA32
#if V8_TARGET_ARCH_X64 #if V8_TARGET_ARCH_X64
// TODO(v8:10975): Prototyping load lane and store lane. // 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