1 //===-- llvm/Target/TargetAsmInfo.h - Asm info ------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file contains a class to be used as the basis for target specific
11 // asm writers. This class primarily takes care of global printing constants,
12 // which are used in very similar ways across all targets.
14 //===----------------------------------------------------------------------===//
16 #ifndef LLVM_TARGET_ASM_INFO_H
17 #define LLVM_TARGET_ASM_INFO_H
19 #include "llvm/ADT/DenseMap.h"
20 #include "llvm/ADT/StringMap.h"
21 #include "llvm/Support/DataTypes.h"
25 // DWARF encoding query type
26 namespace DwarfEncoding {
34 namespace SectionKind {
36 Unknown = 0, ///< Custom section.
37 Text, ///< Text section.
38 BSS, ///< BSS section.
40 Data, ///< Data section.
41 DataRel, ///< Data that has relocations.
42 DataRelLocal, ///< Data that only has local relocations.
45 ROData, ///< Readonly data section.
46 DataRelRO, ///< Readonly data with non-local relocations.
47 DataRelROLocal, ///< Readonly data with local relocations only.
49 /// Mergable sections.
50 RODataMergeStr, ///< Readonly data section: nul-terminated strings.
51 RODataMergeConst, ///< Readonly data section: fixed-length constants.
53 /// Thread local data.
54 ThreadData, ///< Initialized TLS data objects
55 ThreadBSS ///< Uninitialized TLS data objects
58 static inline bool isReadOnly(Kind K) {
59 return (K == SectionKind::ROData ||
60 K == SectionKind::DataRelRO ||
61 K == SectionKind::DataRelROLocal ||
62 K == SectionKind::RODataMergeConst ||
63 K == SectionKind::RODataMergeStr);
66 static inline bool isBSS(Kind K) {
67 return K == BSS || K == ThreadBSS;
70 static inline bool isTLS(Kind K) {
71 return K == ThreadData || K == ThreadBSS;
74 static inline bool isCode(Kind K) {
78 static inline bool isWritable(Kind K) {
80 K == SectionKind::Data ||
81 K == SectionKind::DataRel ||
82 K == SectionKind::DataRelLocal ||
83 K == SectionKind::DataRelRO ||
84 K == SectionKind::DataRelROLocal ||
85 K == SectionKind::BSS;
89 namespace SectionFlags {
90 const unsigned Invalid = -1U;
91 const unsigned None = 0;
92 const unsigned Code = 1 << 0; ///< Section contains code
93 const unsigned Writable = 1 << 1; ///< Section is writable
94 const unsigned BSS = 1 << 2; ///< Section contains only zeroes
95 const unsigned Mergeable = 1 << 3; ///< Section contains mergeable data
96 const unsigned Strings = 1 << 4; ///< Section contains C-type strings
97 const unsigned TLS = 1 << 5; ///< Section contains thread-local data
98 const unsigned Debug = 1 << 6; ///< Section contains debug data
99 const unsigned Linkonce = 1 << 7; ///< Section is linkonce
100 const unsigned TypeFlags = 0xFF;
101 // Some gap for future flags
103 /// Named - True if this section should be printed with ".section <name>",
104 /// false if the section name is something like ".const".
105 const unsigned Named = 1 << 23; ///< Section is named
106 const unsigned EntitySize = 0xFF << 24; ///< Entity size for mergeable stuff
108 static inline unsigned getEntitySize(unsigned Flags) {
109 return (Flags >> 24) & 0xFF;
112 static inline unsigned setEntitySize(unsigned Flags, unsigned Size) {
113 return ((Flags & ~EntitySize) | ((Size & 0xFF) << 24));
117 static inline unsigned getEmptyKey() { return Invalid; }
118 static inline unsigned getTombstoneKey() { return Invalid - 1; }
119 static unsigned getHashValue(const unsigned &Key) { return Key; }
120 static bool isEqual(unsigned LHS, unsigned RHS) { return LHS == RHS; }
121 static bool isPod() { return true; }
124 typedef DenseMap<unsigned, std::string, KeyInfo> FlagsStringsMapType;
134 friend class TargetAsmInfo;
135 friend class StringMapEntry<Section>;
136 friend class StringMap<Section>;
140 explicit Section(unsigned F = SectionFlags::Invalid) : Flags(F) { }
144 unsigned getEntitySize() const { return (Flags >> 24) & 0xFF; }
146 const std::string &getName() const { return Name; }
147 unsigned getFlags() const { return Flags; }
149 bool hasFlag(unsigned F) const { return (Flags & F) != 0; }
152 /// TargetAsmInfo - This class is intended to be used as a base class for asm
153 /// properties and features specific to the target.
154 class TargetAsmInfo {
156 mutable StringMap<Section> Sections;
157 mutable SectionFlags::FlagsStringsMapType FlagsStrings;
159 /// TM - The current TargetMachine.
160 const TargetMachine &TM;
162 //===------------------------------------------------------------------===//
163 // Properties to be set by the target writer, used to configure asm printer.
166 /// TextSection - Section directive for standard text.
168 const Section *TextSection; // Defaults to ".text".
170 /// DataSection - Section directive for standard data.
172 const Section *DataSection; // Defaults to ".data".
174 /// BSSSection - Section directive for uninitialized data. Null if this
175 /// target doesn't support a BSS section.
177 const char *BSSSection; // Default to ".bss".
178 const Section *BSSSection_;
180 /// ReadOnlySection - This is the directive that is emitted to switch to a
181 /// read-only section for constant data (e.g. data declared const,
183 const Section *ReadOnlySection; // Defaults to NULL
185 /// TLSDataSection - Section directive for Thread Local data.
187 const Section *TLSDataSection; // Defaults to ".tdata".
189 /// TLSBSSSection - Section directive for Thread Local uninitialized data.
190 /// Null if this target doesn't support a BSS section.
192 const Section *TLSBSSSection; // Defaults to ".tbss".
194 /// ZeroFillDirective - Directive for emitting a global to the ZeroFill
195 /// section on this target. Null if this target doesn't support zerofill.
196 const char *ZeroFillDirective; // Default is null.
198 /// NonexecutableStackDirective - Directive for declaring to the
199 /// linker and beyond that the emitted code does not require stack
200 /// memory to be executable.
201 const char *NonexecutableStackDirective; // Default is null.
203 /// NeedsSet - True if target asm treats expressions in data directives
204 /// as linktime-relocatable. For assembly-time computation, we need to
205 /// use a .set. Thus:
208 /// is computed at assembly time, while
210 /// is relocated if the relative locations of x and y change at linktime.
211 /// We want both these things in different places.
212 bool NeedsSet; // Defaults to false.
214 /// MaxInstLength - This is the maximum possible length of an instruction,
215 /// which is needed to compute the size of an inline asm.
216 unsigned MaxInstLength; // Defaults to 4.
218 /// PCSymbol - The symbol used to represent the current PC. Used in PC
219 /// relative expressions.
220 const char *PCSymbol; // Defaults to "$".
222 /// SeparatorChar - This character, if specified, is used to separate
223 /// instructions from each other when on the same line. This is used to
224 /// measure inline asm instructions.
225 char SeparatorChar; // Defaults to ';'
227 /// CommentColumn - This indicates the comment num (zero-based) at
228 /// which asm comments should be printed.
229 unsigned CommentColumn; // Defaults to 60
231 /// CommentString - This indicates the comment character used by the
233 const char *CommentString; // Defaults to "#"
235 /// FirstOperandColumn - The output column where the first operand
236 /// should be printed
237 unsigned FirstOperandColumn; // Defaults to 0 (ignored)
239 /// MaxOperandLength - The maximum length of any printed asm
241 unsigned MaxOperandLength; // Defaults to 0 (ignored)
243 /// GlobalPrefix - If this is set to a non-empty string, it is prepended
244 /// onto all global symbols. This is often used for "_" or ".".
245 const char *GlobalPrefix; // Defaults to ""
247 /// PrivateGlobalPrefix - This prefix is used for globals like constant
248 /// pool entries that are completely private to the .s file and should not
249 /// have names in the .o file. This is often "." or "L".
250 const char *PrivateGlobalPrefix; // Defaults to "."
252 /// LinkerPrivateGlobalPrefix - This prefix is used for symbols that should
253 /// be passed through the assembler but be removed by the linker. This
254 /// is "l" on Darwin, currently used for some ObjC metadata.
255 const char *LinkerPrivateGlobalPrefix; // Defaults to ""
257 /// JumpTableSpecialLabelPrefix - If not null, a extra (dead) label is
258 /// emitted before jump tables with the specified prefix.
259 const char *JumpTableSpecialLabelPrefix; // Default to null.
261 /// GlobalVarAddrPrefix/Suffix - If these are nonempty, these strings
262 /// will enclose any GlobalVariable (that isn't a function)
264 const char *GlobalVarAddrPrefix; // Defaults to ""
265 const char *GlobalVarAddrSuffix; // Defaults to ""
267 /// FunctionAddrPrefix/Suffix - If these are nonempty, these strings
268 /// will enclose any GlobalVariable that points to a function.
270 const char *FunctionAddrPrefix; // Defaults to ""
271 const char *FunctionAddrSuffix; // Defaults to ""
273 /// PersonalityPrefix/Suffix - If these are nonempty, these strings will
274 /// enclose any personality function in the common frame section.
276 const char *PersonalityPrefix; // Defaults to ""
277 const char *PersonalitySuffix; // Defaults to ""
279 /// NeedsIndirectEncoding - If set, we need to set the indirect encoding bit
282 bool NeedsIndirectEncoding; // Defaults to false
284 /// InlineAsmStart/End - If these are nonempty, they contain a directive to
285 /// emit before and after an inline assembly statement.
286 const char *InlineAsmStart; // Defaults to "#APP\n"
287 const char *InlineAsmEnd; // Defaults to "#NO_APP\n"
289 /// AssemblerDialect - Which dialect of an assembler variant to use.
290 unsigned AssemblerDialect; // Defaults to 0
292 /// AllowQuotesInName - This is true if the assembler allows for complex
293 /// symbol names to be surrounded in quotes. This defaults to false.
294 bool AllowQuotesInName;
296 //===--- Data Emission Directives -------------------------------------===//
298 /// ZeroDirective - this should be set to the directive used to get some
299 /// number of zero bytes emitted to the current section. Common cases are
300 /// "\t.zero\t" and "\t.space\t". If this is set to null, the
301 /// Data*bitsDirective's will be used to emit zero bytes.
302 const char *ZeroDirective; // Defaults to "\t.zero\t"
303 const char *ZeroDirectiveSuffix; // Defaults to ""
305 /// AsciiDirective - This directive allows emission of an ascii string with
306 /// the standard C escape characters embedded into it.
307 const char *AsciiDirective; // Defaults to "\t.ascii\t"
309 /// AscizDirective - If not null, this allows for special handling of
310 /// zero terminated strings on this target. This is commonly supported as
311 /// ".asciz". If a target doesn't support this, it can be set to null.
312 const char *AscizDirective; // Defaults to "\t.asciz\t"
314 /// DataDirectives - These directives are used to output some unit of
315 /// integer data to the current section. If a data directive is set to
316 /// null, smaller data directives will be used to emit the large sizes.
317 const char *Data8bitsDirective; // Defaults to "\t.byte\t"
318 const char *Data16bitsDirective; // Defaults to "\t.short\t"
319 const char *Data32bitsDirective; // Defaults to "\t.long\t"
320 const char *Data64bitsDirective; // Defaults to "\t.quad\t"
322 /// getDataASDirective - Return the directive that should be used to emit
323 /// data of the specified size to the specified numeric address space.
324 virtual const char *getDataASDirective(unsigned Size, unsigned AS) const {
325 assert(AS != 0 && "Don't know the directives for default addr space");
329 //===--- Alignment Information ----------------------------------------===//
331 /// AlignDirective - The directive used to emit round up to an alignment
334 const char *AlignDirective; // Defaults to "\t.align\t"
336 /// AlignmentIsInBytes - If this is true (the default) then the asmprinter
337 /// emits ".align N" directives, where N is the number of bytes to align to.
338 /// Otherwise, it emits ".align log2(N)", e.g. 3 to align to an 8 byte
340 bool AlignmentIsInBytes; // Defaults to true
342 /// TextAlignFillValue - If non-zero, this is used to fill the executable
343 /// space created as the result of a alignment directive.
344 unsigned TextAlignFillValue;
346 //===--- Section Switching Directives ---------------------------------===//
348 /// SwitchToSectionDirective - This is the directive used when we want to
349 /// emit a global to an arbitrary section. The section name is emited after
351 const char *SwitchToSectionDirective; // Defaults to "\t.section\t"
353 /// TextSectionStartSuffix - This is printed after each start of section
354 /// directive for text sections.
355 const char *TextSectionStartSuffix; // Defaults to "".
357 /// DataSectionStartSuffix - This is printed after each start of section
358 /// directive for data sections.
359 const char *DataSectionStartSuffix; // Defaults to "".
361 /// SectionEndDirectiveSuffix - If non-null, the asm printer will close each
362 /// section with the section name and this suffix printed.
363 const char *SectionEndDirectiveSuffix;// Defaults to null.
365 /// ConstantPoolSection - This is the section that we SwitchToSection right
366 /// before emitting the constant pool for a function.
367 const char *ConstantPoolSection; // Defaults to "\t.section .rodata"
369 /// JumpTableDataSection - This is the section that we SwitchToSection right
370 /// before emitting the jump tables for a function when the relocation model
372 const char *JumpTableDataSection; // Defaults to "\t.section .rodata"
374 /// JumpTableDirective - if non-null, the directive to emit before a jump
376 const char *JumpTableDirective;
378 /// CStringSection - If not null, this allows for special handling of
379 /// cstring constants (null terminated string that does not contain any
380 /// other null bytes) on this target. This is commonly supported as
382 const char *CStringSection; // Defaults to NULL
383 const Section *CStringSection_;
385 /// StaticCtorsSection - This is the directive that is emitted to switch to
386 /// a section to emit the static constructor list.
387 /// Defaults to "\t.section .ctors,\"aw\",@progbits".
388 const char *StaticCtorsSection;
390 /// StaticDtorsSection - This is the directive that is emitted to switch to
391 /// a section to emit the static destructor list.
392 /// Defaults to "\t.section .dtors,\"aw\",@progbits".
393 const char *StaticDtorsSection;
395 //===--- Global Variable Emission Directives --------------------------===//
397 /// GlobalDirective - This is the directive used to declare a global entity.
399 const char *GlobalDirective; // Defaults to NULL.
401 /// ExternDirective - This is the directive used to declare external
404 const char *ExternDirective; // Defaults to NULL.
406 /// SetDirective - This is the name of a directive that can be used to tell
407 /// the assembler to set the value of a variable to some expression.
408 const char *SetDirective; // Defaults to null.
410 /// LCOMMDirective - This is the name of a directive (if supported) that can
411 /// be used to efficiently declare a local (internal) block of zero
412 /// initialized data in the .bss/.data section. The syntax expected is:
413 /// @verbatim <LCOMMDirective> SYMBOLNAME LENGTHINBYTES, ALIGNMENT
415 const char *LCOMMDirective; // Defaults to null.
417 const char *COMMDirective; // Defaults to "\t.comm\t".
419 /// COMMDirectiveTakesAlignment - True if COMMDirective take a third
420 /// argument that specifies the alignment of the declaration.
421 bool COMMDirectiveTakesAlignment; // Defaults to true.
423 /// HasDotTypeDotSizeDirective - True if the target has .type and .size
424 /// directives, this is true for most ELF targets.
425 bool HasDotTypeDotSizeDirective; // Defaults to true.
427 /// HasSingleParameterDotFile - True if the target has a single parameter
428 /// .file directive, this is true for ELF targets.
429 bool HasSingleParameterDotFile; // Defaults to true.
431 /// UsedDirective - This directive, if non-null, is used to declare a global
432 /// as being used somehow that the assembler can't see. This prevents dead
433 /// code elimination on some targets.
434 const char *UsedDirective; // Defaults to null.
436 /// WeakRefDirective - This directive, if non-null, is used to declare a
437 /// global as being a weak undefined symbol.
438 const char *WeakRefDirective; // Defaults to null.
440 /// WeakDefDirective - This directive, if non-null, is used to declare a
441 /// global as being a weak defined symbol.
442 const char *WeakDefDirective; // Defaults to null.
444 /// HiddenDirective - This directive, if non-null, is used to declare a
445 /// global or function as having hidden visibility.
446 const char *HiddenDirective; // Defaults to "\t.hidden\t".
448 /// ProtectedDirective - This directive, if non-null, is used to declare a
449 /// global or function as having protected visibility.
450 const char *ProtectedDirective; // Defaults to "\t.protected\t".
452 //===--- Dwarf Emission Directives -----------------------------------===//
454 /// AbsoluteDebugSectionOffsets - True if we should emit abolute section
455 /// offsets for debug information. Defaults to false.
456 bool AbsoluteDebugSectionOffsets;
458 /// AbsoluteEHSectionOffsets - True if we should emit abolute section
459 /// offsets for EH information. Defaults to false.
460 bool AbsoluteEHSectionOffsets;
462 /// HasLEB128 - True if target asm supports leb128 directives.
464 bool HasLEB128; // Defaults to false.
466 /// hasDotLocAndDotFile - True if target asm supports .loc and .file
467 /// directives for emitting debugging information.
469 bool HasDotLocAndDotFile; // Defaults to false.
471 /// SupportsDebugInformation - True if target supports emission of debugging
473 bool SupportsDebugInformation;
475 /// SupportsExceptionHandling - True if target supports
476 /// exception handling.
478 bool SupportsExceptionHandling; // Defaults to false.
480 /// RequiresFrameSection - true if the Dwarf2 output needs a frame section
482 bool DwarfRequiresFrameSection; // Defaults to true.
484 /// DwarfUsesInlineInfoSection - True if DwarfDebugInlineSection is used to
485 /// encode inline subroutine information.
486 bool DwarfUsesInlineInfoSection; // Defaults to false.
488 /// Is_EHSymbolPrivate - If set, the "_foo.eh" is made private so that it
489 /// doesn't show up in the symbol table of the object file.
490 bool Is_EHSymbolPrivate; // Defaults to true.
492 /// GlobalEHDirective - This is the directive used to make exception frame
493 /// tables globally visible.
495 const char *GlobalEHDirective; // Defaults to NULL.
497 /// SupportsWeakEmptyEHFrame - True if target assembler and linker will
498 /// handle a weak_definition of constant 0 for an omitted EH frame.
499 bool SupportsWeakOmittedEHFrame; // Defaults to true.
501 /// DwarfSectionOffsetDirective - Special section offset directive.
502 const char* DwarfSectionOffsetDirective; // Defaults to NULL
504 /// DwarfAbbrevSection - Section directive for Dwarf abbrev.
506 const char *DwarfAbbrevSection; // Defaults to ".debug_abbrev".
508 /// DwarfInfoSection - Section directive for Dwarf info.
510 const char *DwarfInfoSection; // Defaults to ".debug_info".
512 /// DwarfLineSection - Section directive for Dwarf info.
514 const char *DwarfLineSection; // Defaults to ".debug_line".
516 /// DwarfFrameSection - Section directive for Dwarf info.
518 const char *DwarfFrameSection; // Defaults to ".debug_frame".
520 /// DwarfPubNamesSection - Section directive for Dwarf info.
522 const char *DwarfPubNamesSection; // Defaults to ".debug_pubnames".
524 /// DwarfPubTypesSection - Section directive for Dwarf info.
526 const char *DwarfPubTypesSection; // Defaults to ".debug_pubtypes".
528 /// DwarfDebugInlineSection - Section directive for inline info.
530 const char *DwarfDebugInlineSection; // Defaults to ".debug_inlined"
532 /// DwarfStrSection - Section directive for Dwarf info.
534 const char *DwarfStrSection; // Defaults to ".debug_str".
536 /// DwarfLocSection - Section directive for Dwarf info.
538 const char *DwarfLocSection; // Defaults to ".debug_loc".
540 /// DwarfARangesSection - Section directive for Dwarf info.
542 const char *DwarfARangesSection; // Defaults to ".debug_aranges".
544 /// DwarfRangesSection - Section directive for Dwarf info.
546 const char *DwarfRangesSection; // Defaults to ".debug_ranges".
548 /// DwarfMacroInfoSection - Section directive for DWARF macro info.
550 const char *DwarfMacroInfoSection; // Defaults to ".debug_macinfo".
552 /// DwarfEHFrameSection - Section directive for Exception frames.
554 const char *DwarfEHFrameSection; // Defaults to ".eh_frame".
556 /// DwarfExceptionSection - Section directive for Exception table.
558 const char *DwarfExceptionSection; // Defaults to ".gcc_except_table".
560 //===--- CBE Asm Translation Table -----------------------------------===//
562 const char *const *AsmTransCBE; // Defaults to empty
565 explicit TargetAsmInfo(const TargetMachine &TM);
566 virtual ~TargetAsmInfo();
568 const Section* getNamedSection(const char *Name,
569 unsigned Flags = SectionFlags::None,
570 bool Override = false) const;
571 const Section* getUnnamedSection(const char *Directive,
572 unsigned Flags = SectionFlags::None,
573 bool Override = false) const;
575 /// Measure the specified inline asm to determine an approximation of its
577 virtual unsigned getInlineAsmLength(const char *Str) const;
579 /// emitUsedDirectiveFor - This hook allows targets to selectively decide
580 /// not to emit the UsedDirective for some symbols in llvm.used.
581 // FIXME: REMOVE this (rdar://7071300)
582 virtual bool emitUsedDirectiveFor(const GlobalValue *GV,
583 Mangler *Mang) const {
587 /// PreferredEHDataFormat - This hook allows the target to select data
588 /// format used for encoding pointers in exception handling data. Reason is
589 /// 0 for data, 1 for code labels, 2 for function pointers. Global is true
590 /// if the symbol can be relocated.
591 virtual unsigned PreferredEHDataFormat(DwarfEncoding::Target Reason,
595 /// getSectionForMergableConstant - Given a mergable constant with the
596 /// specified size and relocation information, return a section that it
597 /// should be placed in.
598 virtual const Section *
599 getSectionForMergableConstant(uint64_t Size, unsigned ReloInfo) const;
602 /// getSectionPrefixForUniqueGlobal - Return a string that we should prepend
603 /// onto a global's name in order to get the unique section name for the
604 /// global. This is important for globals that need to be merged across
605 /// translation units.
607 getSectionPrefixForUniqueGlobal(SectionKind::Kind Kind) const {
611 /// getFlagsForNamedSection - If this target wants to be able to infer
612 /// section flags based on the name of the section specified for a global
613 /// variable, it can implement this. This is used on ELF systems so that
614 /// ".tbss" gets the TLS bit set etc.
615 virtual unsigned getFlagsForNamedSection(const char *Section) const {
619 /// SectionForGlobal - This method computes the appropriate section to emit
620 /// the specified global variable or function definition. This should not
621 /// be passed external (or available externally) globals.
622 // FIXME: MOVE TO ASMPRINTER.
623 const Section* SectionForGlobal(const GlobalValue *GV) const;
625 /// getSpecialCasedSectionGlobals - Allow the target to completely override
626 /// section assignment of a global.
627 /// FIXME: ELIMINATE this by making PIC16 implement ADDRESS with
628 /// getFlagsForNamedSection.
629 virtual const Section *
630 getSpecialCasedSectionGlobals(const GlobalValue *GV,
631 SectionKind::Kind Kind) const{
635 const std::string &getSectionFlags(unsigned Flags) const;
636 virtual std::string printSectionFlags(unsigned flags) const { return ""; }
638 // FIXME: Eliminate this.
639 virtual const Section* SelectSectionForGlobal(const GlobalValue *GV,
640 SectionKind::Kind Kind) const;
642 /// getSLEB128Size - Compute the number of bytes required for a signed
644 static unsigned getSLEB128Size(int Value);
646 /// getULEB128Size - Compute the number of bytes required for an unsigned
648 static unsigned getULEB128Size(unsigned Value);
650 // Data directive accessors.
652 const char *getData8bitsDirective(unsigned AS = 0) const {
653 return AS == 0 ? Data8bitsDirective : getDataASDirective(8, AS);
655 const char *getData16bitsDirective(unsigned AS = 0) const {
656 return AS == 0 ? Data16bitsDirective : getDataASDirective(16, AS);
658 const char *getData32bitsDirective(unsigned AS = 0) const {
659 return AS == 0 ? Data32bitsDirective : getDataASDirective(32, AS);
661 const char *getData64bitsDirective(unsigned AS = 0) const {
662 return AS == 0 ? Data64bitsDirective : getDataASDirective(64, AS);
668 const Section *getTextSection() const {
671 const Section *getDataSection() const {
674 const char *getBSSSection() const {
677 const Section *getBSSSection_() const {
680 const Section *getReadOnlySection() const {
681 return ReadOnlySection;
683 const Section *getTLSDataSection() const {
684 return TLSDataSection;
686 const Section *getTLSBSSSection() const {
687 return TLSBSSSection;
689 const char *getZeroFillDirective() const {
690 return ZeroFillDirective;
692 const char *getNonexecutableStackDirective() const {
693 return NonexecutableStackDirective;
695 bool needsSet() const {
698 const char *getPCSymbol() const {
701 char getSeparatorChar() const {
702 return SeparatorChar;
704 unsigned getCommentColumn() const {
705 return CommentColumn;
707 const char *getCommentString() const {
708 return CommentString;
710 unsigned getOperandColumn(int operand) const {
711 return FirstOperandColumn + (MaxOperandLength+1)*(operand-1);
713 const char *getGlobalPrefix() const {
716 const char *getPrivateGlobalPrefix() const {
717 return PrivateGlobalPrefix;
719 const char *getLinkerPrivateGlobalPrefix() const {
720 return LinkerPrivateGlobalPrefix;
722 const char *getJumpTableSpecialLabelPrefix() const {
723 return JumpTableSpecialLabelPrefix;
725 const char *getGlobalVarAddrPrefix() const {
726 return GlobalVarAddrPrefix;
728 const char *getGlobalVarAddrSuffix() const {
729 return GlobalVarAddrSuffix;
731 const char *getFunctionAddrPrefix() const {
732 return FunctionAddrPrefix;
734 const char *getFunctionAddrSuffix() const {
735 return FunctionAddrSuffix;
737 const char *getPersonalityPrefix() const {
738 return PersonalityPrefix;
740 const char *getPersonalitySuffix() const {
741 return PersonalitySuffix;
743 bool getNeedsIndirectEncoding() const {
744 return NeedsIndirectEncoding;
746 const char *getInlineAsmStart() const {
747 return InlineAsmStart;
749 const char *getInlineAsmEnd() const {
752 unsigned getAssemblerDialect() const {
753 return AssemblerDialect;
755 bool doesAllowQuotesInName() const {
756 return AllowQuotesInName;
758 const char *getZeroDirective() const {
759 return ZeroDirective;
761 const char *getZeroDirectiveSuffix() const {
762 return ZeroDirectiveSuffix;
764 const char *getAsciiDirective() const {
765 return AsciiDirective;
767 const char *getAscizDirective() const {
768 return AscizDirective;
770 const char *getJumpTableDirective() const {
771 return JumpTableDirective;
773 const char *getAlignDirective() const {
774 return AlignDirective;
776 bool getAlignmentIsInBytes() const {
777 return AlignmentIsInBytes;
779 unsigned getTextAlignFillValue() const {
780 return TextAlignFillValue;
782 const char *getSwitchToSectionDirective() const {
783 return SwitchToSectionDirective;
785 const char *getTextSectionStartSuffix() const {
786 return TextSectionStartSuffix;
788 const char *getDataSectionStartSuffix() const {
789 return DataSectionStartSuffix;
791 const char *getSectionEndDirectiveSuffix() const {
792 return SectionEndDirectiveSuffix;
794 const char *getConstantPoolSection() const {
795 return ConstantPoolSection;
797 const char *getJumpTableDataSection() const {
798 return JumpTableDataSection;
800 const char *getCStringSection() const {
801 return CStringSection;
803 const Section *getCStringSection_() const {
804 return CStringSection_;
806 const char *getStaticCtorsSection() const {
807 return StaticCtorsSection;
809 const char *getStaticDtorsSection() const {
810 return StaticDtorsSection;
812 const char *getGlobalDirective() const {
813 return GlobalDirective;
815 const char *getExternDirective() const {
816 return ExternDirective;
818 const char *getSetDirective() const {
821 const char *getLCOMMDirective() const {
822 return LCOMMDirective;
824 const char *getCOMMDirective() const {
825 return COMMDirective;
827 bool getCOMMDirectiveTakesAlignment() const {
828 return COMMDirectiveTakesAlignment;
830 bool hasDotTypeDotSizeDirective() const {
831 return HasDotTypeDotSizeDirective;
833 bool hasSingleParameterDotFile() const {
834 return HasSingleParameterDotFile;
836 const char *getUsedDirective() const {
837 return UsedDirective;
839 const char *getWeakRefDirective() const {
840 return WeakRefDirective;
842 const char *getWeakDefDirective() const {
843 return WeakDefDirective;
845 const char *getHiddenDirective() const {
846 return HiddenDirective;
848 const char *getProtectedDirective() const {
849 return ProtectedDirective;
851 bool isAbsoluteDebugSectionOffsets() const {
852 return AbsoluteDebugSectionOffsets;
854 bool isAbsoluteEHSectionOffsets() const {
855 return AbsoluteEHSectionOffsets;
857 bool hasLEB128() const {
860 bool hasDotLocAndDotFile() const {
861 return HasDotLocAndDotFile;
863 bool doesSupportDebugInformation() const {
864 return SupportsDebugInformation;
866 bool doesSupportExceptionHandling() const {
867 return SupportsExceptionHandling;
869 bool doesDwarfRequireFrameSection() const {
870 return DwarfRequiresFrameSection;
872 bool doesDwarfUsesInlineInfoSection() const {
873 return DwarfUsesInlineInfoSection;
875 bool is_EHSymbolPrivate() const {
876 return Is_EHSymbolPrivate;
878 const char *getGlobalEHDirective() const {
879 return GlobalEHDirective;
881 bool getSupportsWeakOmittedEHFrame() const {
882 return SupportsWeakOmittedEHFrame;
884 const char *getDwarfSectionOffsetDirective() const {
885 return DwarfSectionOffsetDirective;
887 const char *getDwarfAbbrevSection() const {
888 return DwarfAbbrevSection;
890 const char *getDwarfInfoSection() const {
891 return DwarfInfoSection;
893 const char *getDwarfLineSection() const {
894 return DwarfLineSection;
896 const char *getDwarfFrameSection() const {
897 return DwarfFrameSection;
899 const char *getDwarfPubNamesSection() const {
900 return DwarfPubNamesSection;
902 const char *getDwarfPubTypesSection() const {
903 return DwarfPubTypesSection;
905 const char *getDwarfDebugInlineSection() const {
906 return DwarfDebugInlineSection;
908 const char *getDwarfStrSection() const {
909 return DwarfStrSection;
911 const char *getDwarfLocSection() const {
912 return DwarfLocSection;
914 const char *getDwarfARangesSection() const {
915 return DwarfARangesSection;
917 const char *getDwarfRangesSection() const {
918 return DwarfRangesSection;
920 const char *getDwarfMacroInfoSection() const {
921 return DwarfMacroInfoSection;
923 const char *getDwarfEHFrameSection() const {
924 return DwarfEHFrameSection;
926 const char *getDwarfExceptionSection() const {
927 return DwarfExceptionSection;
929 const char *const *getAsmCBE() const {