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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | src/compiler/simd-scalar-lowering.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_COMPILER_SIMD_SCALAR_LOWERING_H_ 5 #ifndef V8_COMPILER_SIMD_SCALAR_LOWERING_H_
6 #define V8_COMPILER_SIMD_SCALAR_LOWERING_H_ 6 #define V8_COMPILER_SIMD_SCALAR_LOWERING_H_
7 7
8 #include "src/compiler/common-operator.h" 8 #include "src/compiler/common-operator.h"
9 #include "src/compiler/graph.h" 9 #include "src/compiler/graph.h"
10 #include "src/compiler/js-graph.h" 10 #include "src/compiler/js-graph.h"
(...skipping 18 matching lines...) Expand all
29 enum class State : uint8_t { kUnvisited, kOnStack, kVisited }; 29 enum class State : uint8_t { kUnvisited, kOnStack, kVisited };
30 30
31 enum class SimdType : uint8_t { 31 enum class SimdType : uint8_t {
32 kFloat32x4, 32 kFloat32x4,
33 kInt32x4, 33 kInt32x4,
34 kInt16x8, 34 kInt16x8,
35 kSimd1x4, 35 kSimd1x4,
36 kSimd1x8 36 kSimd1x8
37 }; 37 };
38 38
39 #if defined(V8_TARGET_BIG_ENDIAN)
40 static constexpr int kLaneOffsets[16] = {15, 14, 13, 12, 11, 10, 9, 8,
41 7, 6, 5, 4, 3, 2, 1, 0};
42 #else
43 static constexpr int kLaneOffsets[16] = {0, 1, 2, 3, 4, 5, 6, 7,
44 8, 9, 10, 11, 12, 13, 14, 15};
45 #endif
39 struct Replacement { 46 struct Replacement {
40 Node** node = nullptr; 47 Node** node = nullptr;
41 SimdType type; // represents output type 48 SimdType type; // represents output type
42 int num_replacements = 0; 49 int num_replacements = 0;
43 }; 50 };
44 51
45 struct NodeState { 52 struct NodeState {
46 Node* node; 53 Node* node;
47 int input_index; 54 int input_index;
48 }; 55 };
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 Signature<MachineRepresentation>* signature_; 102 Signature<MachineRepresentation>* signature_;
96 Node* placeholder_; 103 Node* placeholder_;
97 int parameter_count_after_lowering_; 104 int parameter_count_after_lowering_;
98 }; 105 };
99 106
100 } // namespace compiler 107 } // namespace compiler
101 } // namespace internal 108 } // namespace internal
102 } // namespace v8 109 } // namespace v8
103 110
104 #endif // V8_COMPILER_SIMD_SCALAR_LOWERING_H_ 111 #endif // V8_COMPILER_SIMD_SCALAR_LOWERING_H_
OLDNEW
« 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