summaryrefslogtreecommitdiff
path: root/lib/Target/ARM/InstPrinter
diff options
context:
space:
mode:
authorKevin Enderby <enderby@apple.com>2012-04-13 18:46:37 +0000
committerKevin Enderby <enderby@apple.com>2012-04-13 18:46:37 +0000
commit6c22695c6d10036f5635caec7ea84dbe84cc6bea (patch)
treeb62bfb15c687e379dea01057ec62855972d65216 /lib/Target/ARM/InstPrinter
parent44234775486a0bd8fb6dae4048666ea5567caa11 (diff)
downloadllvm-6c22695c6d10036f5635caec7ea84dbe84cc6bea.tar.gz
llvm-6c22695c6d10036f5635caec7ea84dbe84cc6bea.tar.bz2
llvm-6c22695c6d10036f5635caec7ea84dbe84cc6bea.tar.xz
For ARM disassembly only print 32 unsigned bits for the address of branch
targets so if the branch target has the high bit set it does not get printed as: beq 0xffffffff8008c404 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154685 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/InstPrinter')
-rw-r--r--lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp b/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp
index b3eeafe083..cbd81c11a4 100644
--- a/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp
+++ b/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp
@@ -209,12 +209,12 @@ void ARMInstPrinter::printOperand(const MCInst *MI, unsigned OpNo,
} else {
assert(Op.isExpr() && "unknown operand kind in printOperand");
// If a symbolic branch target was added as a constant expression then print
- // that address in hex.
+ // that address in hex. And only print 32 unsigned bits for the address.
const MCConstantExpr *BranchTarget = dyn_cast<MCConstantExpr>(Op.getExpr());
int64_t Address;
if (BranchTarget && BranchTarget->EvaluateAsAbsolute(Address)) {
O << "0x";
- O.write_hex(Address);
+ O.write_hex((uint32_t)Address);
}
else {
// Otherwise, just print the expression.