| Index: src/wasm/ast-decoder.cc
|
| diff --git a/src/wasm/ast-decoder.cc b/src/wasm/ast-decoder.cc
|
| index 796bd9f7443412a47f0f4be1378302d00833e563..df52ede32fa62147bbb2eb127d3ed25e00fec406 100644
|
| --- a/src/wasm/ast-decoder.cc
|
| +++ b/src/wasm/ast-decoder.cc
|
| @@ -1338,6 +1338,18 @@ class WasmFullDecoder : public WasmDecoder {
|
| return operand.length;
|
| }
|
|
|
| + unsigned ReplaceLane(WasmOpcode opcode, LocalType type) {
|
| + LaneOperand operand(this, pc_);
|
| + if (Validate(pc_, operand)) {
|
| + TFNode* input = Pop(0, LocalType::kSimd128).node;
|
| + TFNode* replacement = Pop(1, type).node;
|
| + TFNode* node =
|
| + BUILD(SimdReplaceLane, opcode, operand.lane, input, replacement);
|
| + Push(LocalType::kSimd128, node);
|
| + }
|
| + return operand.length;
|
| + }
|
| +
|
| unsigned DecodeSimdOpcode(WasmOpcode opcode) {
|
| unsigned len = 0;
|
| switch (opcode) {
|
| @@ -1349,6 +1361,14 @@ class WasmFullDecoder : public WasmDecoder {
|
| len = ExtractLane(opcode, LocalType::kFloat32);
|
| break;
|
| }
|
| + case kExprI32x4ReplaceLane: {
|
| + len = ReplaceLane(opcode, LocalType::kWord32);
|
| + break;
|
| + }
|
| + case kExprF32x4ReplaceLane: {
|
| + len = ReplaceLane(opcode, LocalType::kFloat32);
|
| + break;
|
| + }
|
| default: {
|
| FunctionSig* sig = WasmOpcodes::Signature(opcode);
|
| if (sig != nullptr) {
|
|
|