summaryrefslogtreecommitdiff
path: root/src/wast-parser.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/wast-parser.cc')
-rw-r--r--src/wast-parser.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/wast-parser.cc b/src/wast-parser.cc
index d62a277b..cd9b7bb1 100644
--- a/src/wast-parser.cc
+++ b/src/wast-parser.cc
@@ -173,6 +173,7 @@ bool IsPlainInstr(TokenType token_type) {
case TokenType::AtomicWake:
case TokenType::AtomicWait:
case TokenType::Ternary:
+ case TokenType::SimdLaneOp:
return true;
default:
return false;
@@ -1495,6 +1496,15 @@ Result WastParser::ParsePlainInstr(std::unique_ptr<Expr>* out_expr) {
break;
}
+ case TokenType::SimdLaneOp: {
+ Token token = Consume();
+ ErrorUnlessOpcodeEnabled(token);
+ uint64_t lane_idx;
+ CHECK_RESULT(ParseNat(&lane_idx));
+ out_expr->reset(new SimdLaneOpExpr(token.opcode(), lane_idx, loc));
+ break;
+ }
+
default:
assert(
!"ParsePlainInstr should only be called when IsPlainInstr() is true");