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

Unified Diff: src/trusted/validator_arm/inst_classes_testers.h

Issue 9960043: Finish separation of testing from sel_ldr validation. Also, automate (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client/
Patch Set: Created 8 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/trusted/validator_arm/inst_classes.cc ('k') | src/trusted/validator_arm/inst_classes_testers.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/trusted/validator_arm/inst_classes_testers.h
===================================================================
--- src/trusted/validator_arm/inst_classes_testers.h (revision 8336)
+++ src/trusted/validator_arm/inst_classes_testers.h (working copy)
@@ -9,6 +9,11 @@
#ifndef NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_ARM_INST_CLASSES_TESTERS_H_
#define NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_ARM_INST_CLASSES_TESTERS_H_
+#ifndef NACL_TRUSTED_BUT_NOT_TCB
+#error This file is not meant for use in the TCB
+#endif
+
+#include "native_client/src/trusted/validator_arm/gen/arm32_decode_named_classes.h"
#include "native_client/src/trusted/validator_arm/decoder_tester.h"
namespace nacl_arm_test {
@@ -20,7 +25,6 @@
// +--------+--------------+--+--------+--------+--------+--+----+--+--------+
// | cond | | S| Rn | Rd | Rs | |type| | Rm |
// +--------+--------------+--+--------+--------+--------+--+----+--+--------+
-// Note: if Rn, Rd, Rs, or Rm is R15, the instruction is unpredictable.
// Definitions:
// Rd - The destination register.
// Rn - The first operand register.
@@ -31,10 +35,29 @@
class Binary4RegisterShiftedOpTester : public Arm32DecoderTester {
public:
explicit Binary4RegisterShiftedOpTester();
- virtual void ApplySanityChecks(nacl_arm_dec::Instruction inst,
- const nacl_arm_dec::ClassDecoder& decoder);
+ virtual void ApplySanityChecks(
+ nacl_arm_dec::Instruction inst,
+ const NamedClassDecoder& decoder);
+ protected:
+ explicit Binary4RegisterShiftedOpTester(
+ const NamedBinary4RegisterShiftedOp &decoder);
};
+// Implements a decoder tester for decoder Binary4RegisterShiftedOp
+// with the constraint that if Rn, Rd, Rs, or Rm is R15, the instruction
+// is unpredictable.
+class Binary4RegisterShiftedOpTesterRegsNotPc
+ : public Binary4RegisterShiftedOpTester {
+ public:
+ explicit Binary4RegisterShiftedOpTesterRegsNotPc();
+ virtual void ApplySanityChecks(
+ nacl_arm_dec::Instruction inst,
+ const NamedClassDecoder& decoder);
+ protected:
+ explicit Binary4RegisterShiftedOpTesterRegsNotPc(
+ const NamedBinary4RegisterShiftedOp &decoder);
+};
+
} // namespace
#endif // NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_ARM_INST_CLASSES_TESTERS_H_
Property changes on: src/trusted/validator_arm/inst_classes_testers.h
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « src/trusted/validator_arm/inst_classes.cc ('k') | src/trusted/validator_arm/inst_classes_testers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698