LLVM API Documentation

Public Member Functions | Public Attributes
llvm::MipsAsmPrinter Class Reference

#include <MipsAsmPrinter.h>

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

List of all members.

Public Member Functions

 MipsAsmPrinter (TargetMachine &TM, MCStreamer &Streamer)
virtual const char * getPassName () const
virtual bool runOnMachineFunction (MachineFunction &MF)
void EmitInstruction (const MachineInstr *MI)
 EmitInstruction - Targets should implement this to emit instructions.
void printSavedRegsBitmask (raw_ostream &O)
void printHex32 (unsigned int Value, raw_ostream &O)
void emitFrameDirective ()
 Frame Directive.
const char * getCurrentABIString () const
 Emit Set directives.
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 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)
virtual MachineLocation getDebugValueLocation (const MachineInstr *MI) const
void PrintDebugValueComment (const MachineInstr *MI, raw_ostream &OS)

Public Attributes

const MipsSubtargetSubtarget
const MipsFunctionInfoMipsFI
MipsMCInstLower MCInstLowering

Detailed Description

Definition at line 31 of file MipsAsmPrinter.h.


Constructor & Destructor Documentation

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

Definition at line 49 of file MipsAsmPrinter.h.

References llvm::TargetMachine::getSubtarget().


Member Function Documentation

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

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

void MipsAsmPrinter::emitFrameDirective ( )
void MipsAsmPrinter::EmitFunctionBodyEnd ( ) [virtual]

EmitFunctionBodyEnd - Targets can override this to emit stuff after the last basic block in the function.

Reimplemented from llvm::AsmPrinter.

Definition at line 275 of file MipsAsmPrinter.cpp.

References llvm::AsmPrinter::CurrentFnSym, llvm::MCStreamer::EmitRawText(), llvm::MCSymbol::getName(), llvm::MCStreamer::hasRawTextSupport(), llvm::MipsSubtarget::inMips16Mode(), llvm::AsmPrinter::OutStreamer, and Subtarget.

void MipsAsmPrinter::EmitFunctionBodyStart ( ) [virtual]
void MipsAsmPrinter::EmitFunctionEntryLabel ( ) [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 229 of file MipsAsmPrinter.cpp.

References llvm::AsmPrinter::CurrentFnSym, llvm::MCStreamer::EmitLabel(), llvm::MCStreamer::EmitRawText(), llvm::MCSymbol::getName(), llvm::MCStreamer::hasRawTextSupport(), llvm::MipsSubtarget::inMicroMipsMode(), llvm::MipsSubtarget::inMips16Mode(), llvm::AsmPrinter::OutStreamer, llvm::ELF::STO_MIPS_MICROMIPS, and Subtarget.

void MipsAsmPrinter::EmitInstruction ( const MachineInstr ) [virtual]
void MipsAsmPrinter::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 557 of file MipsAsmPrinter.cpp.

References llvm::MCStreamer::EmitRawText(), getCurrentABIString(), llvm::MCStreamer::hasRawTextSupport(), llvm::MipsSubtarget::isABI_EABI(), llvm::MipsSubtarget::isGP32bit(), llvm::AsmPrinter::OutStreamer, and Subtarget.

const char * MipsAsmPrinter::getCurrentABIString ( ) const
MachineLocation MipsAsmPrinter::getDebugValueLocation ( const MachineInstr MI) const [virtual]

getDebugValueLocation - Get location information encoded by DBG_VALUE operands.

Reimplemented from llvm::AsmPrinter.

Definition at line 593 of file MipsAsmPrinter.cpp.

References llvm::MachineOperand::getImm(), llvm::MachineInstr::getNumOperands(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::MachineOperand::isImm(), and llvm::MachineOperand::isReg().

virtual const char* llvm::MipsAsmPrinter::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 54 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 292 of file MipsAsmPrinter.cpp.

References llvm::MachineBasicBlock::begin(), llvm::MachineBasicBlock::empty(), llvm::MachineBasicBlock::end(), llvm::MachineBasicBlock::getBasicBlock(), llvm::ARM_PROC::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 428 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 332 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, printOperand(), Subtarget, and llvm::utohexstr().

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

Definition at line 602 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 193 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 530 of file MipsAsmPrinter.cpp.

References printOperand().

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

Definition at line 541 of file MipsAsmPrinter.cpp.

References printOperand().

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

Definition at line 448 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::Mangler::getSymbol(), llvm::MachineBasicBlock::getSymbol(), llvm::MachineOperand::getSymbolName(), llvm::MachineOperand::getTargetFlags(), llvm::MachineOperand::getType(), llvm_unreachable, llvm::StringRef::lower(), llvm::AsmPrinter::MAI, llvm::AsmPrinter::Mang, 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(), and printUnsignedImm().

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

runOnMachineFunction - Emit the specified function out to the OutStreamer.

Reimplemented from llvm::AsmPrinter.

Definition at line 48 of file MipsAsmPrinter.cpp.

References llvm::MipsSubtarget::allowMixed16_32(), llvm::MachineFunction::getInfo(), llvm::AsmPrinter::getObjFileLowering(), MipsFI, llvm::AsmPrinter::OutContext, Subtarget, and llvm::AsmPrinter::TM.


Member Data Documentation

Definition at line 47 of file MipsAsmPrinter.h.

Referenced by EmitFunctionBodyStart(), and EmitInstruction().

Definition at line 46 of file MipsAsmPrinter.h.

Referenced by runOnMachineFunction().


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