LLVM 20.0.0git
|
#include "Target/Lanai/LanaiMCInstLower.h"
Public Member Functions | |
LanaiMCInstLower (MCContext &CTX, AsmPrinter &AP) | |
void | Lower (const MachineInstr *MI, MCInst &OutMI) const |
MCOperand | LowerSymbolOperand (const MachineOperand &MO, MCSymbol *Sym) const |
MCSymbol * | GetGlobalAddressSymbol (const MachineOperand &MO) const |
MCSymbol * | GetBlockAddressSymbol (const MachineOperand &MO) const |
MCSymbol * | GetExternalSymbolSymbol (const MachineOperand &MO) const |
MCSymbol * | GetJumpTableSymbol (const MachineOperand &MO) const |
MCSymbol * | GetConstantPoolIndexSymbol (const MachineOperand &MO) const |
Definition at line 25 of file LanaiMCInstLower.h.
|
inline |
Definition at line 31 of file LanaiMCInstLower.h.
MCSymbol * LanaiMCInstLower::GetBlockAddressSymbol | ( | const MachineOperand & | MO | ) | const |
Definition at line 37 of file LanaiMCInstLower.cpp.
References llvm::MachineOperand::getBlockAddress(), and llvm::AsmPrinter::GetBlockAddressSymbol().
Referenced by Lower().
MCSymbol * LanaiMCInstLower::GetConstantPoolIndexSymbol | ( | const MachineOperand & | MO | ) | const |
Definition at line 56 of file LanaiMCInstLower.cpp.
References llvm::AsmPrinter::getFunctionNumber(), llvm::MachineOperand::getIndex(), llvm::MCContext::getOrCreateSymbol(), llvm::MCAsmInfo::getPrivateGlobalPrefix(), llvm::AsmPrinter::MAI, and Name.
Referenced by Lower().
MCSymbol * LanaiMCInstLower::GetExternalSymbolSymbol | ( | const MachineOperand & | MO | ) | const |
Definition at line 42 of file LanaiMCInstLower.cpp.
References llvm::AsmPrinter::GetExternalSymbolSymbol(), and llvm::MachineOperand::getSymbolName().
Referenced by Lower().
MCSymbol * LanaiMCInstLower::GetGlobalAddressSymbol | ( | const MachineOperand & | MO | ) | const |
Definition at line 32 of file LanaiMCInstLower.cpp.
References llvm::MachineOperand::getGlobal(), and llvm::AsmPrinter::getSymbol().
Referenced by Lower().
MCSymbol * LanaiMCInstLower::GetJumpTableSymbol | ( | const MachineOperand & | MO | ) | const |
Definition at line 46 of file LanaiMCInstLower.cpp.
References llvm::AsmPrinter::getFunctionNumber(), llvm::MachineOperand::getIndex(), llvm::MCContext::getOrCreateSymbol(), llvm::MCAsmInfo::getPrivateGlobalPrefix(), llvm::AsmPrinter::MAI, and Name.
Referenced by Lower().
void LanaiMCInstLower::Lower | ( | const MachineInstr * | MI, |
MCInst & | OutMI | ||
) | const |
Definition at line 92 of file LanaiMCInstLower.cpp.
References llvm::MCInst::addOperand(), llvm::MCSymbolRefExpr::create(), llvm::MCOperand::createExpr(), llvm::MCOperand::createImm(), llvm::MCOperand::createReg(), llvm::errs(), GetBlockAddressSymbol(), GetConstantPoolIndexSymbol(), GetExternalSymbolSymbol(), GetGlobalAddressSymbol(), GetJumpTableSymbol(), llvm_unreachable, LowerSymbolOperand(), MI, 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_Register, llvm::MachineOperand::MO_RegisterMask, llvm::Pass::print(), and llvm::MCInst::setOpcode().
MCOperand LanaiMCInstLower::LowerSymbolOperand | ( | const MachineOperand & | MO, |
MCSymbol * | Sym | ||
) | const |
Definition at line 65 of file LanaiMCInstLower.cpp.
References llvm::MCSymbolRefExpr::create(), llvm::MCConstantExpr::create(), llvm::LanaiMCExpr::create(), llvm::MCBinaryExpr::createAdd(), llvm::MCOperand::createExpr(), llvm::MachineOperand::getOffset(), llvm::MachineOperand::getTargetFlags(), llvm::MachineOperand::isJTI(), llvm_unreachable, llvm::LanaiII::MO_ABS_HI, llvm::LanaiII::MO_ABS_LO, llvm::LanaiII::MO_NO_FLAG, Sym, llvm::LanaiMCExpr::VK_Lanai_ABS_HI, llvm::LanaiMCExpr::VK_Lanai_ABS_LO, llvm::LanaiMCExpr::VK_Lanai_None, and llvm::MCSymbolRefExpr::VK_None.
Referenced by Lower().