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 cd9b7bb1..4d94b245 100644
--- a/src/wast-parser.cc
+++ b/src/wast-parser.cc
@@ -174,6 +174,7 @@ bool IsPlainInstr(TokenType token_type) {
case TokenType::AtomicWait:
case TokenType::Ternary:
case TokenType::SimdLaneOp:
+ case TokenType::SimdShuffleOp:
return true;
default:
return false;
@@ -1505,6 +1506,15 @@ Result WastParser::ParsePlainInstr(std::unique_ptr<Expr>* out_expr) {
break;
}
+ case TokenType::SimdShuffleOp: {
+ Token token = Consume();
+ ErrorUnlessOpcodeEnabled(token);
+ Const const_;
+ CHECK_RESULT((ParseSimdConst(&const_, Type::I32, sizeof(v128))));
+ out_expr->reset(new SimdShuffleOpExpr(token.opcode(), const_.v128_bits, loc));
+ break;
+ }
+
default:
assert(
!"ParsePlainInstr should only be called when IsPlainInstr() is true");