1 //===-- X86ATTAsmPrinter.h - Convert X86 LLVM code to Intel assembly ------===//
3 // The LLVM Compiler Infrastructure
5 // This file was developed by the LLVM research group and is distributed under
6 // the University of Illinois Open Source License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // AT&T assembly code printer class.
12 //===----------------------------------------------------------------------===//
14 #ifndef X86ATTASMPRINTER_H
15 #define X86ATTASMPRINTER_H
17 #include "X86AsmPrinter.h"
18 #include "llvm/CodeGen/ValueTypes.h"
23 struct X86ATTAsmPrinter : public X86SharedAsmPrinter {
24 X86ATTAsmPrinter(std::ostream &O, TargetMachine &TM)
25 : X86SharedAsmPrinter(O, TM) { }
27 virtual const char *getPassName() const {
28 return "X86 AT&T-Style Assembly Printer";
31 /// printInstruction - This method is automatically generated by tablegen
32 /// from the instruction set description. This method returns true if the
33 /// machine instruction was sufficiently described to print it, otherwise it
35 bool printInstruction(const MachineInstr *MI);
37 // This method is used by the tablegen'erated instruction printer.
38 void printOperand(const MachineInstr *MI, unsigned OpNo, MVT::ValueType VT){
39 printOp(MI->getOperand(OpNo));
42 void printCallOperand(const MachineInstr *MI, unsigned OpNo,
44 printOp(MI->getOperand(OpNo), true); // Don't print '$' prefix.
47 void printMemoryOperand(const MachineInstr *MI, unsigned OpNo,
49 printMemReference(MI, OpNo);
52 void printMachineInstruction(const MachineInstr *MI);
53 void printOp(const MachineOperand &MO, bool isCallOperand = false);
54 void printMemReference(const MachineInstr *MI, unsigned Op);
55 bool runOnMachineFunction(MachineFunction &F);
58 } // end namespace x86
59 } // end namespace llvm