mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-29 10:32:47 +00:00
e1fee48cd0
used by Clang. To help Clang integration, the PTX target has been split into two targets: ptx32 and ptx64, depending on the desired pointer size. - Add GCCBuiltin class to all intrinsics - Split PTX target into ptx32 and ptx64 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129851 91177308-0d34-0410-b5e6-96231b3b80d8
48 lines
1.4 KiB
C++
48 lines
1.4 KiB
C++
//===- PTXSubtarget.cpp - PTX Subtarget Information ---------------*- C++ -*-=//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// This file implements the PTX specific subclass of TargetSubtarget.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include "PTXSubtarget.h"
|
|
#include "llvm/Support/ErrorHandling.h"
|
|
|
|
using namespace llvm;
|
|
|
|
PTXSubtarget::PTXSubtarget(const std::string &TT, const std::string &FS,
|
|
bool is64Bit)
|
|
: PTXShaderModel(PTX_SM_1_0),
|
|
PTXVersion(PTX_VERSION_2_0),
|
|
SupportsDouble(false),
|
|
Is64Bit(is64Bit) {
|
|
std::string TARGET = "generic";
|
|
ParseSubtargetFeatures(FS, TARGET);
|
|
}
|
|
|
|
std::string PTXSubtarget::getTargetString() const {
|
|
switch(PTXShaderModel) {
|
|
default: llvm_unreachable("Unknown shader model");
|
|
case PTX_SM_1_0: return "sm_10";
|
|
case PTX_SM_1_3: return "sm_13";
|
|
case PTX_SM_2_0: return "sm_20";
|
|
}
|
|
}
|
|
|
|
std::string PTXSubtarget::getPTXVersionString() const {
|
|
switch(PTXVersion) {
|
|
default: llvm_unreachable("Unknown PTX version");
|
|
case PTX_VERSION_2_0: return "2.0";
|
|
case PTX_VERSION_2_1: return "2.1";
|
|
case PTX_VERSION_2_2: return "2.2";
|
|
}
|
|
}
|
|
|
|
#include "PTXGenSubtarget.inc"
|