LLVM 22.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
19 const MCTargetOptions &Options) {
20 if (TheTriple.getArch() == Triple::nvptx64) {
22 }
23
24 CommentString = "//";
25
27
28 InlineAsmStart = " begin inline asm";
29 InlineAsmEnd = " end inline asm";
30
32 // PTX does not allow .align on functions.
35 // PTX does not allow .hidden or .protected
38
39 Data8bitsDirective = ".b8 ";
40 Data16bitsDirective = nullptr; // not supported
41 Data32bitsDirective = ".b32 ";
42 Data64bitsDirective = ".b64 ";
43 ZeroDirective = ".b8";
44 AsciiDirective = nullptr; // not supported
45 AscizDirective = nullptr; // not supported
46 SupportsQuotedNames = false;
48 SupportsSignedData = false;
49
50 PrivateGlobalPrefix = "$L__";
52
53 // @TODO: Can we just disable this?
54 WeakDirective = "\t// .weak\t";
55 GlobalDirective = "\t// .globl\t";
56
58
59 // ptxas does not support DWARF `.file fileno directory filename'
60 // syntax as of v11.X.
62}
static LVOptions Options
Definition: LVOptions.cpp:25
const char * Data16bitsDirective
Definition: MCAsmInfo.h:248
MCSymbolAttr ProtectedVisibilityAttr
This attribute, if not MCSA_Invalid, is used to declare a symbol as having protected visibility.
Definition: MCAsmInfo.h:350
bool HasFunctionAlignment
Definition: MCAsmInfo.h:302
const char * AsciiDirective
This directive allows emission of an ascii string with the standard C escape characters embedded into...
Definition: MCAsmInfo.h:231
const char * Data8bitsDirective
These directives are used to output some unit of integer data to the current section.
Definition: MCAsmInfo.h:247
const char * Data64bitsDirective
Definition: MCAsmInfo.h:250
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:249
bool UseIntegratedAssembler
Should we use the integrated assembler? The integrated assembler should be enabled by default (by the...
Definition: MCAsmInfo.h:412
const char * GlobalDirective
This is the directive used to declare a global entity.
Definition: MCAsmInfo.h:283
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:306
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:378
bool SupportsDebugInformation
True if target supports emission of debugging information.
Definition: MCAsmInfo.h:356
const char * InlineAsmEnd
Definition: MCAsmInfo.h:175
bool SupportsSignedData
True if data directives support signed values.
Definition: MCAsmInfo.h:253
MCSymbolAttr HiddenDeclarationVisibilityAttr
This attribute, if not MCSA_Invalid, is used to declare an undefined symbol as having hidden visibili...
Definition: MCAsmInfo.h:346
bool HasSingleParameterDotFile
True if the target has a single parameter .file directive, this is true for ELF targets.
Definition: MCAsmInfo.h:310
bool SupportsExtendedDwarfLocDirective
True if the target supports flags in ".loc" directive, false if only location is allowed.
Definition: MCAsmInfo.h:393
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:226
bool SupportsQuotedNames
If this is true, symbol names with invalid characters will be printed in quotes.
Definition: MCAsmInfo.h:207
const char * AscizDirective
If not null, this allows for special handling of zero terminated strings on this target.
Definition: MCAsmInfo.h:236
unsigned CodePointerSize
Code pointer size in bytes. Default is 4.
Definition: MCAsmInfo.h:87
unsigned CalleeSaveStackSlotSize
Size of the stack slot reserved for callee-saved registers, in bytes.
Definition: MCAsmInfo.h:91
MCSymbolAttr HiddenVisibilityAttr
This attribute, if not MCSA_Invalid, is used to declare a symbol as having hidden visibility.
Definition: MCAsmInfo.h:338
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:321
NVPTXMCAsmInfo(const Triple &TheTriple, const MCTargetOptions &Options)
Triple - Helper class for working with autoconf configuration names.
Definition: Triple.h:47
ArchType getArch() const
Get the parsed architecture type of this triple.
Definition: Triple.h:409
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
@ MCSA_Invalid
Not a valid directive.
Definition: MCDirectives.h:19