| OLD | NEW |
| 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_INST_CLASSES_H | 7 #ifndef NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_MIPS_INST_CLASSES_H |
| 9 #define NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_MIPS_INST_CLASSES_H | 8 #define NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_MIPS_INST_CLASSES_H |
| 10 | 9 |
| 11 #include <stdint.h> | 10 #include <stdint.h> |
| 12 #include "native_client/src/trusted/validator_mips/model.h" | 11 #include "native_client/src/trusted/validator_mips/model.h" |
| 13 #include "native_client/src/include/portability.h" | 12 #include "native_client/src/include/portability.h" |
| 14 | 13 |
| 15 | 14 |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 UNREFERENCED_PARAMETER(dest); | 82 UNREFERENCED_PARAMETER(dest); |
| 84 UNREFERENCED_PARAMETER(mask); | 83 UNREFERENCED_PARAMETER(mask); |
| 85 return false; | 84 return false; |
| 86 } | 85 } |
| 87 | 86 |
| 88 /* | 87 /* |
| 89 * The gpr register altered by the instruction. | 88 * The gpr register altered by the instruction. |
| 90 */ | 89 */ |
| 91 virtual Register DestGprReg(const Instruction instr) const { | 90 virtual Register DestGprReg(const Instruction instr) const { |
| 92 UNREFERENCED_PARAMETER(instr); | 91 UNREFERENCED_PARAMETER(instr); |
| 93 return kRegisterNone; | 92 return Register::None(); |
| 94 } | 93 } |
| 95 | 94 |
| 96 /* | 95 /* |
| 97 * May be used for instr's with immediate operand; like addiu or jal. | 96 * May be used for instr's with immediate operand; like addiu or jal. |
| 98 */ | 97 */ |
| 99 virtual uint32_t GetImm(const Instruction instr) const { | 98 virtual uint32_t GetImm(const Instruction instr) const { |
| 100 UNREFERENCED_PARAMETER(instr); | 99 UNREFERENCED_PARAMETER(instr); |
| 101 return -1; | 100 return -1; |
| 102 } | 101 } |
| 103 | 102 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 UNREFERENCED_PARAMETER(addr); | 143 UNREFERENCED_PARAMETER(addr); |
| 145 return 0; | 144 return 0; |
| 146 } | 145 } |
| 147 | 146 |
| 148 /* | 147 /* |
| 149 * Used by jump register instructions; returns the register that holds the | 148 * Used by jump register instructions; returns the register that holds the |
| 150 * address to jump to. | 149 * address to jump to. |
| 151 */ | 150 */ |
| 152 virtual Register TargetReg(const Instruction instr) const { | 151 virtual Register TargetReg(const Instruction instr) const { |
| 153 UNREFERENCED_PARAMETER(instr); | 152 UNREFERENCED_PARAMETER(instr); |
| 154 return kRegisterNone; | 153 return Register::None(); |
| 155 } | 154 } |
| 156 | 155 |
| 157 /* | 156 /* |
| 158 * Base address register, for load and store instructions. | 157 * Base address register, for load and store instructions. |
| 159 */ | 158 */ |
| 160 virtual Register BaseAddressRegister(const Instruction instr) const { | 159 virtual Register BaseAddressRegister(const Instruction instr) const { |
| 161 UNREFERENCED_PARAMETER(instr); | 160 UNREFERENCED_PARAMETER(instr); |
| 162 return kRegisterNone; | 161 return Register::None(); |
| 163 } | 162 } |
| 164 | 163 |
| 165 | 164 |
| 166 protected: | 165 protected: |
| 167 ClassDecoder() {} | 166 ClassDecoder() {} |
| 168 virtual ~ClassDecoder() {} | 167 virtual ~ClassDecoder() {} |
| 169 }; | 168 }; |
| 170 | 169 |
| 171 /* | 170 /* |
| 172 * Current MIPS NaCl halt (break). | 171 * Current MIPS NaCl halt (break). |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 429 public: | 428 public: |
| 430 virtual ~Unrecognized() {} | 429 virtual ~Unrecognized() {} |
| 431 virtual SafetyLevel safety(const Instruction instr) const { | 430 virtual SafetyLevel safety(const Instruction instr) const { |
| 432 UNREFERENCED_PARAMETER(instr); | 431 UNREFERENCED_PARAMETER(instr); |
| 433 return FORBIDDEN; | 432 return FORBIDDEN; |
| 434 } | 433 } |
| 435 }; | 434 }; |
| 436 } // namespace | 435 } // namespace |
| 437 | 436 |
| 438 #endif // NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_MIPS_INST_CLASSES_H | 437 #endif // NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_MIPS_INST_CLASSES_H |
| OLD | NEW |