LLVM API Documentation

NVPTXMCAsmInfo.cpp
Go to the documentation of this file.
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(StringRef TT) {
00029   Triple TheTriple(TT);
00030   if (TheTriple.getArch() == Triple::nvptx64) {
00031     PointerSize = CalleeSaveStackSlotSize = 8;
00032   }
00033 
00034   CommentString = "//";
00035 
00036   HasSetDirective = false;
00037 
00038   HasSingleParameterDotFile = false;
00039 
00040   InlineAsmStart = " inline asm";
00041   InlineAsmEnd = " inline asm";
00042 
00043   SupportsDebugInformation = CompileForDebugging;
00044   HasDotTypeDotSizeDirective = false;
00045 
00046   Data8bitsDirective = " .b8 ";
00047   Data16bitsDirective = " .b16 ";
00048   Data32bitsDirective = " .b32 ";
00049   Data64bitsDirective = " .b64 ";
00050   ZeroDirective = " .b8";
00051   AsciiDirective = " .b8";
00052   AscizDirective = " .b8";
00053 
00054   // @TODO: Can we just disable this?
00055   GlobalDirective = "\t// .globl\t";
00056 }