/src/build/lib/Target/AVR/AVRGenRegisterInfo.inc
Line | Count | Source (jump to first uncovered line) |
1 | | /*===- TableGen'erated file -------------------------------------*- C++ -*-===*\ |
2 | | |* *| |
3 | | |* Target Register Enum Values *| |
4 | | |* *| |
5 | | |* Automatically generated file, do not edit! *| |
6 | | |* *| |
7 | | \*===----------------------------------------------------------------------===*/ |
8 | | |
9 | | |
10 | | #ifdef GET_REGINFO_ENUM |
11 | | #undef GET_REGINFO_ENUM |
12 | | |
13 | | namespace llvm { |
14 | | |
15 | | class MCRegisterClass; |
16 | | extern const MCRegisterClass AVRMCRegisterClasses[]; |
17 | | |
18 | | namespace AVR { |
19 | | enum { |
20 | | NoRegister, |
21 | | SP = 1, |
22 | | SPH = 2, |
23 | | SPL = 3, |
24 | | SREG = 4, |
25 | | R0 = 5, |
26 | | R1 = 6, |
27 | | R2 = 7, |
28 | | R3 = 8, |
29 | | R4 = 9, |
30 | | R5 = 10, |
31 | | R6 = 11, |
32 | | R7 = 12, |
33 | | R8 = 13, |
34 | | R9 = 14, |
35 | | R10 = 15, |
36 | | R11 = 16, |
37 | | R12 = 17, |
38 | | R13 = 18, |
39 | | R14 = 19, |
40 | | R15 = 20, |
41 | | R16 = 21, |
42 | | R17 = 22, |
43 | | R18 = 23, |
44 | | R19 = 24, |
45 | | R20 = 25, |
46 | | R21 = 26, |
47 | | R22 = 27, |
48 | | R23 = 28, |
49 | | R24 = 29, |
50 | | R25 = 30, |
51 | | R26 = 31, |
52 | | R27 = 32, |
53 | | R28 = 33, |
54 | | R29 = 34, |
55 | | R30 = 35, |
56 | | R31 = 36, |
57 | | R1R0 = 37, |
58 | | R3R2 = 38, |
59 | | R5R4 = 39, |
60 | | R7R6 = 40, |
61 | | R9R8 = 41, |
62 | | R10R9 = 42, |
63 | | R11R10 = 43, |
64 | | R12R11 = 44, |
65 | | R13R12 = 45, |
66 | | R14R13 = 46, |
67 | | R15R14 = 47, |
68 | | R16R15 = 48, |
69 | | R17R16 = 49, |
70 | | R18R17 = 50, |
71 | | R19R18 = 51, |
72 | | R20R19 = 52, |
73 | | R21R20 = 53, |
74 | | R22R21 = 54, |
75 | | R23R22 = 55, |
76 | | R24R23 = 56, |
77 | | R25R24 = 57, |
78 | | R26R25 = 58, |
79 | | R27R26 = 59, |
80 | | R29R28 = 60, |
81 | | R31R30 = 61, |
82 | | NUM_TARGET_REGS // 62 |
83 | | }; |
84 | | } // end namespace AVR |
85 | | |
86 | | // Register classes |
87 | | |
88 | | namespace AVR { |
89 | | enum { |
90 | | GPR8RegClassID = 0, |
91 | | GPR8loRegClassID = 1, |
92 | | LD8RegClassID = 2, |
93 | | LD8loRegClassID = 3, |
94 | | CCRRegClassID = 4, |
95 | | DREGSRegClassID = 5, |
96 | | DREGSMOVWRegClassID = 6, |
97 | | DREGS_with_sub_hi_in_LD8RegClassID = 7, |
98 | | DREGS_with_sub_lo_in_LD8RegClassID = 8, |
99 | | DREGS_with_sub_lo_in_GPR8loRegClassID = 9, |
100 | | DREGS_with_sub_hi_in_GPR8loRegClassID = 10, |
101 | | DLDREGSRegClassID = 11, |
102 | | DREGS_with_sub_hi_in_LD8loRegClassID = 12, |
103 | | DREGS_with_sub_lo_in_LD8loRegClassID = 13, |
104 | | DREGSloRegClassID = 14, |
105 | | DREGS_with_sub_hi_in_LD8lo_and_DREGS_with_sub_lo_in_LD8RegClassID = 15, |
106 | | DREGSLD8loRegClassID = 16, |
107 | | IWREGSRegClassID = 17, |
108 | | PTRREGSRegClassID = 18, |
109 | | PTRDISPREGSRegClassID = 19, |
110 | | DREGS_with_sub_hi_in_LD8_and_DREGS_with_sub_lo_in_GPR8loRegClassID = 20, |
111 | | GPRSPRegClassID = 21, |
112 | | ZREGRegClassID = 22, |
113 | | |
114 | | }; |
115 | | } // end namespace AVR |
116 | | |
117 | | |
118 | | // Register alternate name indices |
119 | | |
120 | | namespace AVR { |
121 | | enum { |
122 | | NoRegAltName, // 0 |
123 | | ptr, // 1 |
124 | | NUM_TARGET_REG_ALT_NAMES = 2 |
125 | | }; |
126 | | } // end namespace AVR |
127 | | |
128 | | |
129 | | // Subregister indices |
130 | | |
131 | | namespace AVR { |
132 | | enum : uint16_t { |
133 | | NoSubRegister, |
134 | | sub_hi, // 1 |
135 | | sub_lo, // 2 |
136 | | NUM_TARGET_SUBREGS |
137 | | }; |
138 | | } // end namespace AVR |
139 | | |
140 | | // Register pressure sets enum. |
141 | | namespace AVR { |
142 | | enum RegisterPressureSets { |
143 | | CCR = 0, |
144 | | DREGS_with_sub_hi_in_LD8_and_DREGS_with_sub_lo_in_GPR8lo = 1, |
145 | | GPRSP = 2, |
146 | | IWREGS = 3, |
147 | | LD8lo = 4, |
148 | | LD8 = 5, |
149 | | GPR8lo = 6, |
150 | | GPR8lo_with_LD8lo = 7, |
151 | | GPR8 = 8, |
152 | | }; |
153 | | } // end namespace AVR |
154 | | |
155 | | } // end namespace llvm |
156 | | |
157 | | #endif // GET_REGINFO_ENUM |
158 | | |
159 | | /*===- TableGen'erated file -------------------------------------*- C++ -*-===*\ |
160 | | |* *| |
161 | | |* MC Register Information *| |
162 | | |* *| |
163 | | |* Automatically generated file, do not edit! *| |
164 | | |* *| |
165 | | \*===----------------------------------------------------------------------===*/ |
166 | | |
167 | | |
168 | | #ifdef GET_REGINFO_MC_DESC |
169 | | #undef GET_REGINFO_MC_DESC |
170 | | |
171 | | namespace llvm { |
172 | | |
173 | | extern const int16_t AVRRegDiffLists[] = { |
174 | | /* 0 */ -2, 0, |
175 | | /* 2 */ 2, -1, 0, |
176 | | /* 5 */ -32, 1, 0, |
177 | | /* 8 */ -31, 1, 0, |
178 | | /* 11 */ -30, 1, 0, |
179 | | /* 14 */ -29, 1, 0, |
180 | | /* 17 */ -28, 1, 0, |
181 | | /* 20 */ -27, 1, 0, |
182 | | /* 23 */ -26, 1, 0, |
183 | | /* 26 */ 27, 1, 0, |
184 | | /* 29 */ 25, 0, |
185 | | /* 31 */ 26, 0, |
186 | | /* 33 */ 27, 0, |
187 | | /* 35 */ 28, 0, |
188 | | /* 37 */ 29, 0, |
189 | | /* 39 */ 30, 0, |
190 | | /* 41 */ 31, 0, |
191 | | /* 43 */ 32, 0, |
192 | | }; |
193 | | |
194 | | extern const LaneBitmask AVRLaneMaskLists[] = { |
195 | | /* 0 */ LaneBitmask(0x0000000000000002), LaneBitmask(0x0000000000000001), LaneBitmask::getAll(), |
196 | | /* 3 */ LaneBitmask(0xFFFFFFFFFFFFFFFF), LaneBitmask::getAll(), |
197 | | }; |
198 | | |
199 | | extern const uint16_t AVRSubRegIdxLists[] = { |
200 | | /* 0 */ 2, 1, 0, |
201 | | }; |
202 | | |
203 | | extern const MCRegisterInfo::SubRegCoveredBits AVRSubRegIdxRanges[] = { |
204 | | { 65535, 65535 }, |
205 | | { 8, 8 }, // sub_hi |
206 | | { 0, 8 }, // sub_lo |
207 | | }; |
208 | | |
209 | | |
210 | | #ifdef __GNUC__ |
211 | | #pragma GCC diagnostic push |
212 | | #pragma GCC diagnostic ignored "-Woverlength-strings" |
213 | | #endif |
214 | | extern const char AVRRegStrings[] = { |
215 | | /* 0 */ "R11R10\0" |
216 | | /* 7 */ "R21R20\0" |
217 | | /* 14 */ "R31R30\0" |
218 | | /* 21 */ "R1R0\0" |
219 | | /* 26 */ "R12R11\0" |
220 | | /* 33 */ "R22R21\0" |
221 | | /* 40 */ "R31\0" |
222 | | /* 44 */ "R1\0" |
223 | | /* 47 */ "R13R12\0" |
224 | | /* 54 */ "R23R22\0" |
225 | | /* 61 */ "R3R2\0" |
226 | | /* 66 */ "R14R13\0" |
227 | | /* 73 */ "R24R23\0" |
228 | | /* 80 */ "R3\0" |
229 | | /* 83 */ "R15R14\0" |
230 | | /* 90 */ "R25R24\0" |
231 | | /* 97 */ "R5R4\0" |
232 | | /* 102 */ "R16R15\0" |
233 | | /* 109 */ "R26R25\0" |
234 | | /* 116 */ "R5\0" |
235 | | /* 119 */ "R17R16\0" |
236 | | /* 126 */ "R27R26\0" |
237 | | /* 133 */ "R7R6\0" |
238 | | /* 138 */ "R18R17\0" |
239 | | /* 145 */ "R27\0" |
240 | | /* 149 */ "R7\0" |
241 | | /* 152 */ "R19R18\0" |
242 | | /* 159 */ "R29R28\0" |
243 | | /* 166 */ "R9R8\0" |
244 | | /* 171 */ "R20R19\0" |
245 | | /* 178 */ "R29\0" |
246 | | /* 182 */ "R10R9\0" |
247 | | /* 188 */ "SREG\0" |
248 | | /* 193 */ "SPH\0" |
249 | | /* 197 */ "SPL\0" |
250 | | /* 201 */ "SP\0" |
251 | | }; |
252 | | #ifdef __GNUC__ |
253 | | #pragma GCC diagnostic pop |
254 | | #endif |
255 | | |
256 | | extern const MCRegisterDesc AVRRegDesc[] = { // Descriptors |
257 | | { 6, 0, 0, 0, 0, 0 }, |
258 | | { 201, 2, 1, 0, 24576, 0 }, |
259 | | { 193, 1, 3, 2, 4097, 3 }, |
260 | | { 197, 1, 0, 2, 4096, 3 }, |
261 | | { 188, 1, 1, 2, 4098, 3 }, |
262 | | { 23, 1, 43, 2, 4099, 3 }, |
263 | | { 44, 1, 41, 2, 4100, 3 }, |
264 | | { 63, 1, 41, 2, 4101, 3 }, |
265 | | { 80, 1, 39, 2, 4102, 3 }, |
266 | | { 99, 1, 39, 2, 4103, 3 }, |
267 | | { 116, 1, 37, 2, 4104, 3 }, |
268 | | { 135, 1, 37, 2, 4105, 3 }, |
269 | | { 149, 1, 35, 2, 4106, 3 }, |
270 | | { 168, 1, 35, 2, 4107, 3 }, |
271 | | { 185, 1, 26, 2, 4108, 3 }, |
272 | | { 3, 1, 26, 2, 4109, 3 }, |
273 | | { 29, 1, 26, 2, 4110, 3 }, |
274 | | { 50, 1, 26, 2, 4111, 3 }, |
275 | | { 69, 1, 26, 2, 4112, 3 }, |
276 | | { 86, 1, 26, 2, 4113, 3 }, |
277 | | { 105, 1, 26, 2, 4114, 3 }, |
278 | | { 122, 1, 26, 2, 4115, 3 }, |
279 | | { 141, 1, 26, 2, 4116, 3 }, |
280 | | { 155, 1, 26, 2, 4117, 3 }, |
281 | | { 174, 1, 26, 2, 4118, 3 }, |
282 | | { 10, 1, 26, 2, 4119, 3 }, |
283 | | { 36, 1, 26, 2, 4120, 3 }, |
284 | | { 57, 1, 26, 2, 4121, 3 }, |
285 | | { 76, 1, 26, 2, 4122, 3 }, |
286 | | { 93, 1, 26, 2, 4123, 3 }, |
287 | | { 112, 1, 26, 2, 4124, 3 }, |
288 | | { 129, 1, 26, 2, 4125, 3 }, |
289 | | { 145, 1, 33, 2, 4126, 3 }, |
290 | | { 162, 1, 33, 2, 4127, 3 }, |
291 | | { 178, 1, 31, 2, 4128, 3 }, |
292 | | { 17, 1, 31, 2, 4129, 3 }, |
293 | | { 40, 1, 29, 2, 4130, 3 }, |
294 | | { 21, 5, 1, 0, 24579, 0 }, |
295 | | { 61, 8, 1, 0, 24581, 0 }, |
296 | | { 97, 11, 1, 0, 24583, 0 }, |
297 | | { 133, 14, 1, 0, 24585, 0 }, |
298 | | { 166, 17, 1, 0, 24587, 0 }, |
299 | | { 182, 17, 1, 0, 24588, 0 }, |
300 | | { 0, 17, 1, 0, 24589, 0 }, |
301 | | { 26, 17, 1, 0, 24590, 0 }, |
302 | | { 47, 17, 1, 0, 24591, 0 }, |
303 | | { 66, 17, 1, 0, 24592, 0 }, |
304 | | { 83, 17, 1, 0, 24593, 0 }, |
305 | | { 102, 17, 1, 0, 24594, 0 }, |
306 | | { 119, 17, 1, 0, 24595, 0 }, |
307 | | { 138, 17, 1, 0, 24596, 0 }, |
308 | | { 152, 17, 1, 0, 24597, 0 }, |
309 | | { 171, 17, 1, 0, 24598, 0 }, |
310 | | { 7, 17, 1, 0, 24599, 0 }, |
311 | | { 33, 17, 1, 0, 24600, 0 }, |
312 | | { 54, 17, 1, 0, 24601, 0 }, |
313 | | { 73, 17, 1, 0, 24602, 0 }, |
314 | | { 90, 17, 1, 0, 24603, 0 }, |
315 | | { 109, 17, 1, 0, 24604, 0 }, |
316 | | { 126, 17, 1, 0, 24605, 0 }, |
317 | | { 159, 20, 1, 0, 24607, 0 }, |
318 | | { 14, 23, 1, 0, 24609, 0 }, |
319 | | }; |
320 | | |
321 | | extern const MCPhysReg AVRRegUnitRoots[][2] = { |
322 | | { AVR::SPL }, |
323 | | { AVR::SPH }, |
324 | | { AVR::SREG }, |
325 | | { AVR::R0 }, |
326 | | { AVR::R1 }, |
327 | | { AVR::R2 }, |
328 | | { AVR::R3 }, |
329 | | { AVR::R4 }, |
330 | | { AVR::R5 }, |
331 | | { AVR::R6 }, |
332 | | { AVR::R7 }, |
333 | | { AVR::R8 }, |
334 | | { AVR::R9 }, |
335 | | { AVR::R10 }, |
336 | | { AVR::R11 }, |
337 | | { AVR::R12 }, |
338 | | { AVR::R13 }, |
339 | | { AVR::R14 }, |
340 | | { AVR::R15 }, |
341 | | { AVR::R16 }, |
342 | | { AVR::R17 }, |
343 | | { AVR::R18 }, |
344 | | { AVR::R19 }, |
345 | | { AVR::R20 }, |
346 | | { AVR::R21 }, |
347 | | { AVR::R22 }, |
348 | | { AVR::R23 }, |
349 | | { AVR::R24 }, |
350 | | { AVR::R25 }, |
351 | | { AVR::R26 }, |
352 | | { AVR::R27 }, |
353 | | { AVR::R28 }, |
354 | | { AVR::R29 }, |
355 | | { AVR::R30 }, |
356 | | { AVR::R31 }, |
357 | | }; |
358 | | |
359 | | namespace { // Register classes... |
360 | | // GPR8 Register Class... |
361 | | const MCPhysReg GPR8[] = { |
362 | | AVR::R24, AVR::R25, AVR::R18, AVR::R19, AVR::R20, AVR::R21, AVR::R22, AVR::R23, AVR::R30, AVR::R31, AVR::R26, AVR::R27, AVR::R28, AVR::R29, AVR::R17, AVR::R16, AVR::R15, AVR::R14, AVR::R13, AVR::R12, AVR::R11, AVR::R10, AVR::R9, AVR::R8, AVR::R7, AVR::R6, AVR::R5, AVR::R4, AVR::R3, AVR::R2, AVR::R0, AVR::R1, |
363 | | }; |
364 | | |
365 | | // GPR8 Bit set. |
366 | | const uint8_t GPR8Bits[] = { |
367 | | 0xe0, 0xff, 0xff, 0xff, 0x1f, |
368 | | }; |
369 | | |
370 | | // GPR8lo Register Class... |
371 | | const MCPhysReg GPR8lo[] = { |
372 | | AVR::R15, AVR::R14, AVR::R13, AVR::R12, AVR::R11, AVR::R10, AVR::R9, AVR::R8, AVR::R7, AVR::R6, AVR::R5, AVR::R4, AVR::R3, AVR::R2, AVR::R0, AVR::R1, |
373 | | }; |
374 | | |
375 | | // GPR8lo Bit set. |
376 | | const uint8_t GPR8loBits[] = { |
377 | | 0xe0, 0xff, 0x1f, |
378 | | }; |
379 | | |
380 | | // LD8 Register Class... |
381 | | const MCPhysReg LD8[] = { |
382 | | AVR::R24, AVR::R25, AVR::R18, AVR::R19, AVR::R20, AVR::R21, AVR::R22, AVR::R23, AVR::R30, AVR::R31, AVR::R26, AVR::R27, AVR::R28, AVR::R29, AVR::R17, AVR::R16, |
383 | | }; |
384 | | |
385 | | // LD8 Bit set. |
386 | | const uint8_t LD8Bits[] = { |
387 | | 0x00, 0x00, 0xe0, 0xff, 0x1f, |
388 | | }; |
389 | | |
390 | | // LD8lo Register Class... |
391 | | const MCPhysReg LD8lo[] = { |
392 | | AVR::R23, AVR::R22, AVR::R21, AVR::R20, AVR::R19, AVR::R18, AVR::R17, AVR::R16, |
393 | | }; |
394 | | |
395 | | // LD8lo Bit set. |
396 | | const uint8_t LD8loBits[] = { |
397 | | 0x00, 0x00, 0xe0, 0x1f, |
398 | | }; |
399 | | |
400 | | // CCR Register Class... |
401 | | const MCPhysReg CCR[] = { |
402 | | AVR::SREG, |
403 | | }; |
404 | | |
405 | | // CCR Bit set. |
406 | | const uint8_t CCRBits[] = { |
407 | | 0x10, |
408 | | }; |
409 | | |
410 | | // DREGS Register Class... |
411 | | const MCPhysReg DREGS[] = { |
412 | | AVR::R25R24, AVR::R19R18, AVR::R21R20, AVR::R23R22, AVR::R31R30, AVR::R27R26, AVR::R29R28, AVR::R17R16, AVR::R15R14, AVR::R13R12, AVR::R11R10, AVR::R9R8, AVR::R7R6, AVR::R5R4, AVR::R3R2, AVR::R1R0, AVR::R26R25, AVR::R24R23, AVR::R22R21, AVR::R20R19, AVR::R18R17, AVR::R16R15, AVR::R14R13, AVR::R12R11, AVR::R10R9, |
413 | | }; |
414 | | |
415 | | // DREGS Bit set. |
416 | | const uint8_t DREGSBits[] = { |
417 | | 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0x3f, |
418 | | }; |
419 | | |
420 | | // DREGSMOVW Register Class... |
421 | | const MCPhysReg DREGSMOVW[] = { |
422 | | AVR::R25R24, AVR::R19R18, AVR::R21R20, AVR::R23R22, AVR::R31R30, AVR::R27R26, AVR::R29R28, AVR::R17R16, AVR::R15R14, AVR::R13R12, AVR::R11R10, AVR::R9R8, AVR::R7R6, AVR::R5R4, AVR::R3R2, AVR::R1R0, |
423 | | }; |
424 | | |
425 | | // DREGSMOVW Bit set. |
426 | | const uint8_t DREGSMOVWBits[] = { |
427 | | 0x00, 0x00, 0x00, 0x00, 0xe0, 0xab, 0xaa, 0x3a, |
428 | | }; |
429 | | |
430 | | // DREGS_with_sub_hi_in_LD8 Register Class... |
431 | | const MCPhysReg DREGS_with_sub_hi_in_LD8[] = { |
432 | | AVR::R25R24, AVR::R19R18, AVR::R21R20, AVR::R23R22, AVR::R31R30, AVR::R27R26, AVR::R29R28, AVR::R17R16, AVR::R26R25, AVR::R24R23, AVR::R22R21, AVR::R20R19, AVR::R18R17, AVR::R16R15, |
433 | | }; |
434 | | |
435 | | // DREGS_with_sub_hi_in_LD8 Bit set. |
436 | | const uint8_t DREGS_with_sub_hi_in_LD8Bits[] = { |
437 | | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x3f, |
438 | | }; |
439 | | |
440 | | // DREGS_with_sub_lo_in_LD8 Register Class... |
441 | | const MCPhysReg DREGS_with_sub_lo_in_LD8[] = { |
442 | | AVR::R25R24, AVR::R19R18, AVR::R21R20, AVR::R23R22, AVR::R31R30, AVR::R27R26, AVR::R29R28, AVR::R17R16, AVR::R26R25, AVR::R24R23, AVR::R22R21, AVR::R20R19, AVR::R18R17, |
443 | | }; |
444 | | |
445 | | // DREGS_with_sub_lo_in_LD8 Bit set. |
446 | | const uint8_t DREGS_with_sub_lo_in_LD8Bits[] = { |
447 | | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x3f, |
448 | | }; |
449 | | |
450 | | // DREGS_with_sub_lo_in_GPR8lo Register Class... |
451 | | const MCPhysReg DREGS_with_sub_lo_in_GPR8lo[] = { |
452 | | AVR::R15R14, AVR::R13R12, AVR::R11R10, AVR::R9R8, AVR::R7R6, AVR::R5R4, AVR::R3R2, AVR::R1R0, AVR::R16R15, AVR::R14R13, AVR::R12R11, AVR::R10R9, |
453 | | }; |
454 | | |
455 | | // DREGS_with_sub_lo_in_GPR8lo Bit set. |
456 | | const uint8_t DREGS_with_sub_lo_in_GPR8loBits[] = { |
457 | | 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0x01, |
458 | | }; |
459 | | |
460 | | // DREGS_with_sub_hi_in_GPR8lo Register Class... |
461 | | const MCPhysReg DREGS_with_sub_hi_in_GPR8lo[] = { |
462 | | AVR::R15R14, AVR::R13R12, AVR::R11R10, AVR::R9R8, AVR::R7R6, AVR::R5R4, AVR::R3R2, AVR::R1R0, AVR::R14R13, AVR::R12R11, AVR::R10R9, |
463 | | }; |
464 | | |
465 | | // DREGS_with_sub_hi_in_GPR8lo Bit set. |
466 | | const uint8_t DREGS_with_sub_hi_in_GPR8loBits[] = { |
467 | | 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, |
468 | | }; |
469 | | |
470 | | // DLDREGS Register Class... |
471 | | const MCPhysReg DLDREGS[] = { |
472 | | AVR::R25R24, AVR::R19R18, AVR::R21R20, AVR::R23R22, AVR::R31R30, AVR::R27R26, AVR::R29R28, AVR::R17R16, |
473 | | }; |
474 | | |
475 | | // DLDREGS Bit set. |
476 | | const uint8_t DLDREGSBits[] = { |
477 | | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xaa, 0x3a, |
478 | | }; |
479 | | |
480 | | // DREGS_with_sub_hi_in_LD8lo Register Class... |
481 | | const MCPhysReg DREGS_with_sub_hi_in_LD8lo[] = { |
482 | | AVR::R19R18, AVR::R21R20, AVR::R23R22, AVR::R17R16, AVR::R22R21, AVR::R20R19, AVR::R18R17, AVR::R16R15, |
483 | | }; |
484 | | |
485 | | // DREGS_with_sub_hi_in_LD8lo Bit set. |
486 | | const uint8_t DREGS_with_sub_hi_in_LD8loBits[] = { |
487 | | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, |
488 | | }; |
489 | | |
490 | | // DREGS_with_sub_lo_in_LD8lo Register Class... |
491 | | const MCPhysReg DREGS_with_sub_lo_in_LD8lo[] = { |
492 | | AVR::R19R18, AVR::R21R20, AVR::R23R22, AVR::R17R16, AVR::R24R23, AVR::R22R21, AVR::R20R19, AVR::R18R17, |
493 | | }; |
494 | | |
495 | | // DREGS_with_sub_lo_in_LD8lo Bit set. |
496 | | const uint8_t DREGS_with_sub_lo_in_LD8loBits[] = { |
497 | | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x01, |
498 | | }; |
499 | | |
500 | | // DREGSlo Register Class... |
501 | | const MCPhysReg DREGSlo[] = { |
502 | | AVR::R15R14, AVR::R13R12, AVR::R11R10, AVR::R9R8, AVR::R7R6, AVR::R5R4, AVR::R3R2, AVR::R1R0, |
503 | | }; |
504 | | |
505 | | // DREGSlo Bit set. |
506 | | const uint8_t DREGSloBits[] = { |
507 | | 0x00, 0x00, 0x00, 0x00, 0xe0, 0xab, |
508 | | }; |
509 | | |
510 | | // DREGS_with_sub_hi_in_LD8lo_and_DREGS_with_sub_lo_in_LD8 Register Class... |
511 | | const MCPhysReg DREGS_with_sub_hi_in_LD8lo_and_DREGS_with_sub_lo_in_LD8[] = { |
512 | | AVR::R19R18, AVR::R21R20, AVR::R23R22, AVR::R17R16, AVR::R22R21, AVR::R20R19, AVR::R18R17, |
513 | | }; |
514 | | |
515 | | // DREGS_with_sub_hi_in_LD8lo_and_DREGS_with_sub_lo_in_LD8 Bit set. |
516 | | const uint8_t DREGS_with_sub_hi_in_LD8lo_and_DREGS_with_sub_lo_in_LD8Bits[] = { |
517 | | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, |
518 | | }; |
519 | | |
520 | | // DREGSLD8lo Register Class... |
521 | | const MCPhysReg DREGSLD8lo[] = { |
522 | | AVR::R19R18, AVR::R21R20, AVR::R23R22, AVR::R17R16, |
523 | | }; |
524 | | |
525 | | // DREGSLD8lo Bit set. |
526 | | const uint8_t DREGSLD8loBits[] = { |
527 | | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xaa, |
528 | | }; |
529 | | |
530 | | // IWREGS Register Class... |
531 | | const MCPhysReg IWREGS[] = { |
532 | | AVR::R25R24, AVR::R31R30, AVR::R27R26, AVR::R29R28, |
533 | | }; |
534 | | |
535 | | // IWREGS Bit set. |
536 | | const uint8_t IWREGSBits[] = { |
537 | | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3a, |
538 | | }; |
539 | | |
540 | | // PTRREGS Register Class... |
541 | | const MCPhysReg PTRREGS[] = { |
542 | | AVR::R27R26, AVR::R29R28, AVR::R31R30, |
543 | | }; |
544 | | |
545 | | // PTRREGS Bit set. |
546 | | const uint8_t PTRREGSBits[] = { |
547 | | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, |
548 | | }; |
549 | | |
550 | | // PTRDISPREGS Register Class... |
551 | | const MCPhysReg PTRDISPREGS[] = { |
552 | | AVR::R31R30, AVR::R29R28, |
553 | | }; |
554 | | |
555 | | // PTRDISPREGS Bit set. |
556 | | const uint8_t PTRDISPREGSBits[] = { |
557 | | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, |
558 | | }; |
559 | | |
560 | | // DREGS_with_sub_hi_in_LD8_and_DREGS_with_sub_lo_in_GPR8lo Register Class... |
561 | | const MCPhysReg DREGS_with_sub_hi_in_LD8_and_DREGS_with_sub_lo_in_GPR8lo[] = { |
562 | | AVR::R16R15, |
563 | | }; |
564 | | |
565 | | // DREGS_with_sub_hi_in_LD8_and_DREGS_with_sub_lo_in_GPR8lo Bit set. |
566 | | const uint8_t DREGS_with_sub_hi_in_LD8_and_DREGS_with_sub_lo_in_GPR8loBits[] = { |
567 | | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, |
568 | | }; |
569 | | |
570 | | // GPRSP Register Class... |
571 | | const MCPhysReg GPRSP[] = { |
572 | | AVR::SP, |
573 | | }; |
574 | | |
575 | | // GPRSP Bit set. |
576 | | const uint8_t GPRSPBits[] = { |
577 | | 0x02, |
578 | | }; |
579 | | |
580 | | // ZREG Register Class... |
581 | | const MCPhysReg ZREG[] = { |
582 | | AVR::R31R30, |
583 | | }; |
584 | | |
585 | | // ZREG Bit set. |
586 | | const uint8_t ZREGBits[] = { |
587 | | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, |
588 | | }; |
589 | | |
590 | | } // end anonymous namespace |
591 | | |
592 | | |
593 | | #ifdef __GNUC__ |
594 | | #pragma GCC diagnostic push |
595 | | #pragma GCC diagnostic ignored "-Woverlength-strings" |
596 | | #endif |
597 | | extern const char AVRRegClassStrings[] = { |
598 | | /* 0 */ "DREGS_with_sub_hi_in_LD8\0" |
599 | | /* 25 */ "DREGS_with_sub_hi_in_LD8lo_and_DREGS_with_sub_lo_in_LD8\0" |
600 | | /* 81 */ "GPR8\0" |
601 | | /* 86 */ "ZREG\0" |
602 | | /* 91 */ "GPRSP\0" |
603 | | /* 97 */ "CCR\0" |
604 | | /* 101 */ "DLDREGS\0" |
605 | | /* 109 */ "PTRDISPREGS\0" |
606 | | /* 121 */ "PTRREGS\0" |
607 | | /* 129 */ "IWREGS\0" |
608 | | /* 136 */ "DREGSMOVW\0" |
609 | | /* 146 */ "DREGSLD8lo\0" |
610 | | /* 157 */ "DREGS_with_sub_hi_in_LD8lo\0" |
611 | | /* 184 */ "DREGS_with_sub_lo_in_LD8lo\0" |
612 | | /* 211 */ "DREGS_with_sub_hi_in_GPR8lo\0" |
613 | | /* 239 */ "DREGS_with_sub_hi_in_LD8_and_DREGS_with_sub_lo_in_GPR8lo\0" |
614 | | /* 296 */ "DREGSlo\0" |
615 | | }; |
616 | | #ifdef __GNUC__ |
617 | | #pragma GCC diagnostic pop |
618 | | #endif |
619 | | |
620 | | extern const MCRegisterClass AVRMCRegisterClasses[] = { |
621 | | { GPR8, GPR8Bits, 81, 32, sizeof(GPR8Bits), AVR::GPR8RegClassID, 8, 1, true }, |
622 | | { GPR8lo, GPR8loBits, 232, 16, sizeof(GPR8loBits), AVR::GPR8loRegClassID, 8, 1, true }, |
623 | | { LD8, LD8Bits, 21, 16, sizeof(LD8Bits), AVR::LD8RegClassID, 8, 1, true }, |
624 | | { LD8lo, LD8loBits, 151, 8, sizeof(LD8loBits), AVR::LD8loRegClassID, 8, 1, true }, |
625 | | { CCR, CCRBits, 97, 1, sizeof(CCRBits), AVR::CCRRegClassID, 8, -1, true }, |
626 | | { DREGS, DREGSBits, 103, 25, sizeof(DREGSBits), AVR::DREGSRegClassID, 16, 1, true }, |
627 | | { DREGSMOVW, DREGSMOVWBits, 136, 16, sizeof(DREGSMOVWBits), AVR::DREGSMOVWRegClassID, 16, 1, true }, |
628 | | { DREGS_with_sub_hi_in_LD8, DREGS_with_sub_hi_in_LD8Bits, 0, 14, sizeof(DREGS_with_sub_hi_in_LD8Bits), AVR::DREGS_with_sub_hi_in_LD8RegClassID, 16, 1, true }, |
629 | | { DREGS_with_sub_lo_in_LD8, DREGS_with_sub_lo_in_LD8Bits, 56, 13, sizeof(DREGS_with_sub_lo_in_LD8Bits), AVR::DREGS_with_sub_lo_in_LD8RegClassID, 16, 1, true }, |
630 | | { DREGS_with_sub_lo_in_GPR8lo, DREGS_with_sub_lo_in_GPR8loBits, 268, 12, sizeof(DREGS_with_sub_lo_in_GPR8loBits), AVR::DREGS_with_sub_lo_in_GPR8loRegClassID, 16, 1, true }, |
631 | | { DREGS_with_sub_hi_in_GPR8lo, DREGS_with_sub_hi_in_GPR8loBits, 211, 11, sizeof(DREGS_with_sub_hi_in_GPR8loBits), AVR::DREGS_with_sub_hi_in_GPR8loRegClassID, 16, 1, true }, |
632 | | { DLDREGS, DLDREGSBits, 101, 8, sizeof(DLDREGSBits), AVR::DLDREGSRegClassID, 16, 1, true }, |
633 | | { DREGS_with_sub_hi_in_LD8lo, DREGS_with_sub_hi_in_LD8loBits, 157, 8, sizeof(DREGS_with_sub_hi_in_LD8loBits), AVR::DREGS_with_sub_hi_in_LD8loRegClassID, 16, 1, true }, |
634 | | { DREGS_with_sub_lo_in_LD8lo, DREGS_with_sub_lo_in_LD8loBits, 184, 8, sizeof(DREGS_with_sub_lo_in_LD8loBits), AVR::DREGS_with_sub_lo_in_LD8loRegClassID, 16, 1, true }, |
635 | | { DREGSlo, DREGSloBits, 296, 8, sizeof(DREGSloBits), AVR::DREGSloRegClassID, 16, 1, true }, |
636 | | { DREGS_with_sub_hi_in_LD8lo_and_DREGS_with_sub_lo_in_LD8, DREGS_with_sub_hi_in_LD8lo_and_DREGS_with_sub_lo_in_LD8Bits, 25, 7, sizeof(DREGS_with_sub_hi_in_LD8lo_and_DREGS_with_sub_lo_in_LD8Bits), AVR::DREGS_with_sub_hi_in_LD8lo_and_DREGS_with_sub_lo_in_LD8RegClassID, 16, 1, true }, |
637 | | { DREGSLD8lo, DREGSLD8loBits, 146, 4, sizeof(DREGSLD8loBits), AVR::DREGSLD8loRegClassID, 16, 1, true }, |
638 | | { IWREGS, IWREGSBits, 129, 4, sizeof(IWREGSBits), AVR::IWREGSRegClassID, 16, 1, true }, |
639 | | { PTRREGS, PTRREGSBits, 121, 3, sizeof(PTRREGSBits), AVR::PTRREGSRegClassID, 16, 1, true }, |
640 | | { PTRDISPREGS, PTRDISPREGSBits, 109, 2, sizeof(PTRDISPREGSBits), AVR::PTRDISPREGSRegClassID, 16, 1, true }, |
641 | | { DREGS_with_sub_hi_in_LD8_and_DREGS_with_sub_lo_in_GPR8lo, DREGS_with_sub_hi_in_LD8_and_DREGS_with_sub_lo_in_GPR8loBits, 239, 1, sizeof(DREGS_with_sub_hi_in_LD8_and_DREGS_with_sub_lo_in_GPR8loBits), AVR::DREGS_with_sub_hi_in_LD8_and_DREGS_with_sub_lo_in_GPR8loRegClassID, 16, 1, true }, |
642 | | { GPRSP, GPRSPBits, 91, 1, sizeof(GPRSPBits), AVR::GPRSPRegClassID, 16, 1, true }, |
643 | | { ZREG, ZREGBits, 86, 1, sizeof(ZREGBits), AVR::ZREGRegClassID, 16, 1, true }, |
644 | | }; |
645 | | |
646 | | // AVR Dwarf<->LLVM register mappings. |
647 | | extern const MCRegisterInfo::DwarfLLVMRegPair AVRDwarfFlavour0Dwarf2L[] = { |
648 | | { 0U, AVR::R1R0 }, |
649 | | { 1U, AVR::R1 }, |
650 | | { 2U, AVR::R3R2 }, |
651 | | { 3U, AVR::R3 }, |
652 | | { 4U, AVR::R5R4 }, |
653 | | { 5U, AVR::R5 }, |
654 | | { 6U, AVR::R7R6 }, |
655 | | { 7U, AVR::R7 }, |
656 | | { 8U, AVR::R9R8 }, |
657 | | { 9U, AVR::R10R9 }, |
658 | | { 10U, AVR::R11R10 }, |
659 | | { 11U, AVR::R12R11 }, |
660 | | { 12U, AVR::R13R12 }, |
661 | | { 13U, AVR::R14R13 }, |
662 | | { 14U, AVR::R15R14 }, |
663 | | { 15U, AVR::R16R15 }, |
664 | | { 16U, AVR::R17R16 }, |
665 | | { 17U, AVR::R18R17 }, |
666 | | { 18U, AVR::R19R18 }, |
667 | | { 19U, AVR::R20R19 }, |
668 | | { 20U, AVR::R21R20 }, |
669 | | { 21U, AVR::R22R21 }, |
670 | | { 22U, AVR::R23R22 }, |
671 | | { 23U, AVR::R24R23 }, |
672 | | { 24U, AVR::R25R24 }, |
673 | | { 25U, AVR::R26R25 }, |
674 | | { 26U, AVR::R27R26 }, |
675 | | { 27U, AVR::R27 }, |
676 | | { 28U, AVR::R29R28 }, |
677 | | { 29U, AVR::R29 }, |
678 | | { 30U, AVR::R31R30 }, |
679 | | { 31U, AVR::R31 }, |
680 | | { 32U, AVR::SPL }, |
681 | | { 33U, AVR::SPH }, |
682 | | { 88U, AVR::SREG }, |
683 | | }; |
684 | | extern const unsigned AVRDwarfFlavour0Dwarf2LSize = std::size(AVRDwarfFlavour0Dwarf2L); |
685 | | |
686 | | extern const MCRegisterInfo::DwarfLLVMRegPair AVREHFlavour0Dwarf2L[] = { |
687 | | { 0U, AVR::R1R0 }, |
688 | | { 1U, AVR::R1 }, |
689 | | { 2U, AVR::R3R2 }, |
690 | | { 3U, AVR::R3 }, |
691 | | { 4U, AVR::R5R4 }, |
692 | | { 5U, AVR::R5 }, |
693 | | { 6U, AVR::R7R6 }, |
694 | | { 7U, AVR::R7 }, |
695 | | { 8U, AVR::R9R8 }, |
696 | | { 9U, AVR::R10R9 }, |
697 | | { 10U, AVR::R11R10 }, |
698 | | { 11U, AVR::R12R11 }, |
699 | | { 12U, AVR::R13R12 }, |
700 | | { 13U, AVR::R14R13 }, |
701 | | { 14U, AVR::R15R14 }, |
702 | | { 15U, AVR::R16R15 }, |
703 | | { 16U, AVR::R17R16 }, |
704 | | { 17U, AVR::R18R17 }, |
705 | | { 18U, AVR::R19R18 }, |
706 | | { 19U, AVR::R20R19 }, |
707 | | { 20U, AVR::R21R20 }, |
708 | | { 21U, AVR::R22R21 }, |
709 | | { 22U, AVR::R23R22 }, |
710 | | { 23U, AVR::R24R23 }, |
711 | | { 24U, AVR::R25R24 }, |
712 | | { 25U, AVR::R26R25 }, |
713 | | { 26U, AVR::R27R26 }, |
714 | | { 27U, AVR::R27 }, |
715 | | { 28U, AVR::R29R28 }, |
716 | | { 29U, AVR::R29 }, |
717 | | { 30U, AVR::R31R30 }, |
718 | | { 31U, AVR::R31 }, |
719 | | { 32U, AVR::SPL }, |
720 | | { 33U, AVR::SPH }, |
721 | | { 88U, AVR::SREG }, |
722 | | }; |
723 | | extern const unsigned AVREHFlavour0Dwarf2LSize = std::size(AVREHFlavour0Dwarf2L); |
724 | | |
725 | | extern const MCRegisterInfo::DwarfLLVMRegPair AVRDwarfFlavour0L2Dwarf[] = { |
726 | | { AVR::SP, 32U }, |
727 | | { AVR::SPH, 33U }, |
728 | | { AVR::SPL, 32U }, |
729 | | { AVR::SREG, 88U }, |
730 | | { AVR::R0, 0U }, |
731 | | { AVR::R1, 1U }, |
732 | | { AVR::R2, 2U }, |
733 | | { AVR::R3, 3U }, |
734 | | { AVR::R4, 4U }, |
735 | | { AVR::R5, 5U }, |
736 | | { AVR::R6, 6U }, |
737 | | { AVR::R7, 7U }, |
738 | | { AVR::R8, 8U }, |
739 | | { AVR::R9, 9U }, |
740 | | { AVR::R10, 10U }, |
741 | | { AVR::R11, 11U }, |
742 | | { AVR::R12, 12U }, |
743 | | { AVR::R13, 13U }, |
744 | | { AVR::R14, 14U }, |
745 | | { AVR::R15, 15U }, |
746 | | { AVR::R16, 16U }, |
747 | | { AVR::R17, 17U }, |
748 | | { AVR::R18, 18U }, |
749 | | { AVR::R19, 19U }, |
750 | | { AVR::R20, 20U }, |
751 | | { AVR::R21, 21U }, |
752 | | { AVR::R22, 22U }, |
753 | | { AVR::R23, 23U }, |
754 | | { AVR::R24, 24U }, |
755 | | { AVR::R25, 25U }, |
756 | | { AVR::R26, 26U }, |
757 | | { AVR::R27, 27U }, |
758 | | { AVR::R28, 28U }, |
759 | | { AVR::R29, 29U }, |
760 | | { AVR::R30, 30U }, |
761 | | { AVR::R31, 31U }, |
762 | | { AVR::R1R0, 0U }, |
763 | | { AVR::R3R2, 2U }, |
764 | | { AVR::R5R4, 4U }, |
765 | | { AVR::R7R6, 6U }, |
766 | | { AVR::R9R8, 8U }, |
767 | | { AVR::R10R9, 9U }, |
768 | | { AVR::R11R10, 10U }, |
769 | | { AVR::R12R11, 11U }, |
770 | | { AVR::R13R12, 12U }, |
771 | | { AVR::R14R13, 13U }, |
772 | | { AVR::R15R14, 14U }, |
773 | | { AVR::R16R15, 15U }, |
774 | | { AVR::R17R16, 16U }, |
775 | | { AVR::R18R17, 17U }, |
776 | | { AVR::R19R18, 18U }, |
777 | | { AVR::R20R19, 19U }, |
778 | | { AVR::R21R20, 20U }, |
779 | | { AVR::R22R21, 21U }, |
780 | | { AVR::R23R22, 22U }, |
781 | | { AVR::R24R23, 23U }, |
782 | | { AVR::R25R24, 24U }, |
783 | | { AVR::R26R25, 25U }, |
784 | | { AVR::R27R26, 26U }, |
785 | | { AVR::R29R28, 28U }, |
786 | | { AVR::R31R30, 30U }, |
787 | | }; |
788 | | extern const unsigned AVRDwarfFlavour0L2DwarfSize = std::size(AVRDwarfFlavour0L2Dwarf); |
789 | | |
790 | | extern const MCRegisterInfo::DwarfLLVMRegPair AVREHFlavour0L2Dwarf[] = { |
791 | | { AVR::SP, 32U }, |
792 | | { AVR::SPH, 33U }, |
793 | | { AVR::SPL, 32U }, |
794 | | { AVR::SREG, 88U }, |
795 | | { AVR::R0, 0U }, |
796 | | { AVR::R1, 1U }, |
797 | | { AVR::R2, 2U }, |
798 | | { AVR::R3, 3U }, |
799 | | { AVR::R4, 4U }, |
800 | | { AVR::R5, 5U }, |
801 | | { AVR::R6, 6U }, |
802 | | { AVR::R7, 7U }, |
803 | | { AVR::R8, 8U }, |
804 | | { AVR::R9, 9U }, |
805 | | { AVR::R10, 10U }, |
806 | | { AVR::R11, 11U }, |
807 | | { AVR::R12, 12U }, |
808 | | { AVR::R13, 13U }, |
809 | | { AVR::R14, 14U }, |
810 | | { AVR::R15, 15U }, |
811 | | { AVR::R16, 16U }, |
812 | | { AVR::R17, 17U }, |
813 | | { AVR::R18, 18U }, |
814 | | { AVR::R19, 19U }, |
815 | | { AVR::R20, 20U }, |
816 | | { AVR::R21, 21U }, |
817 | | { AVR::R22, 22U }, |
818 | | { AVR::R23, 23U }, |
819 | | { AVR::R24, 24U }, |
820 | | { AVR::R25, 25U }, |
821 | | { AVR::R26, 26U }, |
822 | | { AVR::R27, 27U }, |
823 | | { AVR::R28, 28U }, |
824 | | { AVR::R29, 29U }, |
825 | | { AVR::R30, 30U }, |
826 | | { AVR::R31, 31U }, |
827 | | { AVR::R1R0, 0U }, |
828 | | { AVR::R3R2, 2U }, |
829 | | { AVR::R5R4, 4U }, |
830 | | { AVR::R7R6, 6U }, |
831 | | { AVR::R9R8, 8U }, |
832 | | { AVR::R10R9, 9U }, |
833 | | { AVR::R11R10, 10U }, |
834 | | { AVR::R12R11, 11U }, |
835 | | { AVR::R13R12, 12U }, |
836 | | { AVR::R14R13, 13U }, |
837 | | { AVR::R15R14, 14U }, |
838 | | { AVR::R16R15, 15U }, |
839 | | { AVR::R17R16, 16U }, |
840 | | { AVR::R18R17, 17U }, |
841 | | { AVR::R19R18, 18U }, |
842 | | { AVR::R20R19, 19U }, |
843 | | { AVR::R21R20, 20U }, |
844 | | { AVR::R22R21, 21U }, |
845 | | { AVR::R23R22, 22U }, |
846 | | { AVR::R24R23, 23U }, |
847 | | { AVR::R25R24, 24U }, |
848 | | { AVR::R26R25, 25U }, |
849 | | { AVR::R27R26, 26U }, |
850 | | { AVR::R29R28, 28U }, |
851 | | { AVR::R31R30, 30U }, |
852 | | }; |
853 | | extern const unsigned AVREHFlavour0L2DwarfSize = std::size(AVREHFlavour0L2Dwarf); |
854 | | |
855 | | extern const uint16_t AVRRegEncodingTable[] = { |
856 | | 0, |
857 | | 32, |
858 | | 33, |
859 | | 32, |
860 | | 14, |
861 | | 0, |
862 | | 1, |
863 | | 2, |
864 | | 3, |
865 | | 4, |
866 | | 5, |
867 | | 6, |
868 | | 7, |
869 | | 8, |
870 | | 9, |
871 | | 10, |
872 | | 11, |
873 | | 12, |
874 | | 13, |
875 | | 14, |
876 | | 15, |
877 | | 16, |
878 | | 17, |
879 | | 18, |
880 | | 19, |
881 | | 20, |
882 | | 21, |
883 | | 22, |
884 | | 23, |
885 | | 24, |
886 | | 25, |
887 | | 26, |
888 | | 27, |
889 | | 28, |
890 | | 29, |
891 | | 30, |
892 | | 31, |
893 | | 0, |
894 | | 2, |
895 | | 4, |
896 | | 6, |
897 | | 8, |
898 | | 9, |
899 | | 10, |
900 | | 11, |
901 | | 12, |
902 | | 13, |
903 | | 14, |
904 | | 15, |
905 | | 16, |
906 | | 17, |
907 | | 18, |
908 | | 19, |
909 | | 20, |
910 | | 21, |
911 | | 22, |
912 | | 23, |
913 | | 24, |
914 | | 25, |
915 | | 26, |
916 | | 28, |
917 | | 30, |
918 | | }; |
919 | 0 | static inline void InitAVRMCRegisterInfo(MCRegisterInfo *RI, unsigned RA, unsigned DwarfFlavour = 0, unsigned EHFlavour = 0, unsigned PC = 0) { |
920 | 0 | RI->InitMCRegisterInfo(AVRRegDesc, 62, RA, PC, AVRMCRegisterClasses, 23, AVRRegUnitRoots, 35, AVRRegDiffLists, AVRLaneMaskLists, AVRRegStrings, AVRRegClassStrings, AVRSubRegIdxLists, 3, |
921 | 0 | AVRSubRegIdxRanges, AVRRegEncodingTable); |
922 | |
|
923 | 0 | switch (DwarfFlavour) { |
924 | 0 | default: |
925 | 0 | llvm_unreachable("Unknown DWARF flavour"); |
926 | 0 | case 0: |
927 | 0 | RI->mapDwarfRegsToLLVMRegs(AVRDwarfFlavour0Dwarf2L, AVRDwarfFlavour0Dwarf2LSize, false); |
928 | 0 | break; |
929 | 0 | } |
930 | 0 | switch (EHFlavour) { |
931 | 0 | default: |
932 | 0 | llvm_unreachable("Unknown DWARF flavour"); |
933 | 0 | case 0: |
934 | 0 | RI->mapDwarfRegsToLLVMRegs(AVREHFlavour0Dwarf2L, AVREHFlavour0Dwarf2LSize, true); |
935 | 0 | break; |
936 | 0 | } |
937 | 0 | switch (DwarfFlavour) { |
938 | 0 | default: |
939 | 0 | llvm_unreachable("Unknown DWARF flavour"); |
940 | 0 | case 0: |
941 | 0 | RI->mapLLVMRegsToDwarfRegs(AVRDwarfFlavour0L2Dwarf, AVRDwarfFlavour0L2DwarfSize, false); |
942 | 0 | break; |
943 | 0 | } |
944 | 0 | switch (EHFlavour) { |
945 | 0 | default: |
946 | 0 | llvm_unreachable("Unknown DWARF flavour"); |
947 | 0 | case 0: |
948 | 0 | RI->mapLLVMRegsToDwarfRegs(AVREHFlavour0L2Dwarf, AVREHFlavour0L2DwarfSize, true); |
949 | 0 | break; |
950 | 0 | } |
951 | 0 | } |
952 | | |
953 | | } // end namespace llvm |
954 | | |
955 | | #endif // GET_REGINFO_MC_DESC |
956 | | |
957 | | /*===- TableGen'erated file -------------------------------------*- C++ -*-===*\ |
958 | | |* *| |
959 | | |* Register Information Header Fragment *| |
960 | | |* *| |
961 | | |* Automatically generated file, do not edit! *| |
962 | | |* *| |
963 | | \*===----------------------------------------------------------------------===*/ |
964 | | |
965 | | |
966 | | #ifdef GET_REGINFO_HEADER |
967 | | #undef GET_REGINFO_HEADER |
968 | | |
969 | | #include "llvm/CodeGen/TargetRegisterInfo.h" |
970 | | |
971 | | namespace llvm { |
972 | | |
973 | | class AVRFrameLowering; |
974 | | |
975 | | struct AVRGenRegisterInfo : public TargetRegisterInfo { |
976 | | explicit AVRGenRegisterInfo(unsigned RA, unsigned D = 0, unsigned E = 0, |
977 | | unsigned PC = 0, unsigned HwMode = 0); |
978 | | unsigned composeSubRegIndicesImpl(unsigned, unsigned) const override; |
979 | | LaneBitmask composeSubRegIndexLaneMaskImpl(unsigned, LaneBitmask) const override; |
980 | | LaneBitmask reverseComposeSubRegIndexLaneMaskImpl(unsigned, LaneBitmask) const override; |
981 | | const TargetRegisterClass *getSubClassWithSubReg(const TargetRegisterClass *, unsigned) const override; |
982 | | const TargetRegisterClass *getSubRegisterClass(const TargetRegisterClass *, unsigned) const override; |
983 | | const RegClassWeight &getRegClassWeight(const TargetRegisterClass *RC) const override; |
984 | | unsigned getRegUnitWeight(unsigned RegUnit) const override; |
985 | | unsigned getNumRegPressureSets() const override; |
986 | | const char *getRegPressureSetName(unsigned Idx) const override; |
987 | | unsigned getRegPressureSetLimit(const MachineFunction &MF, unsigned Idx) const override; |
988 | | const int *getRegClassPressureSets(const TargetRegisterClass *RC) const override; |
989 | | const int *getRegUnitPressureSets(unsigned RegUnit) const override; |
990 | | ArrayRef<const char *> getRegMaskNames() const override; |
991 | | ArrayRef<const uint32_t *> getRegMasks() const override; |
992 | | bool isGeneralPurposeRegister(const MachineFunction &, MCRegister) const override; |
993 | | bool isFixedRegister(const MachineFunction &, MCRegister) const override; |
994 | | bool isArgumentRegister(const MachineFunction &, MCRegister) const override; |
995 | | bool isConstantPhysReg(MCRegister PhysReg) const override final; |
996 | | /// Devirtualized TargetFrameLowering. |
997 | | static const AVRFrameLowering *getFrameLowering( |
998 | | const MachineFunction &MF); |
999 | | }; |
1000 | | |
1001 | | namespace AVR { // Register classes |
1002 | | extern const TargetRegisterClass GPR8RegClass; |
1003 | | extern const TargetRegisterClass GPR8loRegClass; |
1004 | | extern const TargetRegisterClass LD8RegClass; |
1005 | | extern const TargetRegisterClass LD8loRegClass; |
1006 | | extern const TargetRegisterClass CCRRegClass; |
1007 | | extern const TargetRegisterClass DREGSRegClass; |
1008 | | extern const TargetRegisterClass DREGSMOVWRegClass; |
1009 | | extern const TargetRegisterClass DREGS_with_sub_hi_in_LD8RegClass; |
1010 | | extern const TargetRegisterClass DREGS_with_sub_lo_in_LD8RegClass; |
1011 | | extern const TargetRegisterClass DREGS_with_sub_lo_in_GPR8loRegClass; |
1012 | | extern const TargetRegisterClass DREGS_with_sub_hi_in_GPR8loRegClass; |
1013 | | extern const TargetRegisterClass DLDREGSRegClass; |
1014 | | extern const TargetRegisterClass DREGS_with_sub_hi_in_LD8loRegClass; |
1015 | | extern const TargetRegisterClass DREGS_with_sub_lo_in_LD8loRegClass; |
1016 | | extern const TargetRegisterClass DREGSloRegClass; |
1017 | | extern const TargetRegisterClass DREGS_with_sub_hi_in_LD8lo_and_DREGS_with_sub_lo_in_LD8RegClass; |
1018 | | extern const TargetRegisterClass DREGSLD8loRegClass; |
1019 | | extern const TargetRegisterClass IWREGSRegClass; |
1020 | | extern const TargetRegisterClass PTRREGSRegClass; |
1021 | | extern const TargetRegisterClass PTRDISPREGSRegClass; |
1022 | | extern const TargetRegisterClass DREGS_with_sub_hi_in_LD8_and_DREGS_with_sub_lo_in_GPR8loRegClass; |
1023 | | extern const TargetRegisterClass GPRSPRegClass; |
1024 | | extern const TargetRegisterClass ZREGRegClass; |
1025 | | } // end namespace AVR |
1026 | | |
1027 | | } // end namespace llvm |
1028 | | |
1029 | | #endif // GET_REGINFO_HEADER |
1030 | | |
1031 | | /*===- TableGen'erated file -------------------------------------*- C++ -*-===*\ |
1032 | | |* *| |
1033 | | |* Target Register and Register Classes Information *| |
1034 | | |* *| |
1035 | | |* Automatically generated file, do not edit! *| |
1036 | | |* *| |
1037 | | \*===----------------------------------------------------------------------===*/ |
1038 | | |
1039 | | |
1040 | | #ifdef GET_REGINFO_TARGET_DESC |
1041 | | #undef GET_REGINFO_TARGET_DESC |
1042 | | |
1043 | | namespace llvm { |
1044 | | |
1045 | | extern const MCRegisterClass AVRMCRegisterClasses[]; |
1046 | | |
1047 | | static const MVT::SimpleValueType VTLists[] = { |
1048 | | /* 0 */ MVT::i8, MVT::Other, |
1049 | | /* 2 */ MVT::i16, MVT::Other, |
1050 | | }; |
1051 | | |
1052 | | static const char *SubRegIndexNameTable[] = { "sub_hi", "sub_lo", "" }; |
1053 | | |
1054 | | |
1055 | | static const LaneBitmask SubRegIndexLaneMaskTable[] = { |
1056 | | LaneBitmask::getAll(), |
1057 | | LaneBitmask(0x0000000000000001), // sub_hi |
1058 | | LaneBitmask(0x0000000000000002), // sub_lo |
1059 | | }; |
1060 | | |
1061 | | |
1062 | | |
1063 | | static const TargetRegisterInfo::RegClassInfo RegClassInfos[] = { |
1064 | | // Mode = 0 (Default) |
1065 | | { 8, 8, 8, /*VTLists+*/0 }, // GPR8 |
1066 | | { 8, 8, 8, /*VTLists+*/0 }, // GPR8lo |
1067 | | { 8, 8, 8, /*VTLists+*/0 }, // LD8 |
1068 | | { 8, 8, 8, /*VTLists+*/0 }, // LD8lo |
1069 | | { 8, 8, 8, /*VTLists+*/0 }, // CCR |
1070 | | { 16, 16, 8, /*VTLists+*/2 }, // DREGS |
1071 | | { 16, 16, 8, /*VTLists+*/2 }, // DREGSMOVW |
1072 | | { 16, 16, 8, /*VTLists+*/2 }, // DREGS_with_sub_hi_in_LD8 |
1073 | | { 16, 16, 8, /*VTLists+*/2 }, // DREGS_with_sub_lo_in_LD8 |
1074 | | { 16, 16, 8, /*VTLists+*/2 }, // DREGS_with_sub_lo_in_GPR8lo |
1075 | | { 16, 16, 8, /*VTLists+*/2 }, // DREGS_with_sub_hi_in_GPR8lo |
1076 | | { 16, 16, 8, /*VTLists+*/2 }, // DLDREGS |
1077 | | { 16, 16, 8, /*VTLists+*/2 }, // DREGS_with_sub_hi_in_LD8lo |
1078 | | { 16, 16, 8, /*VTLists+*/2 }, // DREGS_with_sub_lo_in_LD8lo |
1079 | | { 16, 16, 8, /*VTLists+*/2 }, // DREGSlo |
1080 | | { 16, 16, 8, /*VTLists+*/2 }, // DREGS_with_sub_hi_in_LD8lo_and_DREGS_with_sub_lo_in_LD8 |
1081 | | { 16, 16, 8, /*VTLists+*/2 }, // DREGSLD8lo |
1082 | | { 16, 16, 8, /*VTLists+*/2 }, // IWREGS |
1083 | | { 16, 16, 8, /*VTLists+*/2 }, // PTRREGS |
1084 | | { 16, 16, 8, /*VTLists+*/2 }, // PTRDISPREGS |
1085 | | { 16, 16, 8, /*VTLists+*/2 }, // DREGS_with_sub_hi_in_LD8_and_DREGS_with_sub_lo_in_GPR8lo |
1086 | | { 16, 16, 8, /*VTLists+*/2 }, // GPRSP |
1087 | | { 16, 16, 8, /*VTLists+*/2 }, // ZREG |
1088 | | }; |
1089 | | |
1090 | | static const TargetRegisterClass *const NullRegClasses[] = { nullptr }; |
1091 | | |
1092 | | static const uint32_t GPR8SubClassMask[] = { |
1093 | | 0x0000000f, |
1094 | | 0x005fffe0, // sub_hi |
1095 | | 0x005fffe0, // sub_lo |
1096 | | }; |
1097 | | |
1098 | | static const uint32_t GPR8loSubClassMask[] = { |
1099 | | 0x00000002, |
1100 | | 0x00004400, // sub_hi |
1101 | | 0x00104600, // sub_lo |
1102 | | }; |
1103 | | |
1104 | | static const uint32_t LD8SubClassMask[] = { |
1105 | | 0x0000000c, |
1106 | | 0x005fb980, // sub_hi |
1107 | | 0x004fa900, // sub_lo |
1108 | | }; |
1109 | | |
1110 | | static const uint32_t LD8loSubClassMask[] = { |
1111 | | 0x00000008, |
1112 | | 0x00119000, // sub_hi |
1113 | | 0x0001a000, // sub_lo |
1114 | | }; |
1115 | | |
1116 | | static const uint32_t CCRSubClassMask[] = { |
1117 | | 0x00000010, |
1118 | | }; |
1119 | | |
1120 | | static const uint32_t DREGSSubClassMask[] = { |
1121 | | 0x005fffe0, |
1122 | | }; |
1123 | | |
1124 | | static const uint32_t DREGSMOVWSubClassMask[] = { |
1125 | | 0x004f4840, |
1126 | | }; |
1127 | | |
1128 | | static const uint32_t DREGS_with_sub_hi_in_LD8SubClassMask[] = { |
1129 | | 0x005fb980, |
1130 | | }; |
1131 | | |
1132 | | static const uint32_t DREGS_with_sub_lo_in_LD8SubClassMask[] = { |
1133 | | 0x004fa900, |
1134 | | }; |
1135 | | |
1136 | | static const uint32_t DREGS_with_sub_lo_in_GPR8loSubClassMask[] = { |
1137 | | 0x00104600, |
1138 | | }; |
1139 | | |
1140 | | static const uint32_t DREGS_with_sub_hi_in_GPR8loSubClassMask[] = { |
1141 | | 0x00004400, |
1142 | | }; |
1143 | | |
1144 | | static const uint32_t DLDREGSSubClassMask[] = { |
1145 | | 0x004f0800, |
1146 | | }; |
1147 | | |
1148 | | static const uint32_t DREGS_with_sub_hi_in_LD8loSubClassMask[] = { |
1149 | | 0x00119000, |
1150 | | }; |
1151 | | |
1152 | | static const uint32_t DREGS_with_sub_lo_in_LD8loSubClassMask[] = { |
1153 | | 0x0001a000, |
1154 | | }; |
1155 | | |
1156 | | static const uint32_t DREGSloSubClassMask[] = { |
1157 | | 0x00004000, |
1158 | | }; |
1159 | | |
1160 | | static const uint32_t DREGS_with_sub_hi_in_LD8lo_and_DREGS_with_sub_lo_in_LD8SubClassMask[] = { |
1161 | | 0x00018000, |
1162 | | }; |
1163 | | |
1164 | | static const uint32_t DREGSLD8loSubClassMask[] = { |
1165 | | 0x00010000, |
1166 | | }; |
1167 | | |
1168 | | static const uint32_t IWREGSSubClassMask[] = { |
1169 | | 0x004e0000, |
1170 | | }; |
1171 | | |
1172 | | static const uint32_t PTRREGSSubClassMask[] = { |
1173 | | 0x004c0000, |
1174 | | }; |
1175 | | |
1176 | | static const uint32_t PTRDISPREGSSubClassMask[] = { |
1177 | | 0x00480000, |
1178 | | }; |
1179 | | |
1180 | | static const uint32_t DREGS_with_sub_hi_in_LD8_and_DREGS_with_sub_lo_in_GPR8loSubClassMask[] = { |
1181 | | 0x00100000, |
1182 | | }; |
1183 | | |
1184 | | static const uint32_t GPRSPSubClassMask[] = { |
1185 | | 0x00200000, |
1186 | | }; |
1187 | | |
1188 | | static const uint32_t ZREGSubClassMask[] = { |
1189 | | 0x00400000, |
1190 | | }; |
1191 | | |
1192 | | static const uint16_t SuperRegIdxSeqs[] = { |
1193 | | /* 0 */ 1, 2, 0, |
1194 | | }; |
1195 | | |
1196 | | static const TargetRegisterClass *const GPR8loSuperclasses[] = { |
1197 | | &AVR::GPR8RegClass, |
1198 | | nullptr |
1199 | | }; |
1200 | | |
1201 | | static const TargetRegisterClass *const LD8Superclasses[] = { |
1202 | | &AVR::GPR8RegClass, |
1203 | | nullptr |
1204 | | }; |
1205 | | |
1206 | | static const TargetRegisterClass *const LD8loSuperclasses[] = { |
1207 | | &AVR::GPR8RegClass, |
1208 | | &AVR::LD8RegClass, |
1209 | | nullptr |
1210 | | }; |
1211 | | |
1212 | | static const TargetRegisterClass *const DREGSMOVWSuperclasses[] = { |
1213 | | &AVR::DREGSRegClass, |
1214 | | nullptr |
1215 | | }; |
1216 | | |
1217 | | static const TargetRegisterClass *const DREGS_with_sub_hi_in_LD8Superclasses[] = { |
1218 | | &AVR::DREGSRegClass, |
1219 | | nullptr |
1220 | | }; |
1221 | | |
1222 | | static const TargetRegisterClass *const DREGS_with_sub_lo_in_LD8Superclasses[] = { |
1223 | | &AVR::DREGSRegClass, |
1224 | | &AVR::DREGS_with_sub_hi_in_LD8RegClass, |
1225 | | nullptr |
1226 | | }; |
1227 | | |
1228 | | static const TargetRegisterClass *const DREGS_with_sub_lo_in_GPR8loSuperclasses[] = { |
1229 | | &AVR::DREGSRegClass, |
1230 | | nullptr |
1231 | | }; |
1232 | | |
1233 | | static const TargetRegisterClass *const DREGS_with_sub_hi_in_GPR8loSuperclasses[] = { |
1234 | | &AVR::DREGSRegClass, |
1235 | | &AVR::DREGS_with_sub_lo_in_GPR8loRegClass, |
1236 | | nullptr |
1237 | | }; |
1238 | | |
1239 | | static const TargetRegisterClass *const DLDREGSSuperclasses[] = { |
1240 | | &AVR::DREGSRegClass, |
1241 | | &AVR::DREGSMOVWRegClass, |
1242 | | &AVR::DREGS_with_sub_hi_in_LD8RegClass, |
1243 | | &AVR::DREGS_with_sub_lo_in_LD8RegClass, |
1244 | | nullptr |
1245 | | }; |
1246 | | |
1247 | | static const TargetRegisterClass *const DREGS_with_sub_hi_in_LD8loSuperclasses[] = { |
1248 | | &AVR::DREGSRegClass, |
1249 | | &AVR::DREGS_with_sub_hi_in_LD8RegClass, |
1250 | | nullptr |
1251 | | }; |
1252 | | |
1253 | | static const TargetRegisterClass *const DREGS_with_sub_lo_in_LD8loSuperclasses[] = { |
1254 | | &AVR::DREGSRegClass, |
1255 | | &AVR::DREGS_with_sub_hi_in_LD8RegClass, |
1256 | | &AVR::DREGS_with_sub_lo_in_LD8RegClass, |
1257 | | nullptr |
1258 | | }; |
1259 | | |
1260 | | static const TargetRegisterClass *const DREGSloSuperclasses[] = { |
1261 | | &AVR::DREGSRegClass, |
1262 | | &AVR::DREGSMOVWRegClass, |
1263 | | &AVR::DREGS_with_sub_lo_in_GPR8loRegClass, |
1264 | | &AVR::DREGS_with_sub_hi_in_GPR8loRegClass, |
1265 | | nullptr |
1266 | | }; |
1267 | | |
1268 | | static const TargetRegisterClass *const DREGS_with_sub_hi_in_LD8lo_and_DREGS_with_sub_lo_in_LD8Superclasses[] = { |
1269 | | &AVR::DREGSRegClass, |
1270 | | &AVR::DREGS_with_sub_hi_in_LD8RegClass, |
1271 | | &AVR::DREGS_with_sub_lo_in_LD8RegClass, |
1272 | | &AVR::DREGS_with_sub_hi_in_LD8loRegClass, |
1273 | | &AVR::DREGS_with_sub_lo_in_LD8loRegClass, |
1274 | | nullptr |
1275 | | }; |
1276 | | |
1277 | | static const TargetRegisterClass *const DREGSLD8loSuperclasses[] = { |
1278 | | &AVR::DREGSRegClass, |
1279 | | &AVR::DREGSMOVWRegClass, |
1280 | | &AVR::DREGS_with_sub_hi_in_LD8RegClass, |
1281 | | &AVR::DREGS_with_sub_lo_in_LD8RegClass, |
1282 | | &AVR::DLDREGSRegClass, |
1283 | | &AVR::DREGS_with_sub_hi_in_LD8loRegClass, |
1284 | | &AVR::DREGS_with_sub_lo_in_LD8loRegClass, |
1285 | | &AVR::DREGS_with_sub_hi_in_LD8lo_and_DREGS_with_sub_lo_in_LD8RegClass, |
1286 | | nullptr |
1287 | | }; |
1288 | | |
1289 | | static const TargetRegisterClass *const IWREGSSuperclasses[] = { |
1290 | | &AVR::DREGSRegClass, |
1291 | | &AVR::DREGSMOVWRegClass, |
1292 | | &AVR::DREGS_with_sub_hi_in_LD8RegClass, |
1293 | | &AVR::DREGS_with_sub_lo_in_LD8RegClass, |
1294 | | &AVR::DLDREGSRegClass, |
1295 | | nullptr |
1296 | | }; |
1297 | | |
1298 | | static const TargetRegisterClass *const PTRREGSSuperclasses[] = { |
1299 | | &AVR::DREGSRegClass, |
1300 | | &AVR::DREGSMOVWRegClass, |
1301 | | &AVR::DREGS_with_sub_hi_in_LD8RegClass, |
1302 | | &AVR::DREGS_with_sub_lo_in_LD8RegClass, |
1303 | | &AVR::DLDREGSRegClass, |
1304 | | &AVR::IWREGSRegClass, |
1305 | | nullptr |
1306 | | }; |
1307 | | |
1308 | | static const TargetRegisterClass *const PTRDISPREGSSuperclasses[] = { |
1309 | | &AVR::DREGSRegClass, |
1310 | | &AVR::DREGSMOVWRegClass, |
1311 | | &AVR::DREGS_with_sub_hi_in_LD8RegClass, |
1312 | | &AVR::DREGS_with_sub_lo_in_LD8RegClass, |
1313 | | &AVR::DLDREGSRegClass, |
1314 | | &AVR::IWREGSRegClass, |
1315 | | &AVR::PTRREGSRegClass, |
1316 | | nullptr |
1317 | | }; |
1318 | | |
1319 | | static const TargetRegisterClass *const DREGS_with_sub_hi_in_LD8_and_DREGS_with_sub_lo_in_GPR8loSuperclasses[] = { |
1320 | | &AVR::DREGSRegClass, |
1321 | | &AVR::DREGS_with_sub_hi_in_LD8RegClass, |
1322 | | &AVR::DREGS_with_sub_lo_in_GPR8loRegClass, |
1323 | | &AVR::DREGS_with_sub_hi_in_LD8loRegClass, |
1324 | | nullptr |
1325 | | }; |
1326 | | |
1327 | | static const TargetRegisterClass *const ZREGSuperclasses[] = { |
1328 | | &AVR::DREGSRegClass, |
1329 | | &AVR::DREGSMOVWRegClass, |
1330 | | &AVR::DREGS_with_sub_hi_in_LD8RegClass, |
1331 | | &AVR::DREGS_with_sub_lo_in_LD8RegClass, |
1332 | | &AVR::DLDREGSRegClass, |
1333 | | &AVR::IWREGSRegClass, |
1334 | | &AVR::PTRREGSRegClass, |
1335 | | &AVR::PTRDISPREGSRegClass, |
1336 | | nullptr |
1337 | | }; |
1338 | | |
1339 | | |
1340 | | namespace AVR { // Register class instances |
1341 | | extern const TargetRegisterClass GPR8RegClass = { |
1342 | | &AVRMCRegisterClasses[GPR8RegClassID], |
1343 | | GPR8SubClassMask, |
1344 | | SuperRegIdxSeqs + 0, |
1345 | | LaneBitmask(0x0000000000000001), |
1346 | | 0, |
1347 | | false, |
1348 | | 0x00, /* TSFlags */ |
1349 | | false, /* HasDisjunctSubRegs */ |
1350 | | false, /* CoveredBySubRegs */ |
1351 | | NullRegClasses, |
1352 | | nullptr |
1353 | | }; |
1354 | | |
1355 | | extern const TargetRegisterClass GPR8loRegClass = { |
1356 | | &AVRMCRegisterClasses[GPR8loRegClassID], |
1357 | | GPR8loSubClassMask, |
1358 | | SuperRegIdxSeqs + 0, |
1359 | | LaneBitmask(0x0000000000000001), |
1360 | | 0, |
1361 | | false, |
1362 | | 0x00, /* TSFlags */ |
1363 | | false, /* HasDisjunctSubRegs */ |
1364 | | false, /* CoveredBySubRegs */ |
1365 | | GPR8loSuperclasses, |
1366 | | nullptr |
1367 | | }; |
1368 | | |
1369 | | extern const TargetRegisterClass LD8RegClass = { |
1370 | | &AVRMCRegisterClasses[LD8RegClassID], |
1371 | | LD8SubClassMask, |
1372 | | SuperRegIdxSeqs + 0, |
1373 | | LaneBitmask(0x0000000000000001), |
1374 | | 0, |
1375 | | false, |
1376 | | 0x00, /* TSFlags */ |
1377 | | false, /* HasDisjunctSubRegs */ |
1378 | | false, /* CoveredBySubRegs */ |
1379 | | LD8Superclasses, |
1380 | | nullptr |
1381 | | }; |
1382 | | |
1383 | | extern const TargetRegisterClass LD8loRegClass = { |
1384 | | &AVRMCRegisterClasses[LD8loRegClassID], |
1385 | | LD8loSubClassMask, |
1386 | | SuperRegIdxSeqs + 0, |
1387 | | LaneBitmask(0x0000000000000001), |
1388 | | 0, |
1389 | | false, |
1390 | | 0x00, /* TSFlags */ |
1391 | | false, /* HasDisjunctSubRegs */ |
1392 | | false, /* CoveredBySubRegs */ |
1393 | | LD8loSuperclasses, |
1394 | | nullptr |
1395 | | }; |
1396 | | |
1397 | | extern const TargetRegisterClass CCRRegClass = { |
1398 | | &AVRMCRegisterClasses[CCRRegClassID], |
1399 | | CCRSubClassMask, |
1400 | | SuperRegIdxSeqs + 2, |
1401 | | LaneBitmask(0x0000000000000001), |
1402 | | 0, |
1403 | | false, |
1404 | | 0x00, /* TSFlags */ |
1405 | | false, /* HasDisjunctSubRegs */ |
1406 | | false, /* CoveredBySubRegs */ |
1407 | | NullRegClasses, |
1408 | | nullptr |
1409 | | }; |
1410 | | |
1411 | | extern const TargetRegisterClass DREGSRegClass = { |
1412 | | &AVRMCRegisterClasses[DREGSRegClassID], |
1413 | | DREGSSubClassMask, |
1414 | | SuperRegIdxSeqs + 2, |
1415 | | LaneBitmask(0x0000000000000003), |
1416 | | 0, |
1417 | | false, |
1418 | | 0x00, /* TSFlags */ |
1419 | | true, /* HasDisjunctSubRegs */ |
1420 | | true, /* CoveredBySubRegs */ |
1421 | | NullRegClasses, |
1422 | | nullptr |
1423 | | }; |
1424 | | |
1425 | | extern const TargetRegisterClass DREGSMOVWRegClass = { |
1426 | | &AVRMCRegisterClasses[DREGSMOVWRegClassID], |
1427 | | DREGSMOVWSubClassMask, |
1428 | | SuperRegIdxSeqs + 2, |
1429 | | LaneBitmask(0x0000000000000003), |
1430 | | 0, |
1431 | | false, |
1432 | | 0x00, /* TSFlags */ |
1433 | | true, /* HasDisjunctSubRegs */ |
1434 | | true, /* CoveredBySubRegs */ |
1435 | | DREGSMOVWSuperclasses, |
1436 | | nullptr |
1437 | | }; |
1438 | | |
1439 | | extern const TargetRegisterClass DREGS_with_sub_hi_in_LD8RegClass = { |
1440 | | &AVRMCRegisterClasses[DREGS_with_sub_hi_in_LD8RegClassID], |
1441 | | DREGS_with_sub_hi_in_LD8SubClassMask, |
1442 | | SuperRegIdxSeqs + 2, |
1443 | | LaneBitmask(0x0000000000000003), |
1444 | | 0, |
1445 | | false, |
1446 | | 0x00, /* TSFlags */ |
1447 | | true, /* HasDisjunctSubRegs */ |
1448 | | true, /* CoveredBySubRegs */ |
1449 | | DREGS_with_sub_hi_in_LD8Superclasses, |
1450 | | nullptr |
1451 | | }; |
1452 | | |
1453 | | extern const TargetRegisterClass DREGS_with_sub_lo_in_LD8RegClass = { |
1454 | | &AVRMCRegisterClasses[DREGS_with_sub_lo_in_LD8RegClassID], |
1455 | | DREGS_with_sub_lo_in_LD8SubClassMask, |
1456 | | SuperRegIdxSeqs + 2, |
1457 | | LaneBitmask(0x0000000000000003), |
1458 | | 0, |
1459 | | false, |
1460 | | 0x00, /* TSFlags */ |
1461 | | true, /* HasDisjunctSubRegs */ |
1462 | | true, /* CoveredBySubRegs */ |
1463 | | DREGS_with_sub_lo_in_LD8Superclasses, |
1464 | | nullptr |
1465 | | }; |
1466 | | |
1467 | | extern const TargetRegisterClass DREGS_with_sub_lo_in_GPR8loRegClass = { |
1468 | | &AVRMCRegisterClasses[DREGS_with_sub_lo_in_GPR8loRegClassID], |
1469 | | DREGS_with_sub_lo_in_GPR8loSubClassMask, |
1470 | | SuperRegIdxSeqs + 2, |
1471 | | LaneBitmask(0x0000000000000003), |
1472 | | 0, |
1473 | | false, |
1474 | | 0x00, /* TSFlags */ |
1475 | | true, /* HasDisjunctSubRegs */ |
1476 | | true, /* CoveredBySubRegs */ |
1477 | | DREGS_with_sub_lo_in_GPR8loSuperclasses, |
1478 | | nullptr |
1479 | | }; |
1480 | | |
1481 | | extern const TargetRegisterClass DREGS_with_sub_hi_in_GPR8loRegClass = { |
1482 | | &AVRMCRegisterClasses[DREGS_with_sub_hi_in_GPR8loRegClassID], |
1483 | | DREGS_with_sub_hi_in_GPR8loSubClassMask, |
1484 | | SuperRegIdxSeqs + 2, |
1485 | | LaneBitmask(0x0000000000000003), |
1486 | | 0, |
1487 | | false, |
1488 | | 0x00, /* TSFlags */ |
1489 | | true, /* HasDisjunctSubRegs */ |
1490 | | true, /* CoveredBySubRegs */ |
1491 | | DREGS_with_sub_hi_in_GPR8loSuperclasses, |
1492 | | nullptr |
1493 | | }; |
1494 | | |
1495 | | extern const TargetRegisterClass DLDREGSRegClass = { |
1496 | | &AVRMCRegisterClasses[DLDREGSRegClassID], |
1497 | | DLDREGSSubClassMask, |
1498 | | SuperRegIdxSeqs + 2, |
1499 | | LaneBitmask(0x0000000000000003), |
1500 | | 0, |
1501 | | false, |
1502 | | 0x00, /* TSFlags */ |
1503 | | true, /* HasDisjunctSubRegs */ |
1504 | | true, /* CoveredBySubRegs */ |
1505 | | DLDREGSSuperclasses, |
1506 | | nullptr |
1507 | | }; |
1508 | | |
1509 | | extern const TargetRegisterClass DREGS_with_sub_hi_in_LD8loRegClass = { |
1510 | | &AVRMCRegisterClasses[DREGS_with_sub_hi_in_LD8loRegClassID], |
1511 | | DREGS_with_sub_hi_in_LD8loSubClassMask, |
1512 | | SuperRegIdxSeqs + 2, |
1513 | | LaneBitmask(0x0000000000000003), |
1514 | | 0, |
1515 | | false, |
1516 | | 0x00, /* TSFlags */ |
1517 | | true, /* HasDisjunctSubRegs */ |
1518 | | true, /* CoveredBySubRegs */ |
1519 | | DREGS_with_sub_hi_in_LD8loSuperclasses, |
1520 | | nullptr |
1521 | | }; |
1522 | | |
1523 | | extern const TargetRegisterClass DREGS_with_sub_lo_in_LD8loRegClass = { |
1524 | | &AVRMCRegisterClasses[DREGS_with_sub_lo_in_LD8loRegClassID], |
1525 | | DREGS_with_sub_lo_in_LD8loSubClassMask, |
1526 | | SuperRegIdxSeqs + 2, |
1527 | | LaneBitmask(0x0000000000000003), |
1528 | | 0, |
1529 | | false, |
1530 | | 0x00, /* TSFlags */ |
1531 | | true, /* HasDisjunctSubRegs */ |
1532 | | true, /* CoveredBySubRegs */ |
1533 | | DREGS_with_sub_lo_in_LD8loSuperclasses, |
1534 | | nullptr |
1535 | | }; |
1536 | | |
1537 | | extern const TargetRegisterClass DREGSloRegClass = { |
1538 | | &AVRMCRegisterClasses[DREGSloRegClassID], |
1539 | | DREGSloSubClassMask, |
1540 | | SuperRegIdxSeqs + 2, |
1541 | | LaneBitmask(0x0000000000000003), |
1542 | | 0, |
1543 | | false, |
1544 | | 0x00, /* TSFlags */ |
1545 | | true, /* HasDisjunctSubRegs */ |
1546 | | true, /* CoveredBySubRegs */ |
1547 | | DREGSloSuperclasses, |
1548 | | nullptr |
1549 | | }; |
1550 | | |
1551 | | extern const TargetRegisterClass DREGS_with_sub_hi_in_LD8lo_and_DREGS_with_sub_lo_in_LD8RegClass = { |
1552 | | &AVRMCRegisterClasses[DREGS_with_sub_hi_in_LD8lo_and_DREGS_with_sub_lo_in_LD8RegClassID], |
1553 | | DREGS_with_sub_hi_in_LD8lo_and_DREGS_with_sub_lo_in_LD8SubClassMask, |
1554 | | SuperRegIdxSeqs + 2, |
1555 | | LaneBitmask(0x0000000000000003), |
1556 | | 0, |
1557 | | false, |
1558 | | 0x00, /* TSFlags */ |
1559 | | true, /* HasDisjunctSubRegs */ |
1560 | | true, /* CoveredBySubRegs */ |
1561 | | DREGS_with_sub_hi_in_LD8lo_and_DREGS_with_sub_lo_in_LD8Superclasses, |
1562 | | nullptr |
1563 | | }; |
1564 | | |
1565 | | extern const TargetRegisterClass DREGSLD8loRegClass = { |
1566 | | &AVRMCRegisterClasses[DREGSLD8loRegClassID], |
1567 | | DREGSLD8loSubClassMask, |
1568 | | SuperRegIdxSeqs + 2, |
1569 | | LaneBitmask(0x0000000000000003), |
1570 | | 0, |
1571 | | false, |
1572 | | 0x00, /* TSFlags */ |
1573 | | true, /* HasDisjunctSubRegs */ |
1574 | | true, /* CoveredBySubRegs */ |
1575 | | DREGSLD8loSuperclasses, |
1576 | | nullptr |
1577 | | }; |
1578 | | |
1579 | | extern const TargetRegisterClass IWREGSRegClass = { |
1580 | | &AVRMCRegisterClasses[IWREGSRegClassID], |
1581 | | IWREGSSubClassMask, |
1582 | | SuperRegIdxSeqs + 2, |
1583 | | LaneBitmask(0x0000000000000003), |
1584 | | 0, |
1585 | | false, |
1586 | | 0x00, /* TSFlags */ |
1587 | | true, /* HasDisjunctSubRegs */ |
1588 | | true, /* CoveredBySubRegs */ |
1589 | | IWREGSSuperclasses, |
1590 | | nullptr |
1591 | | }; |
1592 | | |
1593 | | extern const TargetRegisterClass PTRREGSRegClass = { |
1594 | | &AVRMCRegisterClasses[PTRREGSRegClassID], |
1595 | | PTRREGSSubClassMask, |
1596 | | SuperRegIdxSeqs + 2, |
1597 | | LaneBitmask(0x0000000000000003), |
1598 | | 0, |
1599 | | false, |
1600 | | 0x00, /* TSFlags */ |
1601 | | true, /* HasDisjunctSubRegs */ |
1602 | | true, /* CoveredBySubRegs */ |
1603 | | PTRREGSSuperclasses, |
1604 | | nullptr |
1605 | | }; |
1606 | | |
1607 | | extern const TargetRegisterClass PTRDISPREGSRegClass = { |
1608 | | &AVRMCRegisterClasses[PTRDISPREGSRegClassID], |
1609 | | PTRDISPREGSSubClassMask, |
1610 | | SuperRegIdxSeqs + 2, |
1611 | | LaneBitmask(0x0000000000000003), |
1612 | | 0, |
1613 | | false, |
1614 | | 0x00, /* TSFlags */ |
1615 | | true, /* HasDisjunctSubRegs */ |
1616 | | true, /* CoveredBySubRegs */ |
1617 | | PTRDISPREGSSuperclasses, |
1618 | | nullptr |
1619 | | }; |
1620 | | |
1621 | | extern const TargetRegisterClass DREGS_with_sub_hi_in_LD8_and_DREGS_with_sub_lo_in_GPR8loRegClass = { |
1622 | | &AVRMCRegisterClasses[DREGS_with_sub_hi_in_LD8_and_DREGS_with_sub_lo_in_GPR8loRegClassID], |
1623 | | DREGS_with_sub_hi_in_LD8_and_DREGS_with_sub_lo_in_GPR8loSubClassMask, |
1624 | | SuperRegIdxSeqs + 2, |
1625 | | LaneBitmask(0x0000000000000003), |
1626 | | 0, |
1627 | | false, |
1628 | | 0x00, /* TSFlags */ |
1629 | | true, /* HasDisjunctSubRegs */ |
1630 | | true, /* CoveredBySubRegs */ |
1631 | | DREGS_with_sub_hi_in_LD8_and_DREGS_with_sub_lo_in_GPR8loSuperclasses, |
1632 | | nullptr |
1633 | | }; |
1634 | | |
1635 | | extern const TargetRegisterClass GPRSPRegClass = { |
1636 | | &AVRMCRegisterClasses[GPRSPRegClassID], |
1637 | | GPRSPSubClassMask, |
1638 | | SuperRegIdxSeqs + 2, |
1639 | | LaneBitmask(0x0000000000000003), |
1640 | | 0, |
1641 | | false, |
1642 | | 0x00, /* TSFlags */ |
1643 | | true, /* HasDisjunctSubRegs */ |
1644 | | true, /* CoveredBySubRegs */ |
1645 | | NullRegClasses, |
1646 | | nullptr |
1647 | | }; |
1648 | | |
1649 | | extern const TargetRegisterClass ZREGRegClass = { |
1650 | | &AVRMCRegisterClasses[ZREGRegClassID], |
1651 | | ZREGSubClassMask, |
1652 | | SuperRegIdxSeqs + 2, |
1653 | | LaneBitmask(0x0000000000000003), |
1654 | | 0, |
1655 | | false, |
1656 | | 0x00, /* TSFlags */ |
1657 | | true, /* HasDisjunctSubRegs */ |
1658 | | true, /* CoveredBySubRegs */ |
1659 | | ZREGSuperclasses, |
1660 | | nullptr |
1661 | | }; |
1662 | | |
1663 | | } // end namespace AVR |
1664 | | |
1665 | | namespace { |
1666 | | const TargetRegisterClass *const RegisterClasses[] = { |
1667 | | &AVR::GPR8RegClass, |
1668 | | &AVR::GPR8loRegClass, |
1669 | | &AVR::LD8RegClass, |
1670 | | &AVR::LD8loRegClass, |
1671 | | &AVR::CCRRegClass, |
1672 | | &AVR::DREGSRegClass, |
1673 | | &AVR::DREGSMOVWRegClass, |
1674 | | &AVR::DREGS_with_sub_hi_in_LD8RegClass, |
1675 | | &AVR::DREGS_with_sub_lo_in_LD8RegClass, |
1676 | | &AVR::DREGS_with_sub_lo_in_GPR8loRegClass, |
1677 | | &AVR::DREGS_with_sub_hi_in_GPR8loRegClass, |
1678 | | &AVR::DLDREGSRegClass, |
1679 | | &AVR::DREGS_with_sub_hi_in_LD8loRegClass, |
1680 | | &AVR::DREGS_with_sub_lo_in_LD8loRegClass, |
1681 | | &AVR::DREGSloRegClass, |
1682 | | &AVR::DREGS_with_sub_hi_in_LD8lo_and_DREGS_with_sub_lo_in_LD8RegClass, |
1683 | | &AVR::DREGSLD8loRegClass, |
1684 | | &AVR::IWREGSRegClass, |
1685 | | &AVR::PTRREGSRegClass, |
1686 | | &AVR::PTRDISPREGSRegClass, |
1687 | | &AVR::DREGS_with_sub_hi_in_LD8_and_DREGS_with_sub_lo_in_GPR8loRegClass, |
1688 | | &AVR::GPRSPRegClass, |
1689 | | &AVR::ZREGRegClass, |
1690 | | }; |
1691 | | } // end anonymous namespace |
1692 | | |
1693 | | static const uint8_t CostPerUseTable[] = { |
1694 | | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; |
1695 | | |
1696 | | |
1697 | | static const bool InAllocatableClassTable[] = { |
1698 | | false, true, false, false, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, }; |
1699 | | |
1700 | | |
1701 | | static const TargetRegisterInfoDesc AVRRegInfoDesc = { // Extra Descriptors |
1702 | | CostPerUseTable, 1, InAllocatableClassTable}; |
1703 | | |
1704 | 0 | unsigned AVRGenRegisterInfo::composeSubRegIndicesImpl(unsigned IdxA, unsigned IdxB) const { |
1705 | 0 | static const uint8_t Rows[1][2] = { |
1706 | 0 | { 0, 0, }, |
1707 | 0 | }; |
1708 | |
|
1709 | 0 | --IdxA; assert(IdxA < 2); (void) IdxA; |
1710 | 0 | --IdxB; assert(IdxB < 2); |
1711 | 0 | return Rows[0][IdxB]; |
1712 | 0 | } |
1713 | | |
1714 | | struct MaskRolOp { |
1715 | | LaneBitmask Mask; |
1716 | | uint8_t RotateLeft; |
1717 | | }; |
1718 | | static const MaskRolOp LaneMaskComposeSequences[] = { |
1719 | | { LaneBitmask(0xFFFFFFFFFFFFFFFF), 0 }, { LaneBitmask::getNone(), 0 }, // Sequence 0 |
1720 | | { LaneBitmask(0xFFFFFFFFFFFFFFFF), 1 }, { LaneBitmask::getNone(), 0 } // Sequence 2 |
1721 | | }; |
1722 | | static const uint8_t CompositeSequences[] = { |
1723 | | 0, // to sub_hi |
1724 | | 2 // to sub_lo |
1725 | | }; |
1726 | | |
1727 | 0 | LaneBitmask AVRGenRegisterInfo::composeSubRegIndexLaneMaskImpl(unsigned IdxA, LaneBitmask LaneMask) const { |
1728 | 0 | --IdxA; assert(IdxA < 2 && "Subregister index out of bounds"); |
1729 | 0 | LaneBitmask Result; |
1730 | 0 | for (const MaskRolOp *Ops = |
1731 | 0 | &LaneMaskComposeSequences[CompositeSequences[IdxA]]; |
1732 | 0 | Ops->Mask.any(); ++Ops) { |
1733 | 0 | LaneBitmask::Type M = LaneMask.getAsInteger() & Ops->Mask.getAsInteger(); |
1734 | 0 | if (unsigned S = Ops->RotateLeft) |
1735 | 0 | Result |= LaneBitmask((M << S) | (M >> (LaneBitmask::BitWidth - S))); |
1736 | 0 | else |
1737 | 0 | Result |= LaneBitmask(M); |
1738 | 0 | } |
1739 | 0 | return Result; |
1740 | 0 | } |
1741 | | |
1742 | 0 | LaneBitmask AVRGenRegisterInfo::reverseComposeSubRegIndexLaneMaskImpl(unsigned IdxA, LaneBitmask LaneMask) const { |
1743 | 0 | LaneMask &= getSubRegIndexLaneMask(IdxA); |
1744 | 0 | --IdxA; assert(IdxA < 2 && "Subregister index out of bounds"); |
1745 | 0 | LaneBitmask Result; |
1746 | 0 | for (const MaskRolOp *Ops = |
1747 | 0 | &LaneMaskComposeSequences[CompositeSequences[IdxA]]; |
1748 | 0 | Ops->Mask.any(); ++Ops) { |
1749 | 0 | LaneBitmask::Type M = LaneMask.getAsInteger(); |
1750 | 0 | if (unsigned S = Ops->RotateLeft) |
1751 | 0 | Result |= LaneBitmask((M >> S) | (M << (LaneBitmask::BitWidth - S))); |
1752 | 0 | else |
1753 | 0 | Result |= LaneBitmask(M); |
1754 | 0 | } |
1755 | 0 | return Result; |
1756 | 0 | } |
1757 | | |
1758 | 0 | const TargetRegisterClass *AVRGenRegisterInfo::getSubClassWithSubReg(const TargetRegisterClass *RC, unsigned Idx) const { |
1759 | 0 | static const uint8_t Table[23][2] = { |
1760 | 0 | { // GPR8 |
1761 | 0 | 0, // sub_hi |
1762 | 0 | 0, // sub_lo |
1763 | 0 | }, |
1764 | 0 | { // GPR8lo |
1765 | 0 | 0, // sub_hi |
1766 | 0 | 0, // sub_lo |
1767 | 0 | }, |
1768 | 0 | { // LD8 |
1769 | 0 | 0, // sub_hi |
1770 | 0 | 0, // sub_lo |
1771 | 0 | }, |
1772 | 0 | { // LD8lo |
1773 | 0 | 0, // sub_hi |
1774 | 0 | 0, // sub_lo |
1775 | 0 | }, |
1776 | 0 | { // CCR |
1777 | 0 | 0, // sub_hi |
1778 | 0 | 0, // sub_lo |
1779 | 0 | }, |
1780 | 0 | { // DREGS |
1781 | 0 | 6, // sub_hi -> DREGS |
1782 | 0 | 6, // sub_lo -> DREGS |
1783 | 0 | }, |
1784 | 0 | { // DREGSMOVW |
1785 | 0 | 7, // sub_hi -> DREGSMOVW |
1786 | 0 | 7, // sub_lo -> DREGSMOVW |
1787 | 0 | }, |
1788 | 0 | { // DREGS_with_sub_hi_in_LD8 |
1789 | 0 | 8, // sub_hi -> DREGS_with_sub_hi_in_LD8 |
1790 | 0 | 8, // sub_lo -> DREGS_with_sub_hi_in_LD8 |
1791 | 0 | }, |
1792 | 0 | { // DREGS_with_sub_lo_in_LD8 |
1793 | 0 | 9, // sub_hi -> DREGS_with_sub_lo_in_LD8 |
1794 | 0 | 9, // sub_lo -> DREGS_with_sub_lo_in_LD8 |
1795 | 0 | }, |
1796 | 0 | { // DREGS_with_sub_lo_in_GPR8lo |
1797 | 0 | 10, // sub_hi -> DREGS_with_sub_lo_in_GPR8lo |
1798 | 0 | 10, // sub_lo -> DREGS_with_sub_lo_in_GPR8lo |
1799 | 0 | }, |
1800 | 0 | { // DREGS_with_sub_hi_in_GPR8lo |
1801 | 0 | 11, // sub_hi -> DREGS_with_sub_hi_in_GPR8lo |
1802 | 0 | 11, // sub_lo -> DREGS_with_sub_hi_in_GPR8lo |
1803 | 0 | }, |
1804 | 0 | { // DLDREGS |
1805 | 0 | 12, // sub_hi -> DLDREGS |
1806 | 0 | 12, // sub_lo -> DLDREGS |
1807 | 0 | }, |
1808 | 0 | { // DREGS_with_sub_hi_in_LD8lo |
1809 | 0 | 13, // sub_hi -> DREGS_with_sub_hi_in_LD8lo |
1810 | 0 | 13, // sub_lo -> DREGS_with_sub_hi_in_LD8lo |
1811 | 0 | }, |
1812 | 0 | { // DREGS_with_sub_lo_in_LD8lo |
1813 | 0 | 14, // sub_hi -> DREGS_with_sub_lo_in_LD8lo |
1814 | 0 | 14, // sub_lo -> DREGS_with_sub_lo_in_LD8lo |
1815 | 0 | }, |
1816 | 0 | { // DREGSlo |
1817 | 0 | 15, // sub_hi -> DREGSlo |
1818 | 0 | 15, // sub_lo -> DREGSlo |
1819 | 0 | }, |
1820 | 0 | { // DREGS_with_sub_hi_in_LD8lo_and_DREGS_with_sub_lo_in_LD8 |
1821 | 0 | 16, // sub_hi -> DREGS_with_sub_hi_in_LD8lo_and_DREGS_with_sub_lo_in_LD8 |
1822 | 0 | 16, // sub_lo -> DREGS_with_sub_hi_in_LD8lo_and_DREGS_with_sub_lo_in_LD8 |
1823 | 0 | }, |
1824 | 0 | { // DREGSLD8lo |
1825 | 0 | 17, // sub_hi -> DREGSLD8lo |
1826 | 0 | 17, // sub_lo -> DREGSLD8lo |
1827 | 0 | }, |
1828 | 0 | { // IWREGS |
1829 | 0 | 18, // sub_hi -> IWREGS |
1830 | 0 | 18, // sub_lo -> IWREGS |
1831 | 0 | }, |
1832 | 0 | { // PTRREGS |
1833 | 0 | 19, // sub_hi -> PTRREGS |
1834 | 0 | 19, // sub_lo -> PTRREGS |
1835 | 0 | }, |
1836 | 0 | { // PTRDISPREGS |
1837 | 0 | 20, // sub_hi -> PTRDISPREGS |
1838 | 0 | 20, // sub_lo -> PTRDISPREGS |
1839 | 0 | }, |
1840 | 0 | { // DREGS_with_sub_hi_in_LD8_and_DREGS_with_sub_lo_in_GPR8lo |
1841 | 0 | 21, // sub_hi -> DREGS_with_sub_hi_in_LD8_and_DREGS_with_sub_lo_in_GPR8lo |
1842 | 0 | 21, // sub_lo -> DREGS_with_sub_hi_in_LD8_and_DREGS_with_sub_lo_in_GPR8lo |
1843 | 0 | }, |
1844 | 0 | { // GPRSP |
1845 | 0 | 22, // sub_hi -> GPRSP |
1846 | 0 | 22, // sub_lo -> GPRSP |
1847 | 0 | }, |
1848 | 0 | { // ZREG |
1849 | 0 | 23, // sub_hi -> ZREG |
1850 | 0 | 23, // sub_lo -> ZREG |
1851 | 0 | }, |
1852 | 0 | }; |
1853 | 0 | assert(RC && "Missing regclass"); |
1854 | 0 | if (!Idx) return RC; |
1855 | 0 | --Idx; |
1856 | 0 | assert(Idx < 2 && "Bad subreg"); |
1857 | 0 | unsigned TV = Table[RC->getID()][Idx]; |
1858 | 0 | return TV ? getRegClass(TV - 1) : nullptr; |
1859 | 0 | } |
1860 | | |
1861 | 0 | const TargetRegisterClass *AVRGenRegisterInfo::getSubRegisterClass(const TargetRegisterClass *RC, unsigned Idx) const { |
1862 | 0 | static const uint8_t Table[23][2] = { |
1863 | 0 | { // GPR8 |
1864 | 0 | 0, // GPR8:sub_hi |
1865 | 0 | 0, // GPR8:sub_lo |
1866 | 0 | }, |
1867 | 0 | { // GPR8lo |
1868 | 0 | 0, // GPR8lo:sub_hi |
1869 | 0 | 0, // GPR8lo:sub_lo |
1870 | 0 | }, |
1871 | 0 | { // LD8 |
1872 | 0 | 0, // LD8:sub_hi |
1873 | 0 | 0, // LD8:sub_lo |
1874 | 0 | }, |
1875 | 0 | { // LD8lo |
1876 | 0 | 0, // LD8lo:sub_hi |
1877 | 0 | 0, // LD8lo:sub_lo |
1878 | 0 | }, |
1879 | 0 | { // CCR |
1880 | 0 | 0, // CCR:sub_hi |
1881 | 0 | 0, // CCR:sub_lo |
1882 | 0 | }, |
1883 | 0 | { // DREGS |
1884 | 0 | 1, // DREGS:sub_hi -> GPR8 |
1885 | 0 | 1, // DREGS:sub_lo -> GPR8 |
1886 | 0 | }, |
1887 | 0 | { // DREGSMOVW |
1888 | 0 | 1, // DREGSMOVW:sub_hi -> GPR8 |
1889 | 0 | 1, // DREGSMOVW:sub_lo -> GPR8 |
1890 | 0 | }, |
1891 | 0 | { // DREGS_with_sub_hi_in_LD8 |
1892 | 0 | 3, // DREGS_with_sub_hi_in_LD8:sub_hi -> LD8 |
1893 | 0 | 1, // DREGS_with_sub_hi_in_LD8:sub_lo -> GPR8 |
1894 | 0 | }, |
1895 | 0 | { // DREGS_with_sub_lo_in_LD8 |
1896 | 0 | 3, // DREGS_with_sub_lo_in_LD8:sub_hi -> LD8 |
1897 | 0 | 3, // DREGS_with_sub_lo_in_LD8:sub_lo -> LD8 |
1898 | 0 | }, |
1899 | 0 | { // DREGS_with_sub_lo_in_GPR8lo |
1900 | 0 | 1, // DREGS_with_sub_lo_in_GPR8lo:sub_hi -> GPR8 |
1901 | 0 | 2, // DREGS_with_sub_lo_in_GPR8lo:sub_lo -> GPR8lo |
1902 | 0 | }, |
1903 | 0 | { // DREGS_with_sub_hi_in_GPR8lo |
1904 | 0 | 2, // DREGS_with_sub_hi_in_GPR8lo:sub_hi -> GPR8lo |
1905 | 0 | 2, // DREGS_with_sub_hi_in_GPR8lo:sub_lo -> GPR8lo |
1906 | 0 | }, |
1907 | 0 | { // DLDREGS |
1908 | 0 | 3, // DLDREGS:sub_hi -> LD8 |
1909 | 0 | 3, // DLDREGS:sub_lo -> LD8 |
1910 | 0 | }, |
1911 | 0 | { // DREGS_with_sub_hi_in_LD8lo |
1912 | 0 | 4, // DREGS_with_sub_hi_in_LD8lo:sub_hi -> LD8lo |
1913 | 0 | 1, // DREGS_with_sub_hi_in_LD8lo:sub_lo -> GPR8 |
1914 | 0 | }, |
1915 | 0 | { // DREGS_with_sub_lo_in_LD8lo |
1916 | 0 | 3, // DREGS_with_sub_lo_in_LD8lo:sub_hi -> LD8 |
1917 | 0 | 4, // DREGS_with_sub_lo_in_LD8lo:sub_lo -> LD8lo |
1918 | 0 | }, |
1919 | 0 | { // DREGSlo |
1920 | 0 | 2, // DREGSlo:sub_hi -> GPR8lo |
1921 | 0 | 2, // DREGSlo:sub_lo -> GPR8lo |
1922 | 0 | }, |
1923 | 0 | { // DREGS_with_sub_hi_in_LD8lo_and_DREGS_with_sub_lo_in_LD8 |
1924 | 0 | 4, // DREGS_with_sub_hi_in_LD8lo_and_DREGS_with_sub_lo_in_LD8:sub_hi -> LD8lo |
1925 | 0 | 4, // DREGS_with_sub_hi_in_LD8lo_and_DREGS_with_sub_lo_in_LD8:sub_lo -> LD8lo |
1926 | 0 | }, |
1927 | 0 | { // DREGSLD8lo |
1928 | 0 | 4, // DREGSLD8lo:sub_hi -> LD8lo |
1929 | 0 | 4, // DREGSLD8lo:sub_lo -> LD8lo |
1930 | 0 | }, |
1931 | 0 | { // IWREGS |
1932 | 0 | 3, // IWREGS:sub_hi -> LD8 |
1933 | 0 | 3, // IWREGS:sub_lo -> LD8 |
1934 | 0 | }, |
1935 | 0 | { // PTRREGS |
1936 | 0 | 3, // PTRREGS:sub_hi -> LD8 |
1937 | 0 | 3, // PTRREGS:sub_lo -> LD8 |
1938 | 0 | }, |
1939 | 0 | { // PTRDISPREGS |
1940 | 0 | 3, // PTRDISPREGS:sub_hi -> LD8 |
1941 | 0 | 3, // PTRDISPREGS:sub_lo -> LD8 |
1942 | 0 | }, |
1943 | 0 | { // DREGS_with_sub_hi_in_LD8_and_DREGS_with_sub_lo_in_GPR8lo |
1944 | 0 | 4, // DREGS_with_sub_hi_in_LD8_and_DREGS_with_sub_lo_in_GPR8lo:sub_hi -> LD8lo |
1945 | 0 | 2, // DREGS_with_sub_hi_in_LD8_and_DREGS_with_sub_lo_in_GPR8lo:sub_lo -> GPR8lo |
1946 | 0 | }, |
1947 | 0 | { // GPRSP |
1948 | 0 | 0, // GPRSP:sub_hi |
1949 | 0 | 0, // GPRSP:sub_lo |
1950 | 0 | }, |
1951 | 0 | { // ZREG |
1952 | 0 | 3, // ZREG:sub_hi -> LD8 |
1953 | 0 | 3, // ZREG:sub_lo -> LD8 |
1954 | 0 | }, |
1955 | 0 | }; |
1956 | 0 | assert(RC && "Missing regclass"); |
1957 | 0 | if (!Idx) return RC; |
1958 | 0 | --Idx; |
1959 | 0 | assert(Idx < 2 && "Bad subreg"); |
1960 | 0 | unsigned TV = Table[RC->getID()][Idx]; |
1961 | 0 | return TV ? getRegClass(TV - 1) : nullptr; |
1962 | 0 | } |
1963 | | |
1964 | | /// Get the weight in units of pressure for this register class. |
1965 | | const RegClassWeight &AVRGenRegisterInfo:: |
1966 | 0 | getRegClassWeight(const TargetRegisterClass *RC) const { |
1967 | 0 | static const RegClassWeight RCWeightTable[] = { |
1968 | 0 | {1, 32}, // GPR8 |
1969 | 0 | {1, 16}, // GPR8lo |
1970 | 0 | {1, 16}, // LD8 |
1971 | 0 | {1, 8}, // LD8lo |
1972 | 0 | {1, 1}, // CCR |
1973 | 0 | {2, 32}, // DREGS |
1974 | 0 | {2, 32}, // DREGSMOVW |
1975 | 0 | {2, 17}, // DREGS_with_sub_hi_in_LD8 |
1976 | 0 | {2, 16}, // DREGS_with_sub_lo_in_LD8 |
1977 | 0 | {2, 17}, // DREGS_with_sub_lo_in_GPR8lo |
1978 | 0 | {2, 16}, // DREGS_with_sub_hi_in_GPR8lo |
1979 | 0 | {2, 16}, // DLDREGS |
1980 | 0 | {2, 9}, // DREGS_with_sub_hi_in_LD8lo |
1981 | 0 | {2, 9}, // DREGS_with_sub_lo_in_LD8lo |
1982 | 0 | {2, 16}, // DREGSlo |
1983 | 0 | {2, 8}, // DREGS_with_sub_hi_in_LD8lo_and_DREGS_with_sub_lo_in_LD8 |
1984 | 0 | {2, 8}, // DREGSLD8lo |
1985 | 0 | {2, 8}, // IWREGS |
1986 | 0 | {2, 6}, // PTRREGS |
1987 | 0 | {2, 4}, // PTRDISPREGS |
1988 | 0 | {2, 2}, // DREGS_with_sub_hi_in_LD8_and_DREGS_with_sub_lo_in_GPR8lo |
1989 | 0 | {2, 2}, // GPRSP |
1990 | 0 | {2, 2}, // ZREG |
1991 | 0 | }; |
1992 | 0 | return RCWeightTable[RC->getID()]; |
1993 | 0 | } |
1994 | | |
1995 | | /// Get the weight in units of pressure for this register unit. |
1996 | | unsigned AVRGenRegisterInfo:: |
1997 | 0 | getRegUnitWeight(unsigned RegUnit) const { |
1998 | 0 | assert(RegUnit < 35 && "invalid register unit"); |
1999 | | // All register units have unit weight. |
2000 | 0 | return 1; |
2001 | 0 | } |
2002 | | |
2003 | | |
2004 | | // Get the number of dimensions of register pressure. |
2005 | 0 | unsigned AVRGenRegisterInfo::getNumRegPressureSets() const { |
2006 | 0 | return 9; |
2007 | 0 | } |
2008 | | |
2009 | | // Get the name of this register unit pressure set. |
2010 | | const char *AVRGenRegisterInfo:: |
2011 | 0 | getRegPressureSetName(unsigned Idx) const { |
2012 | 0 | static const char *PressureNameTable[] = { |
2013 | 0 | "CCR", |
2014 | 0 | "DREGS_with_sub_hi_in_LD8_and_DREGS_with_sub_lo_in_GPR8lo", |
2015 | 0 | "GPRSP", |
2016 | 0 | "IWREGS", |
2017 | 0 | "LD8lo", |
2018 | 0 | "LD8", |
2019 | 0 | "GPR8lo", |
2020 | 0 | "GPR8lo_with_LD8lo", |
2021 | 0 | "GPR8", |
2022 | 0 | }; |
2023 | 0 | return PressureNameTable[Idx]; |
2024 | 0 | } |
2025 | | |
2026 | | // Get the register unit pressure limit for this dimension. |
2027 | | // This limit must be adjusted dynamically for reserved registers. |
2028 | | unsigned AVRGenRegisterInfo:: |
2029 | 0 | getRegPressureSetLimit(const MachineFunction &MF, unsigned Idx) const { |
2030 | 0 | static const uint8_t PressureLimitTable[] = { |
2031 | 0 | 1, // 0: CCR |
2032 | 0 | 2, // 1: DREGS_with_sub_hi_in_LD8_and_DREGS_with_sub_lo_in_GPR8lo |
2033 | 0 | 2, // 2: GPRSP |
2034 | 0 | 8, // 3: IWREGS |
2035 | 0 | 10, // 4: LD8lo |
2036 | 0 | 17, // 5: LD8 |
2037 | 0 | 17, // 6: GPR8lo |
2038 | 0 | 25, // 7: GPR8lo_with_LD8lo |
2039 | 0 | 32, // 8: GPR8 |
2040 | 0 | }; |
2041 | 0 | return PressureLimitTable[Idx]; |
2042 | 0 | } |
2043 | | |
2044 | | /// Table of pressure sets per register class or unit. |
2045 | | static const int RCSetsTable[] = { |
2046 | | /* 0 */ 0, -1, |
2047 | | /* 2 */ 2, -1, |
2048 | | /* 4 */ 3, 5, 8, -1, |
2049 | | /* 8 */ 3, 4, 5, 7, 8, -1, |
2050 | | /* 14 */ 1, 4, 5, 6, 7, 8, -1, |
2051 | | }; |
2052 | | |
2053 | | /// Get the dimensions of register pressure impacted by this register class. |
2054 | | /// Returns a -1 terminated array of pressure set IDs |
2055 | | const int *AVRGenRegisterInfo:: |
2056 | 0 | getRegClassPressureSets(const TargetRegisterClass *RC) const { |
2057 | 0 | static const uint8_t RCSetStartTable[] = { |
2058 | 0 | 6,17,5,9,0,6,6,5,5,17,17,5,9,9,17,9,9,4,4,4,14,2,4,}; |
2059 | 0 | return &RCSetsTable[RCSetStartTable[RC->getID()]]; |
2060 | 0 | } |
2061 | | |
2062 | | /// Get the dimensions of register pressure impacted by this register unit. |
2063 | | /// Returns a -1 terminated array of pressure set IDs |
2064 | | const int *AVRGenRegisterInfo:: |
2065 | 0 | getRegUnitPressureSets(unsigned RegUnit) const { |
2066 | 0 | assert(RegUnit < 35 && "invalid register unit"); |
2067 | 0 | static const uint8_t RUSetStartTable[] = { |
2068 | 0 | 2,2,0,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,14,14,9,9,9,9,9,9,9,8,4,4,4,4,4,4,4,}; |
2069 | 0 | return &RCSetsTable[RUSetStartTable[RegUnit]]; |
2070 | 0 | } |
2071 | | |
2072 | | extern const MCRegisterDesc AVRRegDesc[]; |
2073 | | extern const int16_t AVRRegDiffLists[]; |
2074 | | extern const LaneBitmask AVRLaneMaskLists[]; |
2075 | | extern const char AVRRegStrings[]; |
2076 | | extern const char AVRRegClassStrings[]; |
2077 | | extern const MCPhysReg AVRRegUnitRoots[][2]; |
2078 | | extern const uint16_t AVRSubRegIdxLists[]; |
2079 | | extern const MCRegisterInfo::SubRegCoveredBits AVRSubRegIdxRanges[]; |
2080 | | extern const uint16_t AVRRegEncodingTable[]; |
2081 | | // AVR Dwarf<->LLVM register mappings. |
2082 | | extern const MCRegisterInfo::DwarfLLVMRegPair AVRDwarfFlavour0Dwarf2L[]; |
2083 | | extern const unsigned AVRDwarfFlavour0Dwarf2LSize; |
2084 | | |
2085 | | extern const MCRegisterInfo::DwarfLLVMRegPair AVREHFlavour0Dwarf2L[]; |
2086 | | extern const unsigned AVREHFlavour0Dwarf2LSize; |
2087 | | |
2088 | | extern const MCRegisterInfo::DwarfLLVMRegPair AVRDwarfFlavour0L2Dwarf[]; |
2089 | | extern const unsigned AVRDwarfFlavour0L2DwarfSize; |
2090 | | |
2091 | | extern const MCRegisterInfo::DwarfLLVMRegPair AVREHFlavour0L2Dwarf[]; |
2092 | | extern const unsigned AVREHFlavour0L2DwarfSize; |
2093 | | |
2094 | | AVRGenRegisterInfo:: |
2095 | | AVRGenRegisterInfo(unsigned RA, unsigned DwarfFlavour, unsigned EHFlavour, |
2096 | | unsigned PC, unsigned HwMode) |
2097 | | : TargetRegisterInfo(&AVRRegInfoDesc, RegisterClasses, RegisterClasses+23, |
2098 | | SubRegIndexNameTable, SubRegIndexLaneMaskTable, |
2099 | 0 | LaneBitmask(0xFFFFFFFFFFFFFFFF), RegClassInfos, VTLists, HwMode) { |
2100 | 0 | InitMCRegisterInfo(AVRRegDesc, 62, RA, PC, |
2101 | 0 | AVRMCRegisterClasses, 23, |
2102 | 0 | AVRRegUnitRoots, |
2103 | 0 | 35, |
2104 | 0 | AVRRegDiffLists, |
2105 | 0 | AVRLaneMaskLists, |
2106 | 0 | AVRRegStrings, |
2107 | 0 | AVRRegClassStrings, |
2108 | 0 | AVRSubRegIdxLists, |
2109 | 0 | 3, |
2110 | 0 | AVRSubRegIdxRanges, |
2111 | 0 | AVRRegEncodingTable); |
2112 | |
|
2113 | 0 | switch (DwarfFlavour) { |
2114 | 0 | default: |
2115 | 0 | llvm_unreachable("Unknown DWARF flavour"); |
2116 | 0 | case 0: |
2117 | 0 | mapDwarfRegsToLLVMRegs(AVRDwarfFlavour0Dwarf2L, AVRDwarfFlavour0Dwarf2LSize, false); |
2118 | 0 | break; |
2119 | 0 | } |
2120 | 0 | switch (EHFlavour) { |
2121 | 0 | default: |
2122 | 0 | llvm_unreachable("Unknown DWARF flavour"); |
2123 | 0 | case 0: |
2124 | 0 | mapDwarfRegsToLLVMRegs(AVREHFlavour0Dwarf2L, AVREHFlavour0Dwarf2LSize, true); |
2125 | 0 | break; |
2126 | 0 | } |
2127 | 0 | switch (DwarfFlavour) { |
2128 | 0 | default: |
2129 | 0 | llvm_unreachable("Unknown DWARF flavour"); |
2130 | 0 | case 0: |
2131 | 0 | mapLLVMRegsToDwarfRegs(AVRDwarfFlavour0L2Dwarf, AVRDwarfFlavour0L2DwarfSize, false); |
2132 | 0 | break; |
2133 | 0 | } |
2134 | 0 | switch (EHFlavour) { |
2135 | 0 | default: |
2136 | 0 | llvm_unreachable("Unknown DWARF flavour"); |
2137 | 0 | case 0: |
2138 | 0 | mapLLVMRegsToDwarfRegs(AVREHFlavour0L2Dwarf, AVREHFlavour0L2DwarfSize, true); |
2139 | 0 | break; |
2140 | 0 | } |
2141 | 0 | } |
2142 | | |
2143 | | static const MCPhysReg CSR_Interrupts_SaveList[] = { AVR::R31, AVR::R30, AVR::R29, AVR::R28, AVR::R27, AVR::R26, AVR::R25, AVR::R24, AVR::R23, AVR::R22, AVR::R21, AVR::R20, AVR::R19, AVR::R18, AVR::R17, AVR::R16, AVR::R15, AVR::R14, AVR::R13, AVR::R12, AVR::R11, AVR::R10, AVR::R9, AVR::R8, AVR::R7, AVR::R6, AVR::R5, AVR::R4, AVR::R3, AVR::R2, 0 }; |
2144 | | static const uint32_t CSR_Interrupts_RegMask[] = { 0xffffff80, 0x3fffffdf, }; |
2145 | | static const MCPhysReg CSR_InterruptsTiny_SaveList[] = { AVR::R31, AVR::R30, AVR::R29, AVR::R28, AVR::R27, AVR::R26, AVR::R25, AVR::R24, AVR::R23, AVR::R22, AVR::R21, AVR::R20, AVR::R19, AVR::R18, 0 }; |
2146 | | static const uint32_t CSR_InterruptsTiny_RegMask[] = { 0xff800000, 0x3ff8001f, }; |
2147 | | static const MCPhysReg CSR_Normal_SaveList[] = { AVR::R29, AVR::R28, AVR::R17, AVR::R16, AVR::R15, AVR::R14, AVR::R13, AVR::R12, AVR::R11, AVR::R10, AVR::R9, AVR::R8, AVR::R7, AVR::R6, AVR::R5, AVR::R4, AVR::R3, AVR::R2, 0 }; |
2148 | | static const uint32_t CSR_Normal_RegMask[] = { 0x007fff80, 0x1003ffc6, }; |
2149 | | static const MCPhysReg CSR_NormalTiny_SaveList[] = { AVR::R29, AVR::R28, AVR::R19, AVR::R18, 0 }; |
2150 | | static const uint32_t CSR_NormalTiny_RegMask[] = { 0x01800000, 0x10080006, }; |
2151 | | |
2152 | | |
2153 | 0 | ArrayRef<const uint32_t *> AVRGenRegisterInfo::getRegMasks() const { |
2154 | 0 | static const uint32_t *const Masks[] = { |
2155 | 0 | CSR_Interrupts_RegMask, |
2156 | 0 | CSR_InterruptsTiny_RegMask, |
2157 | 0 | CSR_Normal_RegMask, |
2158 | 0 | CSR_NormalTiny_RegMask, |
2159 | 0 | }; |
2160 | 0 | return ArrayRef(Masks); |
2161 | 0 | } |
2162 | | |
2163 | | bool AVRGenRegisterInfo:: |
2164 | 0 | isGeneralPurposeRegister(const MachineFunction &MF, MCRegister PhysReg) const { |
2165 | 0 | return |
2166 | 0 | false; |
2167 | 0 | } |
2168 | | |
2169 | | bool AVRGenRegisterInfo:: |
2170 | 0 | isFixedRegister(const MachineFunction &MF, MCRegister PhysReg) const { |
2171 | 0 | return |
2172 | 0 | false; |
2173 | 0 | } |
2174 | | |
2175 | | bool AVRGenRegisterInfo:: |
2176 | 0 | isArgumentRegister(const MachineFunction &MF, MCRegister PhysReg) const { |
2177 | 0 | return |
2178 | 0 | false; |
2179 | 0 | } |
2180 | | |
2181 | | bool AVRGenRegisterInfo:: |
2182 | 0 | isConstantPhysReg(MCRegister PhysReg) const { |
2183 | 0 | return |
2184 | 0 | false; |
2185 | 0 | } |
2186 | | |
2187 | 0 | ArrayRef<const char *> AVRGenRegisterInfo::getRegMaskNames() const { |
2188 | 0 | static const char *Names[] = { |
2189 | 0 | "CSR_Interrupts", |
2190 | 0 | "CSR_InterruptsTiny", |
2191 | 0 | "CSR_Normal", |
2192 | 0 | "CSR_NormalTiny", |
2193 | 0 | }; |
2194 | 0 | return ArrayRef(Names); |
2195 | 0 | } |
2196 | | |
2197 | | const AVRFrameLowering * |
2198 | 0 | AVRGenRegisterInfo::getFrameLowering(const MachineFunction &MF) { |
2199 | 0 | return static_cast<const AVRFrameLowering *>( |
2200 | 0 | MF.getSubtarget().getFrameLowering()); |
2201 | 0 | } |
2202 | | |
2203 | | } // end namespace llvm |
2204 | | |
2205 | | #endif // GET_REGINFO_TARGET_DESC |
2206 | | |