| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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_ |
| OLD | NEW |