aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-11-14 21:33:07 +0000
committerChris Lattner <sabre@nondot.org>2010-11-14 21:33:07 +0000
commit58d014f6031ab95b0057a54dc377e7b0d23d674f (patch)
treee2830512252f9bd76fa279a11637bd4a2dffc20c /lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp
parent1520fd60950c1c347457b225dbbd72224d4fcd19 (diff)
downloadexternal_llvm-58d014f6031ab95b0057a54dc377e7b0d23d674f.zip
external_llvm-58d014f6031ab95b0057a54dc377e7b0d23d674f.tar.gz
external_llvm-58d014f6031ab95b0057a54dc377e7b0d23d674f.tar.bz2
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/InstPrinter/PPCInstPrinter.cpp')
-rw-r--r--lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp b/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp
index 8f7ebff..7149de4 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);
+}