LLVM API Documentation

Public Member Functions
llvm::X86AsmPrinter Class Reference

#include <X86AsmPrinter.h>

Inheritance diagram for llvm::X86AsmPrinter:
Inheritance graph
[legend]
Collaboration diagram for llvm::X86AsmPrinter:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 X86AsmPrinter (TargetMachine &TM, MCStreamer &Streamer)
virtual const char * getPassName () const LLVM_OVERRIDE
const X86SubtargetgetSubtarget () const
virtual void EmitStartOfAsmFile (Module &M) LLVM_OVERRIDE
virtual void EmitEndOfAsmFile (Module &M) LLVM_OVERRIDE
virtual void EmitInstruction (const MachineInstr *MI) LLVM_OVERRIDE
 EmitInstruction - Targets should implement this to emit instructions.
void printSymbolOperand (const MachineOperand &MO, raw_ostream &O)
void printOperand (const MachineInstr *MI, unsigned OpNo, raw_ostream &O, const char *Modifier=0, unsigned AsmVariant=0)
void printPCRelImm (const MachineInstr *MI, unsigned OpNo, raw_ostream &O)
bool printAsmMRegister (const MachineOperand &MO, char Mode, raw_ostream &O)
virtual bool PrintAsmOperand (const MachineInstr *MI, unsigned OpNo, unsigned AsmVariant, const char *ExtraCode, raw_ostream &OS) LLVM_OVERRIDE
virtual bool PrintAsmMemoryOperand (const MachineInstr *MI, unsigned OpNo, unsigned AsmVariant, const char *ExtraCode, raw_ostream &OS) LLVM_OVERRIDE
void printMemReference (const MachineInstr *MI, unsigned Op, raw_ostream &O, const char *Modifier=NULL)
void printLeaMemReference (const MachineInstr *MI, unsigned Op, raw_ostream &O, const char *Modifier=NULL)
void printIntelMemReference (const MachineInstr *MI, unsigned Op, raw_ostream &O, const char *Modifier=NULL, unsigned AsmVariant=1)
virtual bool runOnMachineFunction (MachineFunction &F) LLVM_OVERRIDE
void PrintDebugValueComment (const MachineInstr *MI, raw_ostream &OS)
virtual MachineLocation getDebugValueLocation (const MachineInstr *MI) const LLVM_OVERRIDE

Detailed Description

Definition at line 25 of file X86AsmPrinter.h.


Constructor & Destructor Documentation

llvm::X86AsmPrinter::X86AsmPrinter ( TargetMachine TM,
MCStreamer Streamer 
) [inline, explicit]

Definition at line 28 of file X86AsmPrinter.h.

References llvm::TargetMachine::getSubtarget().


Member Function Documentation

void X86AsmPrinter::EmitEndOfAsmFile ( Module ) [virtual]

EmitEndOfAsmFile - This virtual method can be overridden by targets that want to emit something at the end of their file.

Reimplemented from llvm::AsmPrinter.

Definition at line 524 of file X86AsmPrinter.cpp.

