LLVM API Documentation
#include <ARMAsmPrinter.h>
Definition at line 31 of file ARMAsmPrinter.h.
llvm::ARMAsmPrinter::ARMAsmPrinter | ( | TargetMachine & | TM, |
MCStreamer & | Streamer | ||
) | [inline, explicit] |
Definition at line 49 of file ARMAsmPrinter.h.
References llvm::TargetMachine::getSubtarget().
void llvm::ARMAsmPrinter::EmitConstantPool | ( | ) | [inline, override, virtual] |
Print to the current output stream assembly representations of the constants in the constant pool MCP. This is used to print out constants which have been "spilled to memory" by the code generator.
EmitConstantPool - Print to the current output stream assembly representations of the constants in the constant pool MCP. This is used to print out constants which have been "spilled to memory" by the code generator.
Reimplemented from llvm::AsmPrinter.
Definition at line 77 of file ARMAsmPrinter.h.
void ARMAsmPrinter::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 511 of file ARMAsmPrinter.cpp.
References llvm::MCStreamer::AddBlankLine(), llvm::AsmPrinter::EmitAlignment(), llvm::MCStreamer::EmitAssemblerFlag(), llvm::MCStreamer::EmitLabel(), emitNonLazySymbolPointer(), llvm::MCStreamer::EmitSymbolValue(), llvm::TargetSubtargetInfo::getDataLayout(), llvm::MCObjectFileInfo::getDataRelSection(), llvm::MachineModuleInfoMachO::GetGVStubList(), llvm::MachineModuleInfoELF::GetGVStubList(), llvm::MachineModuleInfoMachO::GetHiddenGVStubList(), llvm::MCObjectFileInfo::getNonLazySymbolPointerSection(), llvm::MachineModuleInfo::getObjFileInfo(), llvm::AsmPrinter::getObjFileLowering(), llvm::DataLayout::getPointerSize(), llvm::TargetMachine::getSubtargetImpl(), llvm::ARMSubtarget::isTargetELF(), llvm::ARMSubtarget::isTargetMachO(), llvm::MCAF_SubsectionsViaSymbols, llvm::AsmPrinter::MMI, llvm::AsmPrinter::OutStreamer, llvm::MCStreamer::SwitchSection(), and llvm::AsmPrinter::TM.
void ARMAsmPrinter::EmitFunctionBodyEnd | ( | ) | [override, virtual] |
Targets can override this to emit stuff after the last basic block in the function.
Reimplemented from llvm::AsmPrinter.
Definition at line 60 of file ARMAsmPrinter.cpp.
References llvm::MCStreamer::EmitDataRegion(), llvm::MCDR_DataRegionEnd, and llvm::AsmPrinter::OutStreamer.
void ARMAsmPrinter::EmitFunctionEntryLabel | ( | ) | [override, virtual] |
EmitFunctionEntryLabel - Emit the label that is the entrypoint for the function. This can be overridden by targets as required to do custom stuff.
Reimplemented from llvm::AsmPrinter.
Definition at line 69 of file ARMAsmPrinter.cpp.
References llvm::AsmPrinter::CurrentFnSym, llvm::MCStreamer::EmitAssemblerFlag(), llvm::MCStreamer::EmitLabel(), llvm::MCStreamer::EmitThumbFunc(), llvm::ARMFunctionInfo::isThumbFunction(), llvm::MCAF_Code16, and llvm::AsmPrinter::OutStreamer.
void ARMAsmPrinter::emitInlineAsmEnd | ( | const MCSubtargetInfo & | StartInfo, |
const MCSubtargetInfo * | EndInfo | ||
) | const [override, virtual] |
Let the target do anything it needs to do after emitting inlineasm. This callback can be used restore the original mode in case the inlineasm contains directives to switch modes. StartInfo
- the original subtarget info before inline asm EndInfo
- the final subtarget info after parsing the inline asm, or NULL if the value is unknown.
Reimplemented from llvm::AsmPrinter.
Definition at line 406 of file ARMAsmPrinter.cpp.
References llvm::MCStreamer::EmitAssemblerFlag(), isThumb(), llvm::MCAF_Code16, llvm::MCAF_Code32, and llvm::AsmPrinter::OutStreamer.
void ARMAsmPrinter::EmitInstruction | ( | const MachineInstr * | ) | [override, virtual] |
Targets should implement this to emit instructions.
CONSTPOOL_ENTRY - This instruction represents a floating constant pool in the function. The first operand is the ID# for this instruction, the second is the index into the MachineConstantPool that this is, the third is the size in bytes of this constant pool entry. The required alignment is specified on the basic block holding this MI.
Reimplemented from llvm::AsmPrinter.
Definition at line 1169 of file ARMAsmPrinter.cpp.
References llvm::MCStreamer::AddComment(), llvm::MCInstBuilder::addImm(), llvm::MCInst::addOperand(), llvm::MCInstBuilder::addReg(), llvm::ARMCC::AL, llvm::MachineConstantPoolEntry::ConstVal, llvm::convertAddSubFlagsOpcode(), llvm::MCConstantExpr::Create(), llvm::MCSymbolRefExpr::Create(), llvm::MCBinaryExpr::CreateAdd(), llvm::MCOperand::CreateExpr(), llvm::MCOperand::CreateImm(), llvm::ARMMCExpr::CreateLower16(), llvm::MCOperand::CreateReg(), llvm::MCBinaryExpr::CreateSub(), llvm::ARMMCExpr::CreateUpper16(), llvm::TargetOpcode::DBG_VALUE, llvm::AsmPrinter::EmitAlignment(), llvm::MCStreamer::EmitDataRegion(), llvm::AsmPrinter::EmitGlobalConstant(), llvm::MCStreamer::EmitIntValue(), EmitJump2Table(), EmitJumpTable(), llvm::MCStreamer::EmitLabel(), EmitMachineConstantPoolValue(), llvm::AsmPrinter::EmitToStreamer(), llvm::MachineInstr::FrameSetup, llvm::MachineConstantPool::getConstants(), llvm::AsmPrinter::GetCPISymbol(), llvm::TargetSubtargetInfo::getDataLayout(), llvm::MachineInstr::getFlag(), llvm::AsmPrinter::getFunctionNumber(), llvm::MachineOperand::getGlobal(), llvm::MachineOperand::getImm(), llvm::MachineOperand::getIndex(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), getPICLabel(), llvm::DataLayout::getPrivateGlobalPrefix(), llvm::MachineOperand::getReg(), llvm::TargetMachine::getSubtargetImpl(), llvm::MachineOperand::getTargetFlags(), llvm::MachineConstantPoolEntry::isMachineConstantPoolEntry(), llvm::ARMSubtarget::isTargetEHABICompatible(), llvm::ARMSubtarget::isTargetMachO(), llvm_unreachable, llvm::LowerARMMachineInstrToMCInst(), llvm::MachineConstantPoolEntry::MachineCPVal, llvm::MCDR_DataRegion, llvm::MCDR_DataRegionEnd, llvm::AsmPrinter::OutContext, llvm::AsmPrinter::OutStreamer, llvm::MCInst::setOpcode(), llvm::AsmPrinter::TM, llvm::ISD::TRAP, and llvm::MachineConstantPoolEntry::Val.
void ARMAsmPrinter::EmitJump2Table | ( | const MachineInstr * | MI | ) |
Definition at line 964 of file ARMAsmPrinter.cpp.
References llvm::ARMCC::AL, llvm::MCConstantExpr::Create(), llvm::MCSymbolRefExpr::Create(), llvm::MCBinaryExpr::CreateDiv(), llvm::MCBinaryExpr::CreateSub(), llvm::MCStreamer::EmitDataRegion(), llvm::MCStreamer::EmitLabel(), llvm::AsmPrinter::EmitToStreamer(), llvm::MCStreamer::EmitValue(), llvm::MachineOperand::getImm(), llvm::MachineOperand::getIndex(), llvm::MachineFunction::getJumpTableInfo(), llvm::MachineJumpTableInfo::getJumpTables(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineBasicBlock::getSymbol(), llvm::MCDR_DataRegionEnd, llvm::MCDR_DataRegionJT16, llvm::MCDR_DataRegionJT8, llvm::AsmPrinter::MF, llvm::AsmPrinter::OutContext, and llvm::AsmPrinter::OutStreamer.
Referenced by EmitInstruction().
void ARMAsmPrinter::EmitJumpTable | ( | const MachineInstr * | MI | ) |
Definition at line 913 of file ARMAsmPrinter.cpp.
References llvm::MCConstantExpr::Create(), llvm::MCSymbolRefExpr::Create(), llvm::MCBinaryExpr::CreateAdd(), llvm::MCBinaryExpr::CreateSub(), llvm::MCStreamer::EmitDataRegion(), llvm::MCStreamer::EmitLabel(), llvm::MCStreamer::EmitValue(), llvm::MachineOperand::getImm(), llvm::MachineOperand::getIndex(), llvm::MachineFunction::getJumpTableInfo(), llvm::MachineJumpTableInfo::getJumpTables(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::TargetMachine::getRelocationModel(), llvm::MachineBasicBlock::getSymbol(), llvm::ARMFunctionInfo::isThumbFunction(), llvm::MCDR_DataRegionEnd, llvm::MCDR_DataRegionJT32, llvm::AsmPrinter::MF, llvm::AsmPrinter::OutContext, llvm::AsmPrinter::OutStreamer, llvm::Reloc::PIC_, and llvm::AsmPrinter::TM.
Referenced by EmitInstruction().
void ARMAsmPrinter::EmitMachineConstantPoolValue | ( | MachineConstantPoolValue * | MCPV | ) | [override, virtual] |
EmitMachineConstantPoolValue - Print a machine constantpool value to the .s file.
Reimplemented from llvm::AsmPrinter.
Definition at line 851 of file ARMAsmPrinter.cpp.
References llvm::MCConstantExpr::Create(), llvm::MCSymbolRefExpr::Create(), CreateAdd(), llvm::MCBinaryExpr::CreateSub(), llvm::MCContext::CreateTempSymbol(), llvm::MCStreamer::EmitLabel(), llvm::MCStreamer::EmitValue(), llvm::AsmPrinter::GetBlockAddressSymbol(), llvm::TargetSubtargetInfo::getDataLayout(), llvm::AsmPrinter::GetExternalSymbolSymbol(), llvm::AsmPrinter::getFunctionNumber(), getGV(), llvm::ARMConstantPoolValue::getLabelId(), llvm::ARMConstantPoolValue::getModifier(), getModifierVariantKind(), llvm::MCContext::GetOrCreateSymbol(), llvm::ARMConstantPoolValue::getPCAdjustment(), getPICLabel(), llvm::DataLayout::getPrivateGlobalPrefix(), llvm::TargetMachine::getSubtargetImpl(), llvm::AsmPrinter::getSymbol(), llvm::MachineBasicBlock::getSymbol(), llvm::MachineConstantPoolValue::getType(), llvm::DataLayout::getTypeAllocSize(), llvm::ARMConstantPoolValue::isBlockAddress(), llvm::ARMConstantPoolValue::isExtSymbol(), llvm::ARMConstantPoolValue::isGlobalValue(), llvm::ARMConstantPoolValue::isLSDA(), llvm::ARMConstantPoolValue::isMachineBasicBlock(), llvm::ARMSubtarget::isTargetMachO(), llvm::ARMII::MO_NONLAZY, llvm::ARMConstantPoolValue::mustAddCurrentAddress(), llvm::AsmPrinter::OutContext, llvm::AsmPrinter::OutStreamer, llvm::raw_svector_ostream::str(), and llvm::AsmPrinter::TM.
Referenced by EmitInstruction().
void ARMAsmPrinter::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 416 of file ARMAsmPrinter.cpp.
References llvm::Module::begin(), llvm::Reloc::DynamicNoPIC, llvm::MCStreamer::EmitAssemblerFlag(), llvm::Module::end(), F(), llvm::MCObjectFileInfo::getConstTextCoalSection(), llvm::MCContext::getMachOSection(), llvm::Module::getModuleInlineAsm(), llvm::AsmPrinter::getObjFileLowering(), llvm::TargetMachine::getRelocationModel(), llvm::SectionKind::getText(), llvm::MCObjectFileInfo::getTextCoalSection(), llvm::MCObjectFileInfo::getTextSection(), llvm::SetVector< T, Vector, Set >::insert(), llvm::ARMSubtarget::isTargetELF(), llvm::ARMSubtarget::isTargetMachO(), llvm::ARMSubtarget::isThumb(), llvm::AsmPrinter::Mang, llvm::MCAF_Code16, llvm::MCAF_SyntaxUnified, llvm::AsmPrinter::OutContext, llvm::AsmPrinter::OutStreamer, llvm::Reloc::PIC_, llvm::MachO::S_ATTR_PURE_INSTRUCTIONS, llvm::MachO::S_REGULAR, llvm::MachO::S_SYMBOL_STUBS, llvm::TargetLoweringObjectFile::SectionForGlobal(), llvm::SetVector< T, Vector, Set >::size(), llvm::MCStreamer::SwitchSection(), and llvm::AsmPrinter::TM.
void ARMAsmPrinter::EmitXXStructor | ( | const Constant * | CV | ) | [override, virtual] |
Targets can override this to change how global constants that are part of a C++ static/global constructor list are emitted.
Reimplemented from llvm::AsmPrinter.
Definition at line 78 of file ARMAsmPrinter.cpp.
References llvm::MCSymbolRefExpr::Create(), llvm::dyn_cast(), llvm::MCStreamer::EmitValue(), llvm::TargetSubtargetInfo::getDataLayout(), llvm::TargetMachine::getSubtargetImpl(), llvm::Value::getType(), llvm::DataLayout::getTypeAllocSize(), llvm::ARMSubtarget::isTargetELF(), llvm::ARMII::MO_NO_FLAG, llvm::AsmPrinter::OutContext, llvm::AsmPrinter::OutStreamer, llvm::Constant::stripPointerCasts(), llvm::AsmPrinter::TM, llvm::MCSymbolRefExpr::VK_ARM_TARGET1, and llvm::MCSymbolRefExpr::VK_None.
unsigned llvm::ARMAsmPrinter::getISAEncoding | ( | ) | [inline, override, virtual] |
Get the value for DW_AT_APPLE_isa. Zero if no isa encoding specified.
Reimplemented from llvm::AsmPrinter.
Definition at line 103 of file ARMAsmPrinter.h.
References llvm::ARM::DW_ISA_ARM_arm, and llvm::ARM::DW_ISA_ARM_thumb.
const char* llvm::ARMAsmPrinter::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 55 of file ARMAsmPrinter.h.
bool ARMAsmPrinter::lowerOperand | ( | const MachineOperand & | MO, |
MCOperand & | MCOp | ||
) |
Definition at line 68 of file ARMMCInstLower.cpp.
References llvm::APFloat::convert(), llvm::APFloat::convertToDouble(), llvm::MCSymbolRefExpr::Create(), llvm::MCOperand::CreateExpr(), llvm::MCOperand::CreateFPImm(), llvm::MCOperand::CreateImm(), llvm::MCOperand::CreateReg(), llvm::MachineOperand::getBlockAddress(), llvm::AsmPrinter::GetBlockAddressSymbol(), llvm::AsmPrinter::GetCPISymbol(), llvm::AsmPrinter::GetExternalSymbolSymbol(), llvm::MachineOperand::getFPImm(), llvm::MachineOperand::getGlobal(), llvm::MachineOperand::getImm(), llvm::MachineOperand::getIndex(), llvm::AsmPrinter::GetJTISymbol(), llvm::MachineOperand::getMBB(), llvm::MachineOperand::getReg(), llvm::MachineOperand::getSubReg(), llvm::MachineBasicBlock::getSymbol(), llvm::MachineOperand::getSymbolName(), llvm::MachineOperand::getTargetFlags(), llvm::MachineOperand::getType(), llvm::ConstantFP::getValueAPF(), llvm::APFloat::IEEEdouble, llvm::MachineOperand::isImplicit(), llvm_unreachable, llvm::MachineOperand::MO_BlockAddress, llvm::MachineOperand::MO_ConstantPoolIndex, llvm::MachineOperand::MO_ExternalSymbol, llvm::MachineOperand::MO_FPImmediate, llvm::MachineOperand::MO_GlobalAddress, llvm::MachineOperand::MO_Immediate, llvm::MachineOperand::MO_JumpTableIndex, llvm::MachineOperand::MO_MachineBasicBlock, llvm::MachineOperand::MO_Register, llvm::MachineOperand::MO_RegisterMask, llvm::AsmPrinter::OutContext, and llvm::APFloat::rmTowardZero.
Referenced by llvm::LowerARMMachineInstrToMCInst().
bool ARMAsmPrinter::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 377 of file ARMAsmPrinter.cpp.
References llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::ARMInstPrinter::getRegisterName(), and llvm::MachineOperand::isReg().
bool ARMAsmPrinter::PrintAsmOperand | ( | const MachineInstr * | MI, |
unsigned | OpNo, | ||
unsigned | AsmVariant, | ||
const char * | ExtraCode, | ||
raw_ostream & | O | ||
) | [override, virtual] |
Print the specified operand of MI, an INLINEASM instruction, using the specified assembler variant. Targets should override this to format as appropriate. This method can return true if the operand is erroneous.
PrintAsmOperand - Print the specified operand of MI, an INLINEASM instruction, using the specified assembler variant. Targets should override this to format as appropriate.
Reimplemented from llvm::AsmPrinter.
Definition at line 202 of file ARMAsmPrinter.cpp.
References contains(), llvm::MachineOperand::getImm(), llvm::InlineAsm::getNumOperandRegisters(), llvm::MachineInstr::getNumOperands(), llvm::MachineInstr::getOperand(), llvm::MachineInstr::getParent(), llvm::MachineBasicBlock::getParent(), llvm::MachineOperand::getReg(), llvm::TargetSubtargetInfo::getRegisterInfo(), llvm::ARMInstPrinter::getRegisterName(), llvm::MCRegisterInfo::getSubReg(), llvm::MachineFunction::getSubtarget(), llvm::InlineAsm::hasRegClassConstraint(), llvm::MachineOperand::isImm(), llvm::MachineOperand::isReg(), llvm::InlineAsm::isUseOperandTiedToDef(), llvm::MCRegisterInfo::DiffListIterator::isValid(), llvm::AsmPrinter::MF, llvm::InlineAsm::MIOp_FirstOperand, and printOperand().
void ARMAsmPrinter::printOperand | ( | const MachineInstr * | MI, |
int | OpNum, | ||
raw_ostream & | O, | ||
const char * | Modifier = nullptr |
||
) |
Definition at line 127 of file ARMAsmPrinter.cpp.
References contains(), llvm::AsmPrinter::GetCPISymbol(), llvm::MachineOperand::getGlobal(), llvm::MachineOperand::getImm(), llvm::MachineOperand::getIndex(), llvm::MachineOperand::getMBB(), llvm::MachineOperand::getOffset(), llvm::MachineInstr::getOperand(), llvm::MachineInstr::getParent(), llvm::MachineBasicBlock::getParent(), llvm::MachineOperand::getReg(), llvm::TargetSubtargetInfo::getRegisterInfo(), llvm::ARMInstPrinter::getRegisterName(), llvm::MachineOperand::getSubReg(), llvm::MCRegisterInfo::getSubReg(), llvm::MachineFunction::getSubtarget(), llvm::MachineBasicBlock::getSymbol(), llvm::MachineOperand::getTargetFlags(), llvm::MachineOperand::getType(), llvm::TargetRegisterInfo::isPhysicalRegister(), llvm_unreachable, llvm::AsmPrinter::MF, llvm::MachineOperand::MO_ConstantPoolIndex, llvm::MachineOperand::MO_GlobalAddress, llvm::ARMII::MO_HI16, llvm::MachineOperand::MO_Immediate, llvm::ARMII::MO_LO16, llvm::MachineOperand::MO_MachineBasicBlock, llvm::ARMII::MO_PLT, llvm::MachineOperand::MO_Register, llvm::AsmPrinter::printOffset(), and llvm::LibFunc::strcmp.
Referenced by PrintAsmOperand().
bool ARMAsmPrinter::runOnMachineFunction | ( | MachineFunction & | MF | ) | [override, virtual] |
runOnMachineFunction - This uses the EmitInstruction() method to print assembly for each instruction.
Reimplemented from llvm::AsmPrinter.
Definition at line 99 of file ARMAsmPrinter.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::getConstantPool(), llvm::MachineFunction::getFunction(), llvm::MachineFunction::getInfo(), llvm::GlobalValue::hasInternalLinkage(), llvm::COFF::IMAGE_SYM_CLASS_EXTERNAL, llvm::COFF::IMAGE_SYM_CLASS_STATIC, llvm::COFF::IMAGE_SYM_DTYPE_FUNCTION, llvm::ARMSubtarget::isTargetCOFF(), llvm::AsmPrinter::OutStreamer, llvm::COFF::SCT_COMPLEX_TYPE_SHIFT, and llvm::AsmPrinter::SetupMachineFunction().