1 //===- PTX.td - Describe the PTX Target Machine ---------------*- tblgen -*-==//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
9 // This is the top level entry point for the PTX target.
10 //===----------------------------------------------------------------------===//
12 //===----------------------------------------------------------------------===//
13 // Target-independent interfaces
14 //===----------------------------------------------------------------------===//
16 include "llvm/Target/Target.td"
18 //===----------------------------------------------------------------------===//
19 // Subtarget Features.
20 //===----------------------------------------------------------------------===//
22 //===- Architectural Features ---------------------------------------------===//
24 def FeatureDouble : SubtargetFeature<"double", "SupportsDouble", "true",
25 "Do not demote .f64 to .f32">;
27 def FeatureNoFMA : SubtargetFeature<"no-fma","SupportsFMA", "false",
28 "Disable Fused-Multiply Add">;
30 //===- PTX Version --------------------------------------------------------===//
32 def FeaturePTX20 : SubtargetFeature<"ptx20", "PTXVersion", "PTX_VERSION_2_0",
33 "Use PTX Language Version 2.0",
36 def FeaturePTX21 : SubtargetFeature<"ptx21", "PTXVersion", "PTX_VERSION_2_1",
37 "Use PTX Language Version 2.1",
40 def FeaturePTX22 : SubtargetFeature<"ptx22", "PTXVersion", "PTX_VERSION_2_2",
41 "Use PTX Language Version 2.2",
44 def FeaturePTX23 : SubtargetFeature<"ptx23", "PTXVersion", "PTX_VERSION_2_3",
45 "Use PTX Language Version 2.3",
48 //===- PTX Shader Model ---------------------------------------------------===//
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",
59 //===----------------------------------------------------------------------===//
60 // PTX supported processors.
61 //===----------------------------------------------------------------------===//
63 class Proc<string Name, list<SubtargetFeature> Features>
64 : Processor<Name, NoItineraries, Features>;
66 def : Proc<"generic", []>;
68 //===----------------------------------------------------------------------===//
69 // Register File Description
70 //===----------------------------------------------------------------------===//
72 include "PTXRegisterInfo.td"
74 //===----------------------------------------------------------------------===//
75 // Calling Conventions
76 //===----------------------------------------------------------------------===//
78 include "PTXCallingConv.td"
80 //===----------------------------------------------------------------------===//
81 // Instruction Descriptions
82 //===----------------------------------------------------------------------===//
84 include "PTXInstrInfo.td"
86 def PTXInstrInfo : InstrInfo;
88 //===----------------------------------------------------------------------===//
90 //===----------------------------------------------------------------------===//
93 let InstructionSet = PTXInstrInfo;