LLVM API Documentation

Public Member Functions
llvm::ARMAsmPrinter Class Reference

#include <ARMAsmPrinter.h>

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

List of all members.

Public Member Functions

 ARMAsmPrinter (TargetMachine &TM, MCStreamer &Streamer)
const char * getPassName () const override
void printOperand (const MachineInstr *MI, int OpNum, raw_ostream &O, const char *Modifier=nullptr)
bool PrintAsmOperand (const MachineInstr *MI, unsigned OpNum, unsigned AsmVariant, const char *ExtraCode, raw_ostream &O) override
bool PrintAsmMemoryOperand (const MachineInstr *MI, unsigned OpNum, unsigned AsmVariant, const char *ExtraCode, raw_ostream &O) override
void emitInlineAsmEnd (const MCSubtargetInfo &StartInfo, const MCSubtargetInfo *EndInfo) const override
void EmitJumpTable (const MachineInstr *MI)
void EmitJump2Table (const MachineInstr *MI)
void EmitInstruction (const MachineInstr *MI) override
 Targets should implement this to emit instructions.
bool runOnMachineFunction (MachineFunction &F) override
void EmitConstantPool () override
void EmitFunctionBodyEnd () override
void EmitFunctionEntryLabel () override
void EmitStartOfAsmFile (Module &M) override
void EmitEndOfAsmFile (Module &M) override
void EmitXXStructor (const Constant *CV) override
bool lowerOperand (const MachineOperand &MO, MCOperand &MCOp)
unsigned getISAEncoding () override
 Get the value for DW_AT_APPLE_isa. Zero if no isa encoding specified.
void EmitMachineConstantPoolValue (MachineConstantPoolValue *MCPV) override

Detailed Description

Definition at line 31 of file ARMAsmPrinter.h.


Constructor & Destructor Documentation

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

Definition at line 49 of file ARMAsmPrinter.h.

References llvm::TargetMachine::getSubtarget().


Member Function Documentation

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]
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.

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]
void ARMAsmPrinter::EmitXXStructor ( const Constant CV) [override, virtual]
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::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 
)

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