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
This commit is contained in:
Chris Lattner 2010-11-14 21:33:07 +00:00
parent 1520fd6095
commit 58d014f603
2 changed files with 17 additions and 4 deletions

View File

@ -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);
}

View File

@ -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) {}