| Index: src/wasm/ast-decoder.cc
|
| diff --git a/src/wasm/ast-decoder.cc b/src/wasm/ast-decoder.cc
|
| index ff6af34a02089e0831878d92374236ab42ac069a..7d63e3b491758419b0c3d5ce1f95ac8e6270912b 100644
|
| --- a/src/wasm/ast-decoder.cc
|
| +++ b/src/wasm/ast-decoder.cc
|
| @@ -1335,6 +1335,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) {
|
| @@ -1346,6 +1358,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) {
|
|
|