LLVM 19.0.0git
MCAsmInfo.h
Go to the documentation of this file.
1//===-- llvm/MC/MCAsmInfo.h - Asm info --------------------------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// This file contains a class to be used as the basis for target specific
10// asm writers. This class primarily takes care of global printing constants,
11// which are used in very similar ways across all targets.
12//
13//===----------------------------------------------------------------------===//
14
15#ifndef LLVM_MC_MCASMINFO_H
16#define LLVM_MC_MCASMINFO_H
17
18#include "llvm/ADT/StringRef.h"
21#include <vector>
22
23namespace llvm {
24
25class MCContext;
26class MCCFIInstruction;
27class MCExpr;
28class MCSection;
29class MCStreamer;
30class MCSubtargetInfo;
31class MCSymbol;
32
33namespace WinEH {
34
35enum class EncodingType {
36 Invalid, /// Invalid
37 Alpha, /// Windows Alpha
38 Alpha64, /// Windows AXP64
39 ARM, /// Windows NT (Windows on ARM)
40 CE, /// Windows CE ARM, PowerPC, SH3, SH4
41 Itanium, /// Windows x64, Windows Itanium (IA-64)
42 X86, /// Windows x86, uses no CFI, just EH tables
43 MIPS = Alpha,
44};
45
46} // end namespace WinEH
47
48namespace LCOMM {
49
51
52} // end namespace LCOMM
53
54/// This class is intended to be used as a base class for asm
55/// properties and features specific to the target.
56class MCAsmInfo {
57public:
58 /// Assembly character literal syntax types.
60 ACLS_Unknown, /// Unknown; character literals not used by LLVM for this
61 /// target.
62 ACLS_SingleQuotePrefix, /// The desired character is prefixed by a single
63 /// quote, e.g., `'A`.
64 };
65
66protected:
67 //===------------------------------------------------------------------===//
68 // Properties to be set by the target writer, used to configure asm printer.
69 //
70
71 /// Code pointer size in bytes. Default is 4.
72 unsigned CodePointerSize = 4;
73
74 /// Size of the stack slot reserved for callee-saved registers, in bytes.
75 /// Default is same as pointer size.
77
78 /// True if target is little endian. Default is true.
79 bool IsLittleEndian = true;
80
81 /// True if target stack grow up. Default is false.
82 bool StackGrowsUp = false;
83
84 /// True if this target has the MachO .subsections_via_symbols directive.
85 /// Default is false.
87
88 /// True if this is a MachO target that supports the macho-specific .zerofill
89 /// directive for emitting BSS Symbols. Default is false.
91
92 /// True if this is a MachO target that supports the macho-specific .tbss
93 /// directive for emitting thread local BSS Symbols. Default is false.
95
96 /// True if this is a non-GNU COFF target. The COFF port of the GNU linker
97 /// doesn't handle associative comdats in the way that we would like to use
98 /// them.
100
101 /// True if this is a non-GNU COFF target. For GNU targets, we don't generate
102 /// constants into comdat sections.
104
105 /// True if this is an XCOFF target that supports visibility attributes as
106 /// part of .global, .weak, .extern, and .comm. Default is false.
108
109 /// This is the maximum possible length of an instruction, which is needed to
110 /// compute the size of an inline asm. Defaults to 4.
111 unsigned MaxInstLength = 4;
112
113 /// Every possible instruction length is a multiple of this value. Factored
114 /// out in .debug_frame and .debug_line. Defaults to 1.
115 unsigned MinInstAlignment = 1;
116
117 /// The '$' token, when not referencing an identifier or constant, refers to
118 /// the current PC. Defaults to false.
119 bool DollarIsPC = false;
120
121 /// Allow '.' token, when not referencing an identifier or constant, to refer
122 /// to the current PC. Defaults to true.
123 bool DotIsPC = true;
124
125 /// Whether the '*' token refers to the current PC. This is used for the
126 /// HLASM dialect.
127 bool StarIsPC = false;
128
129 /// This string, if specified, is used to separate instructions from each
130 /// other when on the same line. Defaults to ';'
131 const char *SeparatorString;
132
133 /// This indicates the comment string used by the assembler. Defaults to
134 /// "#"
136
137 /// This indicates whether the comment string is only accepted as a comment
138 /// at the beginning of statements. Defaults to false.
140
141 /// This indicates whether to allow additional "comment strings" to be lexed
142 /// as a comment. Setting this attribute to true, will ensure that C-style
143 /// line comments (// ..), C-style block comments (/* .. */), and "#" are
144 /// all treated as comments in addition to the string specified by the
145 /// CommentString attribute.
146 /// Default is true.
148
149 /// Should we emit the '\t' as the starting indentation marker for GNU inline
150 /// asm statements. Defaults to true.
152
153 /// This is appended to emitted labels. Defaults to ":"
154 const char *LabelSuffix;
155
156 /// Emit labels in purely upper case. Defaults to false.
158
159 // Print the EH begin symbol with an assignment. Defaults to false.
161
162 // Do we need to create a local symbol for .size?
163 bool NeedsLocalForSize = false;
164
165 /// This prefix is used for globals like constant pool entries that are
166 /// completely private to the .s file and should not have names in the .o
167 /// file. Defaults to "L"
169
170 /// This prefix is used for labels for basic blocks. Defaults to the same as
171 /// PrivateGlobalPrefix.
173
174 /// This prefix is used for symbols that should be passed through the
175 /// assembler but be removed by the linker. This is 'l' on Darwin, currently
176 /// used for some ObjC metadata. The default of "" meast that for this system
177 /// a plain private symbol should be used. Defaults to "".
179
180 /// If these are nonempty, they contain a directive to emit before and after
181 /// an inline assembly statement. Defaults to "#APP\n", "#NO_APP\n"
182 const char *InlineAsmStart;
183 const char *InlineAsmEnd;
184
185 /// These are assembly directives that tells the assembler to interpret the
186 /// following instructions differently. Defaults to ".code16", ".code32",
187 /// ".code64".
188 const char *Code16Directive;
189 const char *Code32Directive;
190 const char *Code64Directive;
191
192 /// Which dialect of an assembler variant to use. Defaults to 0
193 unsigned AssemblerDialect = 0;
194
195 /// This is true if the assembler allows @ characters in symbol names.
196 /// Defaults to false.
197 bool AllowAtInName = false;
198
199 /// This is true if the assembler allows the "?" character at the start of
200 /// of a string to be lexed as an AsmToken::Identifier.
201 /// If the AsmLexer determines that the string can be lexed as a possible
202 /// comment, setting this option will have no effect, and the string will
203 /// still be lexed as a comment.
205
206 /// This is true if the assembler allows the "$" character at the start of
207 /// of a string to be lexed as an AsmToken::Identifier.
208 /// If the AsmLexer determines that the string can be lexed as a possible
209 /// comment, setting this option will have no effect, and the string will
210 /// still be lexed as a comment.
212
213 /// This is true if the assembler allows the "@" character at the start of
214 /// a string to be lexed as an AsmToken::Identifier.
215 /// If the AsmLexer determines that the string can be lexed as a possible
216 /// comment, setting this option will have no effect, and the string will
217 /// still be lexed as a comment.
219
220 /// This is true if the assembler allows the "#" character at the start of
221 /// a string to be lexed as an AsmToken::Identifier.
222 /// If the AsmLexer determines that the string can be lexed as a possible
223 /// comment, setting this option will have no effect, and the string will
224 /// still be lexed as a comment.
226
227 /// If this is true, symbol names with invalid characters will be printed in
228 /// quotes.
230
231 /// This is true if data region markers should be printed as
232 /// ".data_region/.end_data_region" directives. If false, use "$d/$a" labels
233 /// instead.
235
236 /// True if .align is to be used for alignment. Only power-of-two
237 /// alignment is supported.
239
240 /// True if the target supports LEB128 directives.
242
243 /// True if full register names are printed.
245
246 //===--- Data Emission Directives -------------------------------------===//
247
248 /// This should be set to the directive used to get some number of zero (and
249 /// non-zero if supported by the directive) bytes emitted to the current
250 /// section. Common cases are "\t.zero\t" and "\t.space\t". Defaults to
251 /// "\t.zero\t"
252 const char *ZeroDirective;
253
254 /// This should be set to true if the zero directive supports a value to emit
255 /// other than zero. If this is set to false, the Data*bitsDirective's will be
256 /// used to emit these bytes. Defaults to true.
258
259 /// This directive allows emission of an ascii string with the standard C
260 /// escape characters embedded into it. If a target doesn't support this, it
261 /// can be set to null. Defaults to "\t.ascii\t"
262 const char *AsciiDirective;
263
264 /// If not null, this allows for special handling of zero terminated strings
265 /// on this target. This is commonly supported as ".asciz". If a target
266 /// doesn't support this, it can be set to null. Defaults to "\t.asciz\t"
267 const char *AscizDirective;
268
269 /// This directive accepts a comma-separated list of bytes for emission as a
270 /// string of bytes. For targets that do not support this, it shall be set to
271 /// null. Defaults to null.
272 const char *ByteListDirective = nullptr;
273
274 /// This directive allows emission of a zero-terminated ascii string without
275 /// the standard C escape characters embedded into it. If a target doesn't
276 /// support this, it can be set to null. Defaults to null.
277 const char *PlainStringDirective = nullptr;
278
279 /// Form used for character literals in the assembly syntax. Useful for
280 /// producing strings as byte lists. If a target does not use or support
281 /// this, it shall be set to ACLS_Unknown. Defaults to ACLS_Unknown.
283
284 /// These directives are used to output some unit of integer data to the
285 /// current section. If a data directive is set to null, smaller data
286 /// directives will be used to emit the large sizes. Defaults to "\t.byte\t",
287 /// "\t.short\t", "\t.long\t", "\t.quad\t"
292
293 /// True if data directives support signed values
295
296 /// If non-null, a directive that is used to emit a word which should be
297 /// relocated as a 64-bit GP-relative offset, e.g. .gpdword on Mips. Defaults
298 /// to nullptr.
299 const char *GPRel64Directive = nullptr;
300
301 /// If non-null, a directive that is used to emit a word which should be
302 /// relocated as a 32-bit GP-relative offset, e.g. .gpword on Mips or .gprel32
303 /// on Alpha. Defaults to nullptr.
304 const char *GPRel32Directive = nullptr;
305
306 /// If non-null, directives that are used to emit a word/dword which should
307 /// be relocated as a 32/64-bit DTP/TP-relative offset, e.g. .dtprelword/
308 /// .dtpreldword/.tprelword/.tpreldword on Mips.
309 const char *DTPRel32Directive = nullptr;
310 const char *DTPRel64Directive = nullptr;
311 const char *TPRel32Directive = nullptr;
312 const char *TPRel64Directive = nullptr;
313
314 /// This is true if this target uses "Sun Style" syntax for section switching
315 /// ("#alloc,#write" etc) instead of the normal ELF syntax (,"a,w") in
316 /// .section directives. Defaults to false.
318
319 /// This is true if this target uses ELF '.section' directive before the
320 /// '.bss' one. It's used for PPC/Linux which doesn't support the '.bss'
321 /// directive only. Defaults to false.
323
325
326 //===--- Alignment Information ----------------------------------------===//
327
328 /// If this is true (the default) then the asmprinter emits ".align N"
329 /// directives, where N is the number of bytes to align to. Otherwise, it
330 /// emits ".align log2(N)", e.g. 3 to align to an 8 byte boundary. Defaults
331 /// to true.
333
334 /// If non-zero, this is used to fill the executable space created as the
335 /// result of a alignment directive. Defaults to 0
336 unsigned TextAlignFillValue = 0;
337
338 //===--- Global Variable Emission Directives --------------------------===//
339
340 /// This is the directive used to declare a global entity. Defaults to
341 /// ".globl".
342 const char *GlobalDirective;
343
344 /// True if the expression
345 /// .long f - g
346 /// uses a relocation but it can be suppressed by writing
347 /// a = f - g
348 /// .long a
350
351 /// False if the assembler requires that we use
352 /// \code
353 /// Lc = a - b
354 /// .long Lc
355 /// \endcode
356 //
357 /// instead of
358 //
359 /// \code
360 /// .long a - b
361 /// \endcode
362 ///
363 /// Defaults to true.
365
366 /// True is .comm's and .lcomms optional alignment is to be specified in bytes
367 /// instead of log2(n). Defaults to true.
369
370 /// Describes if the .lcomm directive for the target supports an alignment
371 /// argument and how it is interpreted. Defaults to NoAlignment.
373
374 /// True if the target only has basename for .file directive. False if the
375 /// target also needs the directory along with the basename. Defaults to true.
377
378 /// True if the target represents string constants as mostly raw characters in
379 /// paired double quotation with paired double quotation marks as the escape
380 /// mechanism to represent a double quotation mark within the string. Defaults
381 /// to false.
383
384 // True if the target allows .align directives on functions. This is true for
385 // most targets, so defaults to true.
387
388 /// True if the target has .type and .size directives, this is true for most
389 /// ELF targets. Defaults to true.
391
392 /// True if the target has a single parameter .file directive, this is true
393 /// for ELF targets. Defaults to true.
395
396 /// True if the target has a four strings .file directive, strings separated
397 /// by comma. Defaults to false.
399
400 /// True if the target has a .ident directive, this is true for ELF targets.
401 /// Defaults to false.
402 bool HasIdentDirective = false;
403
404 /// True if this target supports the MachO .no_dead_strip directive. Defaults
405 /// to false.
406 bool HasNoDeadStrip = false;
407
408 /// True if this target supports the MachO .alt_entry directive. Defaults to
409 /// false.
410 bool HasAltEntry = false;
411
412 /// Used to declare a global as being a weak symbol. Defaults to ".weak".
413 const char *WeakDirective;
414
415 /// This directive, if non-null, is used to declare a global as being a weak
416 /// undefined symbol. Defaults to nullptr.
417 const char *WeakRefDirective = nullptr;
418
419 /// True if we have a directive to declare a global as being a weak defined
420 /// symbol. Defaults to false.
422
423 /// True if we have a directive to declare a global as being a weak defined
424 /// symbol that can be hidden (unexported). Defaults to false.
426
427 /// True if we should mark symbols as global instead of weak, for
428 /// weak*/linkonce*, if the symbol has a comdat.
429 /// Defaults to false.
430 bool AvoidWeakIfComdat = false;
431
432 /// This attribute, if not MCSA_Invalid, is used to declare a symbol as having
433 /// hidden visibility. Defaults to MCSA_Hidden.
435
436 /// This attribute, if not MCSA_Invalid, is used to declare a symbol as having
437 /// exported visibility. Defaults to MCSA_Exported.
439
440 /// This attribute, if not MCSA_Invalid, is used to declare an undefined
441 /// symbol as having hidden visibility. Defaults to MCSA_Hidden.
443
444 /// This attribute, if not MCSA_Invalid, is used to declare a symbol as having
445 /// protected visibility. Defaults to MCSA_Protected
447
449
450 //===--- Dwarf Emission Directives -----------------------------------===//
451
452 /// True if target supports emission of debugging information. Defaults to
453 /// false.
455
456 /// Exception handling format for the target. Defaults to None.
458
459 /// True if target uses CFI unwind information for other purposes than EH
460 /// (debugging / sanitizers) when `ExceptionsType == ExceptionHandling::None`.
461 bool UsesCFIWithoutEH = false;
462
463 /// Windows exception handling data (.pdata) encoding. Defaults to Invalid.
465
466 /// True if Dwarf2 output generally uses relocations for references to other
467 /// .debug_* sections.
469
470 /// True if DWARF FDE symbol reference relocations should be replaced by an
471 /// absolute difference.
473
474 /// True if the target supports generating the DWARF line table through using
475 /// the .loc/.file directives. Defaults to true.
477
478 /// True if DWARF `.file directory' directive syntax is used by
479 /// default.
481
482 /// True if the target needs the DWARF section length in the header (if any)
483 /// of the DWARF section in the assembly file. Defaults to true.
485
486 /// True if dwarf register numbers are printed instead of symbolic register
487 /// names in .cfi_* directives. Defaults to false.
488 bool DwarfRegNumForCFI = false;
489
490 /// True if target uses parens to indicate the symbol variant instead of @.
491 /// For example, foo(plt) instead of foo@plt. Defaults to false.
493
494 /// True if the target uses parens for symbol names starting with
495 /// '$' character to distinguish them from absolute names.
497
498 /// True if the target supports flags in ".loc" directive, false if only
499 /// location is allowed.
501
502 //===--- Prologue State ----------------------------------------------===//
503
504 std::vector<MCCFIInstruction> InitialFrameState;
505
506 //===--- Integrated Assembler Information ----------------------------===//
507
508 // Generated object files can use all ELF features supported by GNU ld of
509 // this binutils version and later. INT_MAX means all features can be used,
510 // regardless of GNU ld support. The default value is referenced by
511 // clang/Driver/Options.td.
512 std::pair<int, int> BinutilsVersion = {2, 26};
513
514 /// Should we use the integrated assembler?
515 /// The integrated assembler should be enabled by default (by the
516 /// constructors) when failing to parse a valid piece of assembly (inline
517 /// or otherwise) is considered a bug. It may then be overridden after
518 /// construction (see LLVMTargetMachine::initAsmInfo()).
520
521 /// Use AsmParser to parse inlineAsm when UseIntegratedAssembler is not set.
523
524 /// Preserve Comments in assembly
526
527 /// True if the integrated assembler should interpret 'a >> b' constant
528 /// expressions as logical rather than arithmetic.
529 bool UseLogicalShr = true;
530
531 // If true, then the lexer and expression parser will support %neg(),
532 // %hi(), and similar unary operators.
533 bool HasMipsExpressions = false;
534
535 // If true, use Motorola-style integers in Assembly (ex. $0ac).
537
538 // If true, emit function descriptor symbol on AIX.
540
541public:
542 explicit MCAsmInfo();
543 virtual ~MCAsmInfo();
544
545 /// Get the code pointer size in bytes.
546 unsigned getCodePointerSize() const { return CodePointerSize; }
547
548 /// Get the callee-saved register stack slot
549 /// size in bytes.
550 unsigned getCalleeSaveStackSlotSize() const {
552 }
553
554 /// True if the target is little endian.
555 bool isLittleEndian() const { return IsLittleEndian; }
556
557 /// True if target stack grow up.
558 bool isStackGrowthDirectionUp() const { return StackGrowsUp; }
559
561
562 // Data directive accessors.
563
564 const char *getData8bitsDirective() const { return Data8bitsDirective; }
565 const char *getData16bitsDirective() const { return Data16bitsDirective; }
566 const char *getData32bitsDirective() const { return Data32bitsDirective; }
567 const char *getData64bitsDirective() const { return Data64bitsDirective; }
568 bool supportsSignedData() const { return SupportsSignedData; }
569 const char *getGPRel64Directive() const { return GPRel64Directive; }
570 const char *getGPRel32Directive() const { return GPRel32Directive; }
571 const char *getDTPRel64Directive() const { return DTPRel64Directive; }
572 const char *getDTPRel32Directive() const { return DTPRel32Directive; }
573 const char *getTPRel64Directive() const { return TPRel64Directive; }
574 const char *getTPRel32Directive() const { return TPRel32Directive; }
575
576 /// Targets can implement this method to specify a section to switch to if the
577 /// translation unit doesn't have any trampolines that require an executable
578 /// stack.
580 return nullptr;
581 }
582
583 virtual const MCExpr *getExprForPersonalitySymbol(const MCSymbol *Sym,
584 unsigned Encoding,
585 MCStreamer &Streamer) const;
586
587 virtual const MCExpr *getExprForFDESymbol(const MCSymbol *Sym,
588 unsigned Encoding,
589 MCStreamer &Streamer) const;
590
591 /// Return true if C is an acceptable character inside a symbol name.
592 virtual bool isAcceptableChar(char C) const;
593
594 /// Return true if the identifier \p Name does not need quotes to be
595 /// syntactically correct.
596 virtual bool isValidUnquotedName(StringRef Name) const;
597
598 /// Return true if the .section directive should be omitted when
599 /// emitting \p SectionName. For example:
600 ///
601 /// shouldOmitSectionDirective(".text")
602 ///
603 /// returns false => .section .text,#alloc,#execinstr
604 /// returns true => .text
606
609 }
610
613 }
614
617 }
618
619 // Accessors.
620
627 }
628
629 /// Returns the maximum possible encoded instruction size in bytes. If \p STI
630 /// is null, this should be the maximum size for any subtarget.
631 virtual unsigned getMaxInstLength(const MCSubtargetInfo *STI = nullptr) const {
632 return MaxInstLength;
633 }
634
635 unsigned getMinInstAlignment() const { return MinInstAlignment; }
636 bool getDollarIsPC() const { return DollarIsPC; }
637 bool getDotIsPC() const { return DotIsPC; }
638 bool getStarIsPC() const { return StarIsPC; }
639 const char *getSeparatorString() const { return SeparatorString; }
640
641 /// This indicates the column (zero-based) at which asm comments should be
642 /// printed.
643 unsigned getCommentColumn() const { return 40; }
644
648 }
652 }
653 const char *getLabelSuffix() const { return LabelSuffix; }
655
657 bool needsLocalForSize() const { return NeedsLocalForSize; }
660
663 }
664
668 return getPrivateGlobalPrefix();
669 }
670
671 const char *getInlineAsmStart() const { return InlineAsmStart; }
672 const char *getInlineAsmEnd() const { return InlineAsmEnd; }
673 const char *getCode16Directive() const { return Code16Directive; }
674 const char *getCode32Directive() const { return Code32Directive; }
675 const char *getCode64Directive() const { return Code64Directive; }
676 unsigned getAssemblerDialect() const { return AssemblerDialect; }
677 bool doesAllowAtInName() const { return AllowAtInName; }
678 void setAllowAtInName(bool V) { AllowAtInName = V; }
681 }
684 }
687 }
690 }
692
695 }
696
699 }
700
702
705
706 const char *getZeroDirective() const { return ZeroDirective; }
709 }
710 const char *getAsciiDirective() const { return AsciiDirective; }
711 const char *getAscizDirective() const { return AscizDirective; }
712 const char *getByteListDirective() const { return ByteListDirective; }
713 const char *getPlainStringDirective() const { return PlainStringDirective; }
716 }
718 unsigned getTextAlignFillValue() const { return TextAlignFillValue; }
719 const char *getGlobalDirective() const { return GlobalDirective; }
720
723 }
724
726
729 }
730
733 }
734
737 }
740 }
745 bool hasIdentDirective() const { return HasIdentDirective; }
746 bool hasNoDeadStrip() const { return HasNoDeadStrip; }
747 bool hasAltEntry() const { return HasAltEntry; }
748 const char *getWeakDirective() const { return WeakDirective; }
749 const char *getWeakRefDirective() const { return WeakRefDirective; }
751
754 }
755
756 bool avoidWeakIfComdat() const { return AvoidWeakIfComdat; }
757
759
761
764 }
765
768 }
769
771
773
776
778 ExceptionsType = EH;
779 }
780
781 bool usesCFIWithoutEH() const {
783 }
784
785 /// Returns true if the exception handling method for the platform uses call
786 /// frame information to unwind.
787 bool usesCFIForEH() const {
791 }
792
793 bool usesWindowsCFI() const {
797 }
798
801 }
802
808 }
811 }
812
815 }
816
819 }
820
823 }
824
825 void addInitialFrameState(const MCCFIInstruction &Inst);
826
827 const std::vector<MCCFIInstruction> &getInitialFrameState() const {
828 return InitialFrameState;
829 }
830
831 void setBinutilsVersion(std::pair<int, int> Value) {
833 }
834
835 /// Return true if assembly (inline or otherwise) should be parsed.
837
838 /// Return true if target want to use AsmParser to parse inlineasm.
841 }
842
843 bool binutilsIsAtLeast(int Major, int Minor) const {
844 return BinutilsVersion >= std::make_pair(Major, Minor);
845 }
846
847 /// Set whether assembly (inline or otherwise) should be parsed.
848 virtual void setUseIntegratedAssembler(bool Value) {
850 }
851
852 /// Set whether target want to use AsmParser to parse inlineasm.
855 }
856
857 /// Return true if assembly (inline or otherwise) should be parsed.
859
860 /// Set whether assembly (inline or otherwise) should be parsed.
861 virtual void setPreserveAsmComments(bool Value) {
863 }
864
865
866 bool shouldUseLogicalShr() const { return UseLogicalShr; }
867
868 bool hasMipsExpressions() const { return HasMipsExpressions; }
871};
872
873} // end namespace llvm
874
875#endif // LLVM_MC_MCASMINFO_H
std::string Name
Symbol * Sym
Definition: ELF_riscv.cpp:479
This class is intended to be used as a base class for asm properties and features specific to the tar...
Definition: MCAsmInfo.h:56
StringRef getPrivateGlobalPrefix() const
Definition: MCAsmInfo.h:658
bool RestrictCommentStringToStartOfStatement
This indicates whether the comment string is only accepted as a comment at the beginning of statement...
Definition: MCAsmInfo.h:139
bool needsFunctionDescriptors() const
Definition: MCAsmInfo.h:869
const char * Data16bitsDirective
Definition: MCAsmInfo.h:289
bool hasCOFFAssociativeComdats() const
Definition: MCAsmInfo.h:623
void addInitialFrameState(const MCCFIInstruction &Inst)
Definition: MCAsmInfo.cpp:75
bool NeedsDwarfSectionOffsetDirective
Definition: MCAsmInfo.h:324
bool useParensForSymbolVariant() const
Definition: MCAsmInfo.h:805
const char * getPlainStringDirective() const
Definition: MCAsmInfo.h:713
const char * getLabelSuffix() const
Definition: MCAsmInfo.h:653
void setAllowAtInName(bool V)
Definition: MCAsmInfo.h:678
MCSymbolAttr ExportedVisibilityAttr
This attribute, if not MCSA_Invalid, is used to declare a symbol as having exported visibility.
Definition: MCAsmInfo.h:438
bool preserveAsmComments() const
Return true if assembly (inline or otherwise) should be parsed.
Definition: MCAsmInfo.h:858
bool supportsSignedData() const
Definition: MCAsmInfo.h:568
const char * getInlineAsmStart() const
Definition: MCAsmInfo.h:671
bool HasAltEntry
True if this target supports the MachO .alt_entry directive.
Definition: MCAsmInfo.h:410
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...
Definition: MCAsmInfo.h:309
bool hasDotTypeDotSizeDirective() const
Definition: MCAsmInfo.h:742
bool isLittleEndian() const
True if the target is little endian.
Definition: MCAsmInfo.h:555
unsigned MinInstAlignment
Every possible instruction length is a multiple of this value.
Definition: MCAsmInfo.h:115
bool HasNoDeadStrip
True if this target supports the MachO .no_dead_strip directive.
Definition: MCAsmInfo.h:406
bool AllowAdditionalComments
This indicates whether to allow additional "comment strings" to be lexed as a comment.
Definition: MCAsmInfo.h:147
const char * PlainStringDirective
This directive allows emission of a zero-terminated ascii string without the standard C escape charac...
Definition: MCAsmInfo.h:277
unsigned TextAlignFillValue
If non-zero, this is used to fill the executable space created as the result of a alignment directive...
Definition: MCAsmInfo.h:336
bool AllowQuestionAtStartOfIdentifier
This is true if the assembler allows the "?" character at the start of of a string to be lexed as an ...
Definition: MCAsmInfo.h:204
bool useIntegratedAssembler() const
Return true if assembly (inline or otherwise) should be parsed.
Definition: MCAsmInfo.h:836
MCSymbolAttr ProtectedVisibilityAttr
This attribute, if not MCSA_Invalid, is used to declare a symbol as having protected visibility.
Definition: MCAsmInfo.h:446
bool HasFunctionAlignment
Definition: MCAsmInfo.h:386
bool HasBasenameOnlyForFileDirective
True if the target only has basename for .file directive.
Definition: MCAsmInfo.h:376
const char * AsciiDirective
This directive allows emission of an ascii string with the standard C escape characters embedded into...
Definition: MCAsmInfo.h:262
bool hasBasenameOnlyForFileDirective() const
Definition: MCAsmInfo.h:735
std::vector< MCCFIInstruction > InitialFrameState
Definition: MCAsmInfo.h:504
bool getRestrictCommentStringToStartOfStatement() const
Definition: MCAsmInfo.h:646
MCSymbolAttr getProtectedVisibilityAttr() const
Definition: MCAsmInfo.h:766
bool usesSunStyleELFSectionSwitchSyntax() const
Definition: MCAsmInfo.h:607
bool doesAllowDollarAtStartOfIdentifier() const
Definition: MCAsmInfo.h:685
const char * Code64Directive
Definition: MCAsmInfo.h:190
virtual unsigned getMaxInstLength(const MCSubtargetInfo *STI=nullptr) const
Returns the maximum possible encoded instruction size in bytes.
Definition: MCAsmInfo.h:631
unsigned getMinInstAlignment() const
Definition: MCAsmInfo.h:635
bool hasLEB128Directives() const
Definition: MCAsmInfo.h:701
bool doesSupportDataRegionDirectives() const
Definition: MCAsmInfo.h:693
const char * Code32Directive
Definition: MCAsmInfo.h:189
MCSymbolAttr getExportedVisibilityAttr() const
Definition: MCAsmInfo.h:760
const char * ByteListDirective
This directive accepts a comma-separated list of bytes for emission as a string of bytes.
Definition: MCAsmInfo.h:272
bool HasSubsectionsViaSymbols
True if this target has the MachO .subsections_via_symbols directive.
Definition: MCAsmInfo.h:86
const char * getTPRel64Directive() const
Definition: MCAsmInfo.h:573
bool HasFourStringsDotFile
True if the target has a four strings .file directive, strings separated by comma.
Definition: MCAsmInfo.h:398
const char * getData32bitsDirective() const
Definition: MCAsmInfo.h:566
const char * Data8bitsDirective
These directives are used to output some unit of integer data to the current section.
Definition: MCAsmInfo.h:288
const char * Data64bitsDirective
Definition: MCAsmInfo.h:291
const std::vector< MCCFIInstruction > & getInitialFrameState() const
Definition: MCAsmInfo.h:827
const char * DTPRel64Directive
Definition: MCAsmInfo.h:310
bool useFullRegisterNames() const
Definition: MCAsmInfo.h:703
bool hasFourStringsDotFile() const
Definition: MCAsmInfo.h:744
unsigned getAssemblerDialect() const
Definition: MCAsmInfo.h:676
virtual void setUseIntegratedAssembler(bool Value)
Set whether assembly (inline or otherwise) should be parsed.
Definition: MCAsmInfo.h:848
bool DollarIsPC
The '$' token, when not referencing an identifier or constant, refers to the current PC.
Definition: MCAsmInfo.h:119
virtual ~MCAsmInfo()
const char * getInlineAsmEnd() const
Definition: MCAsmInfo.h:672
bool HasVisibilityOnlyWithLinkage
True if this is an XCOFF target that supports visibility attributes as part of .global,...
Definition: MCAsmInfo.h:107
unsigned getTextAlignFillValue() const
Definition: MCAsmInfo.h:718
StringRef getLinkerPrivateGlobalPrefix() const
Definition: MCAsmInfo.h:665
bool doesAllowAtInName() const
Definition: MCAsmInfo.h:677
bool useDwarfRegNumForCFI() const
Definition: MCAsmInfo.h:804
bool useAssignmentForEHBegin() const
Definition: MCAsmInfo.h:656
bool usesCFIWithoutEH() const
Definition: MCAsmInfo.h:781
bool hasMipsExpressions() const
Definition: MCAsmInfo.h:868
bool supportsExtendedDwarfLocDirective() const
Definition: MCAsmInfo.h:809
bool AvoidWeakIfComdat
True if we should mark symbols as global instead of weak, for weak*‍/linkonce*, if the symbol has a c...
Definition: MCAsmInfo.h:430
bool UsesDwarfFileAndLocDirectives
True if the target supports generating the DWARF line table through using the .loc/....
Definition: MCAsmInfo.h:476
bool NeedsLocalForSize
Definition: MCAsmInfo.h:163
StringRef getPrivateLabelPrefix() const
Definition: MCAsmInfo.h:659
ExceptionHandling ExceptionsType
Exception handling format for the target. Defaults to None.
Definition: MCAsmInfo.h:457
bool shouldEmitLabelsInUpperCase() const
Definition: MCAsmInfo.h:654
bool AllowDollarAtStartOfIdentifier
This is true if the assembler allows the "$" character at the start of of a string to be lexed as an ...
Definition: MCAsmInfo.h:211
bool PreserveAsmComments
Preserve Comments in assembly.
Definition: MCAsmInfo.h:525
const char * LabelSuffix
This is appended to emitted labels. Defaults to ":".
Definition: MCAsmInfo.h:154
StringRef PrivateGlobalPrefix
This prefix is used for globals like constant pool entries that are completely private to the ....
Definition: MCAsmInfo.h:168
bool DwarfFDESymbolsUseAbsDiff
True if DWARF FDE symbol reference relocations should be replaced by an absolute difference.
Definition: MCAsmInfo.h:472
const char * getData8bitsDirective() const
Definition: MCAsmInfo.h:564
const char * getTPRel32Directive() const
Definition: MCAsmInfo.h:574
bool hasAltEntry() const
Definition: MCAsmInfo.h:747
const char * TPRel64Directive
Definition: MCAsmInfo.h:312
const char * getData64bitsDirective() const
Definition: MCAsmInfo.h:567
AsmCharLiteralSyntax characterLiteralSyntax() const
Definition: MCAsmInfo.h:714
bool avoidWeakIfComdat() const
Definition: MCAsmInfo.h:756
bool UseDotAlignForAlignment
True if .align is to be used for alignment.
Definition: MCAsmInfo.h:238
const char * getByteListDirective() const
Definition: MCAsmInfo.h:712
bool SetDirectiveSuppressesReloc
True if the expression .long f - g uses a relocation but it can be suppressed by writing a = f - g ....
Definition: MCAsmInfo.h:349
bool hasVisibilityOnlyWithLinkage() const
Definition: MCAsmInfo.h:625
const char * getCode16Directive() const
Definition: MCAsmInfo.h:673
const char * Data32bitsDirective
Definition: MCAsmInfo.h:290
bool UseIntegratedAssembler
Should we use the integrated assembler? The integrated assembler should be enabled by default (by the...
Definition: MCAsmInfo.h:519
bool hasMachoZeroFillDirective() const
Definition: MCAsmInfo.h:621
bool shouldUseMotorolaIntegers() const
Definition: MCAsmInfo.h:870
bool supportsNameQuoting() const
Definition: MCAsmInfo.h:691
bool AllowAtAtStartOfIdentifier
This is true if the assembler allows the "@" character at the start of a string to be lexed as an Asm...
Definition: MCAsmInfo.h:218
const char * getGPRel64Directive() const
Definition: MCAsmInfo.h:569
const char * Code16Directive
These are assembly directives that tells the assembler to interpret the following instructions differ...
Definition: MCAsmInfo.h:188
bool UseLogicalShr
True if the integrated assembler should interpret 'a >> b' constant expressions as logical rather tha...
Definition: MCAsmInfo.h:529
bool UseMotorolaIntegers
Definition: MCAsmInfo.h:536
MCSymbolAttr getHiddenDeclarationVisibilityAttr() const
Definition: MCAsmInfo.h:762
const char * GlobalDirective
This is the directive used to declare a global entity.
Definition: MCAsmInfo.h:342
bool getStarIsPC() const
Definition: MCAsmInfo.h:638
bool hasWeakDefDirective() const
Definition: MCAsmInfo.h:750
LCOMM::LCOMMType LCOMMDirectiveAlignmentType
Describes if the .lcomm directive for the target supports an alignment argument and how it is interpr...
Definition: MCAsmInfo.h:372
bool hasWeakDefCanBeHiddenDirective() const
Definition: MCAsmInfo.h:752
WinEH::EncodingType WinEHEncodingType
Windows exception handling data (.pdata) encoding. Defaults to Invalid.
Definition: MCAsmInfo.h:464
bool HasCOFFComdatConstants
True if this is a non-GNU COFF target.
Definition: MCAsmInfo.h:103
virtual void setPreserveAsmComments(bool Value)
Set whether assembly (inline or otherwise) should be parsed.
Definition: MCAsmInfo.h:861
bool hasLinkerPrivateGlobalPrefix() const
Definition: MCAsmInfo.h:661
const char * WeakRefDirective
This directive, if non-null, is used to declare a global as being a weak undefined symbol.
Definition: MCAsmInfo.h:417
StringRef PrivateLabelPrefix
This prefix is used for labels for basic blocks.
Definition: MCAsmInfo.h:172
bool DotIsPC
Allow '.
Definition: MCAsmInfo.h:123
LCOMM::LCOMMType getLCOMMDirectiveAlignmentType() const
Definition: MCAsmInfo.h:731
bool needsDwarfSectionOffsetDirective() const
Definition: MCAsmInfo.h:615
bool shouldUseLogicalShr() const
Definition: MCAsmInfo.h:866
bool HasDotTypeDotSizeDirective
True if the target has .type and .size directives, this is true for most ELF targets.
Definition: MCAsmInfo.h:390
bool usesCFIForEH() const
Returns true if the exception handling method for the platform uses call frame information to unwind.
Definition: MCAsmInfo.h:787
bool AllowAtInName
This is true if the assembler allows @ characters in symbol names.
Definition: MCAsmInfo.h:197
bool EmitLabelsInUpperCase
Emit labels in purely upper case. Defaults to false.
Definition: MCAsmInfo.h:157
unsigned MaxInstLength
This is the maximum possible length of an instruction, which is needed to compute the size of an inli...
Definition: MCAsmInfo.h:111
const char * TPRel32Directive
Definition: MCAsmInfo.h:311
bool HasWeakDefCanBeHiddenDirective
True if we have a directive to declare a global as being a weak defined symbol that can be hidden (un...
Definition: MCAsmInfo.h:425
StringRef getCommentString() const
Definition: MCAsmInfo.h:645
const char * getAscizDirective() const
Definition: MCAsmInfo.h:711
bool StarIsPC
Whether the '*' token refers to the current PC.
Definition: MCAsmInfo.h:127
bool SunStyleELFSectionSwitchSyntax
This is true if this target uses "Sun Style" syntax for section switching ("#alloc,...
Definition: MCAsmInfo.h:317
const char * InlineAsmStart
If these are nonempty, they contain a directive to emit before and after an inline assembly statement...
Definition: MCAsmInfo.h:182
bool useParensForDollarSignNames() const
Definition: MCAsmInfo.h:806
bool UseAssignmentForEHBegin
Definition: MCAsmInfo.h:160
bool HasCOFFAssociativeComdats
True if this is a non-GNU COFF target.
Definition: MCAsmInfo.h:99
bool doesSupportDebugInformation() const
Definition: MCAsmInfo.h:772
bool doesSetDirectiveSuppressReloc() const
Definition: MCAsmInfo.h:721
bool ParseInlineAsmUsingAsmParser
Use AsmParser to parse inlineAsm when UseIntegratedAssembler is not set.
Definition: MCAsmInfo.h:522
bool getDotIsPC() const
Definition: MCAsmInfo.h:637
WinEH::EncodingType getWinEHEncodingType() const
Definition: MCAsmInfo.h:775
bool HasWeakDefDirective
True if we have a directive to declare a global as being a weak defined symbol.
Definition: MCAsmInfo.h:421
bool doesDwarfUseRelocationsAcrossSections() const
Definition: MCAsmInfo.h:799
const char * getDTPRel64Directive() const
Definition: MCAsmInfo.h:571
bool UsesELFSectionDirectiveForBSS
This is true if this target uses ELF '.section' directive before the '.bss' one.
Definition: MCAsmInfo.h:322
virtual void setParseInlineAsmUsingAsmParser(bool Value)
Set whether target want to use AsmParser to parse inlineasm.
Definition: MCAsmInfo.h:853
const char * getZeroDirective() const
Definition: MCAsmInfo.h:706
bool EnableDwarfFileDirectoryDefault
True if DWARF ‘.file directory’ directive syntax is used by default.
Definition: MCAsmInfo.h:480
bool DwarfSectionSizeRequired
True if the target needs the DWARF section length in the header (if any) of the DWARF section in the ...
Definition: MCAsmInfo.h:484
MCSymbolAttr getMemtagAttr() const
Definition: MCAsmInfo.h:770
StringRef LinkerPrivateGlobalPrefix
This prefix is used for symbols that should be passed through the assembler but be removed by the lin...
Definition: MCAsmInfo.h:178
bool SupportsDebugInformation
True if target supports emission of debugging information.
Definition: MCAsmInfo.h:454
void setFullRegisterNames(bool V)
Definition: MCAsmInfo.h:704
const char * getWeakDirective() const
Definition: MCAsmInfo.h:748
virtual const MCExpr * getExprForFDESymbol(const MCSymbol *Sym, unsigned Encoding, MCStreamer &Streamer) const
Definition: MCAsmInfo.cpp:87
bool StackGrowsUp
True if target stack grow up. Default is false.
Definition: MCAsmInfo.h:82
bool HasMachoTBSSDirective
True if this is a MachO target that supports the macho-specific .tbss directive for emitting thread l...
Definition: MCAsmInfo.h:94
bool hasSubsectionsViaSymbols() const
Definition: MCAsmInfo.h:560
bool PPCUseFullRegisterNames
True if full register names are printed.
Definition: MCAsmInfo.h:244
const char * InlineAsmEnd
Definition: MCAsmInfo.h:183
const char * getData16bitsDirective() const
Definition: MCAsmInfo.h:565
const char * getSeparatorString() const
Definition: MCAsmInfo.h:639
bool SupportsSignedData
True if data directives support signed values.
Definition: MCAsmInfo.h:294
bool doesAllowAtAtStartOfIdentifier() const
Definition: MCAsmInfo.h:682
bool getCOMMDirectiveAlignmentIsInBytes() const
Definition: MCAsmInfo.h:727
bool isStackGrowthDirectionUp() const
True if target stack grow up.
Definition: MCAsmInfo.h:558
virtual bool isAcceptableChar(char C) const
Return true if C is an acceptable character inside a symbol name.
Definition: MCAsmInfo.cpp:101
unsigned AssemblerDialect
Which dialect of an assembler variant to use. Defaults to 0.
Definition: MCAsmInfo.h:193
const char * SeparatorString
This string, if specified, is used to separate instructions from each other when on the same line.
Definition: MCAsmInfo.h:131
virtual bool shouldOmitSectionDirective(StringRef SectionName) const
Return true if the .section directive should be omitted when emitting SectionName.
Definition: MCAsmInfo.cpp:122
bool getEmitGNUAsmStartIndentationMarker() const
Definition: MCAsmInfo.h:650
MCSymbolAttr HiddenDeclarationVisibilityAttr
This attribute, if not MCSA_Invalid, is used to declare an undefined symbol as having hidden visibili...
Definition: MCAsmInfo.h:442
bool doesAllowHashAtStartOfIdentifier() const
Definition: MCAsmInfo.h:688
bool HasMipsExpressions
Definition: MCAsmInfo.h:533
bool hasPairedDoubleQuoteStringConstants() const
Definition: MCAsmInfo.h:738
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...
Definition: MCAsmInfo.h:304
bool shouldAllowAdditionalComments() const
Definition: MCAsmInfo.h:649
unsigned getCalleeSaveStackSlotSize() const
Get the callee-saved register stack slot size in bytes.
Definition: MCAsmInfo.h:550
bool UsesCFIWithoutEH
True if target uses CFI unwind information for other purposes than EH (debugging / sanitizers) when E...
Definition: MCAsmInfo.h:461
bool HasIdentDirective
True if the target has a .ident directive, this is true for ELF targets.
Definition: MCAsmInfo.h:402
bool UseParensForDollarSignNames
True if the target uses parens for symbol names starting with '$' character to distinguish them from ...
Definition: MCAsmInfo.h:496
bool DwarfUsesRelocationsAcrossSections
True if Dwarf2 output generally uses relocations for references to other .debug_* sections.
Definition: MCAsmInfo.h:468
bool needsDwarfSectionSizeInHeader() const
Definition: MCAsmInfo.h:817
bool parseInlineAsmUsingAsmParser() const
Return true if target want to use AsmParser to parse inlineasm.
Definition: MCAsmInfo.h:839
bool HasSingleParameterDotFile
True if the target has a single parameter .file directive, this is true for ELF targets.
Definition: MCAsmInfo.h:394
void setBinutilsVersion(std::pair< int, int > Value)
Definition: MCAsmInfo.h:831
bool hasMachoTBSSDirective() const
Definition: MCAsmInfo.h:622
bool doDwarfFDESymbolsUseAbsDiff() const
Definition: MCAsmInfo.h:803
const char * getGlobalDirective() const
Definition: MCAsmInfo.h:719
const char * getCode32Directive() const
Definition: MCAsmInfo.h:674
void setExceptionsType(ExceptionHandling EH)
Definition: MCAsmInfo.h:777
bool doesAllowQuestionAtStartOfIdentifier() const
Definition: MCAsmInfo.h:679
bool COMMDirectiveAlignmentIsInBytes
True is .comm's and .lcomms optional alignment is to be specified in bytes instead of log2(n).
Definition: MCAsmInfo.h:368
bool getAlignmentIsInBytes() const
Definition: MCAsmInfo.h:717
bool AlignmentIsInBytes
If this is true (the default) then the asmprinter emits ".align N" directives, where N is the number ...
Definition: MCAsmInfo.h:332
bool usesWindowsCFI() const
Definition: MCAsmInfo.h:793
bool usesELFSectionDirectiveForBSS() const
Definition: MCAsmInfo.h:611
AsmCharLiteralSyntax CharacterLiteralSyntax
Form used for character literals in the assembly syntax.
Definition: MCAsmInfo.h:282
bool getDollarIsPC() const
Definition: MCAsmInfo.h:636
bool SupportsExtendedDwarfLocDirective
True if the target supports flags in ".loc" directive, false if only location is allowed.
Definition: MCAsmInfo.h:500
bool NeedsFunctionDescriptors
Definition: MCAsmInfo.h:539
bool EmitGNUAsmStartIndentationMarker
Should we emit the '\t' as the starting indentation marker for GNU inline asm statements.
Definition: MCAsmInfo.h:151
bool binutilsIsAtLeast(int Major, int Minor) const
Definition: MCAsmInfo.h:843
bool ZeroDirectiveSupportsNonZeroValue
This should be set to true if the zero directive supports a value to emit other than zero.
Definition: MCAsmInfo.h:257
const char * ZeroDirective
This should be set to the directive used to get some number of zero (and non-zero if supported by the...
Definition: MCAsmInfo.h:252
unsigned getCommentColumn() const
This indicates the column (zero-based) at which asm comments should be printed.
Definition: MCAsmInfo.h:643
bool hasAggressiveSymbolFolding() const
Definition: MCAsmInfo.h:725
MCSymbolAttr MemtagAttr
Definition: MCAsmInfo.h:448
MCSymbolAttr getHiddenVisibilityAttr() const
Definition: MCAsmInfo.h:758
const char * getCode64Directive() const
Definition: MCAsmInfo.h:675
bool SupportsQuotedNames
If this is true, symbol names with invalid characters will be printed in quotes.
Definition: MCAsmInfo.h:229
bool hasSingleParameterDotFile() const
Definition: MCAsmInfo.h:743
const char * AscizDirective
If not null, this allows for special handling of zero terminated strings on this target.
Definition: MCAsmInfo.h:267
bool UseDataRegionDirectives
This is true if data region markers should be printed as ".data_region/.end_data_region" directives.
Definition: MCAsmInfo.h:234
bool doesZeroDirectiveSupportNonZeroValue() const
Definition: MCAsmInfo.h:707
bool HasAggressiveSymbolFolding
False if the assembler requires that we use.
Definition: MCAsmInfo.h:364
bool DwarfRegNumForCFI
True if dwarf register numbers are printed instead of symbolic register names in ....
Definition: MCAsmInfo.h:488
const char * getAsciiDirective() const
Definition: MCAsmInfo.h:710
bool IsLittleEndian
True if target is little endian. Default is true.
Definition: MCAsmInfo.h:79
AsmCharLiteralSyntax
Assembly character literal syntax types.
Definition: MCAsmInfo.h:59
@ ACLS_SingleQuotePrefix
Unknown; character literals not used by LLVM for this target.
Definition: MCAsmInfo.h:62
bool HasMachoZeroFillDirective
True if this is a MachO target that supports the macho-specific .zerofill directive for emitting BSS ...
Definition: MCAsmInfo.h:90
bool useDotAlignForAlignment() const
Definition: MCAsmInfo.h:697
unsigned CodePointerSize
Code pointer size in bytes. Default is 4.
Definition: MCAsmInfo.h:72
virtual const MCExpr * getExprForPersonalitySymbol(const MCSymbol *Sym, unsigned Encoding, MCStreamer &Streamer) const
Definition: MCAsmInfo.cpp:80
bool UseParensForSymbolVariant
True if target uses parens to indicate the symbol variant instead of .
Definition: MCAsmInfo.h:492
std::pair< int, int > BinutilsVersion
Definition: MCAsmInfo.h:512
bool HasLEB128Directives
True if the target supports LEB128 directives.
Definition: MCAsmInfo.h:241
unsigned CalleeSaveStackSlotSize
Size of the stack slot reserved for callee-saved registers, in bytes.
Definition: MCAsmInfo.h:76
const char * getGPRel32Directive() const
Definition: MCAsmInfo.h:570
const char * getWeakRefDirective() const
Definition: MCAsmInfo.h:749
bool hasCOFFComdatConstants() const
Definition: MCAsmInfo.h:624
MCSymbolAttr HiddenVisibilityAttr
This attribute, if not MCSA_Invalid, is used to declare a symbol as having hidden visibility.
Definition: MCAsmInfo.h:434
virtual bool isValidUnquotedName(StringRef Name) const
Return true if the identifier Name does not need quotes to be syntactically correct.
Definition: MCAsmInfo.cpp:108
const char * getDTPRel32Directive() const
Definition: MCAsmInfo.h:572
bool hasNoDeadStrip() const
Definition: MCAsmInfo.h:746
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...
Definition: MCAsmInfo.h:579
ExceptionHandling getExceptionHandlingType() const
Definition: MCAsmInfo.h:774
StringRef CommentString
This indicates the comment string used by the assembler.
Definition: MCAsmInfo.h:135
bool needsLocalForSize() const
Definition: MCAsmInfo.h:657
bool AllowHashAtStartOfIdentifier
This is true if the assembler allows the "#" character at the start of a string to be lexed as an Asm...
Definition: MCAsmInfo.h:225
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...
Definition: MCAsmInfo.h:299
const char * WeakDirective
Used to declare a global as being a weak symbol. Defaults to ".weak".
Definition: MCAsmInfo.h:413
bool hasFunctionAlignment() const
Definition: MCAsmInfo.h:741
bool enableDwarfFileDirectoryDefault() const
Definition: MCAsmInfo.h:821
bool HasPairedDoubleQuoteStringConstants
True if the target represents string constants as mostly raw characters in paired double quotation wi...
Definition: MCAsmInfo.h:382
bool usesDwarfFileAndLocDirectives() const
Definition: MCAsmInfo.h:813
bool hasIdentDirective() const
Definition: MCAsmInfo.h:745
unsigned getCodePointerSize() const
Get the code pointer size in bytes.
Definition: MCAsmInfo.h:546
Context object for machine code objects.
Definition: MCContext.h:83
Base class for the full range of assembler expressions which are needed for parsing.
Definition: MCExpr.h:34
Instances of this class represent a uniqued identifier for a section in the current translation unit.
Definition: MCSection.h:36
Streaming machine code generation interface.
Definition: MCStreamer.h:213
Generic base class for all target subtargets.
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
Definition: MCSymbol.h:41
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:50
constexpr bool empty() const
empty - Check if the string is empty.
Definition: StringRef.h:134
LLVM Value Representation.
Definition: Value.h:74
@ C
The default llvm calling convention, compatible with C.
Definition: CallingConv.h:34
@ ByteAlignment
Definition: MCAsmInfo.h:50
@ Log2Alignment
Definition: MCAsmInfo.h:50
@ MIPS
Windows x86, uses no CFI, just EH tables.
@ Itanium
Windows CE ARM, PowerPC, SH3, SH4.
@ CE
Windows NT (Windows on ARM)
@ Alpha64
Windows Alpha.
@ X86
Windows x64, Windows Itanium (IA-64)
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
ExceptionHandling
@ ZOS
z/OS MVS Exception Handling.
@ None
No exception support.
@ DwarfCFI
DWARF-like instruction based exceptions.
@ WinEH
Windows Exception Handling.
MCSymbolAttr
Definition: MCDirectives.h:18
@ MCSA_Memtag
.memtag (ELF)
Definition: MCDirectives.h:50
@ MCSA_Protected
.protected (ELF)
Definition: MCDirectives.h:43
@ MCSA_Exported
.globl _foo, exported (XCOFF)
Definition: MCDirectives.h:34
@ MCSA_Hidden
.hidden (ELF)
Definition: MCDirectives.h:33