summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorBrian Gaeke <gaeke@uiuc.edu>2004-04-02 20:53:35 +0000
committerBrian Gaeke <gaeke@uiuc.edu>2004-04-02 20:53:35 +0000
commitb65254a34d6c5c2c49eb83ef730fade60216a401 (patch)
treef227134c0080e48dd5f9aecace8615174eca247b /llvm/lib
parent2fd46b6e43f7f1261334aeba70c11199a008cafa (diff)
downloadbcm5719-llvm-b65254a34d6c5c2c49eb83ef730fade60216a401.tar.gz
bcm5719-llvm-b65254a34d6c5c2c49eb83ef730fade60216a401.zip
Add support for printing pc-relative displacements of functions (as used in
the CALL instruction). llvm-svn: 12630
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/SparcV8/SparcV8AsmPrinter.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/Target/SparcV8/SparcV8AsmPrinter.cpp b/llvm/lib/Target/SparcV8/SparcV8AsmPrinter.cpp
index a1f1a9aae9f..7305031a196 100644
--- a/llvm/lib/Target/SparcV8/SparcV8AsmPrinter.cpp
+++ b/llvm/lib/Target/SparcV8/SparcV8AsmPrinter.cpp
@@ -396,6 +396,12 @@ void V8Printer::printOperand(const MachineOperand &MO) {
O << (int)MO.getImmedValue();
return;
case MachineOperand::MO_PCRelativeDisp: {
+ if (isa<GlobalValue> (MO.getVRegValue ())) {
+ O << Mang->getValueName (MO.getVRegValue ());
+ return;
+ }
+ assert (isa<BasicBlock> (MO.getVRegValue ())
+ && "Trying to look up something which is not a BB in the NumberForBB map");
ValueMapTy::const_iterator i = NumberForBB.find(MO.getVRegValue());
assert (i != NumberForBB.end()
&& "Could not find a BB in the NumberForBB map!");
OpenPOWER on IntegriCloud