1 //===- PTXRegisterInfo.td - PTX Register defs ----------------*- 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 //===----------------------------------------------------------------------===//
10 //===----------------------------------------------------------------------===//
11 // Declarations that describe the PTX register file
12 //===----------------------------------------------------------------------===//
14 class PTXReg<string n> : Register<n> {
15 let Namespace = "PTX";
18 //===----------------------------------------------------------------------===//
20 //===----------------------------------------------------------------------===//
22 ///===- Predicate Registers -----------------------------------------------===//
24 def P0 : PTXReg<"p0">;
25 def P1 : PTXReg<"p1">;
26 def P2 : PTXReg<"p2">;
27 def P3 : PTXReg<"p3">;
28 def P4 : PTXReg<"p4">;
29 def P5 : PTXReg<"p5">;
30 def P6 : PTXReg<"p6">;
31 def P7 : PTXReg<"p7">;
32 def P8 : PTXReg<"p8">;
33 def P9 : PTXReg<"p9">;
34 def P10 : PTXReg<"p10">;
35 def P11 : PTXReg<"p11">;
36 def P12 : PTXReg<"p12">;
37 def P13 : PTXReg<"p13">;
38 def P14 : PTXReg<"p14">;
39 def P15 : PTXReg<"p15">;
40 def P16 : PTXReg<"p16">;
41 def P17 : PTXReg<"p17">;
42 def P18 : PTXReg<"p18">;
43 def P19 : PTXReg<"p19">;
44 def P20 : PTXReg<"p20">;
45 def P21 : PTXReg<"p21">;
46 def P22 : PTXReg<"p22">;
47 def P23 : PTXReg<"p23">;
48 def P24 : PTXReg<"p24">;
49 def P25 : PTXReg<"p25">;
50 def P26 : PTXReg<"p26">;
51 def P27 : PTXReg<"p27">;
52 def P28 : PTXReg<"p28">;
53 def P29 : PTXReg<"p29">;
54 def P30 : PTXReg<"p30">;
55 def P31 : PTXReg<"p31">;
57 ///===- 16-bit Integer Registers ------------------------------------------===//
59 def RH0 : PTXReg<"rh0">;
60 def RH1 : PTXReg<"rh1">;
61 def RH2 : PTXReg<"rh2">;
62 def RH3 : PTXReg<"rh3">;
63 def RH4 : PTXReg<"rh4">;
64 def RH5 : PTXReg<"rh5">;
65 def RH6 : PTXReg<"rh6">;
66 def RH7 : PTXReg<"rh7">;
67 def RH8 : PTXReg<"rh8">;
68 def RH9 : PTXReg<"rh9">;
69 def RH10 : PTXReg<"rh10">;
70 def RH11 : PTXReg<"rh11">;
71 def RH12 : PTXReg<"rh12">;
72 def RH13 : PTXReg<"rh13">;
73 def RH14 : PTXReg<"rh14">;
74 def RH15 : PTXReg<"rh15">;
75 def RH16 : PTXReg<"rh16">;
76 def RH17 : PTXReg<"rh17">;
77 def RH18 : PTXReg<"rh18">;
78 def RH19 : PTXReg<"rh19">;
79 def RH20 : PTXReg<"rh20">;
80 def RH21 : PTXReg<"rh21">;
81 def RH22 : PTXReg<"rh22">;
82 def RH23 : PTXReg<"rh23">;
83 def RH24 : PTXReg<"rh24">;
84 def RH25 : PTXReg<"rh25">;
85 def RH26 : PTXReg<"rh26">;
86 def RH27 : PTXReg<"rh27">;
87 def RH28 : PTXReg<"rh28">;
88 def RH29 : PTXReg<"rh29">;
89 def RH30 : PTXReg<"rh30">;
90 def RH31 : PTXReg<"rh31">;
92 ///===- 32-bit Integer Registers ------------------------------------------===//
94 def R0 : PTXReg<"r0">;
95 def R1 : PTXReg<"r1">;
96 def R2 : PTXReg<"r2">;
97 def R3 : PTXReg<"r3">;
98 def R4 : PTXReg<"r4">;
99 def R5 : PTXReg<"r5">;
100 def R6 : PTXReg<"r6">;
101 def R7 : PTXReg<"r7">;
102 def R8 : PTXReg<"r8">;
103 def R9 : PTXReg<"r9">;
104 def R10 : PTXReg<"r10">;
105 def R11 : PTXReg<"r11">;
106 def R12 : PTXReg<"r12">;
107 def R13 : PTXReg<"r13">;
108 def R14 : PTXReg<"r14">;
109 def R15 : PTXReg<"r15">;
110 def R16 : PTXReg<"r16">;
111 def R17 : PTXReg<"r17">;
112 def R18 : PTXReg<"r18">;
113 def R19 : PTXReg<"r19">;
114 def R20 : PTXReg<"r20">;
115 def R21 : PTXReg<"r21">;
116 def R22 : PTXReg<"r22">;
117 def R23 : PTXReg<"r23">;
118 def R24 : PTXReg<"r24">;
119 def R25 : PTXReg<"r25">;
120 def R26 : PTXReg<"r26">;
121 def R27 : PTXReg<"r27">;
122 def R28 : PTXReg<"r28">;
123 def R29 : PTXReg<"r29">;
124 def R30 : PTXReg<"r30">;
125 def R31 : PTXReg<"r31">;
127 ///===- 64-bit Integer Registers ------------------------------------------===//
129 def RD0 : PTXReg<"rd0">;
130 def RD1 : PTXReg<"rd1">;
131 def RD2 : PTXReg<"rd2">;
132 def RD3 : PTXReg<"rd3">;
133 def RD4 : PTXReg<"rd4">;
134 def RD5 : PTXReg<"rd5">;
135 def RD6 : PTXReg<"rd6">;
136 def RD7 : PTXReg<"rd7">;
137 def RD8 : PTXReg<"rd8">;
138 def RD9 : PTXReg<"rd9">;
139 def RD10 : PTXReg<"rd10">;
140 def RD11 : PTXReg<"rd11">;
141 def RD12 : PTXReg<"rd12">;
142 def RD13 : PTXReg<"rd13">;
143 def RD14 : PTXReg<"rd14">;
144 def RD15 : PTXReg<"rd15">;
145 def RD16 : PTXReg<"rd16">;
146 def RD17 : PTXReg<"rd17">;
147 def RD18 : PTXReg<"rd18">;
148 def RD19 : PTXReg<"rd19">;
149 def RD20 : PTXReg<"rd20">;
150 def RD21 : PTXReg<"rd21">;
151 def RD22 : PTXReg<"rd22">;
152 def RD23 : PTXReg<"rd23">;
153 def RD24 : PTXReg<"rd24">;
154 def RD25 : PTXReg<"rd25">;
155 def RD26 : PTXReg<"rd26">;
156 def RD27 : PTXReg<"rd27">;
157 def RD28 : PTXReg<"rd28">;
158 def RD29 : PTXReg<"rd29">;
159 def RD30 : PTXReg<"rd30">;
160 def RD31 : PTXReg<"rd31">;
162 ///===- 32-bit Floating-Point Registers -----------------------------------===//
164 def F0 : PTXReg<"f0">;
165 def F1 : PTXReg<"f1">;
166 def F2 : PTXReg<"f2">;
167 def F3 : PTXReg<"f3">;
168 def F4 : PTXReg<"f4">;
169 def F5 : PTXReg<"f5">;
170 def F6 : PTXReg<"f6">;
171 def F7 : PTXReg<"f7">;
172 def F8 : PTXReg<"f8">;
173 def F9 : PTXReg<"f9">;
174 def F10 : PTXReg<"f10">;
175 def F11 : PTXReg<"f11">;
176 def F12 : PTXReg<"f12">;
177 def F13 : PTXReg<"f13">;
178 def F14 : PTXReg<"f14">;
179 def F15 : PTXReg<"f15">;
180 def F16 : PTXReg<"f16">;
181 def F17 : PTXReg<"f17">;
182 def F18 : PTXReg<"f18">;
183 def F19 : PTXReg<"f19">;
184 def F20 : PTXReg<"f20">;
185 def F21 : PTXReg<"f21">;
186 def F22 : PTXReg<"f22">;
187 def F23 : PTXReg<"f23">;
188 def F24 : PTXReg<"f24">;
189 def F25 : PTXReg<"f25">;
190 def F26 : PTXReg<"f26">;
191 def F27 : PTXReg<"f27">;
192 def F28 : PTXReg<"f28">;
193 def F29 : PTXReg<"f29">;
194 def F30 : PTXReg<"f30">;
195 def F31 : PTXReg<"f31">;
197 ///===- 64-bit Floating-Point Registers -----------------------------------===//
199 def FD0 : PTXReg<"fd0">;
200 def FD1 : PTXReg<"fd1">;
201 def FD2 : PTXReg<"fd2">;
202 def FD3 : PTXReg<"fd3">;
203 def FD4 : PTXReg<"fd4">;
204 def FD5 : PTXReg<"fd5">;
205 def FD6 : PTXReg<"fd6">;
206 def FD7 : PTXReg<"fd7">;
207 def FD8 : PTXReg<"fd8">;
208 def FD9 : PTXReg<"fd9">;
209 def FD10 : PTXReg<"fd10">;
210 def FD11 : PTXReg<"fd11">;
211 def FD12 : PTXReg<"fd12">;
212 def FD13 : PTXReg<"fd13">;
213 def FD14 : PTXReg<"fd14">;
214 def FD15 : PTXReg<"fd15">;
215 def FD16 : PTXReg<"fd16">;
216 def FD17 : PTXReg<"fd17">;
217 def FD18 : PTXReg<"fd18">;
218 def FD19 : PTXReg<"fd19">;
219 def FD20 : PTXReg<"fd20">;
220 def FD21 : PTXReg<"fd21">;
221 def FD22 : PTXReg<"fd22">;
222 def FD23 : PTXReg<"fd23">;
223 def FD24 : PTXReg<"fd24">;
224 def FD25 : PTXReg<"fd25">;
225 def FD26 : PTXReg<"fd26">;
226 def FD27 : PTXReg<"fd27">;
227 def FD28 : PTXReg<"fd28">;
228 def FD29 : PTXReg<"fd29">;
229 def FD30 : PTXReg<"fd30">;
230 def FD31 : PTXReg<"fd31">;
233 //===----------------------------------------------------------------------===//
235 //===----------------------------------------------------------------------===//
237 def Preds : RegisterClass<"PTX", [i1], 8,
238 [P0, P1, P2, P3, P4, P5, P6, P7,
239 P8, P9, P10, P11, P12, P13, P14, P15,
240 P16, P17, P18, P19, P20, P21, P22, P23,
241 P24, P25, P26, P27, P28, P29, P30, P31]>;
243 def RRegu16 : RegisterClass<"PTX", [i16], 16,
244 [RH0, RH1, RH2, RH3, RH4, RH5, RH6, RH7,
245 RH8, RH9, RH10, RH11, RH12, RH13, RH14, RH15,
246 RH16, RH17, RH18, RH19, RH20, RH21, RH22, RH23,
247 RH24, RH25, RH26, RH27, RH28, RH29, RH30, RH31]>;
249 def RRegu32 : RegisterClass<"PTX", [i32], 32,
250 [R0, R1, R2, R3, R4, R5, R6, R7,
251 R8, R9, R10, R11, R12, R13, R14, R15,
252 R16, R17, R18, R19, R20, R21, R22, R23,
253 R24, R25, R26, R27, R28, R29, R30, R31]>;
255 def RRegu64 : RegisterClass<"PTX", [i64], 64,
256 [RD0, RD1, RD2, RD3, RD4, RD5, RD6, RD7,
257 RD8, RD9, RD10, RD11, RD12, RD13, RD14, RD15,
258 RD16, RD17, RD18, RD19, RD20, RD21, RD22, RD23,
259 RD24, RD25, RD26, RD27, RD28, RD29, RD30, RD31]>;
261 def RRegf32 : RegisterClass<"PTX", [f32], 32,
262 [F0, F1, F2, F3, F4, F5, F6, F7,
263 F8, F9, F10, F11, F12, F13, F14, F15,
264 F16, F17, F18, F19, F20, F21, F22, F23,
265 F24, F25, F26, F27, F28, F29, F30, F31]>;
267 def RRegf64 : RegisterClass<"PTX", [f64], 64,
268 [FD0, FD1, FD2, FD3, FD4, FD5, FD6, FD7,
269 FD8, FD9, FD10, FD11, FD12, FD13, FD14, FD15,
270 FD16, FD17, FD18, FD19, FD20, FD21, FD22, FD23,
271 FD24, FD25, FD26, FD27, FD28, FD29, FD30, FD31]>;