1 //===-- MCAsmInfo.cpp - Asm Info -------------------------------------------==//
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 defines target asm properties related what form asm statements
13 //===----------------------------------------------------------------------===//
15 #include "llvm/MC/MCAsmInfo.h"
16 #include "llvm/Support/DataTypes.h"
21 MCAsmInfo::MCAsmInfo() {
22 HasSubsectionsViaSymbols
= false;
23 HasMachoZeroFillDirective
= false;
24 HasMachoTBSSDirective
= false;
25 HasStaticCtorDtorReferenceInStaticMode
= false;
26 LinkerRequiresNonEmptyDwarfLines
= false;
29 SeparatorString
= ";";
34 PrivateGlobalPrefix
= ".";
35 LinkerPrivateGlobalPrefix
= "";
36 InlineAsmStart
= "APP";
37 InlineAsmEnd
= "NO_APP";
39 AllowQuotesInName
= false;
40 AllowNameToStartWithDigit
= false;
41 AllowPeriodsInName
= true;
42 ZeroDirective
= "\t.zero\t";
43 AsciiDirective
= "\t.ascii\t";
44 AscizDirective
= "\t.asciz\t";
45 Data8bitsDirective
= "\t.byte\t";
46 Data16bitsDirective
= "\t.short\t";
47 Data32bitsDirective
= "\t.long\t";
48 Data64bitsDirective
= "\t.quad\t";
49 SunStyleELFSectionSwitchSyntax
= false;
50 UsesELFSectionDirectiveForBSS
= false;
51 AlignDirective
= "\t.align\t";
52 AlignmentIsInBytes
= true;
53 TextAlignFillValue
= 0;
55 GlobalDirective
= "\t.globl\t";
56 HasSetDirective
= true;
57 HasAggressiveSymbolFolding
= true;
58 HasLCOMMDirective
= false;
59 COMMDirectiveAlignmentIsInBytes
= true;
60 HasDotTypeDotSizeDirective
= true;
61 HasSingleParameterDotFile
= true;
62 HasNoDeadStrip
= false;
63 HasSymbolResolver
= false;
66 LinkOnceDirective
= 0;
67 HiddenVisibilityAttr
= MCSA_Hidden
;
68 HiddenDeclarationVisibilityAttr
= MCSA_Hidden
;
69 ProtectedVisibilityAttr
= MCSA_Protected
;
71 SupportsDebugInformation
= false;
72 ExceptionsType
= ExceptionHandling::None
;
73 DwarfRequiresFrameSection
= true;
74 DwarfUsesInlineInfoSection
= false;
75 DwarfUsesAbsoluteLabelForStmtList
= true;
76 DwarfSectionOffsetDirective
= 0;
77 DwarfUsesLabelOffsetForRanges
= true;
78 HasMicrosoftFastStdCallMangling
= false;
83 MCAsmInfo::~MCAsmInfo() {
87 unsigned MCAsmInfo::getULEB128Size(unsigned Value
) {
91 Size
+= sizeof(int8_t);
96 unsigned MCAsmInfo::getSLEB128Size(int Value
) {
98 int Sign
= Value
>> (8 * sizeof(Value
) - 1);
102 unsigned Byte
= Value
& 0x7f;
104 IsMore
= Value
!= Sign
|| ((Byte
^ Sign
) & 0x40) != 0;
105 Size
+= sizeof(int8_t);