LLVM 20.0.0git
|
AArch64MCInstLower - This class is used to lower an MachineInstr into an MCInst. More...
#include "Target/AArch64/AArch64MCInstLower.h"
Public Member Functions | |
AArch64MCInstLower (MCContext &ctx, AsmPrinter &printer) | |
bool | lowerOperand (const MachineOperand &MO, MCOperand &MCOp) const |
void | Lower (const MachineInstr *MI, MCInst &OutMI) const |
MCOperand | lowerSymbolOperandMachO (const MachineOperand &MO, MCSymbol *Sym) const |
MCOperand | lowerSymbolOperandELF (const MachineOperand &MO, MCSymbol *Sym) const |
MCOperand | lowerSymbolOperandCOFF (const MachineOperand &MO, MCSymbol *Sym) const |
MCOperand | LowerSymbolOperand (const MachineOperand &MO, MCSymbol *Sym) const |
MCSymbol * | GetGlobalValueSymbol (const GlobalValue *GV, unsigned TargetFlags) const |
MCSymbol * | GetGlobalAddressSymbol (const MachineOperand &MO) const |
MCSymbol * | GetExternalSymbolSymbol (const MachineOperand &MO) const |
AArch64MCInstLower - This class is used to lower an MachineInstr into an MCInst.
Definition at line 27 of file AArch64MCInstLower.h.
AArch64MCInstLower::AArch64MCInstLower | ( | MCContext & | ctx, |
AsmPrinter & | printer | ||
) |
Definition at line 37 of file AArch64MCInstLower.cpp.
MCSymbol * AArch64MCInstLower::GetExternalSymbolSymbol | ( | const MachineOperand & | MO | ) | const |
Definition at line 145 of file AArch64MCInstLower.cpp.
References llvm::AsmPrinter::GetExternalSymbolSymbol(), and llvm::MachineOperand::getSymbolName().
Referenced by lowerOperand().
MCSymbol * AArch64MCInstLower::GetGlobalAddressSymbol | ( | const MachineOperand & | MO | ) | const |
Definition at line 41 of file AArch64MCInstLower.cpp.
References llvm::MachineOperand::getGlobal(), GetGlobalValueSymbol(), and llvm::MachineOperand::getTargetFlags().
Referenced by lowerOperand().
MCSymbol * AArch64MCInstLower::GetGlobalValueSymbol | ( | const GlobalValue * | GV, |
unsigned | TargetFlags | ||
) | const |
Definition at line 45 of file AArch64MCInstLower.cpp.
References assert(), llvm::MCSymbolRefExpr::create(), llvm::getArm64ECMangledFunctionName(), llvm::MachineModuleInfoCOFF::getGVStubEntry(), llvm::TargetLoweringObjectFile::getMangler(), llvm::MCSymbol::getName(), llvm::TargetMachine::getNameWithPrefix(), llvm::MachineModuleInfo::getObjFileInfo(), llvm::AsmPrinter::getObjFileLowering(), llvm::MCContext::getOrCreateSymbol(), llvm::AsmPrinter::getSymbol(), llvm::AsmPrinter::getSymbolPreferLocal(), llvm::TargetMachine::getTargetTriple(), llvm::GlobalValue::hasExternalLinkage(), llvm::is_contained(), llvm::Triple::isOSBinFormatCOFF(), llvm::Triple::isOSWindows(), llvm::Triple::isWindowsArm64EC(), llvm::MCSA_Global, llvm::MCSA_WeakAntiDep, llvm::AsmPrinter::MMI, llvm::AArch64II::MO_ARM64EC_CALLMANGLE, llvm::AArch64II::MO_COFFSTUB, llvm::AArch64II::MO_DLLIMPORT, Name, llvm::AsmPrinter::OutStreamer, llvm::AsmPrinter::TM, and llvm::MCSymbolRefExpr::VK_WEAKREF.
Referenced by GetGlobalAddressSymbol().
void AArch64MCInstLower::Lower | ( | const MachineInstr * | MI, |
MCInst & | OutMI | ||
) | const |
Definition at line 372 of file AArch64MCInstLower.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createReg(), llvm::MCInst::getOpcode(), lowerOperand(), MI, and llvm::MCInst::setOpcode().
bool AArch64MCInstLower::lowerOperand | ( | const MachineOperand & | MO, |
MCOperand & | MCOp | ||
) | const |
Definition at line 328 of file AArch64MCInstLower.cpp.
References llvm::MCSymbolRefExpr::create(), llvm::MCOperand::createExpr(), llvm::MCOperand::createImm(), llvm::MCOperand::createReg(), llvm::MachineOperand::getBlockAddress(), llvm::AsmPrinter::GetBlockAddressSymbol(), llvm::AsmPrinter::GetCPISymbol(), GetExternalSymbolSymbol(), GetGlobalAddressSymbol(), llvm::MachineOperand::getImm(), llvm::MachineOperand::getIndex(), llvm::AsmPrinter::GetJTISymbol(), llvm::MachineOperand::getMBB(), llvm::MachineOperand::getMCSymbol(), llvm::MachineOperand::getReg(), llvm::MachineBasicBlock::getSymbol(), 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 AArch64MCInstLower::LowerSymbolOperand | ( | const MachineOperand & | MO, |
MCSymbol * | Sym | ||
) | const |
Definition at line 317 of file AArch64MCInstLower.cpp.
References assert(), llvm::TargetMachine::getTargetTriple(), llvm::Triple::isOSBinFormatCOFF(), llvm::Triple::isOSBinFormatELF(), llvm::Triple::isOSBinFormatMachO(), lowerSymbolOperandCOFF(), lowerSymbolOperandELF(), lowerSymbolOperandMachO(), Sym, and llvm::AsmPrinter::TM.
Referenced by lowerOperand().
MCOperand AArch64MCInstLower::lowerSymbolOperandCOFF | ( | const MachineOperand & | MO, |
MCSymbol * | Sym | ||
) | const |
Definition at line 261 of file AArch64MCInstLower.cpp.
References assert(), llvm::AArch64MCExpr::create(), llvm::MCSymbolRefExpr::create(), llvm::MCConstantExpr::create(), llvm::MCBinaryExpr::createAdd(), llvm::MCOperand::createExpr(), llvm::MachineOperand::getOffset(), llvm::MachineOperand::getTargetFlags(), llvm::MachineOperand::isJTI(), llvm::AArch64II::MO_FRAGMENT, llvm::AArch64II::MO_G0, llvm::AArch64II::MO_G1, llvm::AArch64II::MO_G2, llvm::AArch64II::MO_G3, llvm::AArch64II::MO_HI12, llvm::AArch64II::MO_NC, llvm::AArch64II::MO_PAGE, llvm::AArch64II::MO_PAGEOFF, llvm::AArch64II::MO_S, llvm::AArch64II::MO_TLS, Sym, llvm::AArch64MCExpr::VK_ABS, llvm::AArch64MCExpr::VK_G0, llvm::AArch64MCExpr::VK_G1, llvm::AArch64MCExpr::VK_G2, llvm::AArch64MCExpr::VK_G3, llvm::AArch64MCExpr::VK_INVALID, llvm::AArch64MCExpr::VK_NC, llvm::MCSymbolRefExpr::VK_None, llvm::AArch64MCExpr::VK_PAGE, llvm::AArch64MCExpr::VK_PAGEOFF, llvm::AArch64MCExpr::VK_SABS, llvm::AArch64MCExpr::VK_SECREL_HI12, and llvm::AArch64MCExpr::VK_SECREL_LO12.
Referenced by LowerSymbolOperand().
MCOperand AArch64MCInstLower::lowerSymbolOperandELF | ( | const MachineOperand & | MO, |
MCSymbol * | Sym | ||
) | const |
Definition at line 184 of file AArch64MCInstLower.cpp.
References assert(), llvm::AArch64MCExpr::create(), llvm::MCSymbolRefExpr::create(), llvm::MCConstantExpr::create(), llvm::MCBinaryExpr::createAdd(), llvm::MCOperand::createExpr(), EnableAArch64ELFLocalDynamicTLSGeneration, llvm::TLSModel::GeneralDynamic, llvm::MachineOperand::getGlobal(), llvm::MachineOperand::getOffset(), llvm::MachineOperand::getSymbolName(), llvm::MachineOperand::getTargetFlags(), llvm::TargetMachine::getTLSModel(), llvm::TLSModel::InitialExec, llvm::MachineOperand::isGlobal(), llvm::MachineOperand::isJTI(), llvm::MachineOperand::isSymbol(), llvm::TLSModel::LocalDynamic, llvm::TLSModel::LocalExec, llvm::AArch64II::MO_FRAGMENT, llvm::AArch64II::MO_G0, llvm::AArch64II::MO_G1, llvm::AArch64II::MO_G2, llvm::AArch64II::MO_G3, llvm::AArch64II::MO_GOT, llvm::AArch64II::MO_HI12, llvm::AArch64II::MO_NC, llvm::AArch64II::MO_PAGE, llvm::AArch64II::MO_PAGEOFF, llvm::AArch64II::MO_PREL, llvm::AArch64II::MO_TLS, Sym, llvm::AsmPrinter::TM, llvm::AArch64MCExpr::VK_ABS, llvm::AArch64MCExpr::VK_DTPREL, llvm::AArch64MCExpr::VK_G0, llvm::AArch64MCExpr::VK_G1, llvm::AArch64MCExpr::VK_G2, llvm::AArch64MCExpr::VK_G3, llvm::AArch64MCExpr::VK_GOT, llvm::AArch64MCExpr::VK_GOTTPREL, llvm::AArch64MCExpr::VK_HI12, llvm::AArch64MCExpr::VK_NC, llvm::MCSymbolRefExpr::VK_None, llvm::AArch64MCExpr::VK_PAGE, llvm::AArch64MCExpr::VK_PAGEOFF, llvm::AArch64MCExpr::VK_PREL, llvm::AArch64MCExpr::VK_TLSDESC, and llvm::AArch64MCExpr::VK_TPREL.
Referenced by LowerSymbolOperand().
MCOperand AArch64MCInstLower::lowerSymbolOperandMachO | ( | const MachineOperand & | MO, |
MCSymbol * | Sym | ||
) | const |
Definition at line 149 of file AArch64MCInstLower.cpp.
References llvm::MCSymbolRefExpr::create(), llvm::MCConstantExpr::create(), llvm::MCBinaryExpr::createAdd(), llvm::MCOperand::createExpr(), llvm::MachineOperand::getOffset(), llvm::MachineOperand::getTargetFlags(), llvm::MachineOperand::isJTI(), llvm_unreachable, llvm::AArch64II::MO_FRAGMENT, llvm::AArch64II::MO_GOT, llvm::AArch64II::MO_PAGE, llvm::AArch64II::MO_PAGEOFF, llvm::AArch64II::MO_TLS, Sym, llvm::MCSymbolRefExpr::VK_GOTPAGE, llvm::MCSymbolRefExpr::VK_GOTPAGEOFF, llvm::MCSymbolRefExpr::VK_None, llvm::MCSymbolRefExpr::VK_PAGE, llvm::MCSymbolRefExpr::VK_PAGEOFF, llvm::MCSymbolRefExpr::VK_TLVPPAGE, and llvm::MCSymbolRefExpr::VK_TLVPPAGEOFF.
Referenced by LowerSymbolOperand().