15 #ifndef LLVM_MC_MCASMINFO_H 16 #define LLVM_MC_MCASMINFO_H 26 class MCCFIInstruction;
30 class MCSubtargetInfo;
63 unsigned CodePointerSize = 4;
67 unsigned CalleeSaveStackSlotSize = 4;
70 bool IsLittleEndian =
true;
73 bool StackGrowsUp =
false;
77 bool HasSubsectionsViaSymbols =
false;
81 bool HasMachoZeroFillDirective =
false;
85 bool HasMachoTBSSDirective =
false;
90 bool HasCOFFAssociativeComdats =
false;
94 bool HasCOFFComdatConstants =
false;
98 unsigned MaxInstLength = 4;
102 unsigned MinInstAlignment = 1;
106 bool DollarIsPC =
false;
120 bool UseAssignmentForEHBegin =
false;
123 bool NeedsLocalForSize =
false;
153 unsigned AssemblerDialect = 0;
157 bool AllowAtInName =
false;
161 bool SupportsQuotedNames =
true;
166 bool UseDataRegionDirectives =
false;
170 bool UseDotAlignForAlignment =
false;
202 const char *GPRel64Directive =
nullptr;
207 const char *GPRel32Directive =
nullptr;
212 const char *DTPRel32Directive =
nullptr;
213 const char *DTPRel64Directive =
nullptr;
214 const char *TPRel32Directive =
nullptr;
215 const char *TPRel64Directive =
nullptr;
220 bool SunStyleELFSectionSwitchSyntax =
false;
225 bool UsesELFSectionDirectiveForBSS =
false;
227 bool NeedsDwarfSectionOffsetDirective =
false;
235 bool AlignmentIsInBytes =
true;
239 unsigned TextAlignFillValue = 0;
252 bool SetDirectiveSuppressesReloc =
false;
267 bool HasAggressiveSymbolFolding =
true;
271 bool COMMDirectiveAlignmentIsInBytes =
true;
279 bool HasFunctionAlignment =
true;
283 bool HasDotTypeDotSizeDirective =
true;
287 bool HasSingleParameterDotFile =
true;
291 bool HasIdentDirective =
false;
295 bool HasNoDeadStrip =
false;
299 bool HasAltEntry =
false;
306 const char *WeakRefDirective =
nullptr;
310 bool HasWeakDefDirective =
false;
314 bool HasWeakDefCanBeHiddenDirective =
false;
318 bool HasLinkOnceDirective =
false;
322 bool HasDotLGloblDirective =
false;
338 bool SymbolsHaveSMC =
false;
344 bool SupportsDebugInformation =
false;
354 bool DwarfUsesRelocationsAcrossSections =
true;
358 bool DwarfFDESymbolsUseAbsDiff =
false;
362 bool DwarfRegNumForCFI =
false;
366 bool UseParensForSymbolVariant =
false;
370 bool SupportsExtendedDwarfLocDirective =
true;
393 bool UseLogicalShr =
true;
397 bool RelaxELFRelocations =
true;
401 bool HasMipsExpressions =
false;
404 bool NeedsFunctionDescriptors =
false;
416 return CalleeSaveStackSlotSize;
453 virtual const MCExpr *getExprForPersonalitySymbol(
const MCSymbol *Sym,
462 virtual bool isAcceptableChar(
char C)
const;
478 return SunStyleELFSectionSwitchSyntax;
482 return UsesELFSectionDirectiveForBSS;
486 return NeedsDwarfSectionOffsetDirective;
499 return MaxInstLength;
519 return !LinkerPrivateGlobalPrefix.
empty();
523 if (hasLinkerPrivateGlobalPrefix())
524 return LinkerPrivateGlobalPrefix;
525 return getPrivateGlobalPrefix();
538 return UseDataRegionDirectives;
542 return UseDotAlignForAlignment;
553 return SetDirectiveSuppressesReloc;
559 return COMMDirectiveAlignmentIsInBytes;
563 return LCOMMDirectiveAlignmentType;
577 return HasWeakDefCanBeHiddenDirective;
587 return HiddenDeclarationVisibilityAttr;
591 return ProtectedVisibilityAttr;
623 return DwarfUsesRelocationsAcrossSections;
630 return SupportsExtendedDwarfLocDirective;
636 return InitialFrameState;
644 UseIntegratedAssembler =
Value;
652 PreserveAsmComments =
Value;
656 return CompressDebugSections;
660 this->CompressDebugSections = CompressDebugSections;
673 #endif // LLVM_MC_MCASMINFO_H const char * Code16Directive
These are assembly directives that tells the assembler to interpret the following instructions differ...
bool doesSupportDataRegionDirectives() const
bool getCOMMDirectiveAlignmentIsInBytes() const
Instances of this class represent a uniqued identifier for a section in the current translation unit...
bool doesSetDirectiveSuppressReloc() const
bool usesWindowsCFI() const
MCSymbolAttr getHiddenVisibilityAttr() const
const char * getInlineAsmStart() const
const char * getLabelSuffix() const
bool getSymbolsHaveSMC() const
bool useDotAlignForAlignment() const
bool UseIntegratedAssembler
Should we use the integrated assembler? The integrated assembler should be enabled by default (by the...
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".
This class represents lattice values for constants.
const char * getGlobalDirective() const
void setCompressDebugSections(DebugCompressionType CompressDebugSections)
bool hasMachoTBSSDirective() const
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
virtual void setUseIntegratedAssembler(bool Value)
Set whether assembly (inline or otherwise) should be parsed.
bool doesSupportDebugInformation() const
bool hasSingleParameterDotFile() const
amdgpu Simplify well known AMD library false FunctionCallee Value const Twine & Name
bool hasLinkOnceDirective() const
StringRef getLinkerPrivateGlobalPrefix() const
const char * Data64bitsDirective
const char * ZeroDirective
This should be set to the directive used to get some number of zero bytes emitted to the current sect...
const char * getCode16Directive() const
bool hasDotTypeDotSizeDirective() const
bool needsDwarfSectionOffsetDirective() const
const char * GlobalDirective
This is the directive used to declare a global entity.
bool supportsNameQuoting() const
const char * getData64bitsDirective() const
bool hasDotLGloblDirective() const
const char * getTPRel64Directive() const
const char * getInlineAsmEnd() const
StringRef getPrivateGlobalPrefix() const
bool hasIdentDirective() const
const char * AsciiDirective
This directive allows emission of an ascii string with the standard C escape characters embedded into...
bool useParensForSymbolVariant() const
bool hasMachoZeroFillDirective() const
WinEH::EncodingType getWinEHEncodingType() const
bool canRelaxRelocations() const
const char * SeparatorString
This string, if specified, is used to separate instructions from each other when on the same line...
const char * getDTPRel64Directive() const
bool getAlignmentIsInBytes() const
const char * getAscizDirective() const
StringRef CommentString
This indicates the comment character used by the assembler.
const char * getZeroDirective() const
const char * Data8bitsDirective
These directives are used to output some unit of integer data to the current section.
Base class for the full range of assembler expressions which are needed for parsing.
Windows x86, uses no CFI, just EH tables.
bool hasCOFFComdatConstants() const
Windows NT (Windows on ARM)
const char * getGPRel64Directive() const
const char * getWeakRefDirective() const
LLVM_NODISCARD bool empty() const
empty - Check if the string is empty.
DebugCompressionType compressDebugSections() const
bool hasAggressiveSymbolFolding() const
Context object for machine code objects.
const char * getWeakDirective() const
bool doesDwarfUseRelocationsAcrossSections() const
const char * Code32Directive
bool shouldUseLogicalShr() const
bool hasFunctionAlignment() const
const char * AscizDirective
If not null, this allows for special handling of zero terminated strings on this target.
const char * getTPRel32Directive() const
bool hasNoDeadStrip() const
bool supportsExtendedDwarfLocDirective() const
const char * getData8bitsDirective() const
This class is intended to be used as a base class for asm properties and features specific to the tar...
const char * InlineAsmStart
If these are nonempty, they contain a directive to emit before and after an inline assembly statement...
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...
Streaming machine code generation interface.
virtual void setPreserveAsmComments(bool Value)
Set whether assembly (inline or otherwise) should be parsed.
bool useDwarfRegNumForCFI() const
const char * getData16bitsDirective() const
unsigned getAssemblerDialect() const
bool needsLocalForSize() const
const char * getSeparatorString() const
StringRef getPrivateLabelPrefix() const
StringRef getCommentString() const
bool hasWeakDefCanBeHiddenDirective() const
LCOMM::LCOMMType getLCOMMDirectiveAlignmentType() const
bool useAssignmentForEHBegin() const
const char * Data16bitsDirective
bool doDwarfFDESymbolsUseAbsDiff() const
void setRelaxELFRelocations(bool V)
bool hasSubsectionsViaSymbols() const
const char * getData32bitsDirective() const
bool hasWeakDefDirective() const
Windows x64, Windows Itanium (IA-64)
bool preserveAsmComments() const
Return true if assembly (inline or otherwise) should be parsed.
const std::vector< MCCFIInstruction > & getInitialFrameState() const
bool hasMipsExpressions() const
const char * LabelSuffix
This is appended to emitted labels. Defaults to ":".
unsigned getMinInstAlignment() const
std::vector< MCCFIInstruction > InitialFrameState
const char * InlineAsmEnd
bool usesSunStyleELFSectionSwitchSyntax() const
bool getDollarIsPC() const
const char * Data32bitsDirective
bool usesCFIForEH() const
Returns true if the exception handling method for the platform uses call frame information to unwind...
bool doesAllowAtInName() const
bool useIntegratedAssembler() const
Return true if assembly (inline or otherwise) should be parsed.
bool isStackGrowthDirectionUp() const
True if target stack grow up.
bool PreserveAsmComments
Preserve Comments in assembly.
bool hasLinkerPrivateGlobalPrefix() const
bool hasCOFFAssociativeComdats() const
Windows Exception Handling.
StringRef LinkerPrivateGlobalPrefix
This prefix is used for symbols that should be passed through the assembler but be removed by the lin...
const char * getDTPRel32Directive() const
Generic base class for all target subtargets.
unsigned getCalleeSaveStackSlotSize() const
Get the callee-saved register stack slot size in bytes.
bool isLittleEndian() const
True if the target is little endian.
const char * getAsciiDirective() const
unsigned getCodePointerSize() const
Get the code pointer size in bytes.
const char * getGPRel32Directive() const
unsigned getTextAlignFillValue() const
bool needsFunctionDescriptors() const
unsigned getCommentColumn() const
This indicates the column (zero-based) at which asm comments should be printed.
bool usesELFSectionDirectiveForBSS() const
LLVM Value Representation.
Windows CE ARM, PowerPC, SH3, SH4.
virtual unsigned getMaxInstLength(const MCSubtargetInfo *STI=nullptr) const
Returns the maximum possible encoded instruction size in bytes.
ExceptionHandling getExceptionHandlingType() const
void setExceptionsType(ExceptionHandling EH)
bool doesSupportExceptionHandling() const
const char * getCode64Directive() const
StringRef - Represent a constant reference to a string, i.e.
DWARF-like instruction based exceptions.
MCSymbolAttr getHiddenDeclarationVisibilityAttr() const
StringRef PrivateGlobalPrefix
This prefix is used for globals like constant pool entries that are completely private to the ...
MCSymbolAttr getProtectedVisibilityAttr() const
const char * Code64Directive
const char * getCode32Directive() const