1//===- 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#include "llvm/ADT/StringExtras.h"
11
12using namespace llvm;
13
14void MCAsmInfoXCOFF::anchor() {}
15
16MCAsmInfoXCOFF::MCAsmInfoXCOFF() {
17  IsLittleEndian = false;
18  HasVisibilityOnlyWithLinkage = true;
19  PrivateGlobalPrefix = "L..";
20  PrivateLabelPrefix = "L..";
21  SupportsQuotedNames = false;
22  UseDotAlignForAlignment = true;
23  ZeroDirective = "\t.space\t";
24  ZeroDirectiveSupportsNonZeroValue = false;
25  AsciiDirective = nullptr; // not supported
26  AscizDirective = nullptr; // not supported
27
28  // Use .vbyte for data definition to avoid directives that apply an implicit
29  // alignment.
30  Data16bitsDirective = "\t.vbyte\t2, ";
31  Data32bitsDirective = "\t.vbyte\t4, ";
32
33  COMMDirectiveAlignmentIsInBytes = false;
34  LCOMMDirectiveAlignmentType = LCOMM::Log2Alignment;
35  HasDotTypeDotSizeDirective = false;
36  UseIntegratedAssembler = false;
37  NeedsFunctionDescriptors = true;
38}
39
40bool MCAsmInfoXCOFF::isAcceptableChar(char C) const {
41  // QualName is allowed for a MCSymbolXCOFF, and
42  // QualName contains '[' and ']'.
43  if (C == '[' || C == ']')
44    return true;
45
46  // For AIX assembler, symbols may consist of numeric digits,
47  // underscores, periods, uppercase or lowercase letters, or
48  // any combination of these.
49  return isAlnum(C) || C == '_' || C == '.';
50}
51