• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1//===- SPURegisterInfo.td - The Cell SPU Register File -----*- tablegen -*-===//
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//
10//
11//===----------------------------------------------------------------------===//
12
13class SPUReg<string n> : Register<n> {
14  let Namespace = "SPU";
15}
16
17// The SPU's register are all 128-bits wide, which makes specifying the
18// registers relatively easy, if relatively mundane:
19
20class SPUVecReg<bits<7> num, string n> : SPUReg<n> {
21  field bits<7> Num = num;
22}
23
24def R0 : SPUVecReg<0, "$lr">, DwarfRegNum<[0]>;
25def R1 : SPUVecReg<1, "$sp">, DwarfRegNum<[1]>;
26def R2 : SPUVecReg<2, "$2">, DwarfRegNum<[2]>;
27def R3 : SPUVecReg<3, "$3">, DwarfRegNum<[3]>;
28def R4 : SPUVecReg<4, "$4">, DwarfRegNum<[4]>;
29def R5 : SPUVecReg<5, "$5">, DwarfRegNum<[5]>;
30def R6 : SPUVecReg<6, "$6">, DwarfRegNum<[6]>;
31def R7 : SPUVecReg<7, "$7">, DwarfRegNum<[7]>;
32def R8 : SPUVecReg<8, "$8">, DwarfRegNum<[8]>;
33def R9 : SPUVecReg<9, "$9">, DwarfRegNum<[9]>;
34def R10 : SPUVecReg<10, "$10">, DwarfRegNum<[10]>;
35def R11 : SPUVecReg<11, "$11">, DwarfRegNum<[11]>;
36def R12 : SPUVecReg<12, "$12">, DwarfRegNum<[12]>;
37def R13 : SPUVecReg<13, "$13">, DwarfRegNum<[13]>;
38def R14 : SPUVecReg<14, "$14">, DwarfRegNum<[14]>;
39def R15 : SPUVecReg<15, "$15">, DwarfRegNum<[15]>;
40def R16 : SPUVecReg<16, "$16">, DwarfRegNum<[16]>;
41def R17 : SPUVecReg<17, "$17">, DwarfRegNum<[17]>;
42def R18 : SPUVecReg<18, "$18">, DwarfRegNum<[18]>;
43def R19 : SPUVecReg<19, "$19">, DwarfRegNum<[19]>;
44def R20 : SPUVecReg<20, "$20">, DwarfRegNum<[20]>;
45def R21 : SPUVecReg<21, "$21">, DwarfRegNum<[21]>;
46def R22 : SPUVecReg<22, "$22">, DwarfRegNum<[22]>;
47def R23 : SPUVecReg<23, "$23">, DwarfRegNum<[23]>;
48def R24 : SPUVecReg<24, "$24">, DwarfRegNum<[24]>;
49def R25 : SPUVecReg<25, "$25">, DwarfRegNum<[25]>;
50def R26 : SPUVecReg<26, "$26">, DwarfRegNum<[26]>;
51def R27 : SPUVecReg<27, "$27">, DwarfRegNum<[27]>;
52def R28 : SPUVecReg<28, "$28">, DwarfRegNum<[28]>;
53def R29 : SPUVecReg<29, "$29">, DwarfRegNum<[29]>;
54def R30 : SPUVecReg<30, "$30">, DwarfRegNum<[30]>;
55def R31 : SPUVecReg<31, "$31">, DwarfRegNum<[31]>;
56def R32 : SPUVecReg<32, "$32">, DwarfRegNum<[32]>;
57def R33 : SPUVecReg<33, "$33">, DwarfRegNum<[33]>;
58def R34 : SPUVecReg<34, "$34">, DwarfRegNum<[34]>;
59def R35 : SPUVecReg<35, "$35">, DwarfRegNum<[35]>;
60def R36 : SPUVecReg<36, "$36">, DwarfRegNum<[36]>;
61def R37 : SPUVecReg<37, "$37">, DwarfRegNum<[37]>;
62def R38 : SPUVecReg<38, "$38">, DwarfRegNum<[38]>;
63def R39 : SPUVecReg<39, "$39">, DwarfRegNum<[39]>;
64def R40 : SPUVecReg<40, "$40">, DwarfRegNum<[40]>;
65def R41 : SPUVecReg<41, "$41">, DwarfRegNum<[41]>;
66def R42 : SPUVecReg<42, "$42">, DwarfRegNum<[42]>;
67def R43 : SPUVecReg<43, "$43">, DwarfRegNum<[43]>;
68def R44 : SPUVecReg<44, "$44">, DwarfRegNum<[44]>;
69def R45 : SPUVecReg<45, "$45">, DwarfRegNum<[45]>;
70def R46 : SPUVecReg<46, "$46">, DwarfRegNum<[46]>;
71def R47 : SPUVecReg<47, "$47">, DwarfRegNum<[47]>;
72def R48 : SPUVecReg<48, "$48">, DwarfRegNum<[48]>;
73def R49 : SPUVecReg<49, "$49">, DwarfRegNum<[49]>;
74def R50 : SPUVecReg<50, "$50">, DwarfRegNum<[50]>;
75def R51 : SPUVecReg<51, "$51">, DwarfRegNum<[51]>;
76def R52 : SPUVecReg<52, "$52">, DwarfRegNum<[52]>;
77def R53 : SPUVecReg<53, "$53">, DwarfRegNum<[53]>;
78def R54 : SPUVecReg<54, "$54">, DwarfRegNum<[54]>;
79def R55 : SPUVecReg<55, "$55">, DwarfRegNum<[55]>;
80def R56 : SPUVecReg<56, "$56">, DwarfRegNum<[56]>;
81def R57 : SPUVecReg<57, "$57">, DwarfRegNum<[57]>;
82def R58 : SPUVecReg<58, "$58">, DwarfRegNum<[58]>;
83def R59 : SPUVecReg<59, "$59">, DwarfRegNum<[59]>;
84def R60 : SPUVecReg<60, "$60">, DwarfRegNum<[60]>;
85def R61 : SPUVecReg<61, "$61">, DwarfRegNum<[61]>;
86def R62 : SPUVecReg<62, "$62">, DwarfRegNum<[62]>;
87def R63 : SPUVecReg<63, "$63">, DwarfRegNum<[63]>;
88def R64 : SPUVecReg<64, "$64">, DwarfRegNum<[64]>;
89def R65 : SPUVecReg<65, "$65">, DwarfRegNum<[65]>;
90def R66 : SPUVecReg<66, "$66">, DwarfRegNum<[66]>;
91def R67 : SPUVecReg<67, "$67">, DwarfRegNum<[67]>;
92def R68 : SPUVecReg<68, "$68">, DwarfRegNum<[68]>;
93def R69 : SPUVecReg<69, "$69">, DwarfRegNum<[69]>;
94def R70 : SPUVecReg<70, "$70">, DwarfRegNum<[70]>;
95def R71 : SPUVecReg<71, "$71">, DwarfRegNum<[71]>;
96def R72 : SPUVecReg<72, "$72">, DwarfRegNum<[72]>;
97def R73 : SPUVecReg<73, "$73">, DwarfRegNum<[73]>;
98def R74 : SPUVecReg<74, "$74">, DwarfRegNum<[74]>;
99def R75 : SPUVecReg<75, "$75">, DwarfRegNum<[75]>;
100def R76 : SPUVecReg<76, "$76">, DwarfRegNum<[76]>;
101def R77 : SPUVecReg<77, "$77">, DwarfRegNum<[77]>;
102def R78 : SPUVecReg<78, "$78">, DwarfRegNum<[78]>;
103def R79 : SPUVecReg<79, "$79">, DwarfRegNum<[79]>;
104def R80 : SPUVecReg<80, "$80">, DwarfRegNum<[80]>;
105def R81 : SPUVecReg<81, "$81">, DwarfRegNum<[81]>;
106def R82 : SPUVecReg<82, "$82">, DwarfRegNum<[82]>;
107def R83 : SPUVecReg<83, "$83">, DwarfRegNum<[83]>;
108def R84 : SPUVecReg<84, "$84">, DwarfRegNum<[84]>;
109def R85 : SPUVecReg<85, "$85">, DwarfRegNum<[85]>;
110def R86 : SPUVecReg<86, "$86">, DwarfRegNum<[86]>;
111def R87 : SPUVecReg<87, "$87">, DwarfRegNum<[87]>;
112def R88 : SPUVecReg<88, "$88">, DwarfRegNum<[88]>;
113def R89 : SPUVecReg<89, "$89">, DwarfRegNum<[89]>;
114def R90 : SPUVecReg<90, "$90">, DwarfRegNum<[90]>;
115def R91 : SPUVecReg<91, "$91">, DwarfRegNum<[91]>;
116def R92 : SPUVecReg<92, "$92">, DwarfRegNum<[92]>;
117def R93 : SPUVecReg<93, "$93">, DwarfRegNum<[93]>;
118def R94 : SPUVecReg<94, "$94">, DwarfRegNum<[94]>;
119def R95 : SPUVecReg<95, "$95">, DwarfRegNum<[95]>;
120def R96 : SPUVecReg<96, "$96">, DwarfRegNum<[96]>;
121def R97 : SPUVecReg<97, "$97">, DwarfRegNum<[97]>;
122def R98 : SPUVecReg<98, "$98">, DwarfRegNum<[98]>;
123def R99 : SPUVecReg<99, "$99">, DwarfRegNum<[99]>;
124def R100 : SPUVecReg<100, "$100">, DwarfRegNum<[100]>;
125def R101 : SPUVecReg<101, "$101">, DwarfRegNum<[101]>;
126def R102 : SPUVecReg<102, "$102">, DwarfRegNum<[102]>;
127def R103 : SPUVecReg<103, "$103">, DwarfRegNum<[103]>;
128def R104 : SPUVecReg<104, "$104">, DwarfRegNum<[104]>;
129def R105 : SPUVecReg<105, "$105">, DwarfRegNum<[105]>;
130def R106 : SPUVecReg<106, "$106">, DwarfRegNum<[106]>;
131def R107 : SPUVecReg<107, "$107">, DwarfRegNum<[107]>;
132def R108 : SPUVecReg<108, "$108">, DwarfRegNum<[108]>;
133def R109 : SPUVecReg<109, "$109">, DwarfRegNum<[109]>;
134def R110 : SPUVecReg<110, "$110">, DwarfRegNum<[110]>;
135def R111 : SPUVecReg<111, "$111">, DwarfRegNum<[111]>;
136def R112 : SPUVecReg<112, "$112">, DwarfRegNum<[112]>;
137def R113 : SPUVecReg<113, "$113">, DwarfRegNum<[113]>;
138def R114 : SPUVecReg<114, "$114">, DwarfRegNum<[114]>;
139def R115 : SPUVecReg<115, "$115">, DwarfRegNum<[115]>;
140def R116 : SPUVecReg<116, "$116">, DwarfRegNum<[116]>;
141def R117 : SPUVecReg<117, "$117">, DwarfRegNum<[117]>;
142def R118 : SPUVecReg<118, "$118">, DwarfRegNum<[118]>;
143def R119 : SPUVecReg<119, "$119">, DwarfRegNum<[119]>;
144def R120 : SPUVecReg<120, "$120">, DwarfRegNum<[120]>;
145def R121 : SPUVecReg<121, "$121">, DwarfRegNum<[121]>;
146def R122 : SPUVecReg<122, "$122">, DwarfRegNum<[122]>;
147def R123 : SPUVecReg<123, "$123">, DwarfRegNum<[123]>;
148def R124 : SPUVecReg<124, "$124">, DwarfRegNum<[124]>;
149def R125 : SPUVecReg<125, "$125">, DwarfRegNum<[125]>;
150def R126 : SPUVecReg<126, "$126">, DwarfRegNum<[126]>;
151def R127 : SPUVecReg<127, "$127">, DwarfRegNum<[127]>;
152
153/* Need floating point status register here: */
154/* def FPCSR : ... */
155
156// The SPU's registers as 128-bit wide entities, and can function as general
157// purpose registers, where the operands are in the "preferred slot":
158// The non-volatile registers are allocated in reverse order, like PPC does it.
159def GPRC : RegisterClass<"SPU", [i128], 128,
160                         (add (sequence "R%u", 0, 79),
161                              (sequence "R%u", 127, 80))>;
162
163// The SPU's registers as 64-bit wide (double word integer) "preferred slot":
164def R64C : RegisterClass<"SPU", [i64], 128, (add GPRC)>;
165
166// The SPU's registers as 64-bit wide (double word) FP "preferred slot":
167def R64FP : RegisterClass<"SPU", [f64], 128, (add GPRC)>;
168
169// The SPU's registers as 32-bit wide (word) "preferred slot":
170def R32C : RegisterClass<"SPU", [i32], 128, (add GPRC)>;
171
172// The SPU's registers as single precision floating point "preferred slot":
173def R32FP : RegisterClass<"SPU", [f32], 128, (add GPRC)>;
174
175// The SPU's registers as 16-bit wide (halfword) "preferred slot":
176def R16C : RegisterClass<"SPU", [i16], 128, (add GPRC)>;
177
178// The SPU's registers as 8-bit wide (byte) "preferred slot":
179def R8C : RegisterClass<"SPU", [i8], 128, (add GPRC)>;
180
181// The SPU's registers as vector registers:
182def VECREG : RegisterClass<"SPU", [v16i8,v8i16,v4i32,v4f32,v2i64,v2f64], 128,
183                           (add GPRC)>;
184