[llvm-commits] [llvm] r166234 - /llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp
Kevin Enderby
enderby at apple.com
Thu Oct 18 14:49:18 PDT 2012
Author: enderby
Date: Thu Oct 18 16:49:18 2012
New Revision: 166234
URL: http://llvm.org/viewvc/llvm-project?rev=166234&view=rev
Log:
Fix a bug where a 32-bit address with the high bit does not get symbolicated
because the value is incorrectly being signed extended when passed to
SymbolLookUp().
Modified:
llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp
Modified: llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp?rev=166234&r1=166233&r2=166234&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp (original)
+++ llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp Thu Oct 18 16:49:18 2012
@@ -525,8 +525,9 @@
else
ReferenceType = LLVMDisassembler_ReferenceType_InOut_None;
const char *ReferenceName;
- const char *Name = SymbolLookUp(DisInfo, Value, &ReferenceType, Address,
- &ReferenceName);
+ uint64_t SymbolValue = 0x00000000ffffffffULL & Value;
+ const char *Name = SymbolLookUp(DisInfo, SymbolValue, &ReferenceType,
+ Address, &ReferenceName);
if (Name) {
SymbolicOp.AddSymbol.Name = Name;
SymbolicOp.AddSymbol.Present = true;
More information about the llvm-commits
mailing list