From: Kevin Enderby Date: Mon, 27 Feb 2012 18:15:15 +0000 (+0000) Subject: Fix the symbolic operand added for the C disassmbler API for the ARM bl X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=0943303d31b1d1f2111725e2fa6906c0a785b96e;p=oota-llvm.git Fix the symbolic operand added for the C disassmbler API for the ARM bl 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 --- diff --git a/lib/Target/ARM/Disassembler/ARMDisassembler.cpp b/lib/Target/ARM/Disassembler/ARMDisassembler.cpp index 8b2203b241e..e570cd5ea68 100644 --- a/lib/Target/ARM/Disassembler/ARMDisassembler.cpp +++ b/lib/Target/ARM/Disassembler/ARMDisassembler.cpp @@ -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;