Commit 2789be8f authored by Ng Zhi An's avatar Ng Zhi An Committed by Commit Bot

[wasm-simd] Add s128 load store to fuzzer ops

Bug: v8:10180
Change-Id: If8dd729739854ee0bc08bf71100f48de6a0437b3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2084321Reviewed-by: 's avatarDeepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66602}
parent 72b02a02
......@@ -16,6 +16,7 @@
#include "src/wasm/wasm-interpreter.h"
#include "src/wasm/wasm-module-builder.h"
#include "src/wasm/wasm-module.h"
#include "src/wasm/wasm-opcodes.h"
#include "test/common/wasm/flag-utils.h"
#include "test/common/wasm/test-signatures.h"
#include "test/common/wasm/wasm-module-runner.h"
......@@ -281,8 +282,8 @@ class WasmGenerator {
// Generate the index and the arguments, if any.
Generate<kWasmI32, arg_types...>(data);
if ((memory_op & 0xfe00) == 0xfe00) {
// This is an atomic-load or atomic-store.
if (WasmOpcodes::IsPrefixOpcode(memory_op)) {
DCHECK(memory_op >> 8 == kAtomicPrefix || memory_op >> 8 == kSimdPrefix);
builder_->EmitWithPrefix(memory_op);
} else {
builder_->Emit(memory_op);
......@@ -985,7 +986,10 @@ void WasmGenerator::Generate<kWasmS128>(DataRange* data) {
&WasmGenerator::simd_op<kExprI32x4Add, kWasmS128, kWasmS128>,
&WasmGenerator::simd_op<kExprI64x2Add, kWasmS128, kWasmS128>,
&WasmGenerator::simd_op<kExprF32x4Add, kWasmS128, kWasmS128>,
&WasmGenerator::simd_op<kExprF64x2Add, kWasmS128, kWasmS128>};
&WasmGenerator::simd_op<kExprF64x2Add, kWasmS128, kWasmS128>,
&WasmGenerator::memop<kExprS128LoadMem>,
&WasmGenerator::memop<kExprS128StoreMem, kWasmS128>};
GenerateOneOf(alternatives, data);
}
......
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