Go to the documentation of this file.
15 #ifndef LLVM_MC_MCASMINFO_H
16 #define LLVM_MC_MCASMINFO_H
26 class MCCFIInstruction;
30 class MCSubtargetInfo;
724 #endif // LLVM_MC_MCASMINFO_H
virtual const MCExpr * getExprForFDESymbol(const MCSymbol *Sym, unsigned Encoding, MCStreamer &Streamer) const
bool SupportsExtendedDwarfLocDirective
True if the target supports flags in ".loc" directive, false if only location is allowed.
bool hasSingleParameterDotFile() const
bool HasMachoTBSSDirective
True if this is a MachO target that supports the macho-specific .tbss directive for emitting thread l...
virtual bool isAcceptableChar(char C) const
Return true if C is an acceptable character inside a symbol name.
const char * GPRel64Directive
If non-null, a directive that is used to emit a word which should be relocated as a 64-bit GP-relativ...
bool useDwarfRegNumForCFI() const
bool usesSunStyleELFSectionSwitchSyntax() const
StringRef getLinkerPrivateGlobalPrefix() const
bool HasVisibilityOnlyWithLinkage
True if this is an XCOFF target that supports visibility attributes as part of .global,...
void setRelaxELFRelocations(bool V)
This class represents lattice values for constants.
StringRef getCommentString() const
bool StackGrowsUp
True if target stack grow up. Default is false.
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
LLVM_NODISCARD bool empty() const
empty - Check if the string is empty.
const char * getSeparatorString() const
bool doesSetDirectiveSuppressReloc() const
DebugCompressionType compressDebugSections() const
bool hasMipsExpressions() const
DebugCompressionType CompressDebugSections
Compress DWARF debug sections. Defaults to no compression.
bool useIntegratedAssembler() const
Return true if assembly (inline or otherwise) should be parsed.
bool HasFunctionAlignment
Context object for machine code objects.
bool getAlignmentIsInBytes() const
bool HasMachoZeroFillDirective
True if this is a MachO target that supports the macho-specific .zerofill directive for emitting BSS ...
bool UseDotAlignForAlignment
True if .align is to be used for alignment.
const char * TPRel32Directive
unsigned getMinInstAlignment() const
const char * getInlineAsmStart() const
StringRef getPrivateGlobalPrefix() const
This class is intended to be used as a base class for asm properties and features specific to the tar...
bool AvoidWeakIfComdat
True if we should mark symbols as global instead of weak, for weak*/linkonce*, if the symbol has a c...
bool SupportsDebugInformation
True if target supports emission of debugging information.
bool useDotAlignForAlignment() const
bool AlignmentIsInBytes
If this is true (the default) then the asmprinter emits ".align N" directives, where N is the number ...
bool hasLEB128Directives() const
bool HasNoDeadStrip
True if this target supports the MachO .no_dead_strip directive.
@ X86
Windows x64, Windows Itanium (IA-64)
const char * InlineAsmEnd
bool SetDirectiveSuppressesReloc
True if the expression .long f - g uses a relocation but it can be suppressed by writing a = f - g ....
bool UseAssignmentForEHBegin
bool AllowSymbolAtNameStart
This is true if the assembler allows $ @ ? characters at the start of symbol names.
bool HasIdentDirective
True if the target has a .ident directive, this is true for ELF targets.
bool UsesELFSectionDirectiveForBSS
This is true if this target uses ELF '.section' directive before the '.bss' one.
@ Itanium
Windows CE ARM, PowerPC, SH3, SH4.
const char * Data64bitsDirective
unsigned getCodePointerSize() const
Get the code pointer size in bytes.
const char * Code32Directive
StringRef PrivateLabelPrefix
This prefix is used for labels for basic blocks.
const char * WeakDirective
Used to declare a global as being a weak symbol. Defaults to ".weak".
bool UseDataRegionDirectives
This is true if data region markers should be printed as ".data_region/.end_data_region" directives.
unsigned getAssemblerDialect() const
bool usesCFIForEH() const
Returns true if the exception handling method for the platform uses call frame information to unwind.
const char * TPRel64Directive
const char * getData64bitsDirective() const
bool hasFunctionAlignment() const
bool AllowAtInName
This is true if the assembler allows @ characters in symbol names.
WinEH::EncodingType getWinEHEncodingType() const
bool DwarfUsesRelocationsAcrossSections
True if Dwarf2 output generally uses relocations for references to other .debug_* sections.
bool UseParensForSymbolVariant
True if target uses parens to indicate the symbol variant instead of .
const char * Code16Directive
These are assembly directives that tells the assembler to interpret the following instructions differ...
bool supportsExtendedDwarfLocDirective() const
bool usesELFSectionDirectiveForBSS() const
const char * Data32bitsDirective
AsmCharLiteralSyntax CharacterLiteralSyntax
Form used for character literals in the assembly syntax.
virtual bool shouldOmitSectionDirective(StringRef SectionName) const
Return true if the .section directive should be omitted when emitting SectionName.
bool canRelaxRelocations() const
bool hasLinkerPrivateGlobalPrefix() const
virtual const MCExpr * getExprForPersonalitySymbol(const MCSymbol *Sym, unsigned Encoding, MCStreamer &Streamer) const
Streaming machine code generation interface.
StringRef PrivateGlobalPrefix
This prefix is used for globals like constant pool entries that are completely private to the ....
bool DwarfFDESymbolsUseAbsDiff
True if DWARF FDE symbol reference relocations should be replaced by an absolute difference.
void setExceptionsType(ExceptionHandling EH)
const char * ByteListDirective
This directive accepts a comma-separated list of bytes for emission as a string of bytes.
unsigned getTextAlignFillValue() const
MCSymbolAttr ProtectedVisibilityAttr
This attribute, if not MCSA_Invalid, is used to declare a symbol as having protected visibility.
const char * getAscizDirective() const
bool HasSingleParameterDotFile
True if the target has a single parameter .file directive, this is true for ELF targets.
(vector float) vec_cmpeq(*A, *B) C
@ MCSA_Protected
.protected (ELF)
bool doesZeroDirectiveSupportNonZeroValue() const
bool HasWeakDefDirective
True if we have a directive to declare a global as being a weak defined symbol.
unsigned MinInstAlignment
Every possible instruction length is a multiple of this value.
bool doesSupportDataRegionDirectives() const
bool needsDwarfSectionOffsetDirective() const
bool useAssignmentForEHBegin() const
@ ACLS_SingleQuotePrefix
Unknown; character literals not used by LLVM for this target.
@ MCSA_Hidden
.hidden (ELF)
bool ZeroDirectiveSupportsNonZeroValue
This should be set to true if the zero directive supports a value to emit other than zero.
bool isStackGrowthDirectionUp() const
True if target stack grow up.
AsmCharLiteralSyntax characterLiteralSyntax() const
StringRef LinkerPrivateGlobalPrefix
This prefix is used for symbols that should be passed through the assembler but be removed by the lin...
const char * getZeroDirective() const
bool UseIntegratedAssembler
Should we use the integrated assembler? The integrated assembler should be enabled by default (by the...
bool hasNoDeadStrip() const
const char * getByteListDirective() const
const char * getInlineAsmEnd() const
const char * getData8bitsDirective() const
MCSymbolAttr getProtectedVisibilityAttr() const
bool HasDotTypeDotSizeDirective
True if the target has .type and .size directives, this is true for most ELF targets.
bool SupportsSignedData
True if data directives support signed values.
virtual void setUseIntegratedAssembler(bool Value)
Set whether assembly (inline or otherwise) should be parsed.
bool useParensForSymbolVariant() const
bool hasWeakDefCanBeHiddenDirective() const
const char * SeparatorString
This string, if specified, is used to separate instructions from each other when on the same line.
virtual unsigned getMaxInstLength(const MCSubtargetInfo *STI=nullptr) const
Returns the maximum possible encoded instruction size in bytes.
const char * getAsciiDirective() const
bool hasCOFFAssociativeComdats() const
virtual bool isSectionAtomizableBySymbols(const MCSection &Section) const
True if the section is atomized using the symbols in it.
bool doesAllowSymbolAtNameStart() const
bool HasSubsectionsViaSymbols
True if this target has the MachO .subsections_via_symbols directive.
const char * Code64Directive
const char * WeakRefDirective
This directive, if non-null, is used to declare a global as being a weak undefined symbol.
StringRef CommentString
This indicates the comment character used by the assembler.
bool DwarfRegNumForCFI
True if dwarf register numbers are printed instead of symbolic register names in ....
bool COMMDirectiveAlignmentIsInBytes
True is .comm's and .lcomms optional alignment is to be specified in bytes instead of log2(n).
bool hasVisibilityOnlyWithLinkage() const
const char * getTPRel64Directive() const
const char * getTPRel32Directive() const
virtual bool isValidUnquotedName(StringRef Name) const
Return true if the identifier Name does not need quotes to be syntactically correct.
bool HasAltEntry
True if this target supports the MachO .alt_entry directive.
unsigned CodePointerSize
Code pointer size in bytes. Default is 4.
const char * ZeroDirective
This should be set to the directive used to get some number of zero (and non-zero if supported by the...
bool supportsNameQuoting() const
unsigned AssemblerDialect
Which dialect of an assembler variant to use. Defaults to 0.
bool HasWeakDefCanBeHiddenDirective
True if we have a directive to declare a global as being a weak defined symbol that can be hidden (un...
std::vector< MCCFIInstruction > InitialFrameState
WinEH::EncodingType WinEHEncodingType
Windows exception handling data (.pdata) encoding. Defaults to Invalid.
bool supportsSignedData() const
@ CE
Windows NT (Windows on ARM)
void addInitialFrameState(const MCCFIInstruction &Inst)
const char * getCode32Directive() const
const char * Data16bitsDirective
MCSymbolAttr HiddenDeclarationVisibilityAttr
This attribute, if not MCSA_Invalid, is used to declare an undefined symbol as having hidden visibili...
bool needsFunctionDescriptors() const
bool getDollarIsPC() const
const char * getGlobalDirective() const
bool doesAllowAtInName() const
@ MIPS
Windows x86, uses no CFI, just EH tables.
bool hasDotTypeDotSizeDirective() const
const char * DTPRel32Directive
If non-null, directives that are used to emit a word/dword which should be relocated as a 32/64-bit D...
const char * getCode16Directive() const
bool doesSupportDebugInformation() const
bool hasAggressiveSymbolFolding() const
const char * GlobalDirective
This is the directive used to declare a global entity.
const char * Data8bitsDirective
These directives are used to output some unit of integer data to the current section.
StringRef - Represent a constant reference to a string, i.e.
bool SunStyleELFSectionSwitchSyntax
This is true if this target uses "Sun Style" syntax for section switching ("#alloc,...
const char * InlineAsmStart
If these are nonempty, they contain a directive to emit before and after an inline assembly statement...
Instances of this class represent a uniqued identifier for a section in the current translation unit.
bool doesDwarfUseRelocationsAcrossSections() const
LCOMM::LCOMMType getLCOMMDirectiveAlignmentType() const
const std::vector< MCCFIInstruction > & getInitialFrameState() const
unsigned TextAlignFillValue
If non-zero, this is used to fill the executable space created as the result of a alignment directive...
bool doDwarfFDESymbolsUseAbsDiff() const
const char * DTPRel64Directive
void setBinutilsVersion(std::pair< int, int > Value)
const char * AscizDirective
If not null, this allows for special handling of zero terminated strings on this target.
bool hasWeakDefDirective() const
bool hasMachoZeroFillDirective() const
const char * getDTPRel64Directive() const
unsigned getCalleeSaveStackSlotSize() const
Get the callee-saved register stack slot size in bytes.
unsigned CalleeSaveStackSlotSize
Size of the stack slot reserved for callee-saved registers, in bytes.
bool shouldUseLogicalShr() const
bool HasCOFFComdatConstants
True if this is a non-GNU COFF target.
MCSymbolAttr getHiddenVisibilityAttr() const
const char * getGPRel64Directive() const
StringRef getPrivateLabelPrefix() const
@ WinEH
Windows Exception Handling.
bool DollarIsPC
The '$' token, when not referencing an identifier or constant, refers to the current PC.
bool isLittleEndian() const
True if the target is little endian.
const char * getWeakDirective() const
bool hasIdentDirective() const
void setCompressDebugSections(DebugCompressionType CompressDebugSections)
bool avoidWeakIfComdat() const
bool hasCOFFComdatConstants() const
bool HasCOFFAssociativeComdats
True if this is a non-GNU COFF target.
bool UseLogicalShr
True if the integrated assembler should interpret 'a >> b' constant expressions as logical rather tha...
bool NeedsFunctionDescriptors
@ None
No exception support.
MCSymbolAttr HiddenVisibilityAttr
This attribute, if not MCSA_Invalid, is used to declare a symbol as having hidden visibility.
bool binutilsIsAtLeast(int Major, int Minor) const
unsigned MaxInstLength
This is the maximum possible length of an instruction, which is needed to compute the size of an inli...
ExceptionHandling getExceptionHandlingType() const
const char * getData16bitsDirective() const
const char * getDTPRel32Directive() const
const char * getGPRel32Directive() const
const char * getCode64Directive() const
std::pair< int, int > BinutilsVersion
const char * getLabelSuffix() const
LCOMM::LCOMMType LCOMMDirectiveAlignmentType
Describes if the .lcomm directive for the target supports an alignment argument and how it is interpr...
virtual MCSection * getNonexecutableStackSection(MCContext &Ctx) const
Targets can implement this method to specify a section to switch to if the translation unit doesn't h...
virtual void setPreserveAsmComments(bool Value)
Set whether assembly (inline or otherwise) should be parsed.
ExceptionHandling ExceptionsType
Exception handling format for the target. Defaults to None.
bool HasAggressiveSymbolFolding
False if the assembler requires that we use.
unsigned getCommentColumn() const
This indicates the column (zero-based) at which asm comments should be printed.
bool PreserveAsmComments
Preserve Comments in assembly.
const char * LabelSuffix
This is appended to emitted labels. Defaults to ":".
bool hasMachoTBSSDirective() const
AsmCharLiteralSyntax
Assembly character literal syntax types.
const char * getWeakRefDirective() const
MCSymbolAttr getHiddenDeclarationVisibilityAttr() const
bool getCOMMDirectiveAlignmentIsInBytes() const
bool NeedsDwarfSectionOffsetDirective
bool hasSubsectionsViaSymbols() const
bool preserveAsmComments() const
Return true if assembly (inline or otherwise) should be parsed.
const char * AsciiDirective
This directive allows emission of an ascii string with the standard C escape characters embedded into...
bool usesWindowsCFI() const
Generic base class for all target subtargets.
@ DwarfCFI
DWARF-like instruction based exceptions.
LLVM Value Representation.
Base class for the full range of assembler expressions which are needed for parsing.
bool needsLocalForSize() const
const char * GPRel32Directive
If non-null, a directive that is used to emit a word which should be relocated as a 32-bit GP-relativ...
bool HasLEB128Directives
True if the target supports LEB128 directives.
bool IsLittleEndian
True if target is little endian. Default is true.
bool SupportsQuotedNames
If this is true, symbol names with invalid characters will be printed in quotes.
const char * getData32bitsDirective() const