/Users/buildslave/jenkins/sharedspace/clang-stage2-coverage-R@2/llvm/lib/Target/NVPTX/MCTargetDesc/NVPTXMCAsmInfo.cpp
Line | Count | Source (jump to first uncovered line) |
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 | | #include "llvm/Support/CommandLine.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 | 0 | void NVPTXMCAsmInfo::anchor() {} |
27 | | |
28 | 351 | NVPTXMCAsmInfo::NVPTXMCAsmInfo(const Triple &TheTriple) { |
29 | 351 | if (TheTriple.getArch() == Triple::nvptx64351 ) { |
30 | 144 | CodePointerSize = CalleeSaveStackSlotSize = 8; |
31 | 144 | } |
32 | 351 | |
33 | 351 | CommentString = "//"; |
34 | 351 | |
35 | 351 | HasSingleParameterDotFile = false; |
36 | 351 | |
37 | 351 | InlineAsmStart = " begin inline asm"; |
38 | 351 | InlineAsmEnd = " end inline asm"; |
39 | 351 | |
40 | 351 | SupportsDebugInformation = CompileForDebugging; |
41 | 351 | // PTX does not allow .align on functions. |
42 | 351 | HasFunctionAlignment = false; |
43 | 351 | HasDotTypeDotSizeDirective = false; |
44 | 351 | // PTX does not allow .hidden or .protected |
45 | 351 | HiddenDeclarationVisibilityAttr = HiddenVisibilityAttr = MCSA_Invalid; |
46 | 351 | ProtectedVisibilityAttr = MCSA_Invalid; |
47 | 351 | |
48 | 351 | Data8bitsDirective = " .b8 "; |
49 | 351 | Data16bitsDirective = " .b16 "; |
50 | 351 | Data32bitsDirective = " .b32 "; |
51 | 351 | Data64bitsDirective = " .b64 "; |
52 | 351 | ZeroDirective = " .b8"; |
53 | 351 | AsciiDirective = " .b8"; |
54 | 351 | AscizDirective = " .b8"; |
55 | 351 | |
56 | 351 | // @TODO: Can we just disable this? |
57 | 351 | WeakDirective = "\t// .weak\t"; |
58 | 351 | GlobalDirective = "\t// .globl\t"; |
59 | 351 | } |