Chris Lattner | 60d5b5f | 2010-11-14 19:40:38 +0000 | [diff] [blame] | 1 | //===-- PPCInstPrinter.h - Convert PPC MCInst to assembly syntax ----------===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | // |
| 10 | // This class prints an PPC MCInst to a .s file. |
| 11 | // |
| 12 | //===----------------------------------------------------------------------===// |
| 13 | |
| 14 | #ifndef PPCINSTPRINTER_H |
| 15 | #define PPCINSTPRINTER_H |
| 16 | |
| 17 | #include "llvm/MC/MCInstPrinter.h" |
| 18 | |
| 19 | namespace llvm { |
| 20 | class MCOperand; |
| 21 | |
| 22 | class PPCInstPrinter : public MCInstPrinter { |
| 23 | public: |
| 24 | PPCInstPrinter(const MCAsmInfo &MAI) : MCInstPrinter(MAI) {} |
| 25 | |
| 26 | virtual void printInst(const MCInst *MI, raw_ostream &O); |
| 27 | virtual StringRef getOpcodeName(unsigned Opcode) const; |
| 28 | |
| 29 | static const char *getInstructionName(unsigned Opcode); |
| 30 | |
| 31 | // Autogenerated by tblgen. |
| 32 | void printInstruction(const MCInst *MI, raw_ostream &O); |
| 33 | static const char *getRegisterName(unsigned RegNo); |
| 34 | |
| 35 | |
| 36 | void printOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O) {} |
| 37 | void printPredicateOperand(const MCInst *MI, unsigned OpNo, |
| 38 | raw_ostream &O, const char *Modifier) {} |
| 39 | |
| 40 | |
| 41 | void printS5ImmOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O) {} |
| 42 | void printU5ImmOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O) {} |
| 43 | void printU6ImmOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O) {} |
| 44 | void printS16ImmOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O) {} |
| 45 | void printU16ImmOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O) {} |
| 46 | void printS16X4ImmOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O) {} |
| 47 | void printBranchOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O) {} |
| 48 | void printCallOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O) {} |
| 49 | void printAbsAddrOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O) {} |
| 50 | |
| 51 | void printcrbitm(const MCInst *MI, unsigned OpNo, raw_ostream &O) {} |
| 52 | |
| 53 | void printMemRegImm(const MCInst *MI, unsigned OpNo, raw_ostream &O) {} |
| 54 | void printMemRegImmShifted(const MCInst *MI, unsigned OpNo, raw_ostream &O) {} |
| 55 | void printMemRegReg(const MCInst *MI, unsigned OpNo, raw_ostream &O) {} |
| 56 | |
| 57 | // FIXME: Remove |
| 58 | void PrintSpecial(const MCInst *MI, raw_ostream &O, const char *Modifier) {} |
| 59 | void printSymbolLo(const MCInst *MI, unsigned OpNo, raw_ostream &O) {} |
| 60 | void printSymbolHi(const MCInst *MI, unsigned OpNo, raw_ostream &O) {} |
| 61 | void printPICLabel(const MCInst *MI, unsigned OpNo, raw_ostream &O) {} |
| 62 | void printTOCEntryLabel(const MCInst *MI, unsigned OpNo, raw_ostream &O) {} |
| 63 | |
| 64 | }; |
| 65 | } // end namespace llvm |
| 66 | |
| 67 | #endif |