LLVM 20.0.0git
|
MSP430MCInstLower - This class is used to lower an MachineInstr into an MCInst. More...
#include "Target/MSP430/MSP430MCInstLower.h"
Public Member Functions | |
MSP430MCInstLower (MCContext &ctx, AsmPrinter &printer) | |
void | Lower (const MachineInstr *MI, MCInst &OutMI) const |
MCOperand | LowerSymbolOperand (const MachineOperand &MO, MCSymbol *Sym) const |
MCSymbol * | GetGlobalAddressSymbol (const MachineOperand &MO) const |
MCSymbol * | GetExternalSymbolSymbol (const MachineOperand &MO) const |
MCSymbol * | GetJumpTableSymbol (const MachineOperand &MO) const |
MCSymbol * | GetConstantPoolIndexSymbol (const MachineOperand &MO) const |
MCSymbol * | GetBlockAddressSymbol (const MachineOperand &MO) const |
MSP430MCInstLower - This class is used to lower an MachineInstr into an MCInst.
Definition at line 25 of file MSP430MCInstLower.h.
|
inline |
Definition at line 30 of file MSP430MCInstLower.h.
MCSymbol * MSP430MCInstLower::GetBlockAddressSymbol | ( | const MachineOperand & | MO | ) | const |
Definition at line 84 of file MSP430MCInstLower.cpp.
References llvm::MachineOperand::getBlockAddress(), llvm::AsmPrinter::GetBlockAddressSymbol(), llvm::MachineOperand::getTargetFlags(), and llvm_unreachable.
Referenced by Lower().
MCSymbol * MSP430MCInstLower::GetConstantPoolIndexSymbol | ( | const MachineOperand & | MO | ) | const |
Definition at line 67 of file MSP430MCInstLower.cpp.
References DL, llvm::AsmPrinter::getDataLayout(), llvm::AsmPrinter::getFunctionNumber(), llvm::MachineOperand::getIndex(), llvm::MCContext::getOrCreateSymbol(), llvm::MachineOperand::getTargetFlags(), llvm_unreachable, and Name.
Referenced by Lower().
MCSymbol * MSP430MCInstLower::GetExternalSymbolSymbol | ( | const MachineOperand & | MO | ) | const |
Definition at line 40 of file MSP430MCInstLower.cpp.
References llvm::AsmPrinter::GetExternalSymbolSymbol(), llvm::MachineOperand::getSymbolName(), llvm::MachineOperand::getTargetFlags(), and llvm_unreachable.
Referenced by Lower().
MCSymbol * MSP430MCInstLower::GetGlobalAddressSymbol | ( | const MachineOperand & | MO | ) | const |
Definition at line 30 of file MSP430MCInstLower.cpp.
References llvm::MachineOperand::getGlobal(), llvm::AsmPrinter::getSymbol(), llvm::MachineOperand::getTargetFlags(), and llvm_unreachable.
Referenced by Lower().
MCSymbol * MSP430MCInstLower::GetJumpTableSymbol | ( | const MachineOperand & | MO | ) | const |
Definition at line 50 of file MSP430MCInstLower.cpp.
References DL, llvm::AsmPrinter::getDataLayout(), llvm::AsmPrinter::getFunctionNumber(), llvm::MachineOperand::getIndex(), llvm::MCContext::getOrCreateSymbol(), llvm::MachineOperand::getTargetFlags(), llvm_unreachable, and Name.
Referenced by Lower().
void MSP430MCInstLower::Lower | ( | const MachineInstr * | MI, |
MCInst & | OutMI | ||
) | const |
Definition at line 115 of file MSP430MCInstLower.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 MSP430MCInstLower::LowerSymbolOperand | ( | const MachineOperand & | MO, |
MCSymbol * | Sym | ||
) | const |
Definition at line 94 of file MSP430MCInstLower.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, and Sym.
Referenced by Lower().