LLVM
8.0.1
|
Streaming machine code generation interface. More...
#include "llvm/MC/MCStreamer.h"
Public Member Functions | |
MCStreamer (const MCStreamer &)=delete | |
MCStreamer & | operator= (const MCStreamer &)=delete |
virtual | ~MCStreamer () |
void | visitUsedExpr (const MCExpr &Expr) |
virtual void | visitUsedSymbol (const MCSymbol &Sym) |
void | setTargetStreamer (MCTargetStreamer *TS) |
virtual void | reset () |
State management. More... | |
MCContext & | getContext () const |
virtual MCAssembler * | getAssemblerPtr () |
void | setUseAssemblerInfoForParsing (bool v) |
bool | getUseAssemblerInfoForParsing () |
MCTargetStreamer * | getTargetStreamer () |
virtual MCSymbol * | EmitCFILabel () |
When emitting an object file, create and emit a real label. More... | |
WinEH::FrameInfo * | EnsureValidWinFrameInfo (SMLoc Loc) |
Retreive the current frame info if one is available and it is not yet closed. More... | |
unsigned | getNumFrameInfos () |
ArrayRef< MCDwarfFrameInfo > | getDwarfFrameInfos () const |
bool | hasUnfinishedDwarfFrameInfo () |
unsigned | getNumWinFrameInfos () |
ArrayRef< std::unique_ptr< WinEH::FrameInfo > > | getWinFrameInfos () const |
void | generateCompactUnwindEncodings (MCAsmBackend *MAB) |
virtual void | EmitFileDirective (StringRef Filename) |
Switch to a new logical file. More... | |
virtual void | EmitIdent (StringRef IdentString) |
Emit the "identifiers" directive. More... | |
unsigned | EmitDwarfFileDirective (unsigned FileNo, StringRef Directory, StringRef Filename, MD5::MD5Result *Checksum=nullptr, Optional< StringRef > Source=None, unsigned CUID=0) |
Associate a filename with a specified logical file number. More... | |
virtual Expected< unsigned > | tryEmitDwarfFileDirective (unsigned FileNo, StringRef Directory, StringRef Filename, MD5::MD5Result *Checksum=nullptr, Optional< StringRef > Source=None, unsigned CUID=0) |
Associate a filename with a specified logical file number. More... | |
virtual void | emitDwarfFile0Directive (StringRef Directory, StringRef Filename, MD5::MD5Result *Checksum, Optional< StringRef > Source, unsigned CUID=0) |
Specify the "root" file of the compilation, using the ".file 0" extension. More... | |
virtual void | EmitCFIBKeyFrame () |
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. More... | |
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 information. More... | |
virtual bool | EmitCVFuncIdDirective (unsigned FunctionId) |
Introduces a function id for use with .cv_loc. More... | |
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. More... | |
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. More... | |
virtual void | EmitCVLinetableDirective (unsigned FunctionId, const MCSymbol *FnStart, const MCSymbol *FnEnd) |
This implements the CodeView '.cv_linetable' assembler directive. More... | |
virtual void | EmitCVInlineLinetableDirective (unsigned PrimaryFunctionId, unsigned SourceFileId, unsigned SourceLineNum, const MCSymbol *FnStartSym, const MCSymbol *FnEndSym) |
This implements the CodeView '.cv_inline_linetable' assembler directive. More... | |
virtual void | EmitCVDefRangeDirective (ArrayRef< std::pair< const MCSymbol *, const MCSymbol *>> Ranges, StringRef FixedSizePortion) |
This implements the CodeView '.cv_def_range' assembler directive. More... | |
virtual void | EmitCVStringTableDirective () |
This implements the CodeView '.cv_stringtable' assembler directive. More... | |
virtual void | EmitCVFileChecksumsDirective () |
This implements the CodeView '.cv_filechecksums' assembler directive. More... | |
virtual void | EmitCVFileChecksumOffsetDirective (unsigned FileNo) |
This implements the CodeView '.cv_filechecksumoffset' assembler directive. More... | |
virtual void | EmitCVFPOData (const MCSymbol *ProcSym, SMLoc Loc={}) |
This implements the CodeView '.cv_fpo_data' assembler directive. More... | |
virtual void | emitAbsoluteSymbolDiff (const MCSymbol *Hi, const MCSymbol *Lo, unsigned Size) |
Emit the absolute difference between two symbols. More... | |
virtual void | emitAbsoluteSymbolDiffAsULEB128 (const MCSymbol *Hi, const MCSymbol *Lo) |
Emit the absolute difference between two symbols encoded with ULEB128. More... | |
virtual MCSymbol * | getDwarfLineTableSymbol (unsigned CUID) |
virtual void | EmitCFISections (bool EH, bool Debug) |
void | EmitCFIStartProc (bool IsSimple, SMLoc Loc=SMLoc()) |
void | EmitCFIEndProc () |
virtual void | EmitCFIDefCfa (int64_t Register, int64_t Offset) |
virtual void | EmitCFIDefCfaOffset (int64_t Offset) |
virtual void | EmitCFIDefCfaRegister (int64_t Register) |
virtual void | EmitCFIOffset (int64_t Register, int64_t Offset) |
virtual void | EmitCFIPersonality (const MCSymbol *Sym, unsigned Encoding) |
virtual void | EmitCFILsda (const MCSymbol *Sym, unsigned Encoding) |
virtual void | EmitCFIRememberState () |
virtual void | EmitCFIRestoreState () |
virtual void | EmitCFISameValue (int64_t Register) |
virtual void | EmitCFIRestore (int64_t Register) |
virtual void | EmitCFIRelOffset (int64_t Register, int64_t Offset) |
virtual void | EmitCFIAdjustCfaOffset (int64_t Adjustment) |
virtual void | EmitCFIEscape (StringRef Values) |
virtual void | EmitCFIReturnColumn (int64_t Register) |
virtual void | EmitCFIGnuArgsSize (int64_t Size) |
virtual void | EmitCFISignalFrame () |
virtual void | EmitCFIUndefined (int64_t Register) |
virtual void | EmitCFIRegister (int64_t Register1, int64_t Register2) |
virtual void | EmitCFIWindowSave () |
virtual void | EmitCFINegateRAState () |
virtual void | EmitWinCFIStartProc (const MCSymbol *Symbol, SMLoc Loc=SMLoc()) |
virtual void | EmitWinCFIEndProc (SMLoc Loc=SMLoc()) |
virtual void | EmitWinCFIFuncletOrFuncEnd (SMLoc Loc=SMLoc()) |
This is used on platforms, such as Windows on ARM64, that require function or funclet sizes to be emitted in .xdata before the End marker is emitted for the frame. More... | |
virtual void | EmitWinCFIStartChained (SMLoc Loc=SMLoc()) |
virtual void | EmitWinCFIEndChained (SMLoc Loc=SMLoc()) |
virtual void | EmitWinCFIPushReg (unsigned Register, SMLoc Loc=SMLoc()) |
virtual void | EmitWinCFISetFrame (unsigned Register, unsigned Offset, SMLoc Loc=SMLoc()) |
virtual void | EmitWinCFIAllocStack (unsigned Size, SMLoc Loc=SMLoc()) |
virtual void | EmitWinCFISaveReg (unsigned Register, unsigned Offset, SMLoc Loc=SMLoc()) |
virtual void | EmitWinCFISaveXMM (unsigned Register, unsigned Offset, SMLoc Loc=SMLoc()) |
virtual void | EmitWinCFIPushFrame (bool Code, SMLoc Loc=SMLoc()) |
virtual void | EmitWinCFIEndProlog (SMLoc Loc=SMLoc()) |
virtual void | EmitWinEHHandler (const MCSymbol *Sym, bool Unwind, bool Except, SMLoc Loc=SMLoc()) |
virtual void | EmitWinEHHandlerData (SMLoc Loc=SMLoc()) |
virtual void | emitCGProfileEntry (const MCSymbolRefExpr *From, const MCSymbolRefExpr *To, uint64_t Count) |
MCSection * | getAssociatedPDataSection (const MCSection *TextSec) |
Get the .pdata section used for the given section. More... | |
MCSection * | getAssociatedXDataSection (const MCSection *TextSec) |
Get the .xdata section used for the given section. More... | |
virtual void | EmitSyntaxDirective () |
virtual bool | EmitRelocDirective (const MCExpr &Offset, StringRef Name, const MCExpr *Expr, SMLoc Loc, const MCSubtargetInfo &STI) |
Emit a .reloc directive. More... | |
virtual void | EmitAddrsig () |
virtual void | EmitAddrsigSym (const MCSymbol *Sym) |
virtual void | EmitInstruction (const MCInst &Inst, const MCSubtargetInfo &STI, bool PrintSchedInfo=false) |
Emit the given Instruction into the current section. More... | |
virtual void | EmitBundleAlignMode (unsigned AlignPow2) |
Set the bundle alignment mode from now on in the section. More... | |
virtual void | EmitBundleLock (bool AlignToEnd) |
The following instructions are a bundle-locked group. More... | |
virtual void | EmitBundleUnlock () |
Ends a bundle-locked group. More... | |
void | EmitRawText (const Twine &String) |
If this file is backed by a assembly streamer, this dumps the specified string in the output .s file. More... | |
virtual void | FinishImpl () |
Streamer specific finalization. More... | |
void | Finish () |
Finish emission of machine code. More... | |
virtual bool | mayHaveInstructions (MCSection &Sec) const |
Assembly File Formatting. | |
virtual bool | isVerboseAsm () const |
Return true if this streamer supports verbose assembly and if it is enabled. More... | |
virtual bool | hasRawTextSupport () const |
Return true if this asm streamer supports emitting unformatted text to the .s file with EmitRawText. More... | |
virtual bool | isIntegratedAssemblerRequired () const |
Is the integrated assembler required for this streamer to function correctly? More... | |
virtual void | AddComment (const Twine &T, bool EOL=true) |
Add a textual comment. More... | |
virtual raw_ostream & | GetCommentOS () |
Return a raw_ostream that comments can be written to. More... | |
virtual void | emitRawComment (const Twine &T, bool TabPrefix=true) |
Print T and prefix it with the comment string (normally #) and optionally a tab. More... | |
virtual void | addExplicitComment (const Twine &T) |
Add explicit comment T. More... | |
virtual void | emitExplicitComments () |
Emit added explicit comments. More... | |
virtual void | AddBlankLine () |
AddBlankLine - Emit a blank line to a .s file to pretty it up. More... | |
Symbol & Section Management | |
MCSectionSubPair | getCurrentSection () const |
Return the current section that the streamer is emitting code to. More... | |
MCSection * | getCurrentSectionOnly () const |
MCSectionSubPair | getPreviousSection () const |
Return the previous section that the streamer is emitting code to. More... | |
unsigned | GetSymbolOrder (const MCSymbol *Sym) const |
Returns an index to represent the order a symbol was emitted in. More... | |
virtual void | ChangeSection (MCSection *, const MCExpr *) |
Update streamer for a new active section. More... | |
void | PushSection () |
Save the current and previous section on the section stack. More... | |
bool | PopSection () |
Restore the current and previous section from the section stack. More... | |
bool | SubSection (const MCExpr *Subsection) |
virtual void | SwitchSection (MCSection *Section, const MCExpr *Subsection=nullptr) |
Set the current section where code is being emitted to Section . More... | |
void | SwitchSectionNoChange (MCSection *Section, const MCExpr *Subsection=nullptr) |
Set the current section where code is being emitted to Section . More... | |
virtual void | InitSections (bool NoExecStack) |
Create the default sections and set the initial one. More... | |
MCSymbol * | endSection (MCSection *Section) |
void | AssignFragment (MCSymbol *Symbol, MCFragment *Fragment) |
Sets the symbol's section. More... | |
virtual void | EmitLabel (MCSymbol *Symbol, SMLoc Loc=SMLoc()) |
Emit a label for Symbol into the current section. More... | |
virtual void | EmitEHSymAttributes (const MCSymbol *Symbol, MCSymbol *EHSymbol) |
virtual void | EmitAssemblerFlag (MCAssemblerFlag Flag) |
Note in the output the specified Flag . More... | |
virtual void | EmitLinkerOptions (ArrayRef< std::string > Kind) |
Emit the given list Options of strings as linker options into the output. More... | |
virtual void | EmitDataRegion (MCDataRegionType Kind) |
Note in the output the specified region Kind . More... | |
virtual void | EmitVersionMin (MCVersionMinType Type, unsigned Major, unsigned Minor, unsigned Update, VersionTuple SDKVersion) |
Specify the Mach-O minimum deployment target version. More... | |
virtual void | EmitBuildVersion (unsigned Platform, unsigned Major, unsigned Minor, unsigned Update, VersionTuple SDKVersion) |
Emit/Specify Mach-O build version command. More... | |
void | EmitVersionForTarget (const Triple &Target, const VersionTuple &SDKVersion) |
virtual void | EmitThumbFunc (MCSymbol *Func) |
Note in the output that the specified Func is a Thumb mode function (ARM target only). More... | |
virtual void | EmitAssignment (MCSymbol *Symbol, const MCExpr *Value) |
Emit an assignment of Value to Symbol . More... | |
virtual void | EmitWeakReference (MCSymbol *Alias, const MCSymbol *Symbol) |
Emit an weak reference from Alias to Symbol . More... | |
virtual bool | EmitSymbolAttribute (MCSymbol *Symbol, MCSymbolAttr Attribute)=0 |
Add the given Attribute to Symbol . More... | |
virtual void | EmitSymbolDesc (MCSymbol *Symbol, unsigned DescValue) |
Set the DescValue for the Symbol . More... | |
virtual void | BeginCOFFSymbolDef (const MCSymbol *Symbol) |
Start emitting COFF symbol definition. More... | |
virtual void | EmitCOFFSymbolStorageClass (int StorageClass) |
Emit the storage class of the symbol. More... | |
virtual void | EmitCOFFSymbolType (int Type) |
Emit the type of the symbol. More... | |
virtual void | EndCOFFSymbolDef () |
Marks the end of the symbol definition. More... | |
virtual void | EmitCOFFSafeSEH (MCSymbol const *Symbol) |
virtual void | EmitCOFFSymbolIndex (MCSymbol const *Symbol) |
Emits the symbol table index of a Symbol into the current section. More... | |
virtual void | EmitCOFFSectionIndex (MCSymbol const *Symbol) |
Emits a COFF section index. More... | |
virtual void | EmitCOFFSecRel32 (MCSymbol const *Symbol, uint64_t Offset) |
Emits a COFF section relative relocation. More... | |
virtual void | EmitCOFFImgRel32 (MCSymbol const *Symbol, int64_t Offset) |
Emits a COFF image relative relocation. More... | |
virtual void | emitELFSize (MCSymbol *Symbol, const MCExpr *Value) |
Emit an ELF .size directive. More... | |
virtual void | emitELFSymverDirective (StringRef AliasName, const MCSymbol *Aliasee) |
Emit an ELF .symver directive. More... | |
virtual void | EmitLOHDirective (MCLOHType Kind, const MCLOHArgs &Args) |
Emit a Linker Optimization Hint (LOH) directive. More... | |
virtual void | EmitCommonSymbol (MCSymbol *Symbol, uint64_t Size, unsigned ByteAlignment)=0 |
Emit a common symbol. More... | |
virtual void | EmitLocalCommonSymbol (MCSymbol *Symbol, uint64_t Size, unsigned ByteAlignment) |
Emit a local common (.lcomm) symbol. More... | |
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. More... | |
virtual void | EmitTBSSSymbol (MCSection *Section, MCSymbol *Symbol, uint64_t Size, unsigned ByteAlignment=0) |
Emit a thread local bss (.tbss) symbol. More... | |
Generating Data | |
virtual void | EmitBytes (StringRef Data) |
Emit the bytes in Data into the output. More... | |
virtual void | EmitBinaryData (StringRef Data) |
Functionally identical to EmitBytes. More... | |
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. More... | |
void | EmitValue (const MCExpr *Value, unsigned Size, SMLoc Loc=SMLoc()) |
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. More... | |
virtual void | EmitULEB128Value (const MCExpr *Value) |
virtual void | EmitSLEB128Value (const MCExpr *Value) |
void | EmitULEB128IntValue (uint64_t Value) |
Special case of EmitULEB128Value that avoids the client having to pass in a MCExpr for constant integers. More... | |
void | EmitSLEB128IntValue (int64_t Value) |
Special case of EmitSLEB128Value that avoids the client having to pass in a MCExpr for constant integers. More... | |
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. More... | |
virtual void | EmitDTPRel64Value (const MCExpr *Value) |
Emit the expression Value into the output as a dtprel (64-bit DTP relative) value. More... | |
virtual void | EmitDTPRel32Value (const MCExpr *Value) |
Emit the expression Value into the output as a dtprel (32-bit DTP relative) value. More... | |
virtual void | EmitTPRel64Value (const MCExpr *Value) |
Emit the expression Value into the output as a tprel (64-bit TP relative) value. More... | |
virtual void | EmitTPRel32Value (const MCExpr *Value) |
Emit the expression Value into the output as a tprel (32-bit TP relative) value. More... | |
virtual void | EmitGPRel64Value (const MCExpr *Value) |
Emit the expression Value into the output as a gprel64 (64-bit GP relative) value. More... | |
virtual void | EmitGPRel32Value (const MCExpr *Value) |
Emit the expression Value into the output as a gprel32 (32-bit GP relative) value. More... | |
void | emitFill (uint64_t NumBytes, uint8_t FillValue) |
Emit NumBytes bytes worth of the value specified by FillValue. More... | |
virtual void | emitFill (const MCExpr &NumBytes, uint64_t FillValue, SMLoc Loc=SMLoc()) |
Emit Size bytes worth of the value specified by FillValue . More... | |
virtual void | emitFill (const MCExpr &NumValues, int64_t Size, int64_t Expr, SMLoc Loc=SMLoc()) |
Emit NumValues copies of Size bytes. More... | |
void | EmitZeros (uint64_t NumBytes) |
Emit NumBytes worth of zeros. More... | |
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. More... | |
virtual void | EmitCodeAlignment (unsigned ByteAlignment, unsigned MaxBytesToEmit=0) |
Emit nops until the byte alignment ByteAlignment is reached. More... | |
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. More... | |
virtual void | EmitCodePaddingBasicBlockStart (const MCCodePaddingContext &Context) |
virtual void | EmitCodePaddingBasicBlockEnd (const MCCodePaddingContext &Context) |
Protected Member Functions | |
MCStreamer (MCContext &Ctx) | |
virtual void | EmitCFIStartProcImpl (MCDwarfFrameInfo &Frame) |
virtual void | EmitCFIEndProcImpl (MCDwarfFrameInfo &CurFrame) |
WinEH::FrameInfo * | getCurrentWinFrameInfo () |
virtual void | EmitWindowsUnwindTables () |
virtual void | EmitRawTextImpl (StringRef String) |
EmitRawText - If this file is backed by an assembly streamer, this dumps the specified string in the output .s file. More... | |
bool | checkCVLocSection (unsigned FuncId, unsigned FileNo, SMLoc Loc) |
Returns true if the the .cv_loc directive is in the right section. More... | |
Streaming machine code generation interface.
This interface is intended to provide a programatic interface that is very similar to the level that an assembler .s file provides. It has callbacks to emit bytes, handle directives, etc. The implementation of this interface retains state to know what the current section is etc.
There are multiple implementations of this interface: one for writing out a .s file, and implementations that write out .o files of various formats.
Definition at line 189 of file MCStreamer.h.
|
protected |
Definition at line 89 of file MCStreamer.cpp.
References llvm::SmallVectorTemplateBase< T, bool >::push_back().
|
delete |
|
virtual |
Definition at line 95 of file MCStreamer.cpp.
|
inlinevirtual |
AddBlankLine - Emit a blank line to a .s file to pretty it up.
Definition at line 333 of file MCStreamer.h.
Referenced by llvm::TargetLoweringObjectFileELF::emitModuleMetadata(), llvm::TargetLoweringObjectFileMachO::emitModuleMetadata(), llvm::TargetLoweringObjectFileCOFF::emitModuleMetadata(), emitNonLazyStubs(), llvm::MipsAsmPrinter::EmitStartOfAsmFile(), getGNUBinOpPrecedence(), and llvm::StackMaps::serializeToStackMapSection().
Add a textual comment.
Typically for comments that can be emitted to the generated .s file if applicable as a QoI issue to make the output of the compiler more readable. This only affects the MCAsmStreamer, and only when verbose assembly output is enabled.
If the comment includes embedded
's, they will each get the comment prefix as appropriate. The added comment should not end with a
. By default, each comment is terminated with an end of line, i.e. the EOL param is set to true by default. If one prefers not to end the comment with a new line then the EOL param should be passed with a false value.
Definition at line 312 of file MCStreamer.h.
Referenced by llvm::BTFDebug::BTFDebug(), llvm::X86AsmPrinter::EmitInstruction(), llvm::CodeViewContext::emitLineTableForFunction(), EmitNops(), llvm::MipsAsmPrinter::EmitStartOfAsmFile(), llvm::BTFTypeBase::emitType(), llvm::BTFTypeInt::emitType(), and llvm::BTFTypeStruct::emitType().
Add explicit comment T.
T is required to be a valid comment in the output and does not need to be escaped.
Definition at line 113 of file MCStreamer.cpp.
void MCStreamer::AssignFragment | ( | MCSymbol * | Symbol, |
MCFragment * | Fragment | ||
) |
Sets the symbol's section.
Each emitted symbol will be tracked in the ordering table, so we can sort on them later.
Definition at line 338 of file MCStreamer.cpp.
References assert(), llvm::MCSymbol::setFragment(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::size(), and llvm::ARMBuildAttrs::Symbol.
Start emitting COFF symbol definition.
Symbol | - The symbol to have its External & Type fields set. |
Reimplemented in llvm::MCWinCOFFStreamer.
Definition at line 996 of file MCStreamer.cpp.
References llvm_unreachable.
Update streamer for a new active section.
This is called by PopSection and SwitchSection, if the current section changes.
Reimplemented in llvm::MCObjectStreamer, llvm::MCWasmStreamer, and llvm::MCELFStreamer.
Definition at line 1016 of file MCStreamer.cpp.
Referenced by SwitchSection().
Returns true if the the .cv_loc directive is in the right section.
Definition at line 294 of file MCStreamer.cpp.
References getContext(), getCurrentSectionOnly(), llvm::MCContext::getCVContext(), llvm::CodeViewContext::getCVFunctionInfo(), llvm::MCContext::reportError(), and llvm::MCCVFunctionInfo::Section.
Referenced by llvm::MCObjectStreamer::EmitCVLocDirective().
|
virtual |
Emit the absolute difference between two symbols.
Hi
is greater than the offset Lo
. Reimplemented in llvm::MCObjectStreamer.
Definition at line 964 of file MCStreamer.cpp.
References llvm::MCSymbolRefExpr::create(), llvm::MCBinaryExpr::createSub(), llvm::MCContext::createTempSymbol(), llvm::MCAsmInfo::doesSetDirectiveSuppressReloc(), EmitAssignment(), EmitSymbolValue(), EmitValue(), and llvm::MCContext::getAsmInfo().
Referenced by llvm::MCObjectStreamer::emitAbsoluteSymbolDiff(), and printFPOReg().
|
virtual |
Emit the absolute difference between two symbols encoded with ULEB128.
Reimplemented in llvm::MCObjectStreamer.
Definition at line 983 of file MCStreamer.cpp.
References llvm::MCSymbolRefExpr::create(), llvm::MCBinaryExpr::createSub(), and EmitULEB128Value().
Referenced by llvm::MCObjectStreamer::emitAbsoluteSymbolDiffAsULEB128().
|
inlinevirtual |
Reimplemented in llvm::MCObjectStreamer.
Definition at line 952 of file MCStreamer.h.
Reimplemented in llvm::MCObjectStreamer.
Definition at line 953 of file MCStreamer.h.
|
virtual |
Note in the output the specified Flag
.
Reimplemented in llvm::MCWasmStreamer, llvm::MCELFStreamer, and llvm::MCWinCOFFStreamer.
Definition at line 993 of file MCStreamer.cpp.
Emit an assignment of Value
to 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.
Symbol | - The symbol being assigned to. |
Value | - The value for the symbol. |
Reimplemented in llvm::MCObjectStreamer, and llvm::RecordStreamer.
Definition at line 912 of file MCStreamer.cpp.
References llvm::MCTargetStreamer::emitAssignment(), getTargetStreamer(), llvm::MCSymbol::setVariableValue(), and visitUsedExpr().
Referenced by emitAbsoluteSymbolDiff(), llvm::RecordStreamer::EmitAssignment(), llvm::MCObjectStreamer::EmitAssignment(), llvm::RecordStreamer::flushSymverDirectives(), forceExpAbs(), getPlatformName(), isOperator(), and llvm::MCContext::setSymbolValue().
|
virtual |
Functionally identical to EmitBytes.
When emitting textual assembly, this method uses .byte directives instead of .ascii or .asciz for readability.
Definition at line 1019 of file MCStreamer.cpp.
References EmitBytes().
Referenced by llvm::AsmPrinter::XRayFunctionEntry::emit(), EmitNops(), emitOneV5FileEntry(), and llvm::MCDwarfLineStr::emitSection().
|
inlinevirtual |
Emit/Specify Mach-O build version command.
Platform
should be one of MachO::PlatformType.
Definition at line 461 of file MCStreamer.h.
References StorageClass.
|
virtual |
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.
Reimplemented in llvm::MCObjectStreamer, and llvm::MCELFStreamer.
Definition at line 1035 of file MCStreamer.cpp.
|
virtual |
The following instructions are a bundle-locked group.
AlignToEnd | - If true, the bundle-locked group will be aligned to the end of a bundle. |
Reimplemented in llvm::MCObjectStreamer, and llvm::MCELFStreamer.
Definition at line 1036 of file MCStreamer.cpp.
|
virtual |
Ends a bundle-locked group.
Reimplemented in llvm::MCObjectStreamer, and llvm::MCELFStreamer.
Definition at line 1038 of file MCStreamer.cpp.
|
virtual |
Emit the bytes in Data
into the output.
This is used to implement assembler directives such as .byte, .ascii, etc.
Reimplemented in llvm::MCObjectStreamer.
Definition at line 1018 of file MCStreamer.cpp.
Referenced by llvm::BTFDebug::BTFDebug(), llvm::MCDwarfLineAddr::Emit(), llvm::AMDGPUTargetELFStreamer::EmitAmdhsaKernelDescriptor(), llvm::AMDGPUTargetELFStreamer::EmitAMDKernelCodeT(), EmitBinaryData(), llvm::AArch64TargetStreamer::emitInst(), llvm::ARMTargetStreamer::emitInst(), EmitIntValue(), llvm::TargetLoweringObjectFileELF::emitModuleMetadata(), llvm::TargetLoweringObjectFileCOFF::emitModuleMetadata(), EmitNop(), EmitNops(), emitNullTerminatedSymbolName(), emitOneV5FileEntry(), llvm::MCDwarfLineStr::emitRef(), EmitSLEB128IntValue(), EmitULEB128IntValue(), and llvm::MSP430TargetELFStreamer::MSP430TargetELFStreamer().
|
virtual |
Definition at line 434 of file MCStreamer.cpp.
References llvm::MCCFIInstruction::createAdjustCfaOffset(), EmitCFILabel(), and llvm::MCDwarfFrameInfo::Instructions.
Referenced by llvm::X86AsmPrinter::EmitInstruction(), IsSmallMemAccess(), and PrintCFIEscape().
|
virtual |
Definition at line 224 of file MCStreamer.cpp.
References llvm::MCDwarfFrameInfo::IsBKeyFrame.
Referenced by PrintCFIEscape().
|
virtual |
Definition at line 413 of file MCStreamer.cpp.
References llvm::MCCFIInstruction::createDefCfa(), llvm::MCDwarfFrameInfo::CurrentCfaRegister, EmitCFILabel(), llvm::MCDwarfFrameInfo::Instructions, and Register.
Referenced by printDwarfFileDirective().
|
virtual |
Definition at line 424 of file MCStreamer.cpp.
References llvm::MCCFIInstruction::createDefCfaOffset(), EmitCFILabel(), and llvm::MCDwarfFrameInfo::Instructions.
Referenced by printDwarfFileDirective().
|
virtual |
Definition at line 444 of file MCStreamer.cpp.
References llvm::MCCFIInstruction::createDefCfaRegister(), llvm::MCDwarfFrameInfo::CurrentCfaRegister, EmitCFILabel(), llvm::MCDwarfFrameInfo::Instructions, and Register.
Referenced by IsSmallMemAccess(), and PrintCFIEscape().
void MCStreamer::EmitCFIEndProc | ( | ) |
Definition at line 394 of file MCStreamer.cpp.
References EmitCFIEndProcImpl().
|
protectedvirtual |
Reimplemented in llvm::MipsELFStreamer.
Definition at line 401 of file MCStreamer.cpp.
References llvm::MCDwarfFrameInfo::End.
Referenced by EmitCFIEndProc(), and printDwarfFileDirective().
|
virtual |
Definition at line 531 of file MCStreamer.cpp.
References llvm::MCCFIInstruction::createEscape(), EmitCFILabel(), and llvm::MCDwarfFrameInfo::Instructions.
Referenced by PrintCFIEscape().
|
virtual |
Definition at line 540 of file MCStreamer.cpp.
References llvm::MCCFIInstruction::createGnuArgsSize(), EmitCFILabel(), and llvm::MCDwarfFrameInfo::Instructions.
Referenced by PrintCFIEscape().
|
virtual |
When emitting an object file, create and emit a real label.
When emitting textual assembly, this should do nothing to avoid polluting our output.
Reimplemented in llvm::MipsELFStreamer.
Definition at line 407 of file MCStreamer.cpp.
Referenced by EmitCFIAdjustCfaOffset(), EmitCFIDefCfa(), EmitCFIDefCfaOffset(), EmitCFIDefCfaRegister(), EmitCFIEscape(), EmitCFIGnuArgsSize(), EmitCFINegateRAState(), EmitCFIOffset(), EmitCFIRegister(), EmitCFIRelOffset(), EmitCFIRememberState(), EmitCFIRestore(), EmitCFIRestoreState(), EmitCFISameValue(), EmitCFIUndefined(), EmitCFIWindowSave(), EmitWinCFIAllocStack(), EmitWinCFIEndChained(), EmitWinCFIEndProc(), EmitWinCFIEndProlog(), EmitWinCFIFuncletOrFuncEnd(), EmitWinCFIPushFrame(), EmitWinCFIPushReg(), EmitWinCFISaveReg(), EmitWinCFISaveXMM(), EmitWinCFISetFrame(), EmitWinCFIStartChained(), and EmitWinCFIStartProc().
Definition at line 484 of file MCStreamer.cpp.
References llvm::MCDwarfFrameInfo::Lsda, and llvm::MCDwarfFrameInfo::LsdaEncoding.
Referenced by PrintCFIEscape().
|
virtual |
Definition at line 587 of file MCStreamer.cpp.
References llvm::MCCFIInstruction::createNegateRAState(), EmitCFILabel(), and llvm::MCDwarfFrameInfo::Instructions.
Referenced by PrintCFIEscape().
|
virtual |
Definition at line 455 of file MCStreamer.cpp.
References llvm::MCCFIInstruction::createOffset(), EmitCFILabel(), and llvm::MCDwarfFrameInfo::Instructions.
Referenced by PrintCFIEscape().
Definition at line 475 of file MCStreamer.cpp.
References llvm::MCDwarfFrameInfo::Personality, and llvm::MCDwarfFrameInfo::PersonalityEncoding.
Referenced by PrintCFIEscape().
|
virtual |
Definition at line 567 of file MCStreamer.cpp.
References llvm::MCCFIInstruction::createRegister(), EmitCFILabel(), and llvm::MCDwarfFrameInfo::Instructions.
Referenced by PrintCFIEscape().
|
virtual |
Definition at line 465 of file MCStreamer.cpp.
References llvm::MCCFIInstruction::createRelOffset(), EmitCFILabel(), and llvm::MCDwarfFrameInfo::Instructions.
Referenced by IsSmallMemAccess(), and PrintCFIEscape().
|
virtual |
Definition at line 492 of file MCStreamer.cpp.
References llvm::MCCFIInstruction::createRememberState(), EmitCFILabel(), and llvm::MCDwarfFrameInfo::Instructions.
Referenced by IsSmallMemAccess(), and PrintCFIEscape().
|
virtual |
Definition at line 521 of file MCStreamer.cpp.
References llvm::MCCFIInstruction::createRestore(), EmitCFILabel(), and llvm::MCDwarfFrameInfo::Instructions.
Referenced by PrintCFIEscape().
|
virtual |
Definition at line 501 of file MCStreamer.cpp.
References llvm::MCCFIInstruction::createRestoreState(), EmitCFILabel(), and llvm::MCDwarfFrameInfo::Instructions.
Referenced by IsSmallMemAccess(), and PrintCFIEscape().
|
virtual |
Definition at line 596 of file MCStreamer.cpp.
References llvm::MCDwarfFrameInfo::RAReg, and Register.
Referenced by PrintCFIEscape().
|
virtual |
Definition at line 511 of file MCStreamer.cpp.
References llvm::MCCFIInstruction::createSameValue(), EmitCFILabel(), and llvm::MCDwarfFrameInfo::Instructions.
Referenced by PrintCFIEscape().
Reimplemented in llvm::MCObjectStreamer.
Definition at line 365 of file MCStreamer.cpp.
References assert().
Referenced by llvm::MCObjectStreamer::EmitCFISections(), and printDwarfFileDirective().
|
virtual |
Definition at line 550 of file MCStreamer.cpp.
References llvm::MCDwarfFrameInfo::IsSignalFrame.
Referenced by PrintCFIEscape().
Definition at line 369 of file MCStreamer.cpp.
References llvm::MCDwarfFrameInfo::CurrentCfaRegister, EmitCFIStartProcImpl(), llvm::MCContext::getAsmInfo(), getContext(), llvm::MCAsmInfo::getInitialFrameState(), hasUnfinishedDwarfFrameInfo(), llvm::MCDwarfFrameInfo::IsSimple, llvm::MCCFIInstruction::OpDefCfa, llvm::MCCFIInstruction::OpDefCfaRegister, and llvm::MCContext::reportError().
|
protectedvirtual |
Reimplemented in llvm::MipsELFStreamer.
Definition at line 391 of file MCStreamer.cpp.
Referenced by EmitCFIStartProc().
|
virtual |
Definition at line 557 of file MCStreamer.cpp.
References llvm::MCCFIInstruction::createUndefined(), EmitCFILabel(), and llvm::MCDwarfFrameInfo::Instructions.
Referenced by PrintCFIEscape().
|
virtual |
Definition at line 577 of file MCStreamer.cpp.
References llvm::MCCFIInstruction::createWindowSave(), EmitCFILabel(), and llvm::MCDwarfFrameInfo::Instructions.
Referenced by PrintCFIEscape().
|
virtual |
Reimplemented in llvm::MCELFStreamer.
Definition at line 709 of file MCStreamer.cpp.
Referenced by llvm::TargetLoweringObjectFileELF::emitModuleMetadata().
Emit nops until the byte alignment 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.
ByteAlignment | - The alignment to reach. This must be a power of two on some targets. |
MaxBytesToEmit | - The maximum numbers of bytes to emit, or 0. If the alignment cannot be reached in this many bytes, no bytes are emitted. |
Reimplemented in llvm::MCObjectStreamer.
Definition at line 1031 of file MCStreamer.cpp.
Referenced by llvm::MipsAsmPrinter::EmitEndOfAsmFile(), llvm::ConstantPool::emitEntries(), EmitNops(), llvm::MipsTargetELFStreamer::finish(), and smallData().
|
inlinevirtual |
Reimplemented in llvm::MCObjectStreamer.
Definition at line 769 of file MCStreamer.h.
|
inlinevirtual |
Reimplemented in llvm::MCObjectStreamer.
Definition at line 766 of file MCStreamer.h.
Emits a COFF image relative relocation.
Symbol | - Symbol the image relative relocation should point to. |
Reimplemented in llvm::MCWinCOFFStreamer.
Definition at line 876 of file MCStreamer.cpp.
Reimplemented in llvm::MCWinCOFFStreamer.
Definition at line 868 of file MCStreamer.cpp.
Emits a COFF section relative relocation.
Symbol | - Symbol the section relative relocation should point to. |
Reimplemented in llvm::MCWinCOFFStreamer.
Definition at line 874 of file MCStreamer.cpp.
Referenced by llvm::CodeViewContext::emitLineTableForFunction(), and EmitSymbolValue().
Emits a COFF section index.
Symbol | - Symbol the section number relocation should point to. |
Reimplemented in llvm::MCWinCOFFStreamer.
Definition at line 872 of file MCStreamer.cpp.
Referenced by llvm::CodeViewContext::emitLineTableForFunction().
Emits the symbol table index of a Symbol into the current section.
Reimplemented in llvm::MCWinCOFFStreamer.
Definition at line 870 of file MCStreamer.cpp.
|
virtual |
Emit the storage class of the symbol.
StorageClass | - The storage class the symbol should have. |
Reimplemented in llvm::MCWinCOFFStreamer.
Definition at line 1003 of file MCStreamer.cpp.
References llvm_unreachable.
|
virtual |
Emit the type of the symbol.
Reimplemented in llvm::MCWinCOFFStreamer.
Definition at line 1006 of file MCStreamer.cpp.
References llvm_unreachable.
|
pure virtual |
Emit a common symbol.
Symbol | - The common symbol to emit. |
Size | - The size of the common symbol. |
ByteAlignment | - The alignment of the symbol if non-zero. This must be a power of 2. |
Implemented in llvm::MCWinCOFFStreamer, llvm::RecordStreamer, llvm::MCWasmStreamer, and llvm::MCELFStreamer.
|
virtual |
This implements the CodeView '.cv_def_range' assembler directive.
Reimplemented in llvm::MCObjectStreamer.
Definition at line 326 of file MCStreamer.cpp.
Referenced by llvm::MCObjectStreamer::EmitCVDefRangeDirective(), and printDwarfFileDirective().
|
inlinevirtual |
This implements the CodeView '.cv_filechecksumoffset' assembler directive.
Reimplemented in llvm::MCObjectStreamer.
Definition at line 867 of file MCStreamer.h.
|
inlinevirtual |
This implements the CodeView '.cv_filechecksums' assembler directive.
Reimplemented in llvm::MCObjectStreamer.
Definition at line 863 of file MCStreamer.h.
|
virtual |
Associate a filename with a specified logical file number, and also specify that file's checksum information.
This implements the '.cv_file 4 "foo.c"' assembler directive. Returns true on success.
Definition at line 264 of file MCStreamer.cpp.
References llvm::CodeViewContext::addFile(), getContext(), and llvm::MCContext::getCVContext().
Referenced by llvm::CodeViewDebug::CodeViewDebug().
|
inlinevirtual |
This implements the CodeView '.cv_fpo_data' assembler directive.
Definition at line 870 of file MCStreamer.h.
References Debug, From, llvm::MipsISD::Hi, llvm::MipsISD::Lo, and Register.
Introduces a function id for use with .cv_loc.
Definition at line 271 of file MCStreamer.cpp.
References getContext(), llvm::MCContext::getCVContext(), and llvm::CodeViewContext::recordFunctionId().
Referenced by printDwarfFileDirective().
|
virtual |
This implements the CodeView '.cv_inline_linetable' assembler directive.
Reimplemented in llvm::MCObjectStreamer.
Definition at line 320 of file MCStreamer.cpp.
Referenced by llvm::MCObjectStreamer::EmitCVInlineLinetableDirective(), and printDwarfFileDirective().
|
virtual |
Introduces an inline call site id for use with .cv_loc.
Includes extra information for inline line table generation.
Definition at line 275 of file MCStreamer.cpp.
References getContext(), llvm::MCContext::getCVContext(), llvm::CodeViewContext::recordInlinedCallSiteId(), and llvm::MCContext::reportError().
Referenced by llvm::CodeViewDebug::CodeViewDebug(), and printDwarfFileDirective().
|
virtual |
This implements the CodeView '.cv_linetable' assembler directive.
Reimplemented in llvm::MCObjectStreamer.
Definition at line 316 of file MCStreamer.cpp.
Referenced by printDwarfFileDirective().
|
virtual |
This implements the CodeView '.cv_loc' assembler directive.
Reimplemented in llvm::MCObjectStreamer.
Definition at line 289 of file MCStreamer.cpp.
|
inlinevirtual |
This implements the CodeView '.cv_stringtable' assembler directive.
Reimplemented in llvm::MCObjectStreamer.
Definition at line 860 of file MCStreamer.h.
|
inlinevirtual |
Note in the output the specified region Kind
.
Definition at line 452 of file MCStreamer.h.
Referenced by llvm::ConstantPool::emitEntries(), llvm::MipsAsmPrinter::EmitFunctionBodyEnd(), and llvm::MipsAsmPrinter::EmitInstruction().
Emit the expression 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.
Reimplemented in llvm::MCObjectStreamer.
Definition at line 174 of file MCStreamer.cpp.
References llvm::report_fatal_error().
Referenced by llvm::MipsAsmPrinter::EmitDebugValue().
Emit the expression 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.
Reimplemented in llvm::MCObjectStreamer.
Definition at line 170 of file MCStreamer.cpp.
References llvm::report_fatal_error().
Referenced by llvm::MipsAsmPrinter::EmitDebugValue().
|
virtual |
Specify the "root" file of the compilation, using the ".file 0" extension.
Definition at line 215 of file MCStreamer.cpp.
References getContext(), and llvm::MCContext::setMCLineTableRootFile().
|
inline |
Associate a filename with a specified logical file number.
This implements the DWARF2 '.file 4 "foo.c"' assembler directive.
Definition at line 783 of file MCStreamer.h.
References llvm::cantFail(), llvm::lltok::ChecksumKind, llvm::None, and llvm::Sched::Source.
|
virtual |
This implements the DWARF2 '.loc fileno lineno ...' assembler directive.
Reimplemented in llvm::MCObjectStreamer.
Definition at line 231 of file MCStreamer.cpp.
References getContext(), and llvm::MCContext::setCurrentDwarfLoc().
Referenced by llvm::MCObjectStreamer::EmitDwarfLocDirective(), and printDwarfFileDirective().
Definition at line 330 of file MCStreamer.cpp.
Emit an ELF .size directive.
This corresponds to an assembler statement such as: .size symbol, expression
Reimplemented in llvm::MCWasmStreamer, and llvm::MCELFStreamer.
Definition at line 1009 of file MCStreamer.cpp.
Referenced by llvm::TargetLoweringObjectFileELF::emitPersonalityValue(), and llvm::MipsAsmPrinter::EmitStartOfAsmFile().
Emit an ELF .symver directive.
This corresponds to an assembler statement such as: .symver _start, foo@SOME_VERSION
AliasName | - The versioned alias (i.e. "foo@@SOME_VERSION") |
Aliasee | - The aliased symbol (i.e. "_start") |
Reimplemented in llvm::RecordStreamer, and llvm::MCELFStreamer.
Definition at line 1010 of file MCStreamer.cpp.
|
virtual |
Emit added explicit comments.
Definition at line 114 of file MCStreamer.cpp.
|
virtual |
Switch to a new logical file.
This is used to implement the '.file "foo.c"' assembler directive.
Reimplemented in llvm::MCObjectStreamer.
Definition at line 1002 of file MCStreamer.cpp.
void MCStreamer::emitFill | ( | uint64_t | NumBytes, |
uint8_t | FillValue | ||
) |
Emit NumBytes bytes worth of the value specified by FillValue.
This implements directives such as '.space'.
Definition at line 196 of file MCStreamer.cpp.
References llvm::MCConstantExpr::create(), and getContext().
Referenced by EmitGenDwarfRanges(), EmitZeros(), and PrintQuotedString().
|
virtual |
Emit Size
bytes worth of the value specified by FillValue
.
This is used to implement assembler directives such as .space or .skip.
NumBytes | - The number of bytes to emit. |
FillValue | - The value to use when filling bytes. |
Loc | - The location of the expression for error reporting. |
Reimplemented in llvm::MCObjectStreamer.
Definition at line 1025 of file MCStreamer.cpp.
|
virtual |
Emit NumValues
copies of Size
bytes.
Each Size
bytes is taken from the lowest order 4 bytes of Expr
expression.
This is used to implement assembler directives such as .fill.
NumValues | - The number of copies of Size bytes to emit. |
Size | - The size (in bytes) of each repeated value. |
Expr | - The expression from which Size bytes are used. |
Reimplemented in llvm::MCObjectStreamer.
Definition at line 1026 of file MCStreamer.cpp.
Emit the expression 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.
Reimplemented in llvm::MCObjectStreamer.
Definition at line 190 of file MCStreamer.cpp.
References llvm::report_fatal_error().
Emit the expression 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.
Reimplemented in llvm::MCObjectStreamer.
Definition at line 186 of file MCStreamer.cpp.
References llvm::report_fatal_error().
|
inlinevirtual |
Emit the "identifiers" directive.
This implements the '.ident "version foo"' assembler directive.
Reimplemented in llvm::MCWasmStreamer, llvm::MCELFStreamer, and llvm::MCWinCOFFStreamer.
Definition at line 779 of file MCStreamer.h.
|
virtual |
Emit the given Instruction
into the current section.
PrintSchedInfo == true then schedul comment should be added to output
Reimplemented in llvm::MCObjectStreamer, llvm::RecordStreamer, llvm::MipsELFStreamer, and llvm::HexagonMCELFStreamer.
Definition at line 956 of file MCStreamer.cpp.
References llvm::MCOperand::getExpr(), llvm::MCInst::getNumOperands(), llvm::MCInst::getOperand(), llvm::MCOperand::isExpr(), and visitUsedExpr().
Referenced by addNegOperand(), convertFPR32ToFPR64(), countMCSymbolRefExpr(), EmitBinary(), EmitCall(), llvm::MipsTargetStreamer::emitII(), llvm::RecordStreamer::EmitInstruction(), llvm::X86AsmInstrumentation::EmitInstruction(), llvm::X86AsmPrinter::EmitInstruction(), llvm::MCObjectStreamer::EmitInstruction(), EmitNop(), EmitNops(), llvm::MipsTargetStreamer::emitR(), llvm::MipsTargetStreamer::emitRRIII(), llvm::MipsTargetStreamer::emitRRX(), llvm::MipsTargetStreamer::emitRX(), EmitSETHI(), llvm::MipsAsmPrinter::EmitStartOfAsmFile(), llvm::AsmPrinter::EmitToStreamer(), getSpecialRegForName(), llvm::IsCPSRDead< MCInst >(), isMatchingOrAlias(), nextReg(), and printMCExpr().
|
virtual |
Special case of EmitValue that avoids the client having to pass in a MCExpr for constant integers.
EmitIntValue - Special case of EmitValue that avoids the client having to pass in a MCExpr for constant integers.
Reimplemented in llvm::MipsELFStreamer.
Definition at line 124 of file MCStreamer.cpp.
References assert(), EmitBytes(), llvm::MCContext::getAsmInfo(), llvm::isIntN(), llvm::MCAsmInfo::isLittleEndian(), llvm::isUIntN(), and Size.
Referenced by ARM64EmitUnwindCode(), ARM64EmitUnwindInfo(), llvm::BTFDebug::BTFDebug(), llvm::MCDwarfLineTableHeader::Emit(), llvm::MCObjectStreamer::emitAbsoluteSymbolDiff(), llvm::MipsTargetELFStreamer::emitDirectiveEnd(), llvm::AMDGPUTargetELFStreamer::EmitDirectiveHSACodeObjectISA(), llvm::AMDGPUTargetELFStreamer::EmitDirectiveHSACodeObjectVersion(), EmitDwarfLineTable(), emitDwarfSetLineAddr(), emitEncodingByte(), llvm::CodeViewContext::emitFileChecksums(), llvm::MCObjectStreamer::emitFill(), EmitGenDwarfAbbrev(), EmitGenDwarfAranges(), EmitGenDwarfInfo(), EmitGenDwarfRanges(), llvm::MCELFStreamer::EmitIdent(), llvm::MipsELFStreamer::EmitIntValue(), llvm::CodeViewContext::emitLineTableForFunction(), llvm::TargetLoweringObjectFileELF::emitModuleMetadata(), llvm::TargetLoweringObjectFileMachO::emitModuleMetadata(), llvm::TargetLoweringObjectFileCOFF::emitModuleMetadata(), emitNonLazySymbolPointer(), emitOneV5FileEntry(), llvm::AMDGPUTargetELFStreamer::EmitPALMetadata(), llvm::MCDwarfLineStr::emitRef(), llvm::CodeViewContext::emitStringTable(), llvm::BTFTypeBase::emitType(), llvm::BTFTypeInt::emitType(), llvm::BTFTypeEnum::emitType(), llvm::BTFTypeArray::emitType(), llvm::BTFTypeStruct::emitType(), llvm::BTFTypeFuncProto::emitType(), EmitUnwindCode(), EmitUnwindInfo(), llvm::MCObjectStreamer::EmitValueImpl(), llvm::WebAssemblyTargetStreamer::emitValueType(), getTryAncestor(), llvm::MSP430TargetELFStreamer::MSP430TargetELFStreamer(), llvm::operator<<(), printFPOReg(), llvm::StackMaps::recordStatepoint(), llvm::FaultMaps::serializeToFaultMapSection(), and smallData().
Emit a label for Symbol
into the current section.
This corresponds to an assembler statement such as: foo:
Symbol | - The symbol to emit. A given symbol should only be emitted as a label once, and symbols emitted as a label should never be used in an assignment. |
Reimplemented in llvm::MCObjectStreamer, llvm::RecordStreamer, llvm::MipsELFStreamer, llvm::MCELFStreamer, and llvm::MCWinCOFFStreamer.
Definition at line 347 of file MCStreamer.cpp.
References assert(), llvm::MCTargetStreamer::emitLabel(), getContext(), getCurrentSectionOnly(), llvm::MCSymbol::getFragment(), getTargetStreamer(), llvm::MCSymbol::isUndefined(), llvm::MCSymbol::isVariable(), llvm::MCSymbol::redefineIfPossible(), llvm::MCContext::reportError(), and llvm::MCSymbol::setFragment().
Referenced by ARM64EmitUnwindInfo(), llvm::BTFDebug::beginInstruction(), convertFPR32ToFPR64(), countMCSymbolRefExpr(), llvm::MCDwarfLineTableHeader::Emit(), llvm::MCDwarfDwoLineTable::Emit(), llvm::MCGenDwarfInfo::Emit(), llvm::AMDGPUTargetELFStreamer::EmitAmdhsaKernelDescriptor(), llvm::MipsTargetELFStreamer::emitDirectiveEnd(), emitDirectiveRelocJalr(), llvm::MipsAsmPrinter::EmitEndOfAsmFile(), llvm::ConstantPool::emitEntries(), llvm::MipsAsmPrinter::EmitFunctionEntryLabel(), EmitGenDwarfInfo(), llvm::X86AsmPrinter::EmitInstruction(), llvm::MipsAsmPrinter::EmitInstruction(), llvm::RecordStreamer::EmitLabel(), llvm::MCObjectStreamer::EmitLabel(), llvm::TargetLoweringObjectFileELF::emitModuleMetadata(), llvm::TargetLoweringObjectFileMachO::emitModuleMetadata(), llvm::TargetLoweringObjectFileCOFF::emitModuleMetadata(), emitNonLazySymbolPointer(), EmitNop(), EmitNops(), llvm::TargetLoweringObjectFileELF::emitPersonalityValue(), llvm::MipsAsmPrinter::EmitStartOfAsmFile(), EmitUnwindInfo(), endSection(), llvm::MCAsmInfo::getExprForFDESymbol(), llvm::AArch64MCAsmInfoDarwin::getExprForPersonalitySymbol(), getGNUBinOpPrecedence(), llvm::AArch64_MachoTargetObjectFile::getIndirectSymViaGOTPCRel(), getRealVLDOpcode(), llvm::AArch64_MachoTargetObjectFile::getTTypeGlobalReference(), llvm::TargetLoweringObjectFile::getTTypeReference(), IsSmallMemAccess(), llvm::MCGenDwarfLabelEntry::Make(), nextReg(), printFPOReg(), printMCExpr(), llvm::FaultMaps::serializeToFaultMapSection(), llvm::StackMaps::serializeToStackMapSection(), smallData(), SwitchSection(), and truncateToSize().
|
inlinevirtual |
Emit the given list Options
of strings as linker options into the output.
Definition at line 449 of file MCStreamer.h.
Referenced by llvm::TargetLoweringObjectFileMachO::emitModuleMetadata().
|
virtual |
Emit a local common (.lcomm) symbol.
Symbol | - The common symbol to emit. |
Size | - The size of the common symbol. |
ByteAlignment | - The alignment of the common symbol in bytes. |
Reimplemented in llvm::MCWinCOFFStreamer, llvm::MCWasmStreamer, and llvm::MCELFStreamer.
Definition at line 1012 of file MCStreamer.cpp.
|
inlinevirtual |
Emit a Linker Optimization Hint (LOH) directive.
Args | - Arguments of the LOH. |
Definition at line 559 of file MCStreamer.h.
References llvm::LCOMM::ByteAlignment, llvm::Data, and Size.
Print T and prefix it with the comment string (normally #) and optionally a tab.
This prints the comment immediately, not at the end of the current line. It is basically a safe version of EmitRawText: since it only prints comments, the object streamer ignores it instead of asserting.
Definition at line 111 of file MCStreamer.cpp.
Referenced by llvm::X86AsmPrinter::EmitInstruction(), and llvm::AVRTargetStreamer::finish().
If this file is backed by a assembly streamer, this dumps the specified string in the output .s file.
This capability is indicated by the hasRawTextSupport() predicate. By default this aborts.
Definition at line 890 of file MCStreamer.cpp.
References EmitRawTextImpl(), and llvm::Twine::toStringRef().
Referenced by llvm::MCTargetStreamer::emitDwarfFileDirective(), llvm::MCTargetStreamer::emitRawBytes(), llvm::MCTargetStreamer::emitValue(), and llvm::NVPTXTargetStreamer::outputDwarfFileDirectives().
|
protectedvirtual |
EmitRawText - If this file is backed by an assembly streamer, this dumps the specified string in the output .s file.
This capability is indicated by the hasRawTextSupport() predicate.
Definition at line 881 of file MCStreamer.cpp.
References llvm::report_fatal_error().
Referenced by EmitRawText().
|
inlinevirtual |
Emit a .reloc directive.
Returns true if the relocation could not be emitted because Name is not known.
Reimplemented in llvm::MCObjectStreamer.
Definition at line 946 of file MCStreamer.h.
Referenced by countMCSymbolRefExpr(), and emitDirectiveRelocJalr().
void MCStreamer::EmitSLEB128IntValue | ( | int64_t | Value | ) |
Special case of EmitSLEB128Value that avoids the client having to pass in a MCExpr for constant integers.
EmitSLEB128IntValue - Special case of EmitSLEB128Value that avoids the client having to pass in a MCExpr for constant integers.
Definition at line 148 of file MCStreamer.cpp.
References EmitBytes(), llvm::encodeSLEB128(), and llvm::raw_svector_ostream::str().
Referenced by llvm::MCObjectStreamer::EmitSLEB128Value().
Reimplemented in llvm::MCObjectStreamer.
Definition at line 1024 of file MCStreamer.cpp.
|
pure virtual |
Add the given Attribute
to Symbol
.
Implemented in llvm::RecordStreamer, llvm::MCWasmStreamer, llvm::MCELFStreamer, and llvm::MCWinCOFFStreamer.
Referenced by emitNonLazySymbolPointer(), llvm::TargetLoweringObjectFileELF::emitPersonalityValue(), llvm::MipsAsmPrinter::EmitStartOfAsmFile(), llvm::AVRTargetStreamer::finish(), isOperator(), and smallData().
Set the DescValue
for the Symbol
.
Symbol | - The symbol to have its n_desc field set. |
DescValue | - The value to set into the n_desc field. |
Reimplemented in llvm::MCWasmStreamer, llvm::MCELFStreamer, and llvm::MCWinCOFFStreamer.
Definition at line 995 of file MCStreamer.cpp.
void MCStreamer::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.
Definition at line 159 of file MCStreamer.cpp.
References assert(), llvm::MCSymbolRefExpr::create(), EmitCOFFSecRel32(), EmitValueImpl(), and getContext().
Referenced by createPPCMCAsmInfo(), llvm::AsmPrinter::XRayFunctionEntry::emit(), emitAbsoluteSymbolDiff(), emitDwarfSetLineAddr(), llvm::CodeViewContext::emitFileChecksumOffset(), EmitGenDwarfAranges(), EmitGenDwarfInfo(), llvm::TargetLoweringObjectFileELF::emitPersonalityValue(), llvm::StackMaps::recordStatepoint(), and llvm::FaultMaps::serializeToFaultMapSection().
|
virtual |
Definition at line 760 of file MCStreamer.cpp.
|
virtual |
Emit a thread local bss (.tbss) symbol.
Section | - The thread local common section. |
Symbol | - The thread local common symbol to emit. |
Size | - The size of the symbol. |
ByteAlignment | - The alignment of the thread local common symbol if non-zero. This must be a power of 2 on some targets. |
Reimplemented in llvm::MCWasmStreamer, llvm::MCELFStreamer, and llvm::MCWinCOFFStreamer.
Definition at line 1014 of file MCStreamer.cpp.
|
virtual |
Note in the output that the specified Func
is a Thumb mode function (ARM target only).
Reimplemented in llvm::MCWasmStreamer, llvm::MCELFStreamer, and llvm::MCWinCOFFStreamer.
Definition at line 994 of file MCStreamer.cpp.
Emit the expression 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.
Reimplemented in llvm::MCObjectStreamer.
Definition at line 182 of file MCStreamer.cpp.
References llvm::report_fatal_error().
Emit the expression 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.
Reimplemented in llvm::MCObjectStreamer.
Definition at line 178 of file MCStreamer.cpp.
References llvm::report_fatal_error().
void MCStreamer::EmitULEB128IntValue | ( | uint64_t | Value | ) |
Special case of EmitULEB128Value that avoids the client having to pass in a MCExpr for constant integers.
EmitULEB128IntValue - Special case of EmitULEB128Value that avoids the client having to pass in a MCExpr for constant integers.
Definition at line 139 of file MCStreamer.cpp.
References EmitBytes(), llvm::encodeULEB128(), and llvm::raw_svector_ostream::str().
Referenced by EmitAbbrev(), llvm::MCObjectStreamer::emitAbsoluteSymbolDiffAsULEB128(), EmitDwarfLineTable(), emitDwarfSetLineAddr(), EmitGenDwarfAbbrev(), EmitGenDwarfInfo(), llvm::WebAssemblyTargetWasmStreamer::emitLocal(), emitOneV5FileEntry(), llvm::MCDwarfLineStr::emitRef(), and llvm::MCObjectStreamer::EmitULEB128Value().
Reimplemented in llvm::MCObjectStreamer.
Definition at line 1023 of file MCStreamer.cpp.
Referenced by emitAbsoluteSymbolDiffAsULEB128().
Definition at line 155 of file MCStreamer.cpp.
References EmitValueImpl().
Referenced by ARM64EmitRuntimeFunction(), ARM64EmitUnwindInfo(), EmitAbsDifference(), emitAbsoluteSymbolDiff(), emitAbsValue(), llvm::AMDGPUTargetELFStreamer::EmitAmdhsaKernelDescriptor(), llvm::ConstantPool::emitEntries(), emitFDESymbol(), EmitGenDwarfAranges(), EmitGenDwarfRanges(), emitNonLazySymbolPointer(), EmitPersonality(), llvm::MCDwarfLineStr::emitRef(), EmitRuntimeFunction(), EmitSymbolRefWithOfs(), EmitUnwindInfo(), llvm::AVRMCELFStreamer::EmitValueForModiferKind(), printFPOReg(), llvm::StackMaps::recordStatepoint(), llvm::FaultMaps::serializeToFaultMapSection(), and smallData().
Emit the expression Value
into the output as a native integer of the given Size
bytes.
This is used to implement assembler directives such as .word, .quad, etc.
Value | - The value to emit. |
Size | - The size of the integer (in bytes) to emit. This must match a native machine width. |
Loc | - The location of the expression for error reporting. |
Reimplemented in llvm::MCObjectStreamer, llvm::MCWasmStreamer, llvm::MCELFStreamer, and llvm::MipsELFStreamer.
Definition at line 1020 of file MCStreamer.cpp.
References visitUsedExpr().
Referenced by llvm::MipsTargetELFStreamer::emitDirectiveEnd(), EmitSymbolValue(), EmitValue(), and llvm::MCObjectStreamer::EmitValueImpl().
|
virtual |
Emit some number of copies of Value
until the byte alignment ByteAlignment
is reached.
If the number of bytes need to emit for the alignment is not a multiple of ValueSize
, then the contents of the emitted fill bytes is undefined.
This used to implement the .align assembler directive.
ByteAlignment | - The alignment to reach. This must be a power of two on some targets. |
Value | - The value to use when filling bytes. |
ValueSize | - The size of the integer (in bytes) to emit for Value . This must match a native machine width. |
MaxBytesToEmit | - The maximum numbers of bytes to emit, or 0. If the alignment cannot be reached in this many bytes, no bytes are emitted. |
Reimplemented in llvm::MCObjectStreamer, llvm::MCWasmStreamer, and llvm::MCELFStreamer.
Definition at line 1028 of file MCStreamer.cpp.
Referenced by ARM64EmitRuntimeFunction(), ARM64EmitUnwindInfo(), createPPCMCAsmInfo(), llvm::TargetLoweringObjectFileELF::emitPersonalityValue(), EmitRuntimeFunction(), llvm::MipsAsmPrinter::EmitStartOfAsmFile(), EmitUnwindInfo(), llvm::MipsTargetELFStreamer::finish(), printFPOReg(), and llvm::StackMaps::recordStatepoint().
|
virtual |
Emit some number of copies of Value
until the byte offset Offset
is reached.
This is used to implement assembler directives such as .org.
Offset | - The offset to reach. This may be an expression, but the expression must be associated with the current section. |
Value | - The value to use when filling bytes. |
Reimplemented in llvm::MCObjectStreamer.
Definition at line 1033 of file MCStreamer.cpp.
Referenced by llvm::MCParserUtils::parseAssignmentExpression().
void MCStreamer::EmitVersionForTarget | ( | const Triple & | Target, |
const VersionTuple & | SDKVersion | ||
) |
Definition at line 1066 of file MCStreamer.cpp.
References EmitVersionMin(), llvm::Triple::getiOSVersion(), llvm::Triple::getMacOSXVersion(), llvm::Triple::getOSMajorVersion(), llvm::Triple::getWatchOSVersion(), llvm::Triple::isMacOSX(), llvm::Triple::isOSBinFormatMachO(), llvm::Triple::isOSDarwin(), llvm::Triple::isTvOS(), llvm::Triple::isWatchOS(), llvm::MCVM_IOSVersionMin, llvm::MCVM_OSXVersionMin, llvm::MCVM_TvOSVersionMin, and llvm::MCVM_WatchOSVersionMin.
|
inlinevirtual |
Specify the Mach-O minimum deployment target version.
Definition at line 455 of file MCStreamer.h.
Referenced by EmitVersionForTarget().
Emit an weak reference from Alias
to Symbol
.
This corresponds to an assembler statement such as: .weakref alias, symbol
Alias | - The alias that is being created. |
Symbol | - The symbol being aliased. |
Reimplemented in llvm::MCObjectStreamer, llvm::MCWasmStreamer, and llvm::MCELFStreamer.
Definition at line 1017 of file MCStreamer.cpp.
Definition at line 795 of file MCStreamer.cpp.
References llvm::Win64EH::Instruction::Alloc(), EmitCFILabel(), EnsureValidWinFrameInfo(), getContext(), llvm::WinEH::FrameInfo::Instructions, and llvm::MCContext::reportError().
Referenced by PrintCFIEscape(), and printConstant().
Definition at line 670 of file MCStreamer.cpp.
References llvm::WinEH::FrameInfo::ChainedParent, EmitCFILabel(), llvm::WinEH::FrameInfo::End, EnsureValidWinFrameInfo(), getContext(), and llvm::MCContext::reportError().
Referenced by PrintCFIEscape().
Definition at line 635 of file MCStreamer.cpp.
References llvm::WinEH::FrameInfo::ChainedParent, EmitCFILabel(), llvm::WinEH::FrameInfo::End, EnsureValidWinFrameInfo(), getContext(), and llvm::MCContext::reportError().
Referenced by PrintCFIEscape().
Definition at line 858 of file MCStreamer.cpp.
References EmitCFILabel(), EnsureValidWinFrameInfo(), and llvm::WinEH::FrameInfo::PrologEnd.
Referenced by PrintCFIEscape(), and printConstant().
This is used on platforms, such as Windows on ARM64, that require function or funclet sizes to be emitted in .xdata before the End marker is emitted for the frame.
We cannot use the End marker, as it is not set at the point of emitting .xdata, in order to indicate that the frame is active.
Definition at line 646 of file MCStreamer.cpp.
References llvm::WinEH::FrameInfo::ChainedParent, EmitCFILabel(), EnsureValidWinFrameInfo(), llvm::WinEH::FrameInfo::FuncletOrFuncEnd, getContext(), and llvm::MCContext::reportError().
Definition at line 844 of file MCStreamer.cpp.
References EmitCFILabel(), EnsureValidWinFrameInfo(), getContext(), llvm::WinEH::FrameInfo::Instructions, llvm::Win64EH::Instruction::PushMachFrame(), and llvm::MCContext::reportError().
Referenced by PrintCFIEscape(), and printConstant().
Definition at line 762 of file MCStreamer.cpp.
References EmitCFILabel(), EnsureValidWinFrameInfo(), llvm::WinEH::FrameInfo::Instructions, and llvm::Win64EH::Instruction::PushNonVol().
Referenced by PrintCFIEscape(), and printConstant().
|
virtual |
Definition at line 812 of file MCStreamer.cpp.
References EmitCFILabel(), EnsureValidWinFrameInfo(), getContext(), llvm::WinEH::FrameInfo::Instructions, llvm::MCContext::reportError(), and llvm::Win64EH::Instruction::SaveNonVol().
Referenced by PrintCFIEscape(), and printConstant().
|
virtual |
Definition at line 829 of file MCStreamer.cpp.
References EmitCFILabel(), EnsureValidWinFrameInfo(), getContext(), llvm::WinEH::FrameInfo::Instructions, llvm::MCContext::reportError(), and llvm::Win64EH::Instruction::SaveXMM().
Referenced by PrintCFIEscape(), and printConstant().
|
virtual |
Definition at line 773 of file MCStreamer.cpp.
References EmitCFILabel(), EnsureValidWinFrameInfo(), getContext(), llvm::WinEH::FrameInfo::Instructions, llvm::WinEH::FrameInfo::LastFrameInst, llvm::MCContext::reportError(), and llvm::Win64EH::Instruction::SetFPReg().
Referenced by PrintCFIEscape(), and printConstant().
Definition at line 657 of file MCStreamer.cpp.
References EmitCFILabel(), EnsureValidWinFrameInfo(), llvm::WinEH::FrameInfo::Function, getCurrentSectionOnly(), and llvm::WinEH::FrameInfo::TextSection.
Referenced by PrintCFIEscape().
Definition at line 618 of file MCStreamer.cpp.
References EmitCFILabel(), llvm::WinEH::FrameInfo::End, llvm::MCContext::getAsmInfo(), getContext(), getCurrentSectionOnly(), llvm::MCContext::reportError(), llvm::WinEH::FrameInfo::TextSection, and llvm::MCAsmInfo::usesWindowsCFI().
Referenced by PrintCFIEscape().
|
protectedvirtual |
Definition at line 895 of file MCStreamer.cpp.
|
virtual |
Definition at line 684 of file MCStreamer.cpp.
References llvm::WinEH::FrameInfo::ChainedParent, EnsureValidWinFrameInfo(), llvm::WinEH::FrameInfo::ExceptionHandler, getContext(), llvm::WinEH::FrameInfo::HandlesExceptions, llvm::WinEH::FrameInfo::HandlesUnwind, and llvm::MCContext::reportError().
Referenced by PrintCFIEscape().
Reimplemented in llvm::MCWinCOFFStreamer.
Definition at line 701 of file MCStreamer.cpp.
References llvm::WinEH::FrameInfo::ChainedParent, EnsureValidWinFrameInfo(), getContext(), and llvm::MCContext::reportError().
Referenced by PrintCFIEscape().
|
pure virtual |
Emit the zerofill section and an optional symbol.
Section | - The zerofill section to create and or to put the symbol |
Symbol | - The zerofill symbol to emit, if non-NULL. |
Size | - The size of the zerofill symbol. |
ByteAlignment | - The alignment of the zerofill symbol if non-zero. This must be a power of 2 on some targets. |
Implemented in llvm::MCWasmStreamer, llvm::MCWinCOFFStreamer, llvm::MCELFStreamer, and llvm::RecordStreamer.
void MCStreamer::EmitZeros | ( | uint64_t | NumBytes | ) |
Emit NumBytes worth of zeros.
The implementation in this class just redirects to emitFill.
This function properly handles data in virtual sections.
Definition at line 201 of file MCStreamer.cpp.
References emitFill().
Referenced by llvm::AsmPrinter::XRayFunctionEntry::emit(), llvm::MCELFStreamer::EmitCommonSymbol(), llvm::MCWinCOFFStreamer::EmitLocalCommonSymbol(), and llvm::HexagonMCELFStreamer::HexagonMCEmitCommonSymbol().
|
virtual |
Marks the end of the symbol definition.
Reimplemented in llvm::MCWinCOFFStreamer.
Definition at line 999 of file MCStreamer.cpp.
References llvm_unreachable.
Definition at line 1054 of file MCStreamer.cpp.
References EmitLabel(), llvm::MCSection::getEndSymbol(), llvm::MCSymbol::isInSection(), and SwitchSection().
Referenced by EmitDwarfLineTable().
WinEH::FrameInfo * MCStreamer::EnsureValidWinFrameInfo | ( | SMLoc | Loc | ) |
Retreive the current frame info if one is available and it is not yet closed.
Otherwise, issue an error and return null.
Definition at line 603 of file MCStreamer.cpp.
References llvm::WinEH::FrameInfo::End, llvm::MCContext::getAsmInfo(), getContext(), llvm::MCContext::reportError(), and llvm::MCAsmInfo::usesWindowsCFI().
Referenced by EmitWinCFIAllocStack(), EmitWinCFIEndChained(), EmitWinCFIEndProc(), EmitWinCFIEndProlog(), EmitWinCFIFuncletOrFuncEnd(), EmitWinCFIPushFrame(), EmitWinCFIPushReg(), EmitWinCFISaveReg(), EmitWinCFISaveXMM(), EmitWinCFISetFrame(), EmitWinCFIStartChained(), EmitWinEHHandler(), and EmitWinEHHandlerData().
void MCStreamer::Finish | ( | ) |
Finish emission of machine code.
Definition at line 898 of file MCStreamer.cpp.
References llvm::MCTargetStreamer::finish(), FinishImpl(), getContext(), getTargetStreamer(), and llvm::MCContext::reportError().
|
virtual |
Streamer specific finalization.
Reimplemented in llvm::MCObjectStreamer, llvm::MCELFStreamer, llvm::MCWasmStreamer, and llvm::MCWinCOFFStreamer.
Definition at line 1037 of file MCStreamer.cpp.
Referenced by Finish().
void MCStreamer::generateCompactUnwindEncodings | ( | MCAsmBackend * | MAB | ) |
Definition at line 116 of file MCStreamer.cpp.
References llvm::MCAsmBackend::generateCompactUnwindEncoding().
Referenced by llvm::MCDwarfFrameEmitter::Emit().
|
inlinevirtual |
Reimplemented in llvm::MCObjectStreamer.
Definition at line 253 of file MCStreamer.h.
Get the .pdata section used for the given section.
Typically the given section is either the main .text section or some other COMDAT .text section, but it may be any section containing code.
Definition at line 748 of file MCStreamer.cpp.
References getContext(), and getWinCFISection().
Referenced by llvm::Win64EH::UnwindEmitter::Emit(), and llvm::Win64EH::ARM64UnwindEmitter::Emit().
Get the .xdata section used for the given section.
Definition at line 754 of file MCStreamer.cpp.
References getContext(), and getWinCFISection().
Referenced by llvm::Win64EH::UnwindEmitter::Emit(), llvm::Win64EH::ARM64UnwindEmitter::Emit(), llvm::Win64EH::UnwindEmitter::EmitUnwindInfo(), and llvm::Win64EH::ARM64UnwindEmitter::EmitUnwindInfo().
|
virtual |
Return a raw_ostream that comments can be written to.
Unlike AddComment, you are required to terminate comments with
if you use this method.
Definition at line 106 of file MCStreamer.cpp.
References llvm::nulls().
|
inline |
Definition at line 251 of file MCStreamer.h.
References Context.
Referenced by llvm::AssemblerConstantPools::addEntry(), llvm::CodeViewContext::addFile(), ARM64EmitRuntimeFunction(), ARM64EmitUnwindInfo(), llvm::BTFDebug::beginInstruction(), llvm::BTFDebug::BTFDebug(), buildSymbolDiff(), llvm::NVPTXTargetStreamer::changeSection(), llvm::MCTargetStreamer::changeSection(), llvm::MCObjectStreamer::changeSectionImpl(), checkCVLocSection(), llvm::CodeViewDebug::CodeViewDebug(), convertFPR32ToFPR64(), createPPCMCAsmInfo(), llvm::MCDwarfLineTableHeader::Emit(), llvm::MCDwarfLineTable::Emit(), llvm::MCDwarfLineAddr::Emit(), llvm::MCGenDwarfInfo::Emit(), llvm::MCDwarfFrameEmitter::Emit(), EmitAbsDifference(), llvm::MCDwarfFrameEmitter::EmitAdvanceLoc(), llvm::AMDGPUTargetELFStreamer::EmitAMDGPUSymbolType(), llvm::AMDGPUTargetELFStreamer::EmitAmdhsaKernelDescriptor(), llvm::MipsELFStreamer::EmitCFIEndProcImpl(), llvm::MipsELFStreamer::EmitCFILabel(), EmitCFIStartProc(), llvm::MipsELFStreamer::EmitCFIStartProcImpl(), llvm::MCWinCOFFStreamer::EmitCOFFImgRel32(), llvm::MCWinCOFFStreamer::EmitCOFFSafeSEH(), llvm::MCWinCOFFStreamer::EmitCOFFSecRel32(), llvm::MCWinCOFFStreamer::EmitCOFFSectionIndex(), llvm::MCELFStreamer::EmitCommonSymbol(), llvm::MCWinCOFFStreamer::EmitCommonSymbol(), llvm::MCObjectStreamer::EmitCVDefRangeDirective(), llvm::MCObjectStreamer::EmitCVFileChecksumOffsetDirective(), llvm::MCObjectStreamer::EmitCVFileChecksumsDirective(), EmitCVFileDirective(), EmitCVFuncIdDirective(), llvm::MCObjectStreamer::EmitCVInlineLinetableDirective(), EmitCVInlineSiteIdDirective(), llvm::MCObjectStreamer::EmitCVLocDirective(), llvm::MCObjectStreamer::EmitCVStringTableDirective(), emitDwarfFile0Directive(), EmitDwarfLineTable(), EmitDwarfLocDirective(), emitFDESymbol(), llvm::CodeViewContext::emitFileChecksumOffset(), llvm::CodeViewContext::emitFileChecksums(), llvm::MCObjectStreamer::emitFill(), emitFill(), EmitGenDwarfAbbrev(), EmitGenDwarfAranges(), EmitGenDwarfInfo(), EmitGenDwarfRanges(), llvm::MCELFStreamer::EmitIdent(), llvm::ARMTargetStreamer::emitInst(), llvm::MipsELFStreamer::EmitInstruction(), EmitLabel(), llvm::CodeViewContext::emitLineTableForFunction(), llvm::MCWinCOFFStreamer::EmitLocalCommonSymbol(), emitNonLazySymbolPointer(), EmitNops(), EmitPersonality(), llvm::NVPTXTargetStreamer::emitRawBytes(), llvm::MCTargetStreamer::emitRawBytes(), llvm::MCDwarfLineStr::emitRef(), llvm::MCObjectStreamer::EmitRelocDirective(), EmitRuntimeFunction(), llvm::MCDwarfLineStr::emitSection(), llvm::CodeViewContext::emitStringTable(), EmitSymbolRefWithOfs(), EmitSymbolValue(), EmitUnwindInfo(), llvm::MCTargetStreamer::emitValue(), llvm::AVRMCELFStreamer::EmitValueForModiferKind(), llvm::MCObjectStreamer::EmitValueImpl(), llvm::MCELFStreamer::EmitWeakReference(), llvm::MCWasmStreamer::EmitWeakReference(), EmitWinCFIAllocStack(), EmitWinCFIEndChained(), EmitWinCFIEndProc(), EmitWinCFIFuncletOrFuncEnd(), EmitWinCFIPushFrame(), EmitWinCFISaveReg(), EmitWinCFISaveXMM(), EmitWinCFISetFrame(), EmitWinCFIStartProc(), EmitWinEHHandler(), EmitWinEHHandlerData(), EnsureValidWinFrameInfo(), llvm::AVRTargetStreamer::finish(), Finish(), llvm::MCWinCOFFStreamer::FinishImpl(), llvm::MCObjectStreamer::FinishImpl(), llvm::MCObjectStreamer::flushPendingLabels(), llvm::RecordStreamer::flushSymverDirectives(), forceExpAbs(), GetAbsDifference(), getAssociatedPDataSection(), getAssociatedXDataSection(), llvm::AMDGPUTargetStreamer::getContext(), getDataAlignmentFactor(), getDwarfLineTableSymbol(), llvm::SparcELFMCAsmInfo::getExprForFDESymbol(), llvm::MCAsmInfo::getExprForFDESymbol(), llvm::AArch64MCAsmInfoDarwin::getExprForPersonalitySymbol(), llvm::SparcELFMCAsmInfo::getExprForPersonalitySymbol(), llvm::X86_64MCAsmInfoDarwin::getExprForPersonalitySymbol(), getRetOpcode(), getSizeForEncoding(), hasUnfinishedDwarfFrameInfo(), llvm::HexagonMCELFStreamer::HexagonMCEmitCommonSymbol(), llvm::MCELFStreamer::InitSections(), llvm::MCWinCOFFStreamer::InitSections(), InitSections(), llvm::MCDwarfLineEntry::Make(), llvm::MCGenDwarfLabelEntry::Make(), llvm::MSP430TargetELFStreamer::MSP430TargetELFStreamer(), nextReg(), printFPOReg(), smallData(), and tryEmitDwarfFileDirective().
|
inline |
Return the current section that the streamer is emitting code to.
Definition at line 341 of file MCStreamer.h.
References llvm::SmallVectorTemplateCommon< T >::back(), and llvm::SmallVectorBase::empty().
Referenced by llvm::MCELFStreamer::EmitCommonSymbol(), and llvm::HexagonMCELFStreamer::HexagonMCEmitCommonSymbol().
|
inline |
Definition at line 346 of file MCStreamer.h.
Referenced by llvm::AssemblerConstantPools::addEntry(), llvm::MCELFStreamer::ChangeSection(), CheckBundleSubtargets(), checkCVLocSection(), llvm::AssemblerConstantPools::clearCacheForCurrentSection(), llvm::MCELFStreamer::EmitBundleLock(), llvm::MCELFStreamer::EmitBundleUnlock(), llvm::MCObjectStreamer::EmitBytes(), llvm::MCWinCOFFStreamer::EmitCOFFSymbolIndex(), llvm::CodeViewContext::emitDefRange(), llvm::MCObjectStreamer::EmitDwarfLocDirective(), llvm::MCObjectStreamer::emitFill(), llvm::AssemblerConstantPools::emitForCurrentSection(), llvm::CodeViewContext::emitInlineLineTableForFunction(), llvm::MCObjectStreamer::EmitInstruction(), llvm::MCELFStreamer::EmitLabel(), EmitLabel(), llvm::MCObjectStreamer::EmitValueImpl(), llvm::MCObjectStreamer::EmitValueToAlignment(), EmitWinCFIStartChained(), EmitWinCFIStartProc(), llvm::MCELFStreamer::FinishImpl(), llvm::MCObjectStreamer::flushPendingLabels(), llvm::MCObjectStreamer::getCurrentFragment(), llvm::MCObjectStreamer::insert(), llvm::MCGenDwarfLabelEntry::Make(), and llvm::MCELFStreamer::MCELFStreamer().
|
inlineprotected |
Definition at line 224 of file MCStreamer.h.
References FuncId, and llvm::String.
|
inline |
Definition at line 271 of file MCStreamer.h.
Referenced by llvm::MCDwarfFrameEmitter::Emit(), llvm::X86AsmPrinter::EmitInstruction(), and llvm::X86AsmInstrumentation::GetFrameRegGeneric().
Definition at line 240 of file MCStreamer.cpp.
References llvm::MCContext::getAsmInfo(), getContext(), llvm::MCDwarfLineTable::getLabel(), llvm::MCContext::getMCDwarfLineTable(), llvm::MCContext::getOrCreateSymbol(), llvm::MCAsmInfo::getPrivateGlobalPrefix(), llvm::cl::Prefix, and llvm::MCDwarfLineTable::setLabel().
Referenced by llvm::MCGenDwarfInfo::Emit(), and printDwarfFileDirective().
|
inline |
Definition at line 270 of file MCStreamer.h.
Referenced by llvm::MCObjectStreamer::EmitFrames(), llvm::X86AsmPrinter::EmitInstruction(), and llvm::X86AsmInstrumentation::GetFrameRegGeneric().
|
inline |
Definition at line 277 of file MCStreamer.h.
|
inline |
Return the previous section that the streamer is emitting code to.
Definition at line 349 of file MCStreamer.h.
References llvm::SmallVectorTemplateCommon< T >::back(), and llvm::SmallVectorBase::empty().
Returns an index to represent the order a symbol was emitted in.
(zero if we did not emit that symbol)
Definition at line 357 of file MCStreamer.h.
References llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::lookup().
|
inline |
Definition at line 258 of file MCStreamer.h.
Referenced by checkScale(), llvm::MipsELFStreamer::createPendingLabelRelocs(), EmitAssignment(), EmitLabel(), llvm::MipsRegInfoRecord::EmitMipsOptionRecord(), Finish(), and printConstant().
|
inline |
Definition at line 256 of file MCStreamer.h.
Referenced by llvm::MCObjectStreamer::getAssemblerPtr().
|
inline |
Definition at line 278 of file MCStreamer.h.
Referenced by llvm::Win64EH::UnwindEmitter::Emit(), and llvm::Win64EH::ARM64UnwindEmitter::Emit().
|
inlinevirtual |
Return true if this asm streamer supports emitting unformatted text to the .s file with EmitRawText.
Definition at line 293 of file MCStreamer.h.
Referenced by makeCombineInst().
bool MCStreamer::hasUnfinishedDwarfFrameInfo | ( | ) |
Definition at line 250 of file MCStreamer.cpp.
References getContext(), and llvm::MCContext::reportError().
Referenced by EmitCFIStartProc().
|
virtual |
Create the default sections and set the initial one.
Reimplemented in llvm::MCWinCOFFStreamer, and llvm::MCELFStreamer.
Definition at line 334 of file MCStreamer.cpp.
References getContext(), and SwitchSection().
|
inlinevirtual |
Is the integrated assembler required for this streamer to function correctly?
Reimplemented in llvm::MCObjectStreamer.
Definition at line 297 of file MCStreamer.h.
|
inlinevirtual |
Return true if this streamer supports verbose assembly and if it is enabled.
Definition at line 289 of file MCStreamer.h.
Referenced by llvm::X86AsmPrinter::EmitInstruction().
Reimplemented in llvm::MCObjectStreamer.
Definition at line 984 of file MCStreamer.h.
References llvm::createAsmStreamer(), and llvm::createNullStreamer().
Referenced by llvm::MCContext::finalizeDwarfSections().
|
delete |
|
inline |
Restore the current and previous section from the section stack.
Calls ChangeSection as needed.
Returns false if the stack was empty.
Definition at line 377 of file MCStreamer.h.
References llvm::SmallVectorTemplateCommon< T >::end(), I, llvm::SmallVectorTemplateBase< T >::pop_back(), and llvm::SmallVectorBase::size().
Referenced by llvm::AMDGPUTargetELFStreamer::EmitAMDKernelCodeT(), llvm::MCWinCOFFStreamer::EmitCommonSymbol(), llvm::MipsTargetELFStreamer::emitDirectiveEnd(), llvm::MCELFStreamer::EmitIdent(), llvm::MCWinCOFFStreamer::EmitLocalCommonSymbol(), llvm::MipsRegInfoRecord::EmitMipsOptionRecord(), llvm::MipsAsmPrinter::EmitStartOfAsmFile(), and makeCombineInst().
|
inline |
Save the current and previous section on the section stack.
Definition at line 368 of file MCStreamer.h.
References llvm::SmallVectorTemplateBase< T >::push_back().
Referenced by llvm::AMDGPUTargetELFStreamer::EmitAMDKernelCodeT(), llvm::MCWinCOFFStreamer::EmitCommonSymbol(), llvm::MipsTargetELFStreamer::emitDirectiveEnd(), llvm::MCELFStreamer::EmitIdent(), llvm::MCWinCOFFStreamer::EmitLocalCommonSymbol(), llvm::MipsRegInfoRecord::EmitMipsOptionRecord(), llvm::MipsAsmPrinter::EmitStartOfAsmFile(), and makeCombineInst().
|
virtual |
State management.
Reimplemented in llvm::MCObjectStreamer, llvm::MCWasmStreamer, llvm::MCWinCOFFStreamer, and llvm::MCELFStreamer.
Definition at line 97 of file MCStreamer.cpp.
References llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::clear(), llvm::SmallVectorImpl< T >::clear(), and llvm::SmallVectorTemplateBase< T, bool >::push_back().
Referenced by llvm::LLVMTargetMachine::addAsmPrinter(), and llvm::MCObjectStreamer::reset().
|
inline |
Definition at line 243 of file MCStreamer.h.
Referenced by llvm::MCTargetStreamer::MCTargetStreamer().
|
inline |
Definition at line 255 of file MCStreamer.h.
Definition at line 392 of file MCStreamer.h.
References llvm::SmallVectorTemplateCommon< T >::back(), llvm::SmallVectorBase::empty(), and llvm::ARMBuildAttrs::Section.
Set the current section where code is being emitted to Section
.
This is required to update CurSection.
This corresponds to assembler directives like .section, .text, etc.
Reimplemented in llvm::MipsELFStreamer.
Definition at line 1040 of file MCStreamer.cpp.
References assert(), llvm::SmallVectorTemplateCommon< T, typename >::back(), ChangeSection(), EmitLabel(), llvm::MCSection::getBeginSymbol(), and llvm::MCSection::hasEnded().
Referenced by llvm::BTFDebug::BTFDebug(), llvm::Win64EH::UnwindEmitter::Emit(), llvm::Win64EH::ARM64UnwindEmitter::Emit(), llvm::MCDwarfDwoLineTable::Emit(), llvm::MCDwarfLineTable::Emit(), llvm::MCGenDwarfInfo::Emit(), llvm::MCDwarfFrameEmitter::Emit(), llvm::MCELFStreamer::EmitCommonSymbol(), llvm::MCWinCOFFStreamer::EmitCommonSymbol(), emitConstantPool(), llvm::MipsTargetELFStreamer::emitDirectiveEnd(), EmitDwarfLineTable(), llvm::MipsAsmPrinter::EmitEndOfAsmFile(), EmitGenDwarfAbbrev(), EmitGenDwarfAranges(), EmitGenDwarfInfo(), EmitGenDwarfRanges(), llvm::MCELFStreamer::EmitIdent(), llvm::MCWinCOFFStreamer::EmitLocalCommonSymbol(), llvm::MipsTargetELFStreamer::emitMipsAbiFlags(), llvm::TargetLoweringObjectFileELF::emitModuleMetadata(), llvm::TargetLoweringObjectFileMachO::emitModuleMetadata(), llvm::TargetLoweringObjectFileCOFF::emitModuleMetadata(), emitNonLazyStubs(), llvm::TargetLoweringObjectFileELF::emitPersonalityValue(), llvm::MCDwarfLineStr::emitSection(), llvm::MipsAsmPrinter::EmitStartOfAsmFile(), llvm::Win64EH::UnwindEmitter::EmitUnwindInfo(), llvm::Win64EH::ARM64UnwindEmitter::EmitUnwindInfo(), endSection(), llvm::MipsTargetELFStreamer::finish(), llvm::HexagonMCELFStreamer::HexagonMCEmitCommonSymbol(), llvm::MCELFStreamer::InitSections(), llvm::MCWinCOFFStreamer::InitSections(), InitSections(), makeCombineInst(), llvm::MSP430TargetELFStreamer::MSP430TargetELFStreamer(), llvm::FaultMaps::serializeToFaultMapSection(), llvm::StackMaps::serializeToStackMapSection(), smallData(), and llvm::MipsELFStreamer::SwitchSection().
|
inline |
Set the current section where code is being emitted to Section
.
This is required to update CurSection. This version does not call ChangeSection.
Definition at line 410 of file MCStreamer.h.
References assert(), llvm::SmallVectorTemplateCommon< T >::back(), and llvm::ARMBuildAttrs::Symbol.
|
virtual |
Associate a filename with a specified logical file number.
Also associate a directory, optional checksum, and optional source text with the logical file. This implements the DWARF2 '.file 4 "dir/foo.c"' assembler directive, and the DWARF5 '.file 4 "dir/foo.c" md5 "..." source "..."' assembler directive.
Definition at line 206 of file MCStreamer.cpp.
References getContext(), and llvm::MCContext::getDwarfFile().
Definition at line 930 of file MCStreamer.cpp.
References llvm::MCExpr::Binary, llvm::MCExpr::Constant, llvm::MCExpr::getKind(), llvm::MCBinaryExpr::getLHS(), llvm::MCBinaryExpr::getRHS(), llvm::object::getSymbol(), llvm::MCExpr::SymbolRef, llvm::MCExpr::Target, llvm::MCExpr::Unary, and visitUsedSymbol().
Referenced by EmitAssignment(), EmitInstruction(), llvm::HexagonMCELFStreamer::EmitSymbol(), EmitValueImpl(), llvm::HexagonMCExpr::visitUsedExpr(), llvm::LanaiMCExpr::visitUsedExpr(), llvm::AVRMCExpr::visitUsedExpr(), llvm::ARMMCExpr::visitUsedExpr(), llvm::RISCVMCExpr::visitUsedExpr(), llvm::MipsMCExpr::visitUsedExpr(), llvm::PPCMCExpr::visitUsedExpr(), llvm::SparcMCExpr::visitUsedExpr(), and llvm::AArch64MCExpr::visitUsedExpr().
Reimplemented in llvm::MCObjectStreamer.
Definition at line 927 of file MCStreamer.cpp.
Referenced by visitUsedExpr().