1 //===-- TargetAsmInfo.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/Target/TargetAsmInfo.h"
20 TargetAsmInfo::TargetAsmInfo() {
21 ZeroFillDirective
= 0;
22 NonexecutableStackDirective
= 0;
29 FirstOperandColumn
= 0;
32 PrivateGlobalPrefix
= ".";
33 LinkerPrivateGlobalPrefix
= "";
34 JumpTableSpecialLabelPrefix
= 0;
35 GlobalVarAddrPrefix
= "";
36 GlobalVarAddrSuffix
= "";
37 FunctionAddrPrefix
= "";
38 FunctionAddrSuffix
= "";
39 PersonalityPrefix
= "";
40 PersonalitySuffix
= "";
41 NeedsIndirectEncoding
= false;
42 InlineAsmStart
= "#APP";
43 InlineAsmEnd
= "#NO_APP";
45 AllowQuotesInName
= false;
46 ZeroDirective
= "\t.zero\t";
47 ZeroDirectiveSuffix
= 0;
48 AsciiDirective
= "\t.ascii\t";
49 AscizDirective
= "\t.asciz\t";
50 Data8bitsDirective
= "\t.byte\t";
51 Data16bitsDirective
= "\t.short\t";
52 Data32bitsDirective
= "\t.long\t";
53 Data64bitsDirective
= "\t.quad\t";
54 AlignDirective
= "\t.align\t";
55 AlignmentIsInBytes
= true;
56 TextAlignFillValue
= 0;
57 SwitchToSectionDirective
= "\t.section\t";
58 TextSectionStartSuffix
= "";
59 DataSectionStartSuffix
= "";
60 JumpTableDirective
= 0;
61 GlobalDirective
= "\t.globl\t";
64 COMMDirective
= "\t.comm\t";
65 COMMDirectiveTakesAlignment
= true;
66 HasDotTypeDotSizeDirective
= true;
67 HasSingleParameterDotFile
= true;
71 // FIXME: These are ELFish - move to ELFTAI.
72 HiddenDirective
= "\t.hidden\t";
73 ProtectedDirective
= "\t.protected\t";
74 AbsoluteDebugSectionOffsets
= false;
75 AbsoluteEHSectionOffsets
= false;
77 HasDotLocAndDotFile
= false;
78 SupportsDebugInformation
= false;
79 SupportsExceptionHandling
= false;
80 DwarfRequiresFrameSection
= true;
81 DwarfUsesInlineInfoSection
= false;
82 Is_EHSymbolPrivate
= true;
83 GlobalEHDirective
= 0;
84 SupportsWeakOmittedEHFrame
= true;
85 DwarfSectionOffsetDirective
= 0;
90 TargetAsmInfo::~TargetAsmInfo() {
94 unsigned TargetAsmInfo::getULEB128Size(unsigned Value
) {
98 Size
+= sizeof(int8_t);
103 unsigned TargetAsmInfo::getSLEB128Size(int Value
) {
105 int Sign
= Value
>> (8 * sizeof(Value
) - 1);
109 unsigned Byte
= Value
& 0x7f;
111 IsMore
= Value
!= Sign
|| ((Byte
^ Sign
) & 0x40) != 0;
112 Size
+= sizeof(int8_t);