LLVM 20.0.0git
|
This class is used to lower an MachineInstr into an MCInst. More...
#include "Target/M68k/M68kMCInstLower.h"
Public Member Functions | |
M68kMCInstLower (MachineFunction &MF, M68kAsmPrinter &AP) | |
MCSymbol * | GetSymbolFromOperand (const MachineOperand &MO) const |
Lower an MO_GlobalAddress or MO_ExternalSymbol operand to an MCSymbol. | |
MCOperand | LowerSymbolOperand (const MachineOperand &MO, MCSymbol *Sym) const |
std::optional< MCOperand > | LowerOperand (const MachineInstr *MI, const MachineOperand &MO) const |
void | Lower (const MachineInstr *MI, MCInst &OutMI) const |
This class is used to lower an MachineInstr into an MCInst.
Definition at line 31 of file M68kMCInstLower.h.
M68kMCInstLower::M68kMCInstLower | ( | MachineFunction & | MF, |
M68kAsmPrinter & | AP | ||
) |
Definition at line 34 of file M68kMCInstLower.cpp.
MCSymbol * M68kMCInstLower::GetSymbolFromOperand | ( | const MachineOperand & | MO | ) | const |
Lower an MO_GlobalAddress or MO_ExternalSymbol operand to an MCSymbol.
Definition at line 39 of file M68kMCInstLower.cpp.
References assert(), DL, llvm::StringRef::empty(), llvm::MachineFunction::getDataLayout(), llvm::MachineOperand::getGlobal(), llvm::MachineOperand::getMBB(), llvm::Mangler::getNameWithPrefix(), llvm::AsmPrinter::getNameWithPrefix(), llvm::MCContext::getOrCreateSymbol(), llvm::MachineBasicBlock::getSymbol(), llvm::MachineOperand::getSymbolName(), llvm::AsmPrinter::getSymbolPreferLocal(), llvm::TargetMachine::getTargetTriple(), llvm::MachineOperand::isGlobal(), llvm::MachineOperand::isMBB(), llvm::MachineOperand::isSymbol(), Name, and Sym.
Referenced by LowerOperand().
void M68kMCInstLower::Lower | ( | const MachineInstr * | MI, |
MCInst & | OutMI | ||
) | const |
Definition at line 160 of file M68kMCInstLower.cpp.
References llvm::MCInst::addOperand(), assert(), llvm::MCInst::getNumOperands(), LowerOperand(), MI, and llvm::MCInst::setOpcode().
std::optional< MCOperand > M68kMCInstLower::LowerOperand | ( | const MachineInstr * | MI, |
const MachineOperand & | MO | ||
) | const |
Definition at line 129 of file M68kMCInstLower.cpp.
References llvm::MCOperand::createImm(), llvm::MCOperand::createReg(), llvm::MachineOperand::getBlockAddress(), llvm::AsmPrinter::GetBlockAddressSymbol(), llvm::AsmPrinter::GetCPISymbol(), llvm::MachineOperand::getImm(), llvm::MachineOperand::getIndex(), llvm::AsmPrinter::GetJTISymbol(), llvm::MachineOperand::getMCSymbol(), llvm::MachineOperand::getReg(), GetSymbolFromOperand(), llvm::MachineOperand::getType(), llvm::MachineOperand::isImplicit(), llvm_unreachable, LowerSymbolOperand(), llvm::MachineOperand::MO_BlockAddress, llvm::MachineOperand::MO_ConstantPoolIndex, llvm::MachineOperand::MO_ExternalSymbol, llvm::MachineOperand::MO_GlobalAddress, llvm::MachineOperand::MO_Immediate, llvm::MachineOperand::MO_JumpTableIndex, llvm::MachineOperand::MO_MachineBasicBlock, llvm::MachineOperand::MO_MCSymbol, llvm::MachineOperand::MO_Register, and llvm::MachineOperand::MO_RegisterMask.
Referenced by Lower().
MCOperand M68kMCInstLower::LowerSymbolOperand | ( | const MachineOperand & | MO, |
MCSymbol * | Sym | ||
) | const |
Definition at line 73 of file M68kMCInstLower.cpp.
References llvm::MCSymbolRefExpr::create(), llvm::MCConstantExpr::create(), llvm::MCBinaryExpr::createAdd(), llvm::MCOperand::createExpr(), llvm::MachineOperand::getOffset(), llvm::MachineOperand::getTargetFlags(), llvm::MachineOperand::isJTI(), llvm::MachineOperand::isMBB(), llvm_unreachable, llvm::M68kII::MO_ABSOLUTE_ADDRESS, llvm::M68kII::MO_GOT, llvm::M68kII::MO_GOTOFF, llvm::M68kII::MO_GOTPCREL, llvm::M68kII::MO_NO_FLAG, llvm::M68kII::MO_PC_RELATIVE_ADDRESS, llvm::M68kII::MO_PLT, llvm::M68kII::MO_TLSGD, llvm::M68kII::MO_TLSIE, llvm::M68kII::MO_TLSLD, llvm::M68kII::MO_TLSLDM, llvm::M68kII::MO_TLSLE, Sym, llvm::MCSymbolRefExpr::VK_GOT, llvm::MCSymbolRefExpr::VK_GOTOFF, llvm::MCSymbolRefExpr::VK_GOTPCREL, llvm::MCSymbolRefExpr::VK_GOTTPOFF, llvm::MCSymbolRefExpr::VK_None, llvm::MCSymbolRefExpr::VK_PLT, llvm::MCSymbolRefExpr::VK_TLSGD, llvm::MCSymbolRefExpr::VK_TLSLD, llvm::MCSymbolRefExpr::VK_TLSLDM, and llvm::MCSymbolRefExpr::VK_TPOFF.
Referenced by LowerOperand().