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

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

Issue 10356115: Clean up code to clarify we are only tracking the condition flags of APSR. (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_V2_MODEL_H 7 #ifndef NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_ARM_V2_MODEL_H
8 #define NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_ARM_V2_MODEL_H 8 #define NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_ARM_V2_MODEL_H
9 9
10 /* 10 /*
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 /* 73 /*
74 * A special value used in some cases to indicate that a register field 74 * A special value used in some cases to indicate that a register field
75 * is not used. This is specially chosen to ensure that bitmask() == 0, so 75 * is not used. This is specially chosen to ensure that bitmask() == 0, so
76 * it can be added to any RegisterList with no effect. 76 * it can be added to any RegisterList with no effect.
77 * 77 *
78 * Note that -1 or 32 can't be used here because C++ doesn't define a portable 78 * Note that -1 or 32 can't be used here because C++ doesn't define a portable
79 * meaning for such shift distances. 79 * meaning for such shift distances.
80 */ 80 */
81 const Register kRegisterNone(31); 81 const Register kRegisterNone(31);
82 82
83 // The APSR (flags register) is modeled as r16. 83 // The conditions (i.e. APSR N, Z, C, and V) is modeled as r16.
sehr (please use chromium) 2012/05/14 19:48:12 conditions are collectively modeled as ...
Karl 2012/05/14 21:09:50 Done.
84 const Register kRegisterFlags(16); 84 // These bits of the APSR flag are separately tracked, so we can
sehr (please use chromium) 2012/05/14 19:48:12 APSR register rather than flag?
Karl 2012/05/14 21:09:50 Done.
85 // test when any of the 4 bits (and hence conditional execution) is
86 // affected. If you need to track other bits in the APSR, add them as
87 // a separate register.
88 const Register kConditions(16);
85 89
86 // Registers with special meaning in our model: 90 // Registers with special meaning in our model:
87 const Register kRegisterPc(15); 91 const Register kRegisterPc(15);
88 const Register kRegisterLink(14); 92 const Register kRegisterLink(14);
89 const Register kRegisterStack(13); 93 const Register kRegisterStack(13);
90 94
91
92 /* 95 /*
93 * A collection of Registers. Used to describe the side effects of operations. 96 * A collection of Registers. Used to describe the side effects of operations.
94 * 97 *
95 * Note that this is technically a set, not a list -- but RegisterSet is a 98 * Note that this is technically a set, not a list -- but RegisterSet is a
96 * well-known term that means something else. 99 * well-known term that means something else.
97 */ 100 */
98 class RegisterList { 101 class RegisterList {
99 public: 102 public:
100 /* 103 /*
101 * Produces a RegisterList that contains the registers specified in the 104 * Produces a RegisterList that contains the registers specified in the
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 private: 317 private:
315 uint32_t bits_; 318 uint32_t bits_;
316 }; 319 };
317 320
318 } // namespace 321 } // namespace
319 322
320 // Definitions for our inlined functions. 323 // Definitions for our inlined functions.
321 #include "native_client/src/trusted/validator_arm/model-inl.h" 324 #include "native_client/src/trusted/validator_arm/model-inl.h"
322 325
323 #endif // NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_ARM_V2_MODEL_H 326 #endif // NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_ARM_V2_MODEL_H
OLDNEW
« no previous file with comments | « src/trusted/validator_arm/inst_classes_testers.cc ('k') | src/trusted/validator_arm/validator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698