LLVM  9.0.0svn
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 //===----------------------------------------------------------------------===//
13 #include "NVPTXMCAsmInfo.h"
14 #include "llvm/ADT/Triple.h"
16 using namespace llvm;
18 void NVPTXMCAsmInfo::anchor() {}
21  if (TheTriple.getArch() == Triple::nvptx64) {
23  }
25  CommentString = "//";
29  InlineAsmStart = " begin inline asm";
30  InlineAsmEnd = " end inline asm";
33  // PTX does not allow .align on functions.
34  HasFunctionAlignment = false;
36  // PTX does not allow .hidden or .protected
40  Data8bitsDirective = ".b8 ";
41  Data16bitsDirective = nullptr; // not supported
42  Data32bitsDirective = ".b32 ";
43  Data64bitsDirective = ".b64 ";
44  ZeroDirective = ".b8";
45  AsciiDirective = nullptr; // not supported
46  AscizDirective = nullptr; // not supported
47  SupportsQuotedNames = false;
50  // @TODO: Can we just disable this?
51  WeakDirective = "\t// .weak\t";
52  GlobalDirective = "\t// .globl\t";
53 }
bool HasSingleParameterDotFile
True if the target has a single parameter .file directive, this is true for ELF targets.
Definition: MCAsmInfo.h:282
const char * WeakDirective
Used to declare a global as being a weak symbol. Defaults to ".weak".
Definition: MCAsmInfo.h:297
This class represents lattice values for constants.
Definition: AllocatorList.h:23
Not a valid directive.
Definition: MCDirectives.h:19
const char * Data64bitsDirective
Definition: MCAsmInfo.h:192
const char * ZeroDirective
This should be set to the directive used to get some number of zero bytes emitted to the current sect...
Definition: MCAsmInfo.h:173
bool SupportsQuotedNames
If this is true, symbol names with invalid characters will be printed in quotes.
Definition: MCAsmInfo.h:160
const char * GlobalDirective
This is the directive used to declare a global entity.
Definition: MCAsmInfo.h:240
unsigned CalleeSaveStackSlotSize
Size of the stack slot reserved for callee-saved registers, in bytes.
Definition: MCAsmInfo.h:66
bool HasDotTypeDotSizeDirective
True if the target has .type and .size directives, this is true for most ELF targets.
Definition: MCAsmInfo.h:278
const char * AsciiDirective
This directive allows emission of an ascii string with the standard C escape characters embedded into...
Definition: MCAsmInfo.h:178
StringRef CommentString
This indicates the comment character used by the assembler.
Definition: MCAsmInfo.h:113
const char * Data8bitsDirective
These directives are used to output some unit of integer data to the current section.
Definition: MCAsmInfo.h:189
bool HasFunctionAlignment
Definition: MCAsmInfo.h:274
MCSymbolAttr HiddenVisibilityAttr
This attribute, if not MCSA_Invalid, is used to declare a symbol as having hidden visibility...
Definition: MCAsmInfo.h:317
ArchType getArch() const
getArch - Get the parsed architecture type of this triple.
Definition: Triple.h:289
const char * AscizDirective
If not null, this allows for special handling of zero terminated strings on this target.
Definition: MCAsmInfo.h:183
NVPTXMCAsmInfo(const Triple &TheTriple)
const char * InlineAsmStart
If these are nonempty, they contain a directive to emit before and after an inline assembly statement...
Definition: MCAsmInfo.h:141
bool SupportsDebugInformation
True if target supports emission of debugging information.
Definition: MCAsmInfo.h:331
const char * Data16bitsDirective
Definition: MCAsmInfo.h:190
Triple - Helper class for working with autoconf configuration names.
Definition: Triple.h:43
const char * InlineAsmEnd
Definition: MCAsmInfo.h:142
const char * Data32bitsDirective
Definition: MCAsmInfo.h:191
unsigned CodePointerSize
Code pointer size in bytes. Default is 4.
Definition: MCAsmInfo.h:62
bool SupportsExtendedDwarfLocDirective
True if the target supports flags in ".loc" directive, false if only location is allowed.
Definition: MCAsmInfo.h:357
MCSymbolAttr ProtectedVisibilityAttr
This attribute, if not MCSA_Invalid, is used to declare a symbol as having protected visibility...
Definition: MCAsmInfo.h:325
MCSymbolAttr HiddenDeclarationVisibilityAttr
This attribute, if not MCSA_Invalid, is used to declare an undefined symbol as having hidden visibili...
Definition: MCAsmInfo.h:321