1 //===- PPCInstPrinter.h - Convert PPC MCInst to assembly syntax -*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This class prints an PPC MCInst to a .s file.
12 //===----------------------------------------------------------------------===//
14 #ifndef PPCINSTPRINTER_H
15 #define PPCINSTPRINTER_H
17 #include "llvm/MC/MCInstPrinter.h"
23 class PPCInstPrinter : public MCInstPrinter {
26 PPCInstPrinter(const MCAsmInfo &MAI, const MCInstrInfo &MII,
27 const MCRegisterInfo &MRI, bool isDarwin)
28 : MCInstPrinter(MAI, MII, MRI), IsDarwin(isDarwin) {}
30 bool isDarwinSyntax() const {
34 virtual void printRegName(raw_ostream &OS, unsigned RegNo) const;
35 virtual void printInst(const MCInst *MI, raw_ostream &O, StringRef Annot);
37 // Autogenerated by tblgen.
38 void printInstruction(const MCInst *MI, raw_ostream &O);
39 static const char *getRegisterName(unsigned RegNo);
42 void printOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O);
43 void printPredicateOperand(const MCInst *MI, unsigned OpNo,
44 raw_ostream &O, const char *Modifier = 0);
47 void printS5ImmOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O);
48 void printU5ImmOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O);
49 void printU6ImmOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O);
50 void printS16ImmOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O);
51 void printU16ImmOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O);
52 void printBranchOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O);
53 void printAbsBranchOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O);
54 void printTLSCall(const MCInst *MI, unsigned OpNo, raw_ostream &O);
56 void printcrbitm(const MCInst *MI, unsigned OpNo, raw_ostream &O);
58 void printMemRegImm(const MCInst *MI, unsigned OpNo, raw_ostream &O);
59 void printMemRegReg(const MCInst *MI, unsigned OpNo, raw_ostream &O);
61 } // end namespace llvm