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