10b57cec5SDimitry Andric //===-- NVPTXMCAsmInfo.cpp - NVPTX asm properties -------------------------===// 20b57cec5SDimitry Andric // 30b57cec5SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 40b57cec5SDimitry Andric // See https://llvm.org/LICENSE.txt for license information. 50b57cec5SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 60b57cec5SDimitry Andric // 70b57cec5SDimitry Andric //===----------------------------------------------------------------------===// 80b57cec5SDimitry Andric // 90b57cec5SDimitry Andric // This file contains the declarations of the NVPTXMCAsmInfo properties. 100b57cec5SDimitry Andric // 110b57cec5SDimitry Andric //===----------------------------------------------------------------------===// 120b57cec5SDimitry Andric 130b57cec5SDimitry Andric #include "NVPTXMCAsmInfo.h" 14*06c3fb27SDimitry Andric #include "llvm/TargetParser/Triple.h" 150b57cec5SDimitry Andric 160b57cec5SDimitry Andric using namespace llvm; 170b57cec5SDimitry Andric anchor()180b57cec5SDimitry Andricvoid NVPTXMCAsmInfo::anchor() {} 190b57cec5SDimitry Andric NVPTXMCAsmInfo(const Triple & TheTriple,const MCTargetOptions & Options)20480093f4SDimitry AndricNVPTXMCAsmInfo::NVPTXMCAsmInfo(const Triple &TheTriple, 21480093f4SDimitry Andric const MCTargetOptions &Options) { 220b57cec5SDimitry Andric if (TheTriple.getArch() == Triple::nvptx64) { 230b57cec5SDimitry Andric CodePointerSize = CalleeSaveStackSlotSize = 8; 240b57cec5SDimitry Andric } 250b57cec5SDimitry Andric 260b57cec5SDimitry Andric CommentString = "//"; 270b57cec5SDimitry Andric 280b57cec5SDimitry Andric HasSingleParameterDotFile = false; 290b57cec5SDimitry Andric 300b57cec5SDimitry Andric InlineAsmStart = " begin inline asm"; 310b57cec5SDimitry Andric InlineAsmEnd = " end inline asm"; 320b57cec5SDimitry Andric 330b57cec5SDimitry Andric SupportsDebugInformation = true; 340b57cec5SDimitry Andric // PTX does not allow .align on functions. 350b57cec5SDimitry Andric HasFunctionAlignment = false; 360b57cec5SDimitry Andric HasDotTypeDotSizeDirective = false; 370b57cec5SDimitry Andric // PTX does not allow .hidden or .protected 380b57cec5SDimitry Andric HiddenDeclarationVisibilityAttr = HiddenVisibilityAttr = MCSA_Invalid; 390b57cec5SDimitry Andric ProtectedVisibilityAttr = MCSA_Invalid; 400b57cec5SDimitry Andric 410b57cec5SDimitry Andric Data8bitsDirective = ".b8 "; 420b57cec5SDimitry Andric Data16bitsDirective = nullptr; // not supported 430b57cec5SDimitry Andric Data32bitsDirective = ".b32 "; 440b57cec5SDimitry Andric Data64bitsDirective = ".b64 "; 450b57cec5SDimitry Andric ZeroDirective = ".b8"; 460b57cec5SDimitry Andric AsciiDirective = nullptr; // not supported 470b57cec5SDimitry Andric AscizDirective = nullptr; // not supported 480b57cec5SDimitry Andric SupportsQuotedNames = false; 490b57cec5SDimitry Andric SupportsExtendedDwarfLocDirective = false; 50e8d8bef9SDimitry Andric SupportsSignedData = false; 510b57cec5SDimitry Andric 5281ad6265SDimitry Andric PrivateGlobalPrefix = "$L__"; 5381ad6265SDimitry Andric PrivateLabelPrefix = PrivateGlobalPrefix; 5481ad6265SDimitry Andric 550b57cec5SDimitry Andric // @TODO: Can we just disable this? 560b57cec5SDimitry Andric WeakDirective = "\t// .weak\t"; 570b57cec5SDimitry Andric GlobalDirective = "\t// .globl\t"; 585ffd83dbSDimitry Andric 595ffd83dbSDimitry Andric UseIntegratedAssembler = false; 6081ad6265SDimitry Andric 6181ad6265SDimitry Andric // Avoid using parens for identifiers starting with $ - ptxas does 6281ad6265SDimitry Andric // not expect them. 6381ad6265SDimitry Andric UseParensForDollarSignNames = false; 6481ad6265SDimitry Andric 6581ad6265SDimitry Andric // ptxas does not support DWARF `.file fileno directory filename' 6681ad6265SDimitry Andric // syntax as of v11.X. 6781ad6265SDimitry Andric EnableDwarfFileDirectoryDefault = false; 680b57cec5SDimitry Andric } 69