34 "mips-round-section-sizes",
cl::init(
false),
120 bool SaveLocationIsRegister) {}
198 unsigned Reg2,
SMLoc IDLoc,
204 int16_t Imm,
SMLoc IDLoc,
210 unsigned Reg1, int16_t Imm0, int16_t Imm1,
211 int16_t Imm2,
SMLoc IDLoc,
225 unsigned TrgReg,
bool Is64Bit,
227 emitRRR(Is64Bit ? Mips::DADDu : Mips::ADDu, DstReg, SrcReg, TrgReg,
SMLoc(),
232 int16_t ShiftAmount,
SMLoc IDLoc,
234 if (ShiftAmount >= 32) {
235 emitRRI(Mips::DSLL32, DstReg, SrcReg, ShiftAmount - 32, IDLoc, STI);
239 emitRRI(Mips::DSLL, DstReg, SrcReg, ShiftAmount, IDLoc, STI);
244 if (hasShortDelaySlot)
245 emitRR(Mips::MOVE16_MM, Mips::ZERO, Mips::ZERO, IDLoc, STI);
247 emitRRI(Mips::SLL, Mips::ZERO, Mips::ZERO, 0, IDLoc, STI);
251 emitRRI(Mips::SLL, Mips::ZERO, Mips::ZERO, 0, IDLoc, STI);
263 unsigned Opcode,
unsigned SrcReg,
unsigned BaseReg, int64_t Offset,
267 emitRRI(Opcode, SrcReg, BaseReg, Offset, IDLoc, STI);
275 unsigned ATReg = GetATReg();
279 unsigned LoOffset = Offset & 0x0000ffff;
280 unsigned HiOffset = (Offset & 0xffff0000) >> 16;
284 if (LoOffset & 0x8000)
288 emitRI(Mips::LUi, ATReg, HiOffset, IDLoc, STI);
289 if (BaseReg != Mips::ZERO)
290 emitRRR(Mips::ADDu, ATReg, ATReg, BaseReg, IDLoc, STI);
292 emitRRI(Opcode, SrcReg, ATReg, LoOffset, IDLoc, STI);
298 unsigned Opcode,
unsigned SrcReg,
unsigned BaseReg,
MCOperand &HiOperand,
305 emitRX(Mips::LUi, ATReg, HiOperand, IDLoc, STI);
306 if (BaseReg != Mips::ZERO)
307 emitRRR(Mips::ADDu, ATReg, ATReg, BaseReg, IDLoc, STI);
309 emitRRX(Opcode, SrcReg, ATReg, LoOperand, IDLoc, STI);
317 unsigned BaseReg, int64_t Offset,
318 unsigned TmpReg,
SMLoc IDLoc,
321 emitRRI(Opcode, DstReg, BaseReg, Offset, IDLoc, STI);
332 unsigned LoOffset = Offset & 0x0000ffff;
333 unsigned HiOffset = (Offset & 0xffff0000) >> 16;
337 if (LoOffset & 0x8000)
341 emitRI(Mips::LUi, TmpReg, HiOffset, IDLoc, STI);
342 if (BaseReg != Mips::ZERO)
343 emitRRR(Mips::ADDu, TmpReg, TmpReg, BaseReg, IDLoc, STI);
345 emitRRI(Opcode, DstReg, TmpReg, LoOffset, IDLoc, STI);
357 unsigned TmpReg,
SMLoc IDLoc,
365 emitRX(Mips::LUi, TmpReg, HiOperand, IDLoc, STI);
366 if (BaseReg != Mips::ZERO)
367 emitRRR(Mips::ADDu, TmpReg, TmpReg, BaseReg, IDLoc, STI);
369 emitRRX(Opcode, DstReg, TmpReg, LoOperand, IDLoc, STI);
377 OS <<
"\t.set\tmicromips\n";
382 OS <<
"\t.set\tnomicromips\n";
387 OS <<
"\t.set\tmips16\n";
392 OS <<
"\t.set\tnomips16\n";
397 OS <<
"\t.set\treorder\n";
402 OS <<
"\t.set\tnoreorder\n";
407 OS <<
"\t.set\tmacro\n";
412 OS <<
"\t.set\tnomacro\n";
417 OS <<
"\t.set\tmsa\n";
422 OS <<
"\t.set\tnomsa\n";
427 OS <<
"\t.set\tmt\n";
432 OS <<
"\t.set\tnomt\n";
437 OS <<
"\t.set\tcrc\n";
442 OS <<
"\t.set\tnocrc\n";
447 OS <<
"\t.set\tvirt\n";
452 OS <<
"\t.set\tnovirt\n";
457 OS <<
"\t.set\tginv\n";
462 OS <<
"\t.set\tnoginv\n";
467 OS <<
"\t.set\tat\n";
472 OS <<
"\t.set\tat=$" <<
Twine(RegNo) <<
"\n";
477 OS <<
"\t.set\tnoat\n";
482 OS <<
"\t.end\t" << Name <<
'\n';
486 OS <<
"\t.ent\t" << Symbol.
getName() <<
'\n';
494 OS <<
"\t.nan\tlegacy\n";
498 OS <<
"\t.option\tpic0\n";
502 OS <<
"\t.option\tpic2\n";
519 OS <<
"\t.set arch=" << Arch <<
"\n";
524 OS <<
"\t.set\tmips0\n";
529 OS <<
"\t.set\tmips1\n";
534 OS <<
"\t.set\tmips2\n";
539 OS <<
"\t.set\tmips3\n";
544 OS <<
"\t.set\tmips4\n";
549 OS <<
"\t.set\tmips5\n";
554 OS <<
"\t.set\tmips32\n";
559 OS <<
"\t.set\tmips32r2\n";
564 OS <<
"\t.set\tmips32r3\n";
569 OS <<
"\t.set\tmips32r5\n";
574 OS <<
"\t.set\tmips32r6\n";
579 OS <<
"\t.set\tmips64\n";
584 OS <<
"\t.set\tmips64r2\n";
589 OS <<
"\t.set\tmips64r3\n";
594 OS <<
"\t.set\tmips64r5\n";
599 OS <<
"\t.set\tmips64r6\n";
604 OS <<
"\t.set\tdsp\n";
609 OS <<
"\t.set\tdspr2\n";
614 OS <<
"\t.set\tnodsp\n";
619 OS <<
"\t.set\tpop\n";
624 OS <<
"\t.set\tpush\n";
629 OS <<
"\t.set\tsoftfloat\n";
634 OS <<
"\t.set\thardfloat\n";
641 for (
int i = 7; i >= 0; i--)
642 OS.
write_hex((Value & (0xF << (i * 4))) >> (i * 4));
646 int CPUTopSavedRegOff) {
649 OS <<
',' << CPUTopSavedRegOff <<
'\n';
653 int FPUTopSavedRegOff) {
656 OS <<
"," << FPUTopSavedRegOff <<
'\n';
669 OS <<
"\t.cprestore\t" << Offset <<
"\n";
677 OS <<
"\t.cpsetup\t$" 693 bool SaveLocationIsRegister) {
699 OS <<
"\t.module\tfp=";
719 OS <<
"\t.set\toddspreg\n";
724 OS <<
"\t.set\tnooddspreg\n";
728 OS <<
"\t.module\tsoftfloat\n";
732 OS <<
"\t.module\thardfloat\n";
736 OS <<
"\t.module\tmt\n";
740 OS <<
"\t.module\tcrc\n";
744 OS <<
"\t.module\tnocrc\n";
748 OS <<
"\t.module\tvirt\n";
752 OS <<
"\t.module\tnovirt\n";
756 OS <<
"\t.module\tginv\n";
760 OS <<
"\t.module\tnoginv\n";
805 if (Features[Mips::FeatureMips64r6])
807 else if (Features[Mips::FeatureMips64r2] ||
808 Features[Mips::FeatureMips64r3] ||
809 Features[Mips::FeatureMips64r5])
811 else if (Features[Mips::FeatureMips64])
813 else if (Features[Mips::FeatureMips5])
815 else if (Features[Mips::FeatureMips4])
817 else if (Features[Mips::FeatureMips3])
819 else if (Features[Mips::FeatureMips32r6])
821 else if (Features[Mips::FeatureMips32r2] ||
822 Features[Mips::FeatureMips32r3] ||
823 Features[Mips::FeatureMips32r5])
825 else if (Features[Mips::FeatureMips32])
827 else if (Features[Mips::FeatureMips2])
833 if (Features[Mips::FeatureCnMips])
837 if (Features[Mips::FeatureNaN2008])
844 auto *
Symbol = cast<MCSymbolELF>(S);
870 if (RoundSectionSizes) {
900 else if (
getABI().IsN32())
903 if (Features[Mips::FeatureGP64Bit]) {
906 }
else if (Features[Mips::FeatureMips64r2] || Features[Mips::FeatureMips64])
911 if (!Features[Mips::FeatureNoABICalls])
929 auto *
Symbol = cast<MCSymbolELF>(S);
933 const auto &RhsSym = cast<MCSymbolELF>(
947 MicroMipsEnabled =
true;
952 MicroMipsEnabled =
false;
1084 unsigned ReturnReg_) {
1095 int CPUTopSavedRegOff) {
1102 int FPUTopSavedRegOff) {
1202 emitRRR(Mips::OR64, RegOrOffset, Mips::GP, Mips::ZERO,
SMLoc(), &STI);
1205 emitRRI(Mips::SD, Mips::GP, Mips::SP, RegOrOffset,
SMLoc(), &STI);
1242 emitRRR(Mips::DADDu, Mips::GP, Mips::GP, RegNo,
SMLoc(), &STI);
1246 bool SaveLocationIsRegister) {
1253 if (SaveLocationIsRegister) {
void emitDirectiveSetDsp() override
void emitDirectiveEnd(StringRef Name) override
virtual void emitFMask(unsigned FPUBitmask, int FPUTopSavedRegOff)
void emitRR(unsigned Opcode, unsigned Reg0, unsigned Reg1, SMLoc IDLoc, const MCSubtargetInfo *STI)
void emitDirectiveSetMips3() override
void emitMask(unsigned CPUBitmask, int CPUTopSavedRegOff) override
void emitDirectiveModuleMT() override
void setELFHeaderEFlags(unsigned Flags)
Instances of this class represent a uniqued identifier for a section in the current translation unit...
virtual void emitDirectiveModuleGINV()
void emitDirectiveModuleSoftFloat() override
void emitRRIII(unsigned Opcode, unsigned Reg0, unsigned Reg1, int16_t Imm0, int16_t Imm1, int16_t Imm2, SMLoc IDLoc, const MCSubtargetInfo *STI)
void emitDirectiveSetCRC() override
void emitDirectiveCpsetup(unsigned RegNo, int RegOrOffset, const MCSymbol &Sym, bool IsReg) override
void emitDirectiveSetDspr2() override
virtual void emitDirectiveModuleCRC()
void emitMask(unsigned CPUBitmask, int CPUTopSavedRegOff) override
GCNRegPressure max(const GCNRegPressure &P1, const GCNRegPressure &P2)
bool UseCodeAlign() const override
Return true if a .align directive should use "optimized nops" to fill instead of 0s.
virtual void emitDirectiveOptionPic2()
static const MCSymbolRefExpr * create(const MCSymbol *Symbol, MCContext &Ctx)
void emitDirectiveOptionPic2() override
LLVM_ATTRIBUTE_NORETURN void report_fatal_error(Error Err, bool gen_crash_diag=true)
Report a serious error, calling any installed error handler.
Compute iterated dominance frontiers using a linear time algorithm.
void emitDirectiveSetMips2() override
void emitDirectiveModuleNoCRC() override
void emitDirectiveModuleNoGINV() override
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
void emitDirectiveSetReorder() override
void emitDirectiveSetNoMicroMips() override
static MCOperand createExpr(const MCExpr *Val)
void emitDirectiveSetMt() override
void emitAddu(unsigned DstReg, unsigned SrcReg, unsigned TrgReg, bool Is64Bit, const MCSubtargetInfo *STI)
Target specific streamer interface.
void emitDirectiveCpreturn(unsigned SaveLocation, bool SaveLocationIsRegister) override
void setAlignment(unsigned Value)
void emitDirectiveSetOddSPReg() override
void emitDirectiveNaN2008() override
An efficient, type-erasing, non-owning reference to a callable.
void emitDirectiveOptionPic0() override
virtual void emitDirectiveSetNoReorder()
void emitDirectiveModuleFP() override
virtual void emitDirectiveModuleHardFloat()
void registerSymbol(const MCSymbol &Symbol, bool *Created=nullptr)
void PushSection()
Save the current and previous section on the section stack.
virtual void emitDirectiveModuleNoGINV()
void emitDirectiveSetFp(MipsABIFlagsSection::FpABIKind Value) override
constexpr bool isInt< 16 >(int64_t x)
void emitGPRestore(int Offset, SMLoc IDLoc, const MCSubtargetInfo *STI)
Emit the $gp restore operation for .cprestore.
block Block Frequency true
void emitDirectiveSetMips32R6() override
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.
MipsTargetAsmStreamer(MCStreamer &S, formatted_raw_ostream &OS)
bool emitDirectiveCpRestore(int Offset, function_ref< unsigned()> GetATReg, SMLoc IDLoc, const MCSubtargetInfo *STI) override
Emit a .cprestore directive.
void emitDirectiveCpLoad(unsigned RegNo) override
virtual void EmitInstruction(const MCInst &Inst, const MCSubtargetInfo &STI, bool PrintSchedInfo=false)
Emit the given Instruction into the current section.
virtual void emitDirectiveSetVirt()
const Triple & getTargetTriple() const
void emitDirectiveSetVirt() override
unsigned getAlignment() const
virtual void emitDirectiveSetMips32R3()
const MipsABIInfo & getABI() const
MCContext & getContext() const
virtual void emitDirectiveSetMicroMips()
void emitDirectiveSetNoMt() override
virtual void emitDirectiveSetMips3()
void emitDirectiveSetAt() override
void emitDirectiveSetPop() override
void emitDirectiveSetMips4() override
void emitFrame(unsigned StackReg, unsigned StackSize, unsigned ReturnReg) override
static MCOperand createReg(unsigned Reg)
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
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.
void emitDirectiveAbiCalls() override
const FeatureBitset & getFeatureBits() const
void emitDirectiveSetMicroMips() override
virtual void emitFrame(unsigned StackReg, unsigned StackSize, unsigned ReturnReg)
virtual void emitDirectiveSetMips0()
void emitDirectiveSetNoAt() override
virtual void emitDirectiveSetSoftFloat()
virtual void emitDirectiveSetNoMacro()
void emitDirectiveSetMsa() override
Base class for the full range of assembler expressions which are needed for parsing.
virtual void emitDirectiveSetPush()
bool registerSection(MCSection &Section)
virtual void emitDirectiveEnd(StringRef Name)
Represent a reference to a symbol from inside an expression.
MCSection * getBSSSection() const
MCSection * getDataSection() const
void emitDirectiveSetNoGINV() override
virtual void emitDirectiveSetMips32R6()
void emitDirectiveSetMips1() override
void emitDirectiveSetNoCRC() override
void createPendingLabelRelocs()
Mark labels as microMIPS, if necessary for the subtarget.
void emitFMask(unsigned FPUBitmask, int FPUTopSavedRegOff) override
virtual void emitDirectiveSetMips1()
virtual void emitDirectiveModuleOddSPReg()
Context object for machine code objects.
void emitNop(SMLoc IDLoc, const MCSubtargetInfo *STI)
void emitDirectiveModuleVirt() override
virtual void emitDirectiveModuleSoftFloat()
static const MCBinaryExpr * createSub(const MCExpr *LHS, const MCExpr *RHS, MCContext &Ctx)
ArchType getArch() const
getArch - Get the parsed architecture type of this triple.
void emitDirectiveSetSoftFloat() override
MipsABIFlagsSection ABIFlagsSection
raw_ostream & write_hex(unsigned long long N)
Output N in hexadecimal, without any prefix or padding.
void emitDirectiveSetMips32R2() override
virtual void emitDirectiveModuleFP()
void emitDirectiveSetMips5() override
void emitDirectiveSetMips0() override
void emitLabel(MCSymbol *Symbol) override
virtual void emitDirectiveSetOddSPReg()
virtual void emitDirectiveSetMips64R2()
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...
virtual void emitDirectiveSetNoOddSPReg()
void emitDirectiveCpsetup(unsigned RegNo, int RegOrOffset, const MCSymbol &Sym, bool IsReg) override
Expected< const typename ELFT::Sym * > getSymbol(typename ELFT::SymRange Symbols, uint32_t Index)
Instances of this class represent a single low-level machine instruction.
void emitRX(unsigned Opcode, unsigned Reg0, MCOperand Op1, SMLoc IDLoc, const MCSubtargetInfo *STI)
MCRegisterInfo base class - We assume that the target defines a static array of MCRegisterDesc object...
virtual void setUsesMicroMips()
void emitDirectiveSetMips16() override
initializer< Ty > init(const Ty &Val)
void emitDirectiveNaNLegacy() override
void emitDirectiveSetHardFloat() override
void emitDirectiveSetMips32R3() override
Streaming machine code generation interface.
void emitDirectiveSetMips64() override
MCSymbol * createTempSymbol(bool CanBeUnnamed=true)
Create and return a new assembler temporary symbol with a unique but unspecified name.
virtual void emitDirectiveSetMips4()
Container class for subtarget features.
static const MipsMCExpr * createGpOff(MipsExprKind Kind, const MCExpr *Expr, MCContext &Ctx)
The instances of the Type class are immutable: once they are created, they are never changed...
virtual void emitDirectiveSetNoMicroMips()
virtual void emitDirectiveSetNoDsp()
StringRef getFpABIString(FpABIKind Value)
void emitDirectiveModuleNoVirt() override
virtual void emitDirectiveModuleVirt()
void emitDirectiveSetNoReorder() override
virtual void emitDirectiveSetMips16()
virtual void SwitchSection(MCSection *Section, const MCExpr *Subsection=nullptr)
Set the current section where code is being emitted to Section.
MCAssembler & getAssembler()
static ManagedStatic< OptionRegistry > OR
virtual void emitDirectiveSetMacro()
void emitDirectiveCpreturn(unsigned SaveLocation, bool SaveLocationIsRegister) override
virtual void emitDirectiveNaN2008()
void emitDirectiveSetGINV() override
void emitRI(unsigned Opcode, unsigned Reg0, int32_t Imm, SMLoc IDLoc, const MCSubtargetInfo *STI)
virtual void emitDirectiveCpLoad(unsigned RegNo)
virtual void EmitValueToAlignment(unsigned ByteAlignment, int64_t Value=0, unsigned ValueSize=1, unsigned MaxBytesToEmit=0)
Emit some number of copies of Value until the byte alignment ByteAlignment is reached.
void emitR(unsigned Opcode, unsigned Reg0, SMLoc IDLoc, const MCSubtargetInfo *STI)
const MCObjectFileInfo * getObjectFileInfo() const
virtual void emitDirectiveSetCRC()
virtual void emitDirectiveSetArch(StringRef Arch)
void emitDirectiveSetMips32() override
virtual void emitDirectiveSetDsp()
virtual void emitMask(unsigned CPUBitmask, int CPUTopSavedRegOff)
void emitDirectiveSetMips64R2() override
unsigned getELFHeaderEFlags() const
ELF e_header flags.
virtual void emitDirectiveSetNoCRC()
void emitDirectiveSetMacro() override
virtual void emitDirectiveSetMips32R5()
bool isMicroMipsEnabled() const
void emitDirectiveSetNoMsa() override
void emitDirectiveSetMips64R3() override
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.
void emitDirectiveSetMips16() override
virtual void emitDirectiveSetFp(MipsABIFlagsSection::FpABIKind Value)
void emitRRR(unsigned Opcode, unsigned Reg0, unsigned Reg1, unsigned Reg2, SMLoc IDLoc, const MCSubtargetInfo *STI)
virtual void emitDirectiveAbiCalls()
void emitFMask(unsigned FPUBitmask, int FPUTopSavedRegOff) override
virtual void emitDirectiveSetMips64R6()
void emitDirectiveEnt(const MCSymbol &Symbol) override
MCStreamer & getStreamer()
void emitDirectiveEnt(const MCSymbol &Symbol) override
virtual void emitDirectiveModuleNoVirt()
void setOpcode(unsigned Op)
void emitDirectiveModuleCRC() override
virtual void emitDirectiveOptionPic0()
void emitDSLL(unsigned DstReg, unsigned SrcReg, int16_t ShiftAmount, SMLoc IDLoc, const MCSubtargetInfo *STI)
void emitAssignment(MCSymbol *Symbol, const MCExpr *Value) override
virtual void emitDirectiveSetNoGINV()
virtual void EmitCodeAlignment(unsigned ByteAlignment, unsigned MaxBytesToEmit=0)
Emit nops until the byte alignment ByteAlignment is reached.
virtual void emitDirectiveSetPop()
void emitDirectiveSetMips32R5() override
void emitEmptyDelaySlot(bool hasShortDelaySlot, SMLoc IDLoc, const MCSubtargetInfo *STI)
void emitDirectiveInsn() override
virtual void emitDirectiveSetAt()
virtual void emitDirectiveSetNoMips16()
void emitDirectiveSetNoOddSPReg() override
void emitDirectiveSetAtWithArg(unsigned RegNo) override
void emitDirectiveEnd(StringRef Name) override
MipsTargetELFStreamer(MCStreamer &S, const MCSubtargetInfo &STI)
virtual void emitDirectiveInsn()
void setUsesMicroMips() override
void EmitMipsOptionRecords()
Emits all the option records stored up until the point it's called.
void emitDirectiveSetNoDsp() override
virtual void emitDirectiveCpsetup(unsigned RegNo, int RegOrOffset, const MCSymbol &Sym, bool IsReg)
static const MipsMCExpr * create(MipsExprKind Kind, const MCExpr *Expr, MCContext &Ctx)
virtual void emitDirectiveSetNoVirt()
void emitDirectiveSetMips64R5() override
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()
void emitDirectiveCpLoad(unsigned RegNo) override
virtual void emitDirectiveEnt(const MCSymbol &Symbol)
uint16_t getEncodingValue(unsigned RegNo) const
Returns the encoding for RegNo.
virtual void emitDirectiveSetHardFloat()
MCSymbol * getOrCreateSymbol(const Twine &Name)
Lookup the symbol inside with the specified Name.
virtual void emitDirectiveSetMips64()
MCELFStreamer & getStreamer()
virtual bool emitDirectiveCpRestore(int Offset, function_ref< unsigned()> GetATReg, SMLoc IDLoc, const MCSubtargetInfo *STI)
virtual void emitDirectiveSetDspr2()
virtual void emitDirectiveSetMips5()
void emitDirectiveSetNoMips16() override
void emitDirectiveOptionPic2() override
virtual void emitDirectiveSetMips2()
Generic base class for all target subtargets.
This represents a section on linux, lots of unix variants and some bare metal systems.
References to labels and assigned expressions.
void emitDirectiveSetNoMacro() override
MipsTargetStreamer(MCStreamer &S)
void emitDirectiveSetNoMicroMips() override
void emitFrame(unsigned StackReg, unsigned StackSize, unsigned ReturnReg) override
void emitDirectiveSetMips64R6() override
virtual void emitDirectiveSetMt()
static bool hasShortDelaySlot(unsigned Opcode)
void emitDirectiveSetArch(StringRef Arch) override
void emitDirectiveModuleOddSPReg() override
void emitDirectiveAbiCalls() override
StringRef getName() const
getName - Get the symbol name.
void emitRRI(unsigned Opcode, unsigned Reg0, unsigned Reg1, int16_t Imm, SMLoc IDLoc, const MCSubtargetInfo *STI)
LLVM_NODISCARD std::string lower() const
void emitRRX(unsigned Opcode, unsigned Reg0, unsigned Reg1, MCOperand Op2, SMLoc IDLoc, const MCSubtargetInfo *STI)
MCSection * getTextSection() const
virtual void emitDirectiveSetNoMt()
bool PopSection()
Restore the current and previous section from the section stack.
MCSectionELF * getELFSection(const Twine &Section, unsigned Type, unsigned Flags)
virtual void emitDirectiveSetReorder()
static const char * getRegisterName(unsigned RegNo)
const MCRegisterInfo * getRegisterInfo() const
LLVM Value Representation.
void forbidModuleDirective()
virtual void emitDirectiveCpreturn(unsigned SaveLocation, bool SaveLocationIsRegister)
constexpr char Size[]
Key for Kernel::Arg::Metadata::mSize.
llvm::Optional< MipsABIInfo > ABI
const FeatureBitset Features
virtual void emitDirectiveNaNLegacy()
virtual void EmitLabel(MCSymbol *Symbol, SMLoc Loc=SMLoc())
Emit a label for Symbol into the current section.
void emitII(unsigned Opcode, int16_t Imm1, int16_t Imm2, SMLoc IDLoc, const MCSubtargetInfo *STI)
void emitDirectiveSetNoReorder() override
This class implements an extremely fast bulk output stream that can only output to a stream...
virtual void emitDirectiveSetMips32()
virtual void emitDirectiveSetNoMsa()
void addOperand(const MCOperand &Op)
StringRef - Represent a constant reference to a string, i.e.
void emitDirectiveNaN2008() override
virtual void emitDirectiveModuleNoCRC()
bool isPositionIndependent() const
virtual void emitDirectiveSetMsa()
static void printHex32(unsigned Value, raw_ostream &OS)
virtual void emitDirectiveSetNoAt()
Represents a location in source code.
Instances of this class represent operands of the MCInst class.
virtual void emitDirectiveSetGINV()
bool emitDirectiveCpRestore(int Offset, function_ref< unsigned()> GetATReg, SMLoc IDLoc, const MCSubtargetInfo *STI) override
virtual void emitDirectiveSetAtWithArg(unsigned RegNo)
static MCOperand createImm(int64_t Val)
void emitDirectiveModuleGINV() override
void emitDirectiveInsn() override
void emitDirectiveSetPush() override
void emitDirectiveSetNoVirt() override
void emitDirectiveModuleHardFloat() override
void emitDirectiveNaNLegacy() override
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 emitDirectiveOptionPic0() override
void emitDirectiveSetMicroMips() override
void EmitInstruction(const MCInst &Inst, const MCSubtargetInfo &STI, bool=false) override
Emit the given Instruction into the current section.