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

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

Issue 2847663005: [WASM SIMD] Replace primitive shuffles with general Shuffle. (Closed)
Patch Set: Rebase. Created 3 years, 7 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 7249cc8a0df96d4cebad31caed857c072548b656..0df04e7ee07ca2f663c280f4e45846271de29922 100644
--- a/src/wasm/function-body-decoder-impl.h
+++ b/src/wasm/function-body-decoder-impl.h
@@ -322,15 +322,17 @@ struct SimdShiftOperand {
}
};
-// Operand for SIMD concatenation operations.
+// Operand for SIMD shuffle operations.
template <bool checked>
-struct SimdConcatOperand {
- uint8_t bytes;
- unsigned length;
-
- inline SimdConcatOperand(Decoder* decoder, const byte* pc) {
- bytes = decoder->read_u8<checked>(pc + 2, "bytes");
- length = 1;
+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");
+ }
}
};
« 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