Index: src/a64/simulator-a64.cc |
diff --git a/src/a64/simulator-a64.cc b/src/a64/simulator-a64.cc |
index e0a0d62a02a695128f50cbc2821c2c776e89401e..014b71477def993b76a8d1c6d953b8c0b67403fe 100644 |
--- a/src/a64/simulator-a64.cc |
+++ b/src/a64/simulator-a64.cc |
@@ -986,6 +986,11 @@ void Simulator::VisitUnconditionalBranchToRegister(Instruction* instr) { |
switch (instr->Mask(UnconditionalBranchToRegisterMask)) { |
case BLR: { |
set_lr(instr->NextInstruction()); |
+ if (instr->Rn() == 31) { |
+ // BLR XZR is used as a guard for the constant pool. We should never hit |
+ // this, but if we do trap to allow debugging. |
+ Debug(); |
+ } |
// Fall through. |
} |
case BR: |