summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/ARMAsmPrinter.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-05-03 16:42:23 +0000
committerChris Lattner <sabre@nondot.org>2007-05-03 16:42:23 +0000
commit9a8c7cf00b9ed24ac8387a3ccfc150f9afb3b28c (patch)
treec1eadf41a2e8c7b6a74818bdd84ec6fe1d4a7a06 /llvm/lib/Target/ARM/ARMAsmPrinter.cpp
parent90bb4fc96bd6b7551e71bef30bb8ed65567aa565 (diff)
downloadbcm5719-llvm-9a8c7cf00b9ed24ac8387a3ccfc150f9afb3b28c.tar.gz
bcm5719-llvm-9a8c7cf00b9ed24ac8387a3ccfc150f9afb3b28c.zip
add support for printing offset from global
llvm-svn: 36669
Diffstat (limited to 'llvm/lib/Target/ARM/ARMAsmPrinter.cpp')
-rw-r--r--llvm/lib/Target/ARM/ARMAsmPrinter.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/Target/ARM/ARMAsmPrinter.cpp b/llvm/lib/Target/ARM/ARMAsmPrinter.cpp
index 6cda7ebe1f6..ac392607b06 100644
--- a/llvm/lib/Target/ARM/ARMAsmPrinter.cpp
+++ b/llvm/lib/Target/ARM/ARMAsmPrinter.cpp
@@ -294,6 +294,12 @@ void ARMAsmPrinter::printOperand(const MachineInstr *MI, int opNum,
FnStubs.insert(Name);
} else
O << Name;
+
+ if (MO.getOffset() > 0)
+ O << '+' << MO.getOffset();
+ else if (MO.getOffset() < 0)
+ O << MO.getOffset();
+
if (isCallOp && Subtarget->isTargetELF() &&
TM.getRelocationModel() == Reloc::PIC_)
O << "(PLT)";
OpenPOWER on IntegriCloud