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

Unified Diff: src/mips64/simulator-mips64.h

Issue 1534183002: MIPS64: r6 compact branch optimization. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years 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 side-by-side diff with in-line comments
Download patch
Index: src/mips64/simulator-mips64.h
diff --git a/src/mips64/simulator-mips64.h b/src/mips64/simulator-mips64.h
index 4c67eff6636cc4d7fa7d087166fb7d951871f7d5..9627a37fb759b62644ace8a3673b51c61d98eab3 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 =
+ reinterpret_cast<Instruction*>(current_pc + Instruction::kInstrSize);
+ if (instr_aftter_compact_branch->IsForbiddenInBranchDelay()) {
+ V8_Fatal(__FILE__, __LINE__,
balazs.kilvady 2015/12/18 19:18:05 I think we should change the function name from 'I
ivica.bogosavljevic 2015/12/22 10:22:40 Agree. Maybe we should have it IsForbiddenAfterBra
balazs.kilvady 2015/12/22 11:01:56 We can use the same function for r6 compact branch
ivica.bogosavljevic 2015/12/22 12:23:41 Acknowledged.
+ "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);

Powered by Google App Engine
This is Rietveld 408576698