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 | 58d014f6031ab95b0057a54dc377e7b0d23d674f (patch) | |
tree | e2830512252f9bd76fa279a11637bd4a2dffc20c /lib/Target/PowerPC | |
parent | 1520fd60950c1c347457b225dbbd72224d4fcd19 (diff) | |
download | llvm-58d014f6031ab95b0057a54dc377e7b0d23d674f.tar.gz llvm-58d014f6031ab95b0057a54dc377e7b0d23d674f.tar.bz2 llvm-58d014f6031ab95b0057a54dc377e7b0d23d674f.tar.xz |
Wire up symbol hi/lo printing. We don't print hi()/lo(), but this gets
us further along. Only 28 failures now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119079 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PowerPC')
-rw-r--r-- | lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp | 15 | ||||
-rw-r--r-- | lib/Target/PowerPC/InstPrinter/PPCInstPrinter.h | 6 |
2 files changed, 17 insertions, 4 deletions
diff --git a/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp b/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp index 8f7ebfff91..7149de4c47 100644 --- a/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp +++ b/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/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.h b/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.h index 9a3e82cdaf..b73f1eb91f 100644 --- a/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.h +++ b/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) {} |