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 HasMachoTBSSDirective = false;
25 HasStaticCtorDtorReferenceInStaticMode = false;
32 PrivateGlobalPrefix = ".";
33 LinkerPrivateGlobalPrefix = "";
34 InlineAsmStart = "APP";
35 InlineAsmEnd = "NO_APP";
37 AllowQuotesInName = false;
38 AllowNameToStartWithDigit = false;
39 AllowPeriodsInName = true;
40 ZeroDirective = "\t.zero\t";
41 AsciiDirective = "\t.ascii\t";
42 AscizDirective = "\t.asciz\t";
43 Data8bitsDirective = "\t.byte\t";
44 Data16bitsDirective = "\t.short\t";
45 Data32bitsDirective = "\t.long\t";
46 Data64bitsDirective = "\t.quad\t";
47 SunStyleELFSectionSwitchSyntax = false;
48 UsesELFSectionDirectiveForBSS = false;
49 AlignDirective = "\t.align\t";
50 AlignmentIsInBytes = true;
51 TextAlignFillValue = 0;
53 GlobalDirective = "\t.globl\t";
54 HasSetDirective = true;
55 HasLCOMMDirective = false;
56 COMMDirectiveAlignmentIsInBytes = true;
57 HasDotTypeDotSizeDirective = true;
58 HasSingleParameterDotFile = true;
59 HasNoDeadStrip = false;
62 LinkOnceDirective = 0;
63 HiddenVisibilityAttr = MCSA_Hidden;
64 ProtectedVisibilityAttr = MCSA_Protected;
66 HasDotLocAndDotFile = false;
67 SupportsDebugInformation = false;
68 ExceptionsType = ExceptionHandling::None;
69 DwarfRequiresFrameSection = true;
70 DwarfUsesInlineInfoSection = false;
71 DwarfSectionOffsetDirective = 0;
72 HasMicrosoftFastStdCallMangling = false;
77 MCAsmInfo::~MCAsmInfo() {
81 unsigned MCAsmInfo::getULEB128Size(unsigned Value) {
85 Size += sizeof(int8_t);
90 unsigned MCAsmInfo::getSLEB128Size(int Value) {
92 int Sign = Value >> (8 * sizeof(Value) - 1);
96 unsigned Byte = Value & 0x7f;
98 IsMore = Value != Sign || ((Byte ^ Sign) & 0x40) != 0;
99 Size += sizeof(int8_t);