blob: 04982af4af31be608ef35ae36e4b99a1c7adbb30 [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"
jasonliu6d3ae362020-07-06 14:18:06 +000010#include "llvm/ADT/StringExtras.h"
Sean Fertilef09d54e2019-07-09 19:21:01 +000011
12using namespace llvm;
13
14void MCAsmInfoXCOFF::anchor() {}
15
16MCAsmInfoXCOFF::MCAsmInfoXCOFF() {
17 IsLittleEndian = false;
diggerlinedd819c2020-06-09 16:15:06 -040018 HasVisibilityOnlyWithLinkage = true;
jasonliuf5415f72020-06-03 16:23:12 +000019 PrivateGlobalPrefix = "L..";
20 PrivateLabelPrefix = "L..";
Hubert Tonga3515ab2020-04-30 20:44:04 -040021 SupportsQuotedNames = false;
Xing Xueef039a32019-08-25 15:17:25 +000022 UseDotAlignForAlignment = true;
Hubert Tonga3515ab2020-04-30 20:44:04 -040023 ZeroDirective = "\t.space\t";
24 ZeroDirectiveSupportsNonZeroValue = false;
Xing Xueef039a32019-08-25 15:17:25 +000025 AsciiDirective = nullptr; // not supported
26 AscizDirective = nullptr; // not supported
Hubert Tong0a146a92020-09-29 21:11:16 -040027 ByteListDirective = "\t.byte\t";
28 CharacterLiteralSyntax = ACLS_SingleQuotePrefix;
David Tentyd20fdca2020-06-03 10:54:56 -040029
30 // Use .vbyte for data definition to avoid directives that apply an implicit
31 // alignment.
32 Data16bitsDirective = "\t.vbyte\t2, ";
33 Data32bitsDirective = "\t.vbyte\t4, ";
34
Hubert Tonga3515ab2020-04-30 20:44:04 -040035 COMMDirectiveAlignmentIsInBytes = false;
36 LCOMMDirectiveAlignmentType = LCOMM::Log2Alignment;
37 HasDotTypeDotSizeDirective = false;
Hubert Tonga3515ab2020-04-30 20:44:04 -040038 UseIntegratedAssembler = false;
39 NeedsFunctionDescriptors = true;
Xiangling Liao3b808fb2019-09-26 19:38:32 +000040}
41
Jason Liu0dc05722019-11-08 09:26:28 -050042bool MCAsmInfoXCOFF::isAcceptableChar(char C) const {
43 // QualName is allowed for a MCSymbolXCOFF, and
44 // QualName contains '[' and ']'.
45 if (C == '[' || C == ']')
Xiangling Liao3b808fb2019-09-26 19:38:32 +000046 return true;
47
jasonliu6d3ae362020-07-06 14:18:06 +000048 // For AIX assembler, symbols may consist of numeric digits,
49 // underscores, periods, uppercase or lowercase letters, or
50 // any combination of these.
51 return isAlnum(C) || C == '_' || C == '.';
Sean Fertilef09d54e2019-07-09 19:21:01 +000052}