LLVM API Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Public Attributes | List of all members
llvm::MipsAsmPrinter Class Reference

#include <MipsAsmPrinter.h>

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

Public Member Functions

 MipsAsmPrinter (TargetMachine &TM, MCStreamer &Streamer)
 
virtual const char * getPassName () const
 
virtual bool runOnMachineFunction (MachineFunction &MF)
 
virtual void EmitConstantPool () LLVM_OVERRIDE
 
void EmitInstruction (const MachineInstr *MI)
 EmitInstruction - Targets should implement this to emit instructions. More...
 
void printSavedRegsBitmask (raw_ostream &O)
 
void printHex32 (unsigned int Value, raw_ostream &O)
 
void emitFrameDirective ()
 Frame Directive. More...
 
const char * getCurrentABIString () const
 Emit Set directives. More...
 
virtual void EmitFunctionEntryLabel ()
 
virtual void EmitFunctionBodyStart ()
 
virtual void EmitFunctionBodyEnd ()
 
virtual bool isBlockOnlyReachableByFallthrough (const MachineBasicBlock *MBB) const
 
bool PrintAsmOperand (const MachineInstr *MI, unsigned OpNo, unsigned AsmVariant, const char *ExtraCode, raw_ostream &O)
 
bool PrintAsmMemoryOperand (const MachineInstr *MI, unsigned OpNum, unsigned AsmVariant, const char *ExtraCode, raw_ostream &O)
 
void printOperand (const MachineInstr *MI, int opNum, raw_ostream &O)
 
void printUnsignedImm (const MachineInstr *MI, int opNum, raw_ostream &O)
 
void printUnsignedImm8 (const MachineInstr *MI, int opNum, raw_ostream &O)
 
void printMemOperand (const MachineInstr *MI, int opNum, raw_ostream &O)
 
void printMemOperandEA (const MachineInstr *MI, int opNum, raw_ostream &O)
 
void printFCCOperand (const MachineInstr *MI, int opNum, raw_ostream &O, const char *Modifier=0)
 
void EmitStartOfAsmFile (Module &M)
 
void EmitEndOfAsmFile (Module &M)
 
void PrintDebugValueComment (const MachineInstr *MI, raw_ostream &OS)
 
- Public Member Functions inherited from llvm::AsmPrinter
virtual ~AsmPrinter ()
 
const DwarfDebuggetDwarfDebug () const
 
bool isVerbose () const
 
unsigned getFunctionNumber () const
 
const TargetLoweringObjectFilegetObjFileLowering () const
 getObjFileLowering - Return information about object file lowering. More...
 
const DataLayoutgetDataLayout () const
 getDataLayout - Return information about data layout. More...
 
StringRef getTargetTriple () const
 getTargetTriple - Return the target triple string. More...
 
const MCSectiongetCurrentSection () const
 getCurrentSection() - Return the current section we are emitting to. More...
 
MCSymbolgetSymbol (const GlobalValue *GV) const
 
void getAnalysisUsage (AnalysisUsage &AU) const
 
bool doInitialization (Module &M)
 
bool doFinalization (Module &M)
 
void SetupMachineFunction (MachineFunction &MF)
 
void EmitFunctionHeader ()
 
void EmitFunctionBody ()
 
void emitPrologLabel (const MachineInstr &MI)
 
CFIMoveType needsCFIMoves ()
 
bool needsSEHMoves ()
 
bool needsRelocationsForDwarfStringPool () const
 
void EmitJumpTableInfo ()
 
virtual void EmitGlobalVariable (const GlobalVariable *GV)
 EmitGlobalVariable - Emit the specified global variable to the .s file. More...
 
bool EmitSpecialLLVMGlobal (const GlobalVariable *GV)
 
void EmitAlignment (unsigned NumBits, const GlobalValue *GV=0) const
 
void EmitBasicBlockStart (const MachineBasicBlock *MBB) const
 
void EmitGlobalConstant (const Constant *CV)
 Print a general LLVM constant to the .s file. More...
 
virtual void EmitMachineConstantPoolValue (MachineConstantPoolValue *MCPV)
 
virtual void EmitXXStructor (const Constant *CV)
 
virtual void emitImplicitDef (const MachineInstr *MI) const
 
MCSymbolGetTempSymbol (StringRef Name, unsigned ID) const
 
MCSymbolGetTempSymbol (StringRef Name) const
 
MCSymbolGetSymbolWithGlobalValueBase (const GlobalValue *GV, StringRef Suffix, bool ForcePrivate=true) const
 
MCSymbolGetExternalSymbolSymbol (StringRef Sym) const
 
MCSymbolGetCPISymbol (unsigned CPID) const
 GetCPISymbol - Return the symbol for the specified constant pool entry. More...
 
MCSymbolGetJTISymbol (unsigned JTID, bool isLinkerPrivate=false) const
 GetJTISymbol - Return the symbol for the specified jump table entry. More...
 
MCSymbolGetJTSetSymbol (unsigned UID, unsigned MBBID) const
 
MCSymbolGetBlockAddressSymbol (const BlockAddress *BA) const
 
MCSymbolGetBlockAddressSymbol (const BasicBlock *BB) const
 
void printOffset (int64_t Offset, raw_ostream &OS) const
 printOffset - This is just convenient handler for printing offsets. More...
 
void EmitInt8 (int Value) const
 
void EmitInt16 (int Value) const
 
void EmitInt32 (int Value) const
 
void EmitLabelDifference (const MCSymbol *Hi, const MCSymbol *Lo, unsigned Size) const
 
void EmitLabelOffsetDifference (const MCSymbol *Hi, uint64_t Offset, const MCSymbol *Lo, unsigned Size) const
 
void EmitLabelPlusOffset (const MCSymbol *Label, uint64_t Offset, unsigned Size, bool IsSectionRelative=false) const
 
void EmitLabelReference (const MCSymbol *Label, unsigned Size, bool IsSectionRelative=false) const
 
void EmitSLEB128 (int64_t Value, const char *Desc=0) const
 EmitSLEB128 - emit the specified signed leb128 value. More...
 
void EmitULEB128 (uint64_t Value, const char *Desc=0, unsigned PadTo=0) const
 EmitULEB128 - emit the specified unsigned leb128 value. More...
 
void EmitCFAByte (unsigned Val) const
 EmitCFAByte - Emit a .byte 42 directive for a DW_CFA_xxx value. More...
 
void EmitEncodingByte (unsigned Val, const char *Desc=0) const
 
unsigned GetSizeOfEncodedValue (unsigned Encoding) const
 GetSizeOfEncodedValue - Return the size of the encoding in bytes. More...
 
void EmitTTypeReference (const GlobalValue *GV, unsigned Encoding) const
 EmitReference - Emit reference to a ttype global with a specified encoding. More...
 
void EmitSectionOffset (const MCSymbol *Label, const MCSymbol *SectionLabel) const
 
virtual unsigned getISAEncoding ()
 
virtual void EmitDwarfRegOp (const MachineLocation &MLoc, bool Indirect) const
 EmitDwarfRegOp - Emit dwarf register operation. More...
 
void emitCFIInstruction (const MCCFIInstruction &Inst) const
 Emit frame instruction to describe the layout of the frame. More...
 
virtual void PrintSpecial (const MachineInstr *MI, raw_ostream &OS, const char *Code) const
 
- Public Member Functions inherited from llvm::FunctionPass
 FunctionPass (char &pid)
 
PasscreatePrinterPass (raw_ostream &O, const std::string &Banner) const
 createPrinterPass - Get a function printer pass. More...
 
virtual void assignPassManager (PMStack &PMS, PassManagerType T)
 
virtual PassManagerType getPotentialPassManagerType () const
 Return what kind of Pass Manager can manage this pass. More...
 
- Public Member Functions inherited from llvm::Pass
 Pass (PassKind K, char &pid)
 
virtual ~Pass ()
 
PassKind getPassKind () const
 
AnalysisID getPassID () const
 getPassID - Return the PassID number that corresponds to this pass. More...
 
virtual void print (raw_ostream &O, const Module *M) const
 
void dump () const
 
virtual void preparePassManager (PMStack &)
 Check if available pass managers are suitable for this pass or not. More...
 
void setResolver (AnalysisResolver *AR)
 
AnalysisResolvergetResolver () const
 
virtual void releaseMemory ()
 
virtual void * getAdjustedAnalysisPointer (AnalysisID ID)
 
virtual ImmutablePassgetAsImmutablePass ()
 
virtual PMDataManagergetAsPMDataManager ()
 
virtual void verifyAnalysis () const
 
virtual void dumpPassStructure (unsigned Offset=0)
 
template<typename AnalysisType >
AnalysisType * getAnalysisIfAvailable () const
 
bool mustPreserveAnalysisID (char &AID) const
 
template<typename AnalysisType >
AnalysisType & getAnalysis () const
 
template<typename AnalysisType >
AnalysisType & getAnalysis (Function &F)
 
template<typename AnalysisType >
AnalysisType & getAnalysisID (AnalysisID PI) const
 
template<typename AnalysisType >
AnalysisType & getAnalysisID (AnalysisID PI, Function &F)
 

Public Attributes

const MipsSubtargetSubtarget
 
const MipsFunctionInfoMipsFI
 
MipsMCInstLower MCInstLowering
 
- Public Attributes inherited from llvm::AsmPrinter
TargetMachineTM
 
const MCAsmInfoMAI
 
const MCInstrInfoMII
 
MCContextOutContext
 
MCStreamerOutStreamer
 
const MachineFunctionMF
 The current machine function. More...
 
MachineModuleInfoMMI
 MMI - This is a pointer to the current MachineModuleInfo. More...
 
ManglerMang
 
MCSymbolCurrentFnSym
 
MCSymbolCurrentFnSymForSize
 

Additional Inherited Members

- Public Types inherited from llvm::AsmPrinter
enum  CFIMoveType { CFI_M_None, CFI_M_EH, CFI_M_Debug }
 
- Static Public Member Functions inherited from llvm::Pass
static const PassInfolookupPassInfo (const void *TI)
 
static const PassInfolookupPassInfo (StringRef Arg)
 
static PasscreatePass (AnalysisID ID)
 
- Protected Member Functions inherited from llvm::AsmPrinter
 AsmPrinter (TargetMachine &TM, MCStreamer &Streamer)
 
- Protected Member Functions inherited from llvm::MachineFunctionPass
 MachineFunctionPass (char &ID)
 

Detailed Description

Definition at line 32 of file MipsAsmPrinter.h.

Constructor & Destructor Documentation

llvm::MipsAsmPrinter::MipsAsmPrinter ( TargetMachine TM,
MCStreamer Streamer 
)
inlineexplicit

Definition at line 61 of file MipsAsmPrinter.h.

References llvm::TargetMachine::getSubtarget().

Member Function Documentation

virtual void llvm::MipsAsmPrinter::EmitConstantPool ( )
inlinevirtual

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 75 of file MipsAsmPrinter.h.

References llvm::AsmPrinter::EmitConstantPool().

void MipsAsmPrinter::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 690 of file MipsAsmPrinter.cpp.

References emitELFHeaderFlagsCG(), llvm::MipsReginfo::emitMipsReginfoSectionCG(), llvm::MipsSubtarget::getMReginfo(), llvm::AsmPrinter::getObjFileLowering(), llvm::AsmPrinter::OutStreamer, and Subtarget.

void MipsAsmPrinter::emitFrameDirective ( )
void MipsAsmPrinter::EmitFunctionBodyEnd ( )
virtual
void MipsAsmPrinter::EmitFunctionBodyStart ( )
virtual
void MipsAsmPrinter::EmitFunctionEntryLabel ( )
virtual
void MipsAsmPrinter::EmitInstruction ( const MachineInstr )
virtual
void MipsAsmPrinter::EmitStartOfAsmFile ( Module )
virtual
const char * MipsAsmPrinter::getCurrentABIString ( ) const
virtual const char* llvm::MipsAsmPrinter::getPassName ( ) const
inlinevirtual

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 69 of file MipsAsmPrinter.h.

bool MipsAsmPrinter::isBlockOnlyReachableByFallthrough ( const MachineBasicBlock MBB) const
virtual

isBlockOnlyReachableByFallthough - Return true if the basic block has exactly one predecessor and the control transfer mechanism between the predecessor and this block is a fall-through.

Reimplemented from llvm::AsmPrinter.

Definition at line 335 of file MipsAsmPrinter.cpp.

References llvm::MachineBasicBlock::begin(), llvm::MachineBasicBlock::empty(), llvm::MachineBasicBlock::end(), llvm::MachineBasicBlock::getBasicBlock(), I, llvm::MachineBasicBlock::isLandingPad(), llvm::MachineBasicBlock::isLayoutSuccessor(), llvm::MachineBasicBlock::pred_begin(), llvm::MachineBasicBlock::pred_empty(), and llvm::MachineBasicBlock::pred_end().

bool MipsAsmPrinter::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 476 of file MipsAsmPrinter.cpp.

References llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::MipsInstPrinter::getRegisterName(), and llvm::MachineOperand::isReg().

bool MipsAsmPrinter::PrintAsmOperand ( const MachineInstr MI,
unsigned  OpNo,
unsigned  AsmVariant,
const char *  ExtraCode,
raw_ostream O 
)
virtual

PrintAsmOperand - 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 375 of file MipsAsmPrinter.cpp.

References llvm::MachineOperand::getImm(), llvm::InlineAsm::getNumOperandRegisters(), llvm::MachineInstr::getNumOperands(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::MipsInstPrinter::getRegisterName(), llvm::MachineOperand::getType(), llvm::MipsSubtarget::isGP64bit(), llvm::MachineOperand::isImm(), llvm::MipsSubtarget::isLittle(), llvm::MachineOperand::isReg(), llvm::StringRef::lower(), llvm::MachineOperand::MO_Immediate, llvm::AsmPrinter::PrintAsmOperand(), printOperand(), Subtarget, and llvm::utohexstr().

void MipsAsmPrinter::PrintDebugValueComment ( const MachineInstr MI,
raw_ostream OS 
)

Definition at line 697 of file MipsAsmPrinter.cpp.

Referenced by EmitInstruction().

void MipsAsmPrinter::printFCCOperand ( const MachineInstr MI,
int  opNum,
raw_ostream O,
const char *  Modifier = 0 
)
void MipsAsmPrinter::printHex32 ( unsigned int  Value,
raw_ostream O 
)

Definition at line 231 of file MipsAsmPrinter.cpp.

References llvm::raw_ostream::write_hex().

Referenced by printSavedRegsBitmask().

void MipsAsmPrinter::printMemOperand ( const MachineInstr MI,
int  opNum,
raw_ostream O 
)

Definition at line 587 of file MipsAsmPrinter.cpp.

References printOperand().

void MipsAsmPrinter::printMemOperandEA ( const MachineInstr MI,
int  opNum,
raw_ostream O 
)

Definition at line 598 of file MipsAsmPrinter.cpp.

References printOperand().

void MipsAsmPrinter::printOperand ( const MachineInstr MI,
int  opNum,
raw_ostream O 
)

Definition at line 496 of file MipsAsmPrinter.cpp.

References llvm::MachineOperand::getBlockAddress(), llvm::AsmPrinter::GetBlockAddressSymbol(), llvm::AsmPrinter::GetExternalSymbolSymbol(), llvm::AsmPrinter::getFunctionNumber(), llvm::MachineOperand::getGlobal(), llvm::MachineOperand::getImm(), llvm::MachineOperand::getIndex(), llvm::MachineOperand::getMBB(), llvm::MCSymbol::getName(), llvm::MachineOperand::getOffset(), llvm::MachineInstr::getOperand(), llvm::MCAsmInfo::getPrivateGlobalPrefix(), llvm::MachineOperand::getReg(), llvm::MipsInstPrinter::getRegisterName(), llvm::AsmPrinter::getSymbol(), llvm::MachineBasicBlock::getSymbol(), llvm::MachineOperand::getSymbolName(), llvm::MachineOperand::getTargetFlags(), llvm::MachineOperand::getType(), llvm_unreachable, llvm::StringRef::lower(), llvm::AsmPrinter::MAI, llvm::MipsII::MO_ABS_HI, llvm::MipsII::MO_ABS_LO, llvm::MachineOperand::MO_BlockAddress, llvm::MachineOperand::MO_ConstantPoolIndex, llvm::MachineOperand::MO_ExternalSymbol, llvm::MachineOperand::MO_GlobalAddress, llvm::MipsII::MO_GOT, llvm::MipsII::MO_GOT_CALL, llvm::MipsII::MO_GOT_DISP, llvm::MipsII::MO_GOT_OFST, llvm::MipsII::MO_GOT_PAGE, llvm::MipsII::MO_GOTTPREL, llvm::MipsII::MO_GPOFF_HI, llvm::MipsII::MO_GPOFF_LO, llvm::MipsII::MO_GPREL, llvm::MachineOperand::MO_Immediate, llvm::MachineOperand::MO_JumpTableIndex, llvm::MachineOperand::MO_MachineBasicBlock, llvm::MachineOperand::MO_Register, llvm::MipsII::MO_TLSGD, llvm::MipsII::MO_TPREL_HI, and llvm::MipsII::MO_TPREL_LO.

Referenced by PrintAsmOperand(), printMemOperand(), printMemOperandEA(), printUnsignedImm(), and printUnsignedImm8().

void MipsAsmPrinter::printSavedRegsBitmask ( raw_ostream O)
void MipsAsmPrinter::printUnsignedImm ( const MachineInstr MI,
int  opNum,
raw_ostream O 
)
void MipsAsmPrinter::printUnsignedImm8 ( const MachineInstr MI,
int  opNum,
raw_ostream O 
)
bool MipsAsmPrinter::runOnMachineFunction ( MachineFunction MF)
virtual

Member Data Documentation

MipsMCInstLower llvm::MipsAsmPrinter::MCInstLowering

Definition at line 59 of file MipsAsmPrinter.h.

Referenced by EmitFunctionBodyStart(), and EmitInstruction().

const MipsFunctionInfo* llvm::MipsAsmPrinter::MipsFI

Definition at line 58 of file MipsAsmPrinter.h.

Referenced by runOnMachineFunction().

const MipsSubtarget* llvm::MipsAsmPrinter::Subtarget

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