| OLD | NEW |
| 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_MIPS_VALIDATOR_H | 7 #ifndef NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_MIPS_VALIDATOR_H |
| 8 #define NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_MIPS_VALIDATOR_H | 8 #define NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_MIPS_VALIDATOR_H |
| 9 | 9 |
| 10 /* | 10 /* |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 | 266 |
| 267 bool IsDirectJump() const { | 267 bool IsDirectJump() const { |
| 268 return decoder_->IsDirectJump(); | 268 return decoder_->IsDirectJump(); |
| 269 } | 269 } |
| 270 | 270 |
| 271 bool IsDestGprReg(nacl_mips_dec::RegisterList rl) const { | 271 bool IsDestGprReg(nacl_mips_dec::RegisterList rl) const { |
| 272 return rl.ContainsAny(nacl_mips_dec::RegisterList(DestGprReg())); | 272 return rl.ContainsAny(nacl_mips_dec::RegisterList(DestGprReg())); |
| 273 } | 273 } |
| 274 | 274 |
| 275 bool IsDataRegMask() const { | 275 bool IsDataRegMask() const { |
| 276 return IsMask(DestGprReg(), nacl_mips_dec::kRegisterLoadStoreMask); | 276 return IsMask(DestGprReg(), nacl_mips_dec::Register::LoadStoreMask()); |
| 277 } | 277 } |
| 278 | 278 |
| 279 private: | 279 private: |
| 280 uint32_t vaddr_; | 280 uint32_t vaddr_; |
| 281 nacl_mips_dec::Instruction inst_; | 281 nacl_mips_dec::Instruction inst_; |
| 282 const nacl_mips_dec::ClassDecoder *decoder_; | 282 const nacl_mips_dec::ClassDecoder *decoder_; |
| 283 | 283 |
| 284 nacl_mips_dec::SafetyLevel safety_; | 284 nacl_mips_dec::SafetyLevel safety_; |
| 285 }; | 285 }; |
| 286 | 286 |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 389 // A jump to trampoline instruction which is not a start of a bundle. | 389 // A jump to trampoline instruction which is not a start of a bundle. |
| 390 const char * const kProblemUnalignedJumpToTrampoline = | 390 const char * const kProblemUnalignedJumpToTrampoline = |
| 391 "kProblemUnalignedJumpToTrampoline"; | 391 "kProblemUnalignedJumpToTrampoline"; |
| 392 // A jump register instruction is not guarded. | 392 // A jump register instruction is not guarded. |
| 393 const char * const kProblemUnsafeJumpRegister = "kProblemUnsafeJumpRegister"; | 393 const char * const kProblemUnsafeJumpRegister = "kProblemUnsafeJumpRegister"; |
| 394 // Two consecutive branches/jumps. Branch/jump in the delay slot. | 394 // Two consecutive branches/jumps. Branch/jump in the delay slot. |
| 395 const char * const kProblemBranchInDelaySlot = "kProblemBranchInDelaySlot"; | 395 const char * const kProblemBranchInDelaySlot = "kProblemBranchInDelaySlot"; |
| 396 } // namespace | 396 } // namespace |
| 397 | 397 |
| 398 #endif // NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_MIPS_VALIDATOR_H | 398 #endif // NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_MIPS_VALIDATOR_H |
| OLD | NEW |