Path: blob/main/contrib/llvm-project/llvm/lib/Target/NVPTX/MCTargetDesc/NVPTXMCAsmInfo.cpp
35295 views
//===-- NVPTXMCAsmInfo.cpp - NVPTX asm properties -------------------------===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//7//8// This file contains the declarations of the NVPTXMCAsmInfo properties.9//10//===----------------------------------------------------------------------===//1112#include "NVPTXMCAsmInfo.h"13#include "llvm/TargetParser/Triple.h"1415using namespace llvm;1617void NVPTXMCAsmInfo::anchor() {}1819NVPTXMCAsmInfo::NVPTXMCAsmInfo(const Triple &TheTriple,20const MCTargetOptions &Options) {21if (TheTriple.getArch() == Triple::nvptx64) {22CodePointerSize = CalleeSaveStackSlotSize = 8;23}2425CommentString = "//";2627HasSingleParameterDotFile = false;2829InlineAsmStart = " begin inline asm";30InlineAsmEnd = " end inline asm";3132SupportsDebugInformation = true;33// PTX does not allow .align on functions.34HasFunctionAlignment = false;35HasDotTypeDotSizeDirective = false;36// PTX does not allow .hidden or .protected37HiddenDeclarationVisibilityAttr = HiddenVisibilityAttr = MCSA_Invalid;38ProtectedVisibilityAttr = MCSA_Invalid;3940Data8bitsDirective = ".b8 ";41Data16bitsDirective = nullptr; // not supported42Data32bitsDirective = ".b32 ";43Data64bitsDirective = ".b64 ";44ZeroDirective = ".b8";45AsciiDirective = nullptr; // not supported46AscizDirective = nullptr; // not supported47SupportsQuotedNames = false;48SupportsExtendedDwarfLocDirective = false;49SupportsSignedData = false;5051PrivateGlobalPrefix = "$L__";52PrivateLabelPrefix = PrivateGlobalPrefix;5354// @TODO: Can we just disable this?55WeakDirective = "\t// .weak\t";56GlobalDirective = "\t// .globl\t";5758UseIntegratedAssembler = false;5960// Avoid using parens for identifiers starting with $ - ptxas does61// not expect them.62UseParensForDollarSignNames = false;6364// ptxas does not support DWARF `.file fileno directory filename'65// syntax as of v11.X.66EnableDwarfFileDirectoryDefault = false;67}686970