LLVM API Documentation
00001 //===-- NVPTXMCAsmInfo.cpp - NVPTX asm properties -------------------------===// 00002 // 00003 // The LLVM Compiler Infrastructure 00004 // 00005 // This file is distributed under the University of Illinois Open Source 00006 // License. See LICENSE.TXT for details. 00007 // 00008 //===----------------------------------------------------------------------===// 00009 // 00010 // This file contains the declarations of the NVPTXMCAsmInfo properties. 00011 // 00012 //===----------------------------------------------------------------------===// 00013 00014 #include "NVPTXMCAsmInfo.h" 00015 #include "llvm/ADT/Triple.h" 00016 #include "llvm/Support/CommandLine.h" 00017 00018 using namespace llvm; 00019 00020 // -debug-compile - Command line option to inform opt and llc passes to 00021 // compile for debugging 00022 static cl::opt<bool> CompileForDebugging("debug-compile", 00023 cl::desc("Compile for debugging"), 00024 cl::Hidden, cl::init(false)); 00025 00026 void NVPTXMCAsmInfo::anchor() {} 00027 00028 NVPTXMCAsmInfo::NVPTXMCAsmInfo(const StringRef &TT) { 00029 Triple TheTriple(TT); 00030 if (TheTriple.getArch() == Triple::nvptx64) { 00031 PointerSize = CalleeSaveStackSlotSize = 8; 00032 } 00033 00034 CommentString = "//"; 00035 00036 PrivateGlobalPrefix = "$L__"; 00037 00038 AllowPeriodsInName = false; 00039 00040 HasSetDirective = false; 00041 00042 HasSingleParameterDotFile = false; 00043 00044 InlineAsmStart = " inline asm"; 00045 InlineAsmEnd = " inline asm"; 00046 00047 SupportsDebugInformation = CompileForDebugging; 00048 HasDotTypeDotSizeDirective = false; 00049 00050 Data8bitsDirective = " .b8 "; 00051 Data16bitsDirective = " .b16 "; 00052 Data32bitsDirective = " .b32 "; 00053 Data64bitsDirective = " .b64 "; 00054 PrivateGlobalPrefix = ""; 00055 ZeroDirective = " .b8"; 00056 AsciiDirective = " .b8"; 00057 AscizDirective = " .b8"; 00058 00059 // @TODO: Can we just disable this? 00060 GlobalDirective = "\t// .globl\t"; 00061 }