Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(159)

Unified Diff: src/wasm/function-body-decoder-impl.h

Issue 2923103003: [WASM] Simplify SIMD shuffle opcodes. (Closed)
Patch Set: Mircea's review comments. Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/wasm/function-body-decoder.cc ('k') | src/wasm/wasm-opcodes.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/wasm/function-body-decoder-impl.h
diff --git a/src/wasm/function-body-decoder-impl.h b/src/wasm/function-body-decoder-impl.h
index acda17cfd7b16e2231c2795b74f1f37104b0bc81..ec295cb0e0c7c38216548fef44c00500d58587f2 100644
--- a/src/wasm/function-body-decoder-impl.h
+++ b/src/wasm/function-body-decoder-impl.h
@@ -313,15 +313,13 @@ struct SimdShiftOperand {
}
};
-// Operand for SIMD shuffle operations.
+// Operand for SIMD S8x16 shuffle operations.
template <bool checked>
-struct SimdShuffleOperand {
- uint8_t shuffle[16];
- unsigned lanes;
+struct Simd8x16ShuffleOperand {
+ uint8_t shuffle[kSimd128Size];
- inline SimdShuffleOperand(Decoder* decoder, const byte* pc, unsigned lanes_) {
- lanes = lanes_;
- for (unsigned i = 0; i < lanes; i++) {
+ inline Simd8x16ShuffleOperand(Decoder* decoder, const byte* pc) {
+ for (uint32_t i = 0; i < kSimd128Size; ++i) {
shuffle[i] = decoder->read_u8<checked>(pc + 2 + i, "shuffle");
}
}
« no previous file with comments | « src/wasm/function-body-decoder.cc ('k') | src/wasm/wasm-opcodes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698