diff options
author | Chris Lattner <sabre@nondot.org> | 2010-11-14 21:33:07 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-11-14 21:33:07 +0000 |
commit | c2ac86e2611103c329cbba5f04d6256df75ab48b (patch) | |
tree | 989fd797eedfc1555cbf2d0e8752f1af49fe1831 /llvm/lib | |
parent | 3dc9bb245fef29f63f78351a79d1753a5e35d82e (diff) | |
download | bcm5719-llvm-c2ac86e2611103c329cbba5f04d6256df75ab48b.tar.gz bcm5719-llvm-c2ac86e2611103c329cbba5f04d6256df75ab48b.zip |
Wire up symbol hi/lo printing. We don't print hi()/lo(), but this gets
us further along. Only 28 failures now.
llvm-svn: 119079
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp | 15 | ||||
-rw-r--r-- | llvm/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.h | 6 |
2 files changed, 17 insertions, 4 deletions
diff --git a/llvm/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp b/llvm/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp index 8f7ebfff91b..7149de4c478 100644 --- a/llvm/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp +++ b/llvm/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp @@ -202,3 +202,18 @@ void PPCInstPrinter::printOperand(const MCInst *MI, unsigned OpNo, O << *Op.getExpr(); } +void PPCInstPrinter::printSymbolLo(const MCInst *MI, unsigned OpNo, + raw_ostream &O) { + if (MI->getOperand(OpNo).isImm()) + printS16ImmOperand(MI, OpNo, O); + else + printOperand(MI, OpNo, O); +} + +void PPCInstPrinter::printSymbolHi(const MCInst *MI, unsigned OpNo, + raw_ostream &O) { + if (MI->getOperand(OpNo).isImm()) + printS16ImmOperand(MI, OpNo, O); + else + printOperand(MI, OpNo, O); +} diff --git a/llvm/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.h b/llvm/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.h index 9a3e82cdafd..b73f1eb91f2 100644 --- a/llvm/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.h +++ b/llvm/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.h @@ -65,10 +65,8 @@ public: // FIXME: Remove void PrintSpecial(const MCInst *MI, raw_ostream &O, const char *Modifier) {} - void printSymbolLo(const MCInst *MI, unsigned OpNo, raw_ostream &O) { - printS16ImmOperand(MI, OpNo, O); - } - void printSymbolHi(const MCInst *MI, unsigned OpNo, raw_ostream &O) {} + void printSymbolLo(const MCInst *MI, unsigned OpNo, raw_ostream &O); + void printSymbolHi(const MCInst *MI, unsigned OpNo, raw_ostream &O); void printPICLabel(const MCInst *MI, unsigned OpNo, raw_ostream &O) {} void printTOCEntryLabel(const MCInst *MI, unsigned OpNo, raw_ostream &O) {} |