summaryrefslogtreecommitdiff
path: root/deps/v8/src/wasm/function-body-decoder-impl.h
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/wasm/function-body-decoder-impl.h')
-rw-r--r--deps/v8/src/wasm/function-body-decoder-impl.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/deps/v8/src/wasm/function-body-decoder-impl.h b/deps/v8/src/wasm/function-body-decoder-impl.h
index 27e95b2138..0df04e7ee0 100644
--- a/deps/v8/src/wasm/function-body-decoder-impl.h
+++ b/deps/v8/src/wasm/function-body-decoder-impl.h
@@ -322,6 +322,20 @@ struct SimdShiftOperand {
}
};
+// Operand for SIMD shuffle operations.
+template <bool checked>
+struct SimdShuffleOperand {
+ uint8_t shuffle[16];
+ unsigned lanes;
+
+ inline SimdShuffleOperand(Decoder* decoder, const byte* pc, unsigned lanes_) {
+ lanes = lanes_;
+ for (unsigned i = 0; i < lanes; i++) {
+ shuffle[i] = decoder->read_u8<checked>(pc + 2 + i, "shuffle");
+ }
+ }
+};
+
#undef CHECKED_COND
} // namespace wasm