PTX: add PTX 2.3 language target
[oota-llvm.git] / lib / Target / PTX / PTX.td
1 //===- PTX.td - Describe the PTX Target Machine ---------------*- tblgen -*-==//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 // This is the top level entry point for the PTX target.
10 //===----------------------------------------------------------------------===//
11
12 //===----------------------------------------------------------------------===//
13 // Target-independent interfaces
14 //===----------------------------------------------------------------------===//
15
16 include "llvm/Target/Target.td"
17
18 //===----------------------------------------------------------------------===//
19 // Subtarget Features.
20 //===----------------------------------------------------------------------===//
21
22 //===- Architectural Features ---------------------------------------------===//
23
24 def FeatureDouble : SubtargetFeature<"double", "SupportsDouble", "true",
25                                      "Do not demote .f64 to .f32">;
26
27 //===- PTX Version --------------------------------------------------------===//
28
29 def FeaturePTX20 : SubtargetFeature<"ptx20", "PTXVersion", "PTX_VERSION_2_0",
30                                     "Use PTX Language Version 2.0",
31                                     []>;
32
33 def FeaturePTX21 : SubtargetFeature<"ptx21", "PTXVersion", "PTX_VERSION_2_1",
34                                     "Use PTX Language Version 2.1",
35                                     [FeaturePTX20]>;
36
37 def FeaturePTX22 : SubtargetFeature<"ptx22", "PTXVersion", "PTX_VERSION_2_2",
38                                     "Use PTX Language Version 2.2",
39                                     [FeaturePTX21]>;
40
41 def FeaturePTX23 : SubtargetFeature<"ptx23", "PTXVersion", "PTX_VERSION_2_3",
42                                     "Use PTX Language Version 2.3",
43                                     [FeaturePTX22]>;
44
45 //===- PTX Shader Model ---------------------------------------------------===//
46
47 def FeatureSM10 : SubtargetFeature<"sm10", "PTXShaderModel", "PTX_SM_1_0",
48                                    "Enable Shader Model 1.0 compliance">;
49 def FeatureSM13 : SubtargetFeature<"sm13", "PTXShaderModel", "PTX_SM_1_3",
50                                    "Enable Shader Model 1.3 compliance",
51                                    [FeatureSM10, FeatureDouble]>;
52 def FeatureSM20 : SubtargetFeature<"sm20", "PTXShaderModel", "PTX_SM_2_0",
53                                    "Enable Shader Model 2.0 compliance",
54                                    [FeatureSM13]>;
55
56 //===----------------------------------------------------------------------===//
57 // PTX supported processors.
58 //===----------------------------------------------------------------------===//
59
60 class Proc<string Name, list<SubtargetFeature> Features>
61   : Processor<Name, NoItineraries, Features>;
62
63 def : Proc<"generic", []>;
64
65 //===----------------------------------------------------------------------===//
66 // Register File Description
67 //===----------------------------------------------------------------------===//
68
69 include "PTXRegisterInfo.td"
70
71 //===----------------------------------------------------------------------===//
72 // Instruction Descriptions
73 //===----------------------------------------------------------------------===//
74
75 include "PTXInstrInfo.td"
76
77 def PTXInstrInfo : InstrInfo;
78
79 //===----------------------------------------------------------------------===//
80 // Target Declaration
81 //===----------------------------------------------------------------------===//
82
83 def PTX : Target {
84   let InstructionSet = PTXInstrInfo;
85 }