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

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

Issue 10381030: Clean up testing of instructions. Allow testing to quit if test pattern tests (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client/
Patch Set: Created 8 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 | 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 9
10 #include "native_client/src/trusted/validator_arm/gen/arm32_decode.h" 10 #include "native_client/src/trusted/validator_arm/gen/arm32_decode.h"
11 11
12 #include <stdio.h> 12 #include <stdio.h>
13 13
14 namespace nacl_arm_dec { 14 namespace nacl_arm_dec {
15 15
16 16
17 Arm32DecoderState::Arm32DecoderState() : DecoderState() 17 Arm32DecoderState::Arm32DecoderState() : DecoderState()
18 , Binary2RegisterImmedShiftedTest_instance_() 18 , Binary2RegisterImmedShiftedTest_instance_()
19 , Binary3RegisterImmedShiftedOp_instance_() 19 , Binary3RegisterImmedShiftedOp_instance_()
20 , Binary3RegisterImmedShiftedOpRnNotSp_instance_()
20 , Binary3RegisterOp_instance_() 21 , Binary3RegisterOp_instance_()
21 , Binary3RegisterShiftedTest_instance_() 22 , Binary3RegisterShiftedTest_instance_()
22 , Binary4RegisterShiftedOp_instance_() 23 , Binary4RegisterShiftedOp_instance_()
23 , Branch_instance_() 24 , Branch_instance_()
24 , Breakpoint_instance_() 25 , Breakpoint_instance_()
25 , BxBlx_instance_() 26 , BxBlx_instance_()
26 , CoprocessorOp_instance_() 27 , CoprocessorOp_instance_()
27 , DataProc_instance_() 28 , DataProc_instance_()
28 , Defs12To15RdRnRsRmNotPc_instance_() 29 , Defs12To15RdRnRsRmNotPc_instance_()
29 , Deprecated_instance_() 30 , Deprecated_instance_()
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 insn.bits(31, 0)); 244 insn.bits(31, 0));
244 return Forbidden_instance_; 245 return Forbidden_instance_;
245 } 246 }
246 247
247 // Implementation of table: dp_reg. 248 // Implementation of table: dp_reg.
248 // Specified by: See Section A5.2.1 249 // Specified by: See Section A5.2.1
249 const ClassDecoder& Arm32DecoderState::decode_dp_reg( 250 const ClassDecoder& Arm32DecoderState::decode_dp_reg(
250 const Instruction insn) const 251 const Instruction insn) const
251 { 252 {
252 UNREFERENCED_PARAMETER(insn); 253 UNREFERENCED_PARAMETER(insn);
254 if (((insn & 0x01E00000) == 0x00400000) && (true) && (true))
255
256 return Binary3RegisterImmedShiftedOpRnNotSp_instance_;
257
258 if (((insn & 0x01E00000) == 0x00800000) && (true) && (true))
259
260 return Binary3RegisterImmedShiftedOpRnNotSp_instance_;
261
262 if (((insn & 0x01E00000) == 0x00A00000) && (true) && (true))
263
264 return Binary3RegisterImmedShiftedOp_instance_;
265
266 if (((insn & 0x01E00000) == 0x01800000) && (true) && (true))
267
268 return Binary3RegisterImmedShiftedOp_instance_;
269
253 if (((insn & 0x01E00000) == 0x01A00000) && ((insn & 0x00000F80) != 0x00000000) && ((insn & 0x00000060) == 0x00000000)) 270 if (((insn & 0x01E00000) == 0x01A00000) && ((insn & 0x00000F80) != 0x00000000) && ((insn & 0x00000060) == 0x00000000))
254 271
255 return Unary2RegisterImmedShiftedOp_instance_; 272 return Unary2RegisterImmedShiftedOp_instance_;
256 273
257 if (((insn & 0x01E00000) == 0x01A00000) && ((insn & 0x00000F80) != 0x00000000) && ((insn & 0x00000060) == 0x00000060)) 274 if (((insn & 0x01E00000) == 0x01A00000) && ((insn & 0x00000F80) != 0x00000000) && ((insn & 0x00000060) == 0x00000060))
258 275
259 return Unary2RegisterImmedShiftedOp_instance_; 276 return Unary2RegisterImmedShiftedOp_instance_;
260 277
261 if (((insn & 0x01E00000) == 0x01A00000) && ((insn & 0x00000F80) == 0x00000000) && ((insn & 0x00000060) == 0x00000000)) 278 if (((insn & 0x01E00000) == 0x01A00000) && ((insn & 0x00000F80) == 0x00000000) && ((insn & 0x00000060) == 0x00000000))
262 279
263 return Unary2RegisterOp_instance_; 280 return Unary2RegisterOp_instance_;
264 281
265 if (((insn & 0x01E00000) == 0x01A00000) && ((insn & 0x00000F80) == 0x00000000) && ((insn & 0x00000060) == 0x00000060)) 282 if (((insn & 0x01E00000) == 0x01A00000) && ((insn & 0x00000F80) == 0x00000000) && ((insn & 0x00000060) == 0x00000060))
266 283
267 return Unary2RegisterOp_instance_; 284 return Unary2RegisterOp_instance_;
268 285
269 if (((insn & 0x01E00000) == 0x01A00000) && (true) && ((insn & 0x00000060) == 0 x00000020)) 286 if (((insn & 0x01E00000) == 0x01A00000) && (true) && ((insn & 0x00000060) == 0 x00000020))
270 287
271 return Unary2RegisterImmedShiftedOp_instance_; 288 return Unary2RegisterImmedShiftedOp_instance_;
272 289
273 if (((insn & 0x01E00000) == 0x01A00000) && (true) && ((insn & 0x00000060) == 0 x00000040)) 290 if (((insn & 0x01E00000) == 0x01A00000) && (true) && ((insn & 0x00000060) == 0 x00000040))
274 291
275 return Unary2RegisterImmedShiftedOp_instance_; 292 return Unary2RegisterImmedShiftedOp_instance_;
276 293
277 if (((insn & 0x01E00000) == 0x01E00000) && (true) && (true)) 294 if (((insn & 0x01E00000) == 0x01E00000) && (true) && (true))
278 295
279 return Unary2RegisterImmedShiftedOp_instance_; 296 return Unary2RegisterImmedShiftedOp_instance_;
280 297
298 if (((insn & 0x00E00000) == 0x00C00000) && (true) && (true))
299
300 return Binary3RegisterImmedShiftedOp_instance_;
301
302 if (((insn & 0x01600000) == 0x00600000) && (true) && (true))
303
304 return Binary3RegisterImmedShiftedOp_instance_;
305
281 if (((insn & 0x01900000) == 0x01100000) && (true) && (true)) 306 if (((insn & 0x01900000) == 0x01100000) && (true) && (true))
282 307
283 return Binary2RegisterImmedShiftedTest_instance_; 308 return Binary2RegisterImmedShiftedTest_instance_;
284 309
285 if (((insn & 0x01A00000) == 0x01800000) && (true) && (true)) 310 if (((insn & 0x01C00000) == 0x00000000) && (true) && (true))
286
287 return Binary3RegisterImmedShiftedOp_instance_;
288
289 if (((insn & 0x01000000) == 0x00000000) && (true) && (true))
290 311
291 return Binary3RegisterImmedShiftedOp_instance_; 312 return Binary3RegisterImmedShiftedOp_instance_;
292 313
293 // Catch any attempt to fall though ... 314 // Catch any attempt to fall though ...
294 fprintf(stderr, "TABLE IS INCOMPLETE: dp_reg could not parse %08X", 315 fprintf(stderr, "TABLE IS INCOMPLETE: dp_reg could not parse %08X",
295 insn.bits(31, 0)); 316 insn.bits(31, 0));
296 return Forbidden_instance_; 317 return Forbidden_instance_;
297 } 318 }
298 319
299 // Implementation of table: dp_reg_shifted. 320 // Implementation of table: dp_reg_shifted.
(...skipping 1230 matching lines...) Expand 10 before | Expand all | Expand 10 after
1530 fprintf(stderr, "TABLE IS INCOMPLETE: unconditional could not parse %08X", 1551 fprintf(stderr, "TABLE IS INCOMPLETE: unconditional could not parse %08X",
1531 insn.bits(31, 0)); 1552 insn.bits(31, 0));
1532 return Forbidden_instance_; 1553 return Forbidden_instance_;
1533 } 1554 }
1534 1555
1535 const ClassDecoder& Arm32DecoderState::decode(const Instruction insn) const { 1556 const ClassDecoder& Arm32DecoderState::decode(const Instruction insn) const {
1536 return decode_ARMv7(insn); 1557 return decode_ARMv7(insn);
1537 } 1558 }
1538 1559
1539 } // namespace nacl_arm_dec 1560 } // namespace nacl_arm_dec
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698