9#ifndef LLVM_LIB_TARGET_MIPS_MIPSTARGETSTREAMER_H
10#define LLVM_LIB_TARGET_MIPS_MIPSTARGETSTREAMER_H
21class formatted_raw_ostream;
61 virtual void emitFrame(
unsigned StackReg,
unsigned StackSize,
63 virtual void emitMask(
unsigned CPUBitmask,
int CPUTopSavedRegOff);
64 virtual void emitFMask(
unsigned FPUBitmask,
int FPUTopSavedRegOff);
103 bool SaveLocationIsRegister);
121 void emitR(
unsigned Opcode,
unsigned Reg0,
SMLoc IDLoc,
123 void emitII(
unsigned Opcode, int16_t Imm1, int16_t Imm2,
SMLoc IDLoc,
127 void emitRI(
unsigned Opcode,
unsigned Reg0, int32_t Imm,
SMLoc IDLoc,
129 void emitRR(
unsigned Opcode,
unsigned Reg0,
unsigned Reg1,
SMLoc IDLoc,
133 void emitRRR(
unsigned Opcode,
unsigned Reg0,
unsigned Reg1,
unsigned Reg2,
135 void emitRRRX(
unsigned Opcode,
unsigned Reg0,
unsigned Reg1,
unsigned Reg2,
137 void emitRRI(
unsigned Opcode,
unsigned Reg0,
unsigned Reg1, int16_t Imm,
139 void emitRRIII(
unsigned Opcode,
unsigned Reg0,
unsigned Reg1, int16_t Imm0,
140 int16_t Imm1, int16_t Imm2,
SMLoc IDLoc,
142 void emitAddu(
unsigned DstReg,
unsigned SrcReg,
unsigned TrgReg,
bool Is64Bit,
144 void emitDSLL(
unsigned DstReg,
unsigned SrcReg, int16_t ShiftAmount,
158 unsigned BaseReg, int64_t
Offset,
172 template <
class PredicateLibrary>
185 std::optional<MipsABIInfo>
ABI;
203 bool ModuleDirectiveAllowed;
243 void emitFrame(
unsigned StackReg,
unsigned StackSize,
245 void emitMask(
unsigned CPUBitmask,
int CPUTopSavedRegOff)
override;
246 void emitFMask(
unsigned FPUBitmask,
int FPUTopSavedRegOff)
override;
292 bool SaveLocationIsRegister)
override;
313 bool MicroMipsEnabled;
343 void emitFrame(
unsigned StackReg,
unsigned StackSize,
345 void emitMask(
unsigned CPUBitmask,
int CPUTopSavedRegOff)
override;
346 void emitFMask(
unsigned FPUBitmask,
int FPUTopSavedRegOff)
override;
357 bool SaveLocationIsRegister)
override;
static bool hasShortDelaySlot(MCInst &Inst)
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
Base class for the full range of assembler expressions which are needed for parsing.
Instances of this class represent operands of the MCInst class.
Streaming machine code generation interface.
Generic base class for all target subtargets.
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
Target specific streamer interface.
void emitDirectiveSetMips32R3() override
void emitDirectiveSetFp(MipsABIFlagsSection::FpABIKind Value) override
void emitDirectiveSetArch(StringRef Arch) override
void emitDirectiveModuleGINV() override
bool emitDirectiveCpRestore(int Offset, function_ref< unsigned()> GetATReg, SMLoc IDLoc, const MCSubtargetInfo *STI) override
Emit a .cprestore directive.
void emitDirectiveSetMips5() override
void emitDirectiveCpLoad(unsigned RegNo) override
void emitDirectiveSetNoVirt() override
void emitDirectiveSetNoAt() override
void emitDirectiveSetNoCRC() override
void emitDirectiveSetMips32R5() override
void emitDirectiveSetNoMacro() override
void emitDirectiveModuleMT() override
void emitDirectiveSetNoOddSPReg() override
void emitDirectiveModuleCRC() override
void emitDirectiveEnt(const MCSymbol &Symbol) override
void emitDirectiveSetDspr2() override
void emitDirectiveSetMips1() override
void emitDirectiveSetMips64R2() override
void emitDirectiveSetMips4() override
void emitDirectiveModuleSoftFloat() override
void emitDirectiveSetMips16() override
void emitDirectiveSetMt() override
void emitDirectiveInsn() override
void emitDirectiveCpsetup(unsigned RegNo, int RegOrOffset, const MCSymbol &Sym, bool IsReg) override
void emitDirectiveSetMicroMips() override
void emitDirectiveModuleNoCRC() override
void emitDirectiveSetMips32R6() override
void emitDirectiveSetNoGINV() override
void emitDirectiveSetMips64R5() override
void emitDirectiveSetMips32() override
void emitDirectiveCpLocal(unsigned RegNo) override
void emitDirectiveSetNoMips3D() override
void emitDirectiveSetPush() override
void emitDirectiveSetNoMips16() override
void emitDirectiveSetNoDsp() override
void emitDirectiveSetMips32R2() override
void emitDirectiveSetMips64() override
void emitDirectiveModuleHardFloat() override
void emitDirectiveOptionPic0() override
void emitDirectiveSetMacro() override
void emitDirectiveSetCRC() override
void emitDirectiveSetNoReorder() override
void emitDirectiveEnd(StringRef Name) override
void emitDirectiveSetMips64R3() override
void emitFMask(unsigned FPUBitmask, int FPUTopSavedRegOff) override
void emitDirectiveSetNoMt() override
void emitDirectiveAbiCalls() override
void emitDirectiveSetMsa() override
void emitDirectiveOptionPic2() override
void emitMask(unsigned CPUBitmask, int CPUTopSavedRegOff) override
void emitDirectiveModuleVirt() override
void emitFrame(unsigned StackReg, unsigned StackSize, unsigned ReturnReg) override
void emitDirectiveSetGINV() override
void emitDirectiveSetNoMsa() override
void emitDirectiveCpreturn(unsigned SaveLocation, bool SaveLocationIsRegister) override
void emitDirectiveCpAdd(unsigned RegNo) override
void emitDirectiveModuleNoVirt() override
void emitDirectiveNaN2008() override
void emitDirectiveSetPop() override
void emitDirectiveSetMips3() override
void emitDirectiveSetMips0() override
void emitDirectiveSetHardFloat() override
void emitDirectiveModuleNoGINV() override
void emitDirectiveSetVirt() override
void emitDirectiveModuleFP() override
void emitDirectiveSetMips2() override
void emitDirectiveSetMips3D() override
void emitDirectiveSetAtWithArg(unsigned RegNo) override
void emitDirectiveSetReorder() override
void emitDirectiveNaNLegacy() override
void emitDirectiveSetMips64R6() override
void emitDirectiveSetSoftFloat() override
void emitDirectiveSetNoMicroMips() override
void emitDirectiveSetAt() override
void emitDirectiveSetOddSPReg() override
void emitDirectiveModuleOddSPReg() override
void emitDirectiveSetDsp() override
void emitDirectiveCpAdd(unsigned RegNo) override
void setPic(bool Value) override
void emitDirectiveCpLoad(unsigned RegNo) override
void emitDirectiveNaN2008() override
void emitDirectiveSetNoMicroMips() override
void emitDirectiveCpsetup(unsigned RegNo, int RegOrOffset, const MCSymbol &Sym, bool IsReg) override
void emitDirectiveInsn() override
void setUsesMicroMips() override
void emitDirectiveOptionPic2() override
bool isMicroMipsEnabled() const
void emitDirectiveEnd(StringRef Name) override
bool emitDirectiveCpRestore(int Offset, function_ref< unsigned()> GetATReg, SMLoc IDLoc, const MCSubtargetInfo *STI) override
void emitDirectiveSetMicroMips() override
void emitLabel(MCSymbol *Symbol) override
void emitDirectiveCpLocal(unsigned RegNo) override
void emitMask(unsigned CPUBitmask, int CPUTopSavedRegOff) override
void emitDirectiveAbiCalls() override
void emitFMask(unsigned FPUBitmask, int FPUTopSavedRegOff) override
void emitFrame(unsigned StackReg, unsigned StackSize, unsigned ReturnReg) override
void emitAssignment(MCSymbol *Symbol, const MCExpr *Value) override
void emitDirectiveCpreturn(unsigned SaveLocation, bool SaveLocationIsRegister) override
void emitDirectiveSetMips16() override
void emitDirectiveOptionPic0() override
void emitDirectiveEnt(const MCSymbol &Symbol) override
void emitDirectiveSetNoReorder() override
void emitDirectiveNaNLegacy() override
MCELFStreamer & getStreamer()
std::optional< MipsABIInfo > ABI
virtual void emitDirectiveSetMips64R5()
virtual void emitDirectiveSetAt()
virtual void emitDirectiveModuleNoVirt()
virtual void emitDirectiveSetReorder()
void emitRRIII(unsigned Opcode, unsigned Reg0, unsigned Reg1, int16_t Imm0, int16_t Imm1, int16_t Imm2, SMLoc IDLoc, const MCSubtargetInfo *STI)
virtual void emitDirectiveSetNoCRC()
void reallowModuleDirective()
virtual void emitDirectiveModuleNoGINV()
void emitRRI(unsigned Opcode, unsigned Reg0, unsigned Reg1, int16_t Imm, SMLoc IDLoc, const MCSubtargetInfo *STI)
virtual void emitDirectiveSetSoftFloat()
virtual void emitDirectiveSetNoDsp()
void forbidModuleDirective()
virtual void emitDirectiveCpreturn(unsigned SaveLocation, bool SaveLocationIsRegister)
virtual void emitDirectiveSetNoMicroMips()
void emitStoreWithImmOffset(unsigned Opcode, unsigned SrcReg, unsigned BaseReg, int64_t Offset, function_ref< unsigned()> GetATReg, SMLoc IDLoc, const MCSubtargetInfo *STI)
Emit a store instruction with an offset.
virtual void emitDirectiveSetDspr2()
void emitRX(unsigned Opcode, unsigned Reg0, MCOperand Op1, SMLoc IDLoc, const MCSubtargetInfo *STI)
virtual void emitDirectiveNaN2008()
virtual void emitDirectiveSetMips64R2()
virtual void emitDirectiveSetMips3D()
virtual void emitDirectiveEnd(StringRef Name)
virtual void emitDirectiveSetFp(MipsABIFlagsSection::FpABIKind Value)
virtual void emitDirectiveSetCRC()
virtual void emitDirectiveSetMips64R3()
void emitAddu(unsigned DstReg, unsigned SrcReg, unsigned TrgReg, bool Is64Bit, const MCSubtargetInfo *STI)
virtual void emitDirectiveSetNoVirt()
virtual void emitDirectiveSetGINV()
virtual void emitDirectiveSetMacro()
virtual void emitDirectiveCpsetup(unsigned RegNo, int RegOrOffset, const MCSymbol &Sym, bool IsReg)
void emitR(unsigned Opcode, unsigned Reg0, SMLoc IDLoc, const MCSubtargetInfo *STI)
virtual void emitDirectiveSetMips3()
virtual void emitDirectiveSetNoGINV()
virtual void setUsesMicroMips()
virtual void emitDirectiveSetMips32R3()
virtual void emitDirectiveSetMips32R2()
virtual void emitDirectiveEnt(const MCSymbol &Symbol)
virtual void emitDirectiveSetMips1()
virtual void emitDirectiveSetDsp()
virtual void emitDirectiveSetNoMips3D()
virtual void emitDirectiveCpLocal(unsigned RegNo)
virtual void emitDirectiveCpLoad(unsigned RegNo)
virtual void emitDirectiveSetHardFloat()
void emitEmptyDelaySlot(bool hasShortDelaySlot, SMLoc IDLoc, const MCSubtargetInfo *STI)
virtual void emitDirectiveSetNoMips16()
virtual void emitDirectiveSetMips5()
virtual void emitDirectiveSetMips2()
virtual void emitDirectiveSetPush()
virtual void emitDirectiveSetMt()
bool isModuleDirectiveAllowed()
virtual void setPic(bool Value)
virtual void emitFrame(unsigned StackReg, unsigned StackSize, unsigned ReturnReg)
virtual void emitDirectiveSetNoOddSPReg()
void emitII(unsigned Opcode, int16_t Imm1, int16_t Imm2, SMLoc IDLoc, const MCSubtargetInfo *STI)
virtual void emitDirectiveSetOddSPReg()
virtual void emitDirectiveSetNoMt()
virtual void emitDirectiveModuleCRC()
virtual void emitDirectiveModuleGINV()
void emitRRX(unsigned Opcode, unsigned Reg0, unsigned Reg1, MCOperand Op2, SMLoc IDLoc, const MCSubtargetInfo *STI)
virtual void emitDirectiveSetNoAt()
void updateABIInfo(const PredicateLibrary &P)
virtual void emitDirectiveNaNLegacy()
virtual void emitMask(unsigned CPUBitmask, int CPUTopSavedRegOff)
void emitRR(unsigned Opcode, unsigned Reg0, unsigned Reg1, SMLoc IDLoc, const MCSubtargetInfo *STI)
virtual void emitDirectiveSetPop()
virtual void emitDirectiveSetMicroMips()
void emitRI(unsigned Opcode, unsigned Reg0, int32_t Imm, SMLoc IDLoc, const MCSubtargetInfo *STI)
virtual void emitDirectiveSetMips0()
void emitRRR(unsigned Opcode, unsigned Reg0, unsigned Reg1, unsigned Reg2, SMLoc IDLoc, const MCSubtargetInfo *STI)
virtual void emitDirectiveModuleSoftFloat()
virtual void emitDirectiveSetArch(StringRef Arch)
virtual void emitDirectiveSetAtWithArg(unsigned RegNo)
void emitRRRX(unsigned Opcode, unsigned Reg0, unsigned Reg1, unsigned Reg2, MCOperand Op3, SMLoc IDLoc, const MCSubtargetInfo *STI)
virtual bool emitDirectiveCpRestore(int Offset, function_ref< unsigned()> GetATReg, SMLoc IDLoc, const MCSubtargetInfo *STI)
void emitLoadWithImmOffset(unsigned Opcode, unsigned DstReg, unsigned BaseReg, int64_t Offset, unsigned TmpReg, SMLoc IDLoc, const MCSubtargetInfo *STI)
Emit a load instruction with an immediate offset.
virtual void emitDirectiveModuleNoCRC()
virtual void emitDirectiveSetNoMacro()
const MipsABIInfo & getABI() const
virtual void emitDirectiveModuleOddSPReg()
virtual void emitDirectiveCpAdd(unsigned RegNo)
virtual void emitDirectiveInsn()
virtual void emitDirectiveSetMips64R6()
virtual void emitDirectiveSetNoMsa()
virtual void emitDirectiveSetVirt()
void emitGPRestore(int Offset, SMLoc IDLoc, const MCSubtargetInfo *STI)
Emit the $gp restore operation for .cprestore.
virtual void emitFMask(unsigned FPUBitmask, int FPUTopSavedRegOff)
virtual void emitDirectiveModuleVirt()
void emitNop(SMLoc IDLoc, const MCSubtargetInfo *STI)
virtual void emitDirectiveSetNoReorder()
MipsABIFlagsSection & getABIFlagsSection()
void emitDSLL(unsigned DstReg, unsigned SrcReg, int16_t ShiftAmount, SMLoc IDLoc, const MCSubtargetInfo *STI)
virtual void emitDirectiveSetMips32()
virtual void emitDirectiveOptionPic0()
virtual void emitDirectiveModuleMT()
virtual void emitDirectiveModuleHardFloat()
virtual void emitDirectiveSetMips32R5()
virtual void emitDirectiveSetMsa()
virtual void emitDirectiveSetMips32R6()
virtual void emitDirectiveSetMips4()
virtual void emitDirectiveOptionPic2()
virtual void emitDirectiveSetMips16()
virtual void emitDirectiveSetMips64()
virtual void emitDirectiveAbiCalls()
virtual void emitDirectiveModuleFP()
MipsABIFlagsSection ABIFlagsSection
Represents a location in source code.
StringRef - Represent a constant reference to a string, i.e.
LLVM Value Representation.
An efficient, type-erasing, non-owning reference to a callable.
This is an optimization pass for GlobalISel generic memory operations.
void setAllFromPredicates(const PredicateLibrary &P)