blob: 1531f61da95e74a29dd7454425714a3cbe682b39 [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;
diggerlinedd819c2020-06-09 16:15:06 -040017 HasVisibilityOnlyWithLinkage = true;
jasonliuf5415f72020-06-03 16:23:12 +000018 PrivateGlobalPrefix = "L..";
19 PrivateLabelPrefix = "L..";
Hubert Tonga3515ab2020-04-30 20:44:04 -040020 SupportsQuotedNames = false;
Xing Xueef039a32019-08-25 15:17:25 +000021 UseDotAlignForAlignment = true;
Hubert Tonga3515ab2020-04-30 20:44:04 -040022 ZeroDirective = "\t.space\t";
23 ZeroDirectiveSupportsNonZeroValue = false;
Xing Xueef039a32019-08-25 15:17:25 +000024 AsciiDirective = nullptr; // not supported
25 AscizDirective = nullptr; // not supported
David Tentyd20fdca2020-06-03 10:54:56 -040026
27 // Use .vbyte for data definition to avoid directives that apply an implicit
28 // alignment.
29 Data16bitsDirective = "\t.vbyte\t2, ";
30 Data32bitsDirective = "\t.vbyte\t4, ";
31
Hubert Tonga3515ab2020-04-30 20:44:04 -040032 COMMDirectiveAlignmentIsInBytes = false;
33 LCOMMDirectiveAlignmentType = LCOMM::Log2Alignment;
34 HasDotTypeDotSizeDirective = false;
Hubert Tonga3515ab2020-04-30 20:44:04 -040035 SymbolsHaveSMC = true;
36 UseIntegratedAssembler = false;
37 NeedsFunctionDescriptors = true;
Xiangling Liao3b808fb2019-09-26 19:38:32 +000038}
39
Jason Liu0dc05722019-11-08 09:26:28 -050040bool MCAsmInfoXCOFF::isAcceptableChar(char C) const {
41 // QualName is allowed for a MCSymbolXCOFF, and
42 // QualName contains '[' and ']'.
43 if (C == '[' || C == ']')
Xiangling Liao3b808fb2019-09-26 19:38:32 +000044 return true;
45
Jason Liu0dc05722019-11-08 09:26:28 -050046 return MCAsmInfo::isAcceptableChar(C);
Sean Fertilef09d54e2019-07-09 19:21:01 +000047}