LLVM 20.0.0git
MCAsmInfoXCOFF.cpp
Go to the documentation of this file.
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
12
13using namespace llvm;
14
15namespace llvm {
17}
18
19void MCAsmInfoXCOFF::anchor() {}
20
22 IsLittleEndian = false;
26
27 // For XCOFF, string constant consists of any number of characters enclosed in
28 // "" (double quotation marks).
30
31 PrivateGlobalPrefix = "L..";
32 PrivateLabelPrefix = "L..";
33 SupportsQuotedNames = false;
38 HasLEB128Directives = false;
39 ZeroDirective = "\t.space\t";
41 AsciiDirective = nullptr; // not supported
42 AscizDirective = nullptr; // not supported
43 ByteListDirective = "\t.byte\t";
44 PlainStringDirective = "\t.string\t";
46
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, ";
51
57
59}
60
62 // QualName is allowed for a MCSymbolXCOFF, and
63 // QualName contains '[' and ']'.
64 if (C == '[' || C == ']')
65 return true;
66
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 == '.';
71}
This file contains some functions that are useful when dealing with strings.
bool isAcceptableChar(char C) const override
Return true if C is an acceptable character inside a symbol name.
const char * Data16bitsDirective
Definition: MCAsmInfo.h:281
const char * PlainStringDirective
This directive allows emission of a zero-terminated ascii string without the standard C escape charac...
Definition: MCAsmInfo.h:269
bool HasBasenameOnlyForFileDirective
True if the target only has basename for .file directive.
Definition: MCAsmInfo.h:353
const char * AsciiDirective
This directive allows emission of an ascii string with the standard C escape characters embedded into...
Definition: MCAsmInfo.h:254
const char * ByteListDirective
This directive accepts a comma-separated list of bytes for emission as a string of bytes.
Definition: MCAsmInfo.h:264
bool HasFourStringsDotFile
True if the target has a four strings .file directive, strings separated by comma.
Definition: MCAsmInfo.h:375
bool HasVisibilityOnlyWithLinkage
True if this is an XCOFF target that supports visibility attributes as part of .global,...
Definition: MCAsmInfo.h:99
bool UsesDwarfFileAndLocDirectives
True if the target supports generating the DWARF line table through using the .loc/....
Definition: MCAsmInfo.h:445
ExceptionHandling ExceptionsType
Exception handling format for the target. Defaults to None.
Definition: MCAsmInfo.h:426
StringRef PrivateGlobalPrefix
This prefix is used for globals like constant pool entries that are completely private to the ....
Definition: MCAsmInfo.h:160
bool UseDotAlignForAlignment
True if .align is to be used for alignment.
Definition: MCAsmInfo.h:230
const char * Data32bitsDirective
Definition: MCAsmInfo.h:282
LCOMM::LCOMMType LCOMMDirectiveAlignmentType
Describes if the .lcomm directive for the target supports an alignment argument and how it is interpr...
Definition: MCAsmInfo.h:349
StringRef PrivateLabelPrefix
This prefix is used for labels for basic blocks.
Definition: MCAsmInfo.h:164
bool HasDotTypeDotSizeDirective
True if the target has .type and .size directives, this is true for most ELF targets.
Definition: MCAsmInfo.h:367
bool ParseInlineAsmUsingAsmParser
Use AsmParser to parse inlineAsm when UseIntegratedAssembler is not set.
Definition: MCAsmInfo.h:491
bool DwarfSectionSizeRequired
True if the target needs the DWARF section length in the header (if any) of the DWARF section in the ...
Definition: MCAsmInfo.h:453
bool COMMDirectiveAlignmentIsInBytes
True is .comm's and .lcomms optional alignment is to be specified in bytes instead of log2(n).
Definition: MCAsmInfo.h:345
AsmCharLiteralSyntax CharacterLiteralSyntax
Form used for character literals in the assembly syntax.
Definition: MCAsmInfo.h:274
bool NeedsFunctionDescriptors
Definition: MCAsmInfo.h:511
bool ZeroDirectiveSupportsNonZeroValue
This should be set to true if the zero directive supports a value to emit other than zero.
Definition: MCAsmInfo.h:249
const char * ZeroDirective
This should be set to the directive used to get some number of zero (and non-zero if supported by the...
Definition: MCAsmInfo.h:244
bool SupportsQuotedNames
If this is true, symbol names with invalid characters will be printed in quotes.
Definition: MCAsmInfo.h:221
const char * AscizDirective
If not null, this allows for special handling of zero terminated strings on this target.
Definition: MCAsmInfo.h:259
bool IsLittleEndian
True if target is little endian. Default is true.
Definition: MCAsmInfo.h:79
@ ACLS_SingleQuotePrefix
Unknown; character literals not used by LLVM for this target.
Definition: MCAsmInfo.h:62
bool HasLEB128Directives
True if the target supports LEB128 directives.
Definition: MCAsmInfo.h:233
bool HasPairedDoubleQuoteStringConstants
True if the target represents string constants as mostly raw characters in paired double quotation wi...
Definition: MCAsmInfo.h:359
@ C
The default llvm calling convention, compatible with C.
Definition: CallingConv.h:34
@ Log2Alignment
Definition: MCAsmInfo.h:50
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
@ AIX
AIX Exception Handling.
cl::opt< cl::boolOrDefault > UseLEB128Directives("use-leb128-directives", cl::Hidden, cl::desc("Disable the usage of LEB128 directives, and generate .byte instead."), cl::init(cl::BOU_UNSET))