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

Side by Side Diff: src/trusted/validator_arm/actual_vs_baseline.h

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 (c) 2012 The Native Client Authors. All rights reserved. 2 * Copyright (c) 2012 The Native Client Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be 3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file. 4 * found in the LICENSE file.
5 */ 5 */
6 6
7 #ifndef NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_ARM_ACTUAL_VS_BASELINE_H_ 7 #ifndef NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_ARM_ACTUAL_VS_BASELINE_H_
8 #define NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_ARM_ACTUAL_VS_BASELINE_H_ 8 #define NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_ARM_ACTUAL_VS_BASELINE_H_
9 9
10 #include "native_client/src/trusted/validator_arm/decoder_tester.h" 10 #include "native_client/src/trusted/validator_arm/decoder_tester.h"
(...skipping 17 matching lines...) Expand all
28 class ActualVsBaselineTester : public Arm32DecoderTester { 28 class ActualVsBaselineTester : public Arm32DecoderTester {
29 public: 29 public:
30 ActualVsBaselineTester(const NamedClassDecoder& actual, 30 ActualVsBaselineTester(const NamedClassDecoder& actual,
31 DecoderTester& baseline_tester); 31 DecoderTester& baseline_tester);
32 virtual ~ActualVsBaselineTester() {} 32 virtual ~ActualVsBaselineTester() {}
33 33
34 // Runs baseline tester on inputs, then checks that 34 // Runs baseline tester on inputs, then checks that
35 // virtuals of actual and baseline match. 35 // virtuals of actual and baseline match.
36 virtual void ProcessMatch(); 36 virtual void ProcessMatch();
37 virtual const NamedClassDecoder& ExpectedDecoder() const; 37 virtual const NamedClassDecoder& ExpectedDecoder() const;
38 virtual void ApplySanityChecks( 38 virtual bool ApplySanityChecks(
39 nacl_arm_dec::Instruction inst, 39 nacl_arm_dec::Instruction inst,
40 const NamedClassDecoder& decoder); 40 const NamedClassDecoder& decoder);
41 41
42 protected: 42 protected:
43 // Checks that each corresponding ClassDecoder virtual matches. 43 // Checks that each corresponding ClassDecoder virtual matches.
44 void CheckSafety(); 44 void CheckSafety();
45 void CheckDefs(); 45 void CheckDefs();
46 void CheckImmediateAddressingDefs(); 46 void CheckImmediateAddressingDefs();
47 void CheckWritesMemory(); 47 void CheckWritesMemory();
48 void CheckBaseAddressRegister(); 48 void CheckBaseAddressRegister();
(...skipping 15 matching lines...) Expand all
64 const nacl_arm_dec::ClassDecoder& actual_decoder_; 64 const nacl_arm_dec::ClassDecoder& actual_decoder_;
65 const nacl_arm_dec::ClassDecoder& baseline_decoder_; 65 const nacl_arm_dec::ClassDecoder& baseline_decoder_;
66 66
67 private: 67 private:
68 NACL_DISALLOW_COPY_AND_ASSIGN(ActualVsBaselineTester); 68 NACL_DISALLOW_COPY_AND_ASSIGN(ActualVsBaselineTester);
69 }; 69 };
70 70
71 } // namespace 71 } // namespace
72 72
73 #endif // NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_ARM_ACTUAL_VS_BASELINE_H_ 73 #endif // NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_ARM_ACTUAL_VS_BASELINE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698