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

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, 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 | « no previous file | src/compiler/simd-scalar-lowering.cc » ('j') | no next file with comments »
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 3d5e3fc88135d2cd5f0ca0dc1831e9f699d01018..383b702f469a946eb2c3942eb64be42165cca11f 100644
--- a/src/compiler/simd-scalar-lowering.h
+++ b/src/compiler/simd-scalar-lowering.h
@@ -36,6 +36,13 @@ class SimdScalarLowering {
kSimd1x8
};
+#if defined(V8_TARGET_BIG_ENDIAN)
+ static constexpr int kLaneOffsets[16] = {15, 14, 13, 12, 11, 10, 9, 8,
+ 7, 6, 5, 4, 3, 2, 1, 0};
+#else
+ static constexpr int kLaneOffsets[16] = {0, 1, 2, 3, 4, 5, 6, 7,
+ 8, 9, 10, 11, 12, 13, 14, 15};
+#endif
struct Replacement {
Node** node = nullptr;
SimdType type; // represents output type
« no previous file with comments | « no previous file | src/compiler/simd-scalar-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698