LLVM API Documentation
00001 //==- X86ATTInstPrinter.h - Convert X86 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 // This class prints an X86 MCInst to AT&T style .s file syntax. 00011 // 00012 //===----------------------------------------------------------------------===// 00013 00014 #ifndef X86_ATT_INST_PRINTER_H 00015 #define X86_ATT_INST_PRINTER_H 00016 00017 #include "llvm/MC/MCInstPrinter.h" 00018 00019 namespace llvm { 00020 00021 class MCOperand; 00022 00023 class X86ATTInstPrinter : public MCInstPrinter { 00024 public: 00025 X86ATTInstPrinter(const MCAsmInfo &MAI, const MCInstrInfo &MII, 00026 const MCRegisterInfo &MRI) 00027 : MCInstPrinter(MAI, MII, MRI) {} 00028 00029 virtual void printRegName(raw_ostream &OS, unsigned RegNo) const; 00030 virtual void printInst(const MCInst *MI, raw_ostream &OS, StringRef Annot); 00031 00032 // Autogenerated by tblgen, returns true if we successfully printed an 00033 // alias. 00034 bool printAliasInstr(const MCInst *MI, raw_ostream &OS); 00035 00036 // Autogenerated by tblgen. 00037 void printInstruction(const MCInst *MI, raw_ostream &OS); 00038 static const char *getRegisterName(unsigned RegNo); 00039 00040 void printOperand(const MCInst *MI, unsigned OpNo, raw_ostream &OS); 00041 void printMemReference(const MCInst *MI, unsigned Op, raw_ostream &OS); 00042 void printSSECC(const MCInst *MI, unsigned Op, raw_ostream &OS); 00043 void printAVXCC(const MCInst *MI, unsigned Op, raw_ostream &OS); 00044 void printPCRelImm(const MCInst *MI, unsigned OpNo, raw_ostream &OS); 00045 00046 void printopaquemem(const MCInst *MI, unsigned OpNo, raw_ostream &O) { 00047 printMemReference(MI, OpNo, O); 00048 } 00049 00050 void printi8mem(const MCInst *MI, unsigned OpNo, raw_ostream &O) { 00051 printMemReference(MI, OpNo, O); 00052 } 00053 void printi16mem(const MCInst *MI, unsigned OpNo, raw_ostream &O) { 00054 printMemReference(MI, OpNo, O); 00055 } 00056 void printi32mem(const MCInst *MI, unsigned OpNo, raw_ostream &O) { 00057 printMemReference(MI, OpNo, O); 00058 } 00059 void printi64mem(const MCInst *MI, unsigned OpNo, raw_ostream &O) { 00060 printMemReference(MI, OpNo, O); 00061 } 00062 void printi128mem(const MCInst *MI, unsigned OpNo, raw_ostream &O) { 00063 printMemReference(MI, OpNo, O); 00064 } 00065 void printi256mem(const MCInst *MI, unsigned OpNo, raw_ostream &O) { 00066 printMemReference(MI, OpNo, O); 00067 } 00068 void printf32mem(const MCInst *MI, unsigned OpNo, raw_ostream &O) { 00069 printMemReference(MI, OpNo, O); 00070 } 00071 void printf64mem(const MCInst *MI, unsigned OpNo, raw_ostream &O) { 00072 printMemReference(MI, OpNo, O); 00073 } 00074 void printf80mem(const MCInst *MI, unsigned OpNo, raw_ostream &O) { 00075 printMemReference(MI, OpNo, O); 00076 } 00077 void printf128mem(const MCInst *MI, unsigned OpNo, raw_ostream &O) { 00078 printMemReference(MI, OpNo, O); 00079 } 00080 void printf256mem(const MCInst *MI, unsigned OpNo, raw_ostream &O) { 00081 printMemReference(MI, OpNo, O); 00082 } 00083 }; 00084 00085 } 00086 00087 #endif