OLD | NEW |
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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 if ((inst.Bits() & 0x000000E0) != 0x00000000 /* op2(7:5)=~000 */) return false
; | 93 if ((inst.Bits() & 0x000000E0) != 0x00000000 /* op2(7:5)=~000 */) return false
; |
94 if ((inst.Bits() & 0x0000F000) != 0x0000F000 /* Rd(15:12)=~1111 */) return fal
se; | 94 if ((inst.Bits() & 0x0000F000) != 0x0000F000 /* Rd(15:12)=~1111 */) return fal
se; |
95 | 95 |
96 // Check other preconditions defined for the base decoder. | 96 // Check other preconditions defined for the base decoder. |
97 return Binary3RegisterOpAltATesterRegsNotPc:: | 97 return Binary3RegisterOpAltATesterRegsNotPc:: |
98 PassesParsePreconditions(inst, decoder); | 98 PassesParsePreconditions(inst, decoder); |
99 } | 99 } |
100 | 100 |
101 // Neutral case: | 101 // Neutral case: |
102 // inst(24:20)=11111 & inst(7:5)=111 | 102 // inst(24:20)=11111 & inst(7:5)=111 |
103 // = {baseline: 'Roadblock', | 103 // = {baseline: 'PermanentlyUndefined', |
104 // constraints: } | 104 // constraints: } |
105 // | 105 // |
106 // Representaive case: | 106 // Representaive case: |
107 // op1(24:20)=11111 & op2(7:5)=111 | 107 // op1(24:20)=11111 & op2(7:5)=111 |
108 // = {baseline: Roadblock, | 108 // = {baseline: PermanentlyUndefined, |
109 // constraints: } | 109 // constraints: } |
110 class RoadblockTesterCase2 | 110 class PermanentlyUndefinedTesterCase2 |
111 : public RoadblockTester { | 111 : public PermanentlyUndefinedTester { |
112 public: | 112 public: |
113 RoadblockTesterCase2(const NamedClassDecoder& decoder) | 113 PermanentlyUndefinedTesterCase2(const NamedClassDecoder& decoder) |
114 : RoadblockTester(decoder) {} | 114 : PermanentlyUndefinedTester(decoder) {} |
115 virtual bool PassesParsePreconditions( | 115 virtual bool PassesParsePreconditions( |
116 nacl_arm_dec::Instruction inst, | 116 nacl_arm_dec::Instruction inst, |
117 const NamedClassDecoder& decoder); | 117 const NamedClassDecoder& decoder); |
118 }; | 118 }; |
119 | 119 |
120 bool RoadblockTesterCase2 | 120 bool PermanentlyUndefinedTesterCase2 |
121 ::PassesParsePreconditions( | 121 ::PassesParsePreconditions( |
122 nacl_arm_dec::Instruction inst, | 122 nacl_arm_dec::Instruction inst, |
123 const NamedClassDecoder& decoder) { | 123 const NamedClassDecoder& decoder) { |
124 | 124 |
125 // Check that row patterns apply to pattern being checked.' | 125 // Check that row patterns apply to pattern being checked.' |
126 if ((inst.Bits() & 0x01F00000) != 0x01F00000 /* op1(24:20)=~11111 */) return f
alse; | 126 if ((inst.Bits() & 0x01F00000) != 0x01F00000 /* op1(24:20)=~11111 */) return f
alse; |
127 if ((inst.Bits() & 0x000000E0) != 0x000000E0 /* op2(7:5)=~111 */) return false
; | 127 if ((inst.Bits() & 0x000000E0) != 0x000000E0 /* op2(7:5)=~111 */) return false
; |
128 | 128 |
129 // Check other preconditions defined for the base decoder. | 129 // Check other preconditions defined for the base decoder. |
130 return RoadblockTester:: | 130 return PermanentlyUndefinedTester:: |
131 PassesParsePreconditions(inst, decoder); | 131 PassesParsePreconditions(inst, decoder); |
132 } | 132 } |
133 | 133 |
134 // Neutral case: | 134 // Neutral case: |
135 // inst(24:20)=1101x & inst(7:5)=x10 | 135 // inst(24:20)=1101x & inst(7:5)=x10 |
136 // = {baseline: 'Binary2RegisterBitRangeNotRnIsPcBitfieldExtract', | 136 // = {baseline: 'Binary2RegisterBitRangeNotRnIsPcBitfieldExtract', |
137 // constraints: , | 137 // constraints: , |
138 // safety: ["'RegsNotPc'"]} | 138 // safety: ["'RegsNotPc'"]} |
139 // | 139 // |
140 // Representaive case: | 140 // Representaive case: |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
317 : public Binary3RegisterOpAltATesterCase1 { | 317 : public Binary3RegisterOpAltATesterCase1 { |
318 public: | 318 public: |
319 Binary3RegisterOpAltATester_Case1() | 319 Binary3RegisterOpAltATester_Case1() |
320 : Binary3RegisterOpAltATesterCase1( | 320 : Binary3RegisterOpAltATesterCase1( |
321 state_.Binary3RegisterOpAltA_Usad8_Rule_253_A1_P500_instance_) | 321 state_.Binary3RegisterOpAltA_Usad8_Rule_253_A1_P500_instance_) |
322 {} | 322 {} |
323 }; | 323 }; |
324 | 324 |
325 // Neutral case: | 325 // Neutral case: |
326 // inst(24:20)=11111 & inst(7:5)=111 | 326 // inst(24:20)=11111 & inst(7:5)=111 |
327 // = {baseline: 'Roadblock', | 327 // = {baseline: 'PermanentlyUndefined', |
328 // constraints: , | 328 // constraints: , |
329 // rule: 'Udf_Rule_A1'} | 329 // rule: 'Udf_Rule_A1'} |
330 // | 330 // |
331 // Representative case: | 331 // Representative case: |
332 // op1(24:20)=11111 & op2(7:5)=111 | 332 // op1(24:20)=11111 & op2(7:5)=111 |
333 // = {baseline: Roadblock, | 333 // = {baseline: PermanentlyUndefined, |
334 // constraints: , | 334 // constraints: , |
335 // rule: Udf_Rule_A1} | 335 // rule: Udf_Rule_A1} |
336 class RoadblockTester_Case2 | 336 class PermanentlyUndefinedTester_Case2 |
337 : public RoadblockTesterCase2 { | 337 : public PermanentlyUndefinedTesterCase2 { |
338 public: | 338 public: |
339 RoadblockTester_Case2() | 339 PermanentlyUndefinedTester_Case2() |
340 : RoadblockTesterCase2( | 340 : PermanentlyUndefinedTesterCase2( |
341 state_.Roadblock_Udf_Rule_A1_instance_) | 341 state_.PermanentlyUndefined_Udf_Rule_A1_instance_) |
342 {} | 342 {} |
343 }; | 343 }; |
344 | 344 |
345 // Neutral case: | 345 // Neutral case: |
346 // inst(24:20)=1101x & inst(7:5)=x10 | 346 // inst(24:20)=1101x & inst(7:5)=x10 |
347 // = {baseline: 'Binary2RegisterBitRangeNotRnIsPcBitfieldExtract', | 347 // = {baseline: 'Binary2RegisterBitRangeNotRnIsPcBitfieldExtract', |
348 // constraints: , | 348 // constraints: , |
349 // rule: 'Sbfx_Rule_154_A1_P308', | 349 // rule: 'Sbfx_Rule_154_A1_P308', |
350 // safety: ["'RegsNotPc'"]} | 350 // safety: ["'RegsNotPc'"]} |
351 // | 351 // |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
484 TEST_F(Arm32DecoderStateTests, | 484 TEST_F(Arm32DecoderStateTests, |
485 Binary3RegisterOpAltATester_Case1_TestCase1) { | 485 Binary3RegisterOpAltATester_Case1_TestCase1) { |
486 Binary3RegisterOpAltATester_Case1 baseline_tester; | 486 Binary3RegisterOpAltATester_Case1 baseline_tester; |
487 NamedDefs16To19CondsDontCareRdRmRnNotPc_Usad8_Rule_253_A1_P500 actual; | 487 NamedDefs16To19CondsDontCareRdRmRnNotPc_Usad8_Rule_253_A1_P500 actual; |
488 ActualVsBaselineTester a_vs_b_tester(actual, baseline_tester); | 488 ActualVsBaselineTester a_vs_b_tester(actual, baseline_tester); |
489 a_vs_b_tester.Test("cccc01111000dddd1111mmmm0001nnnn"); | 489 a_vs_b_tester.Test("cccc01111000dddd1111mmmm0001nnnn"); |
490 } | 490 } |
491 | 491 |
492 // Neutral case: | 492 // Neutral case: |
493 // inst(24:20)=11111 & inst(7:5)=111 | 493 // inst(24:20)=11111 & inst(7:5)=111 |
494 // = {actual: 'Roadblock', | 494 // = {actual: 'PermanentlyUndefined', |
495 // baseline: 'Roadblock', | 495 // baseline: 'PermanentlyUndefined', |
496 // constraints: , | 496 // constraints: , |
497 // pattern: 'cccc01111111iiiiiiiiiiii1111iiii', | 497 // pattern: 'cccc01111111iiiiiiiiiiii1111iiii', |
498 // rule: 'Udf_Rule_A1'} | 498 // rule: 'Udf_Rule_A1'} |
499 // | 499 // |
500 // Representaive case: | 500 // Representaive case: |
501 // op1(24:20)=11111 & op2(7:5)=111 | 501 // op1(24:20)=11111 & op2(7:5)=111 |
502 // = {actual: Roadblock, | 502 // = {actual: PermanentlyUndefined, |
503 // baseline: Roadblock, | 503 // baseline: PermanentlyUndefined, |
504 // constraints: , | 504 // constraints: , |
505 // pattern: cccc01111111iiiiiiiiiiii1111iiii, | 505 // pattern: cccc01111111iiiiiiiiiiii1111iiii, |
506 // rule: Udf_Rule_A1} | 506 // rule: Udf_Rule_A1} |
507 TEST_F(Arm32DecoderStateTests, | 507 TEST_F(Arm32DecoderStateTests, |
508 RoadblockTester_Case2_TestCase2) { | 508 PermanentlyUndefinedTester_Case2_TestCase2) { |
509 RoadblockTester_Case2 tester; | 509 PermanentlyUndefinedTester_Case2 tester; |
510 tester.Test("cccc01111111iiiiiiiiiiii1111iiii"); | 510 tester.Test("cccc01111111iiiiiiiiiiii1111iiii"); |
511 } | 511 } |
512 | 512 |
513 // Neutral case: | 513 // Neutral case: |
514 // inst(24:20)=1101x & inst(7:5)=x10 | 514 // inst(24:20)=1101x & inst(7:5)=x10 |
515 // = {actual: 'Defs12To15CondsDontCareRdRnNotPcBitfieldExtract', | 515 // = {actual: 'Defs12To15CondsDontCareRdRnNotPcBitfieldExtract', |
516 // baseline: 'Binary2RegisterBitRangeNotRnIsPcBitfieldExtract', | 516 // baseline: 'Binary2RegisterBitRangeNotRnIsPcBitfieldExtract', |
517 // constraints: , | 517 // constraints: , |
518 // pattern: 'cccc0111101wwwwwddddlllll101nnnn', | 518 // pattern: 'cccc0111101wwwwwddddlllll101nnnn', |
519 // rule: 'Sbfx_Rule_154_A1_P308', | 519 // rule: 'Sbfx_Rule_154_A1_P308', |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
607 ActualVsBaselineTester a_vs_b_tester(actual, baseline_tester); | 607 ActualVsBaselineTester a_vs_b_tester(actual, baseline_tester); |
608 a_vs_b_tester.Test("cccc0111111mmmmmddddlllll101nnnn"); | 608 a_vs_b_tester.Test("cccc0111111mmmmmddddlllll101nnnn"); |
609 } | 609 } |
610 | 610 |
611 } // namespace nacl_arm_test | 611 } // namespace nacl_arm_test |
612 | 612 |
613 int main(int argc, char* argv[]) { | 613 int main(int argc, char* argv[]) { |
614 testing::InitGoogleTest(&argc, argv); | 614 testing::InitGoogleTest(&argc, argv); |
615 return RUN_ALL_TESTS(); | 615 return RUN_ALL_TESTS(); |
616 } | 616 } |
OLD | NEW |