LLVM API Documentation
#include <X86AsmPrinter.h>
Classes | |
class | StackMapShadowTracker |
Public Member Functions | |
X86AsmPrinter (TargetMachine &TM, MCStreamer &Streamer) | |
const char * | getPassName () const override |
const X86Subtarget & | getSubtarget () const |
void | EmitStartOfAsmFile (Module &M) override |
void | EmitEndOfAsmFile (Module &M) override |
void | EmitInstruction (const MachineInstr *MI) override |
Targets should implement this to emit instructions. | |
void | EmitBasicBlockEnd (const MachineBasicBlock &MBB) override |
Targets can override this to emit stuff at the end of a basic block. | |
bool | PrintAsmOperand (const MachineInstr *MI, unsigned OpNo, unsigned AsmVariant, const char *ExtraCode, raw_ostream &OS) override |
bool | PrintAsmMemoryOperand (const MachineInstr *MI, unsigned OpNo, unsigned AsmVariant, const char *ExtraCode, raw_ostream &OS) override |
MCSymbol * | GetCPISymbol (unsigned CPID) const override |
Return the symbol for the specified constant pool entry. | |
bool | doInitialization (Module &M) override |
bool | runOnMachineFunction (MachineFunction &F) override |
Definition at line 27 of file X86AsmPrinter.h.
llvm::X86AsmPrinter::X86AsmPrinter | ( | TargetMachine & | TM, |
MCStreamer & | Streamer | ||
) | [inline, explicit] |
Definition at line 88 of file X86AsmPrinter.h.
References llvm::TargetMachine::getSubtarget().
bool llvm::X86AsmPrinter::doInitialization | ( | Module & | M | ) | [inline, override, virtual] |
Set up the AsmPrinter when we are working on a new module. If your pass overrides this, it must make sure to explicitly call this implementation.
Reimplemented from llvm::AsmPrinter.
Definition at line 119 of file X86AsmPrinter.h.
References llvm::AsmPrinter::doInitialization().
void llvm::X86AsmPrinter::EmitBasicBlockEnd | ( | const MachineBasicBlock & | MBB | ) | [inline, override, virtual] |
Targets can override this to emit stuff at the end of a basic block.
Reimplemented from llvm::AsmPrinter.
Definition at line 105 of file X86AsmPrinter.h.
void X86AsmPrinter::EmitEndOfAsmFile | ( | Module & | ) | [override, virtual] |
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 605 of file X86AsmPrinter.cpp.
References llvm::MCStreamer::AddBlankLine(), llvm::MCStreamer::EmitAssemblerFlag(), llvm::MCStreamer::EmitBytes(), llvm::MCStreamer::EmitLabel(), emitNonLazySymbolPointer(), llvm::MCStreamer::EmitSymbolAttribute(), llvm::MCStreamer::EmitSymbolValue(), llvm::MachineModuleInfo::getContext(), llvm::TargetSubtargetInfo::getDataLayout(), llvm::MCObjectFileInfo::getDataRelSection(), llvm::MCObjectFileInfo::getDrectveSection(), llvm::MachineModuleInfoMachO::GetFnStubList(), llvm::MachineModuleInfoMachO::GetGVStubList(), llvm::MachineModuleInfoELF::GetGVStubList(), llvm::MachineModuleInfoMachO::GetHiddenGVStubList(), llvm::MCContext::getMachOSection(), llvm::SectionKind::getMetadata(), llvm::MachineModuleInfo::getObjFileInfo(), llvm::AsmPrinter::getObjFileLowering(), llvm::MCContext::GetOrCreateSymbol(), llvm::DataLayout::getPointerSize(), llvm::TargetMachine::getSubtargetImpl(), llvm::AsmPrinter::getSymbol(), llvm::GlobalValue::hasDLLExportStorageClass(), llvm::MCAF_SubsectionsViaSymbols, llvm::MCSA_Global, llvm::MCSA_IndirectSymbol, llvm::AsmPrinter::MMI, llvm::AsmPrinter::OutContext, llvm::AsmPrinter::OutStreamer, llvm::MachO::S_ATTR_PURE_INSTRUCTIONS, llvm::MachO::S_ATTR_SELF_MODIFYING_CODE, llvm::MachO::S_NON_LAZY_SYMBOL_POINTERS, llvm::MachO::S_SYMBOL_STUBS, llvm::StackMaps::serializeToStackMapSection(), llvm::MCStreamer::SwitchSection(), llvm::ARMBuildAttrs::Symbol, llvm::AsmPrinter::TM, and llvm::MachineModuleInfo::usesVAFloatArgument().
void X86AsmPrinter::EmitInstruction | ( | const MachineInstr * | ) | [override, virtual] |
Targets should implement this to emit instructions.
Reimplemented from llvm::AsmPrinter.
Definition at line 867 of file X86MCInstLower.cpp.
References llvm::MCStreamer::AddComment(), llvm::CallingConv::C, llvm::MachineConstantPoolEntry::ConstVal, llvm::MCSymbolRefExpr::Create(), CreateAdd(), llvm::MCBinaryExpr::CreateSub(), llvm::MCContext::CreateTempSymbol(), llvm::TargetOpcode::DBG_VALUE, llvm::DecodePSHUFBMask(), llvm::ISD::EH_RETURN, llvm::MCStreamer::EmitLabel(), llvm::MCStreamer::emitRawComment(), llvm::MCStreamer::EmitWinCFIAllocStack(), llvm::MCStreamer::EmitWinCFIEndProlog(), llvm::MCStreamer::EmitWinCFIPushFrame(), llvm::MCStreamer::EmitWinCFIPushReg(), llvm::MCStreamer::EmitWinCFISaveReg(), llvm::MCStreamer::EmitWinCFISaveXMM(), llvm::MCStreamer::EmitWinCFISetFrame(), llvm::SmallVectorBase::empty(), llvm::MachineFunction::getConstantPool(), llvm::MachineConstantPool::getConstants(), llvm::MachineOperand::getImm(), llvm::MachineOperand::getIndex(), llvm::MachineInstr::getNumOperands(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineInstr::getParent(), llvm::MachineBasicBlock::getParent(), llvm::MachineFunction::getPICBaseSymbol(), llvm::MachineOperand::getReg(), llvm::TargetSubtargetInfo::getRegisterInfo(), getRetOpcode(), llvm::TargetMachine::getSubtargetImpl(), llvm::MachineOperand::getTargetFlags(), llvm::MachineConstantPoolEntry::getType(), llvm::Type::getVectorNumElements(), llvm::MachineOperand::isCPI(), llvm::MachineConstantPoolEntry::isMachineConstantPoolEntry(), llvm::MachineOperand::isReg(), llvm_unreachable, llvm::X86II::MO_GOT_ABSOLUTE_ADDRESS, llvm::AsmPrinter::OutContext, llvm::TargetOpcode::PATCHPOINT, PrevCrossBBInst(), llvm::SmallVectorTemplateCommon< T, typename >::size(), llvm::SM_SentinelZero, llvm::TargetOpcode::STACKMAP, llvm::raw_string_ostream::str(), llvm::AsmPrinter::TM, and llvm::MachineConstantPoolEntry::Val.
void X86AsmPrinter::EmitStartOfAsmFile | ( | Module & | ) | [override, virtual] |
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 507 of file X86AsmPrinter.cpp.
References llvm::MCStreamer::BeginCOFFSymbolDef(), llvm::MCConstantExpr::Create(), llvm::MCStreamer::EmitAssignment(), llvm::MCStreamer::EmitCOFFSymbolStorageClass(), llvm::MCStreamer::EmitCOFFSymbolType(), llvm::MCStreamer::EmitSymbolAttribute(), llvm::MCStreamer::EndCOFFSymbolDef(), llvm::MachineModuleInfo::getContext(), llvm::AsmPrinter::getObjFileLowering(), llvm::MCContext::GetOrCreateSymbol(), llvm::COFF::IMAGE_SYM_CLASS_STATIC, llvm::COFF::IMAGE_SYM_DTYPE_NULL, llvm::MCSA_Global, llvm::AsmPrinter::MMI, llvm::AsmPrinter::OutStreamer, llvm::MCSymbol::setAbsolute(), and llvm::MCStreamer::SwitchSection().
MCSymbol * X86AsmPrinter::GetCPISymbol | ( | unsigned | CPID | ) | const [override, virtual] |
Return the symbol for the specified constant pool entry.
Reimplemented from llvm::AsmPrinter.
Definition at line 556 of file X86AsmPrinter.cpp.
References llvm::CallingConv::C, llvm::MachineConstantPoolEntry::ConstVal, llvm::MCStreamer::EmitSymbolAttribute(), llvm::MachineFunction::getConstantPool(), llvm::MachineConstantPool::getConstants(), llvm::TargetSubtargetInfo::getDataLayout(), llvm::AsmPrinter::getObjFileLowering(), llvm::MachineConstantPoolEntry::getSectionKind(), llvm::TargetMachine::getSubtargetImpl(), llvm::MachineConstantPoolEntry::isMachineConstantPoolEntry(), llvm::MCSA_Global, llvm::AsmPrinter::MF, llvm::AsmPrinter::OutStreamer, llvm::AsmPrinter::TM, and llvm::MachineConstantPoolEntry::Val.
Referenced by printSymbolOperand().
const char* llvm::X86AsmPrinter::getPassName | ( | ) | const [inline, override, 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 93 of file X86AsmPrinter.h.
const X86Subtarget& llvm::X86AsmPrinter::getSubtarget | ( | ) | const [inline] |
Definition at line 97 of file X86AsmPrinter.h.
Referenced by printAsmMRegister(), and SimplifyShortMoveForm().
bool X86AsmPrinter::PrintAsmMemoryOperand | ( | const MachineInstr * | MI, |
unsigned | OpNo, | ||
unsigned | AsmVariant, | ||
const char * | ExtraCode, | ||
raw_ostream & | OS | ||
) | [override, virtual] |
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 474 of file X86AsmPrinter.cpp.
References printIntelMemReference(), and printMemReference().
bool X86AsmPrinter::PrintAsmOperand | ( | const MachineInstr * | MI, |
unsigned | OpNo, | ||
unsigned | AsmVariant, | ||
const char * | ExtraCode, | ||
raw_ostream & | O | ||
) | [override, virtual] |
PrintAsmOperand - Print out an operand for an inline asm expression.
Reimplemented from llvm::AsmPrinter.
Definition at line 383 of file X86AsmPrinter.cpp.
References llvm::MachineOperand::getImm(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getType(), llvm::MachineOperand::isImm(), llvm::MachineOperand::isReg(), llvm_unreachable, llvm::MachineOperand::MO_ConstantPoolIndex, llvm::MachineOperand::MO_ExternalSymbol, llvm::MachineOperand::MO_GlobalAddress, llvm::MachineOperand::MO_Immediate, llvm::MachineOperand::MO_JumpTableIndex, llvm::MachineOperand::MO_Register, printAsmMRegister(), printOperand(), printPCRelImm(), and printSymbolOperand().
bool X86AsmPrinter::runOnMachineFunction | ( | MachineFunction & | MF | ) | [override, virtual] |
runOnMachineFunction - Emit the function body.
Reimplemented from llvm::AsmPrinter.
Definition at line 49 of file X86AsmPrinter.cpp.
References llvm::MCStreamer::BeginCOFFSymbolDef(), llvm::AsmPrinter::CurrentFnSym, llvm::MCStreamer::EmitCOFFSymbolStorageClass(), llvm::MCStreamer::EmitCOFFSymbolType(), llvm::AsmPrinter::EmitFunctionBody(), llvm::AsmPrinter::EmitFunctionHeader(), llvm::MCStreamer::EndCOFFSymbolDef(), llvm::MachineFunction::getFunction(), llvm::GlobalValue::hasInternalLinkage(), llvm::COFF::IMAGE_SYM_CLASS_EXTERNAL, llvm::COFF::IMAGE_SYM_CLASS_STATIC, llvm::COFF::IMAGE_SYM_DTYPE_FUNCTION, llvm::AsmPrinter::OutStreamer, llvm::COFF::SCT_COMPLEX_TYPE_SHIFT, and llvm::AsmPrinter::SetupMachineFunction().