LLVM  8.0.1
NVPTXMCAsmInfo.cpp
Go to the documentation of this file.
1 //===-- NVPTXMCAsmInfo.cpp - NVPTX asm properties -------------------------===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file contains the declarations of the NVPTXMCAsmInfo properties.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #include "NVPTXMCAsmInfo.h"
15 #include "llvm/ADT/Triple.h"
16 
17 using namespace llvm;
18 
19 void NVPTXMCAsmInfo::anchor() {}
20 
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.
35  HasFunctionAlignment = false;
37  // PTX does not allow .hidden or .protected
40 
41  // FIXME: remove comment once debug info is properly supported.
42  Data8bitsDirective = "// .b8 ";
43  Data16bitsDirective = nullptr; // not supported
44  Data32bitsDirective = "// .b32 ";
45  Data64bitsDirective = "// .b64 ";
46  ZeroDirective = "// .b8";
47  AsciiDirective = nullptr; // not supported
48  AscizDirective = nullptr; // not supported
49  SupportsQuotedNames = false;
51 
52  // @TODO: Can we just disable this?
53  WeakDirective = "\t// .weak\t";
54  GlobalDirective = "\t// .globl\t";
55 }
bool HasSingleParameterDotFile
True if the target has a single parameter .file directive, this is true for ELF targets.
Definition: MCAsmInfo.h:283
const char * WeakDirective
Used to declare a global as being a weak symbol. Defaults to ".weak".
Definition: MCAsmInfo.h:298
This class represents lattice values for constants.
Definition: AllocatorList.h:24
Not a valid directive.
Definition: MCDirectives.h:20
const char * Data64bitsDirective
Definition: MCAsmInfo.h:193
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:174
bool SupportsQuotedNames
If this is true, symbol names with invalid characters will be printed in quotes.
Definition: MCAsmInfo.h:161
const char * GlobalDirective
This is the directive used to declare a global entity.
Definition: MCAsmInfo.h:241
unsigned CalleeSaveStackSlotSize
Size of the stack slot reserved for callee-saved registers, in bytes.
Definition: MCAsmInfo.h:67
bool HasDotTypeDotSizeDirective
True if the target has .type and .size directives, this is true for most ELF targets.
Definition: MCAsmInfo.h:279
const char * AsciiDirective
This directive allows emission of an ascii string with the standard C escape characters embedded into...
Definition: MCAsmInfo.h:179
StringRef CommentString
This indicates the comment character used by the assembler.
Definition: MCAsmInfo.h:114
const char * Data8bitsDirective
These directives are used to output some unit of integer data to the current section.
Definition: MCAsmInfo.h:190
bool HasFunctionAlignment
Definition: MCAsmInfo.h:275
MCSymbolAttr HiddenVisibilityAttr
This attribute, if not MCSA_Invalid, is used to declare a symbol as having hidden visibility...
Definition: MCAsmInfo.h:318
ArchType getArch() const
getArch - Get the parsed architecture type of this triple.
Definition: Triple.h:290
const char * AscizDirective
If not null, this allows for special handling of zero terminated strings on this target.
Definition: MCAsmInfo.h:184
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:142
bool SupportsDebugInformation
True if target supports emission of debugging information.
Definition: MCAsmInfo.h:332
const char * Data16bitsDirective
Definition: MCAsmInfo.h:191
Triple - Helper class for working with autoconf configuration names.
Definition: Triple.h:44
const char * InlineAsmEnd
Definition: MCAsmInfo.h:143
const char * Data32bitsDirective
Definition: MCAsmInfo.h:192
unsigned CodePointerSize
Code pointer size in bytes. Default is 4.
Definition: MCAsmInfo.h:63
bool SupportsExtendedDwarfLocDirective
True if the target supports flags in ".loc" directive, false if only location is allowed.
Definition: MCAsmInfo.h:358
MCSymbolAttr ProtectedVisibilityAttr
This attribute, if not MCSA_Invalid, is used to declare a symbol as having protected visibility...
Definition: MCAsmInfo.h:326
MCSymbolAttr HiddenDeclarationVisibilityAttr
This attribute, if not MCSA_Invalid, is used to declare an undefined symbol as having hidden visibili...
Definition: MCAsmInfo.h:322