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/System/DataTypes.h"
21 MCAsmInfo::MCAsmInfo() {
22 HasSubsectionsViaSymbols = false;
23 HasMachoZeroFillDirective = false;
24 HasStaticCtorDtorReferenceInStaticMode = false;
32 PrivateGlobalPrefix = ".";
33 LinkerPrivateGlobalPrefix = "";
34 InlineAsmStart = "APP";
35 InlineAsmEnd = "NO_APP";
37 AllowQuotesInName = false;
38 AllowNameToStartWithDigit = false;
39 ZeroDirective = "\t.zero\t";
40 AsciiDirective = "\t.ascii\t";
41 AscizDirective = "\t.asciz\t";
42 Data8bitsDirective = "\t.byte\t";
43 Data16bitsDirective = "\t.short\t";
44 Data32bitsDirective = "\t.long\t";
45 Data64bitsDirective = "\t.quad\t";
46 SunStyleELFSectionSwitchSyntax = false;
47 UsesELFSectionDirectiveForBSS = false;
48 AlignDirective = "\t.align\t";
49 AlignmentIsInBytes = true;
50 TextAlignFillValue = 0;
51 JumpTableDirective = 0;
52 PICJumpTableDirective = 0;
53 GlobalDirective = "\t.globl\t";
56 COMMDirective = "\t.comm\t";
57 COMMDirectiveTakesAlignment = true;
58 HasDotTypeDotSizeDirective = true;
59 HasSingleParameterDotFile = true;
60 HasNoDeadStrip = false;
63 LinkOnceDirective = 0;
64 HiddenVisibilityAttr = MCSA_Hidden;
65 ProtectedVisibilityAttr = MCSA_Protected;
66 AbsoluteDebugSectionOffsets = false;
67 AbsoluteEHSectionOffsets = false;
69 HasDotLocAndDotFile = false;
70 SupportsDebugInformation = false;
71 ExceptionsType = ExceptionHandling::None;
72 DwarfRequiresFrameSection = true;
73 DwarfUsesInlineInfoSection = false;
74 Is_EHSymbolPrivate = true;
75 GlobalEHDirective = 0;
76 SupportsWeakOmittedEHFrame = true;
77 DwarfSectionOffsetDirective = 0;
82 MCAsmInfo::~MCAsmInfo() {
86 unsigned MCAsmInfo::getULEB128Size(unsigned Value) {
90 Size += sizeof(int8_t);
95 unsigned MCAsmInfo::getSLEB128Size(int Value) {
97 int Sign = Value >> (8 * sizeof(Value) - 1);
101 unsigned Byte = Value & 0x7f;
103 IsMore = Value != Sign || ((Byte ^ Sign) & 0x40) != 0;
104 Size += sizeof(int8_t);