protected:
//===------------------------------------------------------------------===//
// Properties to be set by the target writer, used to configure asm printer.
- //
+ //
/// TextSection - Section directive for standard text.
///
/// DataSection - Section directive for standard data.
///
const char *DataSection; // Defaults to ".data".
+
+ /// BSSSection - Section directive for uninitialized data. Null if this
+ /// target doesn't support a BSS section.
+ ///
+ const char *BSSSection; // Default to ".bss".
+
+ /// TLSDataSection - Section directive for Thread Local data.
+ ///
+ const char *TLSDataSection;// Defaults to ".section .tdata,"awT",@progbits".
+
+ /// TLSBSSSection - Section directive for Thread Local uninitialized data.
+ /// Null if this target doesn't support a BSS section.
+ ///
+ const char *TLSBSSSection;// Default to ".section .tbss,"awT",@nobits".
+ /// ZeroFillDirective - Directive for emitting a global to the ZeroFill
+ /// section on this target. Null if this target doesn't support zerofill.
+ const char *ZeroFillDirective; // Default is null.
/// AddressSize - Size of addresses used in file.
///
unsigned AddressSize; // Defaults to 4.
-
+
/// NeedsSet - True if target asm can't compute addresses on data
/// directives.
bool NeedsSet; // Defaults to false.
/// which is needed to compute the size of an inline asm.
unsigned MaxInstLength; // Defaults to 4.
+ /// PCSymbol - The symbol used to represent the current PC. Used in PC
+ /// relative expressions.
+ const char *PCSymbol; // Defaults to "$".
+
/// SeparatorChar - This character, if specified, is used to separate
/// instructions from each other when on the same line. This is used to
/// measure inline asm instructions.
/// have names in the .o file. This is often "." or "L".
const char *PrivateGlobalPrefix; // Defaults to "."
+ /// JumpTableSpecialLabelPrefix - If not null, a extra (dead) label is
+ /// emitted before jump tables with the specified prefix.
+ const char *JumpTableSpecialLabelPrefix; // Default to null.
+
/// GlobalVarAddrPrefix/Suffix - If these are nonempty, these strings
/// will enclose any GlobalVariable (that isn't a function)
///
/// will enclose any GlobalVariable that points to a function.
/// For example, this is used by the IA64 backend to materialize
/// function descriptors, by decorating the ".data8" object with the
- /// \literal @fptr( ) \endliteral
+ /// @verbatim @fptr( ) @endverbatim
/// link-relocation operator.
///
const char *FunctionAddrPrefix; // Defaults to ""
const char *FunctionAddrSuffix; // Defaults to ""
+ /// PersonalityPrefix/Suffix - If these are nonempty, these strings will
+ /// enclose any personality function in the common frame section.
+ ///
+ const char *PersonalityPrefix; // Defaults to ""
+ const char *PersonalitySuffix; // Defaults to ""
+
+ /// NeedsIndirectEncoding - If set, we need to set the indirect encoding bit
+ /// for EH in Dwarf.
+ ///
+ bool NeedsIndirectEncoding; // Defaults to false
+
/// InlineAsmStart/End - If these are nonempty, they contain a directive to
/// emit before and after an inline assembly statement.
const char *InlineAsmStart; // Defaults to "#APP\n"
const char *InlineAsmEnd; // Defaults to "#NO_APP\n"
-
+
+ /// AssemblerDialect - Which dialect of an assembler variant to use.
+ unsigned AssemblerDialect; // Defaults to 0
+
//===--- Data Emission Directives -------------------------------------===//
/// ZeroDirective - this should be set to the directive used to get some
/// Otherwise, it emits ".align log2(N)", e.g. 3 to align to an 8 byte
/// boundary.
bool AlignmentIsInBytes; // Defaults to true
-
+
//===--- Section Switching Directives ---------------------------------===//
/// SwitchToSectionDirective - This is the directive used when we want to
/// ConstantPoolSection - This is the section that we SwitchToSection right
/// before emitting the constant pool for a function.
- const char *ConstantPoolSection; // Defaults to "\t.section .rodata\n"
+ const char *ConstantPoolSection; // Defaults to "\t.section .rodata"
/// JumpTableDataSection - This is the section that we SwitchToSection right
/// before emitting the jump tables for a function when the relocation model
/// is not PIC.
- const char *JumpTableDataSection; // Defaults to "\t.section .rodata\n"
+ const char *JumpTableDataSection; // Defaults to "\t.section .rodata"
/// JumpTableDirective - if non-null, the directive to emit before a jump
/// table.
const char *JumpTableDirective;
/// CStringSection - If not null, this allows for special handling of
- /// cstring constants (\0 terminated string that does not contain any
+ /// cstring constants (null terminated string that does not contain any
/// other null bytes) on this target. This is commonly supported as
/// ".cstring".
const char *CStringSection; // Defaults to NULL
const char *FourByteConstantSection;
const char *EightByteConstantSection;
const char *SixteenByteConstantSection;
-
+
+ /// ReadOnlySection - This is the directive that is emitted to switch to a
+ /// read-only section for constant data (e.g. data declared const,
+ /// jump tables).
+ const char *ReadOnlySection; // Defaults to NULL
+
//===--- Global Variable Emission Directives --------------------------===//
+ /// GlobalDirective - This is the directive used to declare a global entity.
+ ///
+ const char *GlobalDirective; // Defaults to NULL.
+
/// SetDirective - This is the name of a directive that can be used to tell
/// the assembler to set the value of a variable to some expression.
const char *SetDirective; // Defaults to null.
/// LCOMMDirective - This is the name of a directive (if supported) that can
/// be used to efficiently declare a local (internal) block of zero
/// initialized data in the .bss/.data section. The syntax expected is:
- /// \literal <LCOMMDirective> SYMBOLNAME LENGTHINBYTES, ALIGNMENT
- /// \endliteral
+ /// @verbatim <LCOMMDirective> SYMBOLNAME LENGTHINBYTES, ALIGNMENT
+ /// @endverbatim
const char *LCOMMDirective; // Defaults to null.
const char *COMMDirective; // Defaults to "\t.comm\t".
/// code elimination on some targets.
const char *UsedDirective; // Defaults to null.
- /// WeakRefDirective - This directive, if non-null, is used to decalre a
+ /// WeakRefDirective - This directive, if non-null, is used to declare a
/// global as being a weak undefined symbol.
const char *WeakRefDirective; // Defaults to null.
+ /// HiddenDirective - This directive, if non-null, is used to declare a
+ /// global or function as having hidden visibility.
+ const char *HiddenDirective; // Defaults to "\t.hidden\t".
+
+ /// ProtectedDirective - This directive, if non-null, is used to declare a
+ /// global or function as having protected visibility.
+ const char *ProtectedDirective; // Defaults to "\t.protected\t".
+
//===--- Dwarf Emission Directives -----------------------------------===//
+ /// AbsoluteDebugSectionOffsets - True if we should emit abolute section
+ /// offsets for debug information. Defaults to false.
+ bool AbsoluteDebugSectionOffsets;
+
+ /// AbsoluteEHSectionOffsets - True if we should emit abolute section
+ /// offsets for EH information. Defaults to false.
+ bool AbsoluteEHSectionOffsets;
+
/// HasLEB128 - True if target asm supports leb128 directives.
///
bool HasLEB128; // Defaults to false.
/// HasDotFile - True if target asm supports .file directives.
///
bool HasDotFile; // Defaults to false.
+
+ /// SupportsDebugInformation - True if target supports emission of debugging
+ /// information.
+ bool SupportsDebugInformation;
+
+ /// SupportsExceptionHandling - True if target supports
+ /// exception handling.
+ ///
+ bool SupportsExceptionHandling; // Defaults to false.
/// RequiresFrameSection - true if the Dwarf2 output needs a frame section
///
bool DwarfRequiresFrameSection; // Defaults to true.
+ /// DwarfSectionOffsetDirective - Special section offset directive.
+ const char* DwarfSectionOffsetDirective; // Defaults to NULL
+
/// DwarfAbbrevSection - Section directive for Dwarf abbrev.
///
const char *DwarfAbbrevSection; // Defaults to ".debug_abbrev".
/// DwarfMacInfoSection - Section directive for Dwarf info.
///
const char *DwarfMacInfoSection; // Defaults to ".debug_macinfo".
+
+ /// DwarfEHFrameSection - Section directive for Exception frames.
+ ///
+ const char *DwarfEHFrameSection; // Defaults to ".eh_frame".
+
+ /// DwarfExceptionSection - Section directive for Exception table.
+ ///
+ const char *DwarfExceptionSection; // Defaults to ".gcc_except_table".
+
//===--- CBE Asm Translation Table -----------------------------------===//
/// Measure the specified inline asm to determine an approximation of its
/// length.
- unsigned getInlineAsmLength(const char *Str) const;
+ virtual unsigned getInlineAsmLength(const char *Str) const;
/// ExpandInlineAsm - This hook allows the target to expand an inline asm
/// call to be explicit llvm code if it wants to. This is useful for
const char *getDataSection() const {
return DataSection;
}
+ const char *getBSSSection() const {
+ return BSSSection;
+ }
+ const char *getTLSDataSection() const {
+ return TLSDataSection;
+ }
+ const char *getTLSBSSSection() const {
+ return TLSBSSSection;
+ }
+ const char *getZeroFillDirective() const {
+ return ZeroFillDirective;
+ }
unsigned getAddressSize() const {
return AddressSize;
}
bool needsSet() const {
return NeedsSet;
}
+ const char *getPCSymbol() const {
+ return PCSymbol;
+ }
+ char getSeparatorChar() const {
+ return SeparatorChar;
+ }
const char *getCommentString() const {
return CommentString;
}
const char *getPrivateGlobalPrefix() const {
return PrivateGlobalPrefix;
}
+ const char *getJumpTableSpecialLabelPrefix() const {
+ return JumpTableSpecialLabelPrefix;
+ }
const char *getGlobalVarAddrPrefix() const {
return GlobalVarAddrPrefix;
}
const char *getFunctionAddrSuffix() const {
return FunctionAddrSuffix;
}
+ const char *getPersonalityPrefix() const {
+ return PersonalityPrefix;
+ }
+ const char *getPersonalitySuffix() const {
+ return PersonalitySuffix;
+ }
const char *getInlineAsmStart() const {
return InlineAsmStart;
}
const char *getInlineAsmEnd() const {
return InlineAsmEnd;
}
+ unsigned getAssemblerDialect() const {
+ return AssemblerDialect;
+ }
const char *getZeroDirective() const {
return ZeroDirective;
}
const char *getSixteenByteConstantSection() const {
return SixteenByteConstantSection;
}
+ const char *getReadOnlySection() const {
+ return ReadOnlySection;
+ }
+ const char *getGlobalDirective() const {
+ return GlobalDirective;
+ }
const char *getSetDirective() const {
return SetDirective;
}
const char *getWeakRefDirective() const {
return WeakRefDirective;
}
+ const char *getHiddenDirective() const {
+ return HiddenDirective;
+ }
+ const char *getProtectedDirective() const {
+ return ProtectedDirective;
+ }
+ bool isAbsoluteDebugSectionOffsets() const {
+ return AbsoluteDebugSectionOffsets;
+ }
+ bool isAbsoluteEHSectionOffsets() const {
+ return AbsoluteEHSectionOffsets;
+ }
bool hasLEB128() const {
return HasLEB128;
}
bool hasDotFile() const {
return HasDotFile;
}
- bool getDwarfRequiresFrameSection() const {
+ bool doesSupportDebugInformation() const {
+ return SupportsDebugInformation;
+ }
+ bool doesSupportExceptionHandling() const {
+ return SupportsExceptionHandling;
+ }
+ bool doesDwarfRequireFrameSection() const {
return DwarfRequiresFrameSection;
}
+ const char *getDwarfSectionOffsetDirective() const {
+ return DwarfSectionOffsetDirective;
+ }
const char *getDwarfAbbrevSection() const {
return DwarfAbbrevSection;
}
const char *getDwarfMacInfoSection() const {
return DwarfMacInfoSection;
}
+ const char *getDwarfEHFrameSection() const {
+ return DwarfEHFrameSection;
+ }
+ const char *getDwarfExceptionSection() const {
+ return DwarfExceptionSection;
+ }
const char** getAsmCBE() const {
return AsmTransCBE;
}