Go to the documentation of this file.
13 #ifndef LLVM_MC_MCSTREAMER_H
14 #define LLVM_MC_MCSTREAMER_H
41 class AssemblerConstantPools;
52 class MCSubtargetInfo;
54 class MCSymbolRefExpr;
60 struct DefRangeRegisterRelHeader;
61 struct DefRangeSubfieldRegisterHeader;
62 struct DefRangeRegisterHeader;
63 struct DefRangeFramePointerRelHeader;
146 virtual void emitSetFP(
unsigned FpReg,
unsigned SpReg,
148 virtual void emitMovSP(
unsigned Reg, int64_t Offset = 0);
149 virtual void emitPad(int64_t Offset);
160 virtual void emitFPU(
unsigned FPU);
187 virtual void reset();
199 std::unique_ptr<AssemblerConstantPools> ConstantPools;
214 std::unique_ptr<MCTargetStreamer> TargetStreamer;
216 std::vector<MCDwarfFrameInfo> DwarfFrameInfos;
221 std::vector<std::unique_ptr<WinEH::FrameInfo>> WinFrameInfos;
224 size_t CurrentProcWinFrameInfoStartIndex;
236 const SMLoc *StartTokLocPtr =
nullptr;
242 unsigned NextWinCFIID = 0;
244 bool UseAssemblerInfoForParsing;
251 bool AllowAutoPadding =
false;
260 return CurrentWinFrameInfo;
281 TargetStreamer.reset(TS);
286 return StartTokLocPtr ? *StartTokLocPtr :
SMLoc();
291 virtual void reset();
301 return TargetStreamer.get();
322 return WinFrameInfos;
385 if (!SectionStack.empty())
386 return SectionStack.back().first;
393 if (!SectionStack.empty())
394 return SectionStack.back().second;
401 return SymbolOrdering.
lookup(Sym);
412 SectionStack.push_back(
421 if (SectionStack.size() <= 1)
423 auto I = SectionStack.end();
429 if (NewSection.first && OldSection != NewSection)
431 SectionStack.pop_back();
436 if (SectionStack.empty())
448 const MCExpr *Subsection =
nullptr);
454 const MCExpr *Subsection =
nullptr) {
455 assert(Section &&
"Cannot switch to a null section!");
457 SectionStack.back().second = curSection;
503 unsigned Minor,
unsigned Update,
509 unsigned Minor,
unsigned Update,
520 const Triple *DarwinTargetVariantTriple,
763 bool IsSectionRelative =
false);
829 virtual void emitFill(
const MCExpr &NumValues, int64_t Size, int64_t Expr,
832 virtual void emitNops(int64_t NumBytes, int64_t ControlledNopLength,
857 unsigned ValueSize = 1,
858 unsigned MaxBytesToEmit = 0);
873 unsigned MaxBytesToEmit = 0);
934 unsigned Column,
unsigned Flags,
935 unsigned Isa,
unsigned Discriminator,
951 unsigned IAFile,
unsigned IALine,
952 unsigned IACol,
SMLoc Loc);
956 unsigned Line,
unsigned Column,
957 bool PrologueEnd,
bool IsStmt,
968 unsigned SourceFileId,
969 unsigned SourceLineNum,
976 ArrayRef<std::pair<const MCSymbol *, const MCSymbol *>> Ranges,
980 ArrayRef<std::pair<const MCSymbol *, const MCSymbol *>> Ranges,
984 ArrayRef<std::pair<const MCSymbol *, const MCSymbol *>> Ranges,
988 ArrayRef<std::pair<const MCSymbol *, const MCSymbol *>> Ranges,
992 ArrayRef<std::pair<const MCSymbol *, const MCSymbol *>> Ranges,
1022 virtual void emitCFIDefCfa(int64_t Register, int64_t Offset);
1027 virtual void emitCFIOffset(int64_t Register, int64_t Offset);
1056 SMLoc Loc = SMLoc());
1059 SMLoc Loc = SMLoc());
1061 SMLoc Loc = SMLoc());
1065 SMLoc Loc = SMLoc());
1069 const MCSymbolRefExpr *To,
uint64_t Count);
1083 virtual Optional<std::pair<bool, std::string>>
1137 const Twine &Comment);
1163 #endif // LLVM_MC_MCSTREAMER_H
void setUseAssemblerInfoForParsing(bool v)
virtual void emitCVInlineLinetableDirective(unsigned PrimaryFunctionId, unsigned SourceFileId, unsigned SourceLineNum, const MCSymbol *FnStartSym, const MCSymbol *FnEndSym)
This implements the CodeView '.cv_inline_linetable' assembler directive.
MCStreamer & getStreamer()
virtual void emitCantUnwind()
virtual void emitCVFileChecksumsDirective()
This implements the CodeView '.cv_filechecksums' assembler directive.
virtual bool emitCVFuncIdDirective(unsigned FunctionId)
Introduces a function id for use with .cv_loc.
virtual void emitCFIDefCfaOffset(int64_t Offset)
virtual void emitDataRegion(MCDataRegionType Kind)
Note in the output the specified region Kind.
MCSection * getAssociatedXDataSection(const MCSection *TextSec)
Get the .xdata section used for the given section.
void visitUsedExpr(const MCExpr &Expr)
virtual void changeSection(const MCSection *CurSection, MCSection *Section, const MCExpr *SubSection, raw_ostream &OS)
Update streamer for a new active section.
This is an optimization pass for GlobalISel generic memory operations.
virtual void emitLabel(MCSymbol *Symbol)
virtual void emitCFILLVMDefAspaceCfa(int64_t Register, int64_t Offset, int64_t AddressSpace)
virtual void emitWinCFISetFrame(MCRegister Register, unsigned Offset, SMLoc Loc=SMLoc())
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
void setTargetStreamer(MCTargetStreamer *TS)
virtual void emitCFIOffset(int64_t Register, int64_t Offset)
virtual void emitAbsoluteSymbolDiffAsULEB128(const MCSymbol *Hi, const MCSymbol *Lo)
Emit the absolute difference between two symbols encoded with ULEB128.
bool getUseAssemblerInfoForParsing()
virtual void emitRawBytes(StringRef Data)
Emit the bytes in Data into the output.
Context object for machine code objects.
MCLOHType
Linker Optimization Hint Type.
ValueT lookup(const_arg_type_t< KeyT > Val) const
lookup - Return the entry for the specified key, or a default constructed value if no such entry exis...
virtual void emitTPRel32Value(const MCExpr *Value)
Emit the expression Value into the output as a tprel (32-bit TP relative) value.
virtual void emitELFSize(MCSymbol *Symbol, const MCExpr *Value)
Emit an ELF .size directive.
virtual void emitPersonality(const MCSymbol *Personality)
virtual void emitCFISections(bool EH, bool Debug)
void emitInt64(uint64_t Value)
Target - Wrapper for Target specific information.
virtual bool hasRawTextSupport() const
Return true if this asm streamer supports emitting unformatted text to the .s file with EmitRawText.
virtual void emitWinCFIAllocStack(unsigned Size, SMLoc Loc=SMLoc())
void emitInt8(uint64_t Value)
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
virtual void emitCOFFSymbolStorageClass(int StorageClass)
Emit the storage class of the symbol.
void emitCFIStartProc(bool IsSimple, SMLoc Loc=SMLoc())
Reg
All possible values of the reg field in the ModR/M byte.
virtual void emitVersionMin(MCVersionMinType Type, unsigned Major, unsigned Minor, unsigned Update, VersionTuple SDKVersion)
Specify the Mach-O minimum deployment target version.
virtual void emitAddrsigSym(const MCSymbol *Sym)
virtual void emitCFIRegister(int64_t Register1, int64_t Register2)
virtual void emitWinCFISaveReg(MCRegister Register, unsigned Offset, SMLoc Loc=SMLoc())
Triple - Helper class for working with autoconf configuration names.
virtual void emitCOFFSymbolType(int Type)
Emit the type of the symbol.
virtual void emitXCOFFSymbolLinkageWithVisibility(MCSymbol *Symbol, MCSymbolAttr Linkage, MCSymbolAttr Visibility)
Emit a symbol's linkage and visibility with a linkage directive for XCOFF.
virtual void emitARMWinCFINop(bool Wide)
virtual void emitCVLinetableDirective(unsigned FunctionId, const MCSymbol *FnStart, const MCSymbol *FnEnd)
This implements the CodeView '.cv_linetable' assembler directive.
void emitValue(const MCExpr *Value, unsigned Size, SMLoc Loc=SMLoc())
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.
virtual void emitWinEHHandler(const MCSymbol *Sym, bool Unwind, bool Except, SMLoc Loc=SMLoc())
The instances of the Type class are immutable: once they are created, they are never changed.
virtual void emitCFISignalFrame()
virtual void emitXCOFFRenameDirective(const MCSymbol *Name, StringRef Rename)
Emit a XCOFF .rename directive which creates a synonym for an illegal or undesirable name.
virtual MCSymbol * emitCFILabel()
When emitting an object file, create and emit a real label.
virtual void emitARMWinCFIAllocStack(unsigned Size, bool Wide)
bool popSection()
Restore the current and previous section from the section stack.
virtual void emitPseudoProbe(uint64_t Guid, uint64_t Index, uint64_t Type, uint64_t Attr, const MCPseudoProbeInlineStack &InlineStack)
Emit the a pseudo probe into the current section.
void emitInt32(uint64_t Value)
void setAllowAutoPadding(bool v)
ARMTargetStreamer(MCStreamer &S)
MCTargetStreamer(MCStreamer &S)
virtual void emitCVLocDirective(unsigned FunctionId, unsigned FileNo, unsigned Line, unsigned Column, bool PrologueEnd, bool IsStmt, StringRef FileName, SMLoc Loc)
This implements the CodeView '.cv_loc' assembler directive.
virtual void emitDTPRel32Value(const MCExpr *Value)
Emit the expression Value into the output as a dtprel (32-bit DTP relative) value.
virtual void emitLinkerOptions(ArrayRef< std::string > Kind)
Emit the given list Options of strings as linker options into the output.
MCSectionSubPair getCurrentSection() const
Return the current section that the streamer is emitting code to.
virtual void emitWindowsUnwindTables()
Tagged union holding either a T or a Error.
Instances of this class represent a single low-level machine instruction.
virtual void reset()
Reset any state between object emissions, i.e.
bool getAllowAutoPadding() const
virtual void emitAddrsig()
virtual void emitDarwinTargetVariantBuildVersion(unsigned Platform, unsigned Major, unsigned Minor, unsigned Update, VersionTuple SDKVersion)
virtual void emitPad(int64_t Offset)
virtual void emitDwarfUnitLength(uint64_t Length, const Twine &Comment)
Emit a unit length field.
virtual raw_ostream & getCommentOS()
Return a raw_ostream that comments can be written to.
virtual void emitCFIDefCfaRegister(int64_t Register)
virtual void emitCFIAdjustCfaOffset(int64_t Adjustment)
MCStreamer(MCContext &Ctx)
virtual void emitCFIPersonality(const MCSymbol *Sym, unsigned Encoding)
virtual void changeSection(MCSection *, const MCExpr *)
Update streamer for a new active section.
WinEH::FrameInfo * EnsureValidWinFrameInfo(SMLoc Loc)
Retrieve the current frame info if one is available and it is not yet closed.
virtual void emitDTPRel64Value(const MCExpr *Value)
Emit the expression Value into the output as a dtprel (64-bit DTP relative) value.
virtual void emitBundleLock(bool AlignToEnd)
The following instructions are a bundle-locked group.
virtual void emitCFIEndProcImpl(MCDwarfFrameInfo &CurFrame)
constexpr std::underlying_type_t< E > Mask()
Get a bitmask with 1s in all places up to the high-order bit of E's largest value.
Streaming machine code generation interface.
virtual void emitULEB128Value(const MCExpr *Value)
virtual void emitGPRel64Value(const MCExpr *Value)
Emit the expression Value into the output as a gprel64 (64-bit GP relative) value.
virtual void emitRegSave(const SmallVectorImpl< unsigned > &RegList, bool isVector)
virtual void emitCFIUndefined(int64_t Register)
MCSectionSubPair getPreviousSection() const
Return the previous section that the streamer is emitting code to.
Generic interface to target specific assembler backends.
Represents a location in source code.
virtual void emitCFIRelOffset(int64_t Register, int64_t Offset)
virtual void emitInst(uint32_t Inst, char Suffix='\0')
virtual void emitCFISameValue(int64_t Register)
void emitVersionForTarget(const Triple &Target, const VersionTuple &SDKVersion, const Triple *DarwinTargetVariantTriple, const VersionTuple &DarwinTargetVariantSDKVersion)
virtual StringRef getMnemonic(MCInst &MI)
Returns the mnemonic for MI, if the streamer has access to a instruction printer and returns an empty...
MCSection * getAssociatedPDataSection(const MCSection *TextSec)
Get the .pdata section used for the given section.
virtual void emitCFIStartProcImpl(MCDwarfFrameInfo &Frame)
virtual void emitWinCFISaveXMM(MCRegister Register, unsigned Offset, SMLoc Loc=SMLoc())
virtual Optional< std::pair< bool, std::string > > emitRelocDirective(const MCExpr &Offset, StringRef Name, const MCExpr *Expr, SMLoc Loc, const MCSubtargetInfo &STI)
Record a relocation described by the .reloc directive.
MCStreamer & operator=(const MCStreamer &)=delete
virtual void emitLabel(MCSymbol *Symbol, SMLoc Loc=SMLoc())
Emit a label for Symbol into the current section.
virtual void switchSection(MCSection *Section, const MCExpr *Subsection=nullptr)
Set the current section where code is being emitted to Section.
void emitSymbolValue(const MCSymbol *Sym, unsigned Size, bool IsSectionRelative=false)
Special case of EmitValue that avoids the client having to pass in a MCExpr for MCSymbols.
virtual void emitIntValueInHexWithPadding(uint64_t Value, unsigned Size)
Special case of EmitValue that avoids the client having to pass in a MCExpr for constant integers & p...
virtual void emitWinCFIEndChained(SMLoc Loc=SMLoc())
virtual void emitArch(ARM::ArchKind Arch)
virtual void emitWinEHHandlerData(SMLoc Loc=SMLoc())
virtual void emitBuildVersion(unsigned Platform, unsigned Major, unsigned Minor, unsigned Update, VersionTuple SDKVersion)
Emit/Specify Mach-O build version command.
into llvm powi allowing the code generator to produce balanced multiplication trees First
virtual void emitAssemblerFlag(MCAssemblerFlag Flag)
Note in the output the specified Flag.
bool hasUnfinishedDwarfFrameInfo()
virtual void finishImpl()
Streamer specific finalization.
void switchSectionNoChange(MCSection *Section, const MCExpr *Subsection=nullptr)
Set the current section where code is being emitted to Section.
virtual void emitConstantPools()
Flag
These should be considered private to the implementation of the MCInstrDesc class.
virtual void emitAssignment(MCSymbol *Symbol, const MCExpr *Value)
Emit an assignment of Value to Symbol.
virtual void emitRawComment(const Twine &T, bool TabPrefix=true)
Print T and prefix it with the comment string (normally #) and optionally a tab.
virtual bool emitCVFileDirective(unsigned FileNo, StringRef Filename, ArrayRef< uint8_t > Checksum, unsigned ChecksumKind)
Associate a filename with a specified logical file number, and also specify that file's checksum info...
This class implements an extremely fast bulk output stream that can only output to a stream.
virtual void emitCVFileChecksumOffsetDirective(unsigned FileNo)
This implements the CodeView '.cv_filechecksumoffset' assembler directive.
void maybeEmitDwarf64Mark()
Emit a special value of 0xffffffff if producing 64-bit debugging info.
Represents a version number in the form major[.minor[.subminor[.build]]].
Target specific streamer interface.
virtual void emitXCOFFRefDirective(StringRef Sym)
Emit a XCOFF .ref directive which creates R_REF type entry in the relocation table for one or more sy...
virtual ~MCTargetStreamer()
virtual void emitGPRel32Value(const MCExpr *Value)
Emit the expression Value into the output as a gprel32 (32-bit GP relative) value.
virtual void emitTPRel64Value(const MCExpr *Value)
Emit the expression Value into the output as a tprel (64-bit TP relative) value.
virtual void visitUsedSymbol(const MCSymbol &Sym)
virtual void addBlankLine()
Emit a blank line to a .s file to pretty it up.
MCSection * getCurrentSectionOnly() const
virtual void emitCOFFSafeSEH(MCSymbol const *Symbol)
virtual void emitAssignment(MCSymbol *Symbol, const MCExpr *Value)
virtual bool emitCVInlineSiteIdDirective(unsigned FunctionId, unsigned IAFunc, unsigned IAFile, unsigned IALine, unsigned IACol, SMLoc Loc)
Introduces an inline call site id for use with .cv_loc.
virtual void emitARMWinCFIPrologEnd(bool Fragment)
virtual void emitNops(int64_t NumBytes, int64_t ControlledNopLength, SMLoc Loc, const MCSubtargetInfo &STI)
virtual void emitBinaryData(StringRef Data)
Functionally identical to EmitBytes.
virtual void emitCGProfileEntry(const MCSymbolRefExpr *From, const MCSymbolRefExpr *To, uint64_t Count)
virtual void emitSymbolDesc(MCSymbol *Symbol, unsigned DescValue)
Set the DescValue for the Symbol.
virtual void emitDwarfFile0Directive(StringRef Directory, StringRef Filename, Optional< MD5::MD5Result > Checksum, Optional< StringRef > Source, unsigned CUID=0)
Specify the "root" file of the compilation, using the ".file 0" extension.
virtual void emitSetFP(unsigned FpReg, unsigned SpReg, int64_t Offset=0)
MCSymbol * endSection(MCSection *Section)
virtual void emitARMWinCFISaveRegMask(unsigned Mask, bool Wide)
virtual void emitCOFFSymbolIndex(MCSymbol const *Symbol)
Emits the symbol table index of a Symbol into the current section.
virtual void emitARMWinCFIEpilogStart(unsigned Condition)
void emitInt16(uint64_t Value)
virtual void emitFileDirective(StringRef Filename)
Switch to a new logical file.
bool subSection(const MCExpr *Subsection)
virtual void emitValueToOffset(const MCExpr *Offset, unsigned char Value, SMLoc Loc)
Emit some number of copies of Value until the byte offset Offset is reached.
virtual void emitConditionalAssignment(MCSymbol *Symbol, const MCExpr *Value)
Emit an assignment of Value to Symbol, but only if Value is also emitted.
virtual void beginCOFFSymbolDef(const MCSymbol *Symbol)
Start emitting COFF symbol definition.
virtual void emitObjectArch(ARM::ArchKind Arch)
virtual void emitEHSymAttributes(const MCSymbol *Symbol, MCSymbol *EHSymbol)
virtual void addExplicitComment(const Twine &T)
Add explicit comment T.
This is an instance of a target assembly language printer that converts an MCInst to valid target ass...
virtual void emitCFIBKeyFrame()
void emitRawText(const Twine &String)
If this file is backed by a assembly streamer, this dumps the specified string in the output ....
virtual void emitSyntaxDirective()
virtual void emitDwarfAdvanceLineAddr(int64_t LineDelta, const MCSymbol *LastLabel, const MCSymbol *Label, unsigned PointerSize)
If targets does not support representing debug line section by .loc/.file directives in assembly outp...
virtual void emitARMWinCFIEpilogEnd()
virtual void emitIdent(StringRef IdentString)
Emit the "identifiers" directive.
virtual void emitInstruction(const MCInst &Inst, const MCSubtargetInfo &STI)
Emit the given Instruction into the current section.
virtual void emitHandlerData()
const MCExpr * addConstantPoolEntry(const MCExpr *, SMLoc Loc)
Callback used to implement the ldr= pseudo.
MCStreamer * createNullStreamer(MCContext &Ctx)
Create a dummy machine code streamer, which does nothing.
virtual void endCOFFSymbolDef()
Marks the end of the symbol definition.
virtual MCAssembler * getAssemblerPtr()
SMLoc getStartTokLoc() const
constexpr uint64_t PointerSize
x86_64 pointer size.
void pushSection()
Save the current and previous section on the section stack.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
virtual void emitLOHDirective(MCLOHType Kind, const MCLOHArgs &Args)
Emit a Linker Optimization Hint (LOH) directive.
virtual void emitCFIEscape(StringRef Values)
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 emitCFIRestore(int64_t Register)
virtual void switchVendor(StringRef Vendor)
virtual void emitTBSSSymbol(MCSection *Section, MCSymbol *Symbol, uint64_t Size, unsigned ByteAlignment=0)
Emit a thread local bss (.tbss) symbol.
virtual void emitThumbSet(MCSymbol *Symbol, const MCExpr *Value)
virtual void emitCOFFSecRel32(MCSymbol const *Symbol, uint64_t Offset)
Emits a COFF section relative relocation.
virtual void emitIntTextAttribute(unsigned Attribute, unsigned IntValue, StringRef StringValue="")
Represent a reference to a symbol from inside an expression.
unsigned getNumFrameInfos()
Class for arbitrary precision integers.
virtual void initSections(bool NoExecStack, const MCSubtargetInfo &STI)
Create the default sections and set the initial one.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
virtual void emitPersonalityIndex(unsigned Index)
StringRef - Represent a constant reference to a string, i.e.
virtual void emitWinCFIEndProlog(SMLoc Loc=SMLoc())
void cantFail(Error Err, const char *Msg=nullptr)
Report a fatal error if Err is a failure value.
virtual void emitWinCFIStartChained(SMLoc Loc=SMLoc())
StackOffset is a class to represent an offset with 2 dimensions, named fixed and scalable,...
ArrayRef< MCDwarfFrameInfo > getDwarfFrameInfos() const
virtual void emitBundleAlignMode(unsigned AlignPow2)
Set the bundle alignment mode from now on in the section.
Instances of this class represent a uniqued identifier for a section in the current translation unit.
add sub stmia L5 ldr r0 bl L_printf $stub Instead of a and a wouldn t it be better to do three moves *Return an aggregate type is even return S
virtual void emitCFIGnuArgsSize(int64_t Size)
virtual void emitWeakReference(MCSymbol *Alias, const MCSymbol *Symbol)
Emit an weak reference from Alias to Symbol.
virtual void emitWinCFIFuncletOrFuncEnd(SMLoc Loc=SMLoc())
This is used on platforms, such as Windows on ARM64, that require function or funclet sizes to be emi...
virtual void emitWinCFIPushFrame(bool Code, SMLoc Loc=SMLoc())
virtual void emitCFIDefCfa(int64_t Register, int64_t Offset)
void setStartTokLocPtr(const SMLoc *Loc)
void emitTargetAttributes(const MCSubtargetInfo &STI)
Emit the build attributes that only depend on the hardware that we expect.
virtual void emitDwarfLineStartLabel(MCSymbol *StartSym)
Emit the debug line start label.
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
unsigned getNumWinFrameInfos()
virtual void emitCVFPOData(const MCSymbol *ProcSym, SMLoc Loc={})
This implements the CodeView '.cv_fpo_data' assembler directive.
virtual void emitTextAttribute(unsigned Attribute, StringRef String)
virtual void emitELFSymverDirective(const MCSymbol *OriginalSym, StringRef Name, bool KeepOriginalSym)
Emit an ELF .symver directive.
virtual void emitUnwindRaw(int64_t StackOffset, const SmallVectorImpl< uint8_t > &Opcodes)
void emitSLEB128IntValue(int64_t Value)
Special case of EmitSLEB128Value that avoids the client having to pass in a MCExpr for constant integ...
virtual void emitMovSP(unsigned Reg, int64_t Offset=0)
virtual bool emitSymbolAttribute(MCSymbol *Symbol, MCSymbolAttr Attribute)=0
Add the given Attribute to Symbol.
virtual void emitDwarfLineEndEntry(MCSection *Section, MCSymbol *LastLabel)
Emit the debug line end entry.
virtual void emitIntValueInHex(uint64_t Value, unsigned Size)
Special case of EmitValue that avoids the client having to pass in a MCExpr for constant integers & p...
virtual void doFinalizationAtSectionEnd(MCSection *Section)
Do finalization for the streamer at the end of a section.
virtual void emitCVDefRangeDirective(ArrayRef< std::pair< const MCSymbol *, const MCSymbol * >> Ranges, StringRef FixedSizePortion)
This implements the CodeView '.cv_def_range' assembler directive.
virtual void emitCFIWindowSave()
virtual void emitCFILsda(const MCSymbol *Sym, unsigned Encoding)
virtual bool isIntegratedAssemblerRequired() const
Is the integrated assembler required for this streamer to function correctly?
virtual void emitAbsoluteSymbolDiff(const MCSymbol *Hi, const MCSymbol *Lo, unsigned Size)
Emit the absolute difference between two symbols.
virtual void emitExplicitComments()
Emit added explicit comments.
virtual void emitCVStringTableDirective()
This implements the CodeView '.cv_stringtable' assembler directive.
virtual void emitSLEB128Value(const MCExpr *Value)
ArrayRef< std::unique_ptr< WinEH::FrameInfo > > getWinFrameInfos() const
virtual void emitBundleUnlock()
Ends a bundle-locked group.
virtual void emitAttribute(unsigned Attribute, unsigned Value)
unsigned getSymbolOrder(const MCSymbol *Sym) const
Returns an index to represent the order a symbol was emitted in.
virtual void emitCFIRememberState()
virtual void emitWinCFIEndProc(SMLoc Loc=SMLoc())
~ARMTargetStreamer() override
bool checkCVLocSection(unsigned FuncId, unsigned FileNo, SMLoc Loc)
Returns true if the the .cv_loc directive is in the right section.
WinEH::FrameInfo * getCurrentWinFrameInfo()
virtual void emitFnStart()
virtual void emitARMWinCFISaveFRegs(unsigned First, unsigned Last)
LegalityPredicate isVector(unsigned TypeIdx)
True iff the specified type index is a vector.
void finish(SMLoc EndLoc=SMLoc())
Finish emission of machine code.
void emitULEB128IntValue(uint64_t Value, unsigned PadTo=0)
Special case of EmitULEB128Value that avoids the client having to pass in a MCExpr for constant integ...
MCContext & getContext() const
virtual void emitCodeAlignment(unsigned ByteAlignment, const MCSubtargetInfo *STI, unsigned MaxBytesToEmit=0)
Emit nops until the byte alignment ByteAlignment is reached.
virtual void emitXCOFFLocalCommonSymbol(MCSymbol *LabelSym, uint64_t Size, MCSymbol *CsectSym, unsigned ByteAlignment)
Emits an lcomm directive with XCOFF csect information.
void emitFill(uint64_t NumBytes, uint8_t FillValue)
Emit NumBytes bytes worth of the value specified by FillValue.
MCTargetStreamer * getTargetStreamer()
void assignFragment(MCSymbol *Symbol, MCFragment *Fragment)
Sets the symbol's section.
virtual void emitCFIReturnColumn(int64_t Register)
std::pair< MCSection *, const MCExpr * > MCSectionSubPair
virtual void emitARMWinCFISaveSP(unsigned Reg)
virtual void emitDwarfLocDirective(unsigned FileNo, unsigned Line, unsigned Column, unsigned Flags, unsigned Isa, unsigned Discriminator, StringRef FileName)
This implements the DWARF2 '.loc fileno lineno ...' assembler directive.
virtual void emitCOFFSectionIndex(MCSymbol const *Symbol)
Emits a COFF section index.
virtual bool isVerboseAsm() const
Return true if this streamer supports verbose assembly and if it is enabled.
virtual bool mayHaveInstructions(MCSection &Sec) const
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.
virtual void emitArchExtension(uint64_t ArchExt)
virtual void emitARMWinCFISaveLR(unsigned Offset)
virtual void emitValue(const MCExpr *Value)
virtual void emitZerofill(MCSection *Section, MCSymbol *Symbol=nullptr, uint64_t Size=0, unsigned ByteAlignment=0, SMLoc Loc=SMLoc())=0
Emit the zerofill section and an optional symbol.
virtual void emitBytes(StringRef Data)
Emit the bytes in Data into the output.
virtual void prettyPrintAsm(MCInstPrinter &InstPrinter, uint64_t Address, const MCInst &Inst, const MCSubtargetInfo &STI, raw_ostream &OS)
virtual void finishAttributeSection()
virtual void emitDwarfFileDirective(StringRef Directive)
virtual void emitRawTextImpl(StringRef String)
EmitRawText - If this file is backed by an assembly streamer, this dumps the specified string in the ...
BlockVerifier::State From
constexpr char Args[]
Key for Kernel::Metadata::mArgs.
void emitCurrentConstantPool()
Callback used to implement the .ltorg directive.
void generateCompactUnwindEncodings(MCAsmBackend *MAB)
virtual MCSymbol * getDwarfLineTableSymbol(unsigned CUID)
virtual void emitARMWinCFICustom(unsigned Opcode)
virtual void emitWinCFIPushReg(MCRegister Register, SMLoc Loc=SMLoc())
virtual void emitCFIRestoreState()
Generic base class for all target subtargets.
virtual void emitCommonSymbol(MCSymbol *Symbol, uint64_t Size, unsigned ByteAlignment)=0
Emit a common symbol.
virtual void emitThumbFunc(MCSymbol *Func)
Note in the output that the specified Func is a Thumb mode function (ARM target only).
virtual void emitFPU(unsigned FPU)
LLVM Value Representation.
void emitConstantPools() override
Base class for the full range of assembler expressions which are needed for parsing.
virtual void emitCOFFImgRel32(MCSymbol const *Symbol, int64_t Offset)
Emits a COFF image relative relocation.
virtual void reset()
State management.
virtual Expected< unsigned > tryEmitDwarfFileDirective(unsigned FileNo, StringRef Directory, StringRef Filename, Optional< MD5::MD5Result > Checksum=None, Optional< StringRef > Source=None, unsigned CUID=0)
Associate a filename with a specified logical file number.
virtual void emitWinCFIStartProc(const MCSymbol *Symbol, SMLoc Loc=SMLoc())
virtual void AddComment(const Twine &T, bool EOL=true)
Add a textual comment.
virtual void emitCFINegateRAState()
virtual void emitLocalCommonSymbol(MCSymbol *Symbol, uint64_t Size, unsigned ByteAlignment)
Emit a local common (.lcomm) symbol.
unsigned emitDwarfFileDirective(unsigned FileNo, StringRef Directory, StringRef Filename, Optional< MD5::MD5Result > Checksum=None, Optional< StringRef > Source=None, unsigned CUID=0)
Associate a filename with a specified logical file number.
virtual void emitGNUAttribute(unsigned Tag, unsigned Value)
Emit a .gnu_attribute directive.
virtual void annotateTLSDescriptorSequence(const MCSymbolRefExpr *SRE)
void emitZeros(uint64_t NumBytes)
Emit NumBytes worth of zeros.
virtual void emitCFIMTETaggedFrame()