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

Side by Side Diff: src/trusted/validator_arm/gen/arm32_decode_tests.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 #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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 62
63 class Binary3RegisterImmedShiftedOpTester_Adc_Rule_2_A1_P16_NotRdIsPcAndS 63 class Binary3RegisterImmedShiftedOpTester_Adc_Rule_2_A1_P16_NotRdIsPcAndS
64 : public Binary3RegisterImmedShiftedOpTesterNotRdIsPcAndS { 64 : public Binary3RegisterImmedShiftedOpTesterNotRdIsPcAndS {
65 public: 65 public:
66 Binary3RegisterImmedShiftedOpTester_Adc_Rule_2_A1_P16_NotRdIsPcAndS() 66 Binary3RegisterImmedShiftedOpTester_Adc_Rule_2_A1_P16_NotRdIsPcAndS()
67 : Binary3RegisterImmedShiftedOpTesterNotRdIsPcAndS( 67 : Binary3RegisterImmedShiftedOpTesterNotRdIsPcAndS(
68 state_.Binary3RegisterImmedShiftedOp_Adc_Rule_2_A1_P16_instance_) 68 state_.Binary3RegisterImmedShiftedOp_Adc_Rule_2_A1_P16_instance_)
69 {} 69 {}
70 }; 70 };
71 71
72 class Binary3RegisterImmedShiftedOpTester_Add_Rule_6_A1_P24_NotRdIsPcAndSOrRnIsS p
73 : public Binary3RegisterImmedShiftedOpTesterNotRdIsPcAndSOrRnIsSp {
74 public:
75 Binary3RegisterImmedShiftedOpTester_Add_Rule_6_A1_P24_NotRdIsPcAndSOrRnIsSp()
76 : Binary3RegisterImmedShiftedOpTesterNotRdIsPcAndSOrRnIsSp(
77 state_.Binary3RegisterImmedShiftedOp_Add_Rule_6_A1_P24_instance_)
78 {}
79 };
80
81 class Binary3RegisterImmedShiftedOpTester_And_Rule_7_A1_P36_NotRdIsPcAndS 72 class Binary3RegisterImmedShiftedOpTester_And_Rule_7_A1_P36_NotRdIsPcAndS
82 : public Binary3RegisterImmedShiftedOpTesterNotRdIsPcAndS { 73 : public Binary3RegisterImmedShiftedOpTesterNotRdIsPcAndS {
83 public: 74 public:
84 Binary3RegisterImmedShiftedOpTester_And_Rule_7_A1_P36_NotRdIsPcAndS() 75 Binary3RegisterImmedShiftedOpTester_And_Rule_7_A1_P36_NotRdIsPcAndS()
85 : Binary3RegisterImmedShiftedOpTesterNotRdIsPcAndS( 76 : Binary3RegisterImmedShiftedOpTesterNotRdIsPcAndS(
86 state_.Binary3RegisterImmedShiftedOp_And_Rule_7_A1_P36_instance_) 77 state_.Binary3RegisterImmedShiftedOp_And_Rule_7_A1_P36_instance_)
87 {} 78 {}
88 }; 79 };
89 80
90 class Binary3RegisterImmedShiftedOpTester_Bic_Rule_20_A1_P52_NotRdIsPcAndS 81 class Binary3RegisterImmedShiftedOpTester_Bic_Rule_20_A1_P52_NotRdIsPcAndS
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 125
135 class Binary3RegisterImmedShiftedOpTester_Sbc_Rule_152_A1_P304_NotRdIsPcAndS 126 class Binary3RegisterImmedShiftedOpTester_Sbc_Rule_152_A1_P304_NotRdIsPcAndS
136 : public Binary3RegisterImmedShiftedOpTesterNotRdIsPcAndS { 127 : public Binary3RegisterImmedShiftedOpTesterNotRdIsPcAndS {
137 public: 128 public:
138 Binary3RegisterImmedShiftedOpTester_Sbc_Rule_152_A1_P304_NotRdIsPcAndS() 129 Binary3RegisterImmedShiftedOpTester_Sbc_Rule_152_A1_P304_NotRdIsPcAndS()
139 : Binary3RegisterImmedShiftedOpTesterNotRdIsPcAndS( 130 : Binary3RegisterImmedShiftedOpTesterNotRdIsPcAndS(
140 state_.Binary3RegisterImmedShiftedOp_Sbc_Rule_152_A1_P304_instance_) 131 state_.Binary3RegisterImmedShiftedOp_Sbc_Rule_152_A1_P304_instance_)
141 {} 132 {}
142 }; 133 };
143 134
144 class Binary3RegisterImmedShiftedOpTester_SubRule_213_A1_P422_NotRdIsPcAndSOrRnI sSp 135 class Binary3RegisterImmedShiftedOpRnNotSpTester_Add_Rule_6_A1_P24_NotRdIsPcAndS OrRnIsSp
145 : public Binary3RegisterImmedShiftedOpTesterNotRdIsPcAndSOrRnIsSp { 136 : public Binary3RegisterImmedShiftedOpTesterNotRdIsPcAndSOrRnIsSp {
146 public: 137 public:
147 Binary3RegisterImmedShiftedOpTester_SubRule_213_A1_P422_NotRdIsPcAndSOrRnIsSp( ) 138 Binary3RegisterImmedShiftedOpRnNotSpTester_Add_Rule_6_A1_P24_NotRdIsPcAndSOrRn IsSp()
148 : Binary3RegisterImmedShiftedOpTesterNotRdIsPcAndSOrRnIsSp( 139 : Binary3RegisterImmedShiftedOpTesterNotRdIsPcAndSOrRnIsSp(
149 state_.Binary3RegisterImmedShiftedOp_SubRule_213_A1_P422_instance_) 140 state_.Binary3RegisterImmedShiftedOpRnNotSp_Add_Rule_6_A1_P24_instance_)
141 {}
142 };
143
144 class Binary3RegisterImmedShiftedOpRnNotSpTester_SubRule_213_A1_P422_NotRdIsPcAn dSOrRnIsSp
145 : public Binary3RegisterImmedShiftedOpTesterNotRdIsPcAndSOrRnIsSp {
146 public:
147 Binary3RegisterImmedShiftedOpRnNotSpTester_SubRule_213_A1_P422_NotRdIsPcAndSOr RnIsSp()
148 : Binary3RegisterImmedShiftedOpTesterNotRdIsPcAndSOrRnIsSp(
149 state_.Binary3RegisterImmedShiftedOpRnNotSp_SubRule_213_A1_P422_instance_)
150 {} 150 {}
151 }; 151 };
152 152
153 class Binary3RegisterOpTester_Asr_Rule_15_A1_P42_RegsNotPc 153 class Binary3RegisterOpTester_Asr_Rule_15_A1_P42_RegsNotPc
154 : public Binary3RegisterOpTesterRegsNotPc { 154 : public Binary3RegisterOpTesterRegsNotPc {
155 public: 155 public:
156 Binary3RegisterOpTester_Asr_Rule_15_A1_P42_RegsNotPc() 156 Binary3RegisterOpTester_Asr_Rule_15_A1_P42_RegsNotPc()
157 : Binary3RegisterOpTesterRegsNotPc( 157 : Binary3RegisterOpTesterRegsNotPc(
158 state_.Binary3RegisterOp_Asr_Rule_15_A1_P42_instance_) 158 state_.Binary3RegisterOp_Asr_Rule_15_A1_P42_instance_)
159 {} 159 {}
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 305
306 class Binary4RegisterShiftedOpTester_Sub_Rule_214_A1_P424_RegsNotPc 306 class Binary4RegisterShiftedOpTester_Sub_Rule_214_A1_P424_RegsNotPc
307 : public Binary4RegisterShiftedOpTesterRegsNotPc { 307 : public Binary4RegisterShiftedOpTesterRegsNotPc {
308 public: 308 public:
309 Binary4RegisterShiftedOpTester_Sub_Rule_214_A1_P424_RegsNotPc() 309 Binary4RegisterShiftedOpTester_Sub_Rule_214_A1_P424_RegsNotPc()
310 : Binary4RegisterShiftedOpTesterRegsNotPc( 310 : Binary4RegisterShiftedOpTesterRegsNotPc(
311 state_.Binary4RegisterShiftedOp_Sub_Rule_214_A1_P424_instance_) 311 state_.Binary4RegisterShiftedOp_Sub_Rule_214_A1_P424_instance_)
312 {} 312 {}
313 }; 313 };
314 314
315 class MaskedBinary2RegisterImmediateOpTester_Bic_Rule_19_A1_P50_RdCanBePcAndNotR dIsPcAndS 315 class MaskedBinary2RegisterImmediateOpTester_Bic_Rule_19_A1_P50_NotRdIsPcAndS
316 : public Binary2RegisterImmediateOpTesterRdCanBePcAndNotRdIsPcAndS { 316 : public Binary2RegisterImmediateOpTesterNotRdIsPcAndS {
317 public: 317 public:
318 MaskedBinary2RegisterImmediateOpTester_Bic_Rule_19_A1_P50_RdCanBePcAndNotRdIsP cAndS() 318 MaskedBinary2RegisterImmediateOpTester_Bic_Rule_19_A1_P50_NotRdIsPcAndS()
319 : Binary2RegisterImmediateOpTesterRdCanBePcAndNotRdIsPcAndS( 319 : Binary2RegisterImmediateOpTesterNotRdIsPcAndS(
320 state_.MaskedBinary2RegisterImmediateOp_Bic_Rule_19_A1_P50_instance_) 320 state_.MaskedBinary2RegisterImmediateOp_Bic_Rule_19_A1_P50_instance_)
321 {} 321 {}
322 }; 322 };
323 323
324 class MaskedBinaryRegisterImmediateTestTester_Tst_Rule_230_A1_P454_ 324 class MaskedBinaryRegisterImmediateTestTester_Tst_Rule_230_A1_P454_
325 : public BinaryRegisterImmediateTestTester { 325 : public BinaryRegisterImmediateTestTester {
326 public: 326 public:
327 MaskedBinaryRegisterImmediateTestTester_Tst_Rule_230_A1_P454_() 327 MaskedBinaryRegisterImmediateTestTester_Tst_Rule_230_A1_P454_()
328 : BinaryRegisterImmediateTestTester( 328 : BinaryRegisterImmediateTestTester(
329 state_.MaskedBinaryRegisterImmediateTest_Tst_Rule_230_A1_P454_instance_) 329 state_.MaskedBinaryRegisterImmediateTest_Tst_Rule_230_A1_P454_instance_)
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 tester.Test("cccc00010001nnnn0000iiiiitt0mmmm"); 443 tester.Test("cccc00010001nnnn0000iiiiitt0mmmm");
444 } 444 }
445 445
446 TEST_F(Arm32DecoderStateTests, 446 TEST_F(Arm32DecoderStateTests,
447 Binary3RegisterImmedShiftedOpTester_Adc_Rule_2_A1_P16_NotRdIsPcAndS_cccc0 000101unnnnddddiiiiitt0mmmm_Test) { 447 Binary3RegisterImmedShiftedOpTester_Adc_Rule_2_A1_P16_NotRdIsPcAndS_cccc0 000101unnnnddddiiiiitt0mmmm_Test) {
448 Binary3RegisterImmedShiftedOpTester_Adc_Rule_2_A1_P16_NotRdIsPcAndS tester; 448 Binary3RegisterImmedShiftedOpTester_Adc_Rule_2_A1_P16_NotRdIsPcAndS tester;
449 tester.Test("cccc0000101unnnnddddiiiiitt0mmmm"); 449 tester.Test("cccc0000101unnnnddddiiiiitt0mmmm");
450 } 450 }
451 451
452 TEST_F(Arm32DecoderStateTests, 452 TEST_F(Arm32DecoderStateTests,
453 Binary3RegisterImmedShiftedOpTester_Add_Rule_6_A1_P24_NotRdIsPcAndSOrRnIs Sp_cccc0000100unnnnddddiiiiitt0mmmm_Test) {
454 Binary3RegisterImmedShiftedOpTester_Add_Rule_6_A1_P24_NotRdIsPcAndSOrRnIsSp te ster;
455 tester.Test("cccc0000100unnnnddddiiiiitt0mmmm");
456 }
457
458 TEST_F(Arm32DecoderStateTests,
459 Binary3RegisterImmedShiftedOpTester_And_Rule_7_A1_P36_NotRdIsPcAndS_cccc0 000000unnnnddddiiiiitt0mmmm_Test) { 453 Binary3RegisterImmedShiftedOpTester_And_Rule_7_A1_P36_NotRdIsPcAndS_cccc0 000000unnnnddddiiiiitt0mmmm_Test) {
460 Binary3RegisterImmedShiftedOpTester_And_Rule_7_A1_P36_NotRdIsPcAndS tester; 454 Binary3RegisterImmedShiftedOpTester_And_Rule_7_A1_P36_NotRdIsPcAndS tester;
461 tester.Test("cccc0000000unnnnddddiiiiitt0mmmm"); 455 tester.Test("cccc0000000unnnnddddiiiiitt0mmmm");
462 } 456 }
463 457
464 TEST_F(Arm32DecoderStateTests, 458 TEST_F(Arm32DecoderStateTests,
465 Binary3RegisterImmedShiftedOpTester_Bic_Rule_20_A1_P52_NotRdIsPcAndS_cccc 0001110unnnnddddiiiiitt0mmmm_Test) { 459 Binary3RegisterImmedShiftedOpTester_Bic_Rule_20_A1_P52_NotRdIsPcAndS_cccc 0001110unnnnddddiiiiitt0mmmm_Test) {
466 Binary3RegisterImmedShiftedOpTester_Bic_Rule_20_A1_P52_NotRdIsPcAndS tester; 460 Binary3RegisterImmedShiftedOpTester_Bic_Rule_20_A1_P52_NotRdIsPcAndS tester;
467 tester.Test("cccc0001110unnnnddddiiiiitt0mmmm"); 461 tester.Test("cccc0001110unnnnddddiiiiitt0mmmm");
468 } 462 }
(...skipping 22 matching lines...) Expand all
491 tester.Test("cccc0000111unnnnddddiiiiitt0mmmm"); 485 tester.Test("cccc0000111unnnnddddiiiiitt0mmmm");
492 } 486 }
493 487
494 TEST_F(Arm32DecoderStateTests, 488 TEST_F(Arm32DecoderStateTests,
495 Binary3RegisterImmedShiftedOpTester_Sbc_Rule_152_A1_P304_NotRdIsPcAndS_cc cc0000110unnnnddddiiiiitt0mmmm_Test) { 489 Binary3RegisterImmedShiftedOpTester_Sbc_Rule_152_A1_P304_NotRdIsPcAndS_cc cc0000110unnnnddddiiiiitt0mmmm_Test) {
496 Binary3RegisterImmedShiftedOpTester_Sbc_Rule_152_A1_P304_NotRdIsPcAndS tester; 490 Binary3RegisterImmedShiftedOpTester_Sbc_Rule_152_A1_P304_NotRdIsPcAndS tester;
497 tester.Test("cccc0000110unnnnddddiiiiitt0mmmm"); 491 tester.Test("cccc0000110unnnnddddiiiiitt0mmmm");
498 } 492 }
499 493
500 TEST_F(Arm32DecoderStateTests, 494 TEST_F(Arm32DecoderStateTests,
501 Binary3RegisterImmedShiftedOpTester_SubRule_213_A1_P422_NotRdIsPcAndSOrRn IsSp_cccc0000010unnnnddddiiiiitt0mmmm_Test) { 495 Binary3RegisterImmedShiftedOpRnNotSpTester_Add_Rule_6_A1_P24_NotRdIsPcAnd SOrRnIsSp_cccc0000100unnnnddddiiiiitt0mmmm_Test) {
502 Binary3RegisterImmedShiftedOpTester_SubRule_213_A1_P422_NotRdIsPcAndSOrRnIsSp tester; 496 Binary3RegisterImmedShiftedOpRnNotSpTester_Add_Rule_6_A1_P24_NotRdIsPcAndSOrRn IsSp tester;
497 tester.Test("cccc0000100unnnnddddiiiiitt0mmmm");
498 }
499
500 TEST_F(Arm32DecoderStateTests,
501 Binary3RegisterImmedShiftedOpRnNotSpTester_SubRule_213_A1_P422_NotRdIsPcA ndSOrRnIsSp_cccc0000010unnnnddddiiiiitt0mmmm_Test) {
502 Binary3RegisterImmedShiftedOpRnNotSpTester_SubRule_213_A1_P422_NotRdIsPcAndSOr RnIsSp tester;
503 tester.Test("cccc0000010unnnnddddiiiiitt0mmmm"); 503 tester.Test("cccc0000010unnnnddddiiiiitt0mmmm");
504 } 504 }
505 505
506 TEST_F(Arm32DecoderStateTests, 506 TEST_F(Arm32DecoderStateTests,
507 Binary3RegisterOpTester_Asr_Rule_15_A1_P42_RegsNotPc_cccc0001101u0000dddd mmmm0101nnnn_Test) { 507 Binary3RegisterOpTester_Asr_Rule_15_A1_P42_RegsNotPc_cccc0001101u0000dddd mmmm0101nnnn_Test) {
508 Binary3RegisterOpTester_Asr_Rule_15_A1_P42_RegsNotPc tester; 508 Binary3RegisterOpTester_Asr_Rule_15_A1_P42_RegsNotPc tester;
509 tester.Test("cccc0001101u0000ddddmmmm0101nnnn"); 509 tester.Test("cccc0001101u0000ddddmmmm0101nnnn");
510 } 510 }
511 511
512 TEST_F(Arm32DecoderStateTests, 512 TEST_F(Arm32DecoderStateTests,
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
609 609
610 TEST_F(Arm32DecoderStateTests, 610 TEST_F(Arm32DecoderStateTests,
611 Binary4RegisterShiftedOpTester_Rsb_Rule_144_A1_P288_RegsNotPc_cccc0000011 snnnnddddssss0tt1mmmm_Test) { 611 Binary4RegisterShiftedOpTester_Rsb_Rule_144_A1_P288_RegsNotPc_cccc0000011 snnnnddddssss0tt1mmmm_Test) {
612 Binary4RegisterShiftedOpTester_Rsb_Rule_144_A1_P288_RegsNotPc baseline_tester; 612 Binary4RegisterShiftedOpTester_Rsb_Rule_144_A1_P288_RegsNotPc baseline_tester;
613 NamedDefs12To15RdRnRsRmNotPc_Rsb_Rule_144_A1_P288 actual; 613 NamedDefs12To15RdRnRsRmNotPc_Rsb_Rule_144_A1_P288 actual;
614 ActualVsBaselineTester a_vs_b_tester(actual, baseline_tester); 614 ActualVsBaselineTester a_vs_b_tester(actual, baseline_tester);
615 a_vs_b_tester.Test("cccc0000011snnnnddddssss0tt1mmmm"); 615 a_vs_b_tester.Test("cccc0000011snnnnddddssss0tt1mmmm");
616 } 616 }
617 617
618 TEST_F(Arm32DecoderStateTests, 618 TEST_F(Arm32DecoderStateTests,
619 MaskedBinary2RegisterImmediateOpTester_Bic_Rule_19_A1_P50_RdCanBePcAndNot RdIsPcAndS_cccc0011110unnnnddddiiiiiiiiiiii_Test) { 619 MaskedBinary2RegisterImmediateOpTester_Bic_Rule_19_A1_P50_NotRdIsPcAndS_c ccc0011110unnnnddddiiiiiiiiiiii_Test) {
620 MaskedBinary2RegisterImmediateOpTester_Bic_Rule_19_A1_P50_RdCanBePcAndNotRdIsP cAndS baseline_tester; 620 MaskedBinary2RegisterImmediateOpTester_Bic_Rule_19_A1_P50_NotRdIsPcAndS baseli ne_tester;
621 NamedImmediateBic_Bic_Rule_19_A1_P50 actual; 621 NamedImmediateBic_Bic_Rule_19_A1_P50 actual;
622 ActualVsBaselineTester a_vs_b_tester(actual, baseline_tester); 622 ActualVsBaselineTester a_vs_b_tester(actual, baseline_tester);
623 a_vs_b_tester.Test("cccc0011110unnnnddddiiiiiiiiiiii"); 623 a_vs_b_tester.Test("cccc0011110unnnnddddiiiiiiiiiiii");
624 } 624 }
625 625
626 TEST_F(Arm32DecoderStateTests, 626 TEST_F(Arm32DecoderStateTests,
627 MaskedBinaryRegisterImmediateTestTester_Tst_Rule_230_A1_P454__cccc0011000 1nnnn0000iiiiiiiiiiii_Test) { 627 MaskedBinaryRegisterImmediateTestTester_Tst_Rule_230_A1_P454__cccc0011000 1nnnn0000iiiiiiiiiiii_Test) {
628 MaskedBinaryRegisterImmediateTestTester_Tst_Rule_230_A1_P454_ baseline_tester; 628 MaskedBinaryRegisterImmediateTestTester_Tst_Rule_230_A1_P454_ baseline_tester;
629 NamedTestImmediate_Tst_Rule_230_A1_P454 actual; 629 NamedTestImmediate_Tst_Rule_230_A1_P454 actual;
630 ActualVsBaselineTester a_vs_b_tester(actual, baseline_tester); 630 ActualVsBaselineTester a_vs_b_tester(actual, baseline_tester);
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
684 Unary3RegisterShiftedOpTester_Mvn_Rule_108_A1_P218_RegsNotPc tester; 684 Unary3RegisterShiftedOpTester_Mvn_Rule_108_A1_P218_RegsNotPc tester;
685 tester.Test("cccc0001111u0000ddddssss0tt1mmmm"); 685 tester.Test("cccc0001111u0000ddddssss0tt1mmmm");
686 } 686 }
687 687
688 } // namespace nacl_arm_test 688 } // namespace nacl_arm_test
689 689
690 int main(int argc, char* argv[]) { 690 int main(int argc, char* argv[]) {
691 testing::InitGoogleTest(&argc, argv); 691 testing::InitGoogleTest(&argc, argv);
692 return RUN_ALL_TESTS(); 692 return RUN_ALL_TESTS();
693 } 693 }
OLDNEW
« no previous file with comments | « src/trusted/validator_arm/gen/arm32_decode_named_decoder.h ('k') | src/trusted/validator_arm/inst_classes_testers.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698