Fix the symbolic operand added for the C disassmbler API for the ARM bl
authorKevin Enderby <enderby@apple.com>
Mon, 27 Feb 2012 18:15:15 +0000 (18:15 +0000)
committerKevin Enderby <enderby@apple.com>
Mon, 27 Feb 2012 18:15:15 +0000 (18:15 +0000)
thumb instruction.  The PC adjustment is +4 in Thumb mode and +8 in ARM mode.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151530 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/ARM/Disassembler/ARMDisassembler.cpp

index 8b2203b241e84c7c4fb9d10191ac2db6422f66e4..e570cd5ea683a4a11bfab66a0efd9bdd8bef0269 100644 (file)
@@ -3127,7 +3127,7 @@ DecodeThumbBCCTargetOperand(llvm::MCInst &Inst, unsigned Val,
 
 static DecodeStatus DecodeThumbBLTargetOperand(llvm::MCInst &Inst, unsigned Val,
                                        uint64_t Address, const void *Decoder){
-  if (!tryAddingSymbolicOperand(Address, Address + SignExtend32<22>(Val<<1) + 8,
+  if (!tryAddingSymbolicOperand(Address, Address + SignExtend32<22>(Val<<1) + 4,
                                 true, 4, Inst, Decoder))
     Inst.addOperand(MCOperand::CreateImm(SignExtend32<22>(Val << 1)));
   return MCDisassembler::Success;