PTX: Finish new calling convention implementation
[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 def FeatureNoFMA  : SubtargetFeature<"no-fma","SupportsFMA", "false",
28                                      "Disable Fused-Multiply Add">;
29
30 //===- PTX Version --------------------------------------------------------===//
31
32 def FeaturePTX20 : SubtargetFeature<"ptx20", "PTXVersion", "PTX_VERSION_2_0",
33                                     "Use PTX Language Version 2.0",
34                                     []>;
35
36 def FeaturePTX21 : SubtargetFeature<"ptx21", "PTXVersion", "PTX_VERSION_2_1",
37                                     "Use PTX Language Version 2.1",
38                                     [FeaturePTX20]>;
39
40 def FeaturePTX22 : SubtargetFeature<"ptx22", "PTXVersion", "PTX_VERSION_2_2",
41                                     "Use PTX Language Version 2.2",
42                                     [FeaturePTX21]>;
43
44 def FeaturePTX23 : SubtargetFeature<"ptx23", "PTXVersion", "PTX_VERSION_2_3",
45                                     "Use PTX Language Version 2.3",
46                                     [FeaturePTX22]>;
47
48 //===- PTX Shader Model ---------------------------------------------------===//
49
50 def FeatureSM10 : SubtargetFeature<"sm10", "PTXShaderModel", "PTX_SM_1_0",
51                                    "Enable Shader Model 1.0 compliance">;
52 def FeatureSM13 : SubtargetFeature<"sm13", "PTXShaderModel", "PTX_SM_1_3",
53                                    "Enable Shader Model 1.3 compliance",
54                                    [FeatureSM10, FeatureDouble]>;
55 def FeatureSM20 : SubtargetFeature<"sm20", "PTXShaderModel", "PTX_SM_2_0",
56                                    "Enable Shader Model 2.0 compliance",
57                                    [FeatureSM13]>;
58
59 //===----------------------------------------------------------------------===//
60 // PTX supported processors.
61 //===----------------------------------------------------------------------===//
62
63 class Proc<string Name, list<SubtargetFeature> Features>
64   : Processor<Name, NoItineraries, Features>;
65
66 def : Proc<"generic", []>;
67
68 //===----------------------------------------------------------------------===//
69 // Register File Description
70 //===----------------------------------------------------------------------===//
71
72 include "PTXRegisterInfo.td"
73
74 //===----------------------------------------------------------------------===//
75 // Calling Conventions
76 //===----------------------------------------------------------------------===//
77
78 include "PTXCallingConv.td"
79
80 //===----------------------------------------------------------------------===//
81 // Instruction Descriptions
82 //===----------------------------------------------------------------------===//
83
84 include "PTXInstrInfo.td"
85
86 def PTXInstrInfo : InstrInfo;
87
88 //===----------------------------------------------------------------------===//
89 // Target Declaration
90 //===----------------------------------------------------------------------===//
91
92 def PTX : Target {
93   let InstructionSet = PTXInstrInfo;
94 }