9#ifndef LLVM_MC_MCFRAGMENT_H
10#define LLVM_MC_MCFRAGMENT_H
27class MCObjectStreamer;
67 unsigned LayoutOrder = 0;
180template <
unsigned ContentsSize,
unsigned FixupsSize>
266 unsigned MaxBytesToEmit;
273 unsigned MaxBytesToEmit)
275 Value(
Value), ValueSize(ValueSize), MaxBytesToEmit(MaxBytesToEmit) {}
312 NumValues(NumValues), Loc(Loc) {}
329 int64_t ControlledNopLength;
341 ControlledNopLength(ControlledNopLength), Loc(L), STI(STI) {}
418 LineDelta(LineDelta), AddrDelta(&AddrDelta) {}
437 AddrDelta(&AddrDelta) {}
467 unsigned StartFileId;
468 unsigned StartLineNum;
479 unsigned StartLineNum,
const MCSymbol *FnStartSym,
482 StartFileId(StartFileId), StartLineNum(StartLineNum),
483 FnStartSym(FnStartSym), FnEndSym(FnEndSym) {}
507 ArrayRef<std::pair<const MCSymbol *, const MCSymbol *>> Ranges,
510 Ranges(Ranges), FixedSizePortion(FixedSizePortion) {}
570 AddrDelta(AddrDelta) {}
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
This file defines the SmallString class.
This file defines the SmallVector class.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Holds state from .cv_file and .cv_loc directives for later emission.
void setEmitNops(bool Value, const MCSubtargetInfo *STI)
MCAlignFragment(Align Alignment, int64_t Value, unsigned ValueSize, unsigned MaxBytesToEmit)
Align getAlignment() const
unsigned getMaxBytesToEmit() const
unsigned getValueSize() const
const MCSubtargetInfo * getSubtargetInfo() const
static bool classof(const MCFragment *F)
Represents required padding such that a particular other set of fragments does not cross a particular...
MCBoundaryAlignFragment(Align AlignBoundary, const MCSubtargetInfo &STI)
void setAlignment(Align Value)
void setSize(uint64_t Value)
const MCFragment * getLastFragment() const
const MCSubtargetInfo * getSubtargetInfo() const
static bool classof(const MCFragment *F)
Align getAlignment() const
void setLastFragment(const MCFragment *F)
Fragment representing the .cv_def_range directive.
MCCVDefRangeFragment(ArrayRef< std::pair< const MCSymbol *, const MCSymbol * > > Ranges, StringRef FixedSizePortion)
ArrayRef< std::pair< const MCSymbol *, const MCSymbol * > > getRanges() const
static bool classof(const MCFragment *F)
StringRef getFixedSizePortion() const
Fragment representing the binary annotations produced by the .cv_inline_linetable directive.
static bool classof(const MCFragment *F)
const SmallString< 8 > & getContents() const
MCCVInlineLineTableFragment(unsigned SiteFuncId, unsigned StartFileId, unsigned StartLineNum, const MCSymbol *FnStartSym, const MCSymbol *FnEndSym)
const MCSymbol * getFnStartSym() const
const MCSymbol * getFnEndSym() const
SmallString< 8 > & getContents()
Fragment for data and encoded instructions.
void setLinkerRelaxable()
static bool classof(const MCFragment *F)
bool isLinkerRelaxable() const
static bool classof(const MCFragment *F)
void setAddrDelta(const MCExpr *E)
static bool classof(const MCFragment *F)
const MCExpr & getAddrDelta() const
MCDwarfCallFrameFragment(const MCExpr &AddrDelta)
MCDwarfLineAddrFragment(int64_t LineDelta, const MCExpr &AddrDelta)
int64_t getLineDelta() const
static bool classof(const MCFragment *F)
const MCExpr & getAddrDelta() const
Interface implemented by fragments that contain encoded instructions and/or data and also have fixups...
static bool classof(const MCFragment *F)
void setContents(ArrayRef< char > C)
const SmallVectorImpl< MCFixup > & getFixups() const
MCEncodedFragmentWithFixups(MCFragment::FragmentType FType, bool HasInstructions)
SmallVectorImpl< MCFixup > & getFixups()
const SmallVectorImpl< char > & getContents() const
void appendContents(ArrayRef< char > C)
void appendContents(size_t Num, char Elt)
SmallVectorImpl< char > & getContents()
Interface implemented by fragments that contain encoded instructions and/or data.
MCEncodedFragment(MCFragment::FragmentType FType, bool HasInstructions)
const MCSubtargetInfo * getSubtargetInfo() const
Retrieve the MCSubTargetInfo in effect when the instruction was encoded.
const MCSubtargetInfo * STI
The MCSubtargetInfo in effect when the instruction was encoded.
static bool classof(const MCFragment *F)
void setBundlePadding(uint8_t N)
Set the padding size for this fragment.
void setHasInstructions(const MCSubtargetInfo &STI)
Record that the fragment contains instructions with the MCSubtargetInfo in effect when the instructio...
uint8_t getBundlePadding() const
Get the padding size that must be inserted before this fragment.
void setAlignToBundleEnd(bool V)
bool alignToBundleEnd() const
Should this fragment be placed at the end of an aligned bundle?
Base class for the full range of assembler expressions which are needed for parsing.
MCFillFragment(uint64_t Value, uint8_t VSize, const MCExpr &NumValues, SMLoc Loc)
uint8_t getValueSize() const
uint64_t getValue() const
static bool classof(const MCFragment *F)
const MCExpr & getNumValues() const
bool LinkerRelaxable
MCDataFragment.
FragmentType getKind() const
unsigned getLayoutOrder() const
bool HasInstructions
Used by subclasses for better packing.
void setParent(MCSection *Value)
const MCSymbol * getAtom() const
void destroy()
Destroys the current fragment.
void setLayoutOrder(unsigned Value)
MCSection * getParent() const
MCFragment * getNext() const
MCFragment(const MCFragment &)=delete
bool AllowAutoPadding
MCRelaxableFragment: x86-specific.
MCFragment & operator=(const MCFragment &)=delete
bool hasInstructions() const
Does this fragment have instructions emitted into it? By default this is false, but specific fragment...
Instances of this class represent a single low-level machine instruction.
MCLEBFragment(const MCExpr &Value, bool IsSigned)
const MCExpr & getValue() const
void setValue(const MCExpr *Expr)
static bool classof(const MCFragment *F)
int64_t getControlledNopLength() const
int64_t getNumBytes() const
MCNopsFragment(int64_t NumBytes, int64_t ControlledNopLength, SMLoc L, const MCSubtargetInfo &STI)
static bool classof(const MCFragment *F)
const MCSubtargetInfo * getSubtargetInfo() const
Streaming object file generation interface.
static bool classof(const MCFragment *F)
const MCExpr & getOffset() const
MCOrgFragment(const MCExpr &Offset, int8_t Value, SMLoc Loc)
MCPseudoProbeAddrFragment(const MCExpr *AddrDelta)
const MCExpr & getAddrDelta() const
static bool classof(const MCFragment *F)
A relaxable fragment holds on to its MCInst, since it may need to be relaxed during the assembler lay...
void setAllowAutoPadding(bool V)
static bool classof(const MCFragment *F)
bool getAllowAutoPadding() const
MCRelaxableFragment(const MCInst &Inst, const MCSubtargetInfo &STI)
const MCInst & getInst() const
void setInst(const MCInst &Value)
Instances of this class represent a uniqued identifier for a section in the current translation unit.
Generic base class for all target subtargets.
Represents a symbol table index fragment.
const MCSymbol * getSymbol() const
MCSymbolIdFragment(const MCSymbol *Sym)
static bool classof(const MCFragment *F)
const MCSymbol * getSymbol()
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
Represents a location in source code.
SmallString - A SmallString is just a SmallVector with methods and accessors that make it work better...
StringRef str() const
Explicit conversion to StringRef.
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
void assign(size_type NumElts, ValueParamT Elt)
void append(ItTy in_start, ItTy in_end)
Add the specified range to the end of the SmallVector.
void push_back(const T &Elt)
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
StringRef - Represent a constant reference to a string, i.e.
LLVM Value Representation.
This file defines the ilist_node class template, which is a convenient base class for creating classe...
@ C
The default llvm calling convention, compatible with C.
This is an optimization pass for GlobalISel generic memory operations.
This struct is a compact representation of a valid (non-zero power of two) alignment.