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

Unified Diff: src/compiler/simd-scalar-lowering.h

Issue 2838943002: [wasm] Implement 128-bit endian swap for simd type (Closed)
Patch Set: address comments Created 3 years, 8 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 | « no previous file | src/compiler/simd-scalar-lowering.cc » ('j') | src/compiler/simd-scalar-lowering.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/simd-scalar-lowering.h
diff --git a/src/compiler/simd-scalar-lowering.h b/src/compiler/simd-scalar-lowering.h
index 70186fdf11d4283868f8215bbab12e4908428493..9c6766c6ba77afe98bf46e365eb793be43cdec59 100644
--- a/src/compiler/simd-scalar-lowering.h
+++ b/src/compiler/simd-scalar-lowering.h
@@ -33,6 +33,11 @@ class SimdScalarLowering {
static const int kMaxLanes = 4;
static const int kLaneWidth = 16 / kMaxLanes;
+#if defined(V8_TARGET_BIG_ENDIAN)
+ static constexpr int kLaneOffsets[4] = {3, 2, 1, 0};
+#else
+ static constexpr int kLaneOffsets[4] = {0, 1, 2, 3};
+#endif
struct Replacement {
Node* node[kMaxLanes];
SimdType type; // represents what input type is expected
« no previous file with comments | « no previous file | src/compiler/simd-scalar-lowering.cc » ('j') | src/compiler/simd-scalar-lowering.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698