References llvm::MCStreamer::AddBlankLine(), llvm::Module::begin(), llvm::MCStreamer::BeginCOFFSymbolDef(), llvm::MCSymbolRefExpr::Create(), llvm::AsmPrinter::CurrentFnSym, llvm::AsmPrinter::EmitAlignment(), llvm::MCStreamer::EmitAssemblerFlag(), llvm::MCStreamer::EmitBytes(), llvm::MCStreamer::EmitCOFFSymbolStorageClass(), llvm::MCStreamer::EmitCOFFSymbolType(), llvm::MCStreamer::EmitIntValue(), llvm::MCStreamer::EmitLabel(), llvm::MCStreamer::EmitSymbolAttribute(), llvm::MCStreamer::EmitSymbolValue(), llvm::MCStreamer::EmitValue(), llvm::Module::end(), llvm::MCStreamer::EndCOFFSymbolDef(), llvm::X86COFFMachineModuleInfo::externals_begin(), llvm::X86COFFMachineModuleInfo::externals_end(), llvm::MachineModuleInfo::getContext(), llvm::TargetMachine::getDataLayout(), llvm::MCObjectFileInfo::getDataRelSection(), llvm::MCObjectFileInfo::getDrectveSection(), llvm::MachineModuleInfoMachO::GetFnStubList(), llvm::MachineModuleInfoMachO::GetGVStubList(), llvm::MachineModuleInfoELF::GetGVStubList(), llvm::MachineModuleInfoMachO::GetHiddenGVStubList(), llvm::PointerIntPair< PointerTy, IntBits, IntType, PtrTraits >::getInt(), llvm::MCContext::getMachOSection(), llvm::SectionKind::getMetadata(), llvm::MachineModuleInfo::getObjFileInfo(), llvm::AsmPrinter::getObjFileLowering(), llvm::MCContext::GetOrCreateSymbol(), llvm::PointerIntPair< PointerTy, IntBits, IntType, PtrTraits >::getPointer(), llvm::DataLayout::getPointerSize(), llvm::Mangler::getSymbol(), llvm::Module::global_begin(), llvm::Module::global_end(), llvm::ARM_PROC::I, llvm::COFF::IMAGE_SYM_CLASS_EXTERNAL, llvm::COFF::IMAGE_SYM_DTYPE_FUNCTION, llvm::X86Subtarget::is64Bit(), llvm::X86Subtarget::isTargetCOFF(), llvm::X86Subtarget::isTargetCygMing(), llvm::X86Subtarget::isTargetELF(), llvm::X86Subtarget::isTargetEnvMacho(), llvm::X86Subtarget::isTargetWindows(), llvm::AsmPrinter::Mang, llvm::MCAF_SubsectionsViaSymbols, llvm::MCSA_Global, llvm::MCSA_IndirectSymbol, llvm::AsmPrinter::MMI, llvm::AsmPrinter::OutContext, llvm::AsmPrinter::OutStreamer, llvm::MCSectionMachO::S_ATTR_PURE_INSTRUCTIONS, llvm::MCSectionMachO::S_ATTR_SELF_MODIFYING_CODE, llvm::MCSectionMachO::S_NON_LAZY_SYMBOL_POINTERS, llvm::MCSectionMachO::S_SYMBOL_STUBS, llvm::COFF::SCT_COMPLEX_TYPE_SHIFT, llvm::MCStreamer::SwitchSection(), llvm::AsmPrinter::TM, and llvm::MachineModuleInfo::usesVAFloatArgument().

void X86AsmPrinter::EmitInstruction ( const MachineInstr ) [virtual]
void X86AsmPrinter::EmitStartOfAsmFile ( Module ) [virtual]

EmitStartOfAsmFile - This virtual method can be overridden by targets that want to emit something at the start of their file.

Reimplemented from llvm::AsmPrinter.

Definition at line 518 of file X86AsmPrinter.cpp.

References llvm::AsmPrinter::getObjFileLowering(), llvm::X86Subtarget::isTargetEnvMacho(), llvm::AsmPrinter::OutStreamer, and llvm::MCStreamer::SwitchSection().

MachineLocation X86AsmPrinter::getDebugValueLocation ( const MachineInstr MI) const [virtual]
virtual const char* llvm::X86AsmPrinter::getPassName ( ) const [inline, virtual]

getPassName - Return a nice clean name for a pass. This usually implemented in terms of the name that is registered by one of the Registration templates, but can be overloaded directly.

Reimplemented from llvm::Pass.

Definition at line 33 of file X86AsmPrinter.h.

const X86Subtarget& llvm::X86AsmPrinter::getSubtarget ( ) const [inline]

Definition at line 37 of file X86AsmPrinter.h.

Referenced by SimplifyShortMoveForm().

bool X86AsmPrinter::PrintAsmMemoryOperand ( const MachineInstr MI,
unsigned  OpNo,
unsigned  AsmVariant,
const char *  ExtraCode,
raw_ostream OS 
) [virtual]

PrintAsmMemoryOperand - Print the specified operand of MI, an INLINEASM instruction, using the specified assembler variant as an address. Targets should override this to format as appropriate. This method can return true if the operand is erroneous.

Reimplemented from llvm::AsmPrinter.

Definition at line 485 of file X86AsmPrinter.cpp.

References printIntelMemReference(), and printMemReference().

bool X86AsmPrinter::printAsmMRegister ( const MachineOperand MO,
char  Mode,
raw_ostream O 
)
bool X86AsmPrinter::PrintAsmOperand ( const MachineInstr MI,
unsigned  OpNo,
unsigned  AsmVariant,
const char *  ExtraCode,
raw_ostream O 
) [virtual]
void X86AsmPrinter::PrintDebugValueComment ( const MachineInstr MI,
raw_ostream OS 
)
void X86AsmPrinter::printIntelMemReference ( const MachineInstr MI,
unsigned  Op,
raw_ostream O,
const char *  Modifier = NULL,
unsigned  AsmVariant = 1 
)
void X86AsmPrinter::printLeaMemReference ( const MachineInstr MI,
unsigned  Op,
raw_ostream O,
const char *  Modifier = NULL 
)
void X86AsmPrinter::printMemReference ( const MachineInstr MI,
unsigned  Op,
raw_ostream O,
const char *  Modifier = NULL 
)
void X86AsmPrinter::printOperand ( const MachineInstr MI,
unsigned  OpNo,
raw_ostream O,
const char *  Modifier = 0,
unsigned  AsmVariant = 0 
)
void X86AsmPrinter::printPCRelImm ( const MachineInstr MI,
unsigned  OpNo,
raw_ostream O 
)
void X86AsmPrinter::printSymbolOperand ( const MachineOperand MO,
raw_ostream O 
)

printSymbolOperand - Print a raw symbol reference operand. This handles jump tables, constant pools, global address and external symbols, all of which print to a label with various suffixes for relocation types etc.

Definition at line 77 of file X86AsmPrinter.cpp.

References llvm::StringRef::end(), llvm::AsmPrinter::GetCPISymbol(), llvm::AsmPrinter::GetExternalSymbolSymbol(), llvm::MachineOperand::getGlobal(), llvm::MachineOperand::getIndex(), llvm::AsmPrinter::GetJTISymbol(), llvm::MCSymbol::getName(), llvm::MachineModuleInfo::getObjFileInfo(), llvm::MachineOperand::getOffset(), llvm::MCContext::GetOrCreateSymbol(), llvm::MachineFunction::getPICBaseSymbol(), llvm::PointerIntPair< PointerTy, IntBits, IntType, PtrTraits >::getPointer(), llvm::Mangler::getSymbol(), llvm::MachineOperand::getSymbolName(), llvm::AsmPrinter::GetSymbolWithGlobalValueBase(), llvm::MachineOperand::getTargetFlags(), llvm::MachineOperand::getType(), llvm::GlobalValue::hasInternalLinkage(), llvm_unreachable, llvm::AsmPrinter::Mang, llvm::AsmPrinter::MF, llvm::AsmPrinter::MMI, llvm::MachineOperand::MO_ConstantPoolIndex, llvm::X86II::MO_DARWIN_HIDDEN_NONLAZY_PIC_BASE, llvm::X86II::MO_DARWIN_NONLAZY, llvm::X86II::MO_DARWIN_NONLAZY_PIC_BASE, llvm::PPCII::MO_DARWIN_STUB, llvm::X86II::MO_DARWIN_STUB, llvm::X86II::MO_DLLIMPORT, llvm::X86II::MO_DTPOFF, llvm::MachineOperand::MO_ExternalSymbol, llvm::MachineOperand::MO_GlobalAddress, llvm::X86II::MO_GOT, llvm::X86II::MO_GOT_ABSOLUTE_ADDRESS, llvm::X86II::MO_GOTNTPOFF, llvm::X86II::MO_GOTOFF, llvm::X86II::MO_GOTPCREL, llvm::X86II::MO_GOTTPOFF, llvm::X86II::MO_INDNTPOFF, llvm::MachineOperand::MO_JumpTableIndex, llvm::X86II::MO_NO_FLAG, llvm::X86II::MO_NTPOFF, llvm::X86II::MO_PIC_BASE_OFFSET, llvm::X86II::MO_PLT, llvm::X86II::MO_SECREL, llvm::X86II::MO_TLSGD, llvm::X86II::MO_TLSLD, llvm::X86II::MO_TLSLDM, llvm::X86II::MO_TLVP, llvm::X86II::MO_TLVP_PIC_BASE, llvm::X86II::MO_TPOFF, llvm::AsmPrinter::OutContext, llvm::AsmPrinter::printOffset(), and llvm::StringRef::str().

Referenced by PrintAsmOperand(), printLeaMemReference(), printOperand(), and printPCRelImm().

bool X86AsmPrinter::runOnMachineFunction ( MachineFunction MF) [virtual]

The documentation for this class was generated from the following files: