LLVM
8.0.1
|
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 27 of file MSP430MCInstLower.h.
|
inline |
Definition at line 32 of file MSP430MCInstLower.h.
References LowerSymbolOperand(), and MI.
MCSymbol * MSP430MCInstLower::GetBlockAddressSymbol | ( | const MachineOperand & | MO | ) | const |
Definition at line 86 of file MSP430MCInstLower.cpp.
References llvm::MachineOperand::getBlockAddress(), llvm::AsmPrinter::GetBlockAddressSymbol(), llvm::MachineOperand::getTargetFlags(), llvm_unreachable, and LowerSymbolOperand().
Referenced by GetConstantPoolIndexSymbol(), and Lower().
MCSymbol * MSP430MCInstLower::GetConstantPoolIndexSymbol | ( | const MachineOperand & | MO | ) | const |
Definition at line 69 of file MSP430MCInstLower.cpp.
References GetBlockAddressSymbol(), llvm::AsmPrinter::getDataLayout(), llvm::AsmPrinter::getFunctionNumber(), llvm::MachineOperand::getIndex(), llvm::MCContext::getOrCreateSymbol(), llvm::DataLayout::getPrivateGlobalPrefix(), llvm::MachineOperand::getTargetFlags(), llvm_unreachable, and Name.
Referenced by GetJumpTableSymbol(), and Lower().
MCSymbol * MSP430MCInstLower::GetExternalSymbolSymbol | ( | const MachineOperand & | MO | ) | const |
Definition at line 42 of file MSP430MCInstLower.cpp.
References llvm::AsmPrinter::GetExternalSymbolSymbol(), GetJumpTableSymbol(), llvm::MachineOperand::getSymbolName(), llvm::MachineOperand::getTargetFlags(), and llvm_unreachable.
Referenced by GetGlobalAddressSymbol(), and Lower().
MCSymbol * MSP430MCInstLower::GetGlobalAddressSymbol | ( | const MachineOperand & | MO | ) | const |
Definition at line 32 of file MSP430MCInstLower.cpp.
References GetExternalSymbolSymbol(), 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 52 of file MSP430MCInstLower.cpp.
References GetConstantPoolIndexSymbol(), llvm::AsmPrinter::getDataLayout(), llvm::AsmPrinter::getFunctionNumber(), llvm::MachineOperand::getIndex(), llvm::MCContext::getOrCreateSymbol(), llvm::DataLayout::getPrivateGlobalPrefix(), llvm::MachineOperand::getTargetFlags(), llvm_unreachable, and Name.
Referenced by GetExternalSymbolSymbol(), and Lower().
void MSP430MCInstLower::Lower | ( | const MachineInstr * | MI, |
MCInst & | OutMI | ||
) | const |
Definition at line 116 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(), llvm::MachineOperand::getImm(), GetJumpTableSymbol(), llvm::MachineOperand::getMBB(), llvm::MachineInstr::getNumOperands(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), 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_Register, llvm::MachineOperand::MO_RegisterMask, llvm::MachineInstr::print(), and llvm::MCInst::setOpcode().
MCOperand MSP430MCInstLower::LowerSymbolOperand | ( | const MachineOperand & | MO, |
MCSymbol * | Sym | ||
) | const |
Definition at line 96 of file MSP430MCInstLower.cpp.
References llvm::MCConstantExpr::create(), llvm::MCSymbolRefExpr::create(), llvm::MCBinaryExpr::createAdd(), llvm::MCOperand::createExpr(), llvm::MachineOperand::getOffset(), llvm::MachineOperand::getTargetFlags(), llvm::MachineOperand::isJTI(), and llvm_unreachable.
Referenced by GetBlockAddressSymbol(), and Lower().