Index: src/mips64/simulator-mips64.h |
diff --git a/src/mips64/simulator-mips64.h b/src/mips64/simulator-mips64.h |
index 4c67eff6636cc4d7fa7d087166fb7d951871f7d5..536a3f8fc8d246a9d4846e61668cef0a17756a30 100644 |
--- a/src/mips64/simulator-mips64.h |
+++ b/src/mips64/simulator-mips64.h |
@@ -391,6 +391,18 @@ class Simulator { |
// Used for breakpoints and traps. |
void SoftwareInterrupt(Instruction* instr); |
+ // Compact branch guard. |
+ void CheckForbiddenSlot(int64_t current_pc) { |
+ Instruction* instr_aftter_compact_branch = |
balazs.kilvady
2016/01/04 15:26:22
instr_after_compact_branch instead of instr_aftter
|
+ reinterpret_cast<Instruction*>(current_pc + Instruction::kInstrSize); |
+ if (instr_aftter_compact_branch->IsForbiddenAfterBranch()) { |
+ V8_Fatal(__FILE__, __LINE__, |
+ "Error: Unexpected instruction 0x%08x immediately after a " |
+ "compact branch instruction.", |
+ *reinterpret_cast<uint32_t*>(instr_aftter_compact_branch)); |
+ } |
+ } |
+ |
// Stop helper functions. |
bool IsWatchpoint(uint64_t code); |
void PrintWatchpoint(uint64_t code); |
@@ -413,7 +425,7 @@ class Simulator { |
return; |
} |
- if (instr->IsForbiddenInBranchDelay()) { |
+ if (instr->IsForbiddenAfterBranch()) { |
V8_Fatal(__FILE__, __LINE__, |
"Eror:Unexpected %i opcode in a branch delay slot.", |
instr->OpcodeValue()); |