/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/lib/Target/NVPTX/MCTargetDesc/NVPTXMCAsmInfo.cpp
Line | Count | Source (jump to first uncovered line) |
1 | | //===-- NVPTXMCAsmInfo.cpp - NVPTX asm properties -------------------------===// |
2 | | // |
3 | | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
4 | | // See https://llvm.org/LICENSE.txt for license information. |
5 | | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
6 | | // |
7 | | //===----------------------------------------------------------------------===// |
8 | | // |
9 | | // This file contains the declarations of the NVPTXMCAsmInfo properties. |
10 | | // |
11 | | //===----------------------------------------------------------------------===// |
12 | | |
13 | | #include "NVPTXMCAsmInfo.h" |
14 | | #include "llvm/ADT/Triple.h" |
15 | | |
16 | | using namespace llvm; |
17 | | |
18 | 0 | void NVPTXMCAsmInfo::anchor() {} |
19 | | |
20 | 455 | NVPTXMCAsmInfo::NVPTXMCAsmInfo(const Triple &TheTriple) { |
21 | 455 | if (TheTriple.getArch() == Triple::nvptx64) { |
22 | 215 | CodePointerSize = CalleeSaveStackSlotSize = 8; |
23 | 215 | } |
24 | 455 | |
25 | 455 | CommentString = "//"; |
26 | 455 | |
27 | 455 | HasSingleParameterDotFile = false; |
28 | 455 | |
29 | 455 | InlineAsmStart = " begin inline asm"; |
30 | 455 | InlineAsmEnd = " end inline asm"; |
31 | 455 | |
32 | 455 | SupportsDebugInformation = true; |
33 | 455 | // PTX does not allow .align on functions. |
34 | 455 | HasFunctionAlignment = false; |
35 | 455 | HasDotTypeDotSizeDirective = false; |
36 | 455 | // PTX does not allow .hidden or .protected |
37 | 455 | HiddenDeclarationVisibilityAttr = HiddenVisibilityAttr = MCSA_Invalid; |
38 | 455 | ProtectedVisibilityAttr = MCSA_Invalid; |
39 | 455 | |
40 | 455 | Data8bitsDirective = ".b8 "; |
41 | 455 | Data16bitsDirective = nullptr; // not supported |
42 | 455 | Data32bitsDirective = ".b32 "; |
43 | 455 | Data64bitsDirective = ".b64 "; |
44 | 455 | ZeroDirective = ".b8"; |
45 | 455 | AsciiDirective = nullptr; // not supported |
46 | 455 | AscizDirective = nullptr; // not supported |
47 | 455 | SupportsQuotedNames = false; |
48 | 455 | SupportsExtendedDwarfLocDirective = false; |
49 | 455 | |
50 | 455 | // @TODO: Can we just disable this? |
51 | 455 | WeakDirective = "\t// .weak\t"; |
52 | 455 | GlobalDirective = "\t// .globl\t"; |
53 | 455 | } |