35 return STI->
hasFeature(Mips::FeatureMicroMips);
153 bool SaveLocationIsRegister) {}
259 int16_t Imm2,
SMLoc IDLoc,
275 emitRRR(Is64Bit ? Mips::DADDu : Mips::ADDu, DstReg, SrcReg, TrgReg,
SMLoc(),
280 int16_t ShiftAmount,
SMLoc IDLoc,
282 if (ShiftAmount >= 32) {
283 emitRRI(Mips::DSLL32, DstReg, SrcReg, ShiftAmount - 32, IDLoc, STI);
287 emitRRI(Mips::DSLL, DstReg, SrcReg, ShiftAmount, IDLoc, STI);
293 unsigned Opc = Mips::SLL;
296 emitRR(
Opc, Mips::ZERO, Mips::ZERO, IDLoc, STI);
303 emitRRI(
Opc, Mips::ZERO, Mips::ZERO, 0, IDLoc, STI);
308 emitRR(Mips::MOVE16_MM, Mips::ZERO, Mips::ZERO, IDLoc, STI);
310 emitRRI(Mips::SLL, Mips::ZERO, Mips::ZERO, 0, IDLoc, STI);
337 unsigned LoOffset =
Offset & 0x0000ffff;
338 unsigned HiOffset = (
Offset & 0xffff0000) >> 16;
342 if (LoOffset & 0x8000)
346 emitRI(Mips::LUi, ATReg, HiOffset, IDLoc, STI);
347 if (BaseReg != Mips::ZERO)
348 emitRRR(Mips::ADDu, ATReg, ATReg, BaseReg, IDLoc, STI);
350 emitRRI(Opcode, SrcReg, ATReg, LoOffset, IDLoc, STI);
372 unsigned LoOffset =
Offset & 0x0000ffff;
373 unsigned HiOffset = (
Offset & 0xffff0000) >> 16;
377 if (LoOffset & 0x8000)
381 emitRI(Mips::LUi, TmpReg, HiOffset, IDLoc, STI);
382 if (BaseReg != Mips::ZERO)
383 emitRRR(Mips::ADDu, TmpReg, TmpReg, BaseReg, IDLoc, STI);
385 emitRRI(Opcode, DstReg, TmpReg, LoOffset, IDLoc, STI);
394 OS <<
"\t.dtprelword\t";
401 OS <<
"\t.dtpreldword\t";
408 OS <<
"\t.tprelword\t";
415 OS <<
"\t.tpreldword\t";
429 OS <<
"\t.gpdword\t";
435 OS <<
"\t.set\tmicromips\n";
440 OS <<
"\t.set\tnomicromips\n";
445 OS <<
"\t.set\tmips16\n";
450 OS <<
"\t.set\tnomips16\n";
455 OS <<
"\t.set\treorder\n";
460 OS <<
"\t.set\tnoreorder\n";
465 OS <<
"\t.set\tmacro\n";
470 OS <<
"\t.set\tnomacro\n";
475 OS <<
"\t.set\tmsa\n";
480 OS <<
"\t.set\tnomsa\n";
485 OS <<
"\t.set\tmt\n";
490 OS <<
"\t.set\tnomt\n";
495 OS <<
"\t.set\tcrc\n";
500 OS <<
"\t.set\tnocrc\n";
505 OS <<
"\t.set\tvirt\n";
510 OS <<
"\t.set\tnovirt\n";
515 OS <<
"\t.set\tginv\n";
520 OS <<
"\t.set\tnoginv\n";
525 OS <<
"\t.set\teva\n";
530 OS <<
"\t.set\tnoeva\n";
535 OS <<
"\t.set\tat\n";
540 OS <<
"\t.set\tat=$" <<
Twine(RegNo) <<
"\n";
545 OS <<
"\t.set\tnoat\n";
550 OS <<
"\t.end\t" << Name <<
'\n';
554 OS <<
"\t.ent\t" << Symbol.getName() <<
'\n';
562 OS <<
"\t.nan\tlegacy\n";
566 OS <<
"\t.option\tpic0\n";
570 OS <<
"\t.option\tpic2\n";
587 OS <<
"\t.set arch=" << Arch <<
"\n";
592 OS <<
"\t.set\tmips0\n";
597 OS <<
"\t.set\tmips1\n";
602 OS <<
"\t.set\tmips2\n";
607 OS <<
"\t.set\tmips3\n";
612 OS <<
"\t.set\tmips4\n";
617 OS <<
"\t.set\tmips5\n";
622 OS <<
"\t.set\tmips32\n";
627 OS <<
"\t.set\tmips32r2\n";
632 OS <<
"\t.set\tmips32r3\n";
637 OS <<
"\t.set\tmips32r5\n";
642 OS <<
"\t.set\tmips32r6\n";
647 OS <<
"\t.set\tmips64\n";
652 OS <<
"\t.set\tmips64r2\n";
657 OS <<
"\t.set\tmips64r3\n";
662 OS <<
"\t.set\tmips64r5\n";
667 OS <<
"\t.set\tmips64r6\n";
672 OS <<
"\t.set\tdsp\n";
677 OS <<
"\t.set\tdspr2\n";
682 OS <<
"\t.set\tnodsp\n";
687 OS <<
"\t.set\tmips3d\n";
692 OS <<
"\t.set\tnomips3d\n";
697 OS <<
"\t.set\tpop\n";
702 OS <<
"\t.set\tpush\n";
707 OS <<
"\t.set\tsoftfloat\n";
712 OS <<
"\t.set\thardfloat\n";
719 for (
int i = 7; i >= 0; i--)
724 int CPUTopSavedRegOff) {
727 OS <<
',' << CPUTopSavedRegOff <<
'\n';
731 int FPUTopSavedRegOff) {
734 OS <<
"," << FPUTopSavedRegOff <<
'\n';
750 OS <<
"\t.cplocal\t$"
759 OS <<
"\t.cprestore\t" <<
Offset <<
"\n";
767 OS <<
"\t.cpsetup\t$"
783 bool SaveLocationIsRegister) {
791 OS <<
"\t.module\tsoftfloat\n";
793 OS <<
"\t.module\tfp=" <<
ABIFlagsSection.getFpABIString(FpABI) <<
"\n";
807 OS <<
"\t.module\t" << (
ABIFlagsSection.OddSPReg ?
"" :
"no") <<
"oddspreg\n";
812 OS <<
"\t.set\toddspreg\n";
817 OS <<
"\t.set\tnooddspreg\n";
821 OS <<
"\t.module\tsoftfloat\n";
825 OS <<
"\t.module\thardfloat\n";
829 OS <<
"\t.module\tmt\n";
833 OS <<
"\t.module\tcrc\n";
837 OS <<
"\t.module\tnocrc\n";
841 OS <<
"\t.module\tvirt\n";
845 OS <<
"\t.module\tnovirt\n";
849 OS <<
"\t.module\tginv\n";
853 OS <<
"\t.module\tnoginv\n";
857MipsTargetELFStreamer::ISAMode
860 return ISAMode::Mips16;
862 return ISAMode::MicroMips;
863 return ISAMode::Standard;
869 Mode(getISAMode(STI)), STI(STI) {
895 unsigned EFlags = W.getELFHeaderEFlags();
906 if (Features[Mips::FeatureMips64r6])
908 else if (Features[Mips::FeatureMips64r2] ||
909 Features[Mips::FeatureMips64r3] ||
910 Features[Mips::FeatureMips64r5])
912 else if (Features[Mips::FeatureMips64])
914 else if (Features[Mips::FeatureMips5])
916 else if (Features[Mips::FeatureMips4])
918 else if (Features[Mips::FeatureMips3])
920 else if (Features[Mips::FeatureMips32r6])
922 else if (Features[Mips::FeatureMips32r2] ||
923 Features[Mips::FeatureMips32r3] ||
924 Features[Mips::FeatureMips32r5])
926 else if (Features[Mips::FeatureMips32])
928 else if (Features[Mips::FeatureMips2])
934 if (Features[Mips::FeatureCnMips])
936 else if (Features[Mips::FeatureR5900])
942 if (Features[Mips::FeatureNaN2008])
945 W.setELFHeaderEFlags(EFlags);
979 if (CLOpts.round_section_sizes) {
987 Align Alignment = Section.getAlign();
989 if (
getContext().getAsmInfo().useCodeAlign(Section))
1000 unsigned EFlags = W.getELFHeaderEFlags();
1006 else if (
getABI().IsN32())
1009 if (Features[Mips::FeatureGP64Bit]) {
1012 }
else if (Features[Mips::FeatureMips64r2] || Features[Mips::FeatureMips64])
1017 if (!Features[Mips::FeatureNoABICalls])
1023 W.setELFHeaderEFlags(EFlags);
1043 Symbol->
setOther(RhsSym.getOther());
1052 S.ensureHeadroom(4);
1054 S.appendContents(4, 0);
1059 S.ensureHeadroom(8);
1062 S.appendContents(8, 0);
1067 S.ensureHeadroom(4);
1069 S.appendContents(4, 0);
1074 S.ensureHeadroom(8);
1076 S.appendContents(8, 0);
1081 S.ensureHeadroom(4);
1083 S.appendContents(4, 0);
1088 S.ensureHeadroom(8);
1090 S.appendContents(8, 0);
1094 Mode = ISAMode::MicroMips;
1100 Mode = ISAMode::Standard;
1105 ModeStack.push_back(Mode);
1110 assert(!ModeStack.empty() &&
"unmatched .set pop");
1111 Mode = ModeStack.pop_back_val();
1116 Mode = getISAMode(STI);
1122 unsigned Flags = W.getELFHeaderEFlags();
1124 W.setELFHeaderEFlags(Flags);
1128 Mode = ISAMode::Mips16;
1130 unsigned Flags = W.getELFHeaderEFlags();
1132 W.setELFHeaderEFlags(Flags);
1138 Mode = ISAMode::Standard;
1144 unsigned Flags = W.getELFHeaderEFlags();
1146 W.setELFHeaderEFlags(Flags);
1160 MCSymbol *Sym = Context.getOrCreateSymbol(Name);
1181 MCSymbol *CurPCSym = Context.createTempSymbol();
1201 unsigned Flags = W.getELFHeaderEFlags();
1203 W.setELFHeaderEFlags(Flags);
1208 unsigned Flags = W.getELFHeaderEFlags();
1210 W.setELFHeaderEFlags(Flags);
1215 unsigned Flags = W.getELFHeaderEFlags();
1216 Flags &=
~ELF::EF_MIPS_NAN2008;
1217 W.setELFHeaderEFlags(Flags);
1222 unsigned Flags = W.getELFHeaderEFlags();
1225 Flags &=
~ELF::EF_MIPS_PIC;
1226 W.setELFHeaderEFlags(Flags);
1231 unsigned Flags = W.getELFHeaderEFlags();
1238 W.setELFHeaderEFlags(Flags);
1253 FrameReg = RegInfo->getEncodingValue(StackReg);
1255 ReturnReg = RegInfo->getEncodingValue(ReturnReg_);
1259 int CPUTopSavedRegOff) {
1266 int FPUTopSavedRegOff) {
1402 bool SaveLocationIsRegister) {
1409 if (SaveLocationIsRegister) {
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
static bool hasShortDelaySlot(MCInst &Inst)
static bool isMicroMips(const MCSubtargetInfo *STI)
static void printHex32(unsigned Value, raw_ostream &OS)
static bool isMips32r6(const MCSubtargetInfo *STI)
Container class for subtarget features.
void printExpr(raw_ostream &, const MCExpr &) const
MCContext & getContext() const
LLVM_ABI bool registerSymbol(const MCSymbol &Symbol)
static const MCBinaryExpr * createSub(const MCExpr *LHS, const MCExpr *RHS, MCContext &Ctx)
Context object for machine code objects.
const MCObjectFileInfo * getObjectFileInfo() const
LLVM_ABI MCSymbol * getOrCreateSymbol(const Twine &Name)
Lookup the symbol inside with the specified Name.
const MCAsmInfo & getAsmInfo() const
ELFObjectWriter & getWriter()
Base class for the full range of assembler expressions which are needed for parsing.
@ SymbolRef
References to labels and assigned expressions.
Instances of this class represent a single low-level machine instruction.
void addOperand(const MCOperand Op)
void setOpcode(unsigned Op)
MCSection * getBSSSection() const
bool isPositionIndependent() const
MCSection * getTextSection() const
MCSection * getDataSection() const
void emitValueToAlignment(Align Alignment, int64_t Fill=0, uint8_t FillLen=1, unsigned MaxBytesToEmit=0) override
Emit some number of copies of Value until the byte alignment ByteAlignment is reached.
MCAssembler & getAssembler()
void emitCodeAlignment(Align ByteAlignment, const MCSubtargetInfo &STI, unsigned MaxBytesToEmit=0) override
Emit nops until the byte alignment ByteAlignment is reached.
void emitInstruction(const MCInst &Inst, const MCSubtargetInfo &STI) override
Emit the given Instruction into the current section.
Instances of this class represent operands of the MCInst class.
static MCOperand createExpr(const MCExpr *Val)
static MCOperand createReg(MCRegister Reg)
static MCOperand createImm(int64_t Val)
MCRegisterInfo base class - We assume that the target defines a static array of MCRegisterDesc object...
Wrapper class representing physical registers. Should be passed by value.
This represents a section on linux, lots of unix variants and some bare metal systems.
Instances of this class represent a uniqued identifier for a section in the current translation unit.
void setAlignment(Align Value)
void ensureMinAlignment(Align MinAlignment)
Makes sure that Alignment is at least MinAlignment.
static const MCSpecifierExpr * create(const MCExpr *Expr, Spec S, MCContext &Ctx, SMLoc Loc=SMLoc())
Streaming machine code generation interface.
virtual bool popSection()
Restore the current and previous section from the section stack.
virtual void emitInstruction(const MCInst &Inst, const MCSubtargetInfo &STI)
Emit the given Instruction into the current section.
MCContext & getContext() const
virtual void emitLabel(MCSymbol *Symbol, SMLoc Loc=SMLoc())
Emit a label for Symbol into the current section.
virtual void emitIntValue(uint64_t Value, unsigned Size)
Special case of EmitValue that avoids the client having to pass in a MCExpr for constant integers.
void pushSection()
Save the current and previous section on the section stack.
virtual void switchSection(MCSection *Section, uint32_t Subsec=0)
Set the current section where code is being emitted to Section.
virtual void emitValueImpl(const MCExpr *Value, unsigned Size, SMLoc Loc=SMLoc())
Emit the expression Value into the output as a native integer of the given Size bytes.
Generic base class for all target subtargets.
bool hasFeature(unsigned Feature) const
LLVM_ABI void setOther(unsigned Other)
Represent a reference to a symbol from inside an expression.
const MCSymbol & getSymbol() const
static const MCSymbolRefExpr * create(const MCSymbol *Symbol, MCContext &Ctx, SMLoc Loc=SMLoc())
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
StringRef getName() const
getName - Get the symbol name.
MCStreamer & getStreamer()
MCTargetStreamer(MCStreamer &S)
void EmitMipsOptionRecords()
Emits all the option records stored up until the point it's called.
void createPendingLabelRelocs()
Mark labels as microMIPS, if necessary for the subtarget.
static const char * getRegisterName(MCRegister Reg, unsigned AltIdx=Mips::NoRegAltName)
void emitDirectiveSetMips32R3() override
void emitDirectiveSetFp(MipsABIFlagsSection::FpABIKind Value) override
void emitDirectiveSetArch(StringRef Arch) override
void emitDirectiveModuleGINV() override
void emitDirectiveCpsetup(MCRegister Reg, int RegOrOffset, const MCSymbol &Sym, bool IsReg) override
MipsTargetAsmStreamer(MCStreamer &S, formatted_raw_ostream &OS)
void emitDirectiveSetEVA() override
void emitDirectiveSetMips5() override
void emitDirectiveSetNoVirt() override
void emitDirectiveSetNoAt() override
void emitDirectiveSetNoCRC() override
void emitDirectiveSetMips32R5() override
void emitDirectiveSetNoMacro() override
void emitDirectiveModuleMT() override
void emitDirectiveSetNoOddSPReg() override
void emitDirectiveCpLocal(MCRegister Reg) override
void emitDirectiveModuleCRC() override
void emitDirectiveEnt(const MCSymbol &Symbol) override
void emitDirectiveSetDspr2() override
void emitDirectiveSetMips1() override
void emitDirectiveSetMips64R2() override
void emitDirectiveSetMips4() override
void emitDirectiveSetNoEVA() override
void emitDirectiveModuleSoftFloat() override
void emitDirectiveSetMips16() override
void emitDirectiveSetMt() override
void emitDirectiveInsn() override
void emitDTPRel64Value(const MCExpr *) override
void emitDirectiveSetMicroMips() override
void emitTPRel64Value(const MCExpr *) override
void emitDirectiveModuleNoCRC() override
void emitDirectiveSetMips32R6() override
bool emitDirectiveCpRestore(int Offset, function_ref< MCRegister()> GetATReg, SMLoc IDLoc, const MCSubtargetInfo *STI) override
Emit a .cprestore directive.
void emitDirectiveCpAdd(MCRegister Reg) override
void emitDirectiveSetNoGINV() override
void emitDirectiveSetMips64R5() override
void emitDirectiveSetMips32() override
void emitDirectiveCpLoad(MCRegister Reg) 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 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
bool emitDirectiveCpRestore(int Offset, function_ref< MCRegister()> GetATReg, SMLoc IDLoc, const MCSubtargetInfo *STI) override
void emitDTPRel32Value(const MCExpr *) override
void emitDirectiveSetPop() override
MipsTargetELFStreamer(MCStreamer &S, const MCSubtargetInfo &STI)
void emitDirectiveNaN2008() override
void emitDirectiveSetNoMicroMips() override
void emitGPRel64Value(const MCExpr *) 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
void emitDirectiveCpsetup(MCRegister Reg, int RegOrOffset, const MCSymbol &Sym, bool IsReg) override
void emitDirectiveSetPush() override
void emitDirectiveCpAdd(MCRegister Reg) override
void emitDirectiveCpLocal(MCRegister Reg) 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 emitMask(unsigned CPUBitmask, int CPUTopSavedRegOff) override
void emitDirectiveAbiCalls() override
void emitFMask(unsigned FPUBitmask, int FPUTopSavedRegOff) override
void emitDirectiveCpLoad(MCRegister Reg) override
void emitDirectiveSetMips0() override
void emitDirectiveSetNoMips16() 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
bool isMips16Enabled() const
void emitDirectiveSetNoReorder() override
void emitDirectiveNaNLegacy() override
MCELFStreamer & getStreamer()
std::optional< MipsABIInfo > ABI
virtual void emitDirectiveSetEVA()
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)
virtual void emitDirectiveModuleNoGINV()
virtual void emitDirectiveCpLoad(MCRegister Reg)
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 emitDirectiveSetNoEVA()
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 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 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()
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 bool emitDirectiveCpRestore(int Offset, function_ref< MCRegister()> GetATReg, SMLoc IDLoc, const MCSubtargetInfo *STI)
virtual void emitDirectiveModuleCRC()
virtual void emitDirectiveModuleGINV()
virtual void emitDirectiveSetNoAt()
virtual void emitDirectiveNaNLegacy()
virtual void emitMask(unsigned CPUBitmask, int CPUTopSavedRegOff)
virtual void emitDirectiveCpsetup(MCRegister Reg, int RegOrOffset, const MCSymbol &Sym, bool IsReg)
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 emitDirectiveCpAdd(MCRegister Reg)
virtual void emitDirectiveSetAtWithArg(unsigned RegNo)
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 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.
MipsTargetStreamer(MCStreamer &S)
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()
void emitStoreWithImmOffset(unsigned Opcode, MCRegister SrcReg, MCRegister BaseReg, int64_t Offset, function_ref< MCRegister()> GetATReg, SMLoc IDLoc, const MCSubtargetInfo *STI)
Emit a store instruction with an offset.
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 emitDirectiveCpLocal(MCRegister Reg)
virtual void emitDirectiveSetMips16()
virtual void emitDirectiveSetMips64()
virtual void emitDirectiveAbiCalls()
virtual void emitDirectiveModuleFP()
MipsABIFlagsSection ABIFlagsSection
Represents a location in source code.
Represent a constant reference to a string, i.e.
LLVM_ABI std::string lower() const
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
The instances of the Type class are immutable: once they are created, they are never changed.
LLVM Value Representation.
An efficient, type-erasing, non-owning reference to a callable.
This class implements an extremely fast bulk output stream that can only output to a stream.
raw_ostream & write_hex(unsigned long long N)
Output N in hexadecimal, without any prefix or padding.
const MCSpecifierExpr * createGpOff(const MCExpr *Expr, Specifier S, MCContext &Ctx)
This is an optimization pass for GlobalISel generic memory operations.
constexpr bool isInt(int64_t x)
Checks if an integer fits into the given bit width.
LLVM_ABI void report_fatal_error(Error Err, bool gen_crash_diag=true)
@ Global
Append to llvm.global_dtors.
This struct is a compact representation of a valid (non-zero power of two) alignment.