16 #ifndef LLVM_MC_MCASMINFO_H 17 #define LLVM_MC_MCASMINFO_H 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;
198 const char *GPRel64Directive =
nullptr;
203 const char *GPRel32Directive =
nullptr;
208 const char *DTPRel32Directive =
nullptr;
209 const char *DTPRel64Directive =
nullptr;
210 const char *TPRel32Directive =
nullptr;
211 const char *TPRel64Directive =
nullptr;
216 bool SunStyleELFSectionSwitchSyntax =
false;
221 bool UsesELFSectionDirectiveForBSS =
false;
223 bool NeedsDwarfSectionOffsetDirective =
false;
231 bool AlignmentIsInBytes =
true;
235 unsigned TextAlignFillValue = 0;
248 bool SetDirectiveSuppressesReloc =
false;
263 bool HasAggressiveSymbolFolding =
true;
267 bool COMMDirectiveAlignmentIsInBytes =
true;
275 bool HasFunctionAlignment =
true;
279 bool HasDotTypeDotSizeDirective =
true;
283 bool HasSingleParameterDotFile =
true;
287 bool HasIdentDirective =
false;
291 bool HasNoDeadStrip =
false;
295 bool HasAltEntry =
false;
302 const char *WeakRefDirective =
nullptr;
306 bool HasWeakDefDirective =
false;
310 bool HasWeakDefCanBeHiddenDirective =
false;
314 bool HasLinkOnceDirective =
false;
332 bool SupportsDebugInformation =
false;
342 bool DwarfUsesRelocationsAcrossSections =
true;
346 bool DwarfFDESymbolsUseAbsDiff =
false;
350 bool DwarfRegNumForCFI =
false;
354 bool UseParensForSymbolVariant =
false;
358 bool SupportsExtendedDwarfLocDirective =
true;
381 bool UseLogicalShr =
true;
385 bool RelaxELFRelocations =
true;
389 bool HasMipsExpressions =
false;
401 return CalleeSaveStackSlotSize;
438 virtual const MCExpr *getExprForPersonalitySymbol(
const MCSymbol *Sym,
460 return SunStyleELFSectionSwitchSyntax;
464 return UsesELFSectionDirectiveForBSS;
468 return NeedsDwarfSectionOffsetDirective;
495 return LinkerPrivateGlobalPrefix[0] !=
'\0';
499 if (hasLinkerPrivateGlobalPrefix())
500 return LinkerPrivateGlobalPrefix;
501 return getPrivateGlobalPrefix();
514 return UseDataRegionDirectives;
525 return SetDirectiveSuppressesReloc;
531 return COMMDirectiveAlignmentIsInBytes;
535 return LCOMMDirectiveAlignmentType;
549 return HasWeakDefCanBeHiddenDirective;
557 return HiddenDeclarationVisibilityAttr;
561 return ProtectedVisibilityAttr;
591 return DwarfUsesRelocationsAcrossSections;
598 return SupportsExtendedDwarfLocDirective;
602 InitialFrameState.push_back(Inst);
606 return InitialFrameState;
614 UseIntegratedAssembler = Value;
622 PreserveAsmComments = Value;
626 return CompressDebugSections;
630 this->CompressDebugSections = CompressDebugSections;
642 #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 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
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
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
amdgpu Simplify well known AMD library false Value Value const Twine & Name
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
DebugCompressionType compressDebugSections() const
bool hasAggressiveSymbolFolding() const
Context object for machine code objects.
const char * getWeakDirective() const
void addInitialFrameState(const MCCFIInstruction &Inst)
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
unsigned getMaxInstLength() 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
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
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
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.
ExceptionHandling getExceptionHandlingType() const
void setExceptionsType(ExceptionHandling EH)
bool doesSupportExceptionHandling() const
const char * getCode64Directive() const
StringRef - Represent a constant reference to a string, i.e.
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