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

Side by Side Diff: src/trusted/validator_arm/inst_classes.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 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_V2_INST_CLASSES_H_ 7 #ifndef NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_ARM_V2_INST_CLASSES_H_
8 #define NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_ARM_V2_INST_CLASSES_H_ 8 #define NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_ARM_V2_INST_CLASSES_H_
9 9
10 #include <stdint.h> 10 #include <stdint.h>
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 // *more* bits to be clear to set Z. This is fine. 249 // *more* bits to be clear to set Z. This is fine.
250 virtual bool sets_Z_if_bits_clear(Instruction i, 250 virtual bool sets_Z_if_bits_clear(Instruction i,
251 Register r, 251 Register r,
252 uint32_t mask) const { 252 uint32_t mask) const {
253 UNREFERENCED_PARAMETER(i); 253 UNREFERENCED_PARAMETER(i);
254 UNREFERENCED_PARAMETER(r); 254 UNREFERENCED_PARAMETER(r);
255 UNREFERENCED_PARAMETER(mask); 255 UNREFERENCED_PARAMETER(mask);
256 return false; 256 return false;
257 } 257 }
258 258
259 // Returns a c-string containing the name of the class. Used for
260 // testing only.
261 virtual const char* name() const;
262
263 // Many instructions define control bits in bits 20-24. The useful bits 259 // Many instructions define control bits in bits 20-24. The useful bits
264 // are defined here. 260 // are defined here.
265 261
266 // True if U (updates flags register) flag is defined. 262 // True if U (updates flags register) flag is defined.
267 inline bool UpdatesFlagsRegister(const Instruction& i) const { 263 inline bool UpdatesFlagsRegister(const Instruction& i) const {
268 return i.bit(20); 264 return i.bit(20);
269 } 265 }
270 266
271 // True if W (does write) flag is defined. 267 // True if W (does write) flag is defined.
272 inline bool WritesFlag(const Instruction& i) const { 268 inline bool WritesFlag(const Instruction& i) const {
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
576 const RegNBits16To19Interface n_; 572 const RegNBits16To19Interface n_;
577 const UpdatesFlagsRegisterBit20Interface flags_; 573 const UpdatesFlagsRegisterBit20Interface flags_;
578 const ConditionBits28To31Interface cond_; 574 const ConditionBits28To31Interface cond_;
579 575
580 // Methods for class. 576 // Methods for class.
581 Binary3RegisterShiftedTest() 577 Binary3RegisterShiftedTest()
582 : ClassDecoder(), m_(), s_(), n_(), flags_(), cond_() {} 578 : ClassDecoder(), m_(), s_(), n_(), flags_(), cond_() {}
583 virtual ~Binary3RegisterShiftedTest() {} 579 virtual ~Binary3RegisterShiftedTest() {}
584 virtual SafetyLevel safety(Instruction i) const; 580 virtual SafetyLevel safety(Instruction i) const;
585 virtual RegisterList defs(Instruction i) const; 581 virtual RegisterList defs(Instruction i) const;
582
586 private: 583 private:
587 // Don't allow the following! 584 // Don't allow the following!
588 explicit Binary3RegisterShiftedTest(const Binary3RegisterShiftedTest&); 585 explicit Binary3RegisterShiftedTest(const Binary3RegisterShiftedTest&);
589 Binary3RegisterShiftedTest& operator=(const Binary3RegisterShiftedTest&); 586 Binary3RegisterShiftedTest& operator=(const Binary3RegisterShiftedTest&);
590 }; 587 };
591 588
592 // Models the few data-processing instructions that *don't* produce a result, 589 // Models the few data-processing instructions that *don't* produce a result,
593 // but may still set flags. 590 // but may still set flags.
594 // 591 //
595 // Includes: 592 // Includes:
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after
1157 virtual bool is_relative_branch(Instruction i) const { 1154 virtual bool is_relative_branch(Instruction i) const {
1158 UNREFERENCED_PARAMETER(i); 1155 UNREFERENCED_PARAMETER(i);
1159 return true; 1156 return true;
1160 } 1157 }
1161 virtual int32_t branch_target_offset(Instruction i) const; 1158 virtual int32_t branch_target_offset(Instruction i) const;
1162 }; 1159 };
1163 1160
1164 } // namespace 1161 } // namespace
1165 1162
1166 #endif // NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_ARM_V2_INST_CLASSES_H_ 1163 #endif // NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_ARM_V2_INST_CLASSES_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698