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

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

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
Index: src/trusted/validator_arm/inst_classes_testers.cc
===================================================================
--- src/trusted/validator_arm/inst_classes_testers.cc (revision 8201)
+++ src/trusted/validator_arm/inst_classes_testers.cc (working copy)
@@ -3,6 +3,9 @@
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
+#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/inst_classes_testers.h"
@@ -12,26 +15,25 @@
using nacl_arm_dec::kRegisterFlags;
using nacl_arm_dec::kRegisterNone;
using nacl_arm_dec::kRegisterPc;
-using nacl_arm_dec::ClassDecoder;
using nacl_arm_dec::Instruction;
-using nacl_arm_dec::NamedBinary4RegisterShiftedOp;
namespace nacl_arm_test {
-Binary4RegisterShiftedOpTester::Binary4RegisterShiftedOpTester()
- : Arm32DecoderTester(state_.Binary4RegisterShiftedOp_instance_) {}
+Binary4RegisterShiftedOpTesterRegsNotPc::
+Binary4RegisterShiftedOpTesterRegsNotPc(const NamedClassDecoder& decoder)
+ : Arm32DecoderTester(decoder) {}
-void Binary4RegisterShiftedOpTester::
-ApplySanityChecks(Instruction inst, const ClassDecoder& decoder) {
- NamedBinary4RegisterShiftedOp &expected_decoder =
- state_.Binary4RegisterShiftedOp_instance_;
+void Binary4RegisterShiftedOpTesterRegsNotPc::
+ApplySanityChecks(Instruction inst,
+ const NamedClassDecoder& decoder) {
+ nacl_arm_dec::Binary4RegisterShiftedOp expected_decoder;
// Check that condition is defined correctly.
EXPECT_EQ(expected_decoder.cond_.value(inst), inst.bits(31, 28));
// Didn't parse undefined conditional.
if (expected_decoder.cond_.undefined(inst) &&
- (&expected_decoder != &decoder)) return;
+ (&state_.Binary4RegisterShiftedOp_instance_ != &decoder)) return;
// Check if expected class name found.
Arm32DecoderTester::ApplySanityChecks(inst, decoder);
Property changes on: src/trusted/validator_arm/inst_classes_testers.cc
___________________________________________________________________
Added: svn:eol-style
+ LF

Powered by Google App Engine
This is Rietveld 408576698