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;
30 PrivateGlobalPrefix = ".";
31 LinkerPrivateGlobalPrefix = "";
32 JumpTableSpecialLabelPrefix = 0;
33 GlobalVarAddrPrefix = "";
34 GlobalVarAddrSuffix = "";
35 FunctionAddrPrefix = "";
36 FunctionAddrSuffix = "";
37 PersonalityPrefix = "";
38 PersonalitySuffix = "";
39 NeedsIndirectEncoding = false;
40 InlineAsmStart = "#APP";
41 InlineAsmEnd = "#NO_APP";
43 AllowQuotesInName = false;
44 ZeroDirective = "\t.zero\t";
45 ZeroDirectiveSuffix = 0;
46 AsciiDirective = "\t.ascii\t";
47 AscizDirective = "\t.asciz\t";
48 Data8bitsDirective = "\t.byte\t";
49 Data16bitsDirective = "\t.short\t";
50 Data32bitsDirective = "\t.long\t";
51 Data64bitsDirective = "\t.quad\t";
52 SunStyleELFSectionSwitchSyntax = false;
53 AlignDirective = "\t.align\t";
54 AlignmentIsInBytes = true;
55 TextAlignFillValue = 0;
56 JumpTableDirective = 0;
57 GlobalDirective = "\t.globl\t";
60 COMMDirective = "\t.comm\t";
61 COMMDirectiveTakesAlignment = true;
62 HasDotTypeDotSizeDirective = true;
63 HasSingleParameterDotFile = true;
67 // FIXME: These are ELFish - move to ELFTAI.
68 HiddenDirective = "\t.hidden\t";
69 ProtectedDirective = "\t.protected\t";
70 AbsoluteDebugSectionOffsets = false;
71 AbsoluteEHSectionOffsets = false;
73 HasDotLocAndDotFile = false;
74 SupportsDebugInformation = false;
75 SupportsExceptionHandling = false;
76 DwarfRequiresFrameSection = true;
77 DwarfUsesInlineInfoSection = false;
78 Is_EHSymbolPrivate = true;
79 GlobalEHDirective = 0;
80 SupportsWeakOmittedEHFrame = true;
81 DwarfSectionOffsetDirective = 0;
86 TargetAsmInfo::~TargetAsmInfo() {
90 unsigned TargetAsmInfo::getULEB128Size(unsigned Value) {
94 Size += sizeof(int8_t);
99 unsigned TargetAsmInfo::getSLEB128Size(int Value) {
101 int Sign = Value >> (8 * sizeof(Value) - 1);
105 unsigned Byte = Value & 0x7f;
107 IsMore = Value != Sign || ((Byte ^ Sign) & 0x40) != 0;
108 Size += sizeof(int8_t);