LLVM  14.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 
10 #include "llvm/ADT/StringExtras.h"
12 
13 using namespace llvm;
14 
15 namespace llvm {
17 }
18 
19 void MCAsmInfoXCOFF::anchor() {}
20 
22  IsLittleEndian = false;
25  HasFourStringsDotFile = true;
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 
55  UseIntegratedAssembler = false;
58 
60 }
61 
63  // QualName is allowed for a MCSymbolXCOFF, and
64  // QualName contains '[' and ']'.
65  if (C == '[' || C == ']')
66  return true;
67 
68  // For AIX assembler, symbols may consist of numeric digits,
69  // underscores, periods, uppercase or lowercase letters, or
70  // any combination of these.
71  return isAlnum(C) || C == '_' || C == '.';
72 }
llvm::MCAsmInfo::HasVisibilityOnlyWithLinkage
bool HasVisibilityOnlyWithLinkage
True if this is an XCOFF target that supports visibility attributes as part of .global,...
Definition: MCAsmInfo.h:107
llvm
---------------------— PointerInfo ------------------------------------—
Definition: AllocatorList.h:23
llvm::MCAsmInfo::HasPairedDoubleQuoteStringConstants
bool HasPairedDoubleQuoteStringConstants
True if the target represents string constants as mostly raw characters in paired double quotation wi...
Definition: MCAsmInfo.h:379
llvm::MCAsmInfoXCOFF::isAcceptableChar
bool isAcceptableChar(char C) const override
Return true if C is an acceptable character inside a symbol name.
Definition: MCAsmInfoXCOFF.cpp:62
llvm::MCAsmInfo::UseDotAlignForAlignment
bool UseDotAlignForAlignment
True if .align is to be used for alignment.
Definition: MCAsmInfo.h:238
llvm::LCOMM::Log2Alignment
@ Log2Alignment
Definition: MCAsmInfo.h:50
llvm::MCAsmInfo::ParseInlineAsmUsingAsmParser
bool ParseInlineAsmUsingAsmParser
Use AsmParser to parse inlineAsm when UseIntegratedAssembler is not set.
Definition: MCAsmInfo.h:505
llvm::MCAsmInfo::PrivateLabelPrefix
StringRef PrivateLabelPrefix
This prefix is used for labels for basic blocks.
Definition: MCAsmInfo.h:172
llvm::MCAsmInfo::HasFourStringsDotFile
bool HasFourStringsDotFile
True if the target has a four strings .file directive, strings seperated by comma.
Definition: MCAsmInfo.h:395
llvm::MCAsmInfo::Data32bitsDirective
const char * Data32bitsDirective
Definition: MCAsmInfo.h:287
MCAsmInfoXCOFF.h
llvm::ExceptionHandling::AIX
@ AIX
AIX Exception Handling.
llvm::MCAsmInfo::CharacterLiteralSyntax
AsmCharLiteralSyntax CharacterLiteralSyntax
Form used for character literals in the assembly syntax.
Definition: MCAsmInfo.h:279
CommandLine.h
llvm::MCAsmInfo::PrivateGlobalPrefix
StringRef PrivateGlobalPrefix
This prefix is used for globals like constant pool entries that are completely private to the ....
Definition: MCAsmInfo.h:168
llvm::MCAsmInfo::DwarfSectionSizeRequired
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:471
llvm::MCAsmInfo::ByteListDirective
const char * ByteListDirective
This directive accepts a comma-separated list of bytes for emission as a string of bytes.
Definition: MCAsmInfo.h:269
C
(vector float) vec_cmpeq(*A, *B) C
Definition: README_ALTIVEC.txt:86
llvm::MCAsmInfo::ACLS_SingleQuotePrefix
@ ACLS_SingleQuotePrefix
Unknown; character literals not used by LLVM for this target.
Definition: MCAsmInfo.h:62
llvm::MCAsmInfo::ZeroDirectiveSupportsNonZeroValue
bool ZeroDirectiveSupportsNonZeroValue
This should be set to true if the zero directive supports a value to emit other than zero.
Definition: MCAsmInfo.h:254
llvm::MCAsmInfo::UseIntegratedAssembler
bool UseIntegratedAssembler
Should we use the integrated assembler? The integrated assembler should be enabled by default (by the...
Definition: MCAsmInfo.h:502
llvm::MCAsmInfo::HasDotTypeDotSizeDirective
bool HasDotTypeDotSizeDirective
True if the target has .type and .size directives, this is true for most ELF targets.
Definition: MCAsmInfo.h:387
llvm::MCAsmInfoXCOFF::MCAsmInfoXCOFF
MCAsmInfoXCOFF()
Definition: MCAsmInfoXCOFF.cpp:21
llvm::cl::opt
Definition: CommandLine.h:1434
llvm::MCAsmInfo::UsesDwarfFileAndLocDirectives
bool UsesDwarfFileAndLocDirectives
True if the target supports generating the DWARF line table through using the .loc/....
Definition: MCAsmInfo.h:467
llvm::cl::BOU_UNSET
@ BOU_UNSET
Definition: CommandLine.h:625
llvm::MCAsmInfo::COMMDirectiveAlignmentIsInBytes
bool COMMDirectiveAlignmentIsInBytes
True is .comm's and .lcomms optional alignment is to be specified in bytes instead of log2(n).
Definition: MCAsmInfo.h:365
StringExtras.h
llvm::MCAsmInfo::ZeroDirective
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:249
llvm::MCAsmInfo::Data16bitsDirective
const char * Data16bitsDirective
Definition: MCAsmInfo.h:286
llvm::MCAsmInfo::HasBasenameOnlyForFileDirective
bool HasBasenameOnlyForFileDirective
True if the target only has basename for .file directive.
Definition: MCAsmInfo.h:373
llvm::MCAsmInfo::AscizDirective
const char * AscizDirective
If not null, this allows for special handling of zero terminated strings on this target.
Definition: MCAsmInfo.h:264
llvm::MCAsmInfo::NeedsFunctionDescriptors
bool NeedsFunctionDescriptors
Definition: MCAsmInfo.h:529
llvm::UseLEB128Directives
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))
Definition: MCAsmInfoXCOFF.cpp:16
llvm::MCAsmInfo::LCOMMDirectiveAlignmentType
LCOMM::LCOMMType LCOMMDirectiveAlignmentType
Describes if the .lcomm directive for the target supports an alignment argument and how it is interpr...
Definition: MCAsmInfo.h:369
llvm::MCAsmInfo::ExceptionsType
ExceptionHandling ExceptionsType
Exception handling format for the target. Defaults to None.
Definition: MCAsmInfo.h:448
llvm::MCAsmInfo::AsciiDirective
const char * AsciiDirective
This directive allows emission of an ascii string with the standard C escape characters embedded into...
Definition: MCAsmInfo.h:259
llvm::MCAsmInfo::HasLEB128Directives
bool HasLEB128Directives
True if the target supports LEB128 directives.
Definition: MCAsmInfo.h:241
llvm::MCAsmInfo::IsLittleEndian
bool IsLittleEndian
True if target is little endian. Default is true.
Definition: MCAsmInfo.h:79
llvm::MCAsmInfo::SupportsQuotedNames
bool SupportsQuotedNames
If this is true, symbol names with invalid characters will be printed in quotes.
Definition: MCAsmInfo.h:229
llvm::MCAsmInfo::PlainStringDirective
const char * PlainStringDirective
This directive allows emission of a zero-terminated ascii string without the standard C escape charac...
Definition: MCAsmInfo.h:274