LLVM API Documentation

XCoreInstPrinter.h
Go to the documentation of this file.
00001 //== XCoreInstPrinter.h - Convert XCore MCInst to assembly syntax -*- C++ -*-=//
00002 //
00003 //                     The LLVM Compiler Infrastructure
00004 //
00005 // This file is distributed under the University of Illinois Open Source
00006 // License. See LICENSE.TXT for details.
00007 //
00008 //===----------------------------------------------------------------------===//
00009 ///
00010 /// \file
00011 /// \brief This file contains the declaration of the XCoreInstPrinter class,
00012 /// which is used to print XCore MCInst to a .s file.
00013 ///
00014 //===----------------------------------------------------------------------===//
00015 
00016 #ifndef LLVM_LIB_TARGET_XCORE_INSTPRINTER_XCOREINSTPRINTER_H
00017 #define LLVM_LIB_TARGET_XCORE_INSTPRINTER_XCOREINSTPRINTER_H
00018 #include "llvm/MC/MCInstPrinter.h"
00019 
00020 namespace llvm {
00021 
00022 class TargetMachine;
00023 
00024 class XCoreInstPrinter : public MCInstPrinter {
00025 public:
00026   XCoreInstPrinter(const MCAsmInfo &MAI, const MCInstrInfo &MII,
00027                   const MCRegisterInfo &MRI)
00028     : MCInstPrinter(MAI, MII, MRI) {}
00029 
00030   // Autogenerated by tblgen.
00031   void printInstruction(const MCInst *MI, raw_ostream &O);
00032   static const char *getRegisterName(unsigned RegNo);
00033 
00034   void printRegName(raw_ostream &OS, unsigned RegNo) const override;
00035   void printInst(const MCInst *MI, raw_ostream &O, StringRef Annot) override;
00036 private:
00037   void printInlineJT(const MCInst *MI, int opNum, raw_ostream &O);
00038   void printInlineJT32(const MCInst *MI, int opNum, raw_ostream &O);
00039   void printOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O);
00040   void printMemOperand(const MCInst *MI, int opNum, raw_ostream &O);
00041 };
00042 } // end namespace llvm
00043 
00044 #endif