LLVM  13.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"
19 #include "llvm/MC/MCDirectives.h"
21 #include <vector>
22 
23 namespace llvm {
24 
25 class MCContext;
26 class MCCFIInstruction;
27 class MCExpr;
28 class MCSection;
29 class MCStreamer;
30 class MCSubtargetInfo;
31 class MCSymbol;
32 
33 namespace WinEH {
34 
35 enum 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 
48 namespace 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.
56 class MCAsmInfo {
57 public:
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 
66 protected:
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.
94  bool HasMachoTBSSDirective = 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  /// This is appended to emitted labels. Defaults to ":"
150  const char *LabelSuffix;
151 
152  // Print the EH begin symbol with an assignment. Defaults to false.
154 
155  // Do we need to create a local symbol for .size?
156  bool NeedsLocalForSize = false;
157 
158  /// This prefix is used for globals like constant pool entries that are
159  /// completely private to the .s file and should not have names in the .o
160  /// file. Defaults to "L"
162 
163  /// This prefix is used for labels for basic blocks. Defaults to the same as
164  /// PrivateGlobalPrefix.
166 
167  /// This prefix is used for symbols that should be passed through the
168  /// assembler but be removed by the linker. This is 'l' on Darwin, currently
169  /// used for some ObjC metadata. The default of "" meast that for this system
170  /// a plain private symbol should be used. Defaults to "".
172 
173  /// If these are nonempty, they contain a directive to emit before and after
174  /// an inline assembly statement. Defaults to "#APP\n", "#NO_APP\n"
175  const char *InlineAsmStart;
176  const char *InlineAsmEnd;
177 
178  /// These are assembly directives that tells the assembler to interpret the
179  /// following instructions differently. Defaults to ".code16", ".code32",
180  /// ".code64".
181  const char *Code16Directive;
182  const char *Code32Directive;
183  const char *Code64Directive;
184 
185  /// Which dialect of an assembler variant to use. Defaults to 0
186  unsigned AssemblerDialect = 0;
187 
188  /// This is true if the assembler allows @ characters in symbol names.
189  /// Defaults to false.
190  bool AllowAtInName = false;
191 
192  /// This is true if the assembler allows the "?" character at the start of
193  /// of a string to be lexed as an AsmToken::Identifier.
194  /// If the AsmLexer determines that the string can be lexed as a possible
195  /// comment, setting this option will have no effect, and the string will
196  /// still be lexed as a comment.
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  /// 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  /// If this is true, symbol names with invalid characters will be printed in
221  /// quotes.
222  bool SupportsQuotedNames = true;
223 
224  /// This is true if data region markers should be printed as
225  /// ".data_region/.end_data_region" directives. If false, use "$d/$a" labels
226  /// instead.
228 
229  /// True if .align is to be used for alignment. Only power-of-two
230  /// alignment is supported.
232 
233  /// True if the target supports LEB128 directives.
234  bool HasLEB128Directives = true;
235 
236  //===--- Data Emission Directives -------------------------------------===//
237 
238  /// This should be set to the directive used to get some number of zero (and
239  /// non-zero if supported by the directive) bytes emitted to the current
240  /// section. Common cases are "\t.zero\t" and "\t.space\t". Defaults to
241  /// "\t.zero\t"
242  const char *ZeroDirective;
243 
244  /// This should be set to true if the zero directive supports a value to emit
245  /// other than zero. If this is set to false, the Data*bitsDirective's will be
246  /// used to emit these bytes. Defaults to true.
248 
249  /// This directive allows emission of an ascii string with the standard C
250  /// escape characters embedded into it. If a target doesn't support this, it
251  /// can be set to null. Defaults to "\t.ascii\t"
252  const char *AsciiDirective;
253 
254  /// If not null, this allows for special handling of zero terminated strings
255  /// on this target. This is commonly supported as ".asciz". If a target
256  /// doesn't support this, it can be set to null. Defaults to "\t.asciz\t"
257  const char *AscizDirective;
258 
259  /// This directive accepts a comma-separated list of bytes for emission as a
260  /// string of bytes. For targets that do not support this, it shall be set to
261  /// null. Defaults to null.
262  const char *ByteListDirective = nullptr;
263 
264  /// Form used for character literals in the assembly syntax. Useful for
265  /// producing strings as byte lists. If a target does not use or support
266  /// this, it shall be set to ACLS_Unknown. Defaults to ACLS_Unknown.
268 
269  /// These directives are used to output some unit of integer data to the
270  /// current section. If a data directive is set to null, smaller data
271  /// directives will be used to emit the large sizes. Defaults to "\t.byte\t",
272  /// "\t.short\t", "\t.long\t", "\t.quad\t"
273  const char *Data8bitsDirective;
274  const char *Data16bitsDirective;
275  const char *Data32bitsDirective;
276  const char *Data64bitsDirective;
277 
278  /// True if data directives support signed values
279  bool SupportsSignedData = true;
280 
281  /// If non-null, a directive that is used to emit a word which should be
282  /// relocated as a 64-bit GP-relative offset, e.g. .gpdword on Mips. Defaults
283  /// to nullptr.
284  const char *GPRel64Directive = nullptr;
285 
286  /// If non-null, a directive that is used to emit a word which should be
287  /// relocated as a 32-bit GP-relative offset, e.g. .gpword on Mips or .gprel32
288  /// on Alpha. Defaults to nullptr.
289  const char *GPRel32Directive = nullptr;
290 
291  /// If non-null, directives that are used to emit a word/dword which should
292  /// be relocated as a 32/64-bit DTP/TP-relative offset, e.g. .dtprelword/
293  /// .dtpreldword/.tprelword/.tpreldword on Mips.
294  const char *DTPRel32Directive = nullptr;
295  const char *DTPRel64Directive = nullptr;
296  const char *TPRel32Directive = nullptr;
297  const char *TPRel64Directive = nullptr;
298 
299  /// This is true if this target uses "Sun Style" syntax for section switching
300  /// ("#alloc,#write" etc) instead of the normal ELF syntax (,"a,w") in
301  /// .section directives. Defaults to false.
303 
304  /// This is true if this target uses ELF '.section' directive before the
305  /// '.bss' one. It's used for PPC/Linux which doesn't support the '.bss'
306  /// directive only. Defaults to false.
308 
310 
311  //===--- Alignment Information ----------------------------------------===//
312 
313  /// If this is true (the default) then the asmprinter emits ".align N"
314  /// directives, where N is the number of bytes to align to. Otherwise, it
315  /// emits ".align log2(N)", e.g. 3 to align to an 8 byte boundary. Defaults
316  /// to true.
317  bool AlignmentIsInBytes = true;
318 
319  /// If non-zero, this is used to fill the executable space created as the
320  /// result of a alignment directive. Defaults to 0
321  unsigned TextAlignFillValue = 0;
322 
323  //===--- Global Variable Emission Directives --------------------------===//
324 
325  /// This is the directive used to declare a global entity. Defaults to
326  /// ".globl".
327  const char *GlobalDirective;
328 
329  /// True if the expression
330  /// .long f - g
331  /// uses a relocation but it can be suppressed by writing
332  /// a = f - g
333  /// .long a
335 
336  /// False if the assembler requires that we use
337  /// \code
338  /// Lc = a - b
339  /// .long Lc
340  /// \endcode
341  //
342  /// instead of
343  //
344  /// \code
345  /// .long a - b
346  /// \endcode
347  ///
348  /// Defaults to true.
350 
351  /// True is .comm's and .lcomms optional alignment is to be specified in bytes
352  /// instead of log2(n). Defaults to true.
354 
355  /// Describes if the .lcomm directive for the target supports an alignment
356  /// argument and how it is interpreted. Defaults to NoAlignment.
358 
359  /// True if the target only has basename for .file directive. False if the
360  /// target also needs the directory along with the basename. Default to true.
362 
363  // True if the target allows .align directives on functions. This is true for
364  // most targets, so defaults to true.
365  bool HasFunctionAlignment = true;
366 
367  /// True if the target has .type and .size directives, this is true for most
368  /// ELF targets. Defaults to true.
370 
371  /// True if the target has a single parameter .file directive, this is true
372  /// for ELF targets. Defaults to true.
374 
375  /// True if the target has a .ident directive, this is true for ELF targets.
376  /// Defaults to false.
377  bool HasIdentDirective = false;
378 
379  /// True if this target supports the MachO .no_dead_strip directive. Defaults
380  /// to false.
381  bool HasNoDeadStrip = false;
382 
383  /// True if this target supports the MachO .alt_entry directive. Defaults to
384  /// false.
385  bool HasAltEntry = false;
386 
387  /// Used to declare a global as being a weak symbol. Defaults to ".weak".
388  const char *WeakDirective;
389 
390  /// This directive, if non-null, is used to declare a global as being a weak
391  /// undefined symbol. Defaults to nullptr.
392  const char *WeakRefDirective = nullptr;
393 
394  /// True if we have a directive to declare a global as being a weak defined
395  /// symbol. Defaults to false.
396  bool HasWeakDefDirective = false;
397 
398  /// True if we have a directive to declare a global as being a weak defined
399  /// symbol that can be hidden (unexported). Defaults to false.
401 
402  /// True if we should mark symbols as global instead of weak, for
403  /// weak*/linkonce*, if the symbol has a comdat.
404  /// Defaults to false.
405  bool AvoidWeakIfComdat = false;
406 
407  /// This attribute, if not MCSA_Invalid, is used to declare a symbol as having
408  /// hidden visibility. Defaults to MCSA_Hidden.
410 
411  /// This attribute, if not MCSA_Invalid, is used to declare an undefined
412  /// symbol as having hidden visibility. Defaults to MCSA_Hidden.
414 
415  /// This attribute, if not MCSA_Invalid, is used to declare a symbol as having
416  /// protected visibility. Defaults to MCSA_Protected
418 
419  //===--- Dwarf Emission Directives -----------------------------------===//
420 
421  /// True if target supports emission of debugging information. Defaults to
422  /// false.
424 
425  /// Exception handling format for the target. Defaults to None.
427 
428  /// True if target uses CFI unwind information for debugging purpose when
429  /// `ExceptionsType == ExceptionHandling::None`.
430  bool UsesCFIForDebug = false;
431 
432  /// Windows exception handling data (.pdata) encoding. Defaults to Invalid.
434 
435  /// True if Dwarf2 output generally uses relocations for references to other
436  /// .debug_* sections.
438 
439  /// True if DWARF FDE symbol reference relocations should be replaced by an
440  /// absolute difference.
442 
443  /// True if the target supports generating the DWARF line table through using
444  /// the .loc/.file directives. Defaults to true.
446 
447  /// True if the target needs the DWARF section length in the header (if any)
448  /// of the DWARF section in the assembly file. Defaults to true.
450 
451  /// True if dwarf register numbers are printed instead of symbolic register
452  /// names in .cfi_* directives. Defaults to false.
453  bool DwarfRegNumForCFI = false;
454 
455  /// True if target uses parens to indicate the symbol variant instead of @.
456  /// For example, foo(plt) instead of foo@plt. Defaults to false.
458 
459  /// True if the target supports flags in ".loc" directive, false if only
460  /// location is allowed.
462 
463  //===--- Prologue State ----------------------------------------------===//
464 
465  std::vector<MCCFIInstruction> InitialFrameState;
466 
467  //===--- Integrated Assembler Information ----------------------------===//
468 
469  // Generated object files can use all ELF features supported by GNU ld of
470  // this binutils version and later. INT_MAX means all features can be used,
471  // regardless of GNU ld support. The default value is referenced by
472  // clang/Driver/Options.td.
473  std::pair<int, int> BinutilsVersion = {2, 26};
474 
475  /// Should we use the integrated assembler?
476  /// The integrated assembler should be enabled by default (by the
477  /// constructors) when failing to parse a valid piece of assembly (inline
478  /// or otherwise) is considered a bug. It may then be overridden after
479  /// construction (see LLVMTargetMachine::initAsmInfo()).
481 
482  /// Preserve Comments in assembly
484 
485  /// Compress DWARF debug sections. Defaults to no compression.
487 
488  /// True if the integrated assembler should interpret 'a >> b' constant
489  /// expressions as logical rather than arithmetic.
490  bool UseLogicalShr = true;
491 
492  // If true, emit GOTPCRELX/REX_GOTPCRELX instead of GOTPCREL, on
493  // X86_64 ELF.
494  bool RelaxELFRelocations = true;
495 
496  // If true, then the lexer and expression parser will support %neg(),
497  // %hi(), and similar unary operators.
498  bool HasMipsExpressions = false;
499 
500  // If true, use Motorola-style integers in Assembly (ex. $0ac).
501  bool UseMotorolaIntegers = false;
502 
503  // If true, emit function descriptor symbol on AIX.
505 
506 public:
507  explicit MCAsmInfo();
508  virtual ~MCAsmInfo();
509 
510  /// Get the code pointer size in bytes.
511  unsigned getCodePointerSize() const { return CodePointerSize; }
512 
513  /// Get the callee-saved register stack slot
514  /// size in bytes.
515  unsigned getCalleeSaveStackSlotSize() const {
517  }
518 
519  /// True if the target is little endian.
520  bool isLittleEndian() const { return IsLittleEndian; }
521 
522  /// True if target stack grow up.
523  bool isStackGrowthDirectionUp() const { return StackGrowsUp; }
524 
526 
527  // Data directive accessors.
528 
529  const char *getData8bitsDirective() const { return Data8bitsDirective; }
530  const char *getData16bitsDirective() const { return Data16bitsDirective; }
531  const char *getData32bitsDirective() const { return Data32bitsDirective; }
532  const char *getData64bitsDirective() const { return Data64bitsDirective; }
533  bool supportsSignedData() const { return SupportsSignedData; }
534  const char *getGPRel64Directive() const { return GPRel64Directive; }
535  const char *getGPRel32Directive() const { return GPRel32Directive; }
536  const char *getDTPRel64Directive() const { return DTPRel64Directive; }
537  const char *getDTPRel32Directive() const { return DTPRel32Directive; }
538  const char *getTPRel64Directive() const { return TPRel64Directive; }
539  const char *getTPRel32Directive() const { return TPRel32Directive; }
540 
541  /// Targets can implement this method to specify a section to switch to if the
542  /// translation unit doesn't have any trampolines that require an executable
543  /// stack.
545  return nullptr;
546  }
547 
548  /// True if the section is atomized using the symbols in it.
549  /// This is false if the section is not atomized at all (most ELF sections) or
550  /// if it is atomized based on its contents (MachO' __TEXT,__cstring for
551  /// example).
552  virtual bool isSectionAtomizableBySymbols(const MCSection &Section) const;
553 
554  virtual const MCExpr *getExprForPersonalitySymbol(const MCSymbol *Sym,
555  unsigned Encoding,
556  MCStreamer &Streamer) const;
557 
558  virtual const MCExpr *getExprForFDESymbol(const MCSymbol *Sym,
559  unsigned Encoding,
560  MCStreamer &Streamer) const;
561 
562  /// Return true if C is an acceptable character inside a symbol name.
563  virtual bool isAcceptableChar(char C) const;
564 
565  /// Return true if the identifier \p Name does not need quotes to be
566  /// syntactically correct.
567  virtual bool isValidUnquotedName(StringRef Name) const;
568 
569  /// Return true if the .section directive should be omitted when
570  /// emitting \p SectionName. For example:
571  ///
572  /// shouldOmitSectionDirective(".text")
573  ///
574  /// returns false => .section .text,#alloc,#execinstr
575  /// returns true => .text
577 
580  }
581 
584  }
585 
588  }
589 
590  // Accessors.
591 
598  }
599 
600  /// Returns the maximum possible encoded instruction size in bytes. If \p STI
601  /// is null, this should be the maximum size for any subtarget.
602  virtual unsigned getMaxInstLength(const MCSubtargetInfo *STI = nullptr) const {
603  return MaxInstLength;
604  }
605 
606  unsigned getMinInstAlignment() const { return MinInstAlignment; }
607  bool getDollarIsPC() const { return DollarIsPC; }
608  bool getDotIsPC() const { return DotIsPC; }
609  bool getStarIsPC() const { return StarIsPC; }
610  const char *getSeparatorString() const { return SeparatorString; }
611 
612  /// This indicates the column (zero-based) at which asm comments should be
613  /// printed.
614  unsigned getCommentColumn() const { return 40; }
615 
619  }
621  const char *getLabelSuffix() const { return LabelSuffix; }
622 
624  bool needsLocalForSize() const { return NeedsLocalForSize; }
627 
630  }
631 
635  return getPrivateGlobalPrefix();
636  }
637 
638  const char *getInlineAsmStart() const { return InlineAsmStart; }
639  const char *getInlineAsmEnd() const { return InlineAsmEnd; }
640  const char *getCode16Directive() const { return Code16Directive; }
641  const char *getCode32Directive() const { return Code32Directive; }
642  const char *getCode64Directive() const { return Code64Directive; }
643  unsigned getAssemblerDialect() const { return AssemblerDialect; }
644  bool doesAllowAtInName() const { return AllowAtInName; }
647  }
650  }
653  }
656  }
657  bool supportsNameQuoting() const { return SupportsQuotedNames; }
658 
661  }
662 
663  bool useDotAlignForAlignment() const {
665  }
666 
667  bool hasLEB128Directives() const { return HasLEB128Directives; }
668 
669  const char *getZeroDirective() const { return ZeroDirective; }
672  }
673  const char *getAsciiDirective() const { return AsciiDirective; }
674  const char *getAscizDirective() const { return AscizDirective; }
675  const char *getByteListDirective() const { return ByteListDirective; }
677  return CharacterLiteralSyntax;
678  }
679  bool getAlignmentIsInBytes() const { return AlignmentIsInBytes; }
680  unsigned getTextAlignFillValue() const { return TextAlignFillValue; }
681  const char *getGlobalDirective() const { return GlobalDirective; }
682 
685  }
686 
688 
691  }
692 
695  }
696 
699  }
703  bool hasIdentDirective() const { return HasIdentDirective; }
704  bool hasNoDeadStrip() const { return HasNoDeadStrip; }
705  bool hasAltEntry() const { return HasAltEntry; }
706  const char *getWeakDirective() const { return WeakDirective; }
707  const char *getWeakRefDirective() const { return WeakRefDirective; }
708  bool hasWeakDefDirective() const { return HasWeakDefDirective; }
709 
712  }
713 
714  bool avoidWeakIfComdat() const { return AvoidWeakIfComdat; }
715 
717 
720  }
721 
724  }
725 
727 
730 
732  ExceptionsType = EH;
733  }
734 
735  bool doesUseCFIForDebug() const { return UsesCFIForDebug; }
736 
737  /// Returns true if the exception handling method for the platform uses call
738  /// frame information to unwind.
739  bool usesCFIForEH() const {
742  }
743 
744  bool usesWindowsCFI() const {
748  }
749 
752  }
753 
755  bool useDwarfRegNumForCFI() const { return DwarfRegNumForCFI; }
759  }
760 
763  }
764 
767  }
768 
769  void addInitialFrameState(const MCCFIInstruction &Inst);
770 
771  const std::vector<MCCFIInstruction> &getInitialFrameState() const {
772  return InitialFrameState;
773  }
774 
775  void setBinutilsVersion(std::pair<int, int> Value) {
777  }
778 
779  /// Return true if assembly (inline or otherwise) should be parsed.
781 
782  bool binutilsIsAtLeast(int Major, int Minor) const {
783  return BinutilsVersion >= std::make_pair(Major, Minor);
784  }
785 
786  /// Set whether assembly (inline or otherwise) should be parsed.
787  virtual void setUseIntegratedAssembler(bool Value) {
789  }
790 
791  /// Return true if assembly (inline or otherwise) should be parsed.
792  bool preserveAsmComments() const { return PreserveAsmComments; }
793 
794  /// Set whether assembly (inline or otherwise) should be parsed.
795  virtual void setPreserveAsmComments(bool Value) {
797  }
798 
800  return CompressDebugSections;
801  }
802 
804  this->CompressDebugSections = CompressDebugSections;
805  }
806 
807  bool shouldUseLogicalShr() const { return UseLogicalShr; }
808 
809  bool canRelaxRelocations() const { return RelaxELFRelocations; }
811  bool hasMipsExpressions() const { return HasMipsExpressions; }
814 };
815 
816 } // end namespace llvm
817 
818 #endif // LLVM_MC_MCASMINFO_H
llvm::MCAsmInfo::getExprForFDESymbol
virtual const MCExpr * getExprForFDESymbol(const MCSymbol *Sym, unsigned Encoding, MCStreamer &Streamer) const
Definition: MCAsmInfo.cpp:97
llvm::MCAsmInfo::SupportsExtendedDwarfLocDirective
bool SupportsExtendedDwarfLocDirective
True if the target supports flags in ".loc" directive, false if only location is allowed.
Definition: MCAsmInfo.h:461
llvm::MCAsmInfo::hasSingleParameterDotFile
bool hasSingleParameterDotFile() const
Definition: MCAsmInfo.h:702
llvm::MCAsmInfo::HasMachoTBSSDirective
bool HasMachoTBSSDirective
True if this is a MachO target that supports the macho-specific .tbss directive for emitting thread l...
Definition: MCAsmInfo.h:94
llvm::MCAsmInfo::isAcceptableChar
virtual bool isAcceptableChar(char C) const
Return true if C is an acceptable character inside a symbol name.
Definition: MCAsmInfo.cpp:111
llvm::MCAsmInfo::GPRel64Directive
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:284
llvm::MCAsmInfo::useDwarfRegNumForCFI
bool useDwarfRegNumForCFI() const
Definition: MCAsmInfo.h:755
llvm::MCAsmInfo::usesSunStyleELFSectionSwitchSyntax
bool usesSunStyleELFSectionSwitchSyntax() const
Definition: MCAsmInfo.h:578
llvm::MCAsmInfo::getLinkerPrivateGlobalPrefix
StringRef getLinkerPrivateGlobalPrefix() const
Definition: MCAsmInfo.h:632
llvm::MCAsmInfo::HasVisibilityOnlyWithLinkage
bool HasVisibilityOnlyWithLinkage
True if this is an XCOFF target that supports visibility attributes as part of .global,...
Definition: MCAsmInfo.h:107
llvm::MCAsmInfo::setRelaxELFRelocations
void setRelaxELFRelocations(bool V)
Definition: MCAsmInfo.h:810
llvm
Definition: AllocatorList.h:23
llvm::MCAsmInfo::getCommentString
StringRef getCommentString() const
Definition: MCAsmInfo.h:616
llvm::MCAsmInfo::StackGrowsUp
bool StackGrowsUp
True if target stack grow up. Default is false.
Definition: MCAsmInfo.h:82
llvm::MCSymbol
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
Definition: MCSymbol.h:41
llvm::StringRef::empty
LLVM_NODISCARD bool empty() const
empty - Check if the string is empty.
Definition: StringRef.h:156
llvm::MCAsmInfo::getSeparatorString
const char * getSeparatorString() const
Definition: MCAsmInfo.h:610
llvm::MCAsmInfo::HasMipsExpressions
bool HasMipsExpressions
Definition: MCAsmInfo.h:498
llvm::MCAsmInfo::doesSetDirectiveSuppressReloc
bool doesSetDirectiveSuppressReloc() const
Definition: MCAsmInfo.h:683
llvm::MCAsmInfo::RestrictCommentStringToStartOfStatement
bool RestrictCommentStringToStartOfStatement
This indicates whether the comment string is only accepted as a comment at the beginning of statement...
Definition: MCAsmInfo.h:139
llvm::MCAsmInfo::compressDebugSections
DebugCompressionType compressDebugSections() const
Definition: MCAsmInfo.h:799
MCTargetOptions.h
llvm::MCAsmInfo::hasMipsExpressions
bool hasMipsExpressions() const
Definition: MCAsmInfo.h:811
llvm::MCAsmInfo::~MCAsmInfo
virtual ~MCAsmInfo()
llvm::MCAsmInfo::CompressDebugSections
DebugCompressionType CompressDebugSections
Compress DWARF debug sections. Defaults to no compression.
Definition: MCAsmInfo.h:486
llvm::MCAsmInfo::useIntegratedAssembler
bool useIntegratedAssembler() const
Return true if assembly (inline or otherwise) should be parsed.
Definition: MCAsmInfo.h:780
llvm::MCAsmInfo::HasFunctionAlignment
bool HasFunctionAlignment
Definition: MCAsmInfo.h:365
llvm::MCContext
Context object for machine code objects.
Definition: MCContext.h:71
llvm::MCAsmInfo::getAlignmentIsInBytes
bool getAlignmentIsInBytes() const
Definition: MCAsmInfo.h:679
StringRef.h
llvm::MCAsmInfo::HasMachoZeroFillDirective
bool HasMachoZeroFillDirective
True if this is a MachO target that supports the macho-specific .zerofill directive for emitting BSS ...
Definition: MCAsmInfo.h:90
llvm::MCAsmInfo::UseDotAlignForAlignment
bool UseDotAlignForAlignment
True if .align is to be used for alignment.
Definition: MCAsmInfo.h:231
llvm::MCAsmInfo::TPRel32Directive
const char * TPRel32Directive
Definition: MCAsmInfo.h:296
llvm::MCAsmInfo::getMinInstAlignment
unsigned getMinInstAlignment() const
Definition: MCAsmInfo.h:606
MCDirectives.h
llvm::MCAsmInfo::getInlineAsmStart
const char * getInlineAsmStart() const
Definition: MCAsmInfo.h:638
llvm::MCAsmInfo::getPrivateGlobalPrefix
StringRef getPrivateGlobalPrefix() const
Definition: MCAsmInfo.h:625
llvm::MCAsmInfo
This class is intended to be used as a base class for asm properties and features specific to the tar...
Definition: MCAsmInfo.h:56
llvm::MCAsmInfo::getStarIsPC
bool getStarIsPC() const
Definition: MCAsmInfo.h:609
llvm::MCAsmInfo::AvoidWeakIfComdat
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:405
llvm::MCAsmInfo::SupportsDebugInformation
bool SupportsDebugInformation
True if target supports emission of debugging information.
Definition: MCAsmInfo.h:423
llvm::MCAsmInfo::useDotAlignForAlignment
bool useDotAlignForAlignment() const
Definition: MCAsmInfo.h:663
llvm::MCAsmInfo::AlignmentIsInBytes
bool AlignmentIsInBytes
If this is true (the default) then the asmprinter emits ".align N" directives, where N is the number ...
Definition: MCAsmInfo.h:317
llvm::MCAsmInfo::shouldAllowAdditionalComments
bool shouldAllowAdditionalComments() const
Definition: MCAsmInfo.h:620
llvm::MCAsmInfo::hasLEB128Directives
bool hasLEB128Directives() const
Definition: MCAsmInfo.h:667
llvm::MCAsmInfo::HasNoDeadStrip
bool HasNoDeadStrip
True if this target supports the MachO .no_dead_strip directive.
Definition: MCAsmInfo.h:381
llvm::LCOMM::Log2Alignment
@ Log2Alignment
Definition: MCAsmInfo.h:50
llvm::MCAsmInfo::hasAltEntry
bool hasAltEntry() const
Definition: MCAsmInfo.h:705
llvm::WinEH::EncodingType::X86
@ X86
Windows x64, Windows Itanium (IA-64)
llvm::MCAsmInfo::InlineAsmEnd
const char * InlineAsmEnd
Definition: MCAsmInfo.h:176
llvm::MCAsmInfo::SetDirectiveSuppressesReloc
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:334
llvm::MCAsmInfo::UseAssignmentForEHBegin
bool UseAssignmentForEHBegin
Definition: MCAsmInfo.h:153
llvm::MCAsmInfo::HasIdentDirective
bool HasIdentDirective
True if the target has a .ident directive, this is true for ELF targets.
Definition: MCAsmInfo.h:377
llvm::MCAsmInfo::UsesELFSectionDirectiveForBSS
bool UsesELFSectionDirectiveForBSS
This is true if this target uses ELF '.section' directive before the '.bss' one.
Definition: MCAsmInfo.h:307
llvm::WinEH::EncodingType::Itanium
@ Itanium
Windows CE ARM, PowerPC, SH3, SH4.
llvm::ExceptionHandling::ARM
@ ARM
ARM EHABI.
llvm::MCAsmInfo::Data64bitsDirective
const char * Data64bitsDirective
Definition: MCAsmInfo.h:276
llvm::MCAsmInfo::getCodePointerSize
unsigned getCodePointerSize() const
Get the code pointer size in bytes.
Definition: MCAsmInfo.h:511
llvm::MCAsmInfo::Code32Directive
const char * Code32Directive
Definition: MCAsmInfo.h:182
llvm::MCAsmInfo::PrivateLabelPrefix
StringRef PrivateLabelPrefix
This prefix is used for labels for basic blocks.
Definition: MCAsmInfo.h:165
llvm::MCAsmInfo::UsesCFIForDebug
bool UsesCFIForDebug
True if target uses CFI unwind information for debugging purpose when ExceptionsType == ExceptionHand...
Definition: MCAsmInfo.h:430
llvm::MCAsmInfo::WeakDirective
const char * WeakDirective
Used to declare a global as being a weak symbol. Defaults to ".weak".
Definition: MCAsmInfo.h:388
llvm::MCAsmInfo::UseDataRegionDirectives
bool UseDataRegionDirectives
This is true if data region markers should be printed as ".data_region/.end_data_region" directives.
Definition: MCAsmInfo.h:227
llvm::MCAsmInfo::getAssemblerDialect
unsigned getAssemblerDialect() const
Definition: MCAsmInfo.h:643
llvm::MCAsmInfo::usesCFIForEH
bool usesCFIForEH() const
Returns true if the exception handling method for the platform uses call frame information to unwind.
Definition: MCAsmInfo.h:739
llvm::MCAsmInfo::getRestrictCommentStringToStartOfStatement
bool getRestrictCommentStringToStartOfStatement() const
Definition: MCAsmInfo.h:617
llvm::MCAsmInfo::TPRel64Directive
const char * TPRel64Directive
Definition: MCAsmInfo.h:297
llvm::MCAsmInfo::getData64bitsDirective
const char * getData64bitsDirective() const
Definition: MCAsmInfo.h:532
llvm::MCAsmInfo::hasFunctionAlignment
bool hasFunctionAlignment() const
Definition: MCAsmInfo.h:700
llvm::MCAsmInfo::AllowAtInName
bool AllowAtInName
This is true if the assembler allows @ characters in symbol names.
Definition: MCAsmInfo.h:190
llvm::MCAsmInfo::getWinEHEncodingType
WinEH::EncodingType getWinEHEncodingType() const
Definition: MCAsmInfo.h:729
llvm::WinEH::EncodingType::ARM
@ ARM
Windows AXP64.
llvm::MCAsmInfo::DwarfUsesRelocationsAcrossSections
bool DwarfUsesRelocationsAcrossSections
True if Dwarf2 output generally uses relocations for references to other .debug_* sections.
Definition: MCAsmInfo.h:437
llvm::MCAsmInfo::UseParensForSymbolVariant
bool UseParensForSymbolVariant
True if target uses parens to indicate the symbol variant instead of .
Definition: MCAsmInfo.h:457
llvm::MCAsmInfo::Code16Directive
const char * Code16Directive
These are assembly directives that tells the assembler to interpret the following instructions differ...
Definition: MCAsmInfo.h:181
llvm::MCAsmInfo::supportsExtendedDwarfLocDirective
bool supportsExtendedDwarfLocDirective() const
Definition: MCAsmInfo.h:757
llvm::MCAsmInfo::usesELFSectionDirectiveForBSS
bool usesELFSectionDirectiveForBSS() const
Definition: MCAsmInfo.h:582
llvm::MCAsmInfo::Data32bitsDirective
const char * Data32bitsDirective
Definition: MCAsmInfo.h:275
llvm::MCSymbolAttr
MCSymbolAttr
Definition: MCDirectives.h:18
llvm::MCAsmInfo::CharacterLiteralSyntax
AsmCharLiteralSyntax CharacterLiteralSyntax
Form used for character literals in the assembly syntax.
Definition: MCAsmInfo.h:267
llvm::MCAsmInfo::shouldOmitSectionDirective
virtual bool shouldOmitSectionDirective(StringRef SectionName) const
Return true if the .section directive should be omitted when emitting SectionName.
Definition: MCAsmInfo.cpp:129
llvm::ARMBuildAttrs::Section
@ Section
Legacy Tags.
Definition: ARMBuildAttributes.h:78
llvm::MCAsmInfo::canRelaxRelocations
bool canRelaxRelocations() const
Definition: MCAsmInfo.h:809
llvm::MCAsmInfo::hasLinkerPrivateGlobalPrefix
bool hasLinkerPrivateGlobalPrefix() const
Definition: MCAsmInfo.h:628
llvm::MCAsmInfo::getExprForPersonalitySymbol
virtual const MCExpr * getExprForPersonalitySymbol(const MCSymbol *Sym, unsigned Encoding, MCStreamer &Streamer) const
Definition: MCAsmInfo.cpp:90
llvm::MCStreamer
Streaming machine code generation interface.
Definition: MCStreamer.h:197
llvm::MCAsmInfo::PrivateGlobalPrefix
StringRef PrivateGlobalPrefix
This prefix is used for globals like constant pool entries that are completely private to the ....
Definition: MCAsmInfo.h:161
llvm::MCAsmInfo::DwarfFDESymbolsUseAbsDiff
bool DwarfFDESymbolsUseAbsDiff
True if DWARF FDE symbol reference relocations should be replaced by an absolute difference.
Definition: MCAsmInfo.h:441
llvm::MCAsmInfo::setExceptionsType
void setExceptionsType(ExceptionHandling EH)
Definition: MCAsmInfo.h:731
llvm::MCAsmInfo::DwarfSectionSizeRequired
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:449
llvm::MCAsmInfo::ByteListDirective
const char * ByteListDirective
This directive accepts a comma-separated list of bytes for emission as a string of bytes.
Definition: MCAsmInfo.h:262
llvm::MCAsmInfo::getTextAlignFillValue
unsigned getTextAlignFillValue() const
Definition: MCAsmInfo.h:680
llvm::DebugCompressionType::None
@ None
No compression.
llvm::ExceptionHandling
ExceptionHandling
Definition: MCTargetOptions.h:18
llvm::MCAsmInfo::ProtectedVisibilityAttr
MCSymbolAttr ProtectedVisibilityAttr
This attribute, if not MCSA_Invalid, is used to declare a symbol as having protected visibility.
Definition: MCAsmInfo.h:417
llvm::MCAsmInfo::getAscizDirective
const char * getAscizDirective() const
Definition: MCAsmInfo.h:674
llvm::MCAsmInfo::HasSingleParameterDotFile
bool HasSingleParameterDotFile
True if the target has a single parameter .file directive, this is true for ELF targets.
Definition: MCAsmInfo.h:373
C
(vector float) vec_cmpeq(*A, *B) C
Definition: README_ALTIVEC.txt:86
llvm::MCSA_Protected
@ MCSA_Protected
.protected (ELF)
Definition: MCDirectives.h:42
llvm::MCAsmInfo::doesZeroDirectiveSupportNonZeroValue
bool doesZeroDirectiveSupportNonZeroValue() const
Definition: MCAsmInfo.h:670
llvm::MCAsmInfo::HasWeakDefDirective
bool HasWeakDefDirective
True if we have a directive to declare a global as being a weak defined symbol.
Definition: MCAsmInfo.h:396
llvm::MCAsmInfo::doesAllowQuestionAtStartOfIdentifier
bool doesAllowQuestionAtStartOfIdentifier() const
Definition: MCAsmInfo.h:645
llvm::MCAsmInfo::MinInstAlignment
unsigned MinInstAlignment
Every possible instruction length is a multiple of this value.
Definition: MCAsmInfo.h:115
llvm::MCAsmInfo::getDotIsPC
bool getDotIsPC() const
Definition: MCAsmInfo.h:608
llvm::WinEH::EncodingType::Invalid
@ Invalid
llvm::MCAsmInfo::doesSupportDataRegionDirectives
bool doesSupportDataRegionDirectives() const
Definition: MCAsmInfo.h:659
llvm::MCAsmInfo::AllowHashAtStartOfIdentifier
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:218
llvm::MCAsmInfo::needsDwarfSectionOffsetDirective
bool needsDwarfSectionOffsetDirective() const
Definition: MCAsmInfo.h:586
llvm::MCAsmInfo::useAssignmentForEHBegin
bool useAssignmentForEHBegin() const
Definition: MCAsmInfo.h:623
llvm::MCAsmInfo::needsDwarfSectionSizeInHeader
bool needsDwarfSectionSizeInHeader() const
Definition: MCAsmInfo.h:765
llvm::MCAsmInfo::ACLS_SingleQuotePrefix
@ ACLS_SingleQuotePrefix
Unknown; character literals not used by LLVM for this target.
Definition: MCAsmInfo.h:62
llvm::MCSA_Hidden
@ MCSA_Hidden
.hidden (ELF)
Definition: MCDirectives.h:33
llvm::MCAsmInfo::ZeroDirectiveSupportsNonZeroValue
bool ZeroDirectiveSupportsNonZeroValue
This should be set to true if the zero directive supports a value to emit other than zero.
Definition: MCAsmInfo.h:247
llvm::MCAsmInfo::isStackGrowthDirectionUp
bool isStackGrowthDirectionUp() const
True if target stack grow up.
Definition: MCAsmInfo.h:523
llvm::MCAsmInfo::characterLiteralSyntax
AsmCharLiteralSyntax characterLiteralSyntax() const
Definition: MCAsmInfo.h:676
llvm::MCAsmInfo::LinkerPrivateGlobalPrefix
StringRef LinkerPrivateGlobalPrefix
This prefix is used for symbols that should be passed through the assembler but be removed by the lin...
Definition: MCAsmInfo.h:171
llvm::MCAsmInfo::getZeroDirective
const char * getZeroDirective() const
Definition: MCAsmInfo.h:669
llvm::MCAsmInfo::UseIntegratedAssembler
bool UseIntegratedAssembler
Should we use the integrated assembler? The integrated assembler should be enabled by default (by the...
Definition: MCAsmInfo.h:480
llvm::MCAsmInfo::doesUseCFIForDebug
bool doesUseCFIForDebug() const
Definition: MCAsmInfo.h:735
llvm::MCAsmInfo::hasNoDeadStrip
bool hasNoDeadStrip() const
Definition: MCAsmInfo.h:704
llvm::MCAsmInfo::getByteListDirective
const char * getByteListDirective() const
Definition: MCAsmInfo.h:675
llvm::MCAsmInfo::getInlineAsmEnd
const char * getInlineAsmEnd() const
Definition: MCAsmInfo.h:639
llvm::MCCFIInstruction
Definition: MCDwarf.h:441
llvm::MCAsmInfo::getData8bitsDirective
const char * getData8bitsDirective() const
Definition: MCAsmInfo.h:529
llvm::MCAsmInfo::getProtectedVisibilityAttr
MCSymbolAttr getProtectedVisibilityAttr() const
Definition: MCAsmInfo.h:722
llvm::MCAsmInfo::HasDotTypeDotSizeDirective
bool HasDotTypeDotSizeDirective
True if the target has .type and .size directives, this is true for most ELF targets.
Definition: MCAsmInfo.h:369
llvm::MCAsmInfo::SupportsSignedData
bool SupportsSignedData
True if data directives support signed values.
Definition: MCAsmInfo.h:279
llvm::MCAsmInfo::setUseIntegratedAssembler
virtual void setUseIntegratedAssembler(bool Value)
Set whether assembly (inline or otherwise) should be parsed.
Definition: MCAsmInfo.h:787
llvm::MCAsmInfo::useParensForSymbolVariant
bool useParensForSymbolVariant() const
Definition: MCAsmInfo.h:756
llvm::MCAsmInfo::hasWeakDefCanBeHiddenDirective
bool hasWeakDefCanBeHiddenDirective() const
Definition: MCAsmInfo.h:710
llvm::MCAsmInfo::SeparatorString
const char * SeparatorString
This string, if specified, is used to separate instructions from each other when on the same line.
Definition: MCAsmInfo.h:131
llvm::MCAsmInfo::getMaxInstLength
virtual unsigned getMaxInstLength(const MCSubtargetInfo *STI=nullptr) const
Returns the maximum possible encoded instruction size in bytes.
Definition: MCAsmInfo.h:602
llvm::MCAsmInfo::usesDwarfFileAndLocDirectives
bool usesDwarfFileAndLocDirectives() const
Definition: MCAsmInfo.h:761
llvm::MCAsmInfo::getAsciiDirective
const char * getAsciiDirective() const
Definition: MCAsmInfo.h:673
llvm::MCAsmInfo::hasCOFFAssociativeComdats
bool hasCOFFAssociativeComdats() const
Definition: MCAsmInfo.h:594
llvm::MCAsmInfo::isSectionAtomizableBySymbols
virtual bool isSectionAtomizableBySymbols(const MCSection &Section) const
True if the section is atomized using the symbols in it.
Definition: MCAsmInfo.cpp:85
llvm::MCAsmInfo::HasSubsectionsViaSymbols
bool HasSubsectionsViaSymbols
True if this target has the MachO .subsections_via_symbols directive.
Definition: MCAsmInfo.h:86
llvm::MCAsmInfo::Code64Directive
const char * Code64Directive
Definition: MCAsmInfo.h:183
llvm::MCAsmInfo::UsesDwarfFileAndLocDirectives
bool UsesDwarfFileAndLocDirectives
True if the target supports generating the DWARF line table through using the .loc/....
Definition: MCAsmInfo.h:445
llvm::MCAsmInfo::WeakRefDirective
const char * WeakRefDirective
This directive, if non-null, is used to declare a global as being a weak undefined symbol.
Definition: MCAsmInfo.h:392
llvm::MCAsmInfo::CommentString
StringRef CommentString
This indicates the comment string used by the assembler.
Definition: MCAsmInfo.h:135
llvm::MCAsmInfo::DwarfRegNumForCFI
bool DwarfRegNumForCFI
True if dwarf register numbers are printed instead of symbolic register names in ....
Definition: MCAsmInfo.h:453
llvm::MCAsmInfo::COMMDirectiveAlignmentIsInBytes
bool COMMDirectiveAlignmentIsInBytes
True is .comm's and .lcomms optional alignment is to be specified in bytes instead of log2(n).
Definition: MCAsmInfo.h:353
llvm::MCAsmInfo::hasVisibilityOnlyWithLinkage
bool hasVisibilityOnlyWithLinkage() const
Definition: MCAsmInfo.h:596
llvm::MCAsmInfo::getTPRel64Directive
const char * getTPRel64Directive() const
Definition: MCAsmInfo.h:538
llvm::MCAsmInfo::getTPRel32Directive
const char * getTPRel32Directive() const
Definition: MCAsmInfo.h:539
llvm::MCAsmInfo::isValidUnquotedName
virtual bool isValidUnquotedName(StringRef Name) const
Return true if the identifier Name does not need quotes to be syntactically correct.
Definition: MCAsmInfo.cpp:115
llvm::MCAsmInfo::RelaxELFRelocations
bool RelaxELFRelocations
Definition: MCAsmInfo.h:494
llvm::MCAsmInfo::HasAltEntry
bool HasAltEntry
True if this target supports the MachO .alt_entry directive.
Definition: MCAsmInfo.h:385
llvm::MCAsmInfo::CodePointerSize
unsigned CodePointerSize
Code pointer size in bytes. Default is 4.
Definition: MCAsmInfo.h:72
llvm::MCAsmInfo::ZeroDirective
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:242
llvm::MCAsmInfo::supportsNameQuoting
bool supportsNameQuoting() const
Definition: MCAsmInfo.h:657
llvm::MCAsmInfo::AssemblerDialect
unsigned AssemblerDialect
Which dialect of an assembler variant to use. Defaults to 0.
Definition: MCAsmInfo.h:186
llvm::MCAsmInfo::HasWeakDefCanBeHiddenDirective
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:400
llvm::WinEH::EncodingType
EncodingType
Definition: MCAsmInfo.h:35
llvm::MCAsmInfo::UseMotorolaIntegers
bool UseMotorolaIntegers
Definition: MCAsmInfo.h:501
llvm::MCAsmInfo::InitialFrameState
std::vector< MCCFIInstruction > InitialFrameState
Definition: MCAsmInfo.h:465
llvm::MCAsmInfo::WinEHEncodingType
WinEH::EncodingType WinEHEncodingType
Windows exception handling data (.pdata) encoding. Defaults to Invalid.
Definition: MCAsmInfo.h:433
llvm::MCAsmInfo::supportsSignedData
bool supportsSignedData() const
Definition: MCAsmInfo.h:533
llvm::WinEH::EncodingType::CE
@ CE
Windows NT (Windows on ARM)
llvm::MCAsmInfo::addInitialFrameState
void addInitialFrameState(const MCCFIInstruction &Inst)
Definition: MCAsmInfo.cpp:81
llvm::MCAsmInfo::getCode32Directive
const char * getCode32Directive() const
Definition: MCAsmInfo.h:641
llvm::MCAsmInfo::Data16bitsDirective
const char * Data16bitsDirective
Definition: MCAsmInfo.h:274
llvm::MCAsmInfo::HiddenDeclarationVisibilityAttr
MCSymbolAttr HiddenDeclarationVisibilityAttr
This attribute, if not MCSA_Invalid, is used to declare an undefined symbol as having hidden visibili...
Definition: MCAsmInfo.h:413
llvm::MCAsmInfo::needsFunctionDescriptors
bool needsFunctionDescriptors() const
Definition: MCAsmInfo.h:812
llvm::MCAsmInfo::getDollarIsPC
bool getDollarIsPC() const
Definition: MCAsmInfo.h:607
llvm::MCAsmInfo::getGlobalDirective
const char * getGlobalDirective() const
Definition: MCAsmInfo.h:681
llvm::MCAsmInfo::ACLS_Unknown
@ ACLS_Unknown
Definition: MCAsmInfo.h:60
llvm::MCAsmInfo::MCAsmInfo
MCAsmInfo()
Definition: MCAsmInfo.cpp:37
llvm::MCAsmInfo::doesAllowAtInName
bool doesAllowAtInName() const
Definition: MCAsmInfo.h:644
llvm::WinEH::EncodingType::MIPS
@ MIPS
Windows x86, uses no CFI, just EH tables.
llvm::MCAsmInfo::hasDotTypeDotSizeDirective
bool hasDotTypeDotSizeDirective() const
Definition: MCAsmInfo.h:701
llvm::MCAsmInfo::DTPRel32Directive
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:294
llvm::MCAsmInfo::getCode16Directive
const char * getCode16Directive() const
Definition: MCAsmInfo.h:640
llvm::MCAsmInfo::doesSupportDebugInformation
bool doesSupportDebugInformation() const
Definition: MCAsmInfo.h:726
llvm::MCAsmInfo::hasAggressiveSymbolFolding
bool hasAggressiveSymbolFolding() const
Definition: MCAsmInfo.h:687
llvm::DebugCompressionType
DebugCompressionType
Definition: MCTargetOptions.h:28
llvm::MCAsmInfo::GlobalDirective
const char * GlobalDirective
This is the directive used to declare a global entity.
Definition: MCAsmInfo.h:327
llvm::MCAsmInfo::doesAllowAtAtStartOfIdentifier
bool doesAllowAtAtStartOfIdentifier() const
Definition: MCAsmInfo.h:648
llvm::MCAsmInfo::Data8bitsDirective
const char * Data8bitsDirective
These directives are used to output some unit of integer data to the current section.
Definition: MCAsmInfo.h:273
llvm::MCAsmInfo::HasBasenameOnlyForFileDirective
bool HasBasenameOnlyForFileDirective
True if the target only has basename for .file directive.
Definition: MCAsmInfo.h:361
llvm::StringRef
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:57
llvm::MCAsmInfo::doesAllowDollarAtStartOfIdentifier
bool doesAllowDollarAtStartOfIdentifier() const
Definition: MCAsmInfo.h:651
llvm::MCAsmInfo::SunStyleELFSectionSwitchSyntax
bool SunStyleELFSectionSwitchSyntax
This is true if this target uses "Sun Style" syntax for section switching ("#alloc,...
Definition: MCAsmInfo.h:302
llvm::MCAsmInfo::InlineAsmStart
const char * InlineAsmStart
If these are nonempty, they contain a directive to emit before and after an inline assembly statement...
Definition: MCAsmInfo.h:175
llvm::MCSection
Instances of this class represent a uniqued identifier for a section in the current translation unit.
Definition: MCSection.h:39
llvm::MCAsmInfo::AllowDollarAtStartOfIdentifier
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:204
llvm::MCAsmInfo::doesDwarfUseRelocationsAcrossSections
bool doesDwarfUseRelocationsAcrossSections() const
Definition: MCAsmInfo.h:750
llvm::MCAsmInfo::getLCOMMDirectiveAlignmentType
LCOMM::LCOMMType getLCOMMDirectiveAlignmentType() const
Definition: MCAsmInfo.h:693
llvm::MCAsmInfo::getInitialFrameState
const std::vector< MCCFIInstruction > & getInitialFrameState() const
Definition: MCAsmInfo.h:771
llvm::MCAsmInfo::TextAlignFillValue
unsigned TextAlignFillValue
If non-zero, this is used to fill the executable space created as the result of a alignment directive...
Definition: MCAsmInfo.h:321
llvm::MCAsmInfo::doDwarfFDESymbolsUseAbsDiff
bool doDwarfFDESymbolsUseAbsDiff() const
Definition: MCAsmInfo.h:754
llvm::MCAsmInfo::DTPRel64Directive
const char * DTPRel64Directive
Definition: MCAsmInfo.h:295
llvm::MCAsmInfo::setBinutilsVersion
void setBinutilsVersion(std::pair< int, int > Value)
Definition: MCAsmInfo.h:775
llvm::MCAsmInfo::AscizDirective
const char * AscizDirective
If not null, this allows for special handling of zero terminated strings on this target.
Definition: MCAsmInfo.h:257
llvm::MCAsmInfo::AllowAtAtStartOfIdentifier
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:211
llvm::MCAsmInfo::hasWeakDefDirective
bool hasWeakDefDirective() const
Definition: MCAsmInfo.h:708
llvm::MCAsmInfo::hasBasenameOnlyForFileDirective
bool hasBasenameOnlyForFileDirective() const
Definition: MCAsmInfo.h:697
llvm::WinEH::EncodingType::Alpha64
@ Alpha64
Windows Alpha.
llvm::MCAsmInfo::hasMachoZeroFillDirective
bool hasMachoZeroFillDirective() const
Definition: MCAsmInfo.h:592
llvm::MCAsmInfo::getDTPRel64Directive
const char * getDTPRel64Directive() const
Definition: MCAsmInfo.h:536
llvm::MCAsmInfo::StarIsPC
bool StarIsPC
Whether the '*' token refers to the current PC.
Definition: MCAsmInfo.h:127
llvm::MCAsmInfo::getCalleeSaveStackSlotSize
unsigned getCalleeSaveStackSlotSize() const
Get the callee-saved register stack slot size in bytes.
Definition: MCAsmInfo.h:515
llvm::GraphProgram::Name
Name
Definition: GraphWriter.h:52
llvm::MCAsmInfo::CalleeSaveStackSlotSize
unsigned CalleeSaveStackSlotSize
Size of the stack slot reserved for callee-saved registers, in bytes.
Definition: MCAsmInfo.h:76
llvm::MCAsmInfo::shouldUseLogicalShr
bool shouldUseLogicalShr() const
Definition: MCAsmInfo.h:807
llvm::MCAsmInfo::HasCOFFComdatConstants
bool HasCOFFComdatConstants
True if this is a non-GNU COFF target.
Definition: MCAsmInfo.h:103
llvm::MCAsmInfo::getHiddenVisibilityAttr
MCSymbolAttr getHiddenVisibilityAttr() const
Definition: MCAsmInfo.h:716
llvm::SectionName
Definition: DWARFSection.h:21
llvm::WinEH::EncodingType::Alpha
@ Alpha
Invalid.
llvm::MCAsmInfo::getGPRel64Directive
const char * getGPRel64Directive() const
Definition: MCAsmInfo.h:534
llvm::MCAsmInfo::getPrivateLabelPrefix
StringRef getPrivateLabelPrefix() const
Definition: MCAsmInfo.h:626
llvm::ExceptionHandling::WinEH
@ WinEH
Windows Exception Handling.
llvm::TargetStackID::Value
Value
Definition: TargetFrameLowering.h:27
llvm::MCAsmInfo::DotIsPC
bool DotIsPC
Allow '.
Definition: MCAsmInfo.h:123
llvm::MCAsmInfo::DollarIsPC
bool DollarIsPC
The '$' token, when not referencing an identifier or constant, refers to the current PC.
Definition: MCAsmInfo.h:119
llvm::MCAsmInfo::isLittleEndian
bool isLittleEndian() const
True if the target is little endian.
Definition: MCAsmInfo.h:520
llvm::MCAsmInfo::getWeakDirective
const char * getWeakDirective() const
Definition: MCAsmInfo.h:706
llvm::MCAsmInfo::hasIdentDirective
bool hasIdentDirective() const
Definition: MCAsmInfo.h:703
llvm::MCAsmInfo::setCompressDebugSections
void setCompressDebugSections(DebugCompressionType CompressDebugSections)
Definition: MCAsmInfo.h:803
llvm::MCAsmInfo::avoidWeakIfComdat
bool avoidWeakIfComdat() const
Definition: MCAsmInfo.h:714
llvm::MCAsmInfo::hasCOFFComdatConstants
bool hasCOFFComdatConstants() const
Definition: MCAsmInfo.h:595
llvm::LCOMM::ByteAlignment
@ ByteAlignment
Definition: MCAsmInfo.h:50
llvm::MCAsmInfo::HasCOFFAssociativeComdats
bool HasCOFFAssociativeComdats
True if this is a non-GNU COFF target.
Definition: MCAsmInfo.h:99
llvm::MCAsmInfo::UseLogicalShr
bool UseLogicalShr
True if the integrated assembler should interpret 'a >> b' constant expressions as logical rather tha...
Definition: MCAsmInfo.h:490
llvm::MCAsmInfo::NeedsFunctionDescriptors
bool NeedsFunctionDescriptors
Definition: MCAsmInfo.h:504
llvm::ExceptionHandling::None
@ None
No exception support.
llvm::MCAsmInfo::HiddenVisibilityAttr
MCSymbolAttr HiddenVisibilityAttr
This attribute, if not MCSA_Invalid, is used to declare a symbol as having hidden visibility.
Definition: MCAsmInfo.h:409
llvm::MCAsmInfo::binutilsIsAtLeast
bool binutilsIsAtLeast(int Major, int Minor) const
Definition: MCAsmInfo.h:782
llvm::MCAsmInfo::AllowQuestionAtStartOfIdentifier
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:197
llvm::MCAsmInfo::MaxInstLength
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
llvm::MCAsmInfo::getExceptionHandlingType
ExceptionHandling getExceptionHandlingType() const
Definition: MCAsmInfo.h:728
llvm::MCAsmInfo::getData16bitsDirective
const char * getData16bitsDirective() const
Definition: MCAsmInfo.h:530
llvm::MCAsmInfo::getDTPRel32Directive
const char * getDTPRel32Directive() const
Definition: MCAsmInfo.h:537
llvm::MCAsmInfo::getGPRel32Directive
const char * getGPRel32Directive() const
Definition: MCAsmInfo.h:535
llvm::MCAsmInfo::getCode64Directive
const char * getCode64Directive() const
Definition: MCAsmInfo.h:642
llvm::MCAsmInfo::BinutilsVersion
std::pair< int, int > BinutilsVersion
Definition: MCAsmInfo.h:473
llvm::MCAsmInfo::getLabelSuffix
const char * getLabelSuffix() const
Definition: MCAsmInfo.h:621
llvm::MCAsmInfo::LCOMMDirectiveAlignmentType
LCOMM::LCOMMType LCOMMDirectiveAlignmentType
Describes if the .lcomm directive for the target supports an alignment argument and how it is interpr...
Definition: MCAsmInfo.h:357
llvm::MCAsmInfo::getNonexecutableStackSection
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:544
llvm::MCAsmInfo::doesAllowHashAtStartOfIdentifier
bool doesAllowHashAtStartOfIdentifier() const
Definition: MCAsmInfo.h:654
llvm::MCAsmInfo::setPreserveAsmComments
virtual void setPreserveAsmComments(bool Value)
Set whether assembly (inline or otherwise) should be parsed.
Definition: MCAsmInfo.h:795
llvm::MCAsmInfo::ExceptionsType
ExceptionHandling ExceptionsType
Exception handling format for the target. Defaults to None.
Definition: MCAsmInfo.h:426
llvm::MCAsmInfo::HasAggressiveSymbolFolding
bool HasAggressiveSymbolFolding
False if the assembler requires that we use.
Definition: MCAsmInfo.h:349
llvm::MCAsmInfo::shouldUseMotorolaIntegers
bool shouldUseMotorolaIntegers() const
Definition: MCAsmInfo.h:813
llvm::LCOMM::LCOMMType
LCOMMType
Definition: MCAsmInfo.h:50
llvm::MCAsmInfo::AllowAdditionalComments
bool AllowAdditionalComments
This indicates whether to allow additional "comment strings" to be lexed as a comment.
Definition: MCAsmInfo.h:147
llvm::MCAsmInfo::getCommentColumn
unsigned getCommentColumn() const
This indicates the column (zero-based) at which asm comments should be printed.
Definition: MCAsmInfo.h:614
llvm::MCAsmInfo::PreserveAsmComments
bool PreserveAsmComments
Preserve Comments in assembly.
Definition: MCAsmInfo.h:483
llvm::MCAsmInfo::LabelSuffix
const char * LabelSuffix
This is appended to emitted labels. Defaults to ":".
Definition: MCAsmInfo.h:150
llvm::MCAsmInfo::hasMachoTBSSDirective
bool hasMachoTBSSDirective() const
Definition: MCAsmInfo.h:593
llvm::MCAsmInfo::AsmCharLiteralSyntax
AsmCharLiteralSyntax
Assembly character literal syntax types.
Definition: MCAsmInfo.h:59
llvm::MCAsmInfo::getWeakRefDirective
const char * getWeakRefDirective() const
Definition: MCAsmInfo.h:707
llvm::MCAsmInfo::getHiddenDeclarationVisibilityAttr
MCSymbolAttr getHiddenDeclarationVisibilityAttr() const
Definition: MCAsmInfo.h:718
llvm::MCAsmInfo::getCOMMDirectiveAlignmentIsInBytes
bool getCOMMDirectiveAlignmentIsInBytes() const
Definition: MCAsmInfo.h:689
llvm::MCAsmInfo::NeedsDwarfSectionOffsetDirective
bool NeedsDwarfSectionOffsetDirective
Definition: MCAsmInfo.h:309
llvm::MCAsmInfo::hasSubsectionsViaSymbols
bool hasSubsectionsViaSymbols() const
Definition: MCAsmInfo.h:525
llvm::MCAsmInfo::preserveAsmComments
bool preserveAsmComments() const
Return true if assembly (inline or otherwise) should be parsed.
Definition: MCAsmInfo.h:792
llvm::MCAsmInfo::AsciiDirective
const char * AsciiDirective
This directive allows emission of an ascii string with the standard C escape characters embedded into...
Definition: MCAsmInfo.h:252
llvm::MCAsmInfo::usesWindowsCFI
bool usesWindowsCFI() const
Definition: MCAsmInfo.h:744
llvm::MCSubtargetInfo
Generic base class for all target subtargets.
Definition: MCSubtargetInfo.h:75
llvm::ExceptionHandling::DwarfCFI
@ DwarfCFI
DWARF-like instruction based exceptions.
llvm::Value
LLVM Value Representation.
Definition: Value.h:75
llvm::MCExpr
Base class for the full range of assembler expressions which are needed for parsing.
Definition: MCExpr.h:35
llvm::MCAsmInfo::needsLocalForSize
bool needsLocalForSize() const
Definition: MCAsmInfo.h:624
llvm::MCAsmInfo::NeedsLocalForSize
bool NeedsLocalForSize
Definition: MCAsmInfo.h:156
llvm::MCAsmInfo::GPRel32Directive
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:289
llvm::MCAsmInfo::HasLEB128Directives
bool HasLEB128Directives
True if the target supports LEB128 directives.
Definition: MCAsmInfo.h:234
llvm::ISD::MCSymbol
@ MCSymbol
Definition: ISDOpcodes.h:165
llvm::MCAsmInfo::IsLittleEndian
bool IsLittleEndian
True if target is little endian. Default is true.
Definition: MCAsmInfo.h:79
llvm::MCAsmInfo::SupportsQuotedNames
bool SupportsQuotedNames
If this is true, symbol names with invalid characters will be printed in quotes.
Definition: MCAsmInfo.h:222
llvm::LCOMM::NoAlignment
@ NoAlignment
Definition: MCAsmInfo.h:50
llvm::MCAsmInfo::getData32bitsDirective
const char * getData32bitsDirective() const
Definition: MCAsmInfo.h:531