From a778ca555aa49cf60222eb0e170b8ef4b02e6259 Mon Sep 17 00:00:00 2001 From: Brian Gaeke Date: Fri, 2 Apr 2004 20:53:35 +0000 Subject: Add support for printing pc-relative displacements of functions (as used in the CALL instruction). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12630 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/SparcV8/SparcV8AsmPrinter.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/Target/SparcV8') diff --git a/lib/Target/SparcV8/SparcV8AsmPrinter.cpp b/lib/Target/SparcV8/SparcV8AsmPrinter.cpp index a1f1a9a..7305031 100644 --- a/lib/Target/SparcV8/SparcV8AsmPrinter.cpp +++ b/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 (MO.getVRegValue ())) { + O << Mang->getValueName (MO.getVRegValue ()); + return; + } + assert (isa (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!"); -- cgit v1.1