LLVM 20.0.0git
NVPTXMCAsmInfo.cpp
Go to the documentation of this file.
1//===-- NVPTXMCAsmInfo.cpp - NVPTX asm properties -------------------------===//
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// This file contains the declarations of the NVPTXMCAsmInfo properties.
10//
11//===----------------------------------------------------------------------===//
12
13#include "NVPTXMCAsmInfo.h"
15
16using namespace llvm;
17
18void NVPTXMCAsmInfo::anchor() {}
19
21 const MCTargetOptions &Options) {
22 if (TheTriple.getArch() == Triple::nvptx64) {
24 }
25
26 CommentString = "//";
27
29
30 InlineAsmStart = " begin inline asm";
31 InlineAsmEnd = " end inline asm";
32
34 // PTX does not allow .align on functions.
37 // PTX does not allow .hidden or .protected
40
41 Data8bitsDirective = ".b8 ";
42 Data16bitsDirective = nullptr; // not supported
43 Data32bitsDirective = ".b32 ";
44 Data64bitsDirective = ".b64 ";
45 ZeroDirective = ".b8";
46 AsciiDirective = nullptr; // not supported
47 AscizDirective = nullptr; // not supported
48 SupportsQuotedNames = false;
50 SupportsSignedData = false;
51
52 PrivateGlobalPrefix = "$L__";
54
55 // @TODO: Can we just disable this?
56 WeakDirective = "\t// .weak\t";
57 GlobalDirective = "\t// .globl\t";
58
60
61 // Avoid using parens for identifiers starting with $ - ptxas does
62 // not expect them.
64
65 // ptxas does not support DWARF `.file fileno directory filename'
66 // syntax as of v11.X.
68}
static LVOptions Options
Definition: LVOptions.cpp:25
const char * Data16bitsDirective
Definition: MCAsmInfo.h:281
MCSymbolAttr ProtectedVisibilityAttr
This attribute, if not MCSA_Invalid, is used to declare a symbol as having protected visibility.
Definition: MCAsmInfo.h:415
bool HasFunctionAlignment
Definition: MCAsmInfo.h:363
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 * Data8bitsDirective
These directives are used to output some unit of integer data to the current section.
Definition: MCAsmInfo.h:280
const char * Data64bitsDirective
Definition: MCAsmInfo.h:283
StringRef PrivateGlobalPrefix
This prefix is used for globals like constant pool entries that are completely private to the ....
Definition: MCAsmInfo.h:160
const char * Data32bitsDirective
Definition: MCAsmInfo.h:282
bool UseIntegratedAssembler
Should we use the integrated assembler? The integrated assembler should be enabled by default (by the...
Definition: MCAsmInfo.h:488
const char * GlobalDirective
This is the directive used to declare a global entity.
Definition: MCAsmInfo.h:334
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
const char * InlineAsmStart
If these are nonempty, they contain a directive to emit before and after an inline assembly statement...
Definition: MCAsmInfo.h:174
bool EnableDwarfFileDirectoryDefault
True if DWARF ‘.file directory’ directive syntax is used by default.
Definition: MCAsmInfo.h:449
bool SupportsDebugInformation
True if target supports emission of debugging information.
Definition: MCAsmInfo.h:423
const char * InlineAsmEnd
Definition: MCAsmInfo.h:175
bool SupportsSignedData
True if data directives support signed values.
Definition: MCAsmInfo.h:286
MCSymbolAttr HiddenDeclarationVisibilityAttr
This attribute, if not MCSA_Invalid, is used to declare an undefined symbol as having hidden visibili...
Definition: MCAsmInfo.h:411
bool UseParensForDollarSignNames
True if the target uses parens for symbol names starting with '$' character to distinguish them from ...
Definition: MCAsmInfo.h:465
bool HasSingleParameterDotFile
True if the target has a single parameter .file directive, this is true for ELF targets.
Definition: MCAsmInfo.h:371
bool SupportsExtendedDwarfLocDirective
True if the target supports flags in ".loc" directive, false if only location is allowed.
Definition: MCAsmInfo.h:469
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
unsigned CodePointerSize
Code pointer size in bytes. Default is 4.
Definition: MCAsmInfo.h:72
unsigned CalleeSaveStackSlotSize
Size of the stack slot reserved for callee-saved registers, in bytes.
Definition: MCAsmInfo.h:76
MCSymbolAttr HiddenVisibilityAttr
This attribute, if not MCSA_Invalid, is used to declare a symbol as having hidden visibility.
Definition: MCAsmInfo.h:403
StringRef CommentString
This indicates the comment string used by the assembler.
Definition: MCAsmInfo.h:127
const char * WeakDirective
Used to declare a global as being a weak symbol. Defaults to ".weak".
Definition: MCAsmInfo.h:386
NVPTXMCAsmInfo(const Triple &TheTriple, const MCTargetOptions &Options)
Triple - Helper class for working with autoconf configuration names.
Definition: Triple.h:44
ArchType getArch() const
Get the parsed architecture type of this triple.
Definition: Triple.h:373
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
@ MCSA_Invalid
Not a valid directive.
Definition: MCDirectives.h:19