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

Side by Side Diff: src/arm64/decoder-arm64.h

Issue 2896303003: Reland of Reland of "ARM64: Add NEON support" (Closed)
Patch Set: 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 | « src/arm64/constants-arm64.h ('k') | src/arm64/decoder-arm64-inl.h » ('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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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_ARM64_DECODER_ARM64_H_ 5 #ifndef V8_ARM64_DECODER_ARM64_H_
6 #define V8_ARM64_DECODER_ARM64_H_ 6 #define V8_ARM64_DECODER_ARM64_H_
7 7
8 #include <list> 8 #include <list>
9 9
10 #include "src/arm64/instructions-arm64.h" 10 #include "src/arm64/instructions-arm64.h"
11 #include "src/globals.h" 11 #include "src/globals.h"
12 12
13 namespace v8 { 13 namespace v8 {
14 namespace internal { 14 namespace internal {
15 15
16 16
17 // List macro containing all visitors needed by the decoder class. 17 // List macro containing all visitors needed by the decoder class.
18 18
19 #define VISITOR_LIST(V) \ 19 #define VISITOR_LIST(V) \
20 V(PCRelAddressing) \ 20 V(PCRelAddressing) \
21 V(AddSubImmediate) \ 21 V(AddSubImmediate) \
22 V(LogicalImmediate) \ 22 V(LogicalImmediate) \
23 V(MoveWideImmediate) \ 23 V(MoveWideImmediate) \
24 V(Bitfield) \ 24 V(Bitfield) \
25 V(Extract) \ 25 V(Extract) \
26 V(UnconditionalBranch) \ 26 V(UnconditionalBranch) \
27 V(UnconditionalBranchToRegister) \ 27 V(UnconditionalBranchToRegister) \
28 V(CompareBranch) \ 28 V(CompareBranch) \
29 V(TestBranch) \ 29 V(TestBranch) \
30 V(ConditionalBranch) \ 30 V(ConditionalBranch) \
31 V(System) \ 31 V(System) \
32 V(Exception) \ 32 V(Exception) \
33 V(LoadStorePairPostIndex) \ 33 V(LoadStorePairPostIndex) \
34 V(LoadStorePairOffset) \ 34 V(LoadStorePairOffset) \
35 V(LoadStorePairPreIndex) \ 35 V(LoadStorePairPreIndex) \
36 V(LoadLiteral) \ 36 V(LoadLiteral) \
37 V(LoadStoreUnscaledOffset) \ 37 V(LoadStoreUnscaledOffset) \
38 V(LoadStorePostIndex) \ 38 V(LoadStorePostIndex) \
39 V(LoadStorePreIndex) \ 39 V(LoadStorePreIndex) \
40 V(LoadStoreRegisterOffset) \ 40 V(LoadStoreRegisterOffset) \
41 V(LoadStoreUnsignedOffset) \ 41 V(LoadStoreUnsignedOffset) \
42 V(LoadStoreAcquireRelease) \ 42 V(LoadStoreAcquireRelease) \
43 V(LogicalShifted) \ 43 V(LogicalShifted) \
44 V(AddSubShifted) \ 44 V(AddSubShifted) \
45 V(AddSubExtended) \ 45 V(AddSubExtended) \
46 V(AddSubWithCarry) \ 46 V(AddSubWithCarry) \
47 V(ConditionalCompareRegister) \ 47 V(ConditionalCompareRegister) \
48 V(ConditionalCompareImmediate) \ 48 V(ConditionalCompareImmediate) \
49 V(ConditionalSelect) \ 49 V(ConditionalSelect) \
50 V(DataProcessing1Source) \ 50 V(DataProcessing1Source) \
51 V(DataProcessing2Source) \ 51 V(DataProcessing2Source) \
52 V(DataProcessing3Source) \ 52 V(DataProcessing3Source) \
53 V(FPCompare) \ 53 V(FPCompare) \
54 V(FPConditionalCompare) \ 54 V(FPConditionalCompare) \
55 V(FPConditionalSelect) \ 55 V(FPConditionalSelect) \
56 V(FPImmediate) \ 56 V(FPImmediate) \
57 V(FPDataProcessing1Source) \ 57 V(FPDataProcessing1Source) \
58 V(FPDataProcessing2Source) \ 58 V(FPDataProcessing2Source) \
59 V(FPDataProcessing3Source) \ 59 V(FPDataProcessing3Source) \
60 V(FPIntegerConvert) \ 60 V(FPIntegerConvert) \
61 V(FPFixedPointConvert) \ 61 V(FPFixedPointConvert) \
62 V(Unallocated) \ 62 V(NEON2RegMisc) \
63 V(NEON3Different) \
64 V(NEON3Same) \
65 V(NEONAcrossLanes) \
66 V(NEONByIndexedElement) \
67 V(NEONCopy) \
68 V(NEONExtract) \
69 V(NEONLoadStoreMultiStruct) \
70 V(NEONLoadStoreMultiStructPostIndex) \
71 V(NEONLoadStoreSingleStruct) \
72 V(NEONLoadStoreSingleStructPostIndex) \
73 V(NEONModifiedImmediate) \
74 V(NEONScalar2RegMisc) \
75 V(NEONScalar3Diff) \
76 V(NEONScalar3Same) \
77 V(NEONScalarByIndexedElement) \
78 V(NEONScalarCopy) \
79 V(NEONScalarPairwise) \
80 V(NEONScalarShiftImmediate) \
81 V(NEONShiftImmediate) \
82 V(NEONTable) \
83 V(NEONPerm) \
84 V(Unallocated) \
63 V(Unimplemented) 85 V(Unimplemented)
64 86
65 // The Visitor interface. Disassembler and simulator (and other tools) 87 // The Visitor interface. Disassembler and simulator (and other tools)
66 // must provide implementations for all of these functions. 88 // must provide implementations for all of these functions.
67 class DecoderVisitor { 89 class DecoderVisitor {
68 public: 90 public:
69 virtual ~DecoderVisitor() {} 91 virtual ~DecoderVisitor() {}
70 92
71 #define DECLARE(A) virtual void Visit##A(Instruction* instr) = 0; 93 #define DECLARE(A) virtual void Visit##A(Instruction* instr) = 0;
72 VISITOR_LIST(DECLARE) 94 VISITOR_LIST(DECLARE)
(...skipping 29 matching lines...) Expand all
102 void PrependVisitor(DecoderVisitor* visitor); 124 void PrependVisitor(DecoderVisitor* visitor);
103 void InsertVisitorBefore(DecoderVisitor* new_visitor, 125 void InsertVisitorBefore(DecoderVisitor* new_visitor,
104 DecoderVisitor* registered_visitor); 126 DecoderVisitor* registered_visitor);
105 void InsertVisitorAfter(DecoderVisitor* new_visitor, 127 void InsertVisitorAfter(DecoderVisitor* new_visitor,
106 DecoderVisitor* registered_visitor); 128 DecoderVisitor* registered_visitor);
107 129
108 // Remove a previously registered visitor class from the list of visitors 130 // Remove a previously registered visitor class from the list of visitors
109 // stored by the decoder. 131 // stored by the decoder.
110 void RemoveVisitor(DecoderVisitor* visitor); 132 void RemoveVisitor(DecoderVisitor* visitor);
111 133
134 void VisitNEONShiftImmediate(const Instruction* instr);
135
112 #define DECLARE(A) void Visit##A(Instruction* instr); 136 #define DECLARE(A) void Visit##A(Instruction* instr);
113 VISITOR_LIST(DECLARE) 137 VISITOR_LIST(DECLARE)
114 #undef DECLARE 138 #undef DECLARE
115 139
116 private: 140 private:
117 // Visitors are registered in a list. 141 // Visitors are registered in a list.
118 std::list<DecoderVisitor*> visitors_; 142 std::list<DecoderVisitor*> visitors_;
119 }; 143 };
120 144
121 145
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 void DecodeDataProcessing(Instruction* instr); 190 void DecodeDataProcessing(Instruction* instr);
167 191
168 // Decode the floating point parts of the instruction tree, and call the 192 // Decode the floating point parts of the instruction tree, and call the
169 // corresponding visitors. 193 // corresponding visitors.
170 // On entry, instruction bits 27:24 = {0xE, 0xF}. 194 // On entry, instruction bits 27:24 = {0xE, 0xF}.
171 void DecodeFP(Instruction* instr); 195 void DecodeFP(Instruction* instr);
172 196
173 // Decode the Advanced SIMD (NEON) load/store part of the instruction tree, 197 // Decode the Advanced SIMD (NEON) load/store part of the instruction tree,
174 // and call the corresponding visitors. 198 // and call the corresponding visitors.
175 // On entry, instruction bits 29:25 = 0x6. 199 // On entry, instruction bits 29:25 = 0x6.
176 void DecodeAdvSIMDLoadStore(Instruction* instr); 200 void DecodeNEONLoadStore(Instruction* instr);
177 201
178 // Decode the Advanced SIMD (NEON) data processing part of the instruction 202 // Decode the Advanced SIMD (NEON) data processing part of the instruction
179 // tree, and call the corresponding visitors. 203 // tree, and call the corresponding visitors.
180 // On entry, instruction bits 27:25 = 0x7. 204 // On entry, instruction bits 27:25 = 0x7.
181 void DecodeAdvSIMDDataProcessing(Instruction* instr); 205 void DecodeNEONVectorDataProcessing(Instruction* instr);
206
207 // Decode the Advanced SIMD (NEON) scalar data processing part of the
208 // instruction tree, and call the corresponding visitors.
209 // On entry, instruction bits 28:25 = 0xF.
210 void DecodeNEONScalarDataProcessing(Instruction* instr);
182 }; 211 };
183 212
184 213
185 } // namespace internal 214 } // namespace internal
186 } // namespace v8 215 } // namespace v8
187 216
188 #endif // V8_ARM64_DECODER_ARM64_H_ 217 #endif // V8_ARM64_DECODER_ARM64_H_
OLDNEW
« no previous file with comments | « src/arm64/constants-arm64.h ('k') | src/arm64/decoder-arm64-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698