|
LLVM
4.0.0
|
Streaming machine code generation interface. More...
#include <MCStreamer.h>
Public Member Functions | |
| 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 |
| MCTargetStreamer * | getTargetStreamer () |
| unsigned | getNumFrameInfos () |
| ArrayRef< MCDwarfFrameInfo > | getDwarfFrameInfos () const |
| bool | hasUnfinishedDwarfFrameInfo () |
| unsigned | getNumWinFrameInfos () |
| ArrayRef< 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... | |
| virtual unsigned | EmitDwarfFileDirective (unsigned FileNo, StringRef Directory, StringRef Filename, unsigned CUID=0) |
| Associate a filename with a specified logical file number. More... | |
| 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) |
| Associate a filename with a specified logical file number. 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 | emitAbsoluteSymbolDiff (const MCSymbol *Hi, const MCSymbol *Lo, unsigned Size) |
| Emit the absolute difference between two symbols. More... | |
| virtual MCSymbol * | getDwarfLineTableSymbol (unsigned CUID) |
| virtual void | EmitCFISections (bool EH, bool Debug) |
| void | EmitCFIStartProc (bool IsSimple) |
| 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 | 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 | EmitWinCFIStartProc (const MCSymbol *Symbol) |
| virtual void | EmitWinCFIEndProc () |
| virtual void | EmitWinCFIStartChained () |
| virtual void | EmitWinCFIEndChained () |
| virtual void | EmitWinCFIPushReg (unsigned Register) |
| virtual void | EmitWinCFISetFrame (unsigned Register, unsigned Offset) |
| virtual void | EmitWinCFIAllocStack (unsigned Size) |
| virtual void | EmitWinCFISaveReg (unsigned Register, unsigned Offset) |
| virtual void | EmitWinCFISaveXMM (unsigned Register, unsigned Offset) |
| virtual void | EmitWinCFIPushFrame (bool Code) |
| virtual void | EmitWinCFIEndProlog () |
| virtual void | EmitWinEHHandler (const MCSymbol *Sym, bool Unwind, bool Except) |
| virtual void | EmitWinEHHandlerData () |
| 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) |
| Emit a .reloc directive. More... | |
| virtual void | EmitInstruction (const MCInst &Inst, const MCSubtargetInfo &STI) |
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) |
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, unsigned Major, unsigned Minor, unsigned Update) |
| Specify the MachO minimum deployment target version. More... | |
| 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 | 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 | emitELFSize (MCSymbol *Symbol, const MCExpr *Value) |
| Emit an ELF .size 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)=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, unsigned Padding=0) |
| 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... | |
| virtual 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 (uint64_t NumValues, int64_t Size, int64_t Expr) |
Emit NumValues copies of Size bytes. More... | |
| virtual void | emitFill (const MCExpr &NumValues, int64_t Size, int64_t Expr, SMLoc Loc=SMLoc()) |
| 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... | |
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... | |
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 161 of file MCStreamer.h.
|
protected |
Definition at line 46 of file MCStreamer.cpp.
References llvm::SmallVectorTemplateBase< T, isPodLike >::push_back().
|
virtual |
Definition at line 51 of file MCStreamer.cpp.
References getNumWinFrameInfos(), and i.
|
inlinevirtual |
AddBlankLine - Emit a blank line to a .s file to pretty it up.
Definition at line 289 of file MCStreamer.h.
Referenced by llvm::TargetLoweringObjectFileMachO::emitModuleFlags(), 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 269 of file MCStreamer.h.
Referenced by llvm::X86AsmPrinter::EmitInstruction(), llvm::CodeViewContext::emitLineTableForFunction(), and llvm::CodeViewDebug::endModule().
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 74 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 284 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::MCELFStreamer, and llvm::MCWinCOFFStreamer.
Definition at line 795 of file MCStreamer.cpp.
Update streamer for a new active section.
This is called by PopSection and SwitchSection, if the current section changes.
Reimplemented in llvm::MCObjectStreamer, and llvm::MCELFStreamer.
Definition at line 805 of file MCStreamer.cpp.
Referenced by PopSection(), and SwitchSection().
|
virtual |
Emit the absolute difference between two symbols.
Hi is greater than the offset Lo. Reimplemented in llvm::MCObjectStreamer.
Definition at line 773 of file MCStreamer.cpp.
References Context, llvm::MCSymbolRefExpr::create(), llvm::MCBinaryExpr::createSub(), llvm::MCAsmInfo::doesSetDirectiveSuppressReloc(), EmitAssignment(), EmitSymbolValue(), and EmitValue().
Referenced by llvm::MCObjectStreamer::emitAbsoluteSymbolDiff().
|
virtual |
Note in the output the specified Flag.
Reimplemented in llvm::MCELFStreamer, and llvm::MCWinCOFFStreamer.
Definition at line 792 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 722 of file MCStreamer.cpp.
References llvm::MCTargetStreamer::emitAssignment(), getTargetStreamer(), llvm::MCSymbol::setVariableValue(), fuzzer::TS, and visitUsedExpr().
Referenced by emitAbsoluteSymbolDiff(), llvm::RecordStreamer::EmitAssignment(), llvm::MCObjectStreamer::EmitAssignment(), forceExpAbs(), 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 808 of file MCStreamer.cpp.
References EmitBytes().
|
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 824 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 825 of file MCStreamer.cpp.
|
virtual |
Ends a bundle-locked group.
Reimplemented in llvm::MCObjectStreamer, and llvm::MCELFStreamer.
Definition at line 827 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 807 of file MCStreamer.cpp.
Referenced by llvm::MCDwarfLineTableHeader::Emit(), llvm::AsmPrinter::XRayFunctionEntry::emit(), llvm::MCDwarfLineAddr::Emit(), llvm::AMDGPUTargetELFStreamer::EmitAMDKernelCodeT(), EmitBinaryData(), EmitGenDwarfInfo(), EmitIntValue(), llvm::TargetLoweringObjectFileCOFF::emitModuleFlags(), EmitNop(), emitNullTerminatedSymbolName(), EmitSLEB128IntValue(), and EmitULEB128IntValue().
|
virtual |
Definition at line 372 of file MCStreamer.cpp.
References llvm::MCCFIInstruction::createAdjustCfaOffset(), and llvm::MCDwarfFrameInfo::Instructions.
Referenced by llvm::X86AsmPrinter::EmitInstruction().
|
virtual |
Definition at line 355 of file MCStreamer.cpp.
References llvm::MCCFIInstruction::createDefCfa(), llvm::MCDwarfFrameInfo::CurrentCfaRegister, llvm::MCDwarfFrameInfo::Instructions, and Register.
|
virtual |
Definition at line 364 of file MCStreamer.cpp.
References llvm::MCCFIInstruction::createDefCfaOffset(), and llvm::MCDwarfFrameInfo::Instructions.
|
virtual |
Definition at line 380 of file MCStreamer.cpp.
References llvm::MCCFIInstruction::createDefCfaRegister(), llvm::MCDwarfFrameInfo::CurrentCfaRegister, llvm::MCDwarfFrameInfo::Instructions, and Register.
| void MCStreamer::EmitCFIEndProc | ( | ) |
Definition at line 332 of file MCStreamer.cpp.
References EmitCFIEndProcImpl().
|
protectedvirtual |
Definition at line 338 of file MCStreamer.cpp.
References llvm::MCDwarfFrameInfo::End.
Referenced by EmitCFIEndProc().
|
virtual |
Definition at line 451 of file MCStreamer.cpp.
References llvm::MCCFIInstruction::createEscape(), and llvm::MCDwarfFrameInfo::Instructions.
|
virtual |
Definition at line 458 of file MCStreamer.cpp.
References llvm::MCCFIInstruction::createGnuArgsSize(), and llvm::MCDwarfFrameInfo::Instructions.
Definition at line 413 of file MCStreamer.cpp.
References llvm::MCDwarfFrameInfo::Lsda, and llvm::MCDwarfFrameInfo::LsdaEncoding.
|
virtual |
Definition at line 389 of file MCStreamer.cpp.
References llvm::MCCFIInstruction::createOffset(), and llvm::MCDwarfFrameInfo::Instructions.
Definition at line 405 of file MCStreamer.cpp.
References llvm::MCDwarfFrameInfo::Personality, and llvm::MCDwarfFrameInfo::PersonalityEncoding.
|
virtual |
Definition at line 480 of file MCStreamer.cpp.
References llvm::MCCFIInstruction::createRegister(), and llvm::MCDwarfFrameInfo::Instructions.
|
virtual |
Definition at line 397 of file MCStreamer.cpp.
References llvm::MCCFIInstruction::createRelOffset(), and llvm::MCDwarfFrameInfo::Instructions.
|
virtual |
Definition at line 420 of file MCStreamer.cpp.
References llvm::MCCFIInstruction::createRememberState(), and llvm::MCDwarfFrameInfo::Instructions.
|
virtual |
Definition at line 443 of file MCStreamer.cpp.
References llvm::MCCFIInstruction::createRestore(), and llvm::MCDwarfFrameInfo::Instructions.
|
virtual |
Definition at line 427 of file MCStreamer.cpp.
References llvm::MCCFIInstruction::createRestoreState(), and llvm::MCDwarfFrameInfo::Instructions.
|
virtual |
Definition at line 435 of file MCStreamer.cpp.
References llvm::MCCFIInstruction::createSameValue(), and llvm::MCDwarfFrameInfo::Instructions.
Reimplemented in llvm::MCObjectStreamer.
Definition at line 304 of file MCStreamer.cpp.
References assert().
Referenced by llvm::MCObjectStreamer::EmitCFISections().
|
virtual |
Definition at line 466 of file MCStreamer.cpp.
References llvm::MCDwarfFrameInfo::IsSignalFrame.
| void MCStreamer::EmitCFIStartProc | ( | bool | IsSimple | ) |
Definition at line 308 of file MCStreamer.cpp.
References Context, llvm::MCDwarfFrameInfo::CurrentCfaRegister, EmitCFIStartProcImpl(), llvm::MCAsmInfo::getInitialFrameState(), hasUnfinishedDwarfFrameInfo(), llvm::MCDwarfFrameInfo::IsSimple, llvm::MCCFIInstruction::OpDefCfa, llvm::MCCFIInstruction::OpDefCfaRegister, and llvm::report_fatal_error().
|
protectedvirtual |
Definition at line 329 of file MCStreamer.cpp.
Referenced by EmitCFIStartProc().
|
virtual |
Definition at line 472 of file MCStreamer.cpp.
References llvm::MCCFIInstruction::createUndefined(), and llvm::MCDwarfFrameInfo::Instructions.
|
virtual |
Definition at line 488 of file MCStreamer.cpp.
References llvm::MCCFIInstruction::createWindowSave(), and llvm::MCDwarfFrameInfo::Instructions.
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 820 of file MCStreamer.cpp.
Referenced by llvm::ConstantPool::emitEntries(), llvm::MipsTargetELFStreamer::finish(), and smallData().
Reimplemented in llvm::MCWinCOFFStreamer.
Definition at line 686 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 692 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 689 of file MCStreamer.cpp.
Referenced by llvm::CodeViewContext::emitLineTableForFunction().
|
virtual |
Emit the storage class of the symbol.
| StorageClass | - The storage class the symbol should have. |
Reimplemented in llvm::MCELFStreamer, and llvm::MCWinCOFFStreamer.
Definition at line 798 of file MCStreamer.cpp.
|
virtual |
Emit the type of the symbol.
Reimplemented in llvm::MCELFStreamer, and llvm::MCWinCOFFStreamer.
Definition at line 799 of file MCStreamer.cpp.
|
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::MCELFStreamer, and llvm::RecordStreamer.
|
virtual |
This implements the CodeView '.cv_def_range' assembler directive.
Reimplemented in llvm::MCObjectStreamer.
Definition at line 272 of file MCStreamer.cpp.
Referenced by llvm::MCObjectStreamer::EmitCVDefRangeDirective().
|
inlinevirtual |
This implements the CodeView '.cv_filechecksums' assembler directive.
Reimplemented in llvm::MCObjectStreamer.
Definition at line 760 of file MCStreamer.h.
Referenced by llvm::CodeViewDebug::endModule().
Associate a filename with a specified logical file number.
This implements the '.cv_file 4 "foo.c"' assembler directive. Returns true on success.
Definition at line 219 of file MCStreamer.cpp.
References llvm::CodeViewContext::addFile(), getContext(), and llvm::MCContext::getCVContext().
Introduces a function id for use with .cv_loc.
Definition at line 223 of file MCStreamer.cpp.
References getContext(), llvm::MCContext::getCVContext(), and llvm::CodeViewContext::recordFunctionId().
Referenced by llvm::CodeViewDebug::beginFunction().
|
virtual |
This implements the CodeView '.cv_inline_linetable' assembler directive.
Reimplemented in llvm::MCObjectStreamer.
Definition at line 266 of file MCStreamer.cpp.
Referenced by llvm::MCObjectStreamer::EmitCVInlineLinetableDirective().
|
virtual |
Introduces an inline call site id for use with .cv_loc.
Includes extra information for inline line table generation.
Definition at line 227 of file MCStreamer.cpp.
References getContext(), llvm::MCContext::getCVContext(), llvm::CodeViewContext::recordInlinedCallSiteId(), and llvm::MCContext::reportError().
|
virtual |
This implements the CodeView '.cv_linetable' assembler directive.
Reimplemented in llvm::MCObjectStreamer.
Definition at line 262 of file MCStreamer.cpp.
Referenced by llvm::MCObjectStreamer::EmitCVLinetableDirective().
|
virtual |
This implements the CodeView '.cv_loc' assembler directive.
Reimplemented in llvm::MCObjectStreamer.
Definition at line 241 of file MCStreamer.cpp.
References getContext(), getCurrentSectionOnly(), llvm::MCContext::getCVContext(), llvm::CodeViewContext::getCVFunctionInfo(), llvm::MCContext::reportError(), llvm::MCCVFunctionInfo::Section, and llvm::CodeViewContext::setCurrentCVLoc().
Referenced by llvm::MCObjectStreamer::EmitCVLocDirective().
|
inlinevirtual |
This implements the CodeView '.cv_stringtable' assembler directive.
Reimplemented in llvm::MCObjectStreamer.
Definition at line 757 of file MCStreamer.h.
Referenced by llvm::CodeViewDebug::endModule().
|
inlinevirtual |
Note in the output the specified region Kind.
Definition at line 408 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 135 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 131 of file MCStreamer.cpp.
References llvm::report_fatal_error().
Referenced by llvm::MipsAsmPrinter::EmitDebugValue().
|
virtual |
Associate a filename with a specified logical file number.
This implements the DWARF2 '.file 4 "foo.c"' assembler directive.
Definition at line 177 of file MCStreamer.cpp.
References getContext(), and llvm::MCContext::getDwarfFile().
|
virtual |
This implements the DWARF2 '.loc fileno lineno ...' assembler directive.
Reimplemented in llvm::MCObjectStreamer.
Definition at line 183 of file MCStreamer.cpp.
References getContext(), and llvm::MCContext::setCurrentDwarfLoc().
Referenced by llvm::MCObjectStreamer::EmitDwarfLocDirective().
Definition at line 276 of file MCStreamer.cpp.
Emit an ELF .size directive.
This corresponds to an assembler statement such as: .size symbol, expression
Reimplemented in llvm::MCELFStreamer.
Definition at line 800 of file MCStreamer.cpp.
Referenced by llvm::TargetLoweringObjectFileELF::emitPersonalityValue().
|
virtual |
Emit added explicit comments.
Definition at line 75 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::MCELFStreamer, and llvm::MCWinCOFFStreamer.
Definition at line 797 of file MCStreamer.cpp.
|
virtual |
Emit NumBytes bytes worth of the value specified by FillValue.
This implements directives such as '.space'.
Reimplemented in llvm::MCObjectStreamer.
Definition at line 157 of file MCStreamer.cpp.
References EmitIntValue(), and i.
Referenced by llvm::MCObjectStreamer::emitFill(), EmitGenDwarfRanges(), and EmitZeros().
|
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 814 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. |
Definition at line 162 of file MCStreamer.cpp.
References EmitIntValue(), and i.
|
virtual |
Reimplemented in llvm::MCObjectStreamer.
Definition at line 815 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 151 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 147 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::MCELFStreamer, and llvm::MCWinCOFFStreamer.
Definition at line 702 of file MCStreamer.h.
|
virtual |
Emit the given Instruction into the current section.
Reimplemented in llvm::MCObjectStreamer, llvm::MipsELFStreamer, llvm::RecordStreamer, and llvm::HexagonMCELFStreamer.
Definition at line 765 of file MCStreamer.cpp.
References llvm::MCOperand::getExpr(), llvm::MCInst::getNumOperands(), llvm::MCInst::getOperand(), i, llvm::MCOperand::isExpr(), and visitUsedExpr().
Referenced by EmitBinary(), EmitCall(), llvm::MipsTargetStreamer::emitII(), llvm::RecordStreamer::EmitInstruction(), llvm::X86AsmInstrumentation::EmitInstruction(), llvm::MCObjectStreamer::EmitInstruction(), llvm::X86AsmPrinter::EmitInstruction(), EmitNop(), llvm::MipsTargetStreamer::emitR(), llvm::MipsTargetStreamer::emitRRX(), llvm::MipsTargetStreamer::emitRX(), EmitSETHI(), and llvm::AsmPrinter::EmitToStreamer().
|
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.
Definition at line 85 of file MCStreamer.cpp.
References assert(), Context, EmitBytes(), i, llvm::isIntN(), llvm::isLittleEndian(), and llvm::isUIntN().
Referenced by llvm::MCDwarfLineTableHeader::Emit(), llvm::MCObjectStreamer::emitAbsoluteSymbolDiff(), llvm::MipsTargetELFStreamer::emitDirectiveEnd(), llvm::AMDGPUTargetELFStreamer::EmitDirectiveHSACodeObjectISA(), llvm::AMDGPUTargetELFStreamer::EmitDirectiveHSACodeObjectVersion(), EmitDwarfLineTable(), emitDwarfSetLineAddr(), emitEncodingByte(), llvm::WebAssemblyTargetELFStreamer::emitEndFunc(), llvm::CodeViewContext::emitFileChecksums(), emitFill(), EmitGenDwarfAbbrev(), EmitGenDwarfAranges(), EmitGenDwarfInfo(), EmitGenDwarfRanges(), llvm::MCELFStreamer::EmitIdent(), llvm::CodeViewContext::emitLineTableForFunction(), llvm::WebAssemblyTargetELFStreamer::emitLocal(), llvm::MipsRegInfoRecord::EmitMipsOptionRecord(), llvm::TargetLoweringObjectFileMachO::emitModuleFlags(), emitNonLazySymbolPointer(), llvm::CodeViewContext::emitStringTable(), EmitUnwindCode(), EmitUnwindInfo(), llvm::MCObjectStreamer::EmitValueImpl(), llvm::operator<<(), llvm::FaultMaps::serializeToFaultMapSection(), and smallData().
|
virtual |
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::MipsELFStreamer, llvm::MCELFStreamer, llvm::MCWinCOFFStreamer, and llvm::RecordStreamer.
Definition at line 293 of file MCStreamer.cpp.
References assert(), llvm::MCTargetStreamer::emitLabel(), getCurrentSectionOnly(), llvm::MCSymbol::getFragment(), getTargetStreamer(), llvm::MCSymbol::isVariable(), llvm::MCSymbol::setFragment(), and fuzzer::TS.
Referenced by llvm::MCDwarfLineTableHeader::Emit(), llvm::MCDwarfDwoLineTable::Emit(), llvm::MCGenDwarfInfo::Emit(), llvm::MipsTargetELFStreamer::emitDirectiveEnd(), llvm::ConstantPool::emitEntries(), llvm::MipsAsmPrinter::EmitFunctionEntryLabel(), EmitGenDwarfInfo(), llvm::X86AsmPrinter::EmitInstruction(), llvm::MipsAsmPrinter::EmitInstruction(), llvm::RecordStreamer::EmitLabel(), llvm::MCObjectStreamer::EmitLabel(), llvm::TargetLoweringObjectFileMachO::emitModuleFlags(), emitNonLazySymbolPointer(), llvm::TargetLoweringObjectFileELF::emitPersonalityValue(), EmitUnwindInfo(), endSection(), llvm::MCAsmInfo::getExprForFDESymbol(), llvm::AArch64MCAsmInfoDarwin::getExprForPersonalitySymbol(), llvm::AArch64_MachoTargetObjectFile::getIndirectSymViaGOTPCRel(), llvm::AArch64_MachoTargetObjectFile::getTTypeGlobalReference(), llvm::TargetLoweringObjectFile::getTTypeReference(), llvm::MCGenDwarfLabelEntry::Make(), llvm::FaultMaps::serializeToFaultMapSection(), llvm::StackMaps::serializeToStackMapSection(), smallData(), and SwitchSection().
|
inlinevirtual |
Emit the given list Options of strings as linker options into the output.
Definition at line 405 of file MCStreamer.h.
Referenced by llvm::TargetLoweringObjectFileMachO::emitModuleFlags().
|
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::MCELFStreamer, and llvm::MCWinCOFFStreamer.
Definition at line 801 of file MCStreamer.cpp.
|
inlinevirtual |
Emit a Linker Optimization Hint (LOH) directive.
| Args | - Arguments of the LOH. |
Definition at line 488 of file MCStreamer.h.
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 72 of file MCStreamer.cpp.
Referenced by llvm::X86AsmPrinter::EmitInstruction().
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 703 of file MCStreamer.cpp.
References EmitRawTextImpl(), and llvm::Twine::toStringRef().
|
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 697 of file MCStreamer.cpp.
References llvm::errs().
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 819 of file MCStreamer.h.
| void MCStreamer::EmitSLEB128IntValue | ( | int64_t | Value | ) |
Special case of EmitSLEB128Value that avoids the client having to pass in a MCExpr for constant integers.
EmitSLEB128Value - Special case of EmitSLEB128Value that avoids the client having to pass in a MCExpr for constant integers.
Definition at line 109 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 813 of file MCStreamer.cpp.
|
pure virtual |
Add the given Attribute to Symbol.
Implemented in llvm::MCELFStreamer, llvm::MCWinCOFFStreamer, and llvm::RecordStreamer.
Referenced by emitNonLazySymbolPointer(), llvm::TargetLoweringObjectFileELF::emitPersonalityValue(), 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::MCELFStreamer, and llvm::MCWinCOFFStreamer.
Definition at line 794 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 120 of file MCStreamer.cpp.
References assert(), llvm::MCSymbolRefExpr::create(), EmitCOFFSecRel32(), EmitValueImpl(), and getContext().
Referenced by llvm::AsmPrinter::XRayFunctionEntry::emit(), emitAbsoluteSymbolDiff(), emitDwarfSetLineAddr(), EmitGenDwarfAranges(), EmitGenDwarfInfo(), and llvm::TargetLoweringObjectFileELF::emitPersonalityValue().
|
virtual |
Definition at line 602 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::MCELFStreamer, and llvm::MCWinCOFFStreamer.
Definition at line 803 of file MCStreamer.cpp.
|
virtual |
Note in the output that the specified Func is a Thumb mode function (ARM target only).
Reimplemented in llvm::MCELFStreamer, and llvm::MCWinCOFFStreamer.
Definition at line 793 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 143 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 139 of file MCStreamer.cpp.
References llvm::report_fatal_error().
| void MCStreamer::EmitULEB128IntValue | ( | uint64_t | Value, |
| unsigned | Padding = 0 |
||
| ) |
Special case of EmitULEB128Value that avoids the client having to pass in a MCExpr for constant integers.
EmitULEB128Value - Special case of EmitULEB128Value that avoids the client having to pass in a MCExpr for constant integers.
Definition at line 100 of file MCStreamer.cpp.
References EmitBytes(), llvm::encodeULEB128(), and llvm::raw_svector_ostream::str().
Referenced by llvm::MCDwarfLineTableHeader::Emit(), EmitAbbrev(), EmitDwarfLineTable(), emitDwarfSetLineAddr(), EmitGenDwarfAbbrev(), EmitGenDwarfInfo(), llvm::WebAssemblyTargetELFStreamer::emitLocal(), and llvm::MCObjectStreamer::EmitULEB128Value().
Reimplemented in llvm::MCObjectStreamer.
Definition at line 812 of file MCStreamer.cpp.
Definition at line 116 of file MCStreamer.cpp.
References EmitValueImpl().
Referenced by EmitAbsDifference(), emitAbsoluteSymbolDiff(), emitAbsValue(), llvm::ConstantPool::emitEntries(), emitFDESymbol(), EmitGenDwarfAranges(), EmitGenDwarfInfo(), EmitGenDwarfRanges(), emitNonLazySymbolPointer(), EmitPersonality(), EmitRuntimeFunction(), EmitSymbolRefWithOfs(), EmitUnwindInfo(), 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::MCELFStreamer, and llvm::MipsELFStreamer.
Definition at line 809 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, and llvm::MCELFStreamer.
Definition at line 817 of file MCStreamer.cpp.
Referenced by llvm::TargetLoweringObjectFileELF::emitPersonalityValue(), EmitRuntimeFunction(), EmitUnwindInfo(), and llvm::MipsTargetELFStreamer::finish().
|
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 822 of file MCStreamer.cpp.
Referenced by llvm::MCParserUtils::parseAssignmentExpression().
|
inlinevirtual |
Specify the MachO minimum deployment target version.
Definition at line 411 of file MCStreamer.h.
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, and llvm::MCELFStreamer.
Definition at line 806 of file MCStreamer.cpp.
|
virtual |
Definition at line 630 of file MCStreamer.cpp.
References llvm::Win64EH::Instruction::Alloc(), llvm::WinEH::FrameInfo::Instructions, and llvm::report_fatal_error().
Referenced by llvm::X86AsmPrinter::EmitInstruction().
|
virtual |
Definition at line 538 of file MCStreamer.cpp.
References llvm::WinEH::FrameInfo::ChainedParent, llvm::WinEH::FrameInfo::End, and llvm::report_fatal_error().
|
virtual |
Definition at line 518 of file MCStreamer.cpp.
References llvm::WinEH::FrameInfo::ChainedParent, llvm::WinEH::FrameInfo::End, and llvm::report_fatal_error().
|
virtual |
Definition at line 678 of file MCStreamer.cpp.
References llvm::WinEH::FrameInfo::PrologEnd.
Referenced by llvm::X86AsmPrinter::EmitInstruction().
|
virtual |
Definition at line 667 of file MCStreamer.cpp.
References llvm::WinEH::FrameInfo::Instructions, llvm::Win64EH::Instruction::PushMachFrame(), and llvm::report_fatal_error().
Referenced by llvm::X86AsmPrinter::EmitInstruction().
|
virtual |
Definition at line 604 of file MCStreamer.cpp.
References llvm::WinEH::FrameInfo::Instructions, and llvm::Win64EH::Instruction::PushNonVol().
Referenced by llvm::X86AsmPrinter::EmitInstruction().
Definition at line 643 of file MCStreamer.cpp.
References llvm::WinEH::FrameInfo::Instructions, llvm::report_fatal_error(), and llvm::Win64EH::Instruction::SaveNonVol().
Referenced by llvm::X86AsmPrinter::EmitInstruction().
Definition at line 655 of file MCStreamer.cpp.
References llvm::WinEH::FrameInfo::Instructions, llvm::report_fatal_error(), and llvm::Win64EH::Instruction::SaveXMM().
Referenced by llvm::X86AsmPrinter::EmitInstruction().
Definition at line 613 of file MCStreamer.cpp.
References llvm::WinEH::FrameInfo::Instructions, llvm::WinEH::FrameInfo::LastFrameInst, llvm::report_fatal_error(), and llvm::Win64EH::Instruction::SetFPReg().
Referenced by llvm::X86AsmPrinter::EmitInstruction().
|
virtual |
Definition at line 527 of file MCStreamer.cpp.
References llvm::WinEH::FrameInfo::Function, getCurrentSectionOnly(), and llvm::WinEH::FrameInfo::TextSection.
Definition at line 504 of file MCStreamer.cpp.
References Context, llvm::WinEH::FrameInfo::End, getCurrentSectionOnly(), llvm::report_fatal_error(), llvm::WinEH::FrameInfo::TextSection, and llvm::MCAsmInfo::usesWindowsCFI().
|
protectedvirtual |
Definition at line 708 of file MCStreamer.cpp.
Definition at line 550 of file MCStreamer.cpp.
References llvm::WinEH::FrameInfo::ChainedParent, llvm::WinEH::FrameInfo::ExceptionHandler, llvm::WinEH::FrameInfo::HandlesExceptions, llvm::WinEH::FrameInfo::HandlesUnwind, and llvm::report_fatal_error().
|
virtual |
Reimplemented in llvm::MCWinCOFFStreamer.
Definition at line 564 of file MCStreamer.cpp.
References llvm::WinEH::FrameInfo::ChainedParent, and llvm::report_fatal_error().
|
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::MCELFStreamer, llvm::MCWinCOFFStreamer, 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 173 of file MCStreamer.cpp.
References emitFill().
Referenced by llvm::AsmPrinter::XRayFunctionEntry::emit(), llvm::MCELFStreamer::EmitCommonSymbol(), and llvm::HexagonMCELFStreamer::HexagonMCEmitCommonSymbol().
|
virtual |
Marks the end of the symbol definition.
Reimplemented in llvm::MCELFStreamer, and llvm::MCWinCOFFStreamer.
Definition at line 796 of file MCStreamer.cpp.
Definition at line 843 of file MCStreamer.cpp.
References Context, EmitLabel(), llvm::MCSection::getEndSymbol(), llvm::MCSymbol::isInSection(), and SwitchSection().
Referenced by EmitDwarfLineTable().
| void MCStreamer::Finish | ( | ) |
Finish emission of machine code.
Definition at line 711 of file MCStreamer.cpp.
References llvm::MCTargetStreamer::finish(), FinishImpl(), getTargetStreamer(), llvm::report_fatal_error(), and fuzzer::TS.
|
virtual |
Streamer specific finalization.
Reimplemented in llvm::MCObjectStreamer, llvm::MCELFStreamer, and llvm::MCWinCOFFStreamer.
Definition at line 826 of file MCStreamer.cpp.
Referenced by Finish().
| void MCStreamer::generateCompactUnwindEncodings | ( | MCAsmBackend * | MAB | ) |
Definition at line 77 of file MCStreamer.cpp.
References llvm::MCAsmBackend::generateCompactUnwindEncoding().
Referenced by llvm::MCDwarfFrameEmitter::Emit().
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 590 of file MCStreamer.cpp.
References getContext(), and getWinCFISection().
Referenced by llvm::Win64EH::UnwindEmitter::Emit().
Get the .xdata section used for the given section.
Definition at line 596 of file MCStreamer.cpp.
References getContext(), and getWinCFISection().
Referenced by llvm::Win64EH::UnwindEmitter::Emit(), and llvm::Win64EH::UnwindEmitter::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 67 of file MCStreamer.cpp.
References llvm::nulls().
|
inline |
Definition at line 221 of file MCStreamer.h.
Referenced by llvm::AssemblerConstantPools::addEntry(), buildSymbolDiff(), llvm::MCELFStreamer::ChangeSection(), llvm::MCDwarfLineTableHeader::Emit(), llvm::MCDwarfLineTable::Emit(), llvm::MCDwarfLineAddr::Emit(), llvm::MCGenDwarfInfo::Emit(), llvm::MCDwarfFrameEmitter::Emit(), EmitAbsDifference(), llvm::MCDwarfFrameEmitter::EmitAdvanceLoc(), llvm::AMDGPUTargetELFStreamer::EmitAMDGPUHsaModuleScopeGlobal(), llvm::AMDGPUTargetELFStreamer::EmitAMDGPUHsaProgramScopeGlobal(), llvm::AMDGPUTargetELFStreamer::EmitAMDGPUSymbolType(), llvm::MCWinCOFFStreamer::EmitCOFFSafeSEH(), llvm::MCWinCOFFStreamer::EmitCOFFSecRel32(), llvm::MCWinCOFFStreamer::EmitCOFFSectionIndex(), llvm::MCELFStreamer::EmitCommonSymbol(), llvm::MCWinCOFFStreamer::EmitCommonSymbol(), llvm::MCObjectStreamer::EmitCVDefRangeDirective(), llvm::MCObjectStreamer::EmitCVFileChecksumsDirective(), EmitCVFileDirective(), EmitCVFuncIdDirective(), llvm::MCObjectStreamer::EmitCVInlineLinetableDirective(), EmitCVInlineSiteIdDirective(), llvm::MCObjectStreamer::EmitCVLinetableDirective(), EmitCVLocDirective(), llvm::MCObjectStreamer::EmitCVStringTableDirective(), EmitDwarfFileDirective(), EmitDwarfLineTable(), EmitDwarfLocDirective(), emitFDESymbol(), llvm::CodeViewContext::emitFileChecksums(), llvm::MCObjectStreamer::emitFill(), EmitGenDwarfAbbrev(), EmitGenDwarfAranges(), EmitGenDwarfInfo(), EmitGenDwarfRanges(), llvm::HexagonMCELFStreamer::EmitInstruction(), llvm::MipsELFStreamer::EmitInstruction(), llvm::CodeViewContext::emitLineTableForFunction(), llvm::MCWinCOFFStreamer::EmitLocalCommonSymbol(), emitNonLazySymbolPointer(), EmitPersonality(), llvm::MCObjectStreamer::EmitRelocDirective(), EmitRuntimeFunction(), llvm::CodeViewContext::emitStringTable(), EmitSymbolRefWithOfs(), EmitSymbolValue(), EmitUnwindInfo(), llvm::MCELFStreamer::EmitWeakReference(), llvm::MCObjectStreamer::FinishImpl(), forceExpAbs(), getAssociatedPDataSection(), getAssociatedXDataSection(), llvm::AMDGPUTargetStreamer::getContext(), getDataAlignmentFactor(), getDwarfLineTableSymbol(), llvm::SparcELFMCAsmInfo::getExprForFDESymbol(), llvm::MCAsmInfo::getExprForFDESymbol(), llvm::AArch64MCAsmInfoDarwin::getExprForPersonalitySymbol(), llvm::SparcELFMCAsmInfo::getExprForPersonalitySymbol(), llvm::X86_64MCAsmInfoDarwin::getExprForPersonalitySymbol(), getSizeForEncoding(), llvm::HexagonMCELFStreamer::HexagonMCEmitCommonSymbol(), llvm::MCWinCOFFStreamer::InitSections(), llvm::MCELFStreamer::InitSections(), InitSections(), llvm::MCCVLineEntry::Make(), llvm::MCDwarfLineEntry::Make(), llvm::MCGenDwarfLabelEntry::Make(), MakeStartMinusEndExpr(), and smallData().
|
inline |
Return the current section that the streamer is emitting code to.
Definition at line 297 of file MCStreamer.h.
References llvm::SmallVectorTemplateCommon< T, typename >::back(), and llvm::SmallVectorBase::empty().
Referenced by llvm::MCELFStreamer::EmitCommonSymbol(), getCurrentSectionOnly(), llvm::HexagonMCELFStreamer::HexagonMCEmitCommonSymbol(), and PushSection().
|
inline |
Definition at line 302 of file MCStreamer.h.
References getCurrentSection().
Referenced by llvm::AssemblerConstantPools::addEntry(), llvm::MCELFStreamer::ChangeSection(), llvm::MCELFStreamer::EmitBundleLock(), llvm::MCELFStreamer::EmitBundleUnlock(), llvm::MCObjectStreamer::EmitBytes(), EmitCVLocDirective(), llvm::CodeViewContext::emitDefRange(), llvm::MCObjectStreamer::EmitDwarfLocDirective(), llvm::MCObjectStreamer::emitFill(), llvm::AssemblerConstantPools::emitForCurrentSection(), llvm::CodeViewContext::emitInlineLineTableForFunction(), llvm::MCObjectStreamer::EmitInstruction(), llvm::MCELFStreamer::EmitLabel(), EmitLabel(), llvm::MCELFStreamer::EmitSymbolAttribute(), llvm::MCObjectStreamer::EmitValueImpl(), llvm::MCObjectStreamer::EmitValueToAlignment(), EmitWinCFIStartChained(), EmitWinCFIStartProc(), llvm::MCELFStreamer::FinishImpl(), llvm::MCObjectStreamer::flushPendingLabels(), llvm::MCObjectStreamer::getCurrentFragment(), llvm::MCObjectStreamer::insert(), and llvm::MCGenDwarfLabelEntry::Make().
|
inlineprotected |
Definition at line 199 of file MCStreamer.h.
|
inline |
Definition at line 228 of file MCStreamer.h.
Referenced by llvm::MCDwarfFrameEmitter::Emit(), llvm::X86AsmPrinter::EmitInstruction(), and llvm::X86AsmInstrumentation::GetFrameRegGeneric().
Definition at line 192 of file MCStreamer.cpp.
References Context, getContext(), llvm::MCDwarfLineTable::getLabel(), llvm::MCContext::getMCDwarfLineTable(), llvm::cl::Prefix, and llvm::MCDwarfLineTable::setLabel().
Referenced by llvm::MCGenDwarfInfo::Emit().
|
inline |
Definition at line 227 of file MCStreamer.h.
Referenced by llvm::MCObjectStreamer::EmitFrames(), llvm::X86AsmPrinter::EmitInstruction(), and llvm::X86AsmInstrumentation::GetFrameRegGeneric().
|
inline |
Definition at line 234 of file MCStreamer.h.
Referenced by reset(), and ~MCStreamer().
|
inline |
Return the previous section that the streamer is emitting code to.
Definition at line 305 of file MCStreamer.h.
References llvm::SmallVectorTemplateCommon< T, typename >::back(), and llvm::SmallVectorBase::empty().
Referenced by PushSection().
Returns an index to represent the order a symbol was emitted in.
(zero if we did not emit that symbol)
Definition at line 313 of file MCStreamer.h.
References llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::lookup().
|
inline |
Definition at line 223 of file MCStreamer.h.
Referenced by llvm::MipsELFStreamer::createPendingLabelRelocs(), EmitAssignment(), EmitLabel(), llvm::MipsRegInfoRecord::EmitMipsOptionRecord(), and Finish().
|
inline |
Definition at line 235 of file MCStreamer.h.
Referenced by llvm::Win64EH::UnwindEmitter::Emit().
|
inlinevirtual |
Return true if this asm streamer supports emitting unformatted text to the .s file with EmitRawText.
Definition at line 250 of file MCStreamer.h.
| bool MCStreamer::hasUnfinishedDwarfFrameInfo | ( | ) |
Definition at line 208 of file MCStreamer.cpp.
References llvm::MCDwarfFrameInfo::End.
Referenced by EmitCFIStartProc().
|
virtual |
Create the default sections and set the initial one.
Reimplemented in llvm::MCELFStreamer, and llvm::MCWinCOFFStreamer.
Definition at line 280 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 254 of file MCStreamer.h.
|
inlinevirtual |
Return true if this streamer supports verbose assembly and if it is enabled.
Definition at line 246 of file MCStreamer.h.
Referenced by llvm::X86AsmPrinter::EmitInstruction().
Reimplemented in llvm::MCObjectStreamer.
Definition at line 851 of file MCStreamer.h.
Referenced by llvm::MCContext::finalizeDwarfSections().
|
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 333 of file MCStreamer.h.
References ChangeSection(), llvm::SmallVectorTemplateCommon< T, typename >::end(), I, llvm::SmallVectorTemplateBase< T, isPodLike >::pop_back(), and llvm::SmallVectorTemplateCommon< T, typename >::size().
Referenced by llvm::AMDGPUTargetELFStreamer::EmitAMDKernelCodeT(), llvm::MCWinCOFFStreamer::EmitCommonSymbol(), llvm::MipsTargetELFStreamer::emitDirectiveEnd(), llvm::MCELFStreamer::EmitIdent(), and llvm::MipsRegInfoRecord::EmitMipsOptionRecord().
|
inline |
Save the current and previous section on the section stack.
Definition at line 324 of file MCStreamer.h.
References getCurrentSection(), getPreviousSection(), and llvm::SmallVectorTemplateBase< T, isPodLike >::push_back().
Referenced by llvm::AMDGPUTargetELFStreamer::EmitAMDKernelCodeT(), llvm::MCWinCOFFStreamer::EmitCommonSymbol(), llvm::MipsTargetELFStreamer::emitDirectiveEnd(), llvm::MCELFStreamer::EmitIdent(), and llvm::MipsRegInfoRecord::EmitMipsOptionRecord().
|
virtual |
State management.
Reimplemented in llvm::MCObjectStreamer, llvm::MCELFStreamer, and llvm::MCWinCOFFStreamer.
Definition at line 56 of file MCStreamer.cpp.
References llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::clear(), llvm::SmallVectorImpl< T >::clear(), getNumWinFrameInfos(), i, and llvm::SmallVectorTemplateBase< T, isPodLike >::push_back().
Referenced by llvm::LLVMTargetMachine::addPassesToEmitFile(), and llvm::MCObjectStreamer::reset().
|
inline |
Definition at line 213 of file MCStreamer.h.
Referenced by llvm::MCTargetStreamer::MCTargetStreamer().
Definition at line 348 of file MCStreamer.h.
References llvm::SmallVectorTemplateCommon< T, typename >::back(), llvm::SmallVectorBase::empty(), and SwitchSection().
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 829 of file MCStreamer.cpp.
References assert(), llvm::SmallVectorTemplateCommon< T, typename >::back(), ChangeSection(), EmitLabel(), llvm::MCSection::getBeginSymbol(), and llvm::MCSection::hasEnded().
Referenced by llvm::Win64EH::UnwindEmitter::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::MipsTargetELFStreamer::emitMipsAbiFlags(), llvm::TargetLoweringObjectFileMachO::emitModuleFlags(), llvm::TargetLoweringObjectFileCOFF::emitModuleFlags(), llvm::TargetLoweringObjectFileELF::emitPersonalityValue(), llvm::MipsAsmPrinter::EmitStartOfAsmFile(), llvm::Win64EH::UnwindEmitter::EmitUnwindInfo(), endSection(), llvm::MipsTargetELFStreamer::finish(), llvm::HexagonMCELFStreamer::HexagonMCEmitCommonSymbol(), llvm::MCWinCOFFStreamer::InitSections(), llvm::MCELFStreamer::InitSections(), InitSections(), llvm::FaultMaps::serializeToFaultMapSection(), llvm::StackMaps::serializeToStackMapSection(), smallData(), SubSection(), 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 366 of file MCStreamer.h.
References assert(), and llvm::SmallVectorTemplateCommon< T, typename >::back().
Definition at line 739 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::MipsMCExpr::visitUsedExpr(), llvm::PPCMCExpr::visitUsedExpr(), llvm::SparcMCExpr::visitUsedExpr(), and llvm::AArch64MCExpr::visitUsedExpr().
Reimplemented in llvm::MCObjectStreamer.
Definition at line 736 of file MCStreamer.cpp.
Referenced by visitUsedExpr().
1.8.6