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 /// GlobalPrefix - If this is set to a non-empty string, it is prepended
226 /// onto all global symbols. This is often used for "_" or ".".
227 const char *GlobalPrefix; // Defaults to ""
229 /// PrivateGlobalPrefix - This prefix is used for globals like constant
230 /// pool entries that are completely private to the .s file and should not
231 /// have names in the .o file. This is often "." or "L".
232 const char *PrivateGlobalPrefix; // Defaults to "."
234 /// LessPrivateGlobalPrefix - This prefix is used for symbols that should
235 /// be passed through the assembler but be removed by the linker. This
236 /// is "l" on Darwin, currently used for some ObjC metadata.
237 const char *LessPrivateGlobalPrefix; // Defaults to ""
239 /// JumpTableSpecialLabelPrefix - If not null, a extra (dead) label is
240 /// emitted before jump tables with the specified prefix.
241 const char *JumpTableSpecialLabelPrefix; // Default to null.
243 /// GlobalVarAddrPrefix/Suffix - If these are nonempty, these strings
244 /// will enclose any GlobalVariable (that isn't a function)
246 const char *GlobalVarAddrPrefix; // Defaults to ""
247 const char *GlobalVarAddrSuffix; // Defaults to ""
249 /// FunctionAddrPrefix/Suffix - If these are nonempty, these strings
250 /// will enclose any GlobalVariable that points to a function.
251 /// For example, this is used by the IA64 backend to materialize
252 /// function descriptors, by decorating the ".data8" object with the
253 /// @verbatim @fptr( ) @endverbatim
254 /// link-relocation operator.
256 const char *FunctionAddrPrefix; // Defaults to ""
257 const char *FunctionAddrSuffix; // Defaults to ""
259 /// PersonalityPrefix/Suffix - If these are nonempty, these strings will
260 /// enclose any personality function in the common frame section.
262 const char *PersonalityPrefix; // Defaults to ""
263 const char *PersonalitySuffix; // Defaults to ""
265 /// NeedsIndirectEncoding - If set, we need to set the indirect encoding bit
268 bool NeedsIndirectEncoding; // Defaults to false
270 /// InlineAsmStart/End - If these are nonempty, they contain a directive to
271 /// emit before and after an inline assembly statement.
272 const char *InlineAsmStart; // Defaults to "#APP\n"
273 const char *InlineAsmEnd; // Defaults to "#NO_APP\n"
275 /// AssemblerDialect - Which dialect of an assembler variant to use.
276 unsigned AssemblerDialect; // Defaults to 0
278 /// StringConstantPrefix - Prefix for FEs to use when generating unnamed
279 /// constant strings. These names get run through the Mangler later; if
280 /// you want the Mangler not to add the GlobalPrefix as well,
281 /// use '\1' as the first character.
282 const char *StringConstantPrefix; // Defaults to ".str"
284 /// AllowQuotesInName - This is true if the assembler allows for complex
285 /// symbol names to be surrounded in quotes. This defaults to false.
286 bool AllowQuotesInName;
288 //===--- Data Emission Directives -------------------------------------===//
290 /// ZeroDirective - this should be set to the directive used to get some
291 /// number of zero bytes emitted to the current section. Common cases are
292 /// "\t.zero\t" and "\t.space\t". If this is set to null, the
293 /// Data*bitsDirective's will be used to emit zero bytes.
294 const char *ZeroDirective; // Defaults to "\t.zero\t"
295 const char *ZeroDirectiveSuffix; // Defaults to ""
297 /// AsciiDirective - This directive allows emission of an ascii string with
298 /// the standard C escape characters embedded into it.
299 const char *AsciiDirective; // Defaults to "\t.ascii\t"
301 /// AscizDirective - If not null, this allows for special handling of
302 /// zero terminated strings on this target. This is commonly supported as
303 /// ".asciz". If a target doesn't support this, it can be set to null.
304 const char *AscizDirective; // Defaults to "\t.asciz\t"
306 /// DataDirectives - These directives are used to output some unit of
307 /// integer data to the current section. If a data directive is set to
308 /// null, smaller data directives will be used to emit the large sizes.
309 const char *Data8bitsDirective; // Defaults to "\t.byte\t"
310 const char *Data16bitsDirective; // Defaults to "\t.short\t"
311 const char *Data32bitsDirective; // Defaults to "\t.long\t"
312 const char *Data64bitsDirective; // Defaults to "\t.quad\t"
314 /// getASDirective - Targets can override it to provide different data
315 /// directives for various sizes and non-default address spaces.
316 virtual const char *getASDirective(unsigned size,
318 assert(AS > 0 && "Dont know the directives for default addr space");
322 //===--- Alignment Information ----------------------------------------===//
324 /// AlignDirective - The directive used to emit round up to an alignment
327 const char *AlignDirective; // Defaults to "\t.align\t"
329 /// AlignmentIsInBytes - If this is true (the default) then the asmprinter
330 /// emits ".align N" directives, where N is the number of bytes to align to.
331 /// Otherwise, it emits ".align log2(N)", e.g. 3 to align to an 8 byte
333 bool AlignmentIsInBytes; // Defaults to true
335 /// TextAlignFillValue - If non-zero, this is used to fill the executable
336 /// space created as the result of a alignment directive.
337 unsigned TextAlignFillValue;
339 //===--- Section Switching Directives ---------------------------------===//
341 /// SwitchToSectionDirective - This is the directive used when we want to
342 /// emit a global to an arbitrary section. The section name is emited after
344 const char *SwitchToSectionDirective; // Defaults to "\t.section\t"
346 /// TextSectionStartSuffix - This is printed after each start of section
347 /// directive for text sections.
348 const char *TextSectionStartSuffix; // Defaults to "".
350 /// DataSectionStartSuffix - This is printed after each start of section
351 /// directive for data sections.
352 const char *DataSectionStartSuffix; // Defaults to "".
354 /// SectionEndDirectiveSuffix - If non-null, the asm printer will close each
355 /// section with the section name and this suffix printed.
356 const char *SectionEndDirectiveSuffix;// Defaults to null.
358 /// ConstantPoolSection - This is the section that we SwitchToSection right
359 /// before emitting the constant pool for a function.
360 const char *ConstantPoolSection; // Defaults to "\t.section .rodata"
362 /// JumpTableDataSection - This is the section that we SwitchToSection right
363 /// before emitting the jump tables for a function when the relocation model
365 const char *JumpTableDataSection; // Defaults to "\t.section .rodata"
367 /// JumpTableDirective - if non-null, the directive to emit before a jump
369 const char *JumpTableDirective;
371 /// CStringSection - If not null, this allows for special handling of
372 /// cstring constants (null terminated string that does not contain any
373 /// other null bytes) on this target. This is commonly supported as
375 const char *CStringSection; // Defaults to NULL
376 const Section *CStringSection_;
378 /// StaticCtorsSection - This is the directive that is emitted to switch to
379 /// a section to emit the static constructor list.
380 /// Defaults to "\t.section .ctors,\"aw\",@progbits".
381 const char *StaticCtorsSection;
383 /// StaticDtorsSection - This is the directive that is emitted to switch to
384 /// a section to emit the static destructor list.
385 /// Defaults to "\t.section .dtors,\"aw\",@progbits".
386 const char *StaticDtorsSection;
388 //===--- Global Variable Emission Directives --------------------------===//
390 /// GlobalDirective - This is the directive used to declare a global entity.
392 const char *GlobalDirective; // Defaults to NULL.
394 /// ExternDirective - This is the directive used to declare external
397 const char *ExternDirective; // Defaults to NULL.
399 /// SetDirective - This is the name of a directive that can be used to tell
400 /// the assembler to set the value of a variable to some expression.
401 const char *SetDirective; // Defaults to null.
403 /// LCOMMDirective - This is the name of a directive (if supported) that can
404 /// be used to efficiently declare a local (internal) block of zero
405 /// initialized data in the .bss/.data section. The syntax expected is:
406 /// @verbatim <LCOMMDirective> SYMBOLNAME LENGTHINBYTES, ALIGNMENT
408 const char *LCOMMDirective; // Defaults to null.
410 const char *COMMDirective; // Defaults to "\t.comm\t".
412 /// COMMDirectiveTakesAlignment - True if COMMDirective take a third
413 /// argument that specifies the alignment of the declaration.
414 bool COMMDirectiveTakesAlignment; // Defaults to true.
416 /// HasDotTypeDotSizeDirective - True if the target has .type and .size
417 /// directives, this is true for most ELF targets.
418 bool HasDotTypeDotSizeDirective; // Defaults to true.
420 /// HasSingleParameterDotFile - True if the target has a single parameter
421 /// .file directive, this is true for ELF targets.
422 bool HasSingleParameterDotFile; // Defaults to true.
424 /// UsedDirective - This directive, if non-null, is used to declare a global
425 /// as being used somehow that the assembler can't see. This prevents dead
426 /// code elimination on some targets.
427 const char *UsedDirective; // Defaults to null.
429 /// WeakRefDirective - This directive, if non-null, is used to declare a
430 /// global as being a weak undefined symbol.
431 const char *WeakRefDirective; // Defaults to null.
433 /// WeakDefDirective - This directive, if non-null, is used to declare a
434 /// global as being a weak defined symbol.
435 const char *WeakDefDirective; // Defaults to null.
437 /// HiddenDirective - This directive, if non-null, is used to declare a
438 /// global or function as having hidden visibility.
439 const char *HiddenDirective; // Defaults to "\t.hidden\t".
441 /// ProtectedDirective - This directive, if non-null, is used to declare a
442 /// global or function as having protected visibility.
443 const char *ProtectedDirective; // Defaults to "\t.protected\t".
445 //===--- Dwarf Emission Directives -----------------------------------===//
447 /// AbsoluteDebugSectionOffsets - True if we should emit abolute section
448 /// offsets for debug information. Defaults to false.
449 bool AbsoluteDebugSectionOffsets;
451 /// AbsoluteEHSectionOffsets - True if we should emit abolute section
452 /// offsets for EH information. Defaults to false.
453 bool AbsoluteEHSectionOffsets;
455 /// HasLEB128 - True if target asm supports leb128 directives.
457 bool HasLEB128; // Defaults to false.
459 /// hasDotLocAndDotFile - True if target asm supports .loc and .file
460 /// directives for emitting debugging information.
462 bool HasDotLocAndDotFile; // Defaults to false.
464 /// SupportsDebugInformation - True if target supports emission of debugging
466 bool SupportsDebugInformation;
468 /// SupportsExceptionHandling - True if target supports
469 /// exception handling.
471 bool SupportsExceptionHandling; // Defaults to false.
473 /// RequiresFrameSection - true if the Dwarf2 output needs a frame section
475 bool DwarfRequiresFrameSection; // Defaults to true.
477 /// DwarfUsesInlineInfoSection - True if DwarfDebugInlineSection is used to
478 /// encode inline subroutine information.
479 bool DwarfUsesInlineInfoSection; // Defaults to false.
481 /// NonLocalEHFrameLabel - If set, the EH_frame label needs to be non-local.
483 bool NonLocalEHFrameLabel; // Defaults to false.
485 /// GlobalEHDirective - This is the directive used to make exception frame
486 /// tables globally visible.
488 const char *GlobalEHDirective; // Defaults to NULL.
490 /// SupportsWeakEmptyEHFrame - True if target assembler and linker will
491 /// handle a weak_definition of constant 0 for an omitted EH frame.
492 bool SupportsWeakOmittedEHFrame; // Defaults to true.
494 /// DwarfSectionOffsetDirective - Special section offset directive.
495 const char* DwarfSectionOffsetDirective; // Defaults to NULL
497 /// DwarfAbbrevSection - Section directive for Dwarf abbrev.
499 const char *DwarfAbbrevSection; // Defaults to ".debug_abbrev".
501 /// DwarfInfoSection - Section directive for Dwarf info.
503 const char *DwarfInfoSection; // Defaults to ".debug_info".
505 /// DwarfLineSection - Section directive for Dwarf info.
507 const char *DwarfLineSection; // Defaults to ".debug_line".
509 /// DwarfFrameSection - Section directive for Dwarf info.
511 const char *DwarfFrameSection; // Defaults to ".debug_frame".
513 /// DwarfPubNamesSection - Section directive for Dwarf info.
515 const char *DwarfPubNamesSection; // Defaults to ".debug_pubnames".
517 /// DwarfPubTypesSection - Section directive for Dwarf info.
519 const char *DwarfPubTypesSection; // Defaults to ".debug_pubtypes".
521 /// DwarfDebugInlineSection - Section directive for inline info.
523 const char *DwarfDebugInlineSection; // Defaults to ".debug_inlined"
525 /// DwarfStrSection - Section directive for Dwarf info.
527 const char *DwarfStrSection; // Defaults to ".debug_str".
529 /// DwarfLocSection - Section directive for Dwarf info.
531 const char *DwarfLocSection; // Defaults to ".debug_loc".
533 /// DwarfARangesSection - Section directive for Dwarf info.
535 const char *DwarfARangesSection; // Defaults to ".debug_aranges".
537 /// DwarfRangesSection - Section directive for Dwarf info.
539 const char *DwarfRangesSection; // Defaults to ".debug_ranges".
541 /// DwarfMacroInfoSection - Section directive for DWARF macro info.
543 const char *DwarfMacroInfoSection; // Defaults to ".debug_macinfo".
545 /// DwarfEHFrameSection - Section directive for Exception frames.
547 const char *DwarfEHFrameSection; // Defaults to ".eh_frame".
549 /// DwarfExceptionSection - Section directive for Exception table.
551 const char *DwarfExceptionSection; // Defaults to ".gcc_except_table".
553 //===--- CBE Asm Translation Table -----------------------------------===//
555 const char *const *AsmTransCBE; // Defaults to empty
558 explicit TargetAsmInfo(const TargetMachine &TM);
559 virtual ~TargetAsmInfo();
561 const Section* getNamedSection(const char *Name,
562 unsigned Flags = SectionFlags::None,
563 bool Override = false) const;
564 const Section* getUnnamedSection(const char *Directive,
565 unsigned Flags = SectionFlags::None,
566 bool Override = false) const;
568 /// Measure the specified inline asm to determine an approximation of its
570 virtual unsigned getInlineAsmLength(const char *Str) const;
572 /// ExpandInlineAsm - This hook allows the target to expand an inline asm
573 /// call to be explicit llvm code if it wants to. This is useful for
574 /// turning simple inline asms into LLVM intrinsics, which gives the
575 /// compiler more information about the behavior of the code.
576 virtual bool ExpandInlineAsm(CallInst *CI) const {
580 /// emitUsedDirectiveFor - This hook allows targets to selectively decide
581 /// not to emit the UsedDirective for some symbols in llvm.used.
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,
594 /// SectionKindForGlobal - This hook allows the target to select proper
595 /// section kind used for global emission.
596 virtual SectionKind::Kind
597 SectionKindForGlobal(const GlobalValue *GV) const;
599 /// RelocBehaviour - Describes how relocations should be treated when
600 /// selecting sections. Reloc::Global bit should be set if global
601 /// relocations should force object to be placed in read-write
602 /// sections. Reloc::Local bit should be set if local relocations should
603 /// force object to be placed in read-write sections.
604 virtual unsigned RelocBehaviour() const;
606 /// SectionFlagsForGlobal - This hook allows the target to select proper
607 /// section flags either for given global or for section.
609 SectionFlagsForGlobal(const GlobalValue *GV = NULL,
610 const char* name = NULL) const;
612 /// SectionForGlobal - This hooks returns proper section name for given
613 /// global with all necessary flags and marks.
614 virtual const Section* SectionForGlobal(const GlobalValue *GV) const;
616 // Helper methods for SectionForGlobal
617 virtual std::string UniqueSectionForGlobal(const GlobalValue* GV,
618 SectionKind::Kind kind) const;
620 const std::string& getSectionFlags(unsigned Flags) const;
621 virtual std::string printSectionFlags(unsigned flags) const { return ""; }
623 virtual const Section* SelectSectionForGlobal(const GlobalValue *GV) const;
625 virtual const Section* SelectSectionForMachineConst(const Type *Ty) const;
627 /// getSLEB128Size - Compute the number of bytes required for a signed
630 static unsigned getSLEB128Size(int Value);
632 /// getULEB128Size - Compute the number of bytes required for an unsigned
635 static unsigned getULEB128Size(unsigned Value);
637 // Data directive accessors
639 const char *getData8bitsDirective(unsigned AS = 0) const {
640 return AS == 0 ? Data8bitsDirective : getASDirective(8, AS);
642 const char *getData16bitsDirective(unsigned AS = 0) const {
643 return AS == 0 ? Data16bitsDirective : getASDirective(16, AS);
645 const char *getData32bitsDirective(unsigned AS = 0) const {
646 return AS == 0 ? Data32bitsDirective : getASDirective(32, AS);
648 const char *getData64bitsDirective(unsigned AS = 0) const {
649 return AS == 0 ? Data64bitsDirective : getASDirective(64, AS);
655 const Section *getTextSection() const {
658 const Section *getDataSection() const {
661 const char *getBSSSection() const {
664 const Section *getBSSSection_() const {
667 const Section *getReadOnlySection() const {
668 return ReadOnlySection;
670 const Section *getSmallDataSection() const {
671 return SmallDataSection;
673 const Section *getSmallBSSSection() const {
674 return SmallBSSSection;
676 const Section *getSmallRODataSection() const {
677 return SmallRODataSection;
679 const Section *getTLSDataSection() const {
680 return TLSDataSection;
682 const Section *getTLSBSSSection() const {
683 return TLSBSSSection;
685 const char *getZeroFillDirective() const {
686 return ZeroFillDirective;
688 const char *getNonexecutableStackDirective() const {
689 return NonexecutableStackDirective;
691 bool needsSet() const {
694 const char *getPCSymbol() const {
697 char getSeparatorChar() const {
698 return SeparatorChar;
700 unsigned getCommentColumn() const {
701 return CommentColumn;
703 const char *getCommentString() const {
704 return CommentString;
706 const char *getGlobalPrefix() const {
709 const char *getPrivateGlobalPrefix() const {
710 return PrivateGlobalPrefix;
712 /// EHGlobalPrefix - Prefix for EH_frame and the .eh symbols.
713 /// This is normally PrivateGlobalPrefix, but some targets want
714 /// these symbols to be visible.
715 virtual const char *getEHGlobalPrefix() const {
716 return PrivateGlobalPrefix;
718 const char *getLessPrivateGlobalPrefix() const {
719 return LessPrivateGlobalPrefix;
721 const char *getJumpTableSpecialLabelPrefix() const {
722 return JumpTableSpecialLabelPrefix;
724 const char *getGlobalVarAddrPrefix() const {
725 return GlobalVarAddrPrefix;
727 const char *getGlobalVarAddrSuffix() const {
728 return GlobalVarAddrSuffix;
730 const char *getFunctionAddrPrefix() const {
731 return FunctionAddrPrefix;
733 const char *getFunctionAddrSuffix() const {
734 return FunctionAddrSuffix;
736 const char *getPersonalityPrefix() const {
737 return PersonalityPrefix;
739 const char *getPersonalitySuffix() const {
740 return PersonalitySuffix;
742 bool getNeedsIndirectEncoding() const {
743 return NeedsIndirectEncoding;
745 const char *getInlineAsmStart() const {
746 return InlineAsmStart;
748 const char *getInlineAsmEnd() const {
751 unsigned getAssemblerDialect() const {
752 return AssemblerDialect;
754 const char *getStringConstantPrefix() const {
755 return StringConstantPrefix;
757 bool doesAllowQuotesInName() const {
758 return AllowQuotesInName;
760 const char *getZeroDirective() const {
761 return ZeroDirective;
763 const char *getZeroDirectiveSuffix() const {
764 return ZeroDirectiveSuffix;
766 const char *getAsciiDirective() const {
767 return AsciiDirective;
769 const char *getAscizDirective() const {
770 return AscizDirective;
772 const char *getJumpTableDirective() const {
773 return JumpTableDirective;
775 const char *getAlignDirective() const {
776 return AlignDirective;
778 bool getAlignmentIsInBytes() const {
779 return AlignmentIsInBytes;
781 unsigned getTextAlignFillValue() const {
782 return TextAlignFillValue;
784 const char *getSwitchToSectionDirective() const {
785 return SwitchToSectionDirective;
787 const char *getTextSectionStartSuffix() const {
788 return TextSectionStartSuffix;
790 const char *getDataSectionStartSuffix() const {
791 return DataSectionStartSuffix;
793 const char *getSectionEndDirectiveSuffix() const {
794 return SectionEndDirectiveSuffix;
796 const char *getConstantPoolSection() const {
797 return ConstantPoolSection;
799 const char *getJumpTableDataSection() const {
800 return JumpTableDataSection;
802 const char *getCStringSection() const {
803 return CStringSection;
805 const Section *getCStringSection_() const {
806 return CStringSection_;
808 const char *getStaticCtorsSection() const {
809 return StaticCtorsSection;
811 const char *getStaticDtorsSection() const {
812 return StaticDtorsSection;
814 const char *getGlobalDirective() const {
815 return GlobalDirective;
817 const char *getExternDirective() const {
818 return ExternDirective;
820 const char *getSetDirective() const {
823 const char *getLCOMMDirective() const {
824 return LCOMMDirective;
826 const char *getCOMMDirective() const {
827 return COMMDirective;
829 bool getCOMMDirectiveTakesAlignment() const {
830 return COMMDirectiveTakesAlignment;
832 bool hasDotTypeDotSizeDirective() const {
833 return HasDotTypeDotSizeDirective;
835 bool hasSingleParameterDotFile() const {
836 return HasSingleParameterDotFile;
838 const char *getUsedDirective() const {
839 return UsedDirective;
841 const char *getWeakRefDirective() const {
842 return WeakRefDirective;
844 const char *getWeakDefDirective() const {
845 return WeakDefDirective;
847 const char *getHiddenDirective() const {
848 return HiddenDirective;
850 const char *getProtectedDirective() const {
851 return ProtectedDirective;
853 bool isAbsoluteDebugSectionOffsets() const {
854 return AbsoluteDebugSectionOffsets;
856 bool isAbsoluteEHSectionOffsets() const {
857 return AbsoluteEHSectionOffsets;
859 bool hasLEB128() const {
862 bool hasDotLocAndDotFile() const {
863 return HasDotLocAndDotFile;
865 bool doesSupportDebugInformation() const {
866 return SupportsDebugInformation;
868 bool doesSupportExceptionHandling() const {
869 return SupportsExceptionHandling;
871 bool doesDwarfRequireFrameSection() const {
872 return DwarfRequiresFrameSection;
874 bool doesDwarfUsesInlineInfoSection() const {
875 return DwarfUsesInlineInfoSection;
877 bool doesRequireNonLocalEHFrameLabel() const {
878 return NonLocalEHFrameLabel;
880 const char *getGlobalEHDirective() const {
881 return GlobalEHDirective;
883 bool getSupportsWeakOmittedEHFrame() const {
884 return SupportsWeakOmittedEHFrame;
886 const char *getDwarfSectionOffsetDirective() const {
887 return DwarfSectionOffsetDirective;
889 const char *getDwarfAbbrevSection() const {
890 return DwarfAbbrevSection;
892 const char *getDwarfInfoSection() const {
893 return DwarfInfoSection;
895 const char *getDwarfLineSection() const {
896 return DwarfLineSection;
898 const char *getDwarfFrameSection() const {
899 return DwarfFrameSection;
901 const char *getDwarfPubNamesSection() const {
902 return DwarfPubNamesSection;
904 const char *getDwarfPubTypesSection() const {
905 return DwarfPubTypesSection;
907 const char *getDwarfDebugInlineSection() const {
908 return DwarfDebugInlineSection;
910 const char *getDwarfStrSection() const {
911 return DwarfStrSection;
913 const char *getDwarfLocSection() const {
914 return DwarfLocSection;
916 const char *getDwarfARangesSection() const {
917 return DwarfARangesSection;
919 const char *getDwarfRangesSection() const {
920 return DwarfRangesSection;
922 const char *getDwarfMacroInfoSection() const {
923 return DwarfMacroInfoSection;
925 const char *getDwarfEHFrameSection() const {
926 return DwarfEHFrameSection;
928 const char *getDwarfExceptionSection() const {
929 return DwarfExceptionSection;
931 const char *const *getAsmCBE() const {