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

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

Issue 11415031: [MIPS] Forbid $sp update at the end of the last bundle. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Presubmit errors have been fixed. Created 8 years, 1 month 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
« no previous file with comments | « no previous file | src/trusted/validator_mips/ncval.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 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 3 * Use of this source code is governed by a BSD-style license that can be
4 * be found in the LICENSE file. 4 * found in the LICENSE file.
5 * Copyright 2012, Google Inc.
6 */ 5 */
7 6
8 #ifndef NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_MIPS_MODEL_H 7 #ifndef NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_MIPS_MODEL_H
9 #define NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_MIPS_MODEL_H 8 #define NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_MIPS_MODEL_H
10 9
11 /* 10 /*
12 * Models instructions and decode results. 11 * Models instructions and decode results.
13 * 12 *
14 * TODO(petarj): This file and the classes have been based on the same named 13 * TODO(petarj): This file and the classes have been based on the same named
15 * module within validator_arm folder. The code has been reduced and changed 14 * module within validator_arm folder. The code has been reduced and changed
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 /* 70 /*
72 * Produces a RegisterList containing a single register. 71 * Produces a RegisterList containing a single register.
73 * 72 *
74 * Note that this is an implicit constructor. This is okay in this case 73 * Note that this is an implicit constructor. This is okay in this case
75 * because 74 * because
76 * - It converts between two types that we control, 75 * - It converts between two types that we control,
77 * - It converts at most one step (no implicit conversions to Register), 76 * - It converts at most one step (no implicit conversions to Register),
78 * - It inlines to a single machine instruction, 77 * - It inlines to a single machine instruction,
79 * - The readability gain in inst_classes.cc is large. 78 * - The readability gain in inst_classes.cc is large.
80 */ 79 */
81 inline RegisterList(const Register r); 80 explicit inline RegisterList(const Register r);
82 81
83 /* 82 /*
84 * Checks whether this list contains the given register. 83 * Checks whether this list contains the given register.
85 */ 84 */
86 inline bool operator[](const Register) const; 85 inline bool operator[](const Register) const;
87 86
88 // Checks whether this list contains all the registers in the operand. 87 // Checks whether this list contains all the registers in the operand.
89 inline bool ContainsAll(RegisterList) const; 88 inline bool ContainsAll(RegisterList) const;
90 89
91 // Checks whether this list contains any of the registers in the operand. 90 // Checks whether this list contains any of the registers in the operand.
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 inline uint32_t operator&(uint32_t) const; 145 inline uint32_t operator&(uint32_t) const;
147 146
148 private: 147 private:
149 uint32_t _bits; 148 uint32_t _bits;
150 }; 149 };
151 150
152 uint32_t const kInstrSize = 4; 151 uint32_t const kInstrSize = 4;
153 uint32_t const kInstrAlign = 0xFFFFFFFC; 152 uint32_t const kInstrAlign = 0xFFFFFFFC;
154 uint32_t const kBundleAlign = 0xFFFFFFF0; 153 uint32_t const kBundleAlign = 0xFFFFFFF0;
155 154
155 // Opcode for nop instruction.
156 uint32_t const kNop = 0x0;
157
156 } // namespace 158 } // namespace
157 159
158 // Definitions for our inlined functions. 160 // Definitions for our inlined functions.
159 #include "native_client/src/trusted/validator_mips/model-inl.h" 161 #include "native_client/src/trusted/validator_mips/model-inl.h"
160 162
161 #endif // NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_MIPS_MODEL_H 163 #endif // NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_MIPS_MODEL_H
OLDNEW
« no previous file with comments | « no previous file | src/trusted/validator_mips/ncval.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698