Mercurial > hg > CbC > CbC_llvm
comparison lib/MC/MCAsmInfo.cpp @ 77:54457678186b LLVM3.6
LLVM 3.6
author | Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 08 Sep 2014 22:06:00 +0900 |
parents | e4204d083e25 |
children | 60c9769439b8 |
comparison
equal
deleted
inserted
replaced
34:e874dbf0ad9d | 77:54457678186b |
---|---|
35 LinkerRequiresNonEmptyDwarfLines = false; | 35 LinkerRequiresNonEmptyDwarfLines = false; |
36 MaxInstLength = 4; | 36 MaxInstLength = 4; |
37 MinInstAlignment = 1; | 37 MinInstAlignment = 1; |
38 DollarIsPC = false; | 38 DollarIsPC = false; |
39 SeparatorString = ";"; | 39 SeparatorString = ";"; |
40 CommentColumn = 40; | |
41 CommentString = "#"; | 40 CommentString = "#"; |
42 LabelSuffix = ":"; | 41 LabelSuffix = ":"; |
43 DebugLabelSuffix = ":"; | 42 UseAssignmentForEHBegin = false; |
44 GlobalPrefix = '\0'; | |
45 PrivateGlobalPrefix = "L"; | 43 PrivateGlobalPrefix = "L"; |
46 LinkerPrivateGlobalPrefix = ""; | 44 LinkerPrivateGlobalPrefix = ""; |
47 InlineAsmStart = "APP"; | 45 InlineAsmStart = "APP"; |
48 InlineAsmEnd = "NO_APP"; | 46 InlineAsmEnd = "NO_APP"; |
49 Code16Directive = ".code16"; | 47 Code16Directive = ".code16"; |
59 Data16bitsDirective = "\t.short\t"; | 57 Data16bitsDirective = "\t.short\t"; |
60 Data32bitsDirective = "\t.long\t"; | 58 Data32bitsDirective = "\t.long\t"; |
61 Data64bitsDirective = "\t.quad\t"; | 59 Data64bitsDirective = "\t.quad\t"; |
62 SunStyleELFSectionSwitchSyntax = false; | 60 SunStyleELFSectionSwitchSyntax = false; |
63 UsesELFSectionDirectiveForBSS = false; | 61 UsesELFSectionDirectiveForBSS = false; |
64 AlignDirective = "\t.align\t"; | |
65 AlignmentIsInBytes = true; | 62 AlignmentIsInBytes = true; |
66 TextAlignFillValue = 0; | 63 TextAlignFillValue = 0; |
67 GPRel64Directive = 0; | 64 GPRel64Directive = nullptr; |
68 GPRel32Directive = 0; | 65 GPRel32Directive = nullptr; |
69 GlobalDirective = "\t.globl\t"; | 66 GlobalDirective = "\t.globl\t"; |
70 HasSetDirective = true; | 67 HasSetDirective = true; |
71 HasAggressiveSymbolFolding = true; | 68 HasAggressiveSymbolFolding = true; |
72 COMMDirectiveAlignmentIsInBytes = true; | 69 COMMDirectiveAlignmentIsInBytes = true; |
73 LCOMMDirectiveAlignmentType = LCOMM::NoAlignment; | 70 LCOMMDirectiveAlignmentType = LCOMM::NoAlignment; |
74 HasDotTypeDotSizeDirective = true; | 71 HasDotTypeDotSizeDirective = true; |
75 HasSingleParameterDotFile = true; | 72 HasSingleParameterDotFile = true; |
76 HasIdentDirective = false; | 73 HasIdentDirective = false; |
77 HasNoDeadStrip = false; | 74 HasNoDeadStrip = false; |
78 WeakRefDirective = 0; | 75 WeakRefDirective = nullptr; |
79 HasWeakDefDirective = false; | 76 HasWeakDefDirective = false; |
80 HasWeakDefCanBeHiddenDirective = false; | 77 HasWeakDefCanBeHiddenDirective = false; |
81 HasLinkOnceDirective = false; | 78 HasLinkOnceDirective = false; |
82 HiddenVisibilityAttr = MCSA_Hidden; | 79 HiddenVisibilityAttr = MCSA_Hidden; |
83 HiddenDeclarationVisibilityAttr = MCSA_Hidden; | 80 HiddenDeclarationVisibilityAttr = MCSA_Hidden; |
84 ProtectedVisibilityAttr = MCSA_Protected; | 81 ProtectedVisibilityAttr = MCSA_Protected; |
85 HasLEB128 = false; | |
86 SupportsDebugInformation = false; | 82 SupportsDebugInformation = false; |
87 ExceptionsType = ExceptionHandling::None; | 83 ExceptionsType = ExceptionHandling::None; |
84 WinEHEncodingType = WinEH::EncodingType::Invalid; | |
88 DwarfUsesRelocationsAcrossSections = true; | 85 DwarfUsesRelocationsAcrossSections = true; |
86 DwarfFDESymbolsUseAbsDiff = false; | |
89 DwarfRegNumForCFI = false; | 87 DwarfRegNumForCFI = false; |
90 HasMicrosoftFastStdCallMangling = false; | |
91 NeedsDwarfSectionOffsetDirective = false; | 88 NeedsDwarfSectionOffsetDirective = false; |
92 UseParensForSymbolVariant = false; | 89 UseParensForSymbolVariant = false; |
90 | |
91 // FIXME: Clang's logic should be synced with the logic used to initialize | |
92 // this member and the two implementations should be merged. | |
93 // For reference: | |
94 // - Solaris always enables the integrated assembler by default | |
95 // - SparcELFMCAsmInfo and X86ELFMCAsmInfo are handling this case | |
96 // - Windows always enables the integrated assembler by default | |
97 // - MCAsmInfoCOFF is handling this case, should it be MCAsmInfoMicrosoft? | |
98 // - MachO targets always enables the integrated assembler by default | |
99 // - MCAsmInfoDarwin is handling this case | |
100 // - Generic_GCC toolchains enable the integrated assembler on a per | |
101 // architecture basis. | |
102 // - The target subclasses for AArch64, ARM, and X86 handle these cases | |
103 UseIntegratedAssembler = false; | |
104 | |
105 CompressDebugSections = false; | |
93 } | 106 } |
94 | 107 |
95 MCAsmInfo::~MCAsmInfo() { | 108 MCAsmInfo::~MCAsmInfo() { |
96 } | |
97 | |
98 | |
99 unsigned MCAsmInfo::getULEB128Size(uint64_t Value) { | |
100 unsigned Size = 0; | |
101 do { | |
102 Value >>= 7; | |
103 Size += sizeof(int8_t); | |
104 } while (Value); | |
105 return Size; | |
106 } | |
107 | |
108 unsigned MCAsmInfo::getSLEB128Size(int64_t Value) { | |
109 unsigned Size = 0; | |
110 int Sign = Value >> (8 * sizeof(Value) - 1); | |
111 bool IsMore; | |
112 | |
113 do { | |
114 unsigned Byte = Value & 0x7f; | |
115 Value >>= 7; | |
116 IsMore = Value != Sign || ((Byte ^ Sign) & 0x40) != 0; | |
117 Size += sizeof(int8_t); | |
118 } while (IsMore); | |
119 return Size; | |
120 } | 109 } |
121 | 110 |
122 const MCExpr * | 111 const MCExpr * |
123 MCAsmInfo::getExprForPersonalitySymbol(const MCSymbol *Sym, | 112 MCAsmInfo::getExprForPersonalitySymbol(const MCSymbol *Sym, |
124 unsigned Encoding, | 113 unsigned Encoding, |