|
LLVM 22.0.0git
|
#include "Target/Mips/Mips16InstrInfo.h"
Static Public Member Functions | |
| static bool | validImmediate (unsigned Opcode, unsigned Reg, int64_t Amount) |
| static bool | validSpImm8 (int offset) |
| Static Public Member Functions inherited from llvm::MipsInstrInfo | |
| static const MipsInstrInfo * | create (MipsSubtarget &STI) |
Protected Member Functions | |
| std::optional< DestSourcePair > | isCopyInstrImpl (const MachineInstr &MI) const override |
| If the specific machine instruction is a instruction that moves/copies value from one register to another register return destination and source registers as machine operands. | |
| Protected Member Functions inherited from llvm::MipsInstrInfo | |
| bool | isZeroImm (const MachineOperand &op) const |
| MachineMemOperand * | GetMemOperand (MachineBasicBlock &MBB, int FI, MachineMemOperand::Flags Flags) const |
Additional Inherited Members | |
| Public Types inherited from llvm::MipsInstrInfo | |
| enum | BranchType { BT_None , BT_NoBranch , BT_Uncond , BT_Cond , BT_CondUncond , BT_Indirect } |
| Protected Attributes inherited from llvm::MipsInstrInfo | |
| const MipsSubtarget & | Subtarget |
| unsigned | UncondBrOpc |
Definition at line 27 of file Mips16InstrInfo.h.
|
explicit |
Definition at line 39 of file Mips16InstrInfo.cpp.
References llvm::MipsInstrInfo::MipsInstrInfo().
| const MCInstrDesc & Mips16InstrInfo::AddiuSpImm | ( | int64_t | Imm | ) | const |
Definition at line 447 of file Mips16InstrInfo.cpp.
References llvm::get(), and validSpImm8().
Referenced by BuildAddiuSpImm().
|
overridevirtual |
Adjust SP by Amount bytes.
Implements llvm::MipsInstrInfo.
Definition at line 300 of file Mips16InstrInfo.cpp.
References BuildAddiuSpImm(), I, llvm::isInt(), and MBB.
| void Mips16InstrInfo::BuildAddiuSpImm | ( | MachineBasicBlock & | MBB, |
| MachineBasicBlock::iterator | I, | ||
| int64_t | Imm ) const |
Definition at line 454 of file Mips16InstrInfo.cpp.
References llvm::MachineInstrBuilder::addImm(), AddiuSpImm(), llvm::BuildMI(), DL, I, and MBB.
Referenced by adjustStackPtr(), makeFrame(), and restoreFrame().
|
override |
Definition at line 62 of file Mips16InstrInfo.cpp.
References llvm::MachineInstrBuilder::addReg(), assert(), llvm::BuildMI(), contains(), llvm::RegState::Define, DL, llvm::get(), llvm::getKillRegState(), I, MBB, and Opc.
Referenced by loadImmediate().
|
override |
Definition at line 136 of file Mips16InstrInfo.cpp.
GetOppositeBranchOpc - Return the inverse of the specified opcode, e.g.
turning BEQ to BNE.
Implements llvm::MipsInstrInfo.
Definition at line 152 of file Mips16InstrInfo.cpp.
References llvm_unreachable, and Opc.
|
inline |
Definition at line 33 of file Mips16InstrInfo.h.
|
overrideprotected |
If the specific machine instruction is a instruction that moves/copies value from one register to another register return destination and source registers as machine operands.
Definition at line 94 of file Mips16InstrInfo.cpp.
References MI.
|
override |
isLoadFromStackSlot - If the specified machine instruction is a direct load from a stack slot, return the virtual or physical register number of the destination along with the FrameIndex of the loaded stack slot.
If not, return 0. This predicate must return 0 if the instruction has any side effects other than loading from the stack slot.
Definition at line 47 of file Mips16InstrInfo.cpp.
References MI.
|
override |
isStoreToStackSlot - If the specified machine instruction is a direct store to a stack slot, return the virtual or physical register number of the source reg along with the FrameIndex of the loaded stack slot.
If not, return 0. This predicate must return 0 if the instruction has any side effects other than storing to the stack slot.
Definition at line 57 of file Mips16InstrInfo.cpp.
References MI.
| unsigned Mips16InstrInfo::loadImmediate | ( | unsigned | FrameReg, |
| int64_t | Imm, | ||
| MachineBasicBlock & | MBB, | ||
| MachineBasicBlock::iterator | II, | ||
| const DebugLoc & | DL, | ||
| unsigned & | NewImm ) const |
Emit a series of instructions to load an immediate.
This function generates the sequence of instructions needed to get the result of adding register REG and immediate IMM.
Definition at line 314 of file Mips16InstrInfo.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), Available, llvm::RegScavenger::backward(), llvm::BuildMI(), copyPhysReg(), DL, llvm::RegScavenger::enterBasicBlockEnd(), llvm::BitVector::find_first(), llvm::get(), llvm::RegScavenger::getRegsAvailable(), II, llvm::RegState::Kill, MBB, and llvm::BitVector::reset().
|
overridevirtual |
Implements llvm::MipsInstrInfo.
Definition at line 118 of file Mips16InstrInfo.cpp.
References llvm::MachineInstrBuilder::addFrameIndex(), llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addMemOperand(), assert(), llvm::BuildMI(), DL, llvm::get(), llvm::MipsInstrInfo::GetMemOperand(), I, MBB, llvm::MachineMemOperand::MOLoad, llvm::Offset, and Opc.
| void Mips16InstrInfo::makeFrame | ( | unsigned | SP, |
| int64_t | FrameSize, | ||
| MachineBasicBlock & | MBB, | ||
| MachineBasicBlock::iterator | I ) const |
Definition at line 204 of file Mips16InstrInfo.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), addSaveRestoreRegs(), llvm::sampleprof::Base, BuildAddiuSpImm(), llvm::BuildMI(), DL, llvm::get(), llvm::MachineFrameInfo::getCalleeSavedInfo(), llvm::MachineFunction::getFrameInfo(), I, llvm::isInt(), llvm::isUInt(), MBB, Opc, and llvm::Reserved.
| void Mips16InstrInfo::restoreFrame | ( | unsigned | SP, |
| int64_t | FrameSize, | ||
| MachineBasicBlock & | MBB, | ||
| MachineBasicBlock::iterator | I ) const |
Definition at line 234 of file Mips16InstrInfo.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), addSaveRestoreRegs(), llvm::sampleprof::Base, BuildAddiuSpImm(), llvm::BuildMI(), llvm::dwarf_linker::DebugLoc, llvm::RegState::Define, DL, llvm::get(), llvm::MachineFrameInfo::getCalleeSavedInfo(), llvm::MachineFunction::getFrameInfo(), I, llvm::isInt(), llvm::isUInt(), MBB, Opc, and llvm::Reserved.
|
overridevirtual |
Implements llvm::MipsInstrInfo.
Definition at line 100 of file Mips16InstrInfo.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addMemOperand(), llvm::MachineInstrBuilder::addReg(), assert(), llvm::BuildMI(), DL, llvm::get(), llvm::getKillRegState(), llvm::MipsInstrInfo::GetMemOperand(), I, MBB, llvm::MachineMemOperand::MOStore, llvm::Offset, and Opc.
Definition at line 464 of file Mips16InstrInfo.cpp.
References llvm::isInt(), and llvm_unreachable.
|
inlinestatic |
Definition at line 94 of file Mips16InstrInfo.h.
References llvm::isInt().
Referenced by AddiuSpImm().