LLVM 19.0.0git
Go to the documentation of this file.
1//===-- NVPTXMCAsmInfo.cpp - NVPTX asm properties -------------------------===//
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
9// This file contains the declarations of the NVPTXMCAsmInfo properties.
13#include "NVPTXMCAsmInfo.h"
16using namespace llvm;
18void NVPTXMCAsmInfo::anchor() {}
21 const MCTargetOptions &Options) {
22 if (TheTriple.getArch() == Triple::nvptx64) {
24 }
26 CommentString = "//";
30 InlineAsmStart = " begin inline asm";
31 InlineAsmEnd = " end inline asm";
34 // PTX does not allow .align on functions.
37 // PTX does not allow .hidden or .protected
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;
52 PrivateGlobalPrefix = "$L__";
55 // @TODO: Can we just disable this?
56 WeakDirective = "\t// .weak\t";
57 GlobalDirective = "\t// .globl\t";
61 // Avoid using parens for identifiers starting with $ - ptxas does
62 // not expect them.
65 // ptxas does not support DWARF `.file fileno directory filename'
66 // syntax as of v11.X.
static LVOptions Options
Definition: LVOptions.cpp:25
const char * Data16bitsDirective
Definition: MCAsmInfo.h:289
MCSymbolAttr ProtectedVisibilityAttr
This attribute, if not MCSA_Invalid, is used to declare a symbol as having protected visibility.
Definition: MCAsmInfo.h:446
bool HasFunctionAlignment
Definition: MCAsmInfo.h:386
const char * AsciiDirective
This directive allows emission of an ascii string with the standard C escape characters embedded into...
Definition: MCAsmInfo.h:262
const char * Data8bitsDirective
These directives are used to output some unit of integer data to the current section.
Definition: MCAsmInfo.h:288
const char * Data64bitsDirective
Definition: MCAsmInfo.h:291
StringRef PrivateGlobalPrefix
This prefix is used for globals like constant pool entries that are completely private to the ....
Definition: MCAsmInfo.h:168
const char * Data32bitsDirective
Definition: MCAsmInfo.h:290
bool UseIntegratedAssembler
Should we use the integrated assembler? The integrated assembler should be enabled by default (by the...
Definition: MCAsmInfo.h:519
const char * GlobalDirective
This is the directive used to declare a global entity.
Definition: MCAsmInfo.h:342
StringRef PrivateLabelPrefix
This prefix is used for labels for basic blocks.
Definition: MCAsmInfo.h:172
bool HasDotTypeDotSizeDirective
True if the target has .type and .size directives, this is true for most ELF targets.
Definition: MCAsmInfo.h:390
const char * InlineAsmStart
If these are nonempty, they contain a directive to emit before and after an inline assembly statement...
Definition: MCAsmInfo.h:182
bool EnableDwarfFileDirectoryDefault
True if DWARF ‘.file directory’ directive syntax is used by default.
Definition: MCAsmInfo.h:480
bool SupportsDebugInformation
True if target supports emission of debugging information.
Definition: MCAsmInfo.h:454
const char * InlineAsmEnd
Definition: MCAsmInfo.h:183
bool SupportsSignedData
True if data directives support signed values.
Definition: MCAsmInfo.h:294
MCSymbolAttr HiddenDeclarationVisibilityAttr
This attribute, if not MCSA_Invalid, is used to declare an undefined symbol as having hidden visibili...
Definition: MCAsmInfo.h:442
bool UseParensForDollarSignNames
True if the target uses parens for symbol names starting with '$' character to distinguish them from ...
Definition: MCAsmInfo.h:496
bool HasSingleParameterDotFile
True if the target has a single parameter .file directive, this is true for ELF targets.
Definition: MCAsmInfo.h:394
bool SupportsExtendedDwarfLocDirective
True if the target supports flags in ".loc" directive, false if only location is allowed.
Definition: MCAsmInfo.h:500
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:252
bool SupportsQuotedNames
If this is true, symbol names with invalid characters will be printed in quotes.
Definition: MCAsmInfo.h:229
const char * AscizDirective
If not null, this allows for special handling of zero terminated strings on this target.
Definition: MCAsmInfo.h:267
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:434
StringRef CommentString
This indicates the comment string used by the assembler.
Definition: MCAsmInfo.h:135
const char * WeakDirective
Used to declare a global as being a weak symbol. Defaults to ".weak".
Definition: MCAsmInfo.h:413
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