9#ifndef LLVM_LIB_TARGET_MIPS_MIPSTARGETSTREAMER_H
10#define LLVM_LIB_TARGET_MIPS_MIPSTARGETSTREAMER_H
21class formatted_raw_ostream;
70 virtual void emitMask(
unsigned CPUBitmask,
int CPUTopSavedRegOff);
71 virtual void emitFMask(
unsigned FPUBitmask,
int FPUTopSavedRegOff);
110 bool SaveLocationIsRegister);
130 void emitII(
unsigned Opcode, int16_t Imm1, int16_t Imm2,
SMLoc IDLoc,
148 int16_t Imm0, int16_t Imm1, int16_t Imm2,
SMLoc IDLoc,
181 template <
class PredicateLibrary>
194 std::optional<MipsABIInfo>
ABI;
212 bool ModuleDirectiveAllowed;
262 void emitMask(
unsigned CPUBitmask,
int CPUTopSavedRegOff)
override;
263 void emitFMask(
unsigned FPUBitmask,
int FPUTopSavedRegOff)
override;
309 bool SaveLocationIsRegister)
override;
330 bool MicroMipsEnabled;
369 void emitMask(
unsigned CPUBitmask,
int CPUTopSavedRegOff)
override;
370 void emitFMask(
unsigned FPUBitmask,
int FPUTopSavedRegOff)
override;
381 bool SaveLocationIsRegister)
override;
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
static bool hasShortDelaySlot(MCInst &Inst)
Base class for the full range of assembler expressions which are needed for parsing.
Instances of this class represent operands of the MCInst class.
Wrapper class representing physical registers. Should be passed by value.
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 emitDTPRel64Value(const MCExpr *) override
void emitDirectiveSetMicroMips() override
void emitTPRel64Value(const MCExpr *) 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 emitFrame(MCRegister StackReg, unsigned StackSize, MCRegister ReturnReg) 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 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 emitDTPRel32Value(const MCExpr *) override
void emitDirectiveSetMips3() override
void emitDirectiveSetMips0() override
void emitTPRel32Value(const MCExpr *) 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 emitGPRel64Value(const MCExpr *) override
void emitDirectiveSetMips64R6() override
void emitDirectiveSetSoftFloat() override
void emitDirectiveSetNoMicroMips() override
void emitGPRel32Value(const MCExpr *) override
void emitDirectiveSetAt() override
void emitDirectiveSetOddSPReg() override
void emitDirectiveModuleOddSPReg() override
void emitDirectiveSetDsp() override
void emitDTPRel32Value(const MCExpr *) override
void emitDirectiveCpAdd(unsigned RegNo) override
void setPic(bool Value) override
void emitDirectiveCpLoad(unsigned RegNo) override
void emitDirectiveNaN2008() override
void emitDirectiveSetNoMicroMips() override
void emitGPRel64Value(const MCExpr *) override
void emitDirectiveCpsetup(unsigned RegNo, int RegOrOffset, const MCSymbol &Sym, bool IsReg) override
void emitDirectiveInsn() override
void setUsesMicroMips() override
void emitDirectiveOptionPic2() override
void emitGPRel32Value(const MCExpr *) override
bool isMicroMipsEnabled() const
void emitDirectiveEnd(StringRef Name) override
void emitFrame(MCRegister StackReg, unsigned StackSize, MCRegister ReturnReg) override
bool emitDirectiveCpRestore(int Offset, function_ref< unsigned()> GetATReg, SMLoc IDLoc, const MCSubtargetInfo *STI) override
void emitTPRel64Value(const MCExpr *) override
void emitDirectiveSetMicroMips() override
void emitLabel(MCSymbol *Symbol) override
void emitTPRel32Value(const MCExpr *) override
void emitDTPRel64Value(const MCExpr *) override
void emitDirectiveCpLocal(unsigned RegNo) override
void emitMask(unsigned CPUBitmask, int CPUTopSavedRegOff) override
void emitDirectiveAbiCalls() override
void emitFMask(unsigned FPUBitmask, int FPUTopSavedRegOff) 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()
void emitRRX(unsigned Opcode, MCRegister Reg0, MCRegister Reg1, MCOperand Op2, SMLoc IDLoc, const MCSubtargetInfo *STI)
virtual void emitDirectiveSetReorder()
virtual void emitDirectiveSetNoCRC()
virtual void emitFrame(MCRegister StackReg, unsigned StackSize, MCRegister ReturnReg)
void emitRRRX(unsigned Opcode, MCRegister Reg0, MCRegister Reg1, MCRegister Reg2, MCOperand Op3, SMLoc IDLoc, const MCSubtargetInfo *STI)
void reallowModuleDirective()
virtual void emitDirectiveModuleNoGINV()
virtual void emitDirectiveSetSoftFloat()
virtual void emitDirectiveSetNoDsp()
void forbidModuleDirective()
virtual void emitDirectiveCpreturn(unsigned SaveLocation, bool SaveLocationIsRegister)
virtual void emitGPRel32Value(const MCExpr *)
virtual void emitDirectiveSetNoMicroMips()
void emitRX(unsigned Opcode, MCRegister Reg0, MCOperand Op1, SMLoc IDLoc, const MCSubtargetInfo *STI)
virtual void emitDirectiveSetDspr2()
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 emitTPRel64Value(const MCExpr *)
virtual void emitDirectiveSetMips64R3()
virtual void emitDirectiveSetNoVirt()
virtual void emitDirectiveSetGINV()
virtual void emitDirectiveSetMacro()
virtual void emitDirectiveCpsetup(unsigned RegNo, int RegOrOffset, const MCSymbol &Sym, bool IsReg)
virtual void emitDirectiveSetMips3()
void emitR(unsigned Opcode, MCRegister Reg0, SMLoc IDLoc, const MCSubtargetInfo *STI)
virtual void emitDirectiveSetNoGINV()
virtual void setUsesMicroMips()
virtual void emitDirectiveSetMips32R3()
virtual void emitDirectiveSetMips32R2()
void emitRRI(unsigned Opcode, MCRegister Reg0, MCRegister Reg1, int16_t Imm, SMLoc IDLoc, const MCSubtargetInfo *STI)
virtual void emitDirectiveEnt(const MCSymbol &Symbol)
virtual void emitDirectiveSetMips1()
virtual void emitDirectiveSetDsp()
virtual void emitDirectiveSetNoMips3D()
void emitLoadWithImmOffset(unsigned Opcode, MCRegister DstReg, MCRegister BaseReg, int64_t Offset, MCRegister TmpReg, SMLoc IDLoc, const MCSubtargetInfo *STI)
Emit a load instruction with an immediate offset.
virtual void emitDirectiveCpLocal(unsigned RegNo)
virtual void emitDirectiveCpLoad(unsigned RegNo)
virtual void emitDirectiveSetHardFloat()
void emitEmptyDelaySlot(bool hasShortDelaySlot, SMLoc IDLoc, const MCSubtargetInfo *STI)
void emitAddu(MCRegister DstReg, MCRegister SrcReg, MCRegister TrgReg, bool Is64Bit, const MCSubtargetInfo *STI)
void emitRI(unsigned Opcode, MCRegister Reg0, int32_t Imm, SMLoc IDLoc, const MCSubtargetInfo *STI)
virtual void emitTPRel32Value(const MCExpr *)
virtual void emitDirectiveSetNoMips16()
virtual void emitDirectiveSetMips5()
virtual void emitDirectiveSetMips2()
virtual void emitDirectiveSetPush()
virtual void emitDirectiveSetMt()
bool isModuleDirectiveAllowed()
virtual void setPic(bool Value)
virtual void emitDirectiveSetNoOddSPReg()
virtual void emitGPRel64Value(const MCExpr *)
void emitII(unsigned Opcode, int16_t Imm1, int16_t Imm2, SMLoc IDLoc, const MCSubtargetInfo *STI)
void emitRR(unsigned Opcode, MCRegister Reg0, MCRegister Reg1, SMLoc IDLoc, const MCSubtargetInfo *STI)
virtual void emitDirectiveSetOddSPReg()
virtual void emitDirectiveSetNoMt()
virtual void emitDirectiveModuleCRC()
virtual void emitDirectiveModuleGINV()
virtual void emitDirectiveSetNoAt()
void updateABIInfo(const PredicateLibrary &P)
virtual void emitDirectiveNaNLegacy()
virtual void emitMask(unsigned CPUBitmask, int CPUTopSavedRegOff)
void emitRRIII(unsigned Opcode, MCRegister Reg0, MCRegister Reg1, int16_t Imm0, int16_t Imm1, int16_t Imm2, SMLoc IDLoc, const MCSubtargetInfo *STI)
virtual void emitDirectiveSetPop()
virtual void emitDirectiveSetMicroMips()
virtual void emitDirectiveSetMips0()
virtual void emitDTPRel64Value(const MCExpr *)
virtual void emitDirectiveModuleSoftFloat()
virtual void emitDirectiveSetArch(StringRef Arch)
virtual void emitDTPRel32Value(const MCExpr *)
virtual void emitDirectiveSetAtWithArg(unsigned RegNo)
virtual bool emitDirectiveCpRestore(int Offset, function_ref< unsigned()> GetATReg, SMLoc IDLoc, const MCSubtargetInfo *STI)
virtual void emitDirectiveModuleNoCRC()
virtual void emitDirectiveSetNoMacro()
void emitDSLL(MCRegister DstReg, MCRegister SrcReg, int16_t ShiftAmount, SMLoc IDLoc, const MCSubtargetInfo *STI)
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)
void emitRRR(unsigned Opcode, MCRegister Reg0, MCRegister Reg1, MCRegister Reg2, SMLoc IDLoc, const MCSubtargetInfo *STI)
virtual void emitDirectiveSetNoReorder()
MipsABIFlagsSection & getABIFlagsSection()
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()
void emitStoreWithImmOffset(unsigned Opcode, MCRegister SrcReg, MCRegister BaseReg, int64_t Offset, function_ref< unsigned()> GetATReg, SMLoc IDLoc, const MCSubtargetInfo *STI)
Emit a store instruction with an offset.
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)