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 bool CompileForDebugging;
22 // -debug-compile - Command line option to inform opt and llc passes to
23 // compile for debugging
24 static cl::opt<bool, true>
25 Debug("debug-compile", cl::desc("Compile for debugging"), cl::Hidden,
26 cl::location(CompileForDebugging),
29 void NVPTXMCAsmInfo::anchor() { }
31 NVPTXMCAsmInfo::NVPTXMCAsmInfo(const Target &T, const StringRef &TT) {
33 if (TheTriple.getArch() == Triple::nvptx64)
38 PrivateGlobalPrefix = "$L__";
40 AllowPeriodsInName = false;
42 HasSetDirective = false;
44 HasSingleParameterDotFile = false;
46 InlineAsmStart = " inline asm";
47 InlineAsmEnd = " inline asm";
49 SupportsDebugInformation = CompileForDebugging;
50 HasDotTypeDotSizeDirective = false;
52 Data8bitsDirective = " .b8 ";
53 Data16bitsDirective = " .b16 ";
54 Data32bitsDirective = " .b32 ";
55 Data64bitsDirective = " .b64 ";
56 PrivateGlobalPrefix = "";
57 ZeroDirective = " .b8";
58 AsciiDirective = " .b8";
59 AscizDirective = " .b8";
61 // @TODO: Can we just disable this?
62 GlobalDirective = "\t// .globl\t";