1 //===-- NVPTXMCAsmInfo.cpp - NVPTX asm properties -------------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file contains the declarations of the NVPTXMCAsmInfo properties.
12 //===----------------------------------------------------------------------===//
14 #include "NVPTXMCAsmInfo.h"
15 #include "llvm/ADT/Triple.h"
16 #include "llvm/Support/CommandLine.h"
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));
26 void NVPTXMCAsmInfo::anchor() {}
28 NVPTXMCAsmInfo::NVPTXMCAsmInfo(const StringRef &TT) {
30 if (TheTriple.getArch() == Triple::nvptx64) {
31 PointerSize = CalleeSaveStackSlotSize = 8;
36 PrivateGlobalPrefix = "$L__";
38 HasSetDirective = false;
40 HasSingleParameterDotFile = false;
42 InlineAsmStart = " inline asm";
43 InlineAsmEnd = " inline asm";
45 SupportsDebugInformation = CompileForDebugging;
46 HasDotTypeDotSizeDirective = false;
48 Data8bitsDirective = " .b8 ";
49 Data16bitsDirective = " .b16 ";
50 Data32bitsDirective = " .b32 ";
51 Data64bitsDirective = " .b64 ";
52 PrivateGlobalPrefix = "";
53 ZeroDirective = " .b8";
54 AsciiDirective = " .b8";
55 AscizDirective = " .b8";
57 // @TODO: Can we just disable this?
58 GlobalDirective = "\t// .globl\t";