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 Feature64Bit : SubtargetFeature<"64bit", "Use64BitAddresses", "true",
28 "Use 64-bit integer types for addresses.">;
30 //===- PTX Version --------------------------------------------------------===//
32 def FeaturePTX14 : SubtargetFeature<"ptx14", "PTXVersion", "PTX_VERSION_1_4",
33 "Use PTX Language Version 1.4">;
35 def FeaturePTX20 : SubtargetFeature<"ptx20", "PTXVersion", "PTX_VERSION_2_0",
36 "Use PTX Language Version 2.0",
39 def FeaturePTX21 : SubtargetFeature<"ptx21", "PTXVersion", "PTX_VERSION_2_1",
40 "Use PTX Language Version 2.1",
43 //===- PTX Shader Model ---------------------------------------------------===//
45 def FeatureSM10 : SubtargetFeature<"sm10", "PTXShaderModel", "PTX_SM_1_0",
46 "Enable Shader Model 1.0 compliance">;
47 def FeatureSM13 : SubtargetFeature<"sm13", "PTXShaderModel", "PTX_SM_1_3",
48 "Enable Shader Model 1.3 compliance",
49 [FeatureSM10, FeatureDouble]>;
50 def FeatureSM20 : SubtargetFeature<"sm20", "PTXShaderModel", "PTX_SM_2_0",
51 "Enable Shader Model 2.0 compliance",
54 //===----------------------------------------------------------------------===//
55 // PTX supported processors.
56 //===----------------------------------------------------------------------===//
58 class Proc<string Name, list<SubtargetFeature> Features>
59 : Processor<Name, NoItineraries, Features>;
61 def : Proc<"generic", []>;
63 //===----------------------------------------------------------------------===//
64 // Register File Description
65 //===----------------------------------------------------------------------===//
67 include "PTXRegisterInfo.td"
69 //===----------------------------------------------------------------------===//
70 // Instruction Descriptions
71 //===----------------------------------------------------------------------===//
73 include "PTXInstrInfo.td"
75 def PTXInstrInfo : InstrInfo;
77 //===----------------------------------------------------------------------===//
79 //===----------------------------------------------------------------------===//
82 let InstructionSet = PTXInstrInfo;