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.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/wast-parser.cc b/src/wast-parser.cc
index 1ff68e48..e07289cb 100644
--- a/src/wast-parser.cc
+++ b/src/wast-parser.cc
@@ -2142,7 +2142,7 @@ Result WastParser::ParsePlainInstr(std::unique_ptr<Expr>* out_expr) {
case TokenType::SimdShuffleOp: {
Token token = Consume();
ErrorUnlessOpcodeEnabled(token);
- uint8_t values[16];
+ v128 values;
for (int lane = 0; lane < 16; ++lane) {
Location loc = GetLocation();
@@ -2175,12 +2175,11 @@ Result WastParser::ParsePlainInstr(std::unique_ptr<Expr>* out_expr) {
return Result::Error;
}
- values[lane] = static_cast<uint8_t>(value);
+ values.set_u8(lane, static_cast<uint8_t>(value));
}
- v128 value = Bitcast<v128>(values);
out_expr->reset(
- new SimdShuffleOpExpr(token.opcode(), value, loc));
+ new SimdShuffleOpExpr(token.opcode(), values, loc));
break;
}