Chromium Code Reviews| Index: src/mips/simulator-mips.h |
| diff --git a/src/mips/simulator-mips.h b/src/mips/simulator-mips.h |
| index 796d08fc2700c351465ac26635a1df8fbd231b27..fe9a37e4dd302835ca06bd9d98b1a70676873424 100644 |
| --- a/src/mips/simulator-mips.h |
| +++ b/src/mips/simulator-mips.h |
| @@ -315,6 +315,7 @@ class Simulator { |
| void DecodeTypeRegisterLRsType(); |
| Instruction* currentInstr_; |
| + |
| inline Instruction* get_instr() const { return currentInstr_; } |
| inline void set_instr(Instruction* instr) { currentInstr_ = instr; } |
| @@ -346,6 +347,18 @@ class Simulator { |
| // Used for breakpoints and traps. |
| void SoftwareInterrupt(Instruction* instr); |
| + // Compact branch guard. |
| + void CheckForbiddenSlot(int32_t current_pc) { |
| + Instruction* branch_delay_instr = |
|
paul.l...
2015/10/15 01:51:24
nit: Improper use of 'delay' in name: this should
balazs.kilvady
2015/10/30 21:11:15
Done.
|
| + reinterpret_cast<Instruction*>(current_pc + Instruction::kInstrSize); |
| + if (branch_delay_instr->IsForbiddenInBranchDelay()) { |
| + V8_Fatal(__FILE__, __LINE__, |
| + "Error: Unexpected instruction 0x%08x immediately after a " |
| + "compact branch instruction.", |
| + *reinterpret_cast<uint32_t*>(branch_delay_instr)); |
| + } |
| + } |
| + |
| // Stop helper functions. |
| bool IsWatchpoint(uint32_t code); |
| void PrintWatchpoint(uint32_t code); |