[RISCV] Fix mgather -> riscv.masked.strided.load combine not extending indices (...
[llvm-project.git] / llvm / lib / MC / MCAsmInfoXCOFF.cpp
blobb07e95e45d551378a9c66109f4a13ffaa3245eca
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 //===----------------------------------------------------------------------===//
9 #include "llvm/MC/MCAsmInfoXCOFF.h"
10 #include "llvm/ADT/StringExtras.h"
11 #include "llvm/Support/CommandLine.h"
13 using namespace llvm;
15 namespace llvm {
16 extern cl::opt<cl::boolOrDefault> UseLEB128Directives;
19 void MCAsmInfoXCOFF::anchor() {}
21 MCAsmInfoXCOFF::MCAsmInfoXCOFF() {
22 IsLittleEndian = false;
23 HasVisibilityOnlyWithLinkage = true;
24 HasBasenameOnlyForFileDirective = false;
25 HasFourStringsDotFile = true;
27 // For XCOFF, string constant consists of any number of characters enclosed in
28 // "" (double quotation marks).
29 HasPairedDoubleQuoteStringConstants = true;
31 PrivateGlobalPrefix = "L..";
32 PrivateLabelPrefix = "L..";
33 SupportsQuotedNames = false;
34 UseDotAlignForAlignment = true;
35 UsesDwarfFileAndLocDirectives = false;
36 DwarfSectionSizeRequired = false;
37 if (UseLEB128Directives == cl::BOU_UNSET)
38 HasLEB128Directives = false;
39 ZeroDirective = "\t.space\t";
40 ZeroDirectiveSupportsNonZeroValue = false;
41 AsciiDirective = nullptr; // not supported
42 AscizDirective = nullptr; // not supported
43 ByteListDirective = "\t.byte\t";
44 PlainStringDirective = "\t.string\t";
45 CharacterLiteralSyntax = ACLS_SingleQuotePrefix;
47 // Use .vbyte for data definition to avoid directives that apply an implicit
48 // alignment.
49 Data16bitsDirective = "\t.vbyte\t2, ";
50 Data32bitsDirective = "\t.vbyte\t4, ";
52 COMMDirectiveAlignmentIsInBytes = false;
53 LCOMMDirectiveAlignmentType = LCOMM::Log2Alignment;
54 HasDotTypeDotSizeDirective = false;
55 ParseInlineAsmUsingAsmParser = true;
56 NeedsFunctionDescriptors = true;
58 ExceptionsType = ExceptionHandling::AIX;
61 bool MCAsmInfoXCOFF::isAcceptableChar(char C) const {
62 // QualName is allowed for a MCSymbolXCOFF, and
63 // QualName contains '[' and ']'.
64 if (C == '[' || C == ']')
65 return true;
67 // For AIX assembler, symbols may consist of numeric digits,
68 // underscores, periods, uppercase or lowercase letters, or
69 // any combination of these.
70 return isAlnum(C) || C == '_' || C == '.';