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

Side by Side Diff: src/trusted/validator_arm/gen/arm32_decode_media_instructions_tests.cc

Issue 11569019: Fix uses in ARM table media_instructions. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client/
Patch Set: Created 8 years 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
1 /* 1 /*
2 * Copyright 2012 The Native Client Authors. All rights reserved. 2 * Copyright 2012 The Native Client Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can 3 * Use of this source code is governed by a BSD-style license that can
4 * be found in the LICENSE file. 4 * be found in the LICENSE file.
5 */ 5 */
6 6
7 // DO NOT EDIT: GENERATED CODE 7 // DO NOT EDIT: GENERATED CODE
8 8
9 #ifndef NACL_TRUSTED_BUT_NOT_TCB 9 #ifndef NACL_TRUSTED_BUT_NOT_TCB
10 #error This file is not meant for use in the TCB 10 #error This file is not meant for use in the TCB
(...skipping 17 matching lines...) Expand all
28 // add row pattern constraints and decoder restrictions to each tester. 28 // add row pattern constraints and decoder restrictions to each tester.
29 // This is done so that it can be used to make sure that the 29 // This is done so that it can be used to make sure that the
30 // corresponding pattern is not tested for cases that would be excluded 30 // corresponding pattern is not tested for cases that would be excluded
31 // due to row checks, or restrictions specified by the row restrictions. 31 // due to row checks, or restrictions specified by the row restrictions.
32 32
33 33
34 // Neutral case: 34 // Neutral case:
35 // inst(24:20)=11000 & inst(7:5)=000 & inst(15:12)=~1111 35 // inst(24:20)=11000 & inst(7:5)=000 & inst(15:12)=~1111
36 // = {baseline: 'Binary4RegisterDualOp', 36 // = {baseline: 'Binary4RegisterDualOp',
37 // constraints: , 37 // constraints: ,
38 // safety: ["'RegsNotPc'"]} 38 // defs: {inst(19:16)},
39 // safety: ['15 == inst(15:12) => DECODER_ERROR', '15 == inst(19:16) || 15 == inst(3:0) || 15 == inst(11:8) => UNPREDICTABLE']}
39 // 40 //
40 // Representaive case: 41 // Representaive case:
41 // op1(24:20)=11000 & op2(7:5)=000 & Rd(15:12)=~1111 42 // op1(24:20)=11000 & op2(7:5)=000 & Rd(15:12)=~1111
42 // = {baseline: Binary4RegisterDualOp, 43 // = {Pc: 15,
44 // Ra: Ra(15:12),
45 // Rd: Rd(19:16),
46 // Rm: Rm(11:8),
47 // Rn: Rn(3:0),
48 // baseline: Binary4RegisterDualOp,
43 // constraints: , 49 // constraints: ,
44 // safety: ['RegsNotPc']} 50 // defs: {Rd},
51 // fields: [Rd(19:16), Ra(15:12), Rm(11:8), Rn(3:0)],
52 // safety: [Ra == Pc => DECODER_ERROR, Pc in {Rd,Rn,Rm} => UNPREDICTABLE]}
45 class Binary4RegisterDualOpTesterCase0 53 class Binary4RegisterDualOpTesterCase0
46 : public Binary4RegisterDualOpTesterRegsNotPc { 54 : public Binary4RegisterDualOpTester {
47 public: 55 public:
48 Binary4RegisterDualOpTesterCase0(const NamedClassDecoder& decoder) 56 Binary4RegisterDualOpTesterCase0(const NamedClassDecoder& decoder)
49 : Binary4RegisterDualOpTesterRegsNotPc(decoder) {} 57 : Binary4RegisterDualOpTester(decoder) {}
50 virtual bool PassesParsePreconditions( 58 virtual bool PassesParsePreconditions(
51 nacl_arm_dec::Instruction inst, 59 nacl_arm_dec::Instruction inst,
52 const NamedClassDecoder& decoder); 60 const NamedClassDecoder& decoder);
61 virtual bool ApplySanityChecks(nacl_arm_dec::Instruction inst,
62 const NamedClassDecoder& decoder);
53 }; 63 };
54 64
55 bool Binary4RegisterDualOpTesterCase0 65 bool Binary4RegisterDualOpTesterCase0
56 ::PassesParsePreconditions( 66 ::PassesParsePreconditions(
57 nacl_arm_dec::Instruction inst, 67 nacl_arm_dec::Instruction inst,
58 const NamedClassDecoder& decoder) { 68 const NamedClassDecoder& decoder) {
59 69
60 // Check that row patterns apply to pattern being checked.' 70 // Check that row patterns apply to pattern being checked.'
61 if ((inst.Bits() & 0x01F00000) != 0x01800000 /* op1(24:20)=~11000 */) return f alse; 71 if ((inst.Bits() & 0x01F00000) != 0x01800000 /* op1(24:20)=~11000 */) return f alse;
62 if ((inst.Bits() & 0x000000E0) != 0x00000000 /* op2(7:5)=~000 */) return false ; 72 if ((inst.Bits() & 0x000000E0) != 0x00000000 /* op2(7:5)=~000 */) return false ;
63 if ((inst.Bits() & 0x0000F000) == 0x0000F000 /* Rd(15:12)=1111 */) return fals e; 73 if ((inst.Bits() & 0x0000F000) == 0x0000F000 /* Rd(15:12)=1111 */) return fals e;
64 74
65 // Check other preconditions defined for the base decoder. 75 // Check other preconditions defined for the base decoder.
66 return Binary4RegisterDualOpTesterRegsNotPc:: 76 return Binary4RegisterDualOpTester::
67 PassesParsePreconditions(inst, decoder); 77 PassesParsePreconditions(inst, decoder);
68 } 78 }
69 79
80 bool Binary4RegisterDualOpTesterCase0
81 ::ApplySanityChecks(nacl_arm_dec::Instruction inst,
82 const NamedClassDecoder& decoder) {
83 NC_PRECOND(Binary4RegisterDualOpTester::ApplySanityChecks(inst, decoder));
84
85 // safety: Ra == Pc => DECODER_ERROR
86 EXPECT_TRUE(((((inst.Bits() & 0x0000F000) >> 12)) != (15)));
87
88 // safety: Pc in {Rd,Rn,Rm} => UNPREDICTABLE
89 EXPECT_TRUE(!((((15) == (((inst.Bits() & 0x000F0000) >> 16)))) || (((15) == (( inst.Bits() & 0x0000000F)))) || (((15) == (((inst.Bits() & 0x00000F00) >> 8))))) );
90
91 // defs: {Rd};
92 EXPECT_TRUE(decoder.defs(inst).IsSame(RegisterList().Add(Register(((inst.Bits( ) & 0x000F0000) >> 16)))));
93
94 return true;
95 }
96
70 // Neutral case: 97 // Neutral case:
71 // inst(24:20)=11000 & inst(7:5)=000 & inst(15:12)=1111 98 // inst(24:20)=11000 & inst(7:5)=000 & inst(15:12)=1111
72 // = {baseline: 'Binary3RegisterOpAltA', 99 // = {baseline: 'Binary3RegisterOpAltA',
73 // constraints: , 100 // constraints: ,
74 // safety: ["'RegsNotPc'"]} 101 // defs: {inst(19:16)},
102 // safety: ['15 == inst(19:16) || 15 == inst(3:0) || 15 == inst(11:8) => U NPREDICTABLE']}
75 // 103 //
76 // Representaive case: 104 // Representaive case:
77 // op1(24:20)=11000 & op2(7:5)=000 & Rd(15:12)=1111 105 // op1(24:20)=11000 & op2(7:5)=000 & Rd(15:12)=1111
78 // = {baseline: Binary3RegisterOpAltA, 106 // = {Pc: 15,
107 // Rd: Rd(19:16),
108 // Rm: Rm(11:8),
109 // Rn: Rn(3:0),
110 // baseline: Binary3RegisterOpAltA,
79 // constraints: , 111 // constraints: ,
80 // safety: ['RegsNotPc']} 112 // defs: {Rd},
113 // fields: [Rd(19:16), Rm(11:8), Rn(3:0)],
114 // safety: [Pc in {Rd,Rn,Rm} => UNPREDICTABLE]}
81 class Binary3RegisterOpAltATesterCase1 115 class Binary3RegisterOpAltATesterCase1
82 : public Binary3RegisterOpAltATesterRegsNotPc { 116 : public Binary3RegisterOpAltATester {
83 public: 117 public:
84 Binary3RegisterOpAltATesterCase1(const NamedClassDecoder& decoder) 118 Binary3RegisterOpAltATesterCase1(const NamedClassDecoder& decoder)
85 : Binary3RegisterOpAltATesterRegsNotPc(decoder) {} 119 : Binary3RegisterOpAltATester(decoder) {}
86 virtual bool PassesParsePreconditions( 120 virtual bool PassesParsePreconditions(
87 nacl_arm_dec::Instruction inst, 121 nacl_arm_dec::Instruction inst,
88 const NamedClassDecoder& decoder); 122 const NamedClassDecoder& decoder);
123 virtual bool ApplySanityChecks(nacl_arm_dec::Instruction inst,
124 const NamedClassDecoder& decoder);
89 }; 125 };
90 126
91 bool Binary3RegisterOpAltATesterCase1 127 bool Binary3RegisterOpAltATesterCase1
92 ::PassesParsePreconditions( 128 ::PassesParsePreconditions(
93 nacl_arm_dec::Instruction inst, 129 nacl_arm_dec::Instruction inst,
94 const NamedClassDecoder& decoder) { 130 const NamedClassDecoder& decoder) {
95 131
96 // Check that row patterns apply to pattern being checked.' 132 // Check that row patterns apply to pattern being checked.'
97 if ((inst.Bits() & 0x01F00000) != 0x01800000 /* op1(24:20)=~11000 */) return f alse; 133 if ((inst.Bits() & 0x01F00000) != 0x01800000 /* op1(24:20)=~11000 */) return f alse;
98 if ((inst.Bits() & 0x000000E0) != 0x00000000 /* op2(7:5)=~000 */) return false ; 134 if ((inst.Bits() & 0x000000E0) != 0x00000000 /* op2(7:5)=~000 */) return false ;
99 if ((inst.Bits() & 0x0000F000) != 0x0000F000 /* Rd(15:12)=~1111 */) return fal se; 135 if ((inst.Bits() & 0x0000F000) != 0x0000F000 /* Rd(15:12)=~1111 */) return fal se;
100 136
101 // Check other preconditions defined for the base decoder. 137 // Check other preconditions defined for the base decoder.
102 return Binary3RegisterOpAltATesterRegsNotPc:: 138 return Binary3RegisterOpAltATester::
103 PassesParsePreconditions(inst, decoder); 139 PassesParsePreconditions(inst, decoder);
104 } 140 }
105 141
142 bool Binary3RegisterOpAltATesterCase1
143 ::ApplySanityChecks(nacl_arm_dec::Instruction inst,
144 const NamedClassDecoder& decoder) {
145 NC_PRECOND(Binary3RegisterOpAltATester::ApplySanityChecks(inst, decoder));
146
147 // safety: Pc in {Rd,Rn,Rm} => UNPREDICTABLE
148 EXPECT_TRUE(!((((15) == (((inst.Bits() & 0x000F0000) >> 16)))) || (((15) == (( inst.Bits() & 0x0000000F)))) || (((15) == (((inst.Bits() & 0x00000F00) >> 8))))) );
149
150 // defs: {Rd};
151 EXPECT_TRUE(decoder.defs(inst).IsSame(RegisterList().Add(Register(((inst.Bits( ) & 0x000F0000) >> 16)))));
152
153 return true;
154 }
155
106 // Neutral case: 156 // Neutral case:
107 // inst(24:20)=11111 & inst(7:5)=111 157 // inst(24:20)=11111 & inst(7:5)=111
108 // = {baseline: 'PermanentlyUndefined', 158 // = {baseline: 'PermanentlyUndefined',
109 // constraints: } 159 // constraints: }
110 // 160 //
111 // Representaive case: 161 // Representaive case:
112 // op1(24:20)=11111 & op2(7:5)=111 162 // op1(24:20)=11111 & op2(7:5)=111
113 // = {baseline: PermanentlyUndefined, 163 // = {baseline: PermanentlyUndefined,
114 // constraints: } 164 // constraints: }
115 class PermanentlyUndefinedTesterCase2 165 class PermanentlyUndefinedTesterCase2
(...skipping 17 matching lines...) Expand all
133 183
134 // Check other preconditions defined for the base decoder. 184 // Check other preconditions defined for the base decoder.
135 return PermanentlyUndefinedTester:: 185 return PermanentlyUndefinedTester::
136 PassesParsePreconditions(inst, decoder); 186 PassesParsePreconditions(inst, decoder);
137 } 187 }
138 188
139 // Neutral case: 189 // Neutral case:
140 // inst(24:20)=1101x & inst(7:5)=x10 190 // inst(24:20)=1101x & inst(7:5)=x10
141 // = {baseline: 'Binary2RegisterBitRangeNotRnIsPcBitfieldExtract', 191 // = {baseline: 'Binary2RegisterBitRangeNotRnIsPcBitfieldExtract',
142 // constraints: , 192 // constraints: ,
143 // safety: ["'RegsNotPc'"]} 193 // defs: {inst(15:12)},
194 // safety: ['15 == inst(15:12) || 15 == inst(3:0) => UNPREDICTABLE', '31 < = inst(11:7) + inst(20:16) => UNPREDICTABLE']}
144 // 195 //
145 // Representaive case: 196 // Representaive case:
146 // op1(24:20)=1101x & op2(7:5)=x10 197 // op1(24:20)=1101x & op2(7:5)=x10
147 // = {baseline: Binary2RegisterBitRangeNotRnIsPcBitfieldExtract, 198 // = {Pc: 15,
199 // Rd: Rd(15:12),
200 // Rn: Rn(3:0),
201 // baseline: Binary2RegisterBitRangeNotRnIsPcBitfieldExtract,
148 // constraints: , 202 // constraints: ,
149 // safety: ['RegsNotPc']} 203 // defs: {Rd},
204 // fields: [widthm1(20:16), Rd(15:12), lsb(11:7), Rn(3:0)],
205 // lsb: lsb(11:7),
206 // safety: [Pc in {Rd,Rn} => UNPREDICTABLE, lsb + widthm1 > 31 => UNPREDIC TABLE],
207 // widthm1: widthm1(20:16)}
150 class Binary2RegisterBitRangeNotRnIsPcBitfieldExtractTesterCase3 208 class Binary2RegisterBitRangeNotRnIsPcBitfieldExtractTesterCase3
151 : public Binary2RegisterBitRangeNotRnIsPcBitfieldExtractTesterRegsNotPc { 209 : public Binary2RegisterBitRangeNotRnIsPcBitfieldExtractTester {
152 public: 210 public:
153 Binary2RegisterBitRangeNotRnIsPcBitfieldExtractTesterCase3(const NamedClassDec oder& decoder) 211 Binary2RegisterBitRangeNotRnIsPcBitfieldExtractTesterCase3(const NamedClassDec oder& decoder)
154 : Binary2RegisterBitRangeNotRnIsPcBitfieldExtractTesterRegsNotPc(decoder) {} 212 : Binary2RegisterBitRangeNotRnIsPcBitfieldExtractTester(decoder) {}
155 virtual bool PassesParsePreconditions( 213 virtual bool PassesParsePreconditions(
156 nacl_arm_dec::Instruction inst, 214 nacl_arm_dec::Instruction inst,
157 const NamedClassDecoder& decoder); 215 const NamedClassDecoder& decoder);
216 virtual bool ApplySanityChecks(nacl_arm_dec::Instruction inst,
217 const NamedClassDecoder& decoder);
158 }; 218 };
159 219
160 bool Binary2RegisterBitRangeNotRnIsPcBitfieldExtractTesterCase3 220 bool Binary2RegisterBitRangeNotRnIsPcBitfieldExtractTesterCase3
161 ::PassesParsePreconditions( 221 ::PassesParsePreconditions(
162 nacl_arm_dec::Instruction inst, 222 nacl_arm_dec::Instruction inst,
163 const NamedClassDecoder& decoder) { 223 const NamedClassDecoder& decoder) {
164 224
165 // Check that row patterns apply to pattern being checked.' 225 // Check that row patterns apply to pattern being checked.'
166 if ((inst.Bits() & 0x01E00000) != 0x01A00000 /* op1(24:20)=~1101x */) return f alse; 226 if ((inst.Bits() & 0x01E00000) != 0x01A00000 /* op1(24:20)=~1101x */) return f alse;
167 if ((inst.Bits() & 0x00000060) != 0x00000040 /* op2(7:5)=~x10 */) return false ; 227 if ((inst.Bits() & 0x00000060) != 0x00000040 /* op2(7:5)=~x10 */) return false ;
168 228
169 // Check other preconditions defined for the base decoder. 229 // Check other preconditions defined for the base decoder.
170 return Binary2RegisterBitRangeNotRnIsPcBitfieldExtractTesterRegsNotPc:: 230 return Binary2RegisterBitRangeNotRnIsPcBitfieldExtractTester::
171 PassesParsePreconditions(inst, decoder); 231 PassesParsePreconditions(inst, decoder);
172 } 232 }
173 233
234 bool Binary2RegisterBitRangeNotRnIsPcBitfieldExtractTesterCase3
235 ::ApplySanityChecks(nacl_arm_dec::Instruction inst,
236 const NamedClassDecoder& decoder) {
237 NC_PRECOND(Binary2RegisterBitRangeNotRnIsPcBitfieldExtractTester::ApplySanityC hecks(inst, decoder));
238
239 // safety: Pc in {Rd,Rn} => UNPREDICTABLE
240 EXPECT_TRUE(!((((15) == (((inst.Bits() & 0x0000F000) >> 12)))) || (((15) == (( inst.Bits() & 0x0000000F))))));
241
242 // safety: lsb + widthm1 > 31 => UNPREDICTABLE
243 EXPECT_TRUE(((((inst.Bits() & 0x00000F80) >> 7) + ((inst.Bits() & 0x001F0000) >> 16)) <= (31)));
244
245 // defs: {Rd};
246 EXPECT_TRUE(decoder.defs(inst).IsSame(RegisterList().Add(Register(((inst.Bits( ) & 0x0000F000) >> 12)))));
247
248 return true;
249 }
250
174 // Neutral case: 251 // Neutral case:
175 // inst(24:20)=1110x & inst(7:5)=x00 & inst(3:0)=~1111 252 // inst(24:20)=1110x & inst(7:5)=x00 & inst(3:0)=~1111
176 // = {baseline: 'Binary2RegisterBitRangeMsbGeLsb', 253 // = {baseline: 'Binary2RegisterBitRangeMsbGeLsb',
177 // constraints: , 254 // constraints: ,
178 // safety: ["'RegsNotPc'"]} 255 // defs: {inst(15:12)},
256 // safety: ['15 == inst(3:0) => DECODER_ERROR', '15 == inst(15:12) => UNPR EDICTABLE', 'inst(20:16) < inst(11:7) => UNPREDICTABLE']}
179 // 257 //
180 // Representaive case: 258 // Representaive case:
181 // op1(24:20)=1110x & op2(7:5)=x00 & Rn(3:0)=~1111 259 // op1(24:20)=1110x & op2(7:5)=x00 & Rn(3:0)=~1111
182 // = {baseline: Binary2RegisterBitRangeMsbGeLsb, 260 // = {Pc: 15,
261 // Rd: Rd(15:12),
262 // Rn: Rn(3:0),
263 // baseline: Binary2RegisterBitRangeMsbGeLsb,
183 // constraints: , 264 // constraints: ,
184 // safety: ['RegsNotPc']} 265 // defs: {Rd},
266 // fields: [msb(20:16), Rd(15:12), lsb(11:7), Rn(3:0)],
267 // lsb: lsb(11:7),
268 // msb: msb(20:16),
269 // safety: [Rn == Pc => DECODER_ERROR, Rd == Pc => UNPREDICTABLE, msb < ls b => UNPREDICTABLE]}
185 class Binary2RegisterBitRangeMsbGeLsbTesterCase4 270 class Binary2RegisterBitRangeMsbGeLsbTesterCase4
186 : public Binary2RegisterBitRangeMsbGeLsbTesterRegsNotPc { 271 : public Binary2RegisterBitRangeMsbGeLsbTester {
187 public: 272 public:
188 Binary2RegisterBitRangeMsbGeLsbTesterCase4(const NamedClassDecoder& decoder) 273 Binary2RegisterBitRangeMsbGeLsbTesterCase4(const NamedClassDecoder& decoder)
189 : Binary2RegisterBitRangeMsbGeLsbTesterRegsNotPc(decoder) {} 274 : Binary2RegisterBitRangeMsbGeLsbTester(decoder) {}
190 virtual bool PassesParsePreconditions( 275 virtual bool PassesParsePreconditions(
191 nacl_arm_dec::Instruction inst, 276 nacl_arm_dec::Instruction inst,
192 const NamedClassDecoder& decoder); 277 const NamedClassDecoder& decoder);
278 virtual bool ApplySanityChecks(nacl_arm_dec::Instruction inst,
279 const NamedClassDecoder& decoder);
193 }; 280 };
194 281
195 bool Binary2RegisterBitRangeMsbGeLsbTesterCase4 282 bool Binary2RegisterBitRangeMsbGeLsbTesterCase4
196 ::PassesParsePreconditions( 283 ::PassesParsePreconditions(
197 nacl_arm_dec::Instruction inst, 284 nacl_arm_dec::Instruction inst,
198 const NamedClassDecoder& decoder) { 285 const NamedClassDecoder& decoder) {
199 286
200 // Check that row patterns apply to pattern being checked.' 287 // Check that row patterns apply to pattern being checked.'
201 if ((inst.Bits() & 0x01E00000) != 0x01C00000 /* op1(24:20)=~1110x */) return f alse; 288 if ((inst.Bits() & 0x01E00000) != 0x01C00000 /* op1(24:20)=~1110x */) return f alse;
202 if ((inst.Bits() & 0x00000060) != 0x00000000 /* op2(7:5)=~x00 */) return false ; 289 if ((inst.Bits() & 0x00000060) != 0x00000000 /* op2(7:5)=~x00 */) return false ;
203 if ((inst.Bits() & 0x0000000F) == 0x0000000F /* Rn(3:0)=1111 */) return false; 290 if ((inst.Bits() & 0x0000000F) == 0x0000000F /* Rn(3:0)=1111 */) return false;
204 291
205 // Check other preconditions defined for the base decoder. 292 // Check other preconditions defined for the base decoder.
206 return Binary2RegisterBitRangeMsbGeLsbTesterRegsNotPc:: 293 return Binary2RegisterBitRangeMsbGeLsbTester::
207 PassesParsePreconditions(inst, decoder); 294 PassesParsePreconditions(inst, decoder);
208 } 295 }
209 296
297 bool Binary2RegisterBitRangeMsbGeLsbTesterCase4
298 ::ApplySanityChecks(nacl_arm_dec::Instruction inst,
299 const NamedClassDecoder& decoder) {
300 NC_PRECOND(Binary2RegisterBitRangeMsbGeLsbTester::ApplySanityChecks(inst, deco der));
301
302 // safety: Rn == Pc => DECODER_ERROR
303 EXPECT_TRUE((((inst.Bits() & 0x0000000F)) != (15)));
304
305 // safety: Rd == Pc => UNPREDICTABLE
306 EXPECT_TRUE(((((inst.Bits() & 0x0000F000) >> 12)) != (15)));
307
308 // safety: msb < lsb => UNPREDICTABLE
309 EXPECT_TRUE(((((inst.Bits() & 0x001F0000) >> 16)) >= (((inst.Bits() & 0x00000F 80) >> 7))));
310
311 // defs: {Rd};
312 EXPECT_TRUE(decoder.defs(inst).IsSame(RegisterList().Add(Register(((inst.Bits( ) & 0x0000F000) >> 12)))));
313
314 return true;
315 }
316
210 // Neutral case: 317 // Neutral case:
211 // inst(24:20)=1110x & inst(7:5)=x00 & inst(3:0)=1111 318 // inst(24:20)=1110x & inst(7:5)=x00 & inst(3:0)=1111
212 // = {baseline: 'Unary1RegisterBitRangeMsbGeLsb', 319 // = {baseline: 'Unary1RegisterBitRangeMsbGeLsb',
213 // constraints: , 320 // constraints: ,
214 // safety: ["'RegsNotPc'"]} 321 // defs: {inst(15:12)},
322 // safety: ['15 == inst(15:12) => UNPREDICTABLE', 'inst(20:16) < inst(11:7 ) => UNPREDICTABLE']}
215 // 323 //
216 // Representaive case: 324 // Representaive case:
217 // op1(24:20)=1110x & op2(7:5)=x00 & Rn(3:0)=1111 325 // op1(24:20)=1110x & op2(7:5)=x00 & Rn(3:0)=1111
218 // = {baseline: Unary1RegisterBitRangeMsbGeLsb, 326 // = {Pc: 15,
327 // Rd: Rd(15:12),
328 // baseline: Unary1RegisterBitRangeMsbGeLsb,
219 // constraints: , 329 // constraints: ,
220 // safety: ['RegsNotPc']} 330 // defs: {Rd},
331 // fields: [msb(20:16), Rd(15:12), lsb(11:7)],
332 // lsb: lsb(11:7),
333 // msb: msb(20:16),
334 // safety: [Rd == Pc => UNPREDICTABLE, msb < lsb => UNPREDICTABLE]}
221 class Unary1RegisterBitRangeMsbGeLsbTesterCase5 335 class Unary1RegisterBitRangeMsbGeLsbTesterCase5
222 : public Unary1RegisterBitRangeMsbGeLsbTesterRegsNotPc { 336 : public Unary1RegisterBitRangeMsbGeLsbTester {
223 public: 337 public:
224 Unary1RegisterBitRangeMsbGeLsbTesterCase5(const NamedClassDecoder& decoder) 338 Unary1RegisterBitRangeMsbGeLsbTesterCase5(const NamedClassDecoder& decoder)
225 : Unary1RegisterBitRangeMsbGeLsbTesterRegsNotPc(decoder) {} 339 : Unary1RegisterBitRangeMsbGeLsbTester(decoder) {}
226 virtual bool PassesParsePreconditions( 340 virtual bool PassesParsePreconditions(
227 nacl_arm_dec::Instruction inst, 341 nacl_arm_dec::Instruction inst,
228 const NamedClassDecoder& decoder); 342 const NamedClassDecoder& decoder);
343 virtual bool ApplySanityChecks(nacl_arm_dec::Instruction inst,
344 const NamedClassDecoder& decoder);
229 }; 345 };
230 346
231 bool Unary1RegisterBitRangeMsbGeLsbTesterCase5 347 bool Unary1RegisterBitRangeMsbGeLsbTesterCase5
232 ::PassesParsePreconditions( 348 ::PassesParsePreconditions(
233 nacl_arm_dec::Instruction inst, 349 nacl_arm_dec::Instruction inst,
234 const NamedClassDecoder& decoder) { 350 const NamedClassDecoder& decoder) {
235 351
236 // Check that row patterns apply to pattern being checked.' 352 // Check that row patterns apply to pattern being checked.'
237 if ((inst.Bits() & 0x01E00000) != 0x01C00000 /* op1(24:20)=~1110x */) return f alse; 353 if ((inst.Bits() & 0x01E00000) != 0x01C00000 /* op1(24:20)=~1110x */) return f alse;
238 if ((inst.Bits() & 0x00000060) != 0x00000000 /* op2(7:5)=~x00 */) return false ; 354 if ((inst.Bits() & 0x00000060) != 0x00000000 /* op2(7:5)=~x00 */) return false ;
239 if ((inst.Bits() & 0x0000000F) != 0x0000000F /* Rn(3:0)=~1111 */) return false ; 355 if ((inst.Bits() & 0x0000000F) != 0x0000000F /* Rn(3:0)=~1111 */) return false ;
240 356
241 // Check other preconditions defined for the base decoder. 357 // Check other preconditions defined for the base decoder.
242 return Unary1RegisterBitRangeMsbGeLsbTesterRegsNotPc:: 358 return Unary1RegisterBitRangeMsbGeLsbTester::
243 PassesParsePreconditions(inst, decoder); 359 PassesParsePreconditions(inst, decoder);
244 } 360 }
245 361
362 bool Unary1RegisterBitRangeMsbGeLsbTesterCase5
363 ::ApplySanityChecks(nacl_arm_dec::Instruction inst,
364 const NamedClassDecoder& decoder) {
365 NC_PRECOND(Unary1RegisterBitRangeMsbGeLsbTester::ApplySanityChecks(inst, decod er));
366
367 // safety: Rd == Pc => UNPREDICTABLE
368 EXPECT_TRUE(((((inst.Bits() & 0x0000F000) >> 12)) != (15)));
369
370 // safety: msb < lsb => UNPREDICTABLE
371 EXPECT_TRUE(((((inst.Bits() & 0x001F0000) >> 16)) >= (((inst.Bits() & 0x00000F 80) >> 7))));
372
373 // defs: {Rd};
374 EXPECT_TRUE(decoder.defs(inst).IsSame(RegisterList().Add(Register(((inst.Bits( ) & 0x0000F000) >> 12)))));
375
376 return true;
377 }
378
246 // Neutral case: 379 // Neutral case:
247 // inst(24:20)=1111x & inst(7:5)=x10 380 // inst(24:20)=1111x & inst(7:5)=x10
248 // = {baseline: 'Binary2RegisterBitRangeNotRnIsPcBitfieldExtract', 381 // = {baseline: 'Binary2RegisterBitRangeNotRnIsPcBitfieldExtract',
249 // constraints: , 382 // constraints: ,
250 // safety: ["'RegsNotPc'"]} 383 // defs: {inst(15:12)},
384 // safety: ['15 == inst(15:12) || 15 == inst(3:0) => UNPREDICTABLE', '31 < = inst(11:7) + inst(20:16) => UNPREDICTABLE']}
251 // 385 //
252 // Representaive case: 386 // Representaive case:
253 // op1(24:20)=1111x & op2(7:5)=x10 387 // op1(24:20)=1111x & op2(7:5)=x10
254 // = {baseline: Binary2RegisterBitRangeNotRnIsPcBitfieldExtract, 388 // = {Pc: 15,
389 // Rd: Rd(15:12),
390 // Rn: Rn(3:0),
391 // baseline: Binary2RegisterBitRangeNotRnIsPcBitfieldExtract,
255 // constraints: , 392 // constraints: ,
256 // safety: ['RegsNotPc']} 393 // defs: {Rd},
394 // fields: [widthm1(20:16), Rd(15:12), lsb(11:7), Rn(3:0)],
395 // lsb: lsb(11:7),
396 // safety: [Pc in {Rd,Rn} => UNPREDICTABLE, lsb + widthm1 > 31 => UNPREDIC TABLE],
397 // widthm1: widthm1(20:16)}
257 class Binary2RegisterBitRangeNotRnIsPcBitfieldExtractTesterCase6 398 class Binary2RegisterBitRangeNotRnIsPcBitfieldExtractTesterCase6
258 : public Binary2RegisterBitRangeNotRnIsPcBitfieldExtractTesterRegsNotPc { 399 : public Binary2RegisterBitRangeNotRnIsPcBitfieldExtractTester {
259 public: 400 public:
260 Binary2RegisterBitRangeNotRnIsPcBitfieldExtractTesterCase6(const NamedClassDec oder& decoder) 401 Binary2RegisterBitRangeNotRnIsPcBitfieldExtractTesterCase6(const NamedClassDec oder& decoder)
261 : Binary2RegisterBitRangeNotRnIsPcBitfieldExtractTesterRegsNotPc(decoder) {} 402 : Binary2RegisterBitRangeNotRnIsPcBitfieldExtractTester(decoder) {}
262 virtual bool PassesParsePreconditions( 403 virtual bool PassesParsePreconditions(
263 nacl_arm_dec::Instruction inst, 404 nacl_arm_dec::Instruction inst,
264 const NamedClassDecoder& decoder); 405 const NamedClassDecoder& decoder);
406 virtual bool ApplySanityChecks(nacl_arm_dec::Instruction inst,
407 const NamedClassDecoder& decoder);
265 }; 408 };
266 409
267 bool Binary2RegisterBitRangeNotRnIsPcBitfieldExtractTesterCase6 410 bool Binary2RegisterBitRangeNotRnIsPcBitfieldExtractTesterCase6
268 ::PassesParsePreconditions( 411 ::PassesParsePreconditions(
269 nacl_arm_dec::Instruction inst, 412 nacl_arm_dec::Instruction inst,
270 const NamedClassDecoder& decoder) { 413 const NamedClassDecoder& decoder) {
271 414
272 // Check that row patterns apply to pattern being checked.' 415 // Check that row patterns apply to pattern being checked.'
273 if ((inst.Bits() & 0x01E00000) != 0x01E00000 /* op1(24:20)=~1111x */) return f alse; 416 if ((inst.Bits() & 0x01E00000) != 0x01E00000 /* op1(24:20)=~1111x */) return f alse;
274 if ((inst.Bits() & 0x00000060) != 0x00000040 /* op2(7:5)=~x10 */) return false ; 417 if ((inst.Bits() & 0x00000060) != 0x00000040 /* op2(7:5)=~x10 */) return false ;
275 418
276 // Check other preconditions defined for the base decoder. 419 // Check other preconditions defined for the base decoder.
277 return Binary2RegisterBitRangeNotRnIsPcBitfieldExtractTesterRegsNotPc:: 420 return Binary2RegisterBitRangeNotRnIsPcBitfieldExtractTester::
278 PassesParsePreconditions(inst, decoder); 421 PassesParsePreconditions(inst, decoder);
279 } 422 }
280 423
424 bool Binary2RegisterBitRangeNotRnIsPcBitfieldExtractTesterCase6
425 ::ApplySanityChecks(nacl_arm_dec::Instruction inst,
426 const NamedClassDecoder& decoder) {
427 NC_PRECOND(Binary2RegisterBitRangeNotRnIsPcBitfieldExtractTester::ApplySanityC hecks(inst, decoder));
428
429 // safety: Pc in {Rd,Rn} => UNPREDICTABLE
430 EXPECT_TRUE(!((((15) == (((inst.Bits() & 0x0000F000) >> 12)))) || (((15) == (( inst.Bits() & 0x0000000F))))));
431
432 // safety: lsb + widthm1 > 31 => UNPREDICTABLE
433 EXPECT_TRUE(((((inst.Bits() & 0x00000F80) >> 7) + ((inst.Bits() & 0x001F0000) >> 16)) <= (31)));
434
435 // defs: {Rd};
436 EXPECT_TRUE(decoder.defs(inst).IsSame(RegisterList().Add(Register(((inst.Bits( ) & 0x0000F000) >> 12)))));
437
438 return true;
439 }
440
281 // The following are derived class decoder testers for decoder actions 441 // The following are derived class decoder testers for decoder actions
282 // associated with a pattern of an action. These derived classes introduce 442 // associated with a pattern of an action. These derived classes introduce
283 // a default constructor that automatically initializes the expected decoder 443 // a default constructor that automatically initializes the expected decoder
284 // to the corresponding instance in the generated DecoderState. 444 // to the corresponding instance in the generated DecoderState.
285 445
286 // Neutral case: 446 // Neutral case:
287 // inst(24:20)=11000 & inst(7:5)=000 & inst(15:12)=~1111 447 // inst(24:20)=11000 & inst(7:5)=000 & inst(15:12)=~1111
288 // = {baseline: 'Binary4RegisterDualOp', 448 // = {baseline: 'Binary4RegisterDualOp',
289 // constraints: , 449 // constraints: ,
290 // rule: 'Usada8_Rule_254_A1_P502', 450 // defs: {inst(19:16)},
291 // safety: ["'RegsNotPc'"]} 451 // rule: 'USADA8',
452 // safety: ['15 == inst(15:12) => DECODER_ERROR', '15 == inst(19:16) || 15 == inst(3:0) || 15 == inst(11:8) => UNPREDICTABLE']}
292 // 453 //
293 // Representative case: 454 // Representative case:
294 // op1(24:20)=11000 & op2(7:5)=000 & Rd(15:12)=~1111 455 // op1(24:20)=11000 & op2(7:5)=000 & Rd(15:12)=~1111
295 // = {baseline: Binary4RegisterDualOp, 456 // = {Pc: 15,
457 // Ra: Ra(15:12),
458 // Rd: Rd(19:16),
459 // Rm: Rm(11:8),
460 // Rn: Rn(3:0),
461 // baseline: Binary4RegisterDualOp,
296 // constraints: , 462 // constraints: ,
297 // rule: Usada8_Rule_254_A1_P502, 463 // defs: {Rd},
298 // safety: ['RegsNotPc']} 464 // fields: [Rd(19:16), Ra(15:12), Rm(11:8), Rn(3:0)],
465 // rule: USADA8,
466 // safety: [Ra == Pc => DECODER_ERROR, Pc in {Rd,Rn,Rm} => UNPREDICTABLE]}
299 class Binary4RegisterDualOpTester_Case0 467 class Binary4RegisterDualOpTester_Case0
300 : public Binary4RegisterDualOpTesterCase0 { 468 : public Binary4RegisterDualOpTesterCase0 {
301 public: 469 public:
302 Binary4RegisterDualOpTester_Case0() 470 Binary4RegisterDualOpTester_Case0()
303 : Binary4RegisterDualOpTesterCase0( 471 : Binary4RegisterDualOpTesterCase0(
304 state_.Binary4RegisterDualOp_Usada8_Rule_254_A1_P502_instance_) 472 state_.Binary4RegisterDualOp_USADA8_instance_)
305 {} 473 {}
306 }; 474 };
307 475
308 // Neutral case: 476 // Neutral case:
309 // inst(24:20)=11000 & inst(7:5)=000 & inst(15:12)=1111 477 // inst(24:20)=11000 & inst(7:5)=000 & inst(15:12)=1111
310 // = {baseline: 'Binary3RegisterOpAltA', 478 // = {baseline: 'Binary3RegisterOpAltA',
311 // constraints: , 479 // constraints: ,
312 // rule: 'Usad8_Rule_253_A1_P500', 480 // defs: {inst(19:16)},
313 // safety: ["'RegsNotPc'"]} 481 // rule: 'USAD8',
482 // safety: ['15 == inst(19:16) || 15 == inst(3:0) || 15 == inst(11:8) => U NPREDICTABLE']}
314 // 483 //
315 // Representative case: 484 // Representative case:
316 // op1(24:20)=11000 & op2(7:5)=000 & Rd(15:12)=1111 485 // op1(24:20)=11000 & op2(7:5)=000 & Rd(15:12)=1111
317 // = {baseline: Binary3RegisterOpAltA, 486 // = {Pc: 15,
487 // Rd: Rd(19:16),
488 // Rm: Rm(11:8),
489 // Rn: Rn(3:0),
490 // baseline: Binary3RegisterOpAltA,
318 // constraints: , 491 // constraints: ,
319 // rule: Usad8_Rule_253_A1_P500, 492 // defs: {Rd},
320 // safety: ['RegsNotPc']} 493 // fields: [Rd(19:16), Rm(11:8), Rn(3:0)],
494 // rule: USAD8,
495 // safety: [Pc in {Rd,Rn,Rm} => UNPREDICTABLE]}
321 class Binary3RegisterOpAltATester_Case1 496 class Binary3RegisterOpAltATester_Case1
322 : public Binary3RegisterOpAltATesterCase1 { 497 : public Binary3RegisterOpAltATesterCase1 {
323 public: 498 public:
324 Binary3RegisterOpAltATester_Case1() 499 Binary3RegisterOpAltATester_Case1()
325 : Binary3RegisterOpAltATesterCase1( 500 : Binary3RegisterOpAltATesterCase1(
326 state_.Binary3RegisterOpAltA_Usad8_Rule_253_A1_P500_instance_) 501 state_.Binary3RegisterOpAltA_USAD8_instance_)
327 {} 502 {}
328 }; 503 };
329 504
330 // Neutral case: 505 // Neutral case:
331 // inst(24:20)=11111 & inst(7:5)=111 506 // inst(24:20)=11111 & inst(7:5)=111
332 // = {baseline: 'PermanentlyUndefined', 507 // = {baseline: 'PermanentlyUndefined',
333 // constraints: , 508 // constraints: ,
334 // rule: 'Udf_Rule_A1'} 509 // rule: 'UDF'}
335 // 510 //
336 // Representative case: 511 // Representative case:
337 // op1(24:20)=11111 & op2(7:5)=111 512 // op1(24:20)=11111 & op2(7:5)=111
338 // = {baseline: PermanentlyUndefined, 513 // = {baseline: PermanentlyUndefined,
339 // constraints: , 514 // constraints: ,
340 // rule: Udf_Rule_A1} 515 // rule: UDF}
341 class PermanentlyUndefinedTester_Case2 516 class PermanentlyUndefinedTester_Case2
342 : public PermanentlyUndefinedTesterCase2 { 517 : public PermanentlyUndefinedTesterCase2 {
343 public: 518 public:
344 PermanentlyUndefinedTester_Case2() 519 PermanentlyUndefinedTester_Case2()
345 : PermanentlyUndefinedTesterCase2( 520 : PermanentlyUndefinedTesterCase2(
346 state_.PermanentlyUndefined_Udf_Rule_A1_instance_) 521 state_.PermanentlyUndefined_UDF_instance_)
347 {} 522 {}
348 }; 523 };
349 524
350 // Neutral case: 525 // Neutral case:
351 // inst(24:20)=1101x & inst(7:5)=x10 526 // inst(24:20)=1101x & inst(7:5)=x10
352 // = {baseline: 'Binary2RegisterBitRangeNotRnIsPcBitfieldExtract', 527 // = {baseline: 'Binary2RegisterBitRangeNotRnIsPcBitfieldExtract',
353 // constraints: , 528 // constraints: ,
354 // rule: 'Sbfx_Rule_154_A1_P308', 529 // defs: {inst(15:12)},
355 // safety: ["'RegsNotPc'"]} 530 // rule: 'SBFX',
531 // safety: ['15 == inst(15:12) || 15 == inst(3:0) => UNPREDICTABLE', '31 < = inst(11:7) + inst(20:16) => UNPREDICTABLE']}
356 // 532 //
357 // Representative case: 533 // Representative case:
358 // op1(24:20)=1101x & op2(7:5)=x10 534 // op1(24:20)=1101x & op2(7:5)=x10
359 // = {baseline: Binary2RegisterBitRangeNotRnIsPcBitfieldExtract, 535 // = {Pc: 15,
536 // Rd: Rd(15:12),
537 // Rn: Rn(3:0),
538 // baseline: Binary2RegisterBitRangeNotRnIsPcBitfieldExtract,
360 // constraints: , 539 // constraints: ,
361 // rule: Sbfx_Rule_154_A1_P308, 540 // defs: {Rd},
362 // safety: ['RegsNotPc']} 541 // fields: [widthm1(20:16), Rd(15:12), lsb(11:7), Rn(3:0)],
542 // lsb: lsb(11:7),
543 // rule: SBFX,
544 // safety: [Pc in {Rd,Rn} => UNPREDICTABLE, lsb + widthm1 > 31 => UNPREDIC TABLE],
545 // widthm1: widthm1(20:16)}
363 class Binary2RegisterBitRangeNotRnIsPcBitfieldExtractTester_Case3 546 class Binary2RegisterBitRangeNotRnIsPcBitfieldExtractTester_Case3
364 : public Binary2RegisterBitRangeNotRnIsPcBitfieldExtractTesterCase3 { 547 : public Binary2RegisterBitRangeNotRnIsPcBitfieldExtractTesterCase3 {
365 public: 548 public:
366 Binary2RegisterBitRangeNotRnIsPcBitfieldExtractTester_Case3() 549 Binary2RegisterBitRangeNotRnIsPcBitfieldExtractTester_Case3()
367 : Binary2RegisterBitRangeNotRnIsPcBitfieldExtractTesterCase3( 550 : Binary2RegisterBitRangeNotRnIsPcBitfieldExtractTesterCase3(
368 state_.Binary2RegisterBitRangeNotRnIsPcBitfieldExtract_Sbfx_Rule_154_A1_P3 08_instance_) 551 state_.Binary2RegisterBitRangeNotRnIsPcBitfieldExtract_SBFX_instance_)
369 {} 552 {}
370 }; 553 };
371 554
372 // Neutral case: 555 // Neutral case:
373 // inst(24:20)=1110x & inst(7:5)=x00 & inst(3:0)=~1111 556 // inst(24:20)=1110x & inst(7:5)=x00 & inst(3:0)=~1111
374 // = {baseline: 'Binary2RegisterBitRangeMsbGeLsb', 557 // = {baseline: 'Binary2RegisterBitRangeMsbGeLsb',
375 // constraints: , 558 // constraints: ,
376 // rule: 'Bfi_Rule_18_A1_P48', 559 // defs: {inst(15:12)},
377 // safety: ["'RegsNotPc'"]} 560 // rule: 'BFI',
561 // safety: ['15 == inst(3:0) => DECODER_ERROR', '15 == inst(15:12) => UNPR EDICTABLE', 'inst(20:16) < inst(11:7) => UNPREDICTABLE']}
378 // 562 //
379 // Representative case: 563 // Representative case:
380 // op1(24:20)=1110x & op2(7:5)=x00 & Rn(3:0)=~1111 564 // op1(24:20)=1110x & op2(7:5)=x00 & Rn(3:0)=~1111
381 // = {baseline: Binary2RegisterBitRangeMsbGeLsb, 565 // = {Pc: 15,
566 // Rd: Rd(15:12),
567 // Rn: Rn(3:0),
568 // baseline: Binary2RegisterBitRangeMsbGeLsb,
382 // constraints: , 569 // constraints: ,
383 // rule: Bfi_Rule_18_A1_P48, 570 // defs: {Rd},
384 // safety: ['RegsNotPc']} 571 // fields: [msb(20:16), Rd(15:12), lsb(11:7), Rn(3:0)],
572 // lsb: lsb(11:7),
573 // msb: msb(20:16),
574 // rule: BFI,
575 // safety: [Rn == Pc => DECODER_ERROR, Rd == Pc => UNPREDICTABLE, msb < ls b => UNPREDICTABLE]}
385 class Binary2RegisterBitRangeMsbGeLsbTester_Case4 576 class Binary2RegisterBitRangeMsbGeLsbTester_Case4
386 : public Binary2RegisterBitRangeMsbGeLsbTesterCase4 { 577 : public Binary2RegisterBitRangeMsbGeLsbTesterCase4 {
387 public: 578 public:
388 Binary2RegisterBitRangeMsbGeLsbTester_Case4() 579 Binary2RegisterBitRangeMsbGeLsbTester_Case4()
389 : Binary2RegisterBitRangeMsbGeLsbTesterCase4( 580 : Binary2RegisterBitRangeMsbGeLsbTesterCase4(
390 state_.Binary2RegisterBitRangeMsbGeLsb_Bfi_Rule_18_A1_P48_instance_) 581 state_.Binary2RegisterBitRangeMsbGeLsb_BFI_instance_)
391 {} 582 {}
392 }; 583 };
393 584
394 // Neutral case: 585 // Neutral case:
395 // inst(24:20)=1110x & inst(7:5)=x00 & inst(3:0)=1111 586 // inst(24:20)=1110x & inst(7:5)=x00 & inst(3:0)=1111
396 // = {baseline: 'Unary1RegisterBitRangeMsbGeLsb', 587 // = {baseline: 'Unary1RegisterBitRangeMsbGeLsb',
397 // constraints: , 588 // constraints: ,
398 // rule: 'Bfc_17_A1_P46', 589 // defs: {inst(15:12)},
399 // safety: ["'RegsNotPc'"]} 590 // rule: 'BFC',
591 // safety: ['15 == inst(15:12) => UNPREDICTABLE', 'inst(20:16) < inst(11:7 ) => UNPREDICTABLE']}
400 // 592 //
401 // Representative case: 593 // Representative case:
402 // op1(24:20)=1110x & op2(7:5)=x00 & Rn(3:0)=1111 594 // op1(24:20)=1110x & op2(7:5)=x00 & Rn(3:0)=1111
403 // = {baseline: Unary1RegisterBitRangeMsbGeLsb, 595 // = {Pc: 15,
596 // Rd: Rd(15:12),
597 // baseline: Unary1RegisterBitRangeMsbGeLsb,
404 // constraints: , 598 // constraints: ,
405 // rule: Bfc_17_A1_P46, 599 // defs: {Rd},
406 // safety: ['RegsNotPc']} 600 // fields: [msb(20:16), Rd(15:12), lsb(11:7)],
601 // lsb: lsb(11:7),
602 // msb: msb(20:16),
603 // rule: BFC,
604 // safety: [Rd == Pc => UNPREDICTABLE, msb < lsb => UNPREDICTABLE]}
407 class Unary1RegisterBitRangeMsbGeLsbTester_Case5 605 class Unary1RegisterBitRangeMsbGeLsbTester_Case5
408 : public Unary1RegisterBitRangeMsbGeLsbTesterCase5 { 606 : public Unary1RegisterBitRangeMsbGeLsbTesterCase5 {
409 public: 607 public:
410 Unary1RegisterBitRangeMsbGeLsbTester_Case5() 608 Unary1RegisterBitRangeMsbGeLsbTester_Case5()
411 : Unary1RegisterBitRangeMsbGeLsbTesterCase5( 609 : Unary1RegisterBitRangeMsbGeLsbTesterCase5(
412 state_.Unary1RegisterBitRangeMsbGeLsb_Bfc_17_A1_P46_instance_) 610 state_.Unary1RegisterBitRangeMsbGeLsb_BFC_instance_)
413 {} 611 {}
414 }; 612 };
415 613
416 // Neutral case: 614 // Neutral case:
417 // inst(24:20)=1111x & inst(7:5)=x10 615 // inst(24:20)=1111x & inst(7:5)=x10
418 // = {baseline: 'Binary2RegisterBitRangeNotRnIsPcBitfieldExtract', 616 // = {baseline: 'Binary2RegisterBitRangeNotRnIsPcBitfieldExtract',
419 // constraints: , 617 // constraints: ,
420 // rule: 'Ubfx_Rule_236_A1_P466', 618 // defs: {inst(15:12)},
421 // safety: ["'RegsNotPc'"]} 619 // rule: 'UBFX',
620 // safety: ['15 == inst(15:12) || 15 == inst(3:0) => UNPREDICTABLE', '31 < = inst(11:7) + inst(20:16) => UNPREDICTABLE']}
422 // 621 //
423 // Representative case: 622 // Representative case:
424 // op1(24:20)=1111x & op2(7:5)=x10 623 // op1(24:20)=1111x & op2(7:5)=x10
425 // = {baseline: Binary2RegisterBitRangeNotRnIsPcBitfieldExtract, 624 // = {Pc: 15,
625 // Rd: Rd(15:12),
626 // Rn: Rn(3:0),
627 // baseline: Binary2RegisterBitRangeNotRnIsPcBitfieldExtract,
426 // constraints: , 628 // constraints: ,
427 // rule: Ubfx_Rule_236_A1_P466, 629 // defs: {Rd},
428 // safety: ['RegsNotPc']} 630 // fields: [widthm1(20:16), Rd(15:12), lsb(11:7), Rn(3:0)],
631 // lsb: lsb(11:7),
632 // rule: UBFX,
633 // safety: [Pc in {Rd,Rn} => UNPREDICTABLE, lsb + widthm1 > 31 => UNPREDIC TABLE],
634 // widthm1: widthm1(20:16)}
429 class Binary2RegisterBitRangeNotRnIsPcBitfieldExtractTester_Case6 635 class Binary2RegisterBitRangeNotRnIsPcBitfieldExtractTester_Case6
430 : public Binary2RegisterBitRangeNotRnIsPcBitfieldExtractTesterCase6 { 636 : public Binary2RegisterBitRangeNotRnIsPcBitfieldExtractTesterCase6 {
431 public: 637 public:
432 Binary2RegisterBitRangeNotRnIsPcBitfieldExtractTester_Case6() 638 Binary2RegisterBitRangeNotRnIsPcBitfieldExtractTester_Case6()
433 : Binary2RegisterBitRangeNotRnIsPcBitfieldExtractTesterCase6( 639 : Binary2RegisterBitRangeNotRnIsPcBitfieldExtractTesterCase6(
434 state_.Binary2RegisterBitRangeNotRnIsPcBitfieldExtract_Ubfx_Rule_236_A1_P4 66_instance_) 640 state_.Binary2RegisterBitRangeNotRnIsPcBitfieldExtract_UBFX_instance_)
435 {} 641 {}
436 }; 642 };
437 643
438 // Defines a gtest testing harness for tests. 644 // Defines a gtest testing harness for tests.
439 class Arm32DecoderStateTests : public ::testing::Test { 645 class Arm32DecoderStateTests : public ::testing::Test {
440 protected: 646 protected:
441 Arm32DecoderStateTests() {} 647 Arm32DecoderStateTests() {}
442 }; 648 };
443 649
444 // The following functions test each pattern specified in parse 650 // The following functions test each pattern specified in parse
445 // decoder tables. 651 // decoder tables.
446 652
447 // Neutral case: 653 // Neutral case:
448 // inst(24:20)=11000 & inst(7:5)=000 & inst(15:12)=~1111 654 // inst(24:20)=11000 & inst(7:5)=000 & inst(15:12)=~1111
449 // = {actual: 'Defs16To19CondsDontCareRdRaRmRnNotPc', 655 // = {actual: 'Binary4RegisterDualOp',
450 // baseline: 'Binary4RegisterDualOp', 656 // baseline: 'Binary4RegisterDualOp',
451 // constraints: , 657 // constraints: ,
658 // defs: {inst(19:16)},
452 // pattern: 'cccc01111000ddddaaaammmm0001nnnn', 659 // pattern: 'cccc01111000ddddaaaammmm0001nnnn',
453 // rule: 'Usada8_Rule_254_A1_P502', 660 // rule: 'USADA8',
454 // safety: ["'RegsNotPc'"]} 661 // safety: ['15 == inst(15:12) => DECODER_ERROR', '15 == inst(19:16) || 15 == inst(3:0) || 15 == inst(11:8) => UNPREDICTABLE']}
455 // 662 //
456 // Representative case: 663 // Representaive case:
457 // op1(24:20)=11000 & op2(7:5)=000 & Rd(15:12)=~1111 664 // op1(24:20)=11000 & op2(7:5)=000 & Rd(15:12)=~1111
458 // = {actual: Defs16To19CondsDontCareRdRaRmRnNotPc, 665 // = {Pc: 15,
666 // Ra: Ra(15:12),
667 // Rd: Rd(19:16),
668 // Rm: Rm(11:8),
669 // Rn: Rn(3:0),
670 // actual: Binary4RegisterDualOp,
459 // baseline: Binary4RegisterDualOp, 671 // baseline: Binary4RegisterDualOp,
460 // constraints: , 672 // constraints: ,
673 // defs: {Rd},
674 // fields: [Rd(19:16), Ra(15:12), Rm(11:8), Rn(3:0)],
461 // pattern: cccc01111000ddddaaaammmm0001nnnn, 675 // pattern: cccc01111000ddddaaaammmm0001nnnn,
462 // rule: Usada8_Rule_254_A1_P502, 676 // rule: USADA8,
463 // safety: ['RegsNotPc']} 677 // safety: [Ra == Pc => DECODER_ERROR, Pc in {Rd,Rn,Rm} => UNPREDICTABLE]}
464 TEST_F(Arm32DecoderStateTests, 678 TEST_F(Arm32DecoderStateTests,
465 Binary4RegisterDualOpTester_Case0_TestCase0) { 679 Binary4RegisterDualOpTester_Case0_TestCase0) {
466 Binary4RegisterDualOpTester_Case0 baseline_tester; 680 Binary4RegisterDualOpTester_Case0 tester;
467 NamedDefs16To19CondsDontCareRdRaRmRnNotPc_Usada8_Rule_254_A1_P502 actual; 681 tester.Test("cccc01111000ddddaaaammmm0001nnnn");
468 ActualVsBaselineTester a_vs_b_tester(actual, baseline_tester);
469 a_vs_b_tester.Test("cccc01111000ddddaaaammmm0001nnnn");
470 } 682 }
471 683
472 // Neutral case: 684 // Neutral case:
473 // inst(24:20)=11000 & inst(7:5)=000 & inst(15:12)=1111 685 // inst(24:20)=11000 & inst(7:5)=000 & inst(15:12)=1111
474 // = {actual: 'Defs16To19CondsDontCareRdRmRnNotPc', 686 // = {actual: 'Binary3RegisterOpAltA',
475 // baseline: 'Binary3RegisterOpAltA', 687 // baseline: 'Binary3RegisterOpAltA',
476 // constraints: , 688 // constraints: ,
689 // defs: {inst(19:16)},
477 // pattern: 'cccc01111000dddd1111mmmm0001nnnn', 690 // pattern: 'cccc01111000dddd1111mmmm0001nnnn',
478 // rule: 'Usad8_Rule_253_A1_P500', 691 // rule: 'USAD8',
479 // safety: ["'RegsNotPc'"]} 692 // safety: ['15 == inst(19:16) || 15 == inst(3:0) || 15 == inst(11:8) => U NPREDICTABLE']}
480 // 693 //
481 // Representative case: 694 // Representaive case:
482 // op1(24:20)=11000 & op2(7:5)=000 & Rd(15:12)=1111 695 // op1(24:20)=11000 & op2(7:5)=000 & Rd(15:12)=1111
483 // = {actual: Defs16To19CondsDontCareRdRmRnNotPc, 696 // = {Pc: 15,
697 // Rd: Rd(19:16),
698 // Rm: Rm(11:8),
699 // Rn: Rn(3:0),
700 // actual: Binary3RegisterOpAltA,
484 // baseline: Binary3RegisterOpAltA, 701 // baseline: Binary3RegisterOpAltA,
485 // constraints: , 702 // constraints: ,
703 // defs: {Rd},
704 // fields: [Rd(19:16), Rm(11:8), Rn(3:0)],
486 // pattern: cccc01111000dddd1111mmmm0001nnnn, 705 // pattern: cccc01111000dddd1111mmmm0001nnnn,
487 // rule: Usad8_Rule_253_A1_P500, 706 // rule: USAD8,
488 // safety: ['RegsNotPc']} 707 // safety: [Pc in {Rd,Rn,Rm} => UNPREDICTABLE]}
489 TEST_F(Arm32DecoderStateTests, 708 TEST_F(Arm32DecoderStateTests,
490 Binary3RegisterOpAltATester_Case1_TestCase1) { 709 Binary3RegisterOpAltATester_Case1_TestCase1) {
491 Binary3RegisterOpAltATester_Case1 baseline_tester; 710 Binary3RegisterOpAltATester_Case1 tester;
492 NamedDefs16To19CondsDontCareRdRmRnNotPc_Usad8_Rule_253_A1_P500 actual; 711 tester.Test("cccc01111000dddd1111mmmm0001nnnn");
493 ActualVsBaselineTester a_vs_b_tester(actual, baseline_tester);
494 a_vs_b_tester.Test("cccc01111000dddd1111mmmm0001nnnn");
495 } 712 }
496 713
497 // Neutral case: 714 // Neutral case:
498 // inst(24:20)=11111 & inst(7:5)=111 715 // inst(24:20)=11111 & inst(7:5)=111
499 // = {actual: 'PermanentlyUndefined', 716 // = {actual: 'PermanentlyUndefined',
500 // baseline: 'PermanentlyUndefined', 717 // baseline: 'PermanentlyUndefined',
501 // constraints: , 718 // constraints: ,
502 // pattern: 'cccc01111111iiiiiiiiiiii1111iiii', 719 // pattern: 'cccc01111111iiiiiiiiiiii1111iiii',
503 // rule: 'Udf_Rule_A1'} 720 // rule: 'UDF'}
504 // 721 //
505 // Representaive case: 722 // Representaive case:
506 // op1(24:20)=11111 & op2(7:5)=111 723 // op1(24:20)=11111 & op2(7:5)=111
507 // = {actual: PermanentlyUndefined, 724 // = {actual: PermanentlyUndefined,
508 // baseline: PermanentlyUndefined, 725 // baseline: PermanentlyUndefined,
509 // constraints: , 726 // constraints: ,
510 // pattern: cccc01111111iiiiiiiiiiii1111iiii, 727 // pattern: cccc01111111iiiiiiiiiiii1111iiii,
511 // rule: Udf_Rule_A1} 728 // rule: UDF}
512 TEST_F(Arm32DecoderStateTests, 729 TEST_F(Arm32DecoderStateTests,
513 PermanentlyUndefinedTester_Case2_TestCase2) { 730 PermanentlyUndefinedTester_Case2_TestCase2) {
514 PermanentlyUndefinedTester_Case2 tester; 731 PermanentlyUndefinedTester_Case2 tester;
515 tester.Test("cccc01111111iiiiiiiiiiii1111iiii"); 732 tester.Test("cccc01111111iiiiiiiiiiii1111iiii");
516 } 733 }
517 734
518 // Neutral case: 735 // Neutral case:
519 // inst(24:20)=1101x & inst(7:5)=x10 736 // inst(24:20)=1101x & inst(7:5)=x10
520 // = {actual: 'Defs12To15CondsDontCareRdRnNotPcBitfieldExtract', 737 // = {actual: 'Binary2RegisterBitRangeNotRnIsPcBitfieldExtract',
521 // baseline: 'Binary2RegisterBitRangeNotRnIsPcBitfieldExtract', 738 // baseline: 'Binary2RegisterBitRangeNotRnIsPcBitfieldExtract',
522 // constraints: , 739 // constraints: ,
740 // defs: {inst(15:12)},
523 // pattern: 'cccc0111101wwwwwddddlllll101nnnn', 741 // pattern: 'cccc0111101wwwwwddddlllll101nnnn',
524 // rule: 'Sbfx_Rule_154_A1_P308', 742 // rule: 'SBFX',
525 // safety: ["'RegsNotPc'"]} 743 // safety: ['15 == inst(15:12) || 15 == inst(3:0) => UNPREDICTABLE', '31 < = inst(11:7) + inst(20:16) => UNPREDICTABLE']}
526 // 744 //
527 // Representative case: 745 // Representaive case:
528 // op1(24:20)=1101x & op2(7:5)=x10 746 // op1(24:20)=1101x & op2(7:5)=x10
529 // = {actual: Defs12To15CondsDontCareRdRnNotPcBitfieldExtract, 747 // = {Pc: 15,
748 // Rd: Rd(15:12),
749 // Rn: Rn(3:0),
750 // actual: Binary2RegisterBitRangeNotRnIsPcBitfieldExtract,
530 // baseline: Binary2RegisterBitRangeNotRnIsPcBitfieldExtract, 751 // baseline: Binary2RegisterBitRangeNotRnIsPcBitfieldExtract,
531 // constraints: , 752 // constraints: ,
753 // defs: {Rd},
754 // fields: [widthm1(20:16), Rd(15:12), lsb(11:7), Rn(3:0)],
755 // lsb: lsb(11:7),
532 // pattern: cccc0111101wwwwwddddlllll101nnnn, 756 // pattern: cccc0111101wwwwwddddlllll101nnnn,
533 // rule: Sbfx_Rule_154_A1_P308, 757 // rule: SBFX,
534 // safety: ['RegsNotPc']} 758 // safety: [Pc in {Rd,Rn} => UNPREDICTABLE, lsb + widthm1 > 31 => UNPREDIC TABLE],
759 // widthm1: widthm1(20:16)}
535 TEST_F(Arm32DecoderStateTests, 760 TEST_F(Arm32DecoderStateTests,
536 Binary2RegisterBitRangeNotRnIsPcBitfieldExtractTester_Case3_TestCase3) { 761 Binary2RegisterBitRangeNotRnIsPcBitfieldExtractTester_Case3_TestCase3) {
537 Binary2RegisterBitRangeNotRnIsPcBitfieldExtractTester_Case3 baseline_tester; 762 Binary2RegisterBitRangeNotRnIsPcBitfieldExtractTester_Case3 tester;
538 NamedDefs12To15CondsDontCareRdRnNotPcBitfieldExtract_Sbfx_Rule_154_A1_P308 act ual; 763 tester.Test("cccc0111101wwwwwddddlllll101nnnn");
539 ActualVsBaselineTester a_vs_b_tester(actual, baseline_tester);
540 a_vs_b_tester.Test("cccc0111101wwwwwddddlllll101nnnn");
541 } 764 }
542 765
543 // Neutral case: 766 // Neutral case:
544 // inst(24:20)=1110x & inst(7:5)=x00 & inst(3:0)=~1111 767 // inst(24:20)=1110x & inst(7:5)=x00 & inst(3:0)=~1111
545 // = {actual: 'Defs12To15CondsDontCareMsbGeLsb', 768 // = {actual: 'Binary2RegisterBitRangeMsbGeLsb',
546 // baseline: 'Binary2RegisterBitRangeMsbGeLsb', 769 // baseline: 'Binary2RegisterBitRangeMsbGeLsb',
547 // constraints: , 770 // constraints: ,
771 // defs: {inst(15:12)},
548 // pattern: 'cccc0111110mmmmmddddlllll001nnnn', 772 // pattern: 'cccc0111110mmmmmddddlllll001nnnn',
549 // rule: 'Bfi_Rule_18_A1_P48', 773 // rule: 'BFI',
550 // safety: ["'RegsNotPc'"]} 774 // safety: ['15 == inst(3:0) => DECODER_ERROR', '15 == inst(15:12) => UNPR EDICTABLE', 'inst(20:16) < inst(11:7) => UNPREDICTABLE']}
551 // 775 //
552 // Representative case: 776 // Representaive case:
553 // op1(24:20)=1110x & op2(7:5)=x00 & Rn(3:0)=~1111 777 // op1(24:20)=1110x & op2(7:5)=x00 & Rn(3:0)=~1111
554 // = {actual: Defs12To15CondsDontCareMsbGeLsb, 778 // = {Pc: 15,
779 // Rd: Rd(15:12),
780 // Rn: Rn(3:0),
781 // actual: Binary2RegisterBitRangeMsbGeLsb,
555 // baseline: Binary2RegisterBitRangeMsbGeLsb, 782 // baseline: Binary2RegisterBitRangeMsbGeLsb,
556 // constraints: , 783 // constraints: ,
784 // defs: {Rd},
785 // fields: [msb(20:16), Rd(15:12), lsb(11:7), Rn(3:0)],
786 // lsb: lsb(11:7),
787 // msb: msb(20:16),
557 // pattern: cccc0111110mmmmmddddlllll001nnnn, 788 // pattern: cccc0111110mmmmmddddlllll001nnnn,
558 // rule: Bfi_Rule_18_A1_P48, 789 // rule: BFI,
559 // safety: ['RegsNotPc']} 790 // safety: [Rn == Pc => DECODER_ERROR, Rd == Pc => UNPREDICTABLE, msb < ls b => UNPREDICTABLE]}
560 TEST_F(Arm32DecoderStateTests, 791 TEST_F(Arm32DecoderStateTests,
561 Binary2RegisterBitRangeMsbGeLsbTester_Case4_TestCase4) { 792 Binary2RegisterBitRangeMsbGeLsbTester_Case4_TestCase4) {
562 Binary2RegisterBitRangeMsbGeLsbTester_Case4 baseline_tester; 793 Binary2RegisterBitRangeMsbGeLsbTester_Case4 tester;
563 NamedDefs12To15CondsDontCareMsbGeLsb_Bfi_Rule_18_A1_P48 actual; 794 tester.Test("cccc0111110mmmmmddddlllll001nnnn");
564 ActualVsBaselineTester a_vs_b_tester(actual, baseline_tester);
565 a_vs_b_tester.Test("cccc0111110mmmmmddddlllll001nnnn");
566 } 795 }
567 796
568 // Neutral case: 797 // Neutral case:
569 // inst(24:20)=1110x & inst(7:5)=x00 & inst(3:0)=1111 798 // inst(24:20)=1110x & inst(7:5)=x00 & inst(3:0)=1111
570 // = {actual: 'Unary1RegisterBitRangeMsbGeLsb', 799 // = {actual: 'Unary1RegisterBitRangeMsbGeLsb',
571 // baseline: 'Unary1RegisterBitRangeMsbGeLsb', 800 // baseline: 'Unary1RegisterBitRangeMsbGeLsb',
572 // constraints: , 801 // constraints: ,
802 // defs: {inst(15:12)},
573 // pattern: 'cccc0111110mmmmmddddlllll0011111', 803 // pattern: 'cccc0111110mmmmmddddlllll0011111',
574 // rule: 'Bfc_17_A1_P46', 804 // rule: 'BFC',
575 // safety: ["'RegsNotPc'"]} 805 // safety: ['15 == inst(15:12) => UNPREDICTABLE', 'inst(20:16) < inst(11:7 ) => UNPREDICTABLE']}
576 // 806 //
577 // Representaive case: 807 // Representaive case:
578 // op1(24:20)=1110x & op2(7:5)=x00 & Rn(3:0)=1111 808 // op1(24:20)=1110x & op2(7:5)=x00 & Rn(3:0)=1111
579 // = {actual: Unary1RegisterBitRangeMsbGeLsb, 809 // = {Pc: 15,
810 // Rd: Rd(15:12),
811 // actual: Unary1RegisterBitRangeMsbGeLsb,
580 // baseline: Unary1RegisterBitRangeMsbGeLsb, 812 // baseline: Unary1RegisterBitRangeMsbGeLsb,
581 // constraints: , 813 // constraints: ,
814 // defs: {Rd},
815 // fields: [msb(20:16), Rd(15:12), lsb(11:7)],
816 // lsb: lsb(11:7),
817 // msb: msb(20:16),
582 // pattern: cccc0111110mmmmmddddlllll0011111, 818 // pattern: cccc0111110mmmmmddddlllll0011111,
583 // rule: Bfc_17_A1_P46, 819 // rule: BFC,
584 // safety: ['RegsNotPc']} 820 // safety: [Rd == Pc => UNPREDICTABLE, msb < lsb => UNPREDICTABLE]}
585 TEST_F(Arm32DecoderStateTests, 821 TEST_F(Arm32DecoderStateTests,
586 Unary1RegisterBitRangeMsbGeLsbTester_Case5_TestCase5) { 822 Unary1RegisterBitRangeMsbGeLsbTester_Case5_TestCase5) {
587 Unary1RegisterBitRangeMsbGeLsbTester_Case5 tester; 823 Unary1RegisterBitRangeMsbGeLsbTester_Case5 tester;
588 tester.Test("cccc0111110mmmmmddddlllll0011111"); 824 tester.Test("cccc0111110mmmmmddddlllll0011111");
589 } 825 }
590 826
591 // Neutral case: 827 // Neutral case:
592 // inst(24:20)=1111x & inst(7:5)=x10 828 // inst(24:20)=1111x & inst(7:5)=x10
593 // = {actual: 'Defs12To15CondsDontCareRdRnNotPcBitfieldExtract', 829 // = {actual: 'Binary2RegisterBitRangeNotRnIsPcBitfieldExtract',
594 // baseline: 'Binary2RegisterBitRangeNotRnIsPcBitfieldExtract', 830 // baseline: 'Binary2RegisterBitRangeNotRnIsPcBitfieldExtract',
595 // constraints: , 831 // constraints: ,
832 // defs: {inst(15:12)},
596 // pattern: 'cccc0111111mmmmmddddlllll101nnnn', 833 // pattern: 'cccc0111111mmmmmddddlllll101nnnn',
597 // rule: 'Ubfx_Rule_236_A1_P466', 834 // rule: 'UBFX',
598 // safety: ["'RegsNotPc'"]} 835 // safety: ['15 == inst(15:12) || 15 == inst(3:0) => UNPREDICTABLE', '31 < = inst(11:7) + inst(20:16) => UNPREDICTABLE']}
599 // 836 //
600 // Representative case: 837 // Representaive case:
601 // op1(24:20)=1111x & op2(7:5)=x10 838 // op1(24:20)=1111x & op2(7:5)=x10
602 // = {actual: Defs12To15CondsDontCareRdRnNotPcBitfieldExtract, 839 // = {Pc: 15,
840 // Rd: Rd(15:12),
841 // Rn: Rn(3:0),
842 // actual: Binary2RegisterBitRangeNotRnIsPcBitfieldExtract,
603 // baseline: Binary2RegisterBitRangeNotRnIsPcBitfieldExtract, 843 // baseline: Binary2RegisterBitRangeNotRnIsPcBitfieldExtract,
604 // constraints: , 844 // constraints: ,
845 // defs: {Rd},
846 // fields: [widthm1(20:16), Rd(15:12), lsb(11:7), Rn(3:0)],
847 // lsb: lsb(11:7),
605 // pattern: cccc0111111mmmmmddddlllll101nnnn, 848 // pattern: cccc0111111mmmmmddddlllll101nnnn,
606 // rule: Ubfx_Rule_236_A1_P466, 849 // rule: UBFX,
607 // safety: ['RegsNotPc']} 850 // safety: [Pc in {Rd,Rn} => UNPREDICTABLE, lsb + widthm1 > 31 => UNPREDIC TABLE],
851 // widthm1: widthm1(20:16)}
608 TEST_F(Arm32DecoderStateTests, 852 TEST_F(Arm32DecoderStateTests,
609 Binary2RegisterBitRangeNotRnIsPcBitfieldExtractTester_Case6_TestCase6) { 853 Binary2RegisterBitRangeNotRnIsPcBitfieldExtractTester_Case6_TestCase6) {
610 Binary2RegisterBitRangeNotRnIsPcBitfieldExtractTester_Case6 baseline_tester; 854 Binary2RegisterBitRangeNotRnIsPcBitfieldExtractTester_Case6 tester;
611 NamedDefs12To15CondsDontCareRdRnNotPcBitfieldExtract_Ubfx_Rule_236_A1_P466 act ual; 855 tester.Test("cccc0111111mmmmmddddlllll101nnnn");
612 ActualVsBaselineTester a_vs_b_tester(actual, baseline_tester);
613 a_vs_b_tester.Test("cccc0111111mmmmmddddlllll101nnnn");
614 } 856 }
615 857
616 } // namespace nacl_arm_test 858 } // namespace nacl_arm_test
617 859
618 int main(int argc, char* argv[]) { 860 int main(int argc, char* argv[]) {
619 testing::InitGoogleTest(&argc, argv); 861 testing::InitGoogleTest(&argc, argv);
620 return RUN_ALL_TESTS(); 862 return RUN_ALL_TESTS();
621 } 863 }
OLDNEW
« no previous file with comments | « src/trusted/validator_arm/gen/arm32_decode.cc ('k') | src/trusted/validator_arm/gen/arm32_decode_named.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698