blob: bf28dac6746ebd4a1d8afdd1b80f7dd420a11b80 [file] [log] [blame]
Sean Fertilef09d54e2019-07-09 19:21:01 +00001//===- MC/MCAsmInfoXCOFF.cpp - XCOFF asm properties ------------ *- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#include "llvm/MC/MCAsmInfoXCOFF.h"
10
11using namespace llvm;
12
13void MCAsmInfoXCOFF::anchor() {}
14
15MCAsmInfoXCOFF::MCAsmInfoXCOFF() {
16 IsLittleEndian = false;
jasonliuf5415f72020-06-03 16:23:12 +000017 PrivateGlobalPrefix = "L..";
18 PrivateLabelPrefix = "L..";
Hubert Tonga3515ab2020-04-30 20:44:04 -040019 SupportsQuotedNames = false;
Xing Xueef039a32019-08-25 15:17:25 +000020 UseDotAlignForAlignment = true;
Hubert Tonga3515ab2020-04-30 20:44:04 -040021 ZeroDirective = "\t.space\t";
22 ZeroDirectiveSupportsNonZeroValue = false;
Xing Xueef039a32019-08-25 15:17:25 +000023 AsciiDirective = nullptr; // not supported
24 AscizDirective = nullptr; // not supported
David Tentyd20fdca2020-06-03 10:54:56 -040025
26 // Use .vbyte for data definition to avoid directives that apply an implicit
27 // alignment.
28 Data16bitsDirective = "\t.vbyte\t2, ";
29 Data32bitsDirective = "\t.vbyte\t4, ";
30
Hubert Tonga3515ab2020-04-30 20:44:04 -040031 COMMDirectiveAlignmentIsInBytes = false;
32 LCOMMDirectiveAlignmentType = LCOMM::Log2Alignment;
33 HasDotTypeDotSizeDirective = false;
34 HasDotExternDirective = true;
35 HasDotLGloblDirective = true;
36 SymbolsHaveSMC = true;
37 UseIntegratedAssembler = false;
38 NeedsFunctionDescriptors = true;
Xiangling Liao3b808fb2019-09-26 19:38:32 +000039}
40
Jason Liu0dc05722019-11-08 09:26:28 -050041bool MCAsmInfoXCOFF::isAcceptableChar(char C) const {
42 // QualName is allowed for a MCSymbolXCOFF, and
43 // QualName contains '[' and ']'.
44 if (C == '[' || C == ']')
Xiangling Liao3b808fb2019-09-26 19:38:32 +000045 return true;
46
Jason Liu0dc05722019-11-08 09:26:28 -050047 return MCAsmInfo::isAcceptableChar(C);
Sean Fertilef09d54e2019-07-09 19:21:01 +000048}