10b57cec5SDimitry Andric //===- MC/MCAsmInfoXCOFF.cpp - XCOFF asm properties ------------ *- C++ -*-===// 20b57cec5SDimitry Andric // 30b57cec5SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 40b57cec5SDimitry Andric // See https://llvm.org/LICENSE.txt for license information. 50b57cec5SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 60b57cec5SDimitry Andric // 70b57cec5SDimitry Andric //===----------------------------------------------------------------------===// 80b57cec5SDimitry Andric 90b57cec5SDimitry Andric #include "llvm/MC/MCAsmInfoXCOFF.h" 10*5ffd83dbSDimitry Andric #include "llvm/ADT/StringExtras.h" 110b57cec5SDimitry Andric 120b57cec5SDimitry Andric using namespace llvm; 130b57cec5SDimitry Andric 140b57cec5SDimitry Andric void MCAsmInfoXCOFF::anchor() {} 150b57cec5SDimitry Andric 160b57cec5SDimitry Andric MCAsmInfoXCOFF::MCAsmInfoXCOFF() { 170b57cec5SDimitry Andric IsLittleEndian = false; 18*5ffd83dbSDimitry Andric HasVisibilityOnlyWithLinkage = true; 19*5ffd83dbSDimitry Andric PrivateGlobalPrefix = "L.."; 20*5ffd83dbSDimitry Andric PrivateLabelPrefix = "L.."; 21*5ffd83dbSDimitry Andric SupportsQuotedNames = false; 228bcb0991SDimitry Andric UseDotAlignForAlignment = true; 23*5ffd83dbSDimitry Andric ZeroDirective = "\t.space\t"; 24*5ffd83dbSDimitry Andric ZeroDirectiveSupportsNonZeroValue = false; 258bcb0991SDimitry Andric AsciiDirective = nullptr; // not supported 268bcb0991SDimitry Andric AscizDirective = nullptr; // not supported 27*5ffd83dbSDimitry Andric 28*5ffd83dbSDimitry Andric // Use .vbyte for data definition to avoid directives that apply an implicit 29*5ffd83dbSDimitry Andric // alignment. 30*5ffd83dbSDimitry Andric Data16bitsDirective = "\t.vbyte\t2, "; 31*5ffd83dbSDimitry Andric Data32bitsDirective = "\t.vbyte\t4, "; 32*5ffd83dbSDimitry Andric 33*5ffd83dbSDimitry Andric COMMDirectiveAlignmentIsInBytes = false; 34*5ffd83dbSDimitry Andric LCOMMDirectiveAlignmentType = LCOMM::Log2Alignment; 35*5ffd83dbSDimitry Andric HasDotTypeDotSizeDirective = false; 36*5ffd83dbSDimitry Andric UseIntegratedAssembler = false; 378bcb0991SDimitry Andric NeedsFunctionDescriptors = true; 388bcb0991SDimitry Andric } 398bcb0991SDimitry Andric 40480093f4SDimitry Andric bool MCAsmInfoXCOFF::isAcceptableChar(char C) const { 41480093f4SDimitry Andric // QualName is allowed for a MCSymbolXCOFF, and 42480093f4SDimitry Andric // QualName contains '[' and ']'. 43480093f4SDimitry Andric if (C == '[' || C == ']') 448bcb0991SDimitry Andric return true; 458bcb0991SDimitry Andric 46*5ffd83dbSDimitry Andric // For AIX assembler, symbols may consist of numeric digits, 47*5ffd83dbSDimitry Andric // underscores, periods, uppercase or lowercase letters, or 48*5ffd83dbSDimitry Andric // any combination of these. 49*5ffd83dbSDimitry Andric return isAlnum(C) || C == '_' || C == '.'; 500b57cec5SDimitry Andric } 51