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 def P0 : PTXReg<"p0">;
23 def P1 : PTXReg<"p1">;
24 def P2 : PTXReg<"p2">;
25 def P3 : PTXReg<"p3">;
26 def P4 : PTXReg<"p4">;
27 def P5 : PTXReg<"p5">;
28 def P6 : PTXReg<"p6">;
29 def P7 : PTXReg<"p7">;
30 def P8 : PTXReg<"p8">;
31 def P9 : PTXReg<"p9">;
32 def P10 : PTXReg<"p10">;
33 def P11 : PTXReg<"p11">;
34 def P12 : PTXReg<"p12">;
35 def P13 : PTXReg<"p13">;
36 def P14 : PTXReg<"p14">;
37 def P15 : PTXReg<"p15">;
38 def P16 : PTXReg<"p16">;
39 def P17 : PTXReg<"p17">;
40 def P18 : PTXReg<"p18">;
41 def P19 : PTXReg<"p19">;
42 def P20 : PTXReg<"p20">;
43 def P21 : PTXReg<"p21">;
44 def P22 : PTXReg<"p22">;
45 def P23 : PTXReg<"p23">;
46 def P24 : PTXReg<"p24">;
47 def P25 : PTXReg<"p25">;
48 def P26 : PTXReg<"p26">;
49 def P27 : PTXReg<"p27">;
50 def P28 : PTXReg<"p28">;
51 def P29 : PTXReg<"p29">;
52 def P30 : PTXReg<"p30">;
53 def P31 : PTXReg<"p31">;
55 def R0 : PTXReg<"r0">;
56 def R1 : PTXReg<"r1">;
57 def R2 : PTXReg<"r2">;
58 def R3 : PTXReg<"r3">;
59 def R4 : PTXReg<"r4">;
60 def R5 : PTXReg<"r5">;
61 def R6 : PTXReg<"r6">;
62 def R7 : PTXReg<"r7">;
63 def R8 : PTXReg<"r8">;
64 def R9 : PTXReg<"r9">;
65 def R10 : PTXReg<"r10">;
66 def R11 : PTXReg<"r11">;
67 def R12 : PTXReg<"r12">;
68 def R13 : PTXReg<"r13">;
69 def R14 : PTXReg<"r14">;
70 def R15 : PTXReg<"r15">;
71 def R16 : PTXReg<"r16">;
72 def R17 : PTXReg<"r17">;
73 def R18 : PTXReg<"r18">;
74 def R19 : PTXReg<"r19">;
75 def R20 : PTXReg<"r20">;
76 def R21 : PTXReg<"r21">;
77 def R22 : PTXReg<"r22">;
78 def R23 : PTXReg<"r23">;
79 def R24 : PTXReg<"r24">;
80 def R25 : PTXReg<"r25">;
81 def R26 : PTXReg<"r26">;
82 def R27 : PTXReg<"r27">;
83 def R28 : PTXReg<"r28">;
84 def R29 : PTXReg<"r29">;
85 def R30 : PTXReg<"r30">;
86 def R31 : PTXReg<"r31">;
88 //===----------------------------------------------------------------------===//
90 //===----------------------------------------------------------------------===//
92 def Preds : RegisterClass<"PTX", [i1], 8,
93 [P0, P1, P2, P3, P4, P5, P6, P7,
94 P8, P9, P10, P11, P12, P13, P14, P15,
95 P16, P17, P18, P19, P20, P21, P22, P23,
96 P24, P25, P26, P27, P28, P29, P30, P31]>;
98 def RRegs32 : RegisterClass<"PTX", [i32], 32,
99 [R0, R1, R2, R3, R4, R5, R6, R7,
100 R8, R9, R10, R11, R12, R13, R14, R15,
101 R16, R17, R18, R19, R20, R21, R22, R23,
102 R24, R25, R26, R27, R28, R29, R30, R31]>;