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::RODataMergeConst ||
61 K == SectionKind::RODataMergeStr);
64 static inline bool isBSS(Kind K) {
65 return K == SectionKind::BSS;
69 namespace SectionFlags {
70 const unsigned Invalid = -1U;
71 const unsigned None = 0;
72 const unsigned Code = 1 << 0; ///< Section contains code
73 const unsigned Writeable = 1 << 1; ///< Section is writeable
74 const unsigned BSS = 1 << 2; ///< Section contains only zeroes
75 const unsigned Mergeable = 1 << 3; ///< Section contains mergeable data
76 const unsigned Strings = 1 << 4; ///< Section contains C-type strings
77 const unsigned TLS = 1 << 5; ///< Section contains thread-local data
78 const unsigned Debug = 1 << 6; ///< Section contains debug data
79 const unsigned Linkonce = 1 << 7; ///< Section is linkonce
80 const unsigned TypeFlags = 0xFF;
81 // Some gap for future flags
83 /// Named - True if this section should be printed with ".section <name>",
84 /// false if the section name is something like ".const".
85 const unsigned Named = 1 << 23; ///< Section is named
86 const unsigned EntitySize = 0xFF << 24; ///< Entity size for mergeable stuff
88 static inline unsigned getEntitySize(unsigned Flags) {
89 return (Flags >> 24) & 0xFF;
92 static inline unsigned setEntitySize(unsigned Flags, unsigned Size) {
93 return ((Flags & ~EntitySize) | ((Size & 0xFF) << 24));
97 static inline unsigned getEmptyKey() { return Invalid; }
98 static inline unsigned getTombstoneKey() { return Invalid - 1; }
99 static unsigned getHashValue(const unsigned &Key) { return Key; }
100 static bool isEqual(unsigned LHS, unsigned RHS) { return LHS == RHS; }
101 static bool isPod() { return true; }
104 typedef DenseMap<unsigned, std::string, KeyInfo> FlagsStringsMapType;
114 friend class TargetAsmInfo;
115 friend class StringMapEntry<Section>;
116 friend class StringMap<Section>;
120 explicit Section(unsigned F = SectionFlags::Invalid) : Flags(F) { }
124 unsigned getEntitySize() const { return (Flags >> 24) & 0xFF; }
126 const std::string &getName() const { return Name; }
127 unsigned getFlags() const { return Flags; }
129 bool hasFlag(unsigned F) const { return (Flags & F) != 0; }
132 /// TargetAsmInfo - This class is intended to be used as a base class for asm
133 /// properties and features specific to the target.
134 class TargetAsmInfo {
136 mutable StringMap<Section> Sections;
137 mutable SectionFlags::FlagsStringsMapType FlagsStrings;
139 /// TM - The current TargetMachine.
140 const TargetMachine &TM;
142 //===------------------------------------------------------------------===//
143 // Properties to be set by the target writer, used to configure asm printer.
146 /// TextSection - Section directive for standard text.
148 const Section *TextSection; // Defaults to ".text".
150 /// DataSection - Section directive for standard data.
152 const Section *DataSection; // Defaults to ".data".
154 /// BSSSection - Section directive for uninitialized data. Null if this
155 /// target doesn't support a BSS section.
157 const char *BSSSection; // Default to ".bss".
158 const Section *BSSSection_;
160 /// ReadOnlySection - This is the directive that is emitted to switch to a
161 /// read-only section for constant data (e.g. data declared const,
163 const Section *ReadOnlySection; // Defaults to NULL
165 /// TLSDataSection - Section directive for Thread Local data.
167 const Section *TLSDataSection; // Defaults to ".tdata".
169 /// TLSBSSSection - Section directive for Thread Local uninitialized data.
170 /// Null if this target doesn't support a BSS section.
172 const Section *TLSBSSSection; // Defaults to ".tbss".
174 /// ZeroFillDirective - Directive for emitting a global to the ZeroFill
175 /// section on this target. Null if this target doesn't support zerofill.
176 const char *ZeroFillDirective; // Default is null.
178 /// NonexecutableStackDirective - Directive for declaring to the
179 /// linker and beyond that the emitted code does not require stack
180 /// memory to be executable.
181 const char *NonexecutableStackDirective; // Default is null.
183 /// NeedsSet - True if target asm treats expressions in data directives
184 /// as linktime-relocatable. For assembly-time computation, we need to
185 /// use a .set. Thus:
188 /// is computed at assembly time, while
190 /// is relocated if the relative locations of x and y change at linktime.
191 /// We want both these things in different places.
192 bool NeedsSet; // Defaults to false.
194 /// MaxInstLength - This is the maximum possible length of an instruction,
195 /// which is needed to compute the size of an inline asm.
196 unsigned MaxInstLength; // Defaults to 4.
198 /// PCSymbol - The symbol used to represent the current PC. Used in PC
199 /// relative expressions.
200 const char *PCSymbol; // Defaults to "$".
202 /// SeparatorChar - This character, if specified, is used to separate
203 /// instructions from each other when on the same line. This is used to
204 /// measure inline asm instructions.
205 char SeparatorChar; // Defaults to ';'
207 /// CommentColumn - This indicates the comment num (zero-based) at
208 /// which asm comments should be printed.
209 unsigned CommentColumn; // Defaults to 60
211 /// CommentString - This indicates the comment character used by the
213 const char *CommentString; // Defaults to "#"
215 /// FirstOperandColumn - The output column where the first operand
216 /// should be printed
217 unsigned FirstOperandColumn; // Defaults to 0 (ignored)
219 /// MaxOperandLength - The maximum length of any printed asm
221 unsigned MaxOperandLength; // Defaults to 0 (ignored)
223 /// GlobalPrefix - If this is set to a non-empty string, it is prepended
224 /// onto all global symbols. This is often used for "_" or ".".
225 const char *GlobalPrefix; // Defaults to ""
227 /// PrivateGlobalPrefix - This prefix is used for globals like constant
228 /// pool entries that are completely private to the .s file and should not
229 /// have names in the .o file. This is often "." or "L".
230 const char *PrivateGlobalPrefix; // Defaults to "."
232 /// LinkerPrivateGlobalPrefix - This prefix is used for symbols that should
233 /// be passed through the assembler but be removed by the linker. This
234 /// is "l" on Darwin, currently used for some ObjC metadata.
235 const char *LinkerPrivateGlobalPrefix; // Defaults to ""
237 /// JumpTableSpecialLabelPrefix - If not null, a extra (dead) label is
238 /// emitted before jump tables with the specified prefix.
239 const char *JumpTableSpecialLabelPrefix; // Default to null.
241 /// GlobalVarAddrPrefix/Suffix - If these are nonempty, these strings
242 /// will enclose any GlobalVariable (that isn't a function)
244 const char *GlobalVarAddrPrefix; // Defaults to ""
245 const char *GlobalVarAddrSuffix; // Defaults to ""
247 /// FunctionAddrPrefix/Suffix - If these are nonempty, these strings
248 /// will enclose any GlobalVariable that points to a function.
250 const char *FunctionAddrPrefix; // Defaults to ""
251 const char *FunctionAddrSuffix; // Defaults to ""
253 /// PersonalityPrefix/Suffix - If these are nonempty, these strings will
254 /// enclose any personality function in the common frame section.
256 const char *PersonalityPrefix; // Defaults to ""
257 const char *PersonalitySuffix; // Defaults to ""
259 /// NeedsIndirectEncoding - If set, we need to set the indirect encoding bit
262 bool NeedsIndirectEncoding; // Defaults to false
264 /// InlineAsmStart/End - If these are nonempty, they contain a directive to
265 /// emit before and after an inline assembly statement.
266 const char *InlineAsmStart; // Defaults to "#APP\n"
267 const char *InlineAsmEnd; // Defaults to "#NO_APP\n"
269 /// AssemblerDialect - Which dialect of an assembler variant to use.
270 unsigned AssemblerDialect; // Defaults to 0
272 /// AllowQuotesInName - This is true if the assembler allows for complex
273 /// symbol names to be surrounded in quotes. This defaults to false.
274 bool AllowQuotesInName;
276 //===--- Data Emission Directives -------------------------------------===//
278 /// ZeroDirective - this should be set to the directive used to get some
279 /// number of zero bytes emitted to the current section. Common cases are
280 /// "\t.zero\t" and "\t.space\t". If this is set to null, the
281 /// Data*bitsDirective's will be used to emit zero bytes.
282 const char *ZeroDirective; // Defaults to "\t.zero\t"
283 const char *ZeroDirectiveSuffix; // Defaults to ""
285 /// AsciiDirective - This directive allows emission of an ascii string with
286 /// the standard C escape characters embedded into it.
287 const char *AsciiDirective; // Defaults to "\t.ascii\t"
289 /// AscizDirective - If not null, this allows for special handling of
290 /// zero terminated strings on this target. This is commonly supported as
291 /// ".asciz". If a target doesn't support this, it can be set to null.
292 const char *AscizDirective; // Defaults to "\t.asciz\t"
294 /// DataDirectives - These directives are used to output some unit of
295 /// integer data to the current section. If a data directive is set to
296 /// null, smaller data directives will be used to emit the large sizes.
297 const char *Data8bitsDirective; // Defaults to "\t.byte\t"
298 const char *Data16bitsDirective; // Defaults to "\t.short\t"
299 const char *Data32bitsDirective; // Defaults to "\t.long\t"
300 const char *Data64bitsDirective; // Defaults to "\t.quad\t"
302 /// getDataASDirective - Return the directive that should be used to emit
303 /// data of the specified size to the specified numeric address space.
304 virtual const char *getDataASDirective(unsigned Size, unsigned AS) const {
305 assert(AS != 0 && "Don't know the directives for default addr space");
309 //===--- Alignment Information ----------------------------------------===//
311 /// AlignDirective - The directive used to emit round up to an alignment
314 const char *AlignDirective; // Defaults to "\t.align\t"
316 /// AlignmentIsInBytes - If this is true (the default) then the asmprinter
317 /// emits ".align N" directives, where N is the number of bytes to align to.
318 /// Otherwise, it emits ".align log2(N)", e.g. 3 to align to an 8 byte
320 bool AlignmentIsInBytes; // Defaults to true
322 /// TextAlignFillValue - If non-zero, this is used to fill the executable
323 /// space created as the result of a alignment directive.
324 unsigned TextAlignFillValue;
326 //===--- Section Switching Directives ---------------------------------===//
328 /// SwitchToSectionDirective - This is the directive used when we want to
329 /// emit a global to an arbitrary section. The section name is emited after
331 const char *SwitchToSectionDirective; // Defaults to "\t.section\t"
333 /// TextSectionStartSuffix - This is printed after each start of section
334 /// directive for text sections.
335 const char *TextSectionStartSuffix; // Defaults to "".
337 /// DataSectionStartSuffix - This is printed after each start of section
338 /// directive for data sections.
339 const char *DataSectionStartSuffix; // Defaults to "".
341 /// SectionEndDirectiveSuffix - If non-null, the asm printer will close each
342 /// section with the section name and this suffix printed.
343 const char *SectionEndDirectiveSuffix;// Defaults to null.
345 /// ConstantPoolSection - This is the section that we SwitchToSection right
346 /// before emitting the constant pool for a function.
347 const char *ConstantPoolSection; // Defaults to "\t.section .rodata"
349 /// JumpTableDataSection - This is the section that we SwitchToSection right
350 /// before emitting the jump tables for a function when the relocation model
352 const char *JumpTableDataSection; // Defaults to "\t.section .rodata"
354 /// JumpTableDirective - if non-null, the directive to emit before a jump
356 const char *JumpTableDirective;
358 /// CStringSection - If not null, this allows for special handling of
359 /// cstring constants (null terminated string that does not contain any
360 /// other null bytes) on this target. This is commonly supported as
362 const char *CStringSection; // Defaults to NULL
363 const Section *CStringSection_;
365 /// StaticCtorsSection - This is the directive that is emitted to switch to
366 /// a section to emit the static constructor list.
367 /// Defaults to "\t.section .ctors,\"aw\",@progbits".
368 const char *StaticCtorsSection;
370 /// StaticDtorsSection - This is the directive that is emitted to switch to
371 /// a section to emit the static destructor list.
372 /// Defaults to "\t.section .dtors,\"aw\",@progbits".
373 const char *StaticDtorsSection;
375 //===--- Global Variable Emission Directives --------------------------===//
377 /// GlobalDirective - This is the directive used to declare a global entity.
379 const char *GlobalDirective; // Defaults to NULL.
381 /// ExternDirective - This is the directive used to declare external
384 const char *ExternDirective; // Defaults to NULL.
386 /// SetDirective - This is the name of a directive that can be used to tell
387 /// the assembler to set the value of a variable to some expression.
388 const char *SetDirective; // Defaults to null.
390 /// LCOMMDirective - This is the name of a directive (if supported) that can
391 /// be used to efficiently declare a local (internal) block of zero
392 /// initialized data in the .bss/.data section. The syntax expected is:
393 /// @verbatim <LCOMMDirective> SYMBOLNAME LENGTHINBYTES, ALIGNMENT
395 const char *LCOMMDirective; // Defaults to null.
397 const char *COMMDirective; // Defaults to "\t.comm\t".
399 /// COMMDirectiveTakesAlignment - True if COMMDirective take a third
400 /// argument that specifies the alignment of the declaration.
401 bool COMMDirectiveTakesAlignment; // Defaults to true.
403 /// HasDotTypeDotSizeDirective - True if the target has .type and .size
404 /// directives, this is true for most ELF targets.
405 bool HasDotTypeDotSizeDirective; // Defaults to true.
407 /// HasSingleParameterDotFile - True if the target has a single parameter
408 /// .file directive, this is true for ELF targets.
409 bool HasSingleParameterDotFile; // Defaults to true.
411 /// UsedDirective - This directive, if non-null, is used to declare a global
412 /// as being used somehow that the assembler can't see. This prevents dead
413 /// code elimination on some targets.
414 const char *UsedDirective; // Defaults to null.
416 /// WeakRefDirective - This directive, if non-null, is used to declare a
417 /// global as being a weak undefined symbol.
418 const char *WeakRefDirective; // Defaults to null.
420 /// WeakDefDirective - This directive, if non-null, is used to declare a
421 /// global as being a weak defined symbol.
422 const char *WeakDefDirective; // Defaults to null.
424 /// HiddenDirective - This directive, if non-null, is used to declare a
425 /// global or function as having hidden visibility.
426 const char *HiddenDirective; // Defaults to "\t.hidden\t".
428 /// ProtectedDirective - This directive, if non-null, is used to declare a
429 /// global or function as having protected visibility.
430 const char *ProtectedDirective; // Defaults to "\t.protected\t".
432 //===--- Dwarf Emission Directives -----------------------------------===//
434 /// AbsoluteDebugSectionOffsets - True if we should emit abolute section
435 /// offsets for debug information. Defaults to false.
436 bool AbsoluteDebugSectionOffsets;
438 /// AbsoluteEHSectionOffsets - True if we should emit abolute section
439 /// offsets for EH information. Defaults to false.
440 bool AbsoluteEHSectionOffsets;
442 /// HasLEB128 - True if target asm supports leb128 directives.
444 bool HasLEB128; // Defaults to false.
446 /// hasDotLocAndDotFile - True if target asm supports .loc and .file
447 /// directives for emitting debugging information.
449 bool HasDotLocAndDotFile; // Defaults to false.
451 /// SupportsDebugInformation - True if target supports emission of debugging
453 bool SupportsDebugInformation;
455 /// SupportsExceptionHandling - True if target supports
456 /// exception handling.
458 bool SupportsExceptionHandling; // Defaults to false.
460 /// RequiresFrameSection - true if the Dwarf2 output needs a frame section
462 bool DwarfRequiresFrameSection; // Defaults to true.
464 /// DwarfUsesInlineInfoSection - True if DwarfDebugInlineSection is used to
465 /// encode inline subroutine information.
466 bool DwarfUsesInlineInfoSection; // Defaults to false.
468 /// Is_EHSymbolPrivate - If set, the "_foo.eh" is made private so that it
469 /// doesn't show up in the symbol table of the object file.
470 bool Is_EHSymbolPrivate; // Defaults to true.
472 /// GlobalEHDirective - This is the directive used to make exception frame
473 /// tables globally visible.
475 const char *GlobalEHDirective; // Defaults to NULL.
477 /// SupportsWeakEmptyEHFrame - True if target assembler and linker will
478 /// handle a weak_definition of constant 0 for an omitted EH frame.
479 bool SupportsWeakOmittedEHFrame; // Defaults to true.
481 /// DwarfSectionOffsetDirective - Special section offset directive.
482 const char* DwarfSectionOffsetDirective; // Defaults to NULL
484 /// DwarfAbbrevSection - Section directive for Dwarf abbrev.
486 const char *DwarfAbbrevSection; // Defaults to ".debug_abbrev".
488 /// DwarfInfoSection - Section directive for Dwarf info.
490 const char *DwarfInfoSection; // Defaults to ".debug_info".
492 /// DwarfLineSection - Section directive for Dwarf info.
494 const char *DwarfLineSection; // Defaults to ".debug_line".
496 /// DwarfFrameSection - Section directive for Dwarf info.
498 const char *DwarfFrameSection; // Defaults to ".debug_frame".
500 /// DwarfPubNamesSection - Section directive for Dwarf info.
502 const char *DwarfPubNamesSection; // Defaults to ".debug_pubnames".
504 /// DwarfPubTypesSection - Section directive for Dwarf info.
506 const char *DwarfPubTypesSection; // Defaults to ".debug_pubtypes".
508 /// DwarfDebugInlineSection - Section directive for inline info.
510 const char *DwarfDebugInlineSection; // Defaults to ".debug_inlined"
512 /// DwarfStrSection - Section directive for Dwarf info.
514 const char *DwarfStrSection; // Defaults to ".debug_str".
516 /// DwarfLocSection - Section directive for Dwarf info.
518 const char *DwarfLocSection; // Defaults to ".debug_loc".
520 /// DwarfARangesSection - Section directive for Dwarf info.
522 const char *DwarfARangesSection; // Defaults to ".debug_aranges".
524 /// DwarfRangesSection - Section directive for Dwarf info.
526 const char *DwarfRangesSection; // Defaults to ".debug_ranges".
528 /// DwarfMacroInfoSection - Section directive for DWARF macro info.
530 const char *DwarfMacroInfoSection; // Defaults to ".debug_macinfo".
532 /// DwarfEHFrameSection - Section directive for Exception frames.
534 const char *DwarfEHFrameSection; // Defaults to ".eh_frame".
536 /// DwarfExceptionSection - Section directive for Exception table.
538 const char *DwarfExceptionSection; // Defaults to ".gcc_except_table".
540 //===--- CBE Asm Translation Table -----------------------------------===//
542 const char *const *AsmTransCBE; // Defaults to empty
545 explicit TargetAsmInfo(const TargetMachine &TM);
546 virtual ~TargetAsmInfo();
548 const Section* getNamedSection(const char *Name,
549 unsigned Flags = SectionFlags::None,
550 bool Override = false) const;
551 const Section* getUnnamedSection(const char *Directive,
552 unsigned Flags = SectionFlags::None,
553 bool Override = false) const;
555 /// Measure the specified inline asm to determine an approximation of its
557 virtual unsigned getInlineAsmLength(const char *Str) const;
559 /// emitUsedDirectiveFor - This hook allows targets to selectively decide
560 /// not to emit the UsedDirective for some symbols in llvm.used.
561 // FIXME: REMOVE this (rdar://7071300)
562 virtual bool emitUsedDirectiveFor(const GlobalValue *GV,
563 Mangler *Mang) const {
567 /// PreferredEHDataFormat - This hook allows the target to select data
568 /// format used for encoding pointers in exception handling data. Reason is
569 /// 0 for data, 1 for code labels, 2 for function pointers. Global is true
570 /// if the symbol can be relocated.
571 virtual unsigned PreferredEHDataFormat(DwarfEncoding::Target Reason,
575 /// getSectionForMergableConstant - Given a mergable constant with the
576 /// specified size and relocation information, return a section that it
577 /// should be placed in.
578 virtual const Section *
579 getSectionForMergableConstant(uint64_t Size, unsigned ReloInfo) const;
582 /// getSectionPrefixForUniqueGlobal - Return a string that we should prepend
583 /// onto a global's name in order to get the unique section name for the
584 /// global. This is important for globals that need to be merged across
585 /// translation units.
587 getSectionPrefixForUniqueGlobal(SectionKind::Kind Kind) const;
589 /// getFlagsForNamedSection - If this target wants to be able to infer
590 /// section flags based on the name of the section specified for a global
591 /// variable, it can implement this. This is used on ELF systems so that
592 /// ".tbss" gets the TLS bit set etc.
593 virtual unsigned getFlagsForNamedSection(const char *Section) const {
598 /// SectionKindForGlobal - This hook allows the target to select proper
599 /// section kind used for global emission.
600 // FIXME: Eliminate this.
601 virtual SectionKind::Kind
602 SectionKindForGlobal(const GlobalValue *GV) const;
604 /// SectionForGlobal - This hooks returns proper section name for given
605 /// global with all necessary flags and marks.
606 // FIXME: Eliminate this.
607 virtual const Section* SectionForGlobal(const GlobalValue *GV) const;
609 const std::string &getSectionFlags(unsigned Flags) const;
610 virtual std::string printSectionFlags(unsigned flags) const { return ""; }
612 // FIXME: Eliminate this.
613 virtual const Section* SelectSectionForGlobal(const GlobalValue *GV) const;
615 /// getSLEB128Size - Compute the number of bytes required for a signed
617 static unsigned getSLEB128Size(int Value);
619 /// getULEB128Size - Compute the number of bytes required for an unsigned
621 static unsigned getULEB128Size(unsigned Value);
623 // Data directive accessors.
625 const char *getData8bitsDirective(unsigned AS = 0) const {
626 return AS == 0 ? Data8bitsDirective : getDataASDirective(8, AS);
628 const char *getData16bitsDirective(unsigned AS = 0) const {
629 return AS == 0 ? Data16bitsDirective : getDataASDirective(16, AS);
631 const char *getData32bitsDirective(unsigned AS = 0) const {
632 return AS == 0 ? Data32bitsDirective : getDataASDirective(32, AS);
634 const char *getData64bitsDirective(unsigned AS = 0) const {
635 return AS == 0 ? Data64bitsDirective : getDataASDirective(64, AS);
641 const Section *getTextSection() const {
644 const Section *getDataSection() const {
647 const char *getBSSSection() const {
650 const Section *getBSSSection_() const {
653 const Section *getReadOnlySection() const {
654 return ReadOnlySection;
656 const Section *getTLSDataSection() const {
657 return TLSDataSection;
659 const Section *getTLSBSSSection() const {
660 return TLSBSSSection;
662 const char *getZeroFillDirective() const {
663 return ZeroFillDirective;
665 const char *getNonexecutableStackDirective() const {
666 return NonexecutableStackDirective;
668 bool needsSet() const {
671 const char *getPCSymbol() const {
674 char getSeparatorChar() const {
675 return SeparatorChar;
677 unsigned getCommentColumn() const {
678 return CommentColumn;
680 const char *getCommentString() const {
681 return CommentString;
683 unsigned getOperandColumn(int operand) const {
684 return FirstOperandColumn + (MaxOperandLength+1)*(operand-1);
686 const char *getGlobalPrefix() const {
689 const char *getPrivateGlobalPrefix() const {
690 return PrivateGlobalPrefix;
692 const char *getLinkerPrivateGlobalPrefix() const {
693 return LinkerPrivateGlobalPrefix;
695 const char *getJumpTableSpecialLabelPrefix() const {
696 return JumpTableSpecialLabelPrefix;
698 const char *getGlobalVarAddrPrefix() const {
699 return GlobalVarAddrPrefix;
701 const char *getGlobalVarAddrSuffix() const {
702 return GlobalVarAddrSuffix;
704 const char *getFunctionAddrPrefix() const {
705 return FunctionAddrPrefix;
707 const char *getFunctionAddrSuffix() const {
708 return FunctionAddrSuffix;
710 const char *getPersonalityPrefix() const {
711 return PersonalityPrefix;
713 const char *getPersonalitySuffix() const {
714 return PersonalitySuffix;
716 bool getNeedsIndirectEncoding() const {
717 return NeedsIndirectEncoding;
719 const char *getInlineAsmStart() const {
720 return InlineAsmStart;
722 const char *getInlineAsmEnd() const {
725 unsigned getAssemblerDialect() const {
726 return AssemblerDialect;
728 bool doesAllowQuotesInName() const {
729 return AllowQuotesInName;
731 const char *getZeroDirective() const {
732 return ZeroDirective;
734 const char *getZeroDirectiveSuffix() const {
735 return ZeroDirectiveSuffix;
737 const char *getAsciiDirective() const {
738 return AsciiDirective;
740 const char *getAscizDirective() const {
741 return AscizDirective;
743 const char *getJumpTableDirective() const {
744 return JumpTableDirective;
746 const char *getAlignDirective() const {
747 return AlignDirective;
749 bool getAlignmentIsInBytes() const {
750 return AlignmentIsInBytes;
752 unsigned getTextAlignFillValue() const {
753 return TextAlignFillValue;
755 const char *getSwitchToSectionDirective() const {
756 return SwitchToSectionDirective;
758 const char *getTextSectionStartSuffix() const {
759 return TextSectionStartSuffix;
761 const char *getDataSectionStartSuffix() const {
762 return DataSectionStartSuffix;
764 const char *getSectionEndDirectiveSuffix() const {
765 return SectionEndDirectiveSuffix;
767 const char *getConstantPoolSection() const {
768 return ConstantPoolSection;
770 const char *getJumpTableDataSection() const {
771 return JumpTableDataSection;
773 const char *getCStringSection() const {
774 return CStringSection;
776 const Section *getCStringSection_() const {
777 return CStringSection_;
779 const char *getStaticCtorsSection() const {
780 return StaticCtorsSection;
782 const char *getStaticDtorsSection() const {
783 return StaticDtorsSection;
785 const char *getGlobalDirective() const {
786 return GlobalDirective;
788 const char *getExternDirective() const {
789 return ExternDirective;
791 const char *getSetDirective() const {
794 const char *getLCOMMDirective() const {
795 return LCOMMDirective;
797 const char *getCOMMDirective() const {
798 return COMMDirective;
800 bool getCOMMDirectiveTakesAlignment() const {
801 return COMMDirectiveTakesAlignment;
803 bool hasDotTypeDotSizeDirective() const {
804 return HasDotTypeDotSizeDirective;
806 bool hasSingleParameterDotFile() const {
807 return HasSingleParameterDotFile;
809 const char *getUsedDirective() const {
810 return UsedDirective;
812 const char *getWeakRefDirective() const {
813 return WeakRefDirective;
815 const char *getWeakDefDirective() const {
816 return WeakDefDirective;
818 const char *getHiddenDirective() const {
819 return HiddenDirective;
821 const char *getProtectedDirective() const {
822 return ProtectedDirective;
824 bool isAbsoluteDebugSectionOffsets() const {
825 return AbsoluteDebugSectionOffsets;
827 bool isAbsoluteEHSectionOffsets() const {
828 return AbsoluteEHSectionOffsets;
830 bool hasLEB128() const {
833 bool hasDotLocAndDotFile() const {
834 return HasDotLocAndDotFile;
836 bool doesSupportDebugInformation() const {
837 return SupportsDebugInformation;
839 bool doesSupportExceptionHandling() const {
840 return SupportsExceptionHandling;
842 bool doesDwarfRequireFrameSection() const {
843 return DwarfRequiresFrameSection;
845 bool doesDwarfUsesInlineInfoSection() const {
846 return DwarfUsesInlineInfoSection;
848 bool is_EHSymbolPrivate() const {
849 return Is_EHSymbolPrivate;
851 const char *getGlobalEHDirective() const {
852 return GlobalEHDirective;
854 bool getSupportsWeakOmittedEHFrame() const {
855 return SupportsWeakOmittedEHFrame;
857 const char *getDwarfSectionOffsetDirective() const {
858 return DwarfSectionOffsetDirective;
860 const char *getDwarfAbbrevSection() const {
861 return DwarfAbbrevSection;
863 const char *getDwarfInfoSection() const {
864 return DwarfInfoSection;
866 const char *getDwarfLineSection() const {
867 return DwarfLineSection;
869 const char *getDwarfFrameSection() const {
870 return DwarfFrameSection;
872 const char *getDwarfPubNamesSection() const {
873 return DwarfPubNamesSection;
875 const char *getDwarfPubTypesSection() const {
876 return DwarfPubTypesSection;
878 const char *getDwarfDebugInlineSection() const {
879 return DwarfDebugInlineSection;
881 const char *getDwarfStrSection() const {
882 return DwarfStrSection;
884 const char *getDwarfLocSection() const {
885 return DwarfLocSection;
887 const char *getDwarfARangesSection() const {
888 return DwarfARangesSection;
890 const char *getDwarfRangesSection() const {
891 return DwarfRangesSection;
893 const char *getDwarfMacroInfoSection() const {
894 return DwarfMacroInfoSection;
896 const char *getDwarfEHFrameSection() const {
897 return DwarfEHFrameSection;
899 const char *getDwarfExceptionSection() const {
900 return DwarfExceptionSection;
902 const char *const *getAsmCBE() const {