blob: 1d4d4ad8389823bf39b2afcf7f28b90686a1ee8b [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;
Hubert Tonga3515ab2020-04-30 20:44:04 -040017 SupportsQuotedNames = false;
Xing Xueef039a32019-08-25 15:17:25 +000018 UseDotAlignForAlignment = true;
Hubert Tonga3515ab2020-04-30 20:44:04 -040019 ZeroDirective = "\t.space\t";
20 ZeroDirectiveSupportsNonZeroValue = false;
Xing Xueef039a32019-08-25 15:17:25 +000021 AsciiDirective = nullptr; // not supported
22 AscizDirective = nullptr; // not supported
David Tentyd20fdca2020-06-03 10:54:56 -040023
24 // Use .vbyte for data definition to avoid directives that apply an implicit
25 // alignment.
26 Data16bitsDirective = "\t.vbyte\t2, ";
27 Data32bitsDirective = "\t.vbyte\t4, ";
28
Hubert Tonga3515ab2020-04-30 20:44:04 -040029 COMMDirectiveAlignmentIsInBytes = false;
30 LCOMMDirectiveAlignmentType = LCOMM::Log2Alignment;
31 HasDotTypeDotSizeDirective = false;
32 HasDotExternDirective = true;
33 HasDotLGloblDirective = true;
34 SymbolsHaveSMC = true;
35 UseIntegratedAssembler = false;
36 NeedsFunctionDescriptors = true;
Xiangling Liao3b808fb2019-09-26 19:38:32 +000037}
38
Jason Liu0dc05722019-11-08 09:26:28 -050039bool MCAsmInfoXCOFF::isAcceptableChar(char C) const {
40 // QualName is allowed for a MCSymbolXCOFF, and
41 // QualName contains '[' and ']'.
42 if (C == '[' || C == ']')
Xiangling Liao3b808fb2019-09-26 19:38:32 +000043 return true;
44
Jason Liu0dc05722019-11-08 09:26:28 -050045 return MCAsmInfo::isAcceptableChar(C);
Sean Fertilef09d54e2019-07-09 19:21:01 +000046}