class MCObjectStreamer
Declaration
class MCObjectStreamer : public MCStreamer { /* full declaration omitted */ };
Description
Streaming object file generation interface. This class provides an implementation of the MCStreamer interface which is suitable for use with the assembler backend. Specific object file formats are expected to subclass this interface to implement directives specific to that file format or custom semantics expected by the object writer implementation.
Declared at: llvm/include/llvm/MC/MCObjectStreamer.h:42
Inherits from: MCStreamer
Member Variables
- private std::unique_ptr<MCAssembler> Assembler
- private MCSection::iterator CurInsertionPoint
- private bool EmitEHFrame
- private bool EmitDebugFrame
- private SmallVector<llvm::MCSymbol*, 2> PendingLabels
- private SmallSetVector<llvm::MCSection*, 4> PendingLabelSections
- private unsigned int CurSubsectionIdx
- private SmallVector< llvm::MCObjectStreamer::PendingMCFixup, 2> PendingFixups
- private DenseMap< const llvm::MCSymbol*, SmallVector< llvm::MCObjectStreamer::PendingAssignment, 1>> pendingAssignments
- A list of conditional assignments we may need to emit if the target symbol is later emitted.
Method Overview
- protected MCObjectStreamer(llvm::MCContext & Context, std::unique_ptr<MCAsmBackend> TAB, std::unique_ptr<MCObjectWriter> OW, std::unique_ptr<MCCodeEmitter> Emitter)
- protected void addPendingLabel(llvm::MCSymbol * label)
- public void changeSection(llvm::MCSection * Section, const llvm::MCExpr * Subsection)
- protected bool changeSectionImpl(llvm::MCSection * Section, const llvm::MCExpr * Subsection)
- public void emitAbsoluteSymbolDiff(const llvm::MCSymbol * Hi, const llvm::MCSymbol * Lo, unsigned int Size)
- public void emitAbsoluteSymbolDiffAsULEB128(const llvm::MCSymbol * Hi, const llvm::MCSymbol * Lo)
- public void emitAddrsig()
- public void emitAddrsigSym(const llvm::MCSymbol * Sym)
- public void emitAssignment(llvm::MCSymbol * Symbol, const llvm::MCExpr * Value)
- public void emitBundleAlignMode(unsigned int AlignPow2)
- public void emitBundleLock(bool AlignToEnd)
- public void emitBundleUnlock()
- public void emitBytes(llvm::StringRef Data)
- private void emitCFIEndProcImpl(llvm::MCDwarfFrameInfo & Frame)
- private llvm::MCSymbol * emitCFILabel()
- public void emitCFISections(bool EH, bool Debug)
- private void emitCFIStartProcImpl(llvm::MCDwarfFrameInfo & Frame)
- public void emitCVDefRangeDirective(ArrayRef<std::pair<const MCSymbol *, const MCSymbol *>> Ranges, llvm::StringRef FixedSizePortion)
- public void emitCVFileChecksumOffsetDirective(unsigned int FileNo)
- public void emitCVFileChecksumsDirective()
- public void emitCVInlineLinetableDirective(unsigned int PrimaryFunctionId, unsigned int SourceFileId, unsigned int SourceLineNum, const llvm::MCSymbol * FnStartSym, const llvm::MCSymbol * FnEndSym)
- public void emitCVLinetableDirective(unsigned int FunctionId, const llvm::MCSymbol * Begin, const llvm::MCSymbol * End)
- public void emitCVLocDirective(unsigned int FunctionId, unsigned int FileNo, unsigned int Line, unsigned int Column, bool PrologueEnd, bool IsStmt, llvm::StringRef FileName, llvm::SMLoc Loc)
- public void emitCVStringTableDirective()
- public void emitCodeAlignment(unsigned int ByteAlignment, const llvm::MCSubtargetInfo * STI, unsigned int MaxBytesToEmit = 0)
- public void emitConditionalAssignment(llvm::MCSymbol * Symbol, const llvm::MCExpr * Value)
- public void emitDTPRel32Value(const llvm::MCExpr * Value)
- public void emitDTPRel64Value(const llvm::MCExpr * Value)
- public void emitDwarfAdvanceFrameAddr(const llvm::MCSymbol * LastLabel, const llvm::MCSymbol * Label)
- public void emitDwarfAdvanceLineAddr(int64_t LineDelta, const llvm::MCSymbol * LastLabel, const llvm::MCSymbol * Label, unsigned int PointerSize)
- public void emitDwarfLineEndEntry(llvm::MCSection * Section, llvm::MCSymbol * LastLabel)
- public void emitDwarfLocDirective(unsigned int FileNo, unsigned int Line, unsigned int Column, unsigned int Flags, unsigned int Isa, unsigned int Discriminator, llvm::StringRef FileName)
- public void emitFileDirective(llvm::StringRef Filename)
- public void emitFileDirective(llvm::StringRef Filename, llvm::StringRef CompilerVerion, llvm::StringRef TimeStamp, llvm::StringRef Description)
- public void emitFill(const llvm::MCExpr & NumBytes, uint64_t FillValue, llvm::SMLoc Loc = llvm::SMLoc())
- public void emitFill(const llvm::MCExpr & NumValues, int64_t Size, int64_t Expr, llvm::SMLoc Loc = llvm::SMLoc())
- public void emitFrames(llvm::MCAsmBackend * MAB)
- public void emitGPRel32Value(const llvm::MCExpr * Value)
- public void emitGPRel64Value(const llvm::MCExpr * Value)
- private virtual void emitInstToData(const llvm::MCInst & Inst, const llvm::MCSubtargetInfo &)
- public virtual void emitInstToFragment(const llvm::MCInst & Inst, const llvm::MCSubtargetInfo &)
- public void emitInstruction(const llvm::MCInst & Inst, const llvm::MCSubtargetInfo & STI)
- private void emitInstructionImpl(const llvm::MCInst & Inst, const llvm::MCSubtargetInfo & STI)
- public void emitLabel(llvm::MCSymbol * Symbol, llvm::SMLoc Loc = llvm::SMLoc())
- public virtual void emitLabelAtPos(llvm::MCSymbol * Symbol, llvm::SMLoc Loc, llvm::MCFragment * F, uint64_t Offset)
- public void emitNops(int64_t NumBytes, int64_t ControlledNopLength, llvm::SMLoc Loc, const llvm::MCSubtargetInfo & STI)
- public void emitPendingAssignments(llvm::MCSymbol * Symbol)
- public Optional<std::pair<bool, std::string>> emitRelocDirective(const llvm::MCExpr & Offset, llvm::StringRef Name, const llvm::MCExpr * Expr, llvm::SMLoc Loc, const llvm::MCSubtargetInfo & STI)
- public void emitSLEB128Value(const llvm::MCExpr * Value)
- public void emitTPRel32Value(const llvm::MCExpr * Value)
- public void emitTPRel64Value(const llvm::MCExpr * Value)
- public void emitULEB128Value(const llvm::MCExpr * Value)
- public void emitValueImpl(const llvm::MCExpr * Value, unsigned int Size, llvm::SMLoc Loc = llvm::SMLoc())
- public void emitValueToAlignment(unsigned int ByteAlignment, int64_t Value = 0, unsigned int ValueSize = 1, unsigned int MaxBytesToEmit = 0)
- public void emitValueToOffset(const llvm::MCExpr * Offset, unsigned char Value, llvm::SMLoc Loc)
- public void emitWeakReference(llvm::MCSymbol * Alias, const llvm::MCSymbol * Symbol)
- public void finishImpl()
- public void flushPendingLabels()
- protected void flushPendingLabels(llvm::MCFragment * F, uint64_t FOffset = 0)
- public llvm::MCAssembler & getAssembler()
- public llvm::MCAssembler * getAssemblerPtr()
- public llvm::MCFragment * getCurrentFragment() const
- public llvm::MCDataFragment * getOrCreateDataFragment(const llvm::MCSubtargetInfo * STI = nullptr)
- public void insert(llvm::MCFragment * F)
- public bool isIntegratedAssemblerRequired() const
- public bool mayHaveInstructions(llvm::MCSection & Sec) const
- public void reset()
- private void resolvePendingFixups()
- public void visitUsedSymbol(const llvm::MCSymbol & Sym)
- protected ~MCObjectStreamer()
Inherited from MCStreamer:
- public AddComment
- public EnsureValidWinFrameInfo
- public addBlankLine
- public addExplicitComment
- public assignFragment
- public beginCOFFSymbolDef
- public changeSection
- protected checkCVLocSection
- public doFinalizationAtSectionEnd
- public emitAbsoluteSymbolDiff
- public emitAbsoluteSymbolDiffAsULEB128
- public emitAddrsig
- public emitAddrsigSym
- public emitAssemblerFlag
- public emitAssignment
- public emitBinaryData
- public emitBuildVersion
- public emitBundleAlignMode
- public emitBundleLock
- public emitBundleUnlock
- public emitBytes
- public emitCFIAdjustCfaOffset
- public emitCFIBKeyFrame
- public emitCFIDefCfa
- public emitCFIDefCfaOffset
- public emitCFIDefCfaRegister
- public emitCFIEndProc
- protected emitCFIEndProcImpl
- public emitCFIEscape
- public emitCFIGnuArgsSize
- public emitCFILLVMDefAspaceCfa
- public emitCFILabel
- public emitCFILsda
- public emitCFIMTETaggedFrame
- public emitCFINegateRAState
- public emitCFIOffset
- public emitCFIPersonality
- public emitCFIRegister
- public emitCFIRelOffset
- public emitCFIRememberState
- public emitCFIRestore
- public emitCFIRestoreState
- public emitCFIReturnColumn
- public emitCFISameValue
- public emitCFISections
- public emitCFISignalFrame
- public emitCFIStartProc
- protected emitCFIStartProcImpl
- public emitCFIUndefined
- public emitCFIWindowSave
- public emitCGProfileEntry
- public emitCOFFImgRel32
- public emitCOFFSafeSEH
- public emitCOFFSecRel32
- public emitCOFFSectionIndex
- public emitCOFFSymbolIndex
- public emitCOFFSymbolStorageClass
- public emitCOFFSymbolType
- public emitCVDefRangeDirective
- public emitCVDefRangeDirective
- public emitCVDefRangeDirective
- public emitCVDefRangeDirective
- public emitCVDefRangeDirective
- public emitCVFPOData
- public emitCVFileChecksumOffsetDirective
- public emitCVFileChecksumsDirective
- public emitCVFileDirective
- public emitCVFuncIdDirective
- public emitCVInlineLinetableDirective
- public emitCVInlineSiteIdDirective
- public emitCVLinetableDirective
- public emitCVLocDirective
- public emitCVStringTableDirective
- public emitCodeAlignment
- public emitCommonSymbol
- public emitConditionalAssignment
- public emitDTPRel32Value
- public emitDTPRel64Value
- public emitDarwinTargetVariantBuildVersion
- public emitDataRegion
- public emitDwarfAdvanceLineAddr
- public emitDwarfFile0Directive
- public emitDwarfFileDirective
- public emitDwarfLineEndEntry
- public emitDwarfLineStartLabel
- public emitDwarfLocDirective
- public emitDwarfUnitLength
- public emitDwarfUnitLength
- public emitEHSymAttributes
- public emitELFSize
- public emitELFSymverDirective
- public emitExplicitComments
- public emitFileDirective
- public emitFileDirective
- public emitFill
- public emitFill
- public emitFill
- public emitGNUAttribute
- public emitGPRel32Value
- public emitGPRel64Value
- public emitIdent
- public emitInstruction
- public emitInt16
- public emitInt32
- public emitInt64
- public emitInt8
- public emitIntValue
- public emitIntValue
- public emitIntValueInHex
- public emitIntValueInHexWithPadding
- public emitLOHDirective
- public emitLabel
- public emitLinkerOptions
- public emitLocalCommonSymbol
- public emitNops
- public emitPseudoProbe
- public emitRawComment
- public emitRawText
- protected emitRawTextImpl
- public emitRelocDirective
- public emitSLEB128IntValue
- public emitSLEB128Value
- public emitSymbolAttribute
- public emitSymbolDesc
- public emitSymbolValue
- public emitSyntaxDirective
- public emitTBSSSymbol
- public emitTPRel32Value
- public emitTPRel64Value
- public emitThumbFunc
- public emitULEB128IntValue
- public emitULEB128Value
- public emitValue
- public emitValueImpl
- public emitValueToAlignment
- public emitValueToOffset
- public emitVersionForTarget
- public emitVersionMin
- public emitWeakReference
- public emitWinCFIAllocStack
- public emitWinCFIEndChained
- public emitWinCFIEndProc
- public emitWinCFIEndProlog
- public emitWinCFIFuncletOrFuncEnd
- public emitWinCFIPushFrame
- public emitWinCFIPushReg
- public emitWinCFISaveReg
- public emitWinCFISaveXMM
- public emitWinCFISetFrame
- public emitWinCFIStartChained
- public emitWinCFIStartProc
- public emitWinEHHandler
- public emitWinEHHandlerData
- protected emitWindowsUnwindTables
- protected emitWindowsUnwindTables
- public emitXCOFFLocalCommonSymbol
- public emitXCOFFRefDirective
- public emitXCOFFRenameDirective
- public emitXCOFFSymbolLinkageWithVisibility
- public emitZerofill
- public emitZeros
- public endCOFFSymbolDef
- public endSection
- public finish
- public finishImpl
- public generateCompactUnwindEncodings
- public getAllowAutoPadding
- public getAssemblerPtr
- public getAssociatedPDataSection
- public getAssociatedXDataSection
- public getCommentOS
- public getContext
- public getCurrentSection
- public getCurrentSectionOnly
- protected getCurrentWinFrameInfo
- public getDwarfFrameInfos
- public getDwarfLineTableSymbol
- public getMnemonic
- public getNumFrameInfos
- public getNumWinFrameInfos
- public getPreviousSection
- public getStartTokLoc
- public getSymbolOrder
- public getTargetStreamer
- public getUseAssemblerInfoForParsing
- public getWinFrameInfos
- public hasRawTextSupport
- public hasUnfinishedDwarfFrameInfo
- public initSections
- public isIntegratedAssemblerRequired
- public isVerboseAsm
- public mayHaveInstructions
- public maybeEmitDwarf64Mark
- public popSection
- public pushSection
- public reset
- public setAllowAutoPadding
- public setStartTokLocPtr
- public setTargetStreamer
- public setUseAssemblerInfoForParsing
- public subSection
- public switchSection
- public switchSectionNoChange
- public tryEmitDwarfFileDirective
- public visitUsedExpr
- public visitUsedSymbol
Methods
¶MCObjectStreamer(
llvm::MCContext& Context,
std::unique_ptr<MCAsmBackend> TAB,
std::unique_ptr<MCObjectWriter> OW,
std::unique_ptr<MCCodeEmitter> Emitter)
MCObjectStreamer(
llvm::MCContext& Context,
std::unique_ptr<MCAsmBackend> TAB,
std::unique_ptr<MCObjectWriter> OW,
std::unique_ptr<MCCodeEmitter> Emitter)
Declared at: llvm/include/llvm/MC/MCObjectStreamer.h:77
Parameters
- llvm::MCContext& Context
- std::unique_ptr<MCAsmBackend> TAB
- std::unique_ptr<MCObjectWriter> OW
- std::unique_ptr<MCCodeEmitter> Emitter
¶void addPendingLabel(llvm::MCSymbol* label)
void addPendingLabel(llvm::MCSymbol* label)
Description
Assign a label to the current Section and Subsection even though a fragment is not yet present. Use flushPendingLabels(F) to associate a fragment with this label.
Declared at: llvm/include/llvm/MC/MCObjectStreamer.h:113
Parameters
- llvm::MCSymbol* label
¶void changeSection(llvm::MCSection* Section,
const llvm::MCExpr* Subsection)
void changeSection(llvm::MCSection* Section,
const llvm::MCExpr* Subsection)
Description
Update streamer for a new active section. This is called by popSection and switchSection, if the current section changes.
Declared at: llvm/include/llvm/MC/MCObjectStreamer.h:144
Parameters
- llvm::MCSection* Section
- const llvm::MCExpr* Subsection
¶bool changeSectionImpl(
llvm::MCSection* Section,
const llvm::MCExpr* Subsection)
bool changeSectionImpl(
llvm::MCSection* Section,
const llvm::MCExpr* Subsection)
Declared at: llvm/include/llvm/MC/MCObjectStreamer.h:108
Parameters
- llvm::MCSection* Section
- const llvm::MCExpr* Subsection
¶void emitAbsoluteSymbolDiff(
const llvm::MCSymbol* Hi,
const llvm::MCSymbol* Lo,
unsigned int Size)
void emitAbsoluteSymbolDiff(
const llvm::MCSymbol* Hi,
const llvm::MCSymbol* Lo,
unsigned int Size)
Description
Emit the absolute difference between two symbols if possible. Emit the absolute difference between \c Hi and \c Lo, as long as we can compute it. Currently, that requires that both symbols are in the same data fragment and that the target has not specified that diff expressions require relocations to be emitted. Otherwise, do nothing and return\c false.
Declared at: llvm/include/llvm/MC/MCObjectStreamer.h:222
Parameters
- const llvm::MCSymbol* Hi
- const llvm::MCSymbol* Lo
- unsigned int Size
¶void emitAbsoluteSymbolDiffAsULEB128(
const llvm::MCSymbol* Hi,
const llvm::MCSymbol* Lo)
void emitAbsoluteSymbolDiffAsULEB128(
const llvm::MCSymbol* Hi,
const llvm::MCSymbol* Lo)
Description
Emit the absolute difference between two symbols encoded with ULEB128.
Declared at: llvm/include/llvm/MC/MCObjectStreamer.h:225
Parameters
- const llvm::MCSymbol* Hi
- const llvm::MCSymbol* Lo
¶void emitAddrsig()
void emitAddrsig()
Declared at: llvm/include/llvm/MC/MCObjectStreamer.h:208
¶void emitAddrsigSym(const llvm::MCSymbol* Sym)
void emitAddrsigSym(const llvm::MCSymbol* Sym)
Declared at: llvm/include/llvm/MC/MCObjectStreamer.h:209
Parameters
- const llvm::MCSymbol* Sym
¶void emitAssignment(llvm::MCSymbol* Symbol,
const llvm::MCExpr* Value)
void emitAssignment(llvm::MCSymbol* Symbol,
const llvm::MCExpr* Value)
Description
Emit an assignment of \p Value to \p Symbol. This corresponds to an assembler statement such as: symbol = value The assignment generates no code, but has the side effect of binding the value in the current context. For the assembly streamer, this prints the binding into the .s file.
Declared at: llvm/include/llvm/MC/MCObjectStreamer.h:136
Parameters
- llvm::MCSymbol* Symbol
- - The symbol being assigned to.
- const llvm::MCExpr* Value
- - The value for the symbol.
¶void emitBundleAlignMode(unsigned int AlignPow2)
void emitBundleAlignMode(unsigned int AlignPow2)
Description
Set the bundle alignment mode from now on in the section. The argument is the power of 2 to which the alignment is set. The value 0 means turn the bundle alignment off.
Declared at: llvm/include/llvm/MC/MCObjectStreamer.h:151
Parameters
- unsigned int AlignPow2
¶void emitBundleLock(bool AlignToEnd)
void emitBundleLock(bool AlignToEnd)
Description
The following instructions are a bundle-locked group.
Declared at: llvm/include/llvm/MC/MCObjectStreamer.h:152
Parameters
- bool AlignToEnd
- - If true, the bundle-locked group will be aligned to the end of a bundle.
¶void emitBundleUnlock()
void emitBundleUnlock()
Description
Ends a bundle-locked group.
Declared at: llvm/include/llvm/MC/MCObjectStreamer.h:153
¶void emitBytes(llvm::StringRef Data)
void emitBytes(llvm::StringRef Data)
Description
Emit the bytes in \p Data into the output. This is used to implement assembler directives such as .byte, .ascii, etc.
Declared at: llvm/include/llvm/MC/MCObjectStreamer.h:154
Parameters
- llvm::StringRef Data
¶void emitCFIEndProcImpl(
llvm::MCDwarfFrameInfo& Frame)
void emitCFIEndProcImpl(
llvm::MCDwarfFrameInfo& Frame)
Declared at: llvm/include/llvm/MC/MCObjectStreamer.h:71
Parameters
- llvm::MCDwarfFrameInfo& Frame
¶llvm::MCSymbol* emitCFILabel()
llvm::MCSymbol* emitCFILabel()
Description
When emitting an object file, create and emit a real label. When emitting textual assembly, this should do nothing to avoid polluting our output.
Declared at: llvm/include/llvm/MC/MCObjectStreamer.h:72
¶void emitCFISections(bool EH, bool Debug)
void emitCFISections(bool EH, bool Debug)
Declared at: llvm/include/llvm/MC/MCObjectStreamer.h:90
Parameters
- bool EH
- bool Debug
¶void emitCFIStartProcImpl(
llvm::MCDwarfFrameInfo& Frame)
void emitCFIStartProcImpl(
llvm::MCDwarfFrameInfo& Frame)
Declared at: llvm/include/llvm/MC/MCObjectStreamer.h:70
Parameters
- llvm::MCDwarfFrameInfo& Frame
¶void emitCVDefRangeDirective(
ArrayRef<std::pair<const MCSymbol*,
const MCSymbol*>> Ranges,
llvm::StringRef FixedSizePortion)
void emitCVDefRangeDirective(
ArrayRef<std::pair<const MCSymbol*,
const MCSymbol*>> Ranges,
llvm::StringRef FixedSizePortion)
Description
This implements the CodeView '.cv_def_range' assembler directive.
Declared at: llvm/include/llvm/MC/MCObjectStreamer.h:182
Parameters
- ArrayRef< std::pair<const MCSymbol*, const MCSymbol*>> Ranges
- llvm::StringRef FixedSizePortion
¶void emitCVFileChecksumOffsetDirective(
unsigned int FileNo)
void emitCVFileChecksumOffsetDirective(
unsigned int FileNo)
Description
This implements the CodeView '.cv_filechecksumoffset' assembler directive.
Declared at: llvm/include/llvm/MC/MCObjectStreamer.h:187
Parameters
- unsigned int FileNo
¶void emitCVFileChecksumsDirective()
void emitCVFileChecksumsDirective()
Description
This implements the CodeView '.cv_filechecksums' assembler directive.
Declared at: llvm/include/llvm/MC/MCObjectStreamer.h:186
¶void emitCVInlineLinetableDirective(
unsigned int PrimaryFunctionId,
unsigned int SourceFileId,
unsigned int SourceLineNum,
const llvm::MCSymbol* FnStartSym,
const llvm::MCSymbol* FnEndSym)
void emitCVInlineLinetableDirective(
unsigned int PrimaryFunctionId,
unsigned int SourceFileId,
unsigned int SourceLineNum,
const llvm::MCSymbol* FnStartSym,
const llvm::MCSymbol* FnEndSym)
Description
This implements the CodeView '.cv_inline_linetable' assembler directive.
Declared at: llvm/include/llvm/MC/MCObjectStreamer.h:177
Parameters
- unsigned int PrimaryFunctionId
- unsigned int SourceFileId
- unsigned int SourceLineNum
- const llvm::MCSymbol* FnStartSym
- const llvm::MCSymbol* FnEndSym
¶void emitCVLinetableDirective(
unsigned int FunctionId,
const llvm::MCSymbol* Begin,
const llvm::MCSymbol* End)
void emitCVLinetableDirective(
unsigned int FunctionId,
const llvm::MCSymbol* Begin,
const llvm::MCSymbol* End)
Description
This implements the CodeView '.cv_linetable' assembler directive.
Declared at: llvm/include/llvm/MC/MCObjectStreamer.h:175
Parameters
- unsigned int FunctionId
- const llvm::MCSymbol* Begin
- const llvm::MCSymbol* End
¶void emitCVLocDirective(unsigned int FunctionId,
unsigned int FileNo,
unsigned int Line,
unsigned int Column,
bool PrologueEnd,
bool IsStmt,
llvm::StringRef FileName,
llvm::SMLoc Loc)
void emitCVLocDirective(unsigned int FunctionId,
unsigned int FileNo,
unsigned int Line,
unsigned int Column,
bool PrologueEnd,
bool IsStmt,
llvm::StringRef FileName,
llvm::SMLoc Loc)
Description
This implements the CodeView '.cv_loc' assembler directive.
Declared at: llvm/include/llvm/MC/MCObjectStreamer.h:172
Parameters
- unsigned int FunctionId
- unsigned int FileNo
- unsigned int Line
- unsigned int Column
- bool PrologueEnd
- bool IsStmt
- llvm::StringRef FileName
- llvm::SMLoc Loc
¶void emitCVStringTableDirective()
void emitCVStringTableDirective()
Description
This implements the CodeView '.cv_stringtable' assembler directive.
Declared at: llvm/include/llvm/MC/MCObjectStreamer.h:185
¶void emitCodeAlignment(
unsigned int ByteAlignment,
const llvm::MCSubtargetInfo* STI,
unsigned int MaxBytesToEmit = 0)
void emitCodeAlignment(
unsigned int ByteAlignment,
const llvm::MCSubtargetInfo* STI,
unsigned int MaxBytesToEmit = 0)
Description
Emit nops until the byte alignment \p ByteAlignment is reached. This used to align code where the alignment bytes may be executed. This can emit different bytes for different sizes to optimize execution.
Declared at: llvm/include/llvm/MC/MCObjectStreamer.h:158
Parameters
- unsigned int ByteAlignment
- - The alignment to reach. This must be a power of two on some targets.
- const llvm::MCSubtargetInfo* STI
- - The MCSubtargetInfo in operation when padding is emitted.
- unsigned int MaxBytesToEmit = 0
- - The maximum numbers of bytes to emit, or 0. If the alignment cannot be reached in this many bytes, no bytes are emitted.
¶void emitConditionalAssignment(
llvm::MCSymbol* Symbol,
const llvm::MCExpr* Value)
void emitConditionalAssignment(
llvm::MCSymbol* Symbol,
const llvm::MCExpr* Value)
Description
Emit an assignment of \p Value to \p Symbol, but only if \p Value is also emitted.
Declared at: llvm/include/llvm/MC/MCObjectStreamer.h:137
Parameters
- llvm::MCSymbol* Symbol
- const llvm::MCExpr* Value
¶void emitDTPRel32Value(const llvm::MCExpr* Value)
void emitDTPRel32Value(const llvm::MCExpr* Value)
Description
Emit the expression \p Value into the output as a dtprel (32-bit DTP relative) value. This is used to implement assembler directives such as .dtprelword on targets that support them.
Declared at: llvm/include/llvm/MC/MCObjectStreamer.h:188
Parameters
- const llvm::MCExpr* Value
¶void emitDTPRel64Value(const llvm::MCExpr* Value)
void emitDTPRel64Value(const llvm::MCExpr* Value)
Description
Emit the expression \p Value into the output as a dtprel (64-bit DTP relative) value. This is used to implement assembler directives such as .dtpreldword on targets that support them.
Declared at: llvm/include/llvm/MC/MCObjectStreamer.h:189
Parameters
- const llvm::MCExpr* Value
¶void emitDwarfAdvanceFrameAddr(
const llvm::MCSymbol* LastLabel,
const llvm::MCSymbol* Label)
void emitDwarfAdvanceFrameAddr(
const llvm::MCSymbol* LastLabel,
const llvm::MCSymbol* Label)
Declared at: llvm/include/llvm/MC/MCObjectStreamer.h:170
Parameters
- const llvm::MCSymbol* LastLabel
- const llvm::MCSymbol* Label
¶void emitDwarfAdvanceLineAddr(
int64_t LineDelta,
const llvm::MCSymbol* LastLabel,
const llvm::MCSymbol* Label,
unsigned int PointerSize)
void emitDwarfAdvanceLineAddr(
int64_t LineDelta,
const llvm::MCSymbol* LastLabel,
const llvm::MCSymbol* Label,
unsigned int PointerSize)
Description
If targets does not support representing debug line section by .loc/.file directives in assembly output, we need to populate debug line section with raw debug line contents.
Declared at: llvm/include/llvm/MC/MCObjectStreamer.h:166
Parameters
- int64_t LineDelta
- const llvm::MCSymbol* LastLabel
- const llvm::MCSymbol* Label
- unsigned int PointerSize
¶void emitDwarfLineEndEntry(
llvm::MCSection* Section,
llvm::MCSymbol* LastLabel)
void emitDwarfLineEndEntry(
llvm::MCSection* Section,
llvm::MCSymbol* LastLabel)
Description
Emit the debug line end entry.
Declared at: llvm/include/llvm/MC/MCObjectStreamer.h:169
Parameters
- llvm::MCSection* Section
- llvm::MCSymbol* LastLabel
¶void emitDwarfLocDirective(
unsigned int FileNo,
unsigned int Line,
unsigned int Column,
unsigned int Flags,
unsigned int Isa,
unsigned int Discriminator,
llvm::StringRef FileName)
void emitDwarfLocDirective(
unsigned int FileNo,
unsigned int Line,
unsigned int Column,
unsigned int Flags,
unsigned int Isa,
unsigned int Discriminator,
llvm::StringRef FileName)
Description
This implements the DWARF2 '.loc fileno lineno ...' assembler directive.
Declared at: llvm/include/llvm/MC/MCObjectStreamer.h:162
Parameters
- unsigned int FileNo
- unsigned int Line
- unsigned int Column
- unsigned int Flags
- unsigned int Isa
- unsigned int Discriminator
- llvm::StringRef FileName
¶void emitFileDirective(llvm::StringRef Filename)
void emitFileDirective(llvm::StringRef Filename)
Description
Switch to a new logical file. This is used to implement the '.file "foo.c"' assembler directive.
Declared at: llvm/include/llvm/MC/MCObjectStreamer.h:204
Parameters
- llvm::StringRef Filename
¶void emitFileDirective(
llvm::StringRef Filename,
llvm::StringRef CompilerVerion,
llvm::StringRef TimeStamp,
llvm::StringRef Description)
void emitFileDirective(
llvm::StringRef Filename,
llvm::StringRef CompilerVerion,
llvm::StringRef TimeStamp,
llvm::StringRef Description)
Description
Emit ".file assembler diretive with additioal info.
Declared at: llvm/include/llvm/MC/MCObjectStreamer.h:205
Parameters
- llvm::StringRef Filename
- llvm::StringRef CompilerVerion
- llvm::StringRef TimeStamp
- llvm::StringRef Description
¶void emitFill(const llvm::MCExpr& NumBytes,
uint64_t FillValue,
llvm::SMLoc Loc = llvm::SMLoc())
void emitFill(const llvm::MCExpr& NumBytes,
uint64_t FillValue,
llvm::SMLoc Loc = llvm::SMLoc())
Description
Emit \p Size bytes worth of the value specified by \p FillValue. This is used to implement assembler directives such as .space or .skip.
Declared at: llvm/include/llvm/MC/MCObjectStreamer.h:198
Parameters
- const llvm::MCExpr& NumBytes
- - The number of bytes to emit.
- uint64_t FillValue
- - The value to use when filling bytes.
- llvm::SMLoc Loc = llvm::SMLoc()
- - The location of the expression for error reporting.
¶void emitFill(const llvm::MCExpr& NumValues,
int64_t Size,
int64_t Expr,
llvm::SMLoc Loc = llvm::SMLoc())
void emitFill(const llvm::MCExpr& NumValues,
int64_t Size,
int64_t Expr,
llvm::SMLoc Loc = llvm::SMLoc())
Description
Emit \p NumValues copies of \p Size bytes. Each \p Size bytes is taken from the lowest order 4 bytes of \p Expr expression. This is used to implement assembler directives such as .fill.
Declared at: llvm/include/llvm/MC/MCObjectStreamer.h:200
Parameters
- const llvm::MCExpr& NumValues
- - The number of copies of \p Size bytes to emit.
- int64_t Size
- - The size (in bytes) of each repeated value.
- int64_t Expr
- - The expression from which \p Size bytes are used.
- llvm::SMLoc Loc = llvm::SMLoc()
¶void emitFrames(llvm::MCAsmBackend* MAB)
void emitFrames(llvm::MCAsmBackend* MAB)
Declared at: llvm/include/llvm/MC/MCObjectStreamer.h:89
Parameters
- llvm::MCAsmBackend* MAB
¶void emitGPRel32Value(const llvm::MCExpr* Value)
void emitGPRel32Value(const llvm::MCExpr* Value)
Description
Emit the expression \p Value into the output as a gprel32 (32-bit GP relative) value. This is used to implement assembler directives such as .gprel32 on targets that support them.
Declared at: llvm/include/llvm/MC/MCObjectStreamer.h:192
Parameters
- const llvm::MCExpr* Value
¶void emitGPRel64Value(const llvm::MCExpr* Value)
void emitGPRel64Value(const llvm::MCExpr* Value)
Description
Emit the expression \p Value into the output as a gprel64 (64-bit GP relative) value. This is used to implement assembler directives such as .gpdword on targets that support them.
Declared at: llvm/include/llvm/MC/MCObjectStreamer.h:193
Parameters
- const llvm::MCExpr* Value
¶virtual void emitInstToData(
const llvm::MCInst& Inst,
const llvm::MCSubtargetInfo&)
virtual void emitInstToData(
const llvm::MCInst& Inst,
const llvm::MCSubtargetInfo&)
Declared at: llvm/include/llvm/MC/MCObjectStreamer.h:69
Parameters
- const llvm::MCInst& Inst
- const llvm::MCSubtargetInfo&
¶virtual void emitInstToFragment(
const llvm::MCInst& Inst,
const llvm::MCSubtargetInfo&)
virtual void emitInstToFragment(
const llvm::MCInst& Inst,
const llvm::MCSubtargetInfo&)
Description
Emit an instruction to a special fragment, because this instruction can change its size during relaxation.
Declared at: llvm/include/llvm/MC/MCObjectStreamer.h:149
Parameters
- const llvm::MCInst& Inst
- const llvm::MCSubtargetInfo&
¶void emitInstruction(
const llvm::MCInst& Inst,
const llvm::MCSubtargetInfo& STI)
void emitInstruction(
const llvm::MCInst& Inst,
const llvm::MCSubtargetInfo& STI)
Description
Emit the given \p Instruction into the current section.
Declared at: llvm/include/llvm/MC/MCObjectStreamer.h:145
Parameters
- const llvm::MCInst& Inst
- const llvm::MCSubtargetInfo& STI
¶void emitInstructionImpl(
const llvm::MCInst& Inst,
const llvm::MCSubtargetInfo& STI)
void emitInstructionImpl(
const llvm::MCInst& Inst,
const llvm::MCSubtargetInfo& STI)
Declared at: llvm/include/llvm/MC/MCObjectStreamer.h:73
Parameters
- const llvm::MCInst& Inst
- const llvm::MCSubtargetInfo& STI
¶void emitLabel(llvm::MCSymbol* Symbol,
llvm::SMLoc Loc = llvm::SMLoc())
void emitLabel(llvm::MCSymbol* Symbol,
llvm::SMLoc Loc = llvm::SMLoc())
Description
@ {
Declared at: llvm/include/llvm/MC/MCObjectStreamer.h:133
Parameters
- llvm::MCSymbol* Symbol
- llvm::SMLoc Loc = llvm::SMLoc()
¶virtual void emitLabelAtPos(
llvm::MCSymbol* Symbol,
llvm::SMLoc Loc,
llvm::MCFragment* F,
uint64_t Offset)
virtual void emitLabelAtPos(
llvm::MCSymbol* Symbol,
llvm::SMLoc Loc,
llvm::MCFragment* F,
uint64_t Offset)
Declared at: llvm/include/llvm/MC/MCObjectStreamer.h:134
Parameters
- llvm::MCSymbol* Symbol
- llvm::SMLoc Loc
- llvm::MCFragment* F
- uint64_t Offset
¶void emitNops(int64_t NumBytes,
int64_t ControlledNopLength,
llvm::SMLoc Loc,
const llvm::MCSubtargetInfo& STI)
void emitNops(int64_t NumBytes,
int64_t ControlledNopLength,
llvm::SMLoc Loc,
const llvm::MCSubtargetInfo& STI)
Declared at: llvm/include/llvm/MC/MCObjectStreamer.h:202
Parameters
- int64_t NumBytes
- int64_t ControlledNopLength
- llvm::SMLoc Loc
- const llvm::MCSubtargetInfo& STI
¶void emitPendingAssignments(
llvm::MCSymbol* Symbol)
void emitPendingAssignments(
llvm::MCSymbol* Symbol)
Description
Emits pending conditional assignments that depend on \p Symbol being emitted.
Declared at: llvm/include/llvm/MC/MCObjectStreamer.h:232
Parameters
- llvm::MCSymbol* Symbol
¶Optional<std::pair<bool, std::string>>
emitRelocDirective(
const llvm::MCExpr& Offset,
llvm::StringRef Name,
const llvm::MCExpr* Expr,
llvm::SMLoc Loc,
const llvm::MCSubtargetInfo& STI)
Optional<std::pair<bool, std::string>>
emitRelocDirective(
const llvm::MCExpr& Offset,
llvm::StringRef Name,
const llvm::MCExpr* Expr,
llvm::SMLoc Loc,
const llvm::MCSubtargetInfo& STI)
Description
Record a relocation described by the .reloc directive. Return None if succeeded. Otherwise, return a pair (Name is invalid, error message).
Declared at: llvm/include/llvm/MC/MCObjectStreamer.h:195
Parameters
- const llvm::MCExpr& Offset
- llvm::StringRef Name
- const llvm::MCExpr* Expr
- llvm::SMLoc Loc
- const llvm::MCSubtargetInfo& STI
¶void emitSLEB128Value(const llvm::MCExpr* Value)
void emitSLEB128Value(const llvm::MCExpr* Value)
Declared at: llvm/include/llvm/MC/MCObjectStreamer.h:142
Parameters
- const llvm::MCExpr* Value
¶void emitTPRel32Value(const llvm::MCExpr* Value)
void emitTPRel32Value(const llvm::MCExpr* Value)
Description
Emit the expression \p Value into the output as a tprel (32-bit TP relative) value. This is used to implement assembler directives such as .tprelword on targets that support them.
Declared at: llvm/include/llvm/MC/MCObjectStreamer.h:190
Parameters
- const llvm::MCExpr* Value
¶void emitTPRel64Value(const llvm::MCExpr* Value)
void emitTPRel64Value(const llvm::MCExpr* Value)
Description
Emit the expression \p Value into the output as a tprel (64-bit TP relative) value. This is used to implement assembler directives such as .tpreldword on targets that support them.
Declared at: llvm/include/llvm/MC/MCObjectStreamer.h:191
Parameters
- const llvm::MCExpr* Value
¶void emitULEB128Value(const llvm::MCExpr* Value)
void emitULEB128Value(const llvm::MCExpr* Value)
Declared at: llvm/include/llvm/MC/MCObjectStreamer.h:141
Parameters
- const llvm::MCExpr* Value
¶void emitValueImpl(
const llvm::MCExpr* Value,
unsigned int Size,
llvm::SMLoc Loc = llvm::SMLoc())
void emitValueImpl(
const llvm::MCExpr* Value,
unsigned int Size,
llvm::SMLoc Loc = llvm::SMLoc())
Description
Emit the expression \p Value into the output as a native integer of the given \p Size bytes. This is used to implement assembler directives such as .word, .quad, etc.
Declared at: llvm/include/llvm/MC/MCObjectStreamer.h:139
Parameters
- const llvm::MCExpr* Value
- - The value to emit.
- unsigned int Size
- - The size of the integer (in bytes) to emit. This must match a native machine width.
- llvm::SMLoc Loc = llvm::SMLoc()
- - The location of the expression for error reporting.
¶void emitValueToAlignment(
unsigned int ByteAlignment,
int64_t Value = 0,
unsigned int ValueSize = 1,
unsigned int MaxBytesToEmit = 0)
void emitValueToAlignment(
unsigned int ByteAlignment,
int64_t Value = 0,
unsigned int ValueSize = 1,
unsigned int MaxBytesToEmit = 0)
Description
Emit some number of copies of \p Value until the byte alignment \p ByteAlignment is reached. If the number of bytes need to emit for the alignment is not a multiple of \p ValueSize, then the contents of the emitted fill bytes is undefined. This used to implement the .align assembler directive.
Declared at: llvm/include/llvm/MC/MCObjectStreamer.h:155
Parameters
- unsigned int ByteAlignment
- - The alignment to reach. This must be a power of two on some targets.
- int64_t Value = 0
- - The value to use when filling bytes.
- unsigned int ValueSize = 1
- - The size of the integer (in bytes) to emit for\p Value. This must match a native machine width.
- unsigned int MaxBytesToEmit = 0
- - The maximum numbers of bytes to emit, or 0. If the alignment cannot be reached in this many bytes, no bytes are emitted.
¶void emitValueToOffset(const llvm::MCExpr* Offset,
unsigned char Value,
llvm::SMLoc Loc)
void emitValueToOffset(const llvm::MCExpr* Offset,
unsigned char Value,
llvm::SMLoc Loc)
Description
Emit some number of copies of \p Value until the byte offset \p Offset is reached. This is used to implement assembler directives such as .org.
Declared at: llvm/include/llvm/MC/MCObjectStreamer.h:160
Parameters
- const llvm::MCExpr* Offset
- - The offset to reach. This may be an expression, but the expression must be associated with the current section.
- unsigned char Value
- - The value to use when filling bytes.
- llvm::SMLoc Loc
¶void emitWeakReference(
llvm::MCSymbol* Alias,
const llvm::MCSymbol* Symbol)
void emitWeakReference(
llvm::MCSymbol* Alias,
const llvm::MCSymbol* Symbol)
Description
Emit an weak reference from \p Alias to \p Symbol. This corresponds to an assembler statement such as: .weakref alias, symbol
Declared at: llvm/include/llvm/MC/MCObjectStreamer.h:143
Parameters
- llvm::MCSymbol* Alias
- - The alias that is being created.
- const llvm::MCSymbol* Symbol
- - The symbol being aliased.
¶void finishImpl()
void finishImpl()
Description
Streamer specific finalization.
Declared at: llvm/include/llvm/MC/MCObjectStreamer.h:211
¶void flushPendingLabels()
void flushPendingLabels()
Description
Create a data fragment for any pending labels across all Sections and Subsections.
Declared at: llvm/include/llvm/MC/MCObjectStreamer.h:126
¶void flushPendingLabels(llvm::MCFragment* F,
uint64_t FOffset = 0)
void flushPendingLabels(llvm::MCFragment* F,
uint64_t FOffset = 0)
Description
If any labels have been emitted but not assigned fragments in the current Section and Subsection, ensure that they get assigned, either to fragment F if possible or to a new data fragment. Optionally, one can provide an offset \p FOffset as a symbol offset within the fragment.
Declared at: llvm/include/llvm/MC/MCObjectStreamer.h:119
Parameters
- llvm::MCFragment* F
- uint64_t FOffset = 0
¶llvm::MCAssembler& getAssembler()
llvm::MCAssembler& getAssembler()
Declared at: llvm/include/llvm/MC/MCObjectStreamer.h:128
¶llvm::MCAssembler* getAssemblerPtr()
llvm::MCAssembler* getAssemblerPtr()
Declared at: llvm/include/llvm/MC/MCObjectStreamer.h:129
¶llvm::MCFragment* getCurrentFragment() const
llvm::MCFragment* getCurrentFragment() const
Declared at: llvm/include/llvm/MC/MCObjectStreamer.h:92
¶llvm::MCDataFragment* getOrCreateDataFragment(
const llvm::MCSubtargetInfo* STI = nullptr)
llvm::MCDataFragment* getOrCreateDataFragment(
const llvm::MCSubtargetInfo* STI = nullptr)
Description
Get a data fragment to write into, creating a new one if the current fragment is not a data fragment. Optionally a \p STI can be passed in so that a new fragment is created if the Subtarget differs from the current fragment.
Declared at: llvm/include/llvm/MC/MCObjectStreamer.h:105
Parameters
- const llvm::MCSubtargetInfo* STI = nullptr
¶void insert(llvm::MCFragment* F)
void insert(llvm::MCFragment* F)
Declared at: llvm/include/llvm/MC/MCObjectStreamer.h:94
Parameters
¶bool isIntegratedAssemblerRequired() const
bool isIntegratedAssemblerRequired() const
Description
Object streamers require the integrated assembler.
Declared at: llvm/include/llvm/MC/MCObjectStreamer.h:87
¶bool mayHaveInstructions(
llvm::MCSection& Sec) const
bool mayHaveInstructions(
llvm::MCSection& Sec) const
Declared at: llvm/include/llvm/MC/MCObjectStreamer.h:228
Parameters
- llvm::MCSection& Sec
¶void reset()
void reset()
Description
state management
Declared at: llvm/include/llvm/MC/MCObjectStreamer.h:84
¶void resolvePendingFixups()
void resolvePendingFixups()
Declared at: llvm/include/llvm/MC/MCObjectStreamer.h:74
¶void visitUsedSymbol(const llvm::MCSymbol& Sym)
void visitUsedSymbol(const llvm::MCSymbol& Sym)
Declared at: llvm/include/llvm/MC/MCObjectStreamer.h:122
Parameters
- const llvm::MCSymbol& Sym
¶~MCObjectStreamer()
~MCObjectStreamer()
Declared at: llvm/include/llvm/MC/MCObjectStreamer.h:80