10 #ifndef LLVM_LIB_TARGET_MIPS_MIPSTARGETSTREAMER_H 11 #define LLVM_LIB_TARGET_MIPS_MIPSTARGETSTREAMER_H 23 struct MipsABIFlagsSection;
63 virtual void emitFrame(
unsigned StackReg,
unsigned StackSize,
65 virtual void emitMask(
unsigned CPUBitmask,
int CPUTopSavedRegOff);
66 virtual void emitFMask(
unsigned FPUBitmask,
int FPUTopSavedRegOff);
101 bool SaveLocationIsRegister);
119 void emitR(
unsigned Opcode,
unsigned Reg0,
SMLoc IDLoc,
121 void emitII(
unsigned Opcode, int16_t Imm1, int16_t Imm2,
SMLoc IDLoc,
125 void emitRI(
unsigned Opcode,
unsigned Reg0, int32_t Imm,
SMLoc IDLoc,
127 void emitRR(
unsigned Opcode,
unsigned Reg0,
unsigned Reg1,
SMLoc IDLoc,
131 void emitRRR(
unsigned Opcode,
unsigned Reg0,
unsigned Reg1,
unsigned Reg2,
133 void emitRRI(
unsigned Opcode,
unsigned Reg0,
unsigned Reg1, int16_t Imm,
135 void emitRRIII(
unsigned Opcode,
unsigned Reg0,
unsigned Reg1, int16_t Imm0,
136 int16_t Imm1, int16_t Imm2,
SMLoc IDLoc,
138 void emitAddu(
unsigned DstReg,
unsigned SrcReg,
unsigned TrgReg,
bool Is64Bit,
140 void emitDSLL(
unsigned DstReg,
unsigned SrcReg, int16_t ShiftAmount,
154 unsigned BaseReg, int64_t Offset,
162 int64_t Offset,
unsigned TmpReg,
SMLoc IDLoc,
166 unsigned ATReg,
SMLoc IDLoc,
176 template <
class PredicateLibrary>
184 assert(
ABI.hasValue() &&
"ABI hasn't been set!");
206 bool ModuleDirectiveAllowed;
246 void emitFrame(
unsigned StackReg,
unsigned StackSize,
248 void emitMask(
unsigned CPUBitmask,
int CPUTopSavedRegOff)
override;
249 void emitFMask(
unsigned FPUBitmask,
int FPUTopSavedRegOff)
override;
289 const MCSymbol &Sym,
bool IsReg)
override;
291 bool SaveLocationIsRegister)
override;
312 bool MicroMipsEnabled;
342 void emitFrame(
unsigned StackReg,
unsigned StackSize,
344 void emitMask(
unsigned CPUBitmask,
int CPUTopSavedRegOff)
override;
345 void emitFMask(
unsigned FPUBitmask,
int FPUTopSavedRegOff)
override;
352 const MCSymbol &Sym,
bool IsReg)
override;
354 bool SaveLocationIsRegister)
override;
356 void emitMipsAbiFlags();
virtual void emitFMask(unsigned FPUBitmask, int FPUTopSavedRegOff)
void emitRR(unsigned Opcode, unsigned Reg0, unsigned Reg1, SMLoc IDLoc, const MCSubtargetInfo *STI)
virtual void emitDirectiveModuleGINV()
void emitRRIII(unsigned Opcode, unsigned Reg0, unsigned Reg1, int16_t Imm0, int16_t Imm1, int16_t Imm2, SMLoc IDLoc, const MCSubtargetInfo *STI)
virtual void emitDirectiveModuleCRC()
virtual void emitDirectiveOptionPic2()
This class represents lattice values for constants.
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
void emitAddu(unsigned DstReg, unsigned SrcReg, unsigned TrgReg, bool Is64Bit, const MCSubtargetInfo *STI)
Target specific streamer interface.
An efficient, type-erasing, non-owning reference to a callable.
virtual void emitDirectiveSetNoReorder()
virtual void emitDirectiveModuleHardFloat()
virtual void emitDirectiveModuleNoGINV()
void emitGPRestore(int Offset, SMLoc IDLoc, const MCSubtargetInfo *STI)
Emit the $gp restore operation for .cprestore.
virtual void emitDirectiveSetVirt()
virtual void emitDirectiveSetMips32R3()
const MipsABIInfo & getABI() const
virtual void emitDirectiveSetMicroMips()
virtual void emitDirectiveSetMips3()
amdgpu Simplify well known AMD library false Value Value const Twine & Name
virtual void emitDirectiveModuleMT()
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 emitFrame(unsigned StackReg, unsigned StackSize, unsigned ReturnReg)
virtual void emitDirectiveSetMips0()
virtual void emitDirectiveSetSoftFloat()
virtual void emitDirectiveSetNoMacro()
Base class for the full range of assembler expressions which are needed for parsing.
virtual void emitDirectiveSetPush()
virtual void emitDirectiveEnd(StringRef Name)
virtual void emitLabel(MCSymbol *Symbol)
virtual void emitDirectiveSetMips32R6()
virtual void emitDirectiveSetMips1()
virtual void emitDirectiveModuleOddSPReg()
void emitNop(SMLoc IDLoc, const MCSubtargetInfo *STI)
virtual void emitDirectiveModuleSoftFloat()
MipsABIFlagsSection ABIFlagsSection
virtual void emitDirectiveModuleFP()
virtual void emitDirectiveSetOddSPReg()
virtual void emitDirectiveSetMips64R2()
virtual void emitDirectiveSetNoOddSPReg()
void emitRX(unsigned Opcode, unsigned Reg0, MCOperand Op1, SMLoc IDLoc, const MCSubtargetInfo *STI)
virtual void setUsesMicroMips()
Streaming machine code generation interface.
virtual void emitDirectiveSetMips4()
static bool hasShortDelaySlot(MCInst &Inst)
virtual void emitDirectiveSetNoMicroMips()
virtual void emitDirectiveSetNoDsp()
virtual void emitDirectiveModuleVirt()
virtual void emitDirectiveSetMips16()
virtual void emitDirectiveSetMacro()
virtual void emitDirectiveNaN2008()
void emitRI(unsigned Opcode, unsigned Reg0, int32_t Imm, SMLoc IDLoc, const MCSubtargetInfo *STI)
virtual void emitDirectiveCpLoad(unsigned RegNo)
void emitR(unsigned Opcode, unsigned Reg0, SMLoc IDLoc, const MCSubtargetInfo *STI)
virtual void emitDirectiveSetCRC()
virtual void emitDirectiveSetArch(StringRef Arch)
virtual void emitDirectiveSetDsp()
virtual void emitMask(unsigned CPUBitmask, int CPUTopSavedRegOff)
virtual void emitDirectiveSetNoCRC()
virtual void emitDirectiveSetMips32R5()
bool isMicroMipsEnabled() const
virtual void emitDirectiveSetMips32R2()
void emitLoadWithSymOffset(unsigned Opcode, unsigned DstReg, unsigned BaseReg, MCOperand &HiOperand, MCOperand &LoOperand, unsigned ATReg, SMLoc IDLoc, const MCSubtargetInfo *STI)
Emit a load instruction with an symbol offset.
virtual void emitDirectiveSetFp(MipsABIFlagsSection::FpABIKind Value)
void emitRRR(unsigned Opcode, unsigned Reg0, unsigned Reg1, unsigned Reg2, SMLoc IDLoc, const MCSubtargetInfo *STI)
virtual void emitDirectiveAbiCalls()
virtual void emitDirectiveSetMips64R6()
MCStreamer & getStreamer()
virtual void emitDirectiveModuleNoVirt()
void setAllFromPredicates(const PredicateLibrary &P)
virtual void emitDirectiveOptionPic0()
void emitDSLL(unsigned DstReg, unsigned SrcReg, int16_t ShiftAmount, SMLoc IDLoc, const MCSubtargetInfo *STI)
virtual void emitDirectiveSetNoGINV()
virtual void emitDirectiveSetPop()
void emitEmptyDelaySlot(bool hasShortDelaySlot, SMLoc IDLoc, const MCSubtargetInfo *STI)
virtual void emitDirectiveSetAt()
virtual void emitDirectiveSetNoMips16()
virtual void emitDirectiveInsn()
virtual void emitDirectiveCpsetup(unsigned RegNo, int RegOrOffset, const MCSymbol &Sym, bool IsReg)
bool isModuleDirectiveAllowed()
virtual void emitDirectiveSetNoVirt()
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 emitDirectiveSetMips64R3()
virtual void emitDirectiveSetMips64R5()
virtual void setPic(bool Value)
void updateABIInfo(const PredicateLibrary &P)
virtual void emitDirectiveEnt(const MCSymbol &Symbol)
virtual void emitDirectiveSetHardFloat()
virtual void emitDirectiveSetMips64()
virtual bool emitDirectiveCpRestore(int Offset, function_ref< unsigned()> GetATReg, SMLoc IDLoc, const MCSubtargetInfo *STI)
virtual void emitDirectiveSetDspr2()
virtual void emitDirectiveSetMips5()
virtual void emitDirectiveSetMips2()
Generic base class for all target subtargets.
MipsTargetStreamer(MCStreamer &S)
virtual void emitDirectiveSetMt()
void emitRRI(unsigned Opcode, unsigned Reg0, unsigned Reg1, int16_t Imm, SMLoc IDLoc, const MCSubtargetInfo *STI)
void emitRRX(unsigned Opcode, unsigned Reg0, unsigned Reg1, MCOperand Op2, SMLoc IDLoc, const MCSubtargetInfo *STI)
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
virtual void emitDirectiveSetNoMt()
virtual void emitDirectiveSetReorder()
LLVM Value Representation.
void forbidModuleDirective()
virtual void emitDirectiveCpreturn(unsigned SaveLocation, bool SaveLocationIsRegister)
llvm::Optional< MipsABIInfo > ABI
virtual void emitDirectiveNaNLegacy()
void emitII(unsigned Opcode, int16_t Imm1, int16_t Imm2, SMLoc IDLoc, const MCSubtargetInfo *STI)
virtual void emitDirectiveSetMips32()
virtual void emitDirectiveSetNoMsa()
StringRef - Represent a constant reference to a string, i.e.
virtual void emitDirectiveModuleNoCRC()
MipsABIFlagsSection & getABIFlagsSection()
virtual void emitDirectiveSetMsa()
virtual void emitDirectiveSetNoAt()
Represents a location in source code.
Instances of this class represent operands of the MCInst class.
virtual void emitDirectiveSetGINV()
virtual void emitDirectiveSetAtWithArg(unsigned RegNo)
virtual void emitAssignment(MCSymbol *Symbol, const MCExpr *Value)
void reallowModuleDirective()
void emitStoreWithSymOffset(unsigned Opcode, unsigned SrcReg, unsigned BaseReg, MCOperand &HiOperand, MCOperand &LoOperand, unsigned ATReg, SMLoc IDLoc, const MCSubtargetInfo *STI)
Emit a store instruction with an symbol offset.
void setPic(bool Value) override