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

Side by Side Diff: src/trusted/validator_arm/gen/arm32_decode_named_decoder.h

Issue 9960043: Finish separation of testing from sel_ldr validation. Also, automate (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client/
Patch Set: Created 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1
2
3 /*
4 * Copyright 2012 The Native Client Authors. All rights reserved.
5 * Use of this source code is governed by a BSD-style license that can
6 * be found in the LICENSE file.
7 */
8
9 // DO NOT EDIT: GENERATED CODE
10
11
12 #ifndef NACL_TRUSTED_BUT_NOT_TCB
13 #error This file is not meant for use in the TCB
14 #endif
15
16
17
18 #ifndef NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_ARM_GEN_ARM32_DECODE_NAMED_DECODER_H _
19 #define NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_ARM_GEN_ARM32_DECODE_NAMED_DECODER_H _
20
21 #include "native_client/src/trusted/validator_arm/decode.h"
22 #include "native_client/src/trusted/validator_arm/gen/arm32_decode_named_classes .h"
23 #include "native_client/src/trusted/validator_arm/named_class_decoder.h"
24
25 namespace nacl_arm_test {
26
27 // Defines a stateless (named)decoder class selector for instructions
28 class NamedArm32DecoderState : nacl_arm_dec::DecoderState {
29 public:
30 explicit NamedArm32DecoderState();
31 virtual ~NamedArm32DecoderState();
32
33 // Parses the given instruction, returning the named class
34 // decoder to use.
35 const NamedClassDecoder& decode_named(
36 const nacl_arm_dec::Instruction) const;
37
38 // Parses the given instruction, returning the class decoder
39 // to use.
40 virtual const nacl_arm_dec::ClassDecoder& decode(
41 const nacl_arm_dec::Instruction) const;
42
43 // Fields containing the named class decoders that can
44 // be returned.
45
46 // The following fields define the set of class decoders
47 // that can be returned by the API function "decode". They
48 // are created once as instance fields, and then returned
49 // by the table methods above. This speeds up the code since
50 // the class decoders need to only be bulit once (and reused
51 // for each call to "decode").
52
53 const NamedBinary3RegisterShiftedTest Binary3RegisterShiftedTest_instance_;
54
55 const NamedBinary4RegisterShiftedOp Binary4RegisterShiftedOp_instance_;
56
57 const NamedBranch Branch_instance_;
58
59 const NamedBreakpoint Breakpoint_instance_;
60
61 const NamedBxBlx BxBlx_instance_;
62
63 const NamedCoprocessorOp CoprocessorOp_instance_;
64
65 const NamedDataProc DataProc_instance_;
66
67 const NamedDeprecated Deprecated_instance_;
68
69 const NamedEffectiveNoOp EffectiveNoOp_instance_;
70
71 const NamedForbidden Forbidden_instance_;
72
73 const NamedImmediateBic ImmediateBic_instance_;
74
75 const NamedLoadCoprocessor LoadCoprocessor_instance_;
76
77 const NamedLoadDoubleExclusive LoadDoubleExclusive_instance_;
78
79 const NamedLoadDoubleI LoadDoubleI_instance_;
80
81 const NamedLoadDoubleR LoadDoubleR_instance_;
82
83 const NamedLoadExclusive LoadExclusive_instance_;
84
85 const NamedLoadImmediate LoadImmediate_instance_;
86
87 const NamedLoadMultiple LoadMultiple_instance_;
88
89 const NamedLoadRegister LoadRegister_instance_;
90
91 const NamedLongMultiply LongMultiply_instance_;
92
93 const NamedMoveDoubleFromCoprocessor MoveDoubleFromCoprocessor_instance_;
94
95 const NamedMoveFromCoprocessor MoveFromCoprocessor_instance_;
96
97 const NamedMoveToStatusRegister MoveToStatusRegister_instance_;
98
99 const NamedMultiply Multiply_instance_;
100
101 const NamedPackSatRev PackSatRev_instance_;
102
103 const NamedRoadblock Roadblock_instance_;
104
105 const NamedSatAddSub SatAddSub_instance_;
106
107 const NamedStoreCoprocessor StoreCoprocessor_instance_;
108
109 const NamedStoreExclusive StoreExclusive_instance_;
110
111 const NamedStoreImmediate StoreImmediate_instance_;
112
113 const NamedStoreRegister StoreRegister_instance_;
114
115 const NamedTest Test_instance_;
116
117 const NamedTestImmediate TestImmediate_instance_;
118
119 const NamedUnary3RegisterShiftedOp Unary3RegisterShiftedOp_instance_;
120
121 const NamedUndefined Undefined_instance_;
122
123 const NamedUnpredictable Unpredictable_instance_;
124
125 const NamedVectorLoad VectorLoad_instance_;
126
127 const NamedVectorStore VectorStore_instance_;
128
129 const NamedAdd_Rule_7_A1_P26Binary4RegisterShiftedOp Add_Rule_7_A1_P26Binary4R egisterShiftedOp_instance_;
130
131 const NamedRsb_Rule_144_A1_P288Binary4RegisterShiftedOp Rsb_Rule_144_A1_P288Bi nary4RegisterShiftedOp_instance_;
132
133 private:
134
135 // The following list of methods correspond to each decoder table,
136 // and implements the pattern matching of the corresponding bit
137 // patterns. After matching the corresponding bit patterns, they
138 // either call other methods in this list (corresponding to another
139 // decoder table), or they return the instance field that implements
140 // the class decoder that should be used to decode the particular
141 // instruction.
142
143 inline const NamedClassDecoder& decode_ARMv7(
144 const nacl_arm_dec::Instruction insn) const;
145
146 inline const NamedClassDecoder& decode_branch_block_xfer(
147 const nacl_arm_dec::Instruction insn) const;
148
149 inline const NamedClassDecoder& decode_dp_immed(
150 const nacl_arm_dec::Instruction insn) const;
151
152 inline const NamedClassDecoder& decode_dp_misc(
153 const nacl_arm_dec::Instruction insn) const;
154
155 inline const NamedClassDecoder& decode_dp_reg(
156 const nacl_arm_dec::Instruction insn) const;
157
158 inline const NamedClassDecoder& decode_dp_reg_shifted(
159 const nacl_arm_dec::Instruction insn) const;
160
161 inline const NamedClassDecoder& decode_extra_load_store(
162 const nacl_arm_dec::Instruction insn) const;
163
164 inline const NamedClassDecoder& decode_half_mult(
165 const nacl_arm_dec::Instruction insn) const;
166
167 inline const NamedClassDecoder& decode_load_store_word_byte(
168 const nacl_arm_dec::Instruction insn) const;
169
170 inline const NamedClassDecoder& decode_media(
171 const nacl_arm_dec::Instruction insn) const;
172
173 inline const NamedClassDecoder& decode_misc(
174 const nacl_arm_dec::Instruction insn) const;
175
176 inline const NamedClassDecoder& decode_misc_hints_simd(
177 const nacl_arm_dec::Instruction insn) const;
178
179 inline const NamedClassDecoder& decode_msr_and_hints(
180 const nacl_arm_dec::Instruction insn) const;
181
182 inline const NamedClassDecoder& decode_mult(
183 const nacl_arm_dec::Instruction insn) const;
184
185 inline const NamedClassDecoder& decode_pack_sat_rev(
186 const nacl_arm_dec::Instruction insn) const;
187
188 inline const NamedClassDecoder& decode_parallel_add_sub(
189 const nacl_arm_dec::Instruction insn) const;
190
191 inline const NamedClassDecoder& decode_sat_add_sub(
192 const nacl_arm_dec::Instruction insn) const;
193
194 inline const NamedClassDecoder& decode_signed_mult(
195 const nacl_arm_dec::Instruction insn) const;
196
197 inline const NamedClassDecoder& decode_simd_dp(
198 const nacl_arm_dec::Instruction insn) const;
199
200 inline const NamedClassDecoder& decode_simd_dp_1imm(
201 const nacl_arm_dec::Instruction insn) const;
202
203 inline const NamedClassDecoder& decode_simd_dp_2misc(
204 const nacl_arm_dec::Instruction insn) const;
205
206 inline const NamedClassDecoder& decode_simd_dp_2scalar(
207 const nacl_arm_dec::Instruction insn) const;
208
209 inline const NamedClassDecoder& decode_simd_dp_2shift(
210 const nacl_arm_dec::Instruction insn) const;
211
212 inline const NamedClassDecoder& decode_simd_dp_3diff(
213 const nacl_arm_dec::Instruction insn) const;
214
215 inline const NamedClassDecoder& decode_simd_dp_3same(
216 const nacl_arm_dec::Instruction insn) const;
217
218 inline const NamedClassDecoder& decode_simd_load_store(
219 const nacl_arm_dec::Instruction insn) const;
220
221 inline const NamedClassDecoder& decode_simd_load_store_l0(
222 const nacl_arm_dec::Instruction insn) const;
223
224 inline const NamedClassDecoder& decode_simd_load_store_l1(
225 const nacl_arm_dec::Instruction insn) const;
226
227 inline const NamedClassDecoder& decode_super_cop(
228 const nacl_arm_dec::Instruction insn) const;
229
230 inline const NamedClassDecoder& decode_sync(
231 const nacl_arm_dec::Instruction insn) const;
232
233 inline const NamedClassDecoder& decode_unconditional(
234 const nacl_arm_dec::Instruction insn) const;
235
236 };
237
238 } // namespace nacl_arm_test
239 #endif // NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_ARM_GEN_ARM32_DECODE_NAMED_DECODE R_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698