summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM
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
commitc407cc7a40fc28119660f76cb26c1ac0cf4c304e (patch)
treec4f2b726a708c8a08d18fe4ddfa3fbc6fdce2c20 /llvm/lib/Target/ARM
parent8c38d35b058c11c72951e7d71de268738853c682 (diff)
downloadbcm5719-llvm-c407cc7a40fc28119660f76cb26c1ac0cf4c304e.tar.gz
bcm5719-llvm-c407cc7a40fc28119660f76cb26c1ac0cf4c304e.zip
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 llvm-svn: 154685
Diffstat (limited to 'llvm/lib/Target/ARM')
-rw-r--r--llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp b/llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp
index b3eeafe0831..cbd81c11a45 100644
--- a/llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp
+++ b/llvm/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.
OpenPOWER on IntegriCloud