LLVM
8.0.1
|
MipsMCInstLower - This class is used to lower an MachineInstr into an MCInst. More...
#include "Target/Mips/MipsMCInstLower.h"
Public Member Functions | |
MipsMCInstLower (MipsAsmPrinter &asmprinter) | |
void | Initialize (MCContext *C) |
void | Lower (const MachineInstr *MI, MCInst &OutMI) const |
MCOperand | LowerOperand (const MachineOperand &MO, unsigned offset=0) const |
MipsMCInstLower - This class is used to lower an MachineInstr into an MCInst.
Definition at line 28 of file MipsMCInstLower.h.
MipsMCInstLower::MipsMCInstLower | ( | MipsAsmPrinter & | asmprinter | ) |
Definition at line 29 of file MipsMCInstLower.cpp.
void MipsMCInstLower::Initialize | ( | MCContext * | C | ) |
Definition at line 32 of file MipsMCInstLower.cpp.
References assert(), C, llvm::MipsMCExpr::create(), llvm::MCConstantExpr::create(), llvm::MCSymbolRefExpr::create(), llvm::MCBinaryExpr::createAdd(), llvm::MCOperand::createExpr(), llvm::MipsMCExpr::createGpOff(), llvm::MachineOperand::getBlockAddress(), llvm::AsmPrinter::GetBlockAddressSymbol(), llvm::AsmPrinter::GetCPISymbol(), llvm::AsmPrinter::GetExternalSymbolSymbol(), llvm::MachineOperand::getGlobal(), llvm::MachineOperand::getIndex(), llvm::AsmPrinter::GetJTISymbol(), llvm::MachineOperand::getMBB(), llvm::MachineOperand::getMCSymbol(), llvm::MachineOperand::getOffset(), llvm::AsmPrinter::getSymbol(), llvm::MachineBasicBlock::getSymbol(), llvm::MachineOperand::getSymbolName(), llvm::MachineOperand::getTargetFlags(), Kind, llvm_unreachable, llvm::MipsMCExpr::MEK_CALL_HI16, llvm::MipsMCExpr::MEK_CALL_LO16, llvm::MipsMCExpr::MEK_DTPREL_HI, llvm::MipsMCExpr::MEK_DTPREL_LO, llvm::MipsMCExpr::MEK_GOT, llvm::MipsMCExpr::MEK_GOT_CALL, llvm::MipsMCExpr::MEK_GOT_DISP, llvm::MipsMCExpr::MEK_GOT_HI16, llvm::MipsMCExpr::MEK_GOT_LO16, llvm::MipsMCExpr::MEK_GOT_OFST, llvm::MipsMCExpr::MEK_GOT_PAGE, llvm::MipsMCExpr::MEK_GOTTPREL, llvm::MipsMCExpr::MEK_GPREL, llvm::MipsMCExpr::MEK_HI, llvm::MipsMCExpr::MEK_HIGHER, llvm::MipsMCExpr::MEK_HIGHEST, llvm::MipsMCExpr::MEK_LO, llvm::MipsMCExpr::MEK_None, llvm::MipsMCExpr::MEK_TLSGD, llvm::MipsMCExpr::MEK_TLSLDM, llvm::MipsMCExpr::MEK_TPREL_HI, llvm::MipsMCExpr::MEK_TPREL_LO, llvm::MipsII::MO_ABS_HI, llvm::MipsII::MO_ABS_LO, llvm::MachineOperand::MO_BlockAddress, llvm::MipsII::MO_CALL_HI16, llvm::MipsII::MO_CALL_LO16, llvm::MachineOperand::MO_ConstantPoolIndex, llvm::MipsII::MO_DTPREL_HI, llvm::MipsII::MO_DTPREL_LO, 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_HI16, llvm::MipsII::MO_GOT_LO16, 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::MipsII::MO_HIGHER, llvm::MipsII::MO_HIGHEST, llvm::MipsII::MO_JALR, llvm::MachineOperand::MO_JumpTableIndex, llvm::MachineOperand::MO_MachineBasicBlock, llvm::MachineOperand::MO_MCSymbol, llvm::MipsII::MO_NO_FLAG, llvm::MipsII::MO_TLSGD, llvm::MipsII::MO_TLSLDM, llvm::MipsII::MO_TPREL_HI, llvm::MipsII::MO_TPREL_LO, llvm::ARMBuildAttrs::Symbol, and llvm::MCSymbolRefExpr::VK_None.
Referenced by llvm::MipsAsmPrinter::EmitFunctionBodyStart().
void MipsMCInstLower::Lower | ( | const MachineInstr * | MI, |
MCInst & | OutMI | ||
) | const |
Definition at line 318 of file MipsMCInstLower.cpp.
References llvm::MCInst::addOperand(), llvm::MachineInstr::getNumOperands(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MCOperand::isValid(), LowerOperand(), and llvm::MCInst::setOpcode().
Referenced by llvm::MipsAsmPrinter::EmitInstruction().
MCOperand MipsMCInstLower::LowerOperand | ( | const MachineOperand & | MO, |
unsigned | offset = 0 |
||
) | const |
Definition at line 180 of file MipsMCInstLower.cpp.
References llvm::MCInst::addOperand(), llvm::MipsMCExpr::create(), llvm::MCSymbolRefExpr::create(), llvm::MCOperand::createExpr(), llvm::MCOperand::createImm(), llvm::MCOperand::createReg(), llvm::MCBinaryExpr::createSub(), E, llvm::MachineOperand::getImm(), llvm::MachineOperand::getMBB(), llvm::MachineInstr::getNumOperands(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::MachineBasicBlock::getSymbol(), llvm::MachineOperand::getTargetFlags(), llvm::MachineOperand::getType(), I, llvm::MachineOperand::isImplicit(), Kind, llvm_unreachable, llvm::MipsMCExpr::MEK_HI, llvm::MipsMCExpr::MEK_HIGHER, llvm::MipsMCExpr::MEK_HIGHEST, llvm::MipsMCExpr::MEK_LO, MI, 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_HIGHER, llvm::MipsII::MO_HIGHEST, llvm::MachineOperand::MO_Immediate, llvm::MachineOperand::MO_JumpTableIndex, llvm::MachineOperand::MO_MachineBasicBlock, llvm::MachineOperand::MO_MCSymbol, llvm::MachineOperand::MO_Register, llvm::MachineOperand::MO_RegisterMask, llvm::report_fatal_error(), and llvm::MCInst::setOpcode().
Referenced by Lower(), and llvm::MipsAsmPrinter::runOnMachineFunction().