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 Data, ///< Data section
39 DataRel, ///< Contains data that has relocations
40 DataRelLocal, ///< Contains data that has only local relocations
42 ROData, ///< Readonly data section
43 DataRelRO, ///< Contains data that is otherwise readonly
44 DataRelROLocal, ///< Contains r/o data with only local relocations
45 RODataMergeStr, ///< Readonly data section (mergeable strings)
46 RODataMergeConst, ///< Readonly data section (mergeable constants)
47 SmallData, ///< Small data section
48 SmallBSS, ///< Small bss section
49 SmallROData, ///< Small readonly section
50 ThreadData, ///< Initialized TLS data objects
51 ThreadBSS ///< Uninitialized TLS data objects
54 static inline bool isReadOnly(Kind K) {
55 return (K == SectionKind::ROData ||
56 K == SectionKind::RODataMergeConst ||
57 K == SectionKind::RODataMergeStr ||
58 K == SectionKind::SmallROData);
61 static inline bool isBSS(Kind K) {
62 return (K == SectionKind::BSS ||
63 K == SectionKind::SmallBSS);
67 namespace SectionFlags {
68 const unsigned Invalid = -1U;
69 const unsigned None = 0;
70 const unsigned Code = 1 << 0; ///< Section contains code
71 const unsigned Writeable = 1 << 1; ///< Section is writeable
72 const unsigned BSS = 1 << 2; ///< Section contains only zeroes
73 const unsigned Mergeable = 1 << 3; ///< Section contains mergeable data
74 const unsigned Strings = 1 << 4; ///< Section contains C-type strings
75 const unsigned TLS = 1 << 5; ///< Section contains thread-local data
76 const unsigned Debug = 1 << 6; ///< Section contains debug data
77 const unsigned Linkonce = 1 << 7; ///< Section is linkonce
78 const unsigned Small = 1 << 8; ///< Section is small
79 const unsigned TypeFlags = 0xFF;
80 // Some gap for future flags
81 const unsigned Named = 1 << 23; ///< Section is named
82 const unsigned EntitySize = 0xFF << 24; ///< Entity size for mergeable stuff
84 static inline unsigned getEntitySize(unsigned Flags) {
85 return (Flags >> 24) & 0xFF;
88 static inline unsigned setEntitySize(unsigned Flags, unsigned Size) {
89 return ((Flags & ~EntitySize) | ((Size & 0xFF) << 24));
93 static inline unsigned getEmptyKey() { return Invalid; }
94 static inline unsigned getTombstoneKey() { return Invalid - 1; }
95 static unsigned getHashValue(const unsigned &Key) { return Key; }
96 static bool isEqual(unsigned LHS, unsigned RHS) { return LHS == RHS; }
97 static bool isPod() { return true; }
100 typedef DenseMap<unsigned, std::string, KeyInfo> FlagsStringsMapType;
110 friend class TargetAsmInfo;
111 friend class StringMapEntry<Section>;
112 friend class StringMap<Section>;
116 explicit Section(unsigned F = SectionFlags::Invalid):Flags(F) { }
120 bool isNamed() const { return Flags & SectionFlags::Named; }
121 unsigned getEntitySize() const { return (Flags >> 24) & 0xFF; }
123 const std::string& getName() const { return Name; }
124 unsigned getFlags() const { return Flags; }
127 /// TargetAsmInfo - This class is intended to be used as a base class for asm
128 /// properties and features specific to the target.
129 class TargetAsmInfo {
131 mutable StringMap<Section> Sections;
132 mutable SectionFlags::FlagsStringsMapType FlagsStrings;
134 /// TM - The current TargetMachine.
135 const TargetMachine &TM;
137 //===------------------------------------------------------------------===//
138 // Properties to be set by the target writer, used to configure asm printer.
141 /// TextSection - Section directive for standard text.
143 const Section *TextSection; // Defaults to ".text".
145 /// DataSection - Section directive for standard data.
147 const Section *DataSection; // Defaults to ".data".
149 /// BSSSection - Section directive for uninitialized data. Null if this
150 /// target doesn't support a BSS section.
152 const char *BSSSection; // Default to ".bss".
153 const Section *BSSSection_;
155 /// ReadOnlySection - This is the directive that is emitted to switch to a
156 /// read-only section for constant data (e.g. data declared const,
158 const Section *ReadOnlySection; // Defaults to NULL
160 /// SmallDataSection - This is the directive that is emitted to switch to a
161 /// small data section.
163 const Section *SmallDataSection; // Defaults to NULL
165 /// SmallBSSSection - This is the directive that is emitted to switch to a
166 /// small bss section.
168 const Section *SmallBSSSection; // Defaults to NULL
170 /// SmallRODataSection - This is the directive that is emitted to switch to
171 /// a small read-only data section.
173 const Section *SmallRODataSection; // Defaults to NULL
175 /// TLSDataSection - Section directive for Thread Local data.
177 const Section *TLSDataSection; // Defaults to ".tdata".
179 /// TLSBSSSection - Section directive for Thread Local uninitialized data.
180 /// Null if this target doesn't support a BSS section.
182 const Section *TLSBSSSection; // Defaults to ".tbss".
184 /// ZeroFillDirective - Directive for emitting a global to the ZeroFill
185 /// section on this target. Null if this target doesn't support zerofill.
186 const char *ZeroFillDirective; // Default is null.
188 /// NonexecutableStackDirective - Directive for declaring to the
189 /// linker and beyond that the emitted code does not require stack
190 /// memory to be executable.
191 const char *NonexecutableStackDirective; // Default is null.
193 /// NeedsSet - True if target asm treats expressions in data directives
194 /// as linktime-relocatable. For assembly-time computation, we need to
195 /// use a .set. Thus:
198 /// is computed at assembly time, while
200 /// is relocated if the relative locations of x and y change at linktime.
201 /// We want both these things in different places.
202 bool NeedsSet; // Defaults to false.
204 /// MaxInstLength - This is the maximum possible length of an instruction,
205 /// which is needed to compute the size of an inline asm.
206 unsigned MaxInstLength; // Defaults to 4.
208 /// PCSymbol - The symbol used to represent the current PC. Used in PC
209 /// relative expressions.
210 const char *PCSymbol; // Defaults to "$".
212 /// SeparatorChar - This character, if specified, is used to separate
213 /// instructions from each other when on the same line. This is used to
214 /// measure inline asm instructions.
215 char SeparatorChar; // Defaults to ';'
217 /// CommentColumn - This indicates the comment num (zero-based) at
218 /// which asm comments should be printed.
219 unsigned CommentColumn; // Defaults to 60
221 /// CommentString - This indicates the comment character used by the
223 const char *CommentString; // Defaults to "#"
225 /// FirstOperandColumn - The output column where the first operand
226 /// should be printed
227 unsigned FirstOperandColumn; // Defaults to 0 (ignored)
229 /// MaxOperandLength - The maximum length of any printed asm
231 unsigned MaxOperandLength; // Defaults to 0 (ignored)
233 /// GlobalPrefix - If this is set to a non-empty string, it is prepended
234 /// onto all global symbols. This is often used for "_" or ".".
235 const char *GlobalPrefix; // Defaults to ""
237 /// PrivateGlobalPrefix - This prefix is used for globals like constant
238 /// pool entries that are completely private to the .s file and should not
239 /// have names in the .o file. This is often "." or "L".
240 const char *PrivateGlobalPrefix; // Defaults to "."
242 /// LinkerPrivateGlobalPrefix - This prefix is used for symbols that should
243 /// be passed through the assembler but be removed by the linker. This
244 /// is "l" on Darwin, currently used for some ObjC metadata.
245 const char *LinkerPrivateGlobalPrefix; // Defaults to ""
247 /// JumpTableSpecialLabelPrefix - If not null, a extra (dead) label is
248 /// emitted before jump tables with the specified prefix.
249 const char *JumpTableSpecialLabelPrefix; // Default to null.
251 /// GlobalVarAddrPrefix/Suffix - If these are nonempty, these strings
252 /// will enclose any GlobalVariable (that isn't a function)
254 const char *GlobalVarAddrPrefix; // Defaults to ""
255 const char *GlobalVarAddrSuffix; // Defaults to ""
257 /// FunctionAddrPrefix/Suffix - If these are nonempty, these strings
258 /// will enclose any GlobalVariable that points to a function.
259 /// For example, this is used by the IA64 backend to materialize
260 /// function descriptors, by decorating the ".data8" object with the
261 /// @verbatim @fptr( ) @endverbatim
262 /// link-relocation operator.
264 const char *FunctionAddrPrefix; // Defaults to ""
265 const char *FunctionAddrSuffix; // Defaults to ""
267 /// PersonalityPrefix/Suffix - If these are nonempty, these strings will
268 /// enclose any personality function in the common frame section.
270 const char *PersonalityPrefix; // Defaults to ""
271 const char *PersonalitySuffix; // Defaults to ""
273 /// NeedsIndirectEncoding - If set, we need to set the indirect encoding bit
276 bool NeedsIndirectEncoding; // Defaults to false
278 /// InlineAsmStart/End - If these are nonempty, they contain a directive to
279 /// emit before and after an inline assembly statement.
280 const char *InlineAsmStart; // Defaults to "#APP\n"
281 const char *InlineAsmEnd; // Defaults to "#NO_APP\n"
283 /// AssemblerDialect - Which dialect of an assembler variant to use.
284 unsigned AssemblerDialect; // Defaults to 0
286 /// AllowQuotesInName - This is true if the assembler allows for complex
287 /// symbol names to be surrounded in quotes. This defaults to false.
288 bool AllowQuotesInName;
290 //===--- Data Emission Directives -------------------------------------===//
292 /// ZeroDirective - this should be set to the directive used to get some
293 /// number of zero bytes emitted to the current section. Common cases are
294 /// "\t.zero\t" and "\t.space\t". If this is set to null, the
295 /// Data*bitsDirective's will be used to emit zero bytes.
296 const char *ZeroDirective; // Defaults to "\t.zero\t"
297 const char *ZeroDirectiveSuffix; // Defaults to ""
299 /// AsciiDirective - This directive allows emission of an ascii string with
300 /// the standard C escape characters embedded into it.
301 const char *AsciiDirective; // Defaults to "\t.ascii\t"
303 /// AscizDirective - If not null, this allows for special handling of
304 /// zero terminated strings on this target. This is commonly supported as
305 /// ".asciz". If a target doesn't support this, it can be set to null.
306 const char *AscizDirective; // Defaults to "\t.asciz\t"
308 /// DataDirectives - These directives are used to output some unit of
309 /// integer data to the current section. If a data directive is set to
310 /// null, smaller data directives will be used to emit the large sizes.
311 const char *Data8bitsDirective; // Defaults to "\t.byte\t"
312 const char *Data16bitsDirective; // Defaults to "\t.short\t"
313 const char *Data32bitsDirective; // Defaults to "\t.long\t"
314 const char *Data64bitsDirective; // Defaults to "\t.quad\t"
316 /// getDataASDirective - Return the directive that should be used to emit
317 /// data of the specified size to the specified numeric address space.
318 virtual const char *getDataASDirective(unsigned Size, unsigned AS) const {
319 assert(AS != 0 && "Don't know the directives for default addr space");
323 //===--- Alignment Information ----------------------------------------===//
325 /// AlignDirective - The directive used to emit round up to an alignment
328 const char *AlignDirective; // Defaults to "\t.align\t"
330 /// AlignmentIsInBytes - If this is true (the default) then the asmprinter
331 /// emits ".align N" directives, where N is the number of bytes to align to.
332 /// Otherwise, it emits ".align log2(N)", e.g. 3 to align to an 8 byte
334 bool AlignmentIsInBytes; // Defaults to true
336 /// TextAlignFillValue - If non-zero, this is used to fill the executable
337 /// space created as the result of a alignment directive.
338 unsigned TextAlignFillValue;
340 //===--- Section Switching Directives ---------------------------------===//
342 /// SwitchToSectionDirective - This is the directive used when we want to
343 /// emit a global to an arbitrary section. The section name is emited after
345 const char *SwitchToSectionDirective; // Defaults to "\t.section\t"
347 /// TextSectionStartSuffix - This is printed after each start of section
348 /// directive for text sections.
349 const char *TextSectionStartSuffix; // Defaults to "".
351 /// DataSectionStartSuffix - This is printed after each start of section
352 /// directive for data sections.
353 const char *DataSectionStartSuffix; // Defaults to "".
355 /// SectionEndDirectiveSuffix - If non-null, the asm printer will close each
356 /// section with the section name and this suffix printed.
357 const char *SectionEndDirectiveSuffix;// Defaults to null.
359 /// ConstantPoolSection - This is the section that we SwitchToSection right
360 /// before emitting the constant pool for a function.
361 const char *ConstantPoolSection; // Defaults to "\t.section .rodata"
363 /// JumpTableDataSection - This is the section that we SwitchToSection right
364 /// before emitting the jump tables for a function when the relocation model
366 const char *JumpTableDataSection; // Defaults to "\t.section .rodata"
368 /// JumpTableDirective - if non-null, the directive to emit before a jump
370 const char *JumpTableDirective;
372 /// CStringSection - If not null, this allows for special handling of
373 /// cstring constants (null terminated string that does not contain any
374 /// other null bytes) on this target. This is commonly supported as
376 const char *CStringSection; // Defaults to NULL
377 const Section *CStringSection_;
379 /// StaticCtorsSection - This is the directive that is emitted to switch to
380 /// a section to emit the static constructor list.
381 /// Defaults to "\t.section .ctors,\"aw\",@progbits".
382 const char *StaticCtorsSection;
384 /// StaticDtorsSection - This is the directive that is emitted to switch to
385 /// a section to emit the static destructor list.
386 /// Defaults to "\t.section .dtors,\"aw\",@progbits".
387 const char *StaticDtorsSection;
389 //===--- Global Variable Emission Directives --------------------------===//
391 /// GlobalDirective - This is the directive used to declare a global entity.
393 const char *GlobalDirective; // Defaults to NULL.
395 /// ExternDirective - This is the directive used to declare external
398 const char *ExternDirective; // Defaults to NULL.
400 /// SetDirective - This is the name of a directive that can be used to tell
401 /// the assembler to set the value of a variable to some expression.
402 const char *SetDirective; // Defaults to null.
404 /// LCOMMDirective - This is the name of a directive (if supported) that can
405 /// be used to efficiently declare a local (internal) block of zero
406 /// initialized data in the .bss/.data section. The syntax expected is:
407 /// @verbatim <LCOMMDirective> SYMBOLNAME LENGTHINBYTES, ALIGNMENT
409 const char *LCOMMDirective; // Defaults to null.
411 const char *COMMDirective; // Defaults to "\t.comm\t".
413 /// COMMDirectiveTakesAlignment - True if COMMDirective take a third
414 /// argument that specifies the alignment of the declaration.
415 bool COMMDirectiveTakesAlignment; // Defaults to true.
417 /// HasDotTypeDotSizeDirective - True if the target has .type and .size
418 /// directives, this is true for most ELF targets.
419 bool HasDotTypeDotSizeDirective; // Defaults to true.
421 /// HasSingleParameterDotFile - True if the target has a single parameter
422 /// .file directive, this is true for ELF targets.
423 bool HasSingleParameterDotFile; // Defaults to true.
425 /// UsedDirective - This directive, if non-null, is used to declare a global
426 /// as being used somehow that the assembler can't see. This prevents dead
427 /// code elimination on some targets.
428 const char *UsedDirective; // Defaults to null.
430 /// WeakRefDirective - This directive, if non-null, is used to declare a
431 /// global as being a weak undefined symbol.
432 const char *WeakRefDirective; // Defaults to null.
434 /// WeakDefDirective - This directive, if non-null, is used to declare a
435 /// global as being a weak defined symbol.
436 const char *WeakDefDirective; // Defaults to null.
438 /// HiddenDirective - This directive, if non-null, is used to declare a
439 /// global or function as having hidden visibility.
440 const char *HiddenDirective; // Defaults to "\t.hidden\t".
442 /// ProtectedDirective - This directive, if non-null, is used to declare a
443 /// global or function as having protected visibility.
444 const char *ProtectedDirective; // Defaults to "\t.protected\t".
446 //===--- Dwarf Emission Directives -----------------------------------===//
448 /// AbsoluteDebugSectionOffsets - True if we should emit abolute section
449 /// offsets for debug information. Defaults to false.
450 bool AbsoluteDebugSectionOffsets;
452 /// AbsoluteEHSectionOffsets - True if we should emit abolute section
453 /// offsets for EH information. Defaults to false.
454 bool AbsoluteEHSectionOffsets;
456 /// HasLEB128 - True if target asm supports leb128 directives.
458 bool HasLEB128; // Defaults to false.
460 /// hasDotLocAndDotFile - True if target asm supports .loc and .file
461 /// directives for emitting debugging information.
463 bool HasDotLocAndDotFile; // Defaults to false.
465 /// SupportsDebugInformation - True if target supports emission of debugging
467 bool SupportsDebugInformation;
469 /// SupportsExceptionHandling - True if target supports
470 /// exception handling.
472 bool SupportsExceptionHandling; // Defaults to false.
474 /// RequiresFrameSection - true if the Dwarf2 output needs a frame section
476 bool DwarfRequiresFrameSection; // Defaults to true.
478 /// DwarfUsesInlineInfoSection - True if DwarfDebugInlineSection is used to
479 /// encode inline subroutine information.
480 bool DwarfUsesInlineInfoSection; // Defaults to false.
482 /// Is_EHSymbolPrivate - If set, the "_foo.eh" is made private so that it
483 /// doesn't show up in the symbol table of the object file.
484 bool Is_EHSymbolPrivate; // Defaults to true.
486 /// GlobalEHDirective - This is the directive used to make exception frame
487 /// tables globally visible.
489 const char *GlobalEHDirective; // Defaults to NULL.
491 /// SupportsWeakEmptyEHFrame - True if target assembler and linker will
492 /// handle a weak_definition of constant 0 for an omitted EH frame.
493 bool SupportsWeakOmittedEHFrame; // Defaults to true.
495 /// DwarfSectionOffsetDirective - Special section offset directive.
496 const char* DwarfSectionOffsetDirective; // Defaults to NULL
498 /// DwarfAbbrevSection - Section directive for Dwarf abbrev.
500 const char *DwarfAbbrevSection; // Defaults to ".debug_abbrev".
502 /// DwarfInfoSection - Section directive for Dwarf info.
504 const char *DwarfInfoSection; // Defaults to ".debug_info".
506 /// DwarfLineSection - Section directive for Dwarf info.
508 const char *DwarfLineSection; // Defaults to ".debug_line".
510 /// DwarfFrameSection - Section directive for Dwarf info.
512 const char *DwarfFrameSection; // Defaults to ".debug_frame".
514 /// DwarfPubNamesSection - Section directive for Dwarf info.
516 const char *DwarfPubNamesSection; // Defaults to ".debug_pubnames".
518 /// DwarfPubTypesSection - Section directive for Dwarf info.
520 const char *DwarfPubTypesSection; // Defaults to ".debug_pubtypes".
522 /// DwarfDebugInlineSection - Section directive for inline info.
524 const char *DwarfDebugInlineSection; // Defaults to ".debug_inlined"
526 /// DwarfStrSection - Section directive for Dwarf info.
528 const char *DwarfStrSection; // Defaults to ".debug_str".
530 /// DwarfLocSection - Section directive for Dwarf info.
532 const char *DwarfLocSection; // Defaults to ".debug_loc".
534 /// DwarfARangesSection - Section directive for Dwarf info.
536 const char *DwarfARangesSection; // Defaults to ".debug_aranges".
538 /// DwarfRangesSection - Section directive for Dwarf info.
540 const char *DwarfRangesSection; // Defaults to ".debug_ranges".
542 /// DwarfMacroInfoSection - Section directive for DWARF macro info.
544 const char *DwarfMacroInfoSection; // Defaults to ".debug_macinfo".
546 /// DwarfEHFrameSection - Section directive for Exception frames.
548 const char *DwarfEHFrameSection; // Defaults to ".eh_frame".
550 /// DwarfExceptionSection - Section directive for Exception table.
552 const char *DwarfExceptionSection; // Defaults to ".gcc_except_table".
554 //===--- CBE Asm Translation Table -----------------------------------===//
556 const char *const *AsmTransCBE; // Defaults to empty
559 explicit TargetAsmInfo(const TargetMachine &TM);
560 virtual ~TargetAsmInfo();
562 const Section* getNamedSection(const char *Name,
563 unsigned Flags = SectionFlags::None,
564 bool Override = false) const;
565 const Section* getUnnamedSection(const char *Directive,
566 unsigned Flags = SectionFlags::None,
567 bool Override = false) const;
569 /// Measure the specified inline asm to determine an approximation of its
571 virtual unsigned getInlineAsmLength(const char *Str) const;
573 /// emitUsedDirectiveFor - This hook allows targets to selectively decide
574 /// not to emit the UsedDirective for some symbols in llvm.used.
575 // FIXME: REMOVE this (rdar://7071300)
576 virtual bool emitUsedDirectiveFor(const GlobalValue *GV,
577 Mangler *Mang) const {
581 /// PreferredEHDataFormat - This hook allows the target to select data
582 /// format used for encoding pointers in exception handling data. Reason is
583 /// 0 for data, 1 for code labels, 2 for function pointers. Global is true
584 /// if the symbol can be relocated.
585 virtual unsigned PreferredEHDataFormat(DwarfEncoding::Target Reason,
588 /// SectionKindForGlobal - This hook allows the target to select proper
589 /// section kind used for global emission.
590 // FIXME: Eliminate this.
591 virtual SectionKind::Kind
592 SectionKindForGlobal(const GlobalValue *GV) const;
594 /// RelocBehaviour - Describes how relocations should be treated when
595 /// selecting sections. Reloc::Global bit should be set if global
596 /// relocations should force object to be placed in read-write
597 /// sections. Reloc::Local bit should be set if local relocations should
598 /// force object to be placed in read-write sections.
599 virtual unsigned RelocBehaviour() const;
601 /// SectionFlagsForGlobal - This hook allows the target to select proper
602 /// section flags either for given global or for section.
603 // FIXME: Eliminate this.
605 SectionFlagsForGlobal(const GlobalValue *GV = NULL,
606 const char* name = NULL) const;
608 /// SectionForGlobal - This hooks returns proper section name for given
609 /// global with all necessary flags and marks.
610 // FIXME: Eliminate this.
611 virtual const Section* SectionForGlobal(const GlobalValue *GV) const;
613 // Helper methods for SectionForGlobal
614 // FIXME: Eliminate this.
615 virtual std::string UniqueSectionForGlobal(const GlobalValue* GV,
616 SectionKind::Kind kind) const;
618 const std::string &getSectionFlags(unsigned Flags) const;
619 virtual std::string printSectionFlags(unsigned flags) const { return ""; }
621 // FIXME: Eliminate this.
622 virtual const Section* SelectSectionForGlobal(const GlobalValue *GV) const;
623 virtual const Section* SelectSectionForMachineConst(const Type *Ty) const;
625 /// getSLEB128Size - Compute the number of bytes required for a signed
627 static unsigned getSLEB128Size(int Value);
629 /// getULEB128Size - Compute the number of bytes required for an unsigned
631 static unsigned getULEB128Size(unsigned Value);
633 // Data directive accessors.
635 const char *getData8bitsDirective(unsigned AS = 0) const {
636 return AS == 0 ? Data8bitsDirective : getDataASDirective(8, AS);
638 const char *getData16bitsDirective(unsigned AS = 0) const {
639 return AS == 0 ? Data16bitsDirective : getDataASDirective(16, AS);
641 const char *getData32bitsDirective(unsigned AS = 0) const {
642 return AS == 0 ? Data32bitsDirective : getDataASDirective(32, AS);
644 const char *getData64bitsDirective(unsigned AS = 0) const {
645 return AS == 0 ? Data64bitsDirective : getDataASDirective(64, AS);
651 const Section *getTextSection() const {
654 const Section *getDataSection() const {
657 const char *getBSSSection() const {
660 const Section *getBSSSection_() const {
663 const Section *getReadOnlySection() const {
664 return ReadOnlySection;
666 const Section *getSmallDataSection() const {
667 return SmallDataSection;
669 const Section *getSmallBSSSection() const {
670 return SmallBSSSection;
672 const Section *getSmallRODataSection() const {
673 return SmallRODataSection;
675 const Section *getTLSDataSection() const {
676 return TLSDataSection;
678 const Section *getTLSBSSSection() const {
679 return TLSBSSSection;
681 const char *getZeroFillDirective() const {
682 return ZeroFillDirective;
684 const char *getNonexecutableStackDirective() const {
685 return NonexecutableStackDirective;
687 bool needsSet() const {
690 const char *getPCSymbol() const {
693 char getSeparatorChar() const {
694 return SeparatorChar;
696 unsigned getCommentColumn() const {
697 return CommentColumn;
699 const char *getCommentString() const {
700 return CommentString;
702 unsigned getOperandColumn(int operand) const {
703 return FirstOperandColumn + (MaxOperandLength+1)*(operand-1);
705 const char *getGlobalPrefix() const {
708 const char *getPrivateGlobalPrefix() const {
709 return PrivateGlobalPrefix;
711 const char *getLinkerPrivateGlobalPrefix() const {
712 return LinkerPrivateGlobalPrefix;
714 const char *getJumpTableSpecialLabelPrefix() const {
715 return JumpTableSpecialLabelPrefix;
717 const char *getGlobalVarAddrPrefix() const {
718 return GlobalVarAddrPrefix;
720 const char *getGlobalVarAddrSuffix() const {
721 return GlobalVarAddrSuffix;
723 const char *getFunctionAddrPrefix() const {
724 return FunctionAddrPrefix;
726 const char *getFunctionAddrSuffix() const {
727 return FunctionAddrSuffix;
729 const char *getPersonalityPrefix() const {
730 return PersonalityPrefix;
732 const char *getPersonalitySuffix() const {
733 return PersonalitySuffix;
735 bool getNeedsIndirectEncoding() const {
736 return NeedsIndirectEncoding;
738 const char *getInlineAsmStart() const {
739 return InlineAsmStart;
741 const char *getInlineAsmEnd() const {
744 unsigned getAssemblerDialect() const {
745 return AssemblerDialect;
747 bool doesAllowQuotesInName() const {
748 return AllowQuotesInName;
750 const char *getZeroDirective() const {
751 return ZeroDirective;
753 const char *getZeroDirectiveSuffix() const {
754 return ZeroDirectiveSuffix;
756 const char *getAsciiDirective() const {
757 return AsciiDirective;
759 const char *getAscizDirective() const {
760 return AscizDirective;
762 const char *getJumpTableDirective() const {
763 return JumpTableDirective;
765 const char *getAlignDirective() const {
766 return AlignDirective;
768 bool getAlignmentIsInBytes() const {
769 return AlignmentIsInBytes;
771 unsigned getTextAlignFillValue() const {
772 return TextAlignFillValue;
774 const char *getSwitchToSectionDirective() const {
775 return SwitchToSectionDirective;
777 const char *getTextSectionStartSuffix() const {
778 return TextSectionStartSuffix;
780 const char *getDataSectionStartSuffix() const {
781 return DataSectionStartSuffix;
783 const char *getSectionEndDirectiveSuffix() const {
784 return SectionEndDirectiveSuffix;
786 const char *getConstantPoolSection() const {
787 return ConstantPoolSection;
789 const char *getJumpTableDataSection() const {
790 return JumpTableDataSection;
792 const char *getCStringSection() const {
793 return CStringSection;
795 const Section *getCStringSection_() const {
796 return CStringSection_;
798 const char *getStaticCtorsSection() const {
799 return StaticCtorsSection;
801 const char *getStaticDtorsSection() const {
802 return StaticDtorsSection;
804 const char *getGlobalDirective() const {
805 return GlobalDirective;
807 const char *getExternDirective() const {
808 return ExternDirective;
810 const char *getSetDirective() const {
813 const char *getLCOMMDirective() const {
814 return LCOMMDirective;
816 const char *getCOMMDirective() const {
817 return COMMDirective;
819 bool getCOMMDirectiveTakesAlignment() const {
820 return COMMDirectiveTakesAlignment;
822 bool hasDotTypeDotSizeDirective() const {
823 return HasDotTypeDotSizeDirective;
825 bool hasSingleParameterDotFile() const {
826 return HasSingleParameterDotFile;
828 const char *getUsedDirective() const {
829 return UsedDirective;
831 const char *getWeakRefDirective() const {
832 return WeakRefDirective;
834 const char *getWeakDefDirective() const {
835 return WeakDefDirective;
837 const char *getHiddenDirective() const {
838 return HiddenDirective;
840 const char *getProtectedDirective() const {
841 return ProtectedDirective;
843 bool isAbsoluteDebugSectionOffsets() const {
844 return AbsoluteDebugSectionOffsets;
846 bool isAbsoluteEHSectionOffsets() const {
847 return AbsoluteEHSectionOffsets;
849 bool hasLEB128() const {
852 bool hasDotLocAndDotFile() const {
853 return HasDotLocAndDotFile;
855 bool doesSupportDebugInformation() const {
856 return SupportsDebugInformation;
858 bool doesSupportExceptionHandling() const {
859 return SupportsExceptionHandling;
861 bool doesDwarfRequireFrameSection() const {
862 return DwarfRequiresFrameSection;
864 bool doesDwarfUsesInlineInfoSection() const {
865 return DwarfUsesInlineInfoSection;
867 bool is_EHSymbolPrivate() const {
868 return Is_EHSymbolPrivate;
870 const char *getGlobalEHDirective() const {
871 return GlobalEHDirective;
873 bool getSupportsWeakOmittedEHFrame() const {
874 return SupportsWeakOmittedEHFrame;
876 const char *getDwarfSectionOffsetDirective() const {
877 return DwarfSectionOffsetDirective;
879 const char *getDwarfAbbrevSection() const {
880 return DwarfAbbrevSection;
882 const char *getDwarfInfoSection() const {
883 return DwarfInfoSection;
885 const char *getDwarfLineSection() const {
886 return DwarfLineSection;
888 const char *getDwarfFrameSection() const {
889 return DwarfFrameSection;
891 const char *getDwarfPubNamesSection() const {
892 return DwarfPubNamesSection;
894 const char *getDwarfPubTypesSection() const {
895 return DwarfPubTypesSection;
897 const char *getDwarfDebugInlineSection() const {
898 return DwarfDebugInlineSection;
900 const char *getDwarfStrSection() const {
901 return DwarfStrSection;
903 const char *getDwarfLocSection() const {
904 return DwarfLocSection;
906 const char *getDwarfARangesSection() const {
907 return DwarfARangesSection;
909 const char *getDwarfRangesSection() const {
910 return DwarfRangesSection;
912 const char *getDwarfMacroInfoSection() const {
913 return DwarfMacroInfoSection;
915 const char *getDwarfEHFrameSection() const {
916 return DwarfEHFrameSection;
918 const char *getDwarfExceptionSection() const {
919 return DwarfExceptionSection;
921 const char *const *getAsmCBE() const {