diff options
author | Brian Gaeke <gaeke@uiuc.edu> | 2004-04-02 20:53:35 +0000 |
---|---|---|
committer | Brian Gaeke <gaeke@uiuc.edu> | 2004-04-02 20:53:35 +0000 |
commit | a778ca555aa49cf60222eb0e170b8ef4b02e6259 (patch) | |
tree | f1cd84637984aecf98f4688495aa7a654a329600 /lib/Target/Sparc | |
parent | f7e44ef8d54653cdfd8dfe39adfc5eabdf91cca2 (diff) |
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
Diffstat (limited to 'lib/Target/Sparc')
-rw-r--r-- | lib/Target/Sparc/SparcAsmPrinter.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Target/Sparc/SparcAsmPrinter.cpp b/lib/Target/Sparc/SparcAsmPrinter.cpp index a1f1a9aae9..7305031a19 100644 --- a/lib/Target/Sparc/SparcAsmPrinter.cpp +++ b/lib/Target/Sparc/SparcAsmPrinter.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!"); |