LLVM API Documentation

X86ATTAsmPrinter.h

Go to the documentation of this file.
00001 //===-- X86ATTAsmPrinter.h - Convert X86 LLVM code to Intel assembly ------===//
00002 //
00003 //                     The LLVM Compiler Infrastructure
00004 //
00005 // This file was developed by the LLVM research group and is distributed under
00006 // the University of Illinois Open Source License. See LICENSE.TXT for details.
00007 //
00008 //===----------------------------------------------------------------------===//
00009 //
00010 // AT&T assembly code printer class.
00011 //
00012 //===----------------------------------------------------------------------===//
00013 
00014 #ifndef X86ATTASMPRINTER_H
00015 #define X86ATTASMPRINTER_H
00016 
00017 #include "X86AsmPrinter.h"
00018 #include "llvm/CodeGen/ValueTypes.h"
00019 
00020 namespace llvm {
00021 
00022 struct X86ATTAsmPrinter : public X86SharedAsmPrinter {
00023  X86ATTAsmPrinter(std::ostream &O, X86TargetMachine &TM)
00024     : X86SharedAsmPrinter(O, TM) { }
00025 
00026   virtual const char *getPassName() const {
00027     return "X86 AT&T-Style Assembly Printer";
00028   }
00029 
00030   /// printInstruction - This method is automatically generated by tablegen
00031   /// from the instruction set description.  This method returns true if the
00032   /// machine instruction was sufficiently described to print it, otherwise it
00033   /// returns false.
00034   bool printInstruction(const MachineInstr *MI);
00035 
00036   // These methods are used by the tablegen'erated instruction printer.
00037   void printOperand(const MachineInstr *MI, unsigned OpNo,
00038                     const char *Modifier = 0);
00039   void printi8mem(const MachineInstr *MI, unsigned OpNo) {
00040     printMemReference(MI, OpNo);
00041   }
00042   void printi16mem(const MachineInstr *MI, unsigned OpNo) {
00043     printMemReference(MI, OpNo);
00044   }
00045   void printi32mem(const MachineInstr *MI, unsigned OpNo) {
00046     printMemReference(MI, OpNo);
00047   }
00048   void printi64mem(const MachineInstr *MI, unsigned OpNo) {
00049     printMemReference(MI, OpNo);
00050   }
00051   void printi128mem(const MachineInstr *MI, unsigned OpNo) {
00052     printMemReference(MI, OpNo);
00053   }
00054   void printf32mem(const MachineInstr *MI, unsigned OpNo) {
00055     printMemReference(MI, OpNo);
00056   }
00057   void printf64mem(const MachineInstr *MI, unsigned OpNo) {
00058     printMemReference(MI, OpNo);
00059   }
00060   void printf128mem(const MachineInstr *MI, unsigned OpNo) {
00061     printMemReference(MI, OpNo);
00062   }
00063   
00064   void printMachineInstruction(const MachineInstr *MI);
00065   void printSSECC(const MachineInstr *MI, unsigned Op);
00066   void printMemReference(const MachineInstr *MI, unsigned Op);
00067   void printPICLabel(const MachineInstr *MI, unsigned Op);
00068   bool runOnMachineFunction(MachineFunction &F);
00069 };
00070 
00071 } // end namespace llvm
00072 
00073 #endif