LLVM API Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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"
17 
18 using namespace llvm;
19 
20 // -debug-compile - Command line option to inform opt and llc passes to
21 // compile for debugging
22 static cl::opt<bool> CompileForDebugging("debug-compile",
23  cl::desc("Compile for debugging"),
24  cl::Hidden, cl::init(false));
25 
26 void NVPTXMCAsmInfo::anchor() {}
27 
29  Triple TheTriple(TT);
30  if (TheTriple.getArch() == Triple::nvptx64) {
32  }
33 
34  CommentString = "//";
35 
36  PrivateGlobalPrefix = "$L__";
37 
38  HasSetDirective = false;
39 
41 
42  InlineAsmStart = " inline asm";
43  InlineAsmEnd = " inline asm";
44 
47 
48  Data8bitsDirective = " .b8 ";
49  Data16bitsDirective = " .b16 ";
50  Data32bitsDirective = " .b32 ";
51  Data64bitsDirective = " .b64 ";
53  ZeroDirective = " .b8";
54  AsciiDirective = " .b8";
55  AscizDirective = " .b8";
56 
57  // @TODO: Can we just disable this?
58  GlobalDirective = "\t// .globl\t";
59 }
bool HasSingleParameterDotFile
Definition: MCAsmInfo.h:255
const char * Data64bitsDirective
Definition: MCAsmInfo.h:179
const char * ZeroDirective
Definition: MCAsmInfo.h:162
const char * GlobalDirective
Definition: MCAsmInfo.h:229
unsigned CalleeSaveStackSlotSize
Definition: MCAsmInfo.h:55
static cl::opt< bool > CompileForDebugging("debug-compile", cl::desc("Compile for debugging"), cl::Hidden, cl::init(false))
bool HasDotTypeDotSizeDirective
Definition: MCAsmInfo.h:251
const char * AsciiDirective
Definition: MCAsmInfo.h:166
const char * PrivateGlobalPrefix
Definition: MCAsmInfo.h:125
const char * Data8bitsDirective
Definition: MCAsmInfo.h:176
const char * CommentString
Definition: MCAsmInfo.h:110
ArchType getArch() const
getArch - Get the parsed architecture type of this triple.
Definition: Triple.h:172
const char * AscizDirective
Definition: MCAsmInfo.h:171
const char * InlineAsmStart
Definition: MCAsmInfo.h:134
initializer< Ty > init(const Ty &Val)
Definition: CommandLine.h:314
bool HasSetDirective
HasSetDirective - True if the assembler supports the .set directive.
Definition: MCAsmInfo.h:232
unsigned PointerSize
Definition: MCAsmInfo.h:50
bool SupportsDebugInformation
Definition: MCAsmInfo.h:297
const char * Data16bitsDirective
Definition: MCAsmInfo.h:177
const char * InlineAsmEnd
Definition: MCAsmInfo.h:135
const char * Data32bitsDirective
Definition: MCAsmInfo.h:178
NVPTXMCAsmInfo(const StringRef &TT)