Coverage Report

Created: 2024-01-17 10:31

/src/build/lib/Target/Sparc/SparcGenRegisterInfo.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 SparcMCRegisterClasses[];
17
18
namespace SP {
19
enum {
20
  NoRegister,
21
  CANRESTORE = 1,
22
  CANSAVE = 2,
23
  CLEANWIN = 3,
24
  CPQ = 4,
25
  CPSR = 5,
26
  CWP = 6,
27
  FQ = 7,
28
  FSR = 8,
29
  GL = 9,
30
  ICC = 10,
31
  OTHERWIN = 11,
32
  PIL = 12,
33
  PSR = 13,
34
  PSTATE = 14,
35
  TBA = 15,
36
  TBR = 16,
37
  TICK = 17,
38
  TL = 18,
39
  TNPC = 19,
40
  TPC = 20,
41
  TSTATE = 21,
42
  TT = 22,
43
  VER = 23,
44
  WIM = 24,
45
  WSTATE = 25,
46
  Y = 26,
47
  ASR1 = 27,
48
  ASR2 = 28,
49
  ASR3 = 29,
50
  ASR4 = 30,
51
  ASR5 = 31,
52
  ASR6 = 32,
53
  ASR7 = 33,
54
  ASR8 = 34,
55
  ASR9 = 35,
56
  ASR10 = 36,
57
  ASR11 = 37,
58
  ASR12 = 38,
59
  ASR13 = 39,
60
  ASR14 = 40,
61
  ASR15 = 41,
62
  ASR16 = 42,
63
  ASR17 = 43,
64
  ASR18 = 44,
65
  ASR19 = 45,
66
  ASR20 = 46,
67
  ASR21 = 47,
68
  ASR22 = 48,
69
  ASR23 = 49,
70
  ASR24 = 50,
71
  ASR25 = 51,
72
  ASR26 = 52,
73
  ASR27 = 53,
74
  ASR28 = 54,
75
  ASR29 = 55,
76
  ASR30 = 56,
77
  ASR31 = 57,
78
  C0 = 58,
79
  C1 = 59,
80
  C2 = 60,
81
  C3 = 61,
82
  C4 = 62,
83
  C5 = 63,
84
  C6 = 64,
85
  C7 = 65,
86
  C8 = 66,
87
  C9 = 67,
88
  C10 = 68,
89
  C11 = 69,
90
  C12 = 70,
91
  C13 = 71,
92
  C14 = 72,
93
  C15 = 73,
94
  C16 = 74,
95
  C17 = 75,
96
  C18 = 76,
97
  C19 = 77,
98
  C20 = 78,
99
  C21 = 79,
100
  C22 = 80,
101
  C23 = 81,
102
  C24 = 82,
103
  C25 = 83,
104
  C26 = 84,
105
  C27 = 85,
106
  C28 = 86,
107
  C29 = 87,
108
  C30 = 88,
109
  C31 = 89,
110
  D0 = 90,
111
  D1 = 91,
112
  D2 = 92,
113
  D3 = 93,
114
  D4 = 94,
115
  D5 = 95,
116
  D6 = 96,
117
  D7 = 97,
118
  D8 = 98,
119
  D9 = 99,
120
  D10 = 100,
121
  D11 = 101,
122
  D12 = 102,
123
  D13 = 103,
124
  D14 = 104,
125
  D15 = 105,
126
  D16 = 106,
127
  D17 = 107,
128
  D18 = 108,
129
  D19 = 109,
130
  D20 = 110,
131
  D21 = 111,
132
  D22 = 112,
133
  D23 = 113,
134
  D24 = 114,
135
  D25 = 115,
136
  D26 = 116,
137
  D27 = 117,
138
  D28 = 118,
139
  D29 = 119,
140
  D30 = 120,
141
  D31 = 121,
142
  F0 = 122,
143
  F1 = 123,
144
  F2 = 124,
145
  F3 = 125,
146
  F4 = 126,
147
  F5 = 127,
148
  F6 = 128,
149
  F7 = 129,
150
  F8 = 130,
151
  F9 = 131,
152
  F10 = 132,
153
  F11 = 133,
154
  F12 = 134,
155
  F13 = 135,
156
  F14 = 136,
157
  F15 = 137,
158
  F16 = 138,
159
  F17 = 139,
160
  F18 = 140,
161
  F19 = 141,
162
  F20 = 142,
163
  F21 = 143,
164
  F22 = 144,
165
  F23 = 145,
166
  F24 = 146,
167
  F25 = 147,
168
  F26 = 148,
169
  F27 = 149,
170
  F28 = 150,
171
  F29 = 151,
172
  F30 = 152,
173
  F31 = 153,
174
  FCC0 = 154,
175
  FCC1 = 155,
176
  FCC2 = 156,
177
  FCC3 = 157,
178
  G0 = 158,
179
  G1 = 159,
180
  G2 = 160,
181
  G3 = 161,
182
  G4 = 162,
183
  G5 = 163,
184
  G6 = 164,
185
  G7 = 165,
186
  I0 = 166,
187
  I1 = 167,
188
  I2 = 168,
189
  I3 = 169,
190
  I4 = 170,
191
  I5 = 171,
192
  I6 = 172,
193
  I7 = 173,
194
  L0 = 174,
195
  L1 = 175,
196
  L2 = 176,
197
  L3 = 177,
198
  L4 = 178,
199
  L5 = 179,
200
  L6 = 180,
201
  L7 = 181,
202
  O0 = 182,
203
  O1 = 183,
204
  O2 = 184,
205
  O3 = 185,
206
  O4 = 186,
207
  O5 = 187,
208
  O6 = 188,
209
  O7 = 189,
210
  Q0 = 190,
211
  Q1 = 191,
212
  Q2 = 192,
213
  Q3 = 193,
214
  Q4 = 194,
215
  Q5 = 195,
216
  Q6 = 196,
217
  Q7 = 197,
218
  Q8 = 198,
219
  Q9 = 199,
220
  Q10 = 200,
221
  Q11 = 201,
222
  Q12 = 202,
223
  Q13 = 203,
224
  Q14 = 204,
225
  Q15 = 205,
226
  C0_C1 = 206,
227
  C2_C3 = 207,
228
  C4_C5 = 208,
229
  C6_C7 = 209,
230
  C8_C9 = 210,
231
  C10_C11 = 211,
232
  C12_C13 = 212,
233
  C14_C15 = 213,
234
  C16_C17 = 214,
235
  C18_C19 = 215,
236
  C20_C21 = 216,
237
  C22_C23 = 217,
238
  C24_C25 = 218,
239
  C26_C27 = 219,
240
  C28_C29 = 220,
241
  C30_C31 = 221,
242
  G0_G1 = 222,
243
  G2_G3 = 223,
244
  G4_G5 = 224,
245
  G6_G7 = 225,
246
  I0_I1 = 226,
247
  I2_I3 = 227,
248
  I4_I5 = 228,
249
  I6_I7 = 229,
250
  L0_L1 = 230,
251
  L2_L3 = 231,
252
  L4_L5 = 232,
253
  L6_L7 = 233,
254
  O0_O1 = 234,
255
  O2_O3 = 235,
256
  O4_O5 = 236,
257
  O6_O7 = 237,
258
  NUM_TARGET_REGS // 238
259
};
260
} // end namespace SP
261
262
// Register classes
263
264
namespace SP {
265
enum {
266
  FCCRegsRegClassID = 0,
267
  ASRRegsRegClassID = 1,
268
  CoprocRegsRegClassID = 2,
269
  FPRegsRegClassID = 3,
270
  IntRegsRegClassID = 4,
271
  DFPRegsRegClassID = 5,
272
  I64RegsRegClassID = 6,
273
  PRRegsRegClassID = 7,
274
  CoprocPairRegClassID = 8,
275
  IntPairRegClassID = 9,
276
  LowDFPRegsRegClassID = 10,
277
  PRRegs_and_ASRRegsRegClassID = 11,
278
  QFPRegsRegClassID = 12,
279
  LowQFPRegsRegClassID = 13,
280
281
};
282
} // end namespace SP
283
284
285
// Register alternate name indices
286
287
namespace SP {
288
enum {
289
  NoRegAltName, // 0
290
  RegNamesStateReg, // 1
291
  NUM_TARGET_REG_ALT_NAMES = 2
292
};
293
} // end namespace SP
294
295
296
// Subregister indices
297
298
namespace SP {
299
enum : uint16_t {
300
  NoSubRegister,
301
  sub_even, // 1
302
  sub_even64, // 2
303
  sub_odd,  // 3
304
  sub_odd64,  // 4
305
  sub_odd64_then_sub_even,  // 5
306
  sub_odd64_then_sub_odd, // 6
307
  NUM_TARGET_SUBREGS
308
};
309
} // end namespace SP
310
311
// Register pressure sets enum.
312
namespace SP {
313
enum RegisterPressureSets {
314
  PRRegs_and_ASRRegs = 0,
315
  FCCRegs = 1,
316
  PRRegs = 2,
317
  FPRegs = 3,
318
  IntRegs = 4,
319
  DFPRegs = 5,
320
};
321
} // end namespace SP
322
323
} // end namespace llvm
324
325
#endif // GET_REGINFO_ENUM
326
327
/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
328
|*                                                                            *|
329
|* MC Register Information                                                    *|
330
|*                                                                            *|
331
|* Automatically generated file, do not edit!                                 *|
332
|*                                                                            *|
333
\*===----------------------------------------------------------------------===*/
334
335
336
#ifdef GET_REGINFO_MC_DESC
337
#undef GET_REGINFO_MC_DESC
338
339
namespace llvm {
340
341
extern const int16_t SparcRegDiffLists[] = {
342
  /* 0 */ -148, 1, 0,
343
  /* 3 */ -147, 1, 0,
344
  /* 6 */ -146, 1, 0,
345
  /* 9 */ -145, 1, 0,
346
  /* 12 */ -144, 1, 0,
347
  /* 15 */ -143, 1, 0,
348
  /* 18 */ -142, 1, 0,
349
  /* 21 */ -141, 1, 0,
350
  /* 24 */ -140, 1, 0,
351
  /* 27 */ -139, 1, 0,
352
  /* 30 */ -138, 1, 0,
353
  /* 33 */ -137, 1, 0,
354
  /* 36 */ -136, 1, 0,
355
  /* 39 */ -135, 1, 0,
356
  /* 42 */ -134, 1, 0,
357
  /* 45 */ -133, 1, 0,
358
  /* 48 */ -92, 1, 0,
359
  /* 51 */ -91, 1, 0,
360
  /* 54 */ -90, 1, 0,
361
  /* 57 */ -89, 1, 0,
362
  /* 60 */ -88, 1, 0,
363
  /* 63 */ -87, 1, 0,
364
  /* 66 */ -86, 1, 0,
365
  /* 69 */ -85, 1, 0,
366
  /* 72 */ -64, 1, 0,
367
  /* 75 */ -63, 1, 0,
368
  /* 78 */ -62, 1, 0,
369
  /* 81 */ -61, 1, 0,
370
  /* 84 */ -60, 1, 0,
371
  /* 87 */ -59, 1, 0,
372
  /* 90 */ -58, 1, 0,
373
  /* 93 */ -57, 1, 0,
374
  /* 96 */ -56, 1, 0,
375
  /* 99 */ -55, 1, 0,
376
  /* 102 */ -54, 1, 0,
377
  /* 105 */ -53, 1, 0,
378
  /* 108 */ -52, 1, 0,
379
  /* 111 */ -51, 1, 0,
380
  /* 114 */ -50, 1, 0,
381
  /* 117 */ -49, 1, 0,
382
  /* 120 */ 1, 1, 1, 0,
383
  /* 124 */ 32, 1, 0,
384
  /* 127 */ -100, 32, 1, -32, 33, 1, 0,
385
  /* 134 */ 34, 1, 0,
386
  /* 137 */ -99, 34, 1, -34, 35, 1, 0,
387
  /* 144 */ 36, 1, 0,
388
  /* 147 */ -98, 36, 1, -36, 37, 1, 0,
389
  /* 154 */ 38, 1, 0,
390
  /* 157 */ -97, 38, 1, -38, 39, 1, 0,
391
  /* 164 */ 40, 1, 0,
392
  /* 167 */ -96, 40, 1, -40, 41, 1, 0,
393
  /* 174 */ 42, 1, 0,
394
  /* 177 */ -95, 42, 1, -42, 43, 1, 0,
395
  /* 184 */ 44, 1, 0,
396
  /* 187 */ -94, 44, 1, -44, 45, 1, 0,
397
  /* 194 */ 46, 1, 0,
398
  /* 197 */ -93, 46, 1, -46, 47, 1, 0,
399
  /* 204 */ 48, 0,
400
  /* 206 */ 49, 0,
401
  /* 208 */ 50, 0,
402
  /* 210 */ 51, 0,
403
  /* 212 */ 52, 0,
404
  /* 214 */ 53, 0,
405
  /* 216 */ 54, 0,
406
  /* 218 */ 55, 0,
407
  /* 220 */ 56, 0,
408
  /* 222 */ 57, 0,
409
  /* 224 */ 58, 0,
410
  /* 226 */ 59, 0,
411
  /* 228 */ 60, 0,
412
  /* 230 */ 61, 0,
413
  /* 232 */ 62, 0,
414
  /* 234 */ 63, 0,
415
  /* 236 */ 64, 0,
416
  /* 238 */ 84, 0,
417
  /* 240 */ 85, 0,
418
  /* 242 */ 86, 0,
419
  /* 244 */ 87, 0,
420
  /* 246 */ 88, 0,
421
  /* 248 */ 89, 0,
422
  /* 250 */ 90, 0,
423
  /* 252 */ 91, 0,
424
  /* 254 */ -48, 92, 0,
425
  /* 257 */ -47, 92, 0,
426
  /* 260 */ -47, 93, 0,
427
  /* 263 */ -46, 93, 0,
428
  /* 266 */ -45, 93, 0,
429
  /* 269 */ -45, 94, 0,
430
  /* 272 */ -44, 94, 0,
431
  /* 275 */ -43, 94, 0,
432
  /* 278 */ -43, 95, 0,
433
  /* 281 */ -42, 95, 0,
434
  /* 284 */ -41, 95, 0,
435
  /* 287 */ -41, 96, 0,
436
  /* 290 */ -40, 96, 0,
437
  /* 293 */ -39, 96, 0,
438
  /* 296 */ -39, 97, 0,
439
  /* 299 */ -38, 97, 0,
440
  /* 302 */ -37, 97, 0,
441
  /* 305 */ -37, 98, 0,
442
  /* 308 */ -36, 98, 0,
443
  /* 311 */ -35, 98, 0,
444
  /* 314 */ -35, 99, 0,
445
  /* 317 */ -34, 99, 0,
446
  /* 320 */ -33, 99, 0,
447
  /* 323 */ -33, 100, 0,
448
  /* 326 */ -32, 100, 0,
449
  /* 329 */ 132, 0,
450
  /* 331 */ 133, 0,
451
  /* 333 */ 134, 0,
452
  /* 335 */ 135, 0,
453
  /* 337 */ 136, 0,
454
  /* 339 */ 137, 0,
455
  /* 341 */ 138, 0,
456
  /* 343 */ 139, 0,
457
  /* 345 */ 140, 0,
458
  /* 347 */ 141, 0,
459
  /* 349 */ 142, 0,
460
  /* 351 */ 143, 0,
461
  /* 353 */ 144, 0,
462
  /* 355 */ 145, 0,
463
  /* 357 */ 146, 0,
464
  /* 359 */ 147, 0,
465
  /* 361 */ 148, 0,
466
};
467
468
extern const LaneBitmask SparcLaneMaskLists[] = {
469
  /* 0 */ LaneBitmask(0x0000000000000001), LaneBitmask(0x0000000000000002), LaneBitmask::getAll(),
470
  /* 3 */ LaneBitmask(0x0000000000000001), LaneBitmask(0x0000000000000002), LaneBitmask(0x0000000000000004), LaneBitmask(0x0000000000000008), LaneBitmask::getAll(),
471
  /* 8 */ LaneBitmask(0x0000000000000003), LaneBitmask(0x000000000000000C), LaneBitmask::getAll(),
472
  /* 11 */ LaneBitmask(0xFFFFFFFFFFFFFFFF), LaneBitmask::getAll(),
473
};
474
475
extern const uint16_t SparcSubRegIdxLists[] = {
476
  /* 0 */ 1, 3, 0,
477
  /* 3 */ 2, 4, 0,
478
  /* 6 */ 2, 1, 3, 4, 5, 6, 0,
479
};
480
481
extern const MCRegisterInfo::SubRegCoveredBits SparcSubRegIdxRanges[] = {
482
  { 65535, 65535 },
483
  { 0, 32 },  // sub_even
484
  { 0, 64 },  // sub_even64
485
  { 32, 32 }, // sub_odd
486
  { 64, 64 }, // sub_odd64
487
  { 64, 32 }, // sub_odd64_then_sub_even
488
  { 96, 32 }, // sub_odd64_then_sub_odd
489
};
490
491
492
#ifdef __GNUC__
493
#pragma GCC diagnostic push
494
#pragma GCC diagnostic ignored "-Woverlength-strings"
495
#endif
496
extern const char SparcRegStrings[] = {
497
  /* 0 */ "C10\0"
498
  /* 4 */ "D10\0"
499
  /* 8 */ "F10\0"
500
  /* 12 */ "Q10\0"
501
  /* 16 */ "ASR10\0"
502
  /* 22 */ "C20\0"
503
  /* 26 */ "D20\0"
504
  /* 30 */ "F20\0"
505
  /* 34 */ "ASR20\0"
506
  /* 40 */ "C30\0"
507
  /* 44 */ "D30\0"
508
  /* 48 */ "F30\0"
509
  /* 52 */ "ASR30\0"
510
  /* 58 */ "FCC0\0"
511
  /* 63 */ "D0\0"
512
  /* 66 */ "F0\0"
513
  /* 69 */ "G0\0"
514
  /* 72 */ "I0\0"
515
  /* 75 */ "L0\0"
516
  /* 78 */ "O0\0"
517
  /* 81 */ "Q0\0"
518
  /* 84 */ "C10_C11\0"
519
  /* 92 */ "D11\0"
520
  /* 96 */ "F11\0"
521
  /* 100 */ "Q11\0"
522
  /* 104 */ "ASR11\0"
523
  /* 110 */ "C20_C21\0"
524
  /* 118 */ "D21\0"
525
  /* 122 */ "F21\0"
526
  /* 126 */ "ASR21\0"
527
  /* 132 */ "C30_C31\0"
528
  /* 140 */ "D31\0"
529
  /* 144 */ "F31\0"
530
  /* 148 */ "ASR31\0"
531
  /* 154 */ "FCC1\0"
532
  /* 159 */ "C0_C1\0"
533
  /* 165 */ "D1\0"
534
  /* 168 */ "F1\0"
535
  /* 171 */ "G0_G1\0"
536
  /* 177 */ "I0_I1\0"
537
  /* 183 */ "L0_L1\0"
538
  /* 189 */ "O0_O1\0"
539
  /* 195 */ "Q1\0"
540
  /* 198 */ "ASR1\0"
541
  /* 203 */ "C12\0"
542
  /* 207 */ "D12\0"
543
  /* 211 */ "F12\0"
544
  /* 215 */ "Q12\0"
545
  /* 219 */ "ASR12\0"
546
  /* 225 */ "C22\0"
547
  /* 229 */ "D22\0"
548
  /* 233 */ "F22\0"
549
  /* 237 */ "ASR22\0"
550
  /* 243 */ "FCC2\0"
551
  /* 248 */ "D2\0"
552
  /* 251 */ "F2\0"
553
  /* 254 */ "G2\0"
554
  /* 257 */ "I2\0"
555
  /* 260 */ "L2\0"
556
  /* 263 */ "O2\0"
557
  /* 266 */ "Q2\0"
558
  /* 269 */ "ASR2\0"
559
  /* 274 */ "C12_C13\0"
560
  /* 282 */ "D13\0"
561
  /* 286 */ "F13\0"
562
  /* 290 */ "Q13\0"
563
  /* 294 */ "ASR13\0"
564
  /* 300 */ "C22_C23\0"
565
  /* 308 */ "D23\0"
566
  /* 312 */ "F23\0"
567
  /* 316 */ "ASR23\0"
568
  /* 322 */ "FCC3\0"
569
  /* 327 */ "C2_C3\0"
570
  /* 333 */ "D3\0"
571
  /* 336 */ "F3\0"
572
  /* 339 */ "G2_G3\0"
573
  /* 345 */ "I2_I3\0"
574
  /* 351 */ "L2_L3\0"
575
  /* 357 */ "O2_O3\0"
576
  /* 363 */ "Q3\0"
577
  /* 366 */ "ASR3\0"
578
  /* 371 */ "C14\0"
579
  /* 375 */ "D14\0"
580
  /* 379 */ "F14\0"
581
  /* 383 */ "Q14\0"
582
  /* 387 */ "ASR14\0"
583
  /* 393 */ "C24\0"
584
  /* 397 */ "D24\0"
585
  /* 401 */ "F24\0"
586
  /* 405 */ "ASR24\0"
587
  /* 411 */ "C4\0"
588
  /* 414 */ "D4\0"
589
  /* 417 */ "F4\0"
590
  /* 420 */ "G4\0"
591
  /* 423 */ "I4\0"
592
  /* 426 */ "L4\0"
593
  /* 429 */ "O4\0"
594
  /* 432 */ "Q4\0"
595
  /* 435 */ "ASR4\0"
596
  /* 440 */ "C14_C15\0"
597
  /* 448 */ "D15\0"
598
  /* 452 */ "F15\0"
599
  /* 456 */ "Q15\0"
600
  /* 460 */ "ASR15\0"
601
  /* 466 */ "C24_C25\0"
602
  /* 474 */ "D25\0"
603
  /* 478 */ "F25\0"
604
  /* 482 */ "ASR25\0"
605
  /* 488 */ "C4_C5\0"
606
  /* 494 */ "D5\0"
607
  /* 497 */ "F5\0"
608
  /* 500 */ "G4_G5\0"
609
  /* 506 */ "I4_I5\0"
610
  /* 512 */ "L4_L5\0"
611
  /* 518 */ "O4_O5\0"
612
  /* 524 */ "Q5\0"
613
  /* 527 */ "ASR5\0"
614
  /* 532 */ "C16\0"
615
  /* 536 */ "D16\0"
616
  /* 540 */ "F16\0"
617
  /* 544 */ "ASR16\0"
618
  /* 550 */ "C26\0"
619
  /* 554 */ "D26\0"
620
  /* 558 */ "F26\0"
621
  /* 562 */ "ASR26\0"
622
  /* 568 */ "C6\0"
623
  /* 571 */ "D6\0"
624
  /* 574 */ "F6\0"
625
  /* 577 */ "G6\0"
626
  /* 580 */ "I6\0"
627
  /* 583 */ "L6\0"
628
  /* 586 */ "O6\0"
629
  /* 589 */ "Q6\0"
630
  /* 592 */ "ASR6\0"
631
  /* 597 */ "C16_C17\0"
632
  /* 605 */ "D17\0"
633
  /* 609 */ "F17\0"
634
  /* 613 */ "ASR17\0"
635
  /* 619 */ "C26_C27\0"
636
  /* 627 */ "D27\0"
637
  /* 631 */ "F27\0"
638
  /* 635 */ "ASR27\0"
639
  /* 641 */ "C6_C7\0"
640
  /* 647 */ "D7\0"
641
  /* 650 */ "F7\0"
642
  /* 653 */ "G6_G7\0"
643
  /* 659 */ "I6_I7\0"
644
  /* 665 */ "L6_L7\0"
645
  /* 671 */ "O6_O7\0"
646
  /* 677 */ "Q7\0"
647
  /* 680 */ "ASR7\0"
648
  /* 685 */ "C18\0"
649
  /* 689 */ "D18\0"
650
  /* 693 */ "F18\0"
651
  /* 697 */ "ASR18\0"
652
  /* 703 */ "C28\0"
653
  /* 707 */ "D28\0"
654
  /* 711 */ "F28\0"
655
  /* 715 */ "ASR28\0"
656
  /* 721 */ "C8\0"
657
  /* 724 */ "D8\0"
658
  /* 727 */ "F8\0"
659
  /* 730 */ "Q8\0"
660
  /* 733 */ "ASR8\0"
661
  /* 738 */ "C18_C19\0"
662
  /* 746 */ "D19\0"
663
  /* 750 */ "F19\0"
664
  /* 754 */ "ASR19\0"
665
  /* 760 */ "C28_C29\0"
666
  /* 768 */ "D29\0"
667
  /* 772 */ "F29\0"
668
  /* 776 */ "ASR29\0"
669
  /* 782 */ "C8_C9\0"
670
  /* 788 */ "D9\0"
671
  /* 791 */ "F9\0"
672
  /* 794 */ "Q9\0"
673
  /* 797 */ "ASR9\0"
674
  /* 802 */ "TBA\0"
675
  /* 806 */ "ICC\0"
676
  /* 810 */ "TNPC\0"
677
  /* 815 */ "TPC\0"
678
  /* 819 */ "CANRESTORE\0"
679
  /* 830 */ "PSTATE\0"
680
  /* 837 */ "TSTATE\0"
681
  /* 844 */ "WSTATE\0"
682
  /* 851 */ "CANSAVE\0"
683
  /* 859 */ "TICK\0"
684
  /* 864 */ "GL\0"
685
  /* 867 */ "PIL\0"
686
  /* 871 */ "TL\0"
687
  /* 874 */ "WIM\0"
688
  /* 878 */ "CLEANWIN\0"
689
  /* 887 */ "OTHERWIN\0"
690
  /* 896 */ "CWP\0"
691
  /* 900 */ "FQ\0"
692
  /* 903 */ "CPQ\0"
693
  /* 907 */ "TBR\0"
694
  /* 911 */ "VER\0"
695
  /* 915 */ "FSR\0"
696
  /* 919 */ "CPSR\0"
697
  /* 924 */ "TT\0"
698
  /* 927 */ "Y\0"
699
};
700
#ifdef __GNUC__
701
#pragma GCC diagnostic pop
702
#endif
703
704
extern const MCRegisterDesc SparcRegDesc[] = { // Descriptors
705
  { 3, 0, 0, 0, 0, 0 },
706
  { 819, 2, 2, 2, 8192, 11 },
707
  { 851, 2, 2, 2, 8193, 11 },
708
  { 878, 2, 2, 2, 8194, 11 },
709
  { 903, 2, 2, 2, 8195, 11 },
710
  { 919, 2, 2, 2, 8196, 11 },
711
  { 896, 2, 2, 2, 8197, 11 },
712
  { 900, 2, 2, 2, 8198, 11 },
713
  { 915, 2, 2, 2, 8199, 11 },
714
  { 864, 2, 2, 2, 8200, 11 },
715
  { 806, 2, 2, 2, 8201, 11 },
716
  { 887, 2, 2, 2, 8202, 11 },
717
  { 867, 2, 2, 2, 8203, 11 },
718
  { 920, 2, 2, 2, 8204, 11 },
719
  { 830, 2, 2, 2, 8205, 11 },
720
  { 802, 2, 2, 2, 8206, 11 },
721
  { 907, 2, 2, 2, 8207, 11 },
722
  { 859, 2, 2, 2, 8208, 11 },
723
  { 871, 2, 2, 2, 8209, 11 },
724
  { 810, 2, 2, 2, 8210, 11 },
725
  { 815, 2, 2, 2, 8211, 11 },
726
  { 837, 2, 2, 2, 8212, 11 },
727
  { 924, 2, 2, 2, 8213, 11 },
728
  { 911, 2, 2, 2, 8214, 11 },
729
  { 874, 2, 2, 2, 8215, 11 },
730
  { 844, 2, 2, 2, 8216, 11 },
731
  { 927, 2, 2, 2, 8217, 11 },
732
  { 198, 2, 2, 2, 8218, 11 },
733
  { 269, 2, 2, 2, 8219, 11 },
734
  { 366, 2, 2, 2, 8220, 11 },
735
  { 435, 2, 2, 2, 8221, 11 },
736
  { 527, 2, 2, 2, 8222, 11 },
737
  { 592, 2, 2, 2, 8223, 11 },
738
  { 680, 2, 2, 2, 8224, 11 },
739
  { 733, 2, 2, 2, 8225, 11 },
740
  { 797, 2, 2, 2, 8226, 11 },
741
  { 16, 2, 2, 2, 8227, 11 },
742
  { 104, 2, 2, 2, 8228, 11 },
743
  { 219, 2, 2, 2, 8229, 11 },
744
  { 294, 2, 2, 2, 8230, 11 },
745
  { 387, 2, 2, 2, 8231, 11 },
746
  { 460, 2, 2, 2, 8232, 11 },
747
  { 544, 2, 2, 2, 8233, 11 },
748
  { 613, 2, 2, 2, 8234, 11 },
749
  { 697, 2, 2, 2, 8235, 11 },
750
  { 754, 2, 2, 2, 8236, 11 },
751
  { 34, 2, 2, 2, 8237, 11 },
752
  { 126, 2, 2, 2, 8238, 11 },
753
  { 237, 2, 2, 2, 8239, 11 },
754
  { 316, 2, 2, 2, 8240, 11 },
755
  { 405, 2, 2, 2, 8241, 11 },
756
  { 482, 2, 2, 2, 8242, 11 },
757
  { 562, 2, 2, 2, 8243, 11 },
758
  { 635, 2, 2, 2, 8244, 11 },
759
  { 715, 2, 2, 2, 8245, 11 },
760
  { 776, 2, 2, 2, 8246, 11 },
761
  { 52, 2, 2, 2, 8247, 11 },
762
  { 148, 2, 2, 2, 8248, 11 },
763
  { 60, 2, 361, 2, 8249, 11 },
764
  { 156, 2, 359, 2, 8250, 11 },
765
  { 245, 2, 359, 2, 8251, 11 },
766
  { 324, 2, 357, 2, 8252, 11 },
767
  { 411, 2, 357, 2, 8253, 11 },
768
  { 491, 2, 355, 2, 8254, 11 },
769
  { 568, 2, 355, 2, 8255, 11 },
770
  { 644, 2, 353, 2, 8256, 11 },
771
  { 721, 2, 353, 2, 8257, 11 },
772
  { 785, 2, 351, 2, 8258, 11 },
773
  { 0, 2, 351, 2, 8259, 11 },
774
  { 88, 2, 349, 2, 8260, 11 },
775
  { 203, 2, 349, 2, 8261, 11 },
776
  { 278, 2, 347, 2, 8262, 11 },
777
  { 371, 2, 347, 2, 8263, 11 },
778
  { 444, 2, 345, 2, 8264, 11 },
779
  { 532, 2, 345, 2, 8265, 11 },
780
  { 601, 2, 343, 2, 8266, 11 },
781
  { 685, 2, 343, 2, 8267, 11 },
782
  { 742, 2, 341, 2, 8268, 11 },
783
  { 22, 2, 341, 2, 8269, 11 },
784
  { 114, 2, 339, 2, 8270, 11 },
785
  { 225, 2, 339, 2, 8271, 11 },
786
  { 304, 2, 337, 2, 8272, 11 },
787
  { 393, 2, 337, 2, 8273, 11 },
788
  { 470, 2, 335, 2, 8274, 11 },
789
  { 550, 2, 335, 2, 8275, 11 },
790
  { 623, 2, 333, 2, 8276, 11 },
791
  { 703, 2, 333, 2, 8277, 11 },
792
  { 764, 2, 331, 2, 8278, 11 },
793
  { 40, 2, 331, 2, 8279, 11 },
794
  { 136, 2, 329, 2, 8280, 11 },
795
  { 63, 124, 324, 0, 4185, 0 },
796
  { 165, 131, 315, 0, 4187, 0 },
797
  { 248, 134, 315, 0, 4189, 0 },
798
  { 333, 141, 306, 0, 4191, 0 },
799
  { 414, 144, 306, 0, 4193, 0 },
800
  { 494, 151, 297, 0, 4195, 0 },
801
  { 571, 154, 297, 0, 4197, 0 },
802
  { 647, 161, 288, 0, 4199, 0 },
803
  { 724, 164, 288, 0, 4201, 0 },
804
  { 788, 171, 279, 0, 4203, 0 },
805
  { 4, 174, 279, 0, 4205, 0 },
806
  { 92, 181, 270, 0, 4207, 0 },
807
  { 207, 184, 270, 0, 4209, 0 },
808
  { 282, 191, 261, 0, 4211, 0 },
809
  { 375, 194, 261, 0, 4213, 0 },
810
  { 448, 201, 255, 0, 4215, 0 },
811
  { 536, 2, 255, 2, 8313, 11 },
812
  { 605, 2, 252, 2, 8314, 11 },
813
  { 689, 2, 252, 2, 8315, 11 },
814
  { 746, 2, 250, 2, 8316, 11 },
815
  { 26, 2, 250, 2, 8317, 11 },
816
  { 118, 2, 248, 2, 8318, 11 },
817
  { 229, 2, 248, 2, 8319, 11 },
818
  { 308, 2, 246, 2, 8320, 11 },
819
  { 397, 2, 246, 2, 8321, 11 },
820
  { 474, 2, 244, 2, 8322, 11 },
821
  { 554, 2, 244, 2, 8323, 11 },
822
  { 627, 2, 242, 2, 8324, 11 },
823
  { 707, 2, 242, 2, 8325, 11 },
824
  { 768, 2, 240, 2, 8326, 11 },
825
  { 44, 2, 240, 2, 8327, 11 },
826
  { 140, 2, 238, 2, 8328, 11 },
827
  { 66, 2, 326, 2, 8281, 11 },
828
  { 168, 2, 323, 2, 8282, 11 },
829
  { 251, 2, 320, 2, 8283, 11 },
830
  { 336, 2, 317, 2, 8284, 11 },
831
  { 417, 2, 317, 2, 8285, 11 },
832
  { 497, 2, 314, 2, 8286, 11 },
833
  { 574, 2, 311, 2, 8287, 11 },
834
  { 650, 2, 308, 2, 8288, 11 },
835
  { 727, 2, 308, 2, 8289, 11 },
836
  { 791, 2, 305, 2, 8290, 11 },
837
  { 8, 2, 302, 2, 8291, 11 },
838
  { 96, 2, 299, 2, 8292, 11 },
839
  { 211, 2, 299, 2, 8293, 11 },
840
  { 286, 2, 296, 2, 8294, 11 },
841
  { 379, 2, 293, 2, 8295, 11 },
842
  { 452, 2, 290, 2, 8296, 11 },
843
  { 540, 2, 290, 2, 8297, 11 },
844
  { 609, 2, 287, 2, 8298, 11 },
845
  { 693, 2, 284, 2, 8299, 11 },
846
  { 750, 2, 281, 2, 8300, 11 },
847
  { 30, 2, 281, 2, 8301, 11 },
848
  { 122, 2, 278, 2, 8302, 11 },
849
  { 233, 2, 275, 2, 8303, 11 },
850
  { 312, 2, 272, 2, 8304, 11 },
851
  { 401, 2, 272, 2, 8305, 11 },
852
  { 478, 2, 269, 2, 8306, 11 },
853
  { 558, 2, 266, 2, 8307, 11 },
854
  { 631, 2, 263, 2, 8308, 11 },
855
  { 711, 2, 263, 2, 8309, 11 },
856
  { 772, 2, 260, 2, 8310, 11 },
857
  { 48, 2, 257, 2, 8311, 11 },
858
  { 144, 2, 254, 2, 8312, 11 },
859
  { 58, 2, 2, 2, 8329, 11 },
860
  { 154, 2, 2, 2, 8330, 11 },
861
  { 243, 2, 2, 2, 8331, 11 },
862
  { 322, 2, 2, 2, 8332, 11 },
863
  { 69, 2, 236, 2, 8333, 11 },
864
  { 174, 2, 234, 2, 8334, 11 },
865
  { 254, 2, 234, 2, 8335, 11 },
866
  { 342, 2, 232, 2, 8336, 11 },
867
  { 420, 2, 232, 2, 8337, 11 },
868
  { 503, 2, 230, 2, 8338, 11 },
869
  { 577, 2, 230, 2, 8339, 11 },
870
  { 656, 2, 228, 2, 8340, 11 },
871
  { 72, 2, 228, 2, 8341, 11 },
872
  { 180, 2, 226, 2, 8342, 11 },
873
  { 257, 2, 226, 2, 8343, 11 },
874
  { 348, 2, 224, 2, 8344, 11 },
875
  { 423, 2, 224, 2, 8345, 11 },
876
  { 509, 2, 222, 2, 8346, 11 },
877
  { 580, 2, 222, 2, 8347, 11 },
878
  { 662, 2, 220, 2, 8348, 11 },
879
  { 75, 2, 220, 2, 8349, 11 },
880
  { 186, 2, 218, 2, 8350, 11 },
881
  { 260, 2, 218, 2, 8351, 11 },
882
  { 354, 2, 216, 2, 8352, 11 },
883
  { 426, 2, 216, 2, 8353, 11 },
884
  { 515, 2, 214, 2, 8354, 11 },
885
  { 583, 2, 214, 2, 8355, 11 },
886
  { 668, 2, 212, 2, 8356, 11 },
887
  { 78, 2, 212, 2, 8357, 11 },
888
  { 192, 2, 210, 2, 8358, 11 },
889
  { 263, 2, 210, 2, 8359, 11 },
890
  { 360, 2, 208, 2, 8360, 11 },
891
  { 429, 2, 208, 2, 8361, 11 },
892
  { 521, 2, 206, 2, 8362, 11 },
893
  { 586, 2, 206, 2, 8363, 11 },
894
  { 674, 2, 204, 2, 8364, 11 },
895
  { 81, 127, 2, 6, 491609, 3 },
896
  { 195, 137, 2, 6, 491613, 3 },
897
  { 266, 147, 2, 6, 491617, 3 },
898
  { 363, 157, 2, 6, 491621, 3 },
899
  { 432, 167, 2, 6, 491625, 3 },
900
  { 524, 177, 2, 6, 491629, 3 },
901
  { 589, 187, 2, 6, 491633, 3 },
902
  { 677, 197, 2, 6, 491637, 3 },
903
  { 730, 48, 2, 3, 4217, 8 },
904
  { 794, 51, 2, 3, 4219, 8 },
905
  { 12, 54, 2, 3, 4221, 8 },
906
  { 100, 57, 2, 3, 4223, 8 },
907
  { 215, 60, 2, 3, 4225, 8 },
908
  { 290, 63, 2, 3, 4227, 8 },
909
  { 383, 66, 2, 3, 4229, 8 },
910
  { 456, 69, 2, 3, 4231, 8 },
911
  { 159, 0, 2, 0, 4153, 0 },
912
  { 327, 3, 2, 0, 4155, 0 },
913
  { 488, 6, 2, 0, 4157, 0 },
914
  { 641, 9, 2, 0, 4159, 0 },
915
  { 782, 12, 2, 0, 4161, 0 },
916
  { 84, 15, 2, 0, 4163, 0 },
917
  { 274, 18, 2, 0, 4165, 0 },
918
  { 440, 21, 2, 0, 4167, 0 },
919
  { 597, 24, 2, 0, 4169, 0 },
920
  { 738, 27, 2, 0, 4171, 0 },
921
  { 110, 30, 2, 0, 4173, 0 },
922
  { 300, 33, 2, 0, 4175, 0 },
923
  { 466, 36, 2, 0, 4177, 0 },
924
  { 619, 39, 2, 0, 4179, 0 },
925
  { 760, 42, 2, 0, 4181, 0 },
926
  { 132, 45, 2, 0, 4183, 0 },
927
  { 171, 72, 2, 0, 4237, 0 },
928
  { 339, 75, 2, 0, 4239, 0 },
929
  { 500, 78, 2, 0, 4241, 0 },
930
  { 653, 81, 2, 0, 4243, 0 },
931
  { 177, 84, 2, 0, 4245, 0 },
932
  { 345, 87, 2, 0, 4247, 0 },
933
  { 506, 90, 2, 0, 4249, 0 },
934
  { 659, 93, 2, 0, 4251, 0 },
935
  { 183, 96, 2, 0, 4253, 0 },
936
  { 351, 99, 2, 0, 4255, 0 },
937
  { 512, 102, 2, 0, 4257, 0 },
938
  { 665, 105, 2, 0, 4259, 0 },
939
  { 189, 108, 2, 0, 4261, 0 },
940
  { 357, 111, 2, 0, 4263, 0 },
941
  { 518, 114, 2, 0, 4265, 0 },
942
  { 671, 117, 2, 0, 4267, 0 },
943
};
944
945
extern const MCPhysReg SparcRegUnitRoots[][2] = {
946
  { SP::CANRESTORE },
947
  { SP::CANSAVE },
948
  { SP::CLEANWIN },
949
  { SP::CPQ },
950
  { SP::CPSR },
951
  { SP::CWP },
952
  { SP::FQ },
953
  { SP::FSR },
954
  { SP::GL },
955
  { SP::ICC },
956
  { SP::OTHERWIN },
957
  { SP::PIL },
958
  { SP::PSR },
959
  { SP::PSTATE },
960
  { SP::TBA },
961
  { SP::TBR },
962
  { SP::TICK },
963
  { SP::TL },
964
  { SP::TNPC },
965
  { SP::TPC },
966
  { SP::TSTATE },
967
  { SP::TT },
968
  { SP::VER },
969
  { SP::WIM },
970
  { SP::WSTATE },
971
  { SP::Y },
972
  { SP::ASR1 },
973
  { SP::ASR2 },
974
  { SP::ASR3 },
975
  { SP::ASR4 },
976
  { SP::ASR5 },
977
  { SP::ASR6 },
978
  { SP::ASR7 },
979
  { SP::ASR8 },
980
  { SP::ASR9 },
981
  { SP::ASR10 },
982
  { SP::ASR11 },
983
  { SP::ASR12 },
984
  { SP::ASR13 },
985
  { SP::ASR14 },
986
  { SP::ASR15 },
987
  { SP::ASR16 },
988
  { SP::ASR17 },
989
  { SP::ASR18 },
990
  { SP::ASR19 },
991
  { SP::ASR20 },
992
  { SP::ASR21 },
993
  { SP::ASR22 },
994
  { SP::ASR23 },
995
  { SP::ASR24 },
996
  { SP::ASR25 },
997
  { SP::ASR26 },
998
  { SP::ASR27 },
999
  { SP::ASR28 },
1000
  { SP::ASR29 },
1001
  { SP::ASR30 },
1002
  { SP::ASR31 },
1003
  { SP::C0 },
1004
  { SP::C1 },
1005
  { SP::C2 },
1006
  { SP::C3 },
1007
  { SP::C4 },
1008
  { SP::C5 },
1009
  { SP::C6 },
1010
  { SP::C7 },
1011
  { SP::C8 },
1012
  { SP::C9 },
1013
  { SP::C10 },
1014
  { SP::C11 },
1015
  { SP::C12 },
1016
  { SP::C13 },
1017
  { SP::C14 },
1018
  { SP::C15 },
1019
  { SP::C16 },
1020
  { SP::C17 },
1021
  { SP::C18 },
1022
  { SP::C19 },
1023
  { SP::C20 },
1024
  { SP::C21 },
1025
  { SP::C22 },
1026
  { SP::C23 },
1027
  { SP::C24 },
1028
  { SP::C25 },
1029
  { SP::C26 },
1030
  { SP::C27 },
1031
  { SP::C28 },
1032
  { SP::C29 },
1033
  { SP::C30 },
1034
  { SP::C31 },
1035
  { SP::F0 },
1036
  { SP::F1 },
1037
  { SP::F2 },
1038
  { SP::F3 },
1039
  { SP::F4 },
1040
  { SP::F5 },
1041
  { SP::F6 },
1042
  { SP::F7 },
1043
  { SP::F8 },
1044
  { SP::F9 },
1045
  { SP::F10 },
1046
  { SP::F11 },
1047
  { SP::F12 },
1048
  { SP::F13 },
1049
  { SP::F14 },
1050
  { SP::F15 },
1051
  { SP::F16 },
1052
  { SP::F17 },
1053
  { SP::F18 },
1054
  { SP::F19 },
1055
  { SP::F20 },
1056
  { SP::F21 },
1057
  { SP::F22 },
1058
  { SP::F23 },
1059
  { SP::F24 },
1060
  { SP::F25 },
1061
  { SP::F26 },
1062
  { SP::F27 },
1063
  { SP::F28 },
1064
  { SP::F29 },
1065
  { SP::F30 },
1066
  { SP::F31 },
1067
  { SP::D16 },
1068
  { SP::D17 },
1069
  { SP::D18 },
1070
  { SP::D19 },
1071
  { SP::D20 },
1072
  { SP::D21 },
1073
  { SP::D22 },
1074
  { SP::D23 },
1075
  { SP::D24 },
1076
  { SP::D25 },
1077
  { SP::D26 },
1078
  { SP::D27 },
1079
  { SP::D28 },
1080
  { SP::D29 },
1081
  { SP::D30 },
1082
  { SP::D31 },
1083
  { SP::FCC0 },
1084
  { SP::FCC1 },
1085
  { SP::FCC2 },
1086
  { SP::FCC3 },
1087
  { SP::G0 },
1088
  { SP::G1 },
1089
  { SP::G2 },
1090
  { SP::G3 },
1091
  { SP::G4 },
1092
  { SP::G5 },
1093
  { SP::G6 },
1094
  { SP::G7 },
1095
  { SP::I0 },
1096
  { SP::I1 },
1097
  { SP::I2 },
1098
  { SP::I3 },
1099
  { SP::I4 },
1100
  { SP::I5 },
1101
  { SP::I6 },
1102
  { SP::I7 },
1103
  { SP::L0 },
1104
  { SP::L1 },
1105
  { SP::L2 },
1106
  { SP::L3 },
1107
  { SP::L4 },
1108
  { SP::L5 },
1109
  { SP::L6 },
1110
  { SP::L7 },
1111
  { SP::O0 },
1112
  { SP::O1 },
1113
  { SP::O2 },
1114
  { SP::O3 },
1115
  { SP::O4 },
1116
  { SP::O5 },
1117
  { SP::O6 },
1118
  { SP::O7 },
1119
};
1120
1121
namespace {     // Register classes...
1122
  // FCCRegs Register Class...
1123
  const MCPhysReg FCCRegs[] = {
1124
    SP::FCC0, SP::FCC1, SP::FCC2, SP::FCC3, 
1125
  };
1126
1127
  // FCCRegs Bit set.
1128
  const uint8_t FCCRegsBits[] = {
1129
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 
1130
  };
1131
1132
  // ASRRegs Register Class...
1133
  const MCPhysReg ASRRegs[] = {
1134
    SP::Y, SP::TICK, SP::ASR1, SP::ASR2, SP::ASR3, SP::ASR4, SP::ASR5, SP::ASR6, SP::ASR7, SP::ASR8, SP::ASR9, SP::ASR10, SP::ASR11, SP::ASR12, SP::ASR13, SP::ASR14, SP::ASR15, SP::ASR16, SP::ASR17, SP::ASR18, SP::ASR19, SP::ASR20, SP::ASR21, SP::ASR22, SP::ASR23, SP::ASR24, SP::ASR25, SP::ASR26, SP::ASR27, SP::ASR28, SP::ASR29, SP::ASR30, SP::ASR31, 
1135
  };
1136
1137
  // ASRRegs Bit set.
1138
  const uint8_t ASRRegsBits[] = {
1139
    0x00, 0x00, 0x02, 0xfc, 0xff, 0xff, 0xff, 0x03, 
1140
  };
1141
1142
  // CoprocRegs Register Class...
1143
  const MCPhysReg CoprocRegs[] = {
1144
    SP::C0, SP::C1, SP::C2, SP::C3, SP::C4, SP::C5, SP::C6, SP::C7, SP::C8, SP::C9, SP::C10, SP::C11, SP::C12, SP::C13, SP::C14, SP::C15, SP::C16, SP::C17, SP::C18, SP::C19, SP::C20, SP::C21, SP::C22, SP::C23, SP::C24, SP::C25, SP::C26, SP::C27, SP::C28, SP::C29, SP::C30, SP::C31, 
1145
  };
1146
1147
  // CoprocRegs Bit set.
1148
  const uint8_t CoprocRegsBits[] = {
1149
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0xff, 0x03, 
1150
  };
1151
1152
  // FPRegs Register Class...
1153
  const MCPhysReg FPRegs[] = {
1154
    SP::F0, SP::F1, SP::F2, SP::F3, SP::F4, SP::F5, SP::F6, SP::F7, SP::F8, SP::F9, SP::F10, SP::F11, SP::F12, SP::F13, SP::F14, SP::F15, SP::F16, SP::F17, SP::F18, SP::F19, SP::F20, SP::F21, SP::F22, SP::F23, SP::F24, SP::F25, SP::F26, SP::F27, SP::F28, SP::F29, SP::F30, SP::F31, 
1155
  };
1156
1157
  // FPRegs Bit set.
1158
  const uint8_t FPRegsBits[] = {
1159
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0xff, 0x03, 
1160
  };
1161
1162
  // IntRegs Register Class...
1163
  const MCPhysReg IntRegs[] = {
1164
    SP::I0, SP::I1, SP::I2, SP::I3, SP::I4, SP::I5, SP::I6, SP::I7, SP::G0, SP::G1, SP::G2, SP::G3, SP::G4, SP::G5, SP::G6, SP::G7, SP::L0, SP::L1, SP::L2, SP::L3, SP::L4, SP::L5, SP::L6, SP::L7, SP::O0, SP::O1, SP::O2, SP::O3, SP::O4, SP::O5, SP::O6, SP::O7, 
1165
  };
1166
1167
  // IntRegs Bit set.
1168
  const uint8_t IntRegsBits[] = {
1169
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0xff, 0x3f, 
1170
  };
1171
1172
  // DFPRegs Register Class...
1173
  const MCPhysReg DFPRegs[] = {
1174
    SP::D0, SP::D1, SP::D2, SP::D3, SP::D4, SP::D5, SP::D6, SP::D7, SP::D8, SP::D9, SP::D10, SP::D11, SP::D12, SP::D13, SP::D14, SP::D15, SP::D16, SP::D17, SP::D18, SP::D19, SP::D20, SP::D21, SP::D22, SP::D23, SP::D24, SP::D25, SP::D26, SP::D27, SP::D28, SP::D29, SP::D30, SP::D31, 
1175
  };
1176
1177
  // DFPRegs Bit set.
1178
  const uint8_t DFPRegsBits[] = {
1179
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0xff, 0x03, 
1180
  };
1181
1182
  // I64Regs Register Class...
1183
  const MCPhysReg I64Regs[] = {
1184
    SP::I0, SP::I1, SP::I2, SP::I3, SP::I4, SP::I5, SP::I6, SP::I7, SP::G0, SP::G1, SP::G2, SP::G3, SP::G4, SP::G5, SP::G6, SP::G7, SP::L0, SP::L1, SP::L2, SP::L3, SP::L4, SP::L5, SP::L6, SP::L7, SP::O0, SP::O1, SP::O2, SP::O3, SP::O4, SP::O5, SP::O6, SP::O7, 
1185
  };
1186
1187
  // I64Regs Bit set.
1188
  const uint8_t I64RegsBits[] = {
1189
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0xff, 0x3f, 
1190
  };
1191
1192
  // PRRegs Register Class...
1193
  const MCPhysReg PRRegs[] = {
1194
    SP::TPC, SP::TNPC, SP::TSTATE, SP::TT, SP::TICK, SP::TBA, SP::PSTATE, SP::TL, SP::PIL, SP::CWP, SP::CANSAVE, SP::CANRESTORE, SP::CLEANWIN, SP::OTHERWIN, SP::WSTATE, SP::GL, SP::VER, 
1195
  };
1196
1197
  // PRRegs Bit set.
1198
  const uint8_t PRRegsBits[] = {
1199
    0x4e, 0xda, 0xfe, 0x02, 
1200
  };
1201
1202
  // CoprocPair Register Class...
1203
  const MCPhysReg CoprocPair[] = {
1204
    SP::C0_C1, SP::C2_C3, SP::C4_C5, SP::C6_C7, SP::C8_C9, SP::C10_C11, SP::C12_C13, SP::C14_C15, SP::C16_C17, SP::C18_C19, SP::C20_C21, SP::C22_C23, SP::C24_C25, SP::C26_C27, SP::C28_C29, SP::C30_C31, 
1205
  };
1206
1207
  // CoprocPair Bit set.
1208
  const uint8_t CoprocPairBits[] = {
1209
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0x3f, 
1210
  };
1211
1212
  // IntPair Register Class...
1213
  const MCPhysReg IntPair[] = {
1214
    SP::I0_I1, SP::I2_I3, SP::I4_I5, SP::I6_I7, SP::G0_G1, SP::G2_G3, SP::G4_G5, SP::G6_G7, SP::L0_L1, SP::L2_L3, SP::L4_L5, SP::L6_L7, SP::O0_O1, SP::O2_O3, SP::O4_O5, SP::O6_O7, 
1215
  };
1216
1217
  // IntPair Bit set.
1218
  const uint8_t IntPairBits[] = {
1219
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0x3f, 
1220
  };
1221
1222
  // LowDFPRegs Register Class...
1223
  const MCPhysReg LowDFPRegs[] = {
1224
    SP::D0, SP::D1, SP::D2, SP::D3, SP::D4, SP::D5, SP::D6, SP::D7, SP::D8, SP::D9, SP::D10, SP::D11, SP::D12, SP::D13, SP::D14, SP::D15, 
1225
  };
1226
1227
  // LowDFPRegs Bit set.
1228
  const uint8_t LowDFPRegsBits[] = {
1229
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0x03, 
1230
  };
1231
1232
  // PRRegs_and_ASRRegs Register Class...
1233
  const MCPhysReg PRRegs_and_ASRRegs[] = {
1234
    SP::TICK, 
1235
  };
1236
1237
  // PRRegs_and_ASRRegs Bit set.
1238
  const uint8_t PRRegs_and_ASRRegsBits[] = {
1239
    0x00, 0x00, 0x02, 
1240
  };
1241
1242
  // QFPRegs Register Class...
1243
  const MCPhysReg QFPRegs[] = {
1244
    SP::Q0, SP::Q1, SP::Q2, SP::Q3, SP::Q4, SP::Q5, SP::Q6, SP::Q7, SP::Q8, SP::Q9, SP::Q10, SP::Q11, SP::Q12, SP::Q13, SP::Q14, SP::Q15, 
1245
  };
1246
1247
  // QFPRegs Bit set.
1248
  const uint8_t QFPRegsBits[] = {
1249
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0x3f, 
1250
  };
1251
1252
  // LowQFPRegs Register Class...
1253
  const MCPhysReg LowQFPRegs[] = {
1254
    SP::Q0, SP::Q1, SP::Q2, SP::Q3, SP::Q4, SP::Q5, SP::Q6, SP::Q7, 
1255
  };
1256
1257
  // LowQFPRegs Bit set.
1258
  const uint8_t LowQFPRegsBits[] = {
1259
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x3f, 
1260
  };
1261
1262
} // end anonymous namespace
1263
1264
1265
#ifdef __GNUC__
1266
#pragma GCC diagnostic push
1267
#pragma GCC diagnostic ignored "-Woverlength-strings"
1268
#endif
1269
extern const char SparcRegClassStrings[] = {
1270
  /* 0 */ "CoprocPair\0"
1271
  /* 11 */ "IntPair\0"
1272
  /* 19 */ "I64Regs\0"
1273
  /* 27 */ "FCCRegs\0"
1274
  /* 35 */ "LowDFPRegs\0"
1275
  /* 46 */ "LowQFPRegs\0"
1276
  /* 57 */ "PRRegs\0"
1277
  /* 64 */ "PRRegs_and_ASRRegs\0"
1278
  /* 83 */ "CoprocRegs\0"
1279
  /* 94 */ "IntRegs\0"
1280
};
1281
#ifdef __GNUC__
1282
#pragma GCC diagnostic pop
1283
#endif
1284
1285
extern const MCRegisterClass SparcMCRegisterClasses[] = {
1286
  { FCCRegs, FCCRegsBits, 27, 4, sizeof(FCCRegsBits), SP::FCCRegsRegClassID, 1, 1, true },
1287
  { ASRRegs, ASRRegsBits, 75, 33, sizeof(ASRRegsBits), SP::ASRRegsRegClassID, 32, 1, false },
1288
  { CoprocRegs, CoprocRegsBits, 83, 32, sizeof(CoprocRegsBits), SP::CoprocRegsRegClassID, 32, 1, false },
1289
  { FPRegs, FPRegsBits, 39, 32, sizeof(FPRegsBits), SP::FPRegsRegClassID, 32, 1, true },
1290
  { IntRegs, IntRegsBits, 94, 32, sizeof(IntRegsBits), SP::IntRegsRegClassID, 32, 1, true },
1291
  { DFPRegs, DFPRegsBits, 38, 32, sizeof(DFPRegsBits), SP::DFPRegsRegClassID, 64, 1, true },
1292
  { I64Regs, I64RegsBits, 19, 32, sizeof(I64RegsBits), SP::I64RegsRegClassID, 64, 1, true },
1293
  { PRRegs, PRRegsBits, 57, 17, sizeof(PRRegsBits), SP::PRRegsRegClassID, 64, 1, true },
1294
  { CoprocPair, CoprocPairBits, 0, 16, sizeof(CoprocPairBits), SP::CoprocPairRegClassID, 64, 1, false },
1295
  { IntPair, IntPairBits, 11, 16, sizeof(IntPairBits), SP::IntPairRegClassID, 64, 1, true },
1296
  { LowDFPRegs, LowDFPRegsBits, 35, 16, sizeof(LowDFPRegsBits), SP::LowDFPRegsRegClassID, 64, 1, true },
1297
  { PRRegs_and_ASRRegs, PRRegs_and_ASRRegsBits, 64, 1, sizeof(PRRegs_and_ASRRegsBits), SP::PRRegs_and_ASRRegsRegClassID, 64, 1, true },
1298
  { QFPRegs, QFPRegsBits, 49, 16, sizeof(QFPRegsBits), SP::QFPRegsRegClassID, 128, 1, true },
1299
  { LowQFPRegs, LowQFPRegsBits, 46, 8, sizeof(LowQFPRegsBits), SP::LowQFPRegsRegClassID, 128, 1, true },
1300
};
1301
1302
// SP Dwarf<->LLVM register mappings.
1303
extern const MCRegisterInfo::DwarfLLVMRegPair SPDwarfFlavour0Dwarf2L[] = {
1304
  { 0U, SP::G0 },
1305
  { 1U, SP::G1 },
1306
  { 2U, SP::G2 },
1307
  { 3U, SP::G3 },
1308
  { 4U, SP::G4 },
1309
  { 5U, SP::G5 },
1310
  { 6U, SP::G6 },
1311
  { 7U, SP::G7 },
1312
  { 8U, SP::O0 },
1313
  { 9U, SP::O1 },
1314
  { 10U, SP::O2 },
1315
  { 11U, SP::O3 },
1316
  { 12U, SP::O4 },
1317
  { 13U, SP::O5 },
1318
  { 14U, SP::O6 },
1319
  { 15U, SP::O7 },
1320
  { 16U, SP::L0 },
1321
  { 17U, SP::L1 },
1322
  { 18U, SP::L2 },
1323
  { 19U, SP::L3 },
1324
  { 20U, SP::L4 },
1325
  { 21U, SP::L5 },
1326
  { 22U, SP::L6 },
1327
  { 23U, SP::L7 },
1328
  { 24U, SP::I0 },
1329
  { 25U, SP::I1 },
1330
  { 26U, SP::I2 },
1331
  { 27U, SP::I3 },
1332
  { 28U, SP::I4 },
1333
  { 29U, SP::I5 },
1334
  { 30U, SP::I6 },
1335
  { 31U, SP::I7 },
1336
  { 32U, SP::F0 },
1337
  { 33U, SP::F1 },
1338
  { 34U, SP::F2 },
1339
  { 35U, SP::F3 },
1340
  { 36U, SP::F4 },
1341
  { 37U, SP::F5 },
1342
  { 38U, SP::F6 },
1343
  { 39U, SP::F7 },
1344
  { 40U, SP::F8 },
1345
  { 41U, SP::F9 },
1346
  { 42U, SP::F10 },
1347
  { 43U, SP::F11 },
1348
  { 44U, SP::F12 },
1349
  { 45U, SP::F13 },
1350
  { 46U, SP::F14 },
1351
  { 47U, SP::F15 },
1352
  { 48U, SP::F16 },
1353
  { 49U, SP::F17 },
1354
  { 50U, SP::F18 },
1355
  { 51U, SP::F19 },
1356
  { 52U, SP::F20 },
1357
  { 53U, SP::F21 },
1358
  { 54U, SP::F22 },
1359
  { 55U, SP::F23 },
1360
  { 56U, SP::F24 },
1361
  { 57U, SP::F25 },
1362
  { 58U, SP::F26 },
1363
  { 59U, SP::F27 },
1364
  { 60U, SP::F28 },
1365
  { 61U, SP::F29 },
1366
  { 62U, SP::F30 },
1367
  { 63U, SP::F31 },
1368
  { 64U, SP::Y },
1369
  { 72U, SP::D0 },
1370
  { 73U, SP::D1 },
1371
  { 74U, SP::D2 },
1372
  { 75U, SP::D3 },
1373
  { 76U, SP::D4 },
1374
  { 77U, SP::D5 },
1375
  { 78U, SP::D6 },
1376
  { 79U, SP::D7 },
1377
  { 80U, SP::D8 },
1378
  { 81U, SP::D9 },
1379
  { 82U, SP::D10 },
1380
  { 83U, SP::D11 },
1381
  { 84U, SP::D12 },
1382
  { 85U, SP::D13 },
1383
  { 86U, SP::D14 },
1384
  { 87U, SP::D15 },
1385
};
1386
extern const unsigned SPDwarfFlavour0Dwarf2LSize = std::size(SPDwarfFlavour0Dwarf2L);
1387
1388
extern const MCRegisterInfo::DwarfLLVMRegPair SPEHFlavour0Dwarf2L[] = {
1389
  { 0U, SP::G0 },
1390
  { 1U, SP::G1 },
1391
  { 2U, SP::G2 },
1392
  { 3U, SP::G3 },
1393
  { 4U, SP::G4 },
1394
  { 5U, SP::G5 },
1395
  { 6U, SP::G6 },
1396
  { 7U, SP::G7 },
1397
  { 8U, SP::O0 },
1398
  { 9U, SP::O1 },
1399
  { 10U, SP::O2 },
1400
  { 11U, SP::O3 },
1401
  { 12U, SP::O4 },
1402
  { 13U, SP::O5 },
1403
  { 14U, SP::O6 },
1404
  { 15U, SP::O7 },
1405
  { 16U, SP::L0 },
1406
  { 17U, SP::L1 },
1407
  { 18U, SP::L2 },
1408
  { 19U, SP::L3 },
1409
  { 20U, SP::L4 },
1410
  { 21U, SP::L5 },
1411
  { 22U, SP::L6 },
1412
  { 23U, SP::L7 },
1413
  { 24U, SP::I0 },
1414
  { 25U, SP::I1 },
1415
  { 26U, SP::I2 },
1416
  { 27U, SP::I3 },
1417
  { 28U, SP::I4 },
1418
  { 29U, SP::I5 },
1419
  { 30U, SP::I6 },
1420
  { 31U, SP::I7 },
1421
  { 32U, SP::F0 },
1422
  { 33U, SP::F1 },
1423
  { 34U, SP::F2 },
1424
  { 35U, SP::F3 },
1425
  { 36U, SP::F4 },
1426
  { 37U, SP::F5 },
1427
  { 38U, SP::F6 },
1428
  { 39U, SP::F7 },
1429
  { 40U, SP::F8 },
1430
  { 41U, SP::F9 },
1431
  { 42U, SP::F10 },
1432
  { 43U, SP::F11 },
1433
  { 44U, SP::F12 },
1434
  { 45U, SP::F13 },
1435
  { 46U, SP::F14 },
1436
  { 47U, SP::F15 },
1437
  { 48U, SP::F16 },
1438
  { 49U, SP::F17 },
1439
  { 50U, SP::F18 },
1440
  { 51U, SP::F19 },
1441
  { 52U, SP::F20 },
1442
  { 53U, SP::F21 },
1443
  { 54U, SP::F22 },
1444
  { 55U, SP::F23 },
1445
  { 56U, SP::F24 },
1446
  { 57U, SP::F25 },
1447
  { 58U, SP::F26 },
1448
  { 59U, SP::F27 },
1449
  { 60U, SP::F28 },
1450
  { 61U, SP::F29 },
1451
  { 62U, SP::F30 },
1452
  { 63U, SP::F31 },
1453
  { 64U, SP::Y },
1454
  { 72U, SP::D0 },
1455
  { 73U, SP::D1 },
1456
  { 74U, SP::D2 },
1457
  { 75U, SP::D3 },
1458
  { 76U, SP::D4 },
1459
  { 77U, SP::D5 },
1460
  { 78U, SP::D6 },
1461
  { 79U, SP::D7 },
1462
  { 80U, SP::D8 },
1463
  { 81U, SP::D9 },
1464
  { 82U, SP::D10 },
1465
  { 83U, SP::D11 },
1466
  { 84U, SP::D12 },
1467
  { 85U, SP::D13 },
1468
  { 86U, SP::D14 },
1469
  { 87U, SP::D15 },
1470
};
1471
extern const unsigned SPEHFlavour0Dwarf2LSize = std::size(SPEHFlavour0Dwarf2L);
1472
1473
extern const MCRegisterInfo::DwarfLLVMRegPair SPDwarfFlavour0L2Dwarf[] = {
1474
  { SP::Y, 64U },
1475
  { SP::D0, 72U },
1476
  { SP::D1, 73U },
1477
  { SP::D2, 74U },
1478
  { SP::D3, 75U },
1479
  { SP::D4, 76U },
1480
  { SP::D5, 77U },
1481
  { SP::D6, 78U },
1482
  { SP::D7, 79U },
1483
  { SP::D8, 80U },
1484
  { SP::D9, 81U },
1485
  { SP::D10, 82U },
1486
  { SP::D11, 83U },
1487
  { SP::D12, 84U },
1488
  { SP::D13, 85U },
1489
  { SP::D14, 86U },
1490
  { SP::D15, 87U },
1491
  { SP::F0, 32U },
1492
  { SP::F1, 33U },
1493
  { SP::F2, 34U },
1494
  { SP::F3, 35U },
1495
  { SP::F4, 36U },
1496
  { SP::F5, 37U },
1497
  { SP::F6, 38U },
1498
  { SP::F7, 39U },
1499
  { SP::F8, 40U },
1500
  { SP::F9, 41U },
1501
  { SP::F10, 42U },
1502
  { SP::F11, 43U },
1503
  { SP::F12, 44U },
1504
  { SP::F13, 45U },
1505
  { SP::F14, 46U },
1506
  { SP::F15, 47U },
1507
  { SP::F16, 48U },
1508
  { SP::F17, 49U },
1509
  { SP::F18, 50U },
1510
  { SP::F19, 51U },
1511
  { SP::F20, 52U },
1512
  { SP::F21, 53U },
1513
  { SP::F22, 54U },
1514
  { SP::F23, 55U },
1515
  { SP::F24, 56U },
1516
  { SP::F25, 57U },
1517
  { SP::F26, 58U },
1518
  { SP::F27, 59U },
1519
  { SP::F28, 60U },
1520
  { SP::F29, 61U },
1521
  { SP::F30, 62U },
1522
  { SP::F31, 63U },
1523
  { SP::G0, 0U },
1524
  { SP::G1, 1U },
1525
  { SP::G2, 2U },
1526
  { SP::G3, 3U },
1527
  { SP::G4, 4U },
1528
  { SP::G5, 5U },
1529
  { SP::G6, 6U },
1530
  { SP::G7, 7U },
1531
  { SP::I0, 24U },
1532
  { SP::I1, 25U },
1533
  { SP::I2, 26U },
1534
  { SP::I3, 27U },
1535
  { SP::I4, 28U },
1536
  { SP::I5, 29U },
1537
  { SP::I6, 30U },
1538
  { SP::I7, 31U },
1539
  { SP::L0, 16U },
1540
  { SP::L1, 17U },
1541
  { SP::L2, 18U },
1542
  { SP::L3, 19U },
1543
  { SP::L4, 20U },
1544
  { SP::L5, 21U },
1545
  { SP::L6, 22U },
1546
  { SP::L7, 23U },
1547
  { SP::O0, 8U },
1548
  { SP::O1, 9U },
1549
  { SP::O2, 10U },
1550
  { SP::O3, 11U },
1551
  { SP::O4, 12U },
1552
  { SP::O5, 13U },
1553
  { SP::O6, 14U },
1554
  { SP::O7, 15U },
1555
};
1556
extern const unsigned SPDwarfFlavour0L2DwarfSize = std::size(SPDwarfFlavour0L2Dwarf);
1557
1558
extern const MCRegisterInfo::DwarfLLVMRegPair SPEHFlavour0L2Dwarf[] = {
1559
  { SP::Y, 64U },
1560
  { SP::D0, 72U },
1561
  { SP::D1, 73U },
1562
  { SP::D2, 74U },
1563
  { SP::D3, 75U },
1564
  { SP::D4, 76U },
1565
  { SP::D5, 77U },
1566
  { SP::D6, 78U },
1567
  { SP::D7, 79U },
1568
  { SP::D8, 80U },
1569
  { SP::D9, 81U },
1570
  { SP::D10, 82U },
1571
  { SP::D11, 83U },
1572
  { SP::D12, 84U },
1573
  { SP::D13, 85U },
1574
  { SP::D14, 86U },
1575
  { SP::D15, 87U },
1576
  { SP::F0, 32U },
1577
  { SP::F1, 33U },
1578
  { SP::F2, 34U },
1579
  { SP::F3, 35U },
1580
  { SP::F4, 36U },
1581
  { SP::F5, 37U },
1582
  { SP::F6, 38U },
1583
  { SP::F7, 39U },
1584
  { SP::F8, 40U },
1585
  { SP::F9, 41U },
1586
  { SP::F10, 42U },
1587
  { SP::F11, 43U },
1588
  { SP::F12, 44U },
1589
  { SP::F13, 45U },
1590
  { SP::F14, 46U },
1591
  { SP::F15, 47U },
1592
  { SP::F16, 48U },
1593
  { SP::F17, 49U },
1594
  { SP::F18, 50U },
1595
  { SP::F19, 51U },
1596
  { SP::F20, 52U },
1597
  { SP::F21, 53U },
1598
  { SP::F22, 54U },
1599
  { SP::F23, 55U },
1600
  { SP::F24, 56U },
1601
  { SP::F25, 57U },
1602
  { SP::F26, 58U },
1603
  { SP::F27, 59U },
1604
  { SP::F28, 60U },
1605
  { SP::F29, 61U },
1606
  { SP::F30, 62U },
1607
  { SP::F31, 63U },
1608
  { SP::G0, 0U },
1609
  { SP::G1, 1U },
1610
  { SP::G2, 2U },
1611
  { SP::G3, 3U },
1612
  { SP::G4, 4U },
1613
  { SP::G5, 5U },
1614
  { SP::G6, 6U },
1615
  { SP::G7, 7U },
1616
  { SP::I0, 24U },
1617
  { SP::I1, 25U },
1618
  { SP::I2, 26U },
1619
  { SP::I3, 27U },
1620
  { SP::I4, 28U },
1621
  { SP::I5, 29U },
1622
  { SP::I6, 30U },
1623
  { SP::I7, 31U },
1624
  { SP::L0, 16U },
1625
  { SP::L1, 17U },
1626
  { SP::L2, 18U },
1627
  { SP::L3, 19U },
1628
  { SP::L4, 20U },
1629
  { SP::L5, 21U },
1630
  { SP::L6, 22U },
1631
  { SP::L7, 23U },
1632
  { SP::O0, 8U },
1633
  { SP::O1, 9U },
1634
  { SP::O2, 10U },
1635
  { SP::O3, 11U },
1636
  { SP::O4, 12U },
1637
  { SP::O5, 13U },
1638
  { SP::O6, 14U },
1639
  { SP::O7, 15U },
1640
};
1641
extern const unsigned SPEHFlavour0L2DwarfSize = std::size(SPEHFlavour0L2Dwarf);
1642
1643
extern const uint16_t SparcRegEncodingTable[] = {
1644
  0,
1645
  11,
1646
  10,
1647
  12,
1648
  0,
1649
  0,
1650
  9,
1651
  0,
1652
  0,
1653
  16,
1654
  0,
1655
  13,
1656
  8,
1657
  0,
1658
  6,
1659
  5,
1660
  0,
1661
  4,
1662
  7,
1663
  1,
1664
  0,
1665
  2,
1666
  3,
1667
  31,
1668
  0,
1669
  14,
1670
  0,
1671
  1,
1672
  2,
1673
  3,
1674
  4,
1675
  5,
1676
  6,
1677
  7,
1678
  8,
1679
  9,
1680
  10,
1681
  11,
1682
  12,
1683
  13,
1684
  14,
1685
  15,
1686
  16,
1687
  17,
1688
  18,
1689
  19,
1690
  20,
1691
  21,
1692
  22,
1693
  23,
1694
  24,
1695
  25,
1696
  26,
1697
  27,
1698
  28,
1699
  29,
1700
  30,
1701
  31,
1702
  0,
1703
  1,
1704
  2,
1705
  3,
1706
  4,
1707
  5,
1708
  6,
1709
  7,
1710
  8,
1711
  9,
1712
  10,
1713
  11,
1714
  12,
1715
  13,
1716
  14,
1717
  15,
1718
  16,
1719
  17,
1720
  18,
1721
  19,
1722
  20,
1723
  21,
1724
  22,
1725
  23,
1726
  24,
1727
  25,
1728
  26,
1729
  27,
1730
  28,
1731
  29,
1732
  30,
1733
  31,
1734
  0,
1735
  2,
1736
  4,
1737
  6,
1738
  8,
1739
  10,
1740
  12,
1741
  14,
1742
  16,
1743
  18,
1744
  20,
1745
  22,
1746
  24,
1747
  26,
1748
  28,
1749
  30,
1750
  1,
1751
  3,
1752
  5,
1753
  7,
1754
  9,
1755
  11,
1756
  13,
1757
  15,
1758
  17,
1759
  19,
1760
  21,
1761
  23,
1762
  25,
1763
  27,
1764
  29,
1765
  31,
1766
  0,
1767
  1,
1768
  2,
1769
  3,
1770
  4,
1771
  5,
1772
  6,
1773
  7,
1774
  8,
1775
  9,
1776
  10,
1777
  11,
1778
  12,
1779
  13,
1780
  14,
1781
  15,
1782
  16,
1783
  17,
1784
  18,
1785
  19,
1786
  20,
1787
  21,
1788
  22,
1789
  23,
1790
  24,
1791
  25,
1792
  26,
1793
  27,
1794
  28,
1795
  29,
1796
  30,
1797
  31,
1798
  0,
1799
  1,
1800
  2,
1801
  3,
1802
  0,
1803
  1,
1804
  2,
1805
  3,
1806
  4,
1807
  5,
1808
  6,
1809
  7,
1810
  24,
1811
  25,
1812
  26,
1813
  27,
1814
  28,
1815
  29,
1816
  30,
1817
  31,
1818
  16,
1819
  17,
1820
  18,
1821
  19,
1822
  20,
1823
  21,
1824
  22,
1825
  23,
1826
  8,
1827
  9,
1828
  10,
1829
  11,
1830
  12,
1831
  13,
1832
  14,
1833
  15,
1834
  0,
1835
  4,
1836
  8,
1837
  12,
1838
  16,
1839
  20,
1840
  24,
1841
  28,
1842
  1,
1843
  5,
1844
  9,
1845
  13,
1846
  17,
1847
  21,
1848
  25,
1849
  29,
1850
  0,
1851
  2,
1852
  4,
1853
  6,
1854
  8,
1855
  10,
1856
  12,
1857
  14,
1858
  16,
1859
  18,
1860
  20,
1861
  22,
1862
  24,
1863
  26,
1864
  28,
1865
  30,
1866
  0,
1867
  2,
1868
  4,
1869
  6,
1870
  24,
1871
  26,
1872
  28,
1873
  30,
1874
  16,
1875
  18,
1876
  20,
1877
  22,
1878
  8,
1879
  10,
1880
  12,
1881
  14,
1882
};
1883
0
static inline void InitSparcMCRegisterInfo(MCRegisterInfo *RI, unsigned RA, unsigned DwarfFlavour = 0, unsigned EHFlavour = 0, unsigned PC = 0) {
1884
0
  RI->InitMCRegisterInfo(SparcRegDesc, 238, RA, PC, SparcMCRegisterClasses, 14, SparcRegUnitRoots, 173, SparcRegDiffLists, SparcLaneMaskLists, SparcRegStrings, SparcRegClassStrings, SparcSubRegIdxLists, 7,
1885
0
SparcSubRegIdxRanges, SparcRegEncodingTable);
1886
1887
0
  switch (DwarfFlavour) {
1888
0
  default:
1889
0
    llvm_unreachable("Unknown DWARF flavour");
1890
0
  case 0:
1891
0
    RI->mapDwarfRegsToLLVMRegs(SPDwarfFlavour0Dwarf2L, SPDwarfFlavour0Dwarf2LSize, false);
1892
0
    break;
1893
0
  }
1894
0
  switch (EHFlavour) {
1895
0
  default:
1896
0
    llvm_unreachable("Unknown DWARF flavour");
1897
0
  case 0:
1898
0
    RI->mapDwarfRegsToLLVMRegs(SPEHFlavour0Dwarf2L, SPEHFlavour0Dwarf2LSize, true);
1899
0
    break;
1900
0
  }
1901
0
  switch (DwarfFlavour) {
1902
0
  default:
1903
0
    llvm_unreachable("Unknown DWARF flavour");
1904
0
  case 0:
1905
0
    RI->mapLLVMRegsToDwarfRegs(SPDwarfFlavour0L2Dwarf, SPDwarfFlavour0L2DwarfSize, false);
1906
0
    break;
1907
0
  }
1908
0
  switch (EHFlavour) {
1909
0
  default:
1910
0
    llvm_unreachable("Unknown DWARF flavour");
1911
0
  case 0:
1912
0
    RI->mapLLVMRegsToDwarfRegs(SPEHFlavour0L2Dwarf, SPEHFlavour0L2DwarfSize, true);
1913
0
    break;
1914
0
  }
1915
0
}
1916
1917
} // end namespace llvm
1918
1919
#endif // GET_REGINFO_MC_DESC
1920
1921
/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
1922
|*                                                                            *|
1923
|* Register Information Header Fragment                                       *|
1924
|*                                                                            *|
1925
|* Automatically generated file, do not edit!                                 *|
1926
|*                                                                            *|
1927
\*===----------------------------------------------------------------------===*/
1928
1929
1930
#ifdef GET_REGINFO_HEADER
1931
#undef GET_REGINFO_HEADER
1932
1933
#include "llvm/CodeGen/TargetRegisterInfo.h"
1934
1935
namespace llvm {
1936
1937
class SparcFrameLowering;
1938
1939
struct SparcGenRegisterInfo : public TargetRegisterInfo {
1940
  explicit SparcGenRegisterInfo(unsigned RA, unsigned D = 0, unsigned E = 0,
1941
      unsigned PC = 0, unsigned HwMode = 0);
1942
  unsigned composeSubRegIndicesImpl(unsigned, unsigned) const override;
1943
  LaneBitmask composeSubRegIndexLaneMaskImpl(unsigned, LaneBitmask) const override;
1944
  LaneBitmask reverseComposeSubRegIndexLaneMaskImpl(unsigned, LaneBitmask) const override;
1945
  const TargetRegisterClass *getSubClassWithSubReg(const TargetRegisterClass *, unsigned) const override;
1946
  const TargetRegisterClass *getSubRegisterClass(const TargetRegisterClass *, unsigned) const override;
1947
  const RegClassWeight &getRegClassWeight(const TargetRegisterClass *RC) const override;
1948
  unsigned getRegUnitWeight(unsigned RegUnit) const override;
1949
  unsigned getNumRegPressureSets() const override;
1950
  const char *getRegPressureSetName(unsigned Idx) const override;
1951
  unsigned getRegPressureSetLimit(const MachineFunction &MF, unsigned Idx) const override;
1952
  const int *getRegClassPressureSets(const TargetRegisterClass *RC) const override;
1953
  const int *getRegUnitPressureSets(unsigned RegUnit) const override;
1954
  ArrayRef<const char *> getRegMaskNames() const override;
1955
  ArrayRef<const uint32_t *> getRegMasks() const override;
1956
  bool isGeneralPurposeRegister(const MachineFunction &, MCRegister) const override;
1957
  bool isFixedRegister(const MachineFunction &, MCRegister) const override;
1958
  bool isArgumentRegister(const MachineFunction &, MCRegister) const override;
1959
  bool isConstantPhysReg(MCRegister PhysReg) const override final;
1960
  /// Devirtualized TargetFrameLowering.
1961
  static const SparcFrameLowering *getFrameLowering(
1962
      const MachineFunction &MF);
1963
};
1964
1965
namespace SP { // Register classes
1966
  extern const TargetRegisterClass FCCRegsRegClass;
1967
  extern const TargetRegisterClass ASRRegsRegClass;
1968
  extern const TargetRegisterClass CoprocRegsRegClass;
1969
  extern const TargetRegisterClass FPRegsRegClass;
1970
  extern const TargetRegisterClass IntRegsRegClass;
1971
  extern const TargetRegisterClass DFPRegsRegClass;
1972
  extern const TargetRegisterClass I64RegsRegClass;
1973
  extern const TargetRegisterClass PRRegsRegClass;
1974
  extern const TargetRegisterClass CoprocPairRegClass;
1975
  extern const TargetRegisterClass IntPairRegClass;
1976
  extern const TargetRegisterClass LowDFPRegsRegClass;
1977
  extern const TargetRegisterClass PRRegs_and_ASRRegsRegClass;
1978
  extern const TargetRegisterClass QFPRegsRegClass;
1979
  extern const TargetRegisterClass LowQFPRegsRegClass;
1980
} // end namespace SP
1981
1982
} // end namespace llvm
1983
1984
#endif // GET_REGINFO_HEADER
1985
1986
/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
1987
|*                                                                            *|
1988
|* Target Register and Register Classes Information                           *|
1989
|*                                                                            *|
1990
|* Automatically generated file, do not edit!                                 *|
1991
|*                                                                            *|
1992
\*===----------------------------------------------------------------------===*/
1993
1994
1995
#ifdef GET_REGINFO_TARGET_DESC
1996
#undef GET_REGINFO_TARGET_DESC
1997
1998
namespace llvm {
1999
2000
extern const MCRegisterClass SparcMCRegisterClasses[];
2001
2002
static const MVT::SimpleValueType VTLists[] = {
2003
  /* 0 */ MVT::i1, MVT::Other,
2004
  /* 2 */ MVT::i32, MVT::Other,
2005
  /* 4 */ MVT::i32, MVT::i64, MVT::Other,
2006
  /* 7 */ MVT::f32, MVT::Other,
2007
  /* 9 */ MVT::f64, MVT::Other,
2008
  /* 11 */ MVT::f128, MVT::Other,
2009
  /* 13 */ MVT::v2i32, MVT::Other,
2010
};
2011
2012
static const char *SubRegIndexNameTable[] = { "sub_even", "sub_even64", "sub_odd", "sub_odd64", "sub_odd64_then_sub_even", "sub_odd64_then_sub_odd", "" };
2013
2014
2015
static const LaneBitmask SubRegIndexLaneMaskTable[] = {
2016
  LaneBitmask::getAll(),
2017
  LaneBitmask(0x0000000000000001), // sub_even
2018
  LaneBitmask(0x0000000000000003), // sub_even64
2019
  LaneBitmask(0x0000000000000002), // sub_odd
2020
  LaneBitmask(0x000000000000000C), // sub_odd64
2021
  LaneBitmask(0x0000000000000004), // sub_odd64_then_sub_even
2022
  LaneBitmask(0x0000000000000008), // sub_odd64_then_sub_odd
2023
 };
2024
2025
2026
2027
static const TargetRegisterInfo::RegClassInfo RegClassInfos[] = {
2028
  // Mode = 0 (Default)
2029
  { 1, 1, 1, /*VTLists+*/0 },    // FCCRegs
2030
  { 32, 32, 32, /*VTLists+*/2 },    // ASRRegs
2031
  { 32, 32, 32, /*VTLists+*/2 },    // CoprocRegs
2032
  { 32, 32, 32, /*VTLists+*/7 },    // FPRegs
2033
  { 32, 32, 32, /*VTLists+*/4 },    // IntRegs
2034
  { 64, 64, 64, /*VTLists+*/9 },    // DFPRegs
2035
  { 64, 64, 64, /*VTLists+*/5 },    // I64Regs
2036
  { 64, 64, 64, /*VTLists+*/5 },    // PRRegs
2037
  { 64, 64, 64, /*VTLists+*/13 },    // CoprocPair
2038
  { 64, 64, 64, /*VTLists+*/13 },    // IntPair
2039
  { 64, 64, 64, /*VTLists+*/9 },    // LowDFPRegs
2040
  { 64, 64, 64, /*VTLists+*/5 },    // PRRegs_and_ASRRegs
2041
  { 128, 128, 128, /*VTLists+*/11 },    // QFPRegs
2042
  { 128, 128, 128, /*VTLists+*/11 },    // LowQFPRegs
2043
};
2044
2045
static const TargetRegisterClass *const NullRegClasses[] = { nullptr };
2046
2047
static const uint32_t FCCRegsSubClassMask[] = {
2048
  0x00000001, 
2049
};
2050
2051
static const uint32_t ASRRegsSubClassMask[] = {
2052
  0x00000802, 
2053
};
2054
2055
static const uint32_t CoprocRegsSubClassMask[] = {
2056
  0x00000004, 
2057
  0x00000100, // sub_even
2058
  0x00000100, // sub_odd
2059
};
2060
2061
static const uint32_t FPRegsSubClassMask[] = {
2062
  0x00000008, 
2063
  0x00002400, // sub_even
2064
  0x00002400, // sub_odd
2065
  0x00002000, // sub_odd64_then_sub_even
2066
  0x00002000, // sub_odd64_then_sub_odd
2067
};
2068
2069
static const uint32_t IntRegsSubClassMask[] = {
2070
  0x00000050, 
2071
  0x00000200, // sub_even
2072
  0x00000200, // sub_odd
2073
};
2074
2075
static const uint32_t DFPRegsSubClassMask[] = {
2076
  0x00000420, 
2077
  0x00003000, // sub_even64
2078
  0x00003000, // sub_odd64
2079
};
2080
2081
static const uint32_t I64RegsSubClassMask[] = {
2082
  0x00000040, 
2083
  0x00000200, // sub_even
2084
  0x00000200, // sub_odd
2085
};
2086
2087
static const uint32_t PRRegsSubClassMask[] = {
2088
  0x00000880, 
2089
};
2090
2091
static const uint32_t CoprocPairSubClassMask[] = {
2092
  0x00000100, 
2093
};
2094
2095
static const uint32_t IntPairSubClassMask[] = {
2096
  0x00000200, 
2097
};
2098
2099
static const uint32_t LowDFPRegsSubClassMask[] = {
2100
  0x00000400, 
2101
  0x00002000, // sub_even64
2102
  0x00002000, // sub_odd64
2103
};
2104
2105
static const uint32_t PRRegs_and_ASRRegsSubClassMask[] = {
2106
  0x00000800, 
2107
};
2108
2109
static const uint32_t QFPRegsSubClassMask[] = {
2110
  0x00003000, 
2111
};
2112
2113
static const uint32_t LowQFPRegsSubClassMask[] = {
2114
  0x00002000, 
2115
};
2116
2117
static const uint16_t SuperRegIdxSeqs[] = {
2118
  /* 0 */ 1, 3, 0,
2119
  /* 3 */ 2, 4, 0,
2120
  /* 6 */ 1, 3, 5, 6, 0,
2121
};
2122
2123
static const TargetRegisterClass *const I64RegsSuperclasses[] = {
2124
  &SP::IntRegsRegClass,
2125
  nullptr
2126
};
2127
2128
static const TargetRegisterClass *const LowDFPRegsSuperclasses[] = {
2129
  &SP::DFPRegsRegClass,
2130
  nullptr
2131
};
2132
2133
static const TargetRegisterClass *const PRRegs_and_ASRRegsSuperclasses[] = {
2134
  &SP::ASRRegsRegClass,
2135
  &SP::PRRegsRegClass,
2136
  nullptr
2137
};
2138
2139
static const TargetRegisterClass *const LowQFPRegsSuperclasses[] = {
2140
  &SP::QFPRegsRegClass,
2141
  nullptr
2142
};
2143
2144
2145
namespace SP {   // Register class instances
2146
  extern const TargetRegisterClass FCCRegsRegClass = {
2147
    &SparcMCRegisterClasses[FCCRegsRegClassID],
2148
    FCCRegsSubClassMask,
2149
    SuperRegIdxSeqs + 2,
2150
    LaneBitmask(0x0000000000000001),
2151
    0,
2152
    false,
2153
    0x00, /* TSFlags */
2154
    false, /* HasDisjunctSubRegs */
2155
    false, /* CoveredBySubRegs */
2156
    NullRegClasses,
2157
    nullptr
2158
  };
2159
2160
  extern const TargetRegisterClass ASRRegsRegClass = {
2161
    &SparcMCRegisterClasses[ASRRegsRegClassID],
2162
    ASRRegsSubClassMask,
2163
    SuperRegIdxSeqs + 2,
2164
    LaneBitmask(0x0000000000000001),
2165
    0,
2166
    false,
2167
    0x00, /* TSFlags */
2168
    false, /* HasDisjunctSubRegs */
2169
    false, /* CoveredBySubRegs */
2170
    NullRegClasses,
2171
    nullptr
2172
  };
2173
2174
  extern const TargetRegisterClass CoprocRegsRegClass = {
2175
    &SparcMCRegisterClasses[CoprocRegsRegClassID],
2176
    CoprocRegsSubClassMask,
2177
    SuperRegIdxSeqs + 0,
2178
    LaneBitmask(0x0000000000000001),
2179
    0,
2180
    false,
2181
    0x00, /* TSFlags */
2182
    false, /* HasDisjunctSubRegs */
2183
    false, /* CoveredBySubRegs */
2184
    NullRegClasses,
2185
    nullptr
2186
  };
2187
2188
  extern const TargetRegisterClass FPRegsRegClass = {
2189
    &SparcMCRegisterClasses[FPRegsRegClassID],
2190
    FPRegsSubClassMask,
2191
    SuperRegIdxSeqs + 6,
2192
    LaneBitmask(0x0000000000000001),
2193
    0,
2194
    false,
2195
    0x00, /* TSFlags */
2196
    false, /* HasDisjunctSubRegs */
2197
    false, /* CoveredBySubRegs */
2198
    NullRegClasses,
2199
    nullptr
2200
  };
2201
2202
  extern const TargetRegisterClass IntRegsRegClass = {
2203
    &SparcMCRegisterClasses[IntRegsRegClassID],
2204
    IntRegsSubClassMask,
2205
    SuperRegIdxSeqs + 0,
2206
    LaneBitmask(0x0000000000000001),
2207
    0,
2208
    false,
2209
    0x00, /* TSFlags */
2210
    false, /* HasDisjunctSubRegs */
2211
    false, /* CoveredBySubRegs */
2212
    NullRegClasses,
2213
    nullptr
2214
  };
2215
2216
  extern const TargetRegisterClass DFPRegsRegClass = {
2217
    &SparcMCRegisterClasses[DFPRegsRegClassID],
2218
    DFPRegsSubClassMask,
2219
    SuperRegIdxSeqs + 3,
2220
    LaneBitmask(0x0000000000000003),
2221
    0,
2222
    false,
2223
    0x00, /* TSFlags */
2224
    true, /* HasDisjunctSubRegs */
2225
    false, /* CoveredBySubRegs */
2226
    NullRegClasses,
2227
    nullptr
2228
  };
2229
2230
  extern const TargetRegisterClass I64RegsRegClass = {
2231
    &SparcMCRegisterClasses[I64RegsRegClassID],
2232
    I64RegsSubClassMask,
2233
    SuperRegIdxSeqs + 0,
2234
    LaneBitmask(0x0000000000000001),
2235
    0,
2236
    false,
2237
    0x00, /* TSFlags */
2238
    false, /* HasDisjunctSubRegs */
2239
    false, /* CoveredBySubRegs */
2240
    I64RegsSuperclasses,
2241
    nullptr
2242
  };
2243
2244
  extern const TargetRegisterClass PRRegsRegClass = {
2245
    &SparcMCRegisterClasses[PRRegsRegClassID],
2246
    PRRegsSubClassMask,
2247
    SuperRegIdxSeqs + 2,
2248
    LaneBitmask(0x0000000000000001),
2249
    0,
2250
    false,
2251
    0x00, /* TSFlags */
2252
    false, /* HasDisjunctSubRegs */
2253
    false, /* CoveredBySubRegs */
2254
    NullRegClasses,
2255
    nullptr
2256
  };
2257
2258
  extern const TargetRegisterClass CoprocPairRegClass = {
2259
    &SparcMCRegisterClasses[CoprocPairRegClassID],
2260
    CoprocPairSubClassMask,
2261
    SuperRegIdxSeqs + 2,
2262
    LaneBitmask(0x0000000000000003),
2263
    0,
2264
    false,
2265
    0x00, /* TSFlags */
2266
    true, /* HasDisjunctSubRegs */
2267
    true, /* CoveredBySubRegs */
2268
    NullRegClasses,
2269
    nullptr
2270
  };
2271
2272
  extern const TargetRegisterClass IntPairRegClass = {
2273
    &SparcMCRegisterClasses[IntPairRegClassID],
2274
    IntPairSubClassMask,
2275
    SuperRegIdxSeqs + 2,
2276
    LaneBitmask(0x0000000000000003),
2277
    0,
2278
    false,
2279
    0x00, /* TSFlags */
2280
    true, /* HasDisjunctSubRegs */
2281
    true, /* CoveredBySubRegs */
2282
    NullRegClasses,
2283
    nullptr
2284
  };
2285
2286
  extern const TargetRegisterClass LowDFPRegsRegClass = {
2287
    &SparcMCRegisterClasses[LowDFPRegsRegClassID],
2288
    LowDFPRegsSubClassMask,
2289
    SuperRegIdxSeqs + 3,
2290
    LaneBitmask(0x0000000000000003),
2291
    0,
2292
    false,
2293
    0x00, /* TSFlags */
2294
    true, /* HasDisjunctSubRegs */
2295
    true, /* CoveredBySubRegs */
2296
    LowDFPRegsSuperclasses,
2297
    nullptr
2298
  };
2299
2300
  extern const TargetRegisterClass PRRegs_and_ASRRegsRegClass = {
2301
    &SparcMCRegisterClasses[PRRegs_and_ASRRegsRegClassID],
2302
    PRRegs_and_ASRRegsSubClassMask,
2303
    SuperRegIdxSeqs + 2,
2304
    LaneBitmask(0x0000000000000001),
2305
    0,
2306
    false,
2307
    0x00, /* TSFlags */
2308
    false, /* HasDisjunctSubRegs */
2309
    false, /* CoveredBySubRegs */
2310
    PRRegs_and_ASRRegsSuperclasses,
2311
    nullptr
2312
  };
2313
2314
  extern const TargetRegisterClass QFPRegsRegClass = {
2315
    &SparcMCRegisterClasses[QFPRegsRegClassID],
2316
    QFPRegsSubClassMask,
2317
    SuperRegIdxSeqs + 2,
2318
    LaneBitmask(0x000000000000000F),
2319
    0,
2320
    false,
2321
    0x00, /* TSFlags */
2322
    true, /* HasDisjunctSubRegs */
2323
    true, /* CoveredBySubRegs */
2324
    NullRegClasses,
2325
    nullptr
2326
  };
2327
2328
  extern const TargetRegisterClass LowQFPRegsRegClass = {
2329
    &SparcMCRegisterClasses[LowQFPRegsRegClassID],
2330
    LowQFPRegsSubClassMask,
2331
    SuperRegIdxSeqs + 2,
2332
    LaneBitmask(0x000000000000000F),
2333
    0,
2334
    false,
2335
    0x00, /* TSFlags */
2336
    true, /* HasDisjunctSubRegs */
2337
    true, /* CoveredBySubRegs */
2338
    LowQFPRegsSuperclasses,
2339
    nullptr
2340
  };
2341
2342
} // end namespace SP
2343
2344
namespace {
2345
  const TargetRegisterClass *const RegisterClasses[] = {
2346
    &SP::FCCRegsRegClass,
2347
    &SP::ASRRegsRegClass,
2348
    &SP::CoprocRegsRegClass,
2349
    &SP::FPRegsRegClass,
2350
    &SP::IntRegsRegClass,
2351
    &SP::DFPRegsRegClass,
2352
    &SP::I64RegsRegClass,
2353
    &SP::PRRegsRegClass,
2354
    &SP::CoprocPairRegClass,
2355
    &SP::IntPairRegClass,
2356
    &SP::LowDFPRegsRegClass,
2357
    &SP::PRRegs_and_ASRRegsRegClass,
2358
    &SP::QFPRegsRegClass,
2359
    &SP::LowQFPRegsRegClass,
2360
  };
2361
} // end anonymous namespace
2362
2363
static const uint8_t CostPerUseTable[] = { 
2364
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, 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, 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, 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, };
2365
2366
2367
static const bool InAllocatableClassTable[] = { 
2368
false, true, true, true, false, false, true, false, false, true, false, true, true, false, true, true, false, true, true, true, true, true, true, true, false, true, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, 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, 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, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, };
2369
2370
2371
static const TargetRegisterInfoDesc SparcRegInfoDesc = { // Extra Descriptors
2372
CostPerUseTable, 1, InAllocatableClassTable};
2373
2374
0
unsigned SparcGenRegisterInfo::composeSubRegIndicesImpl(unsigned IdxA, unsigned IdxB) const {
2375
0
  static const uint8_t RowMap[6] = {
2376
0
    0, 0, 0, 1, 0, 0, 
2377
0
  };
2378
0
  static const uint8_t Rows[2][6] = {
2379
0
    { SP::sub_even, 0, SP::sub_odd, 0, 0, 0, },
2380
0
    { SP::sub_odd64_then_sub_even, 0, SP::sub_odd64_then_sub_odd, 0, 0, 0, },
2381
0
  };
2382
2383
0
  --IdxA; assert(IdxA < 6); (void) IdxA;
2384
0
  --IdxB; assert(IdxB < 6);
2385
0
  return Rows[RowMap[IdxA]][IdxB];
2386
0
}
2387
2388
  struct MaskRolOp {
2389
    LaneBitmask Mask;
2390
    uint8_t  RotateLeft;
2391
  };
2392
  static const MaskRolOp LaneMaskComposeSequences[] = {
2393
    { LaneBitmask(0xFFFFFFFFFFFFFFFF),  0 }, { LaneBitmask::getNone(), 0 },   // Sequence 0
2394
    { LaneBitmask(0xFFFFFFFFFFFFFFFF),  1 }, { LaneBitmask::getNone(), 0 },   // Sequence 2
2395
    { LaneBitmask(0xFFFFFFFFFFFFFFFF),  2 }, { LaneBitmask::getNone(), 0 },   // Sequence 4
2396
    { LaneBitmask(0xFFFFFFFFFFFFFFFF),  3 }, { LaneBitmask::getNone(), 0 }  // Sequence 6
2397
  };
2398
  static const uint8_t CompositeSequences[] = {
2399
    0, // to sub_even
2400
    0, // to sub_even64
2401
    2, // to sub_odd
2402
    4, // to sub_odd64
2403
    4, // to sub_odd64_then_sub_even
2404
    6 // to sub_odd64_then_sub_odd
2405
  };
2406
2407
0
LaneBitmask SparcGenRegisterInfo::composeSubRegIndexLaneMaskImpl(unsigned IdxA, LaneBitmask LaneMask) const {
2408
0
  --IdxA; assert(IdxA < 6 && "Subregister index out of bounds");
2409
0
  LaneBitmask Result;
2410
0
  for (const MaskRolOp *Ops =
2411
0
       &LaneMaskComposeSequences[CompositeSequences[IdxA]];
2412
0
       Ops->Mask.any(); ++Ops) {
2413
0
    LaneBitmask::Type M = LaneMask.getAsInteger() & Ops->Mask.getAsInteger();
2414
0
    if (unsigned S = Ops->RotateLeft)
2415
0
      Result |= LaneBitmask((M << S) | (M >> (LaneBitmask::BitWidth - S)));
2416
0
    else
2417
0
      Result |= LaneBitmask(M);
2418
0
  }
2419
0
  return Result;
2420
0
}
2421
2422
0
LaneBitmask SparcGenRegisterInfo::reverseComposeSubRegIndexLaneMaskImpl(unsigned IdxA,  LaneBitmask LaneMask) const {
2423
0
  LaneMask &= getSubRegIndexLaneMask(IdxA);
2424
0
  --IdxA; assert(IdxA < 6 && "Subregister index out of bounds");
2425
0
  LaneBitmask Result;
2426
0
  for (const MaskRolOp *Ops =
2427
0
       &LaneMaskComposeSequences[CompositeSequences[IdxA]];
2428
0
       Ops->Mask.any(); ++Ops) {
2429
0
    LaneBitmask::Type M = LaneMask.getAsInteger();
2430
0
    if (unsigned S = Ops->RotateLeft)
2431
0
      Result |= LaneBitmask((M >> S) | (M << (LaneBitmask::BitWidth - S)));
2432
0
    else
2433
0
      Result |= LaneBitmask(M);
2434
0
  }
2435
0
  return Result;
2436
0
}
2437
2438
0
const TargetRegisterClass *SparcGenRegisterInfo::getSubClassWithSubReg(const TargetRegisterClass *RC, unsigned Idx) const {
2439
0
  static const uint8_t Table[14][6] = {
2440
0
    { // FCCRegs
2441
0
      0,  // sub_even
2442
0
      0,  // sub_even64
2443
0
      0,  // sub_odd
2444
0
      0,  // sub_odd64
2445
0
      0,  // sub_odd64_then_sub_even
2446
0
      0,  // sub_odd64_then_sub_odd
2447
0
    },
2448
0
    { // ASRRegs
2449
0
      0,  // sub_even
2450
0
      0,  // sub_even64
2451
0
      0,  // sub_odd
2452
0
      0,  // sub_odd64
2453
0
      0,  // sub_odd64_then_sub_even
2454
0
      0,  // sub_odd64_then_sub_odd
2455
0
    },
2456
0
    { // CoprocRegs
2457
0
      0,  // sub_even
2458
0
      0,  // sub_even64
2459
0
      0,  // sub_odd
2460
0
      0,  // sub_odd64
2461
0
      0,  // sub_odd64_then_sub_even
2462
0
      0,  // sub_odd64_then_sub_odd
2463
0
    },
2464
0
    { // FPRegs
2465
0
      0,  // sub_even
2466
0
      0,  // sub_even64
2467
0
      0,  // sub_odd
2468
0
      0,  // sub_odd64
2469
0
      0,  // sub_odd64_then_sub_even
2470
0
      0,  // sub_odd64_then_sub_odd
2471
0
    },
2472
0
    { // IntRegs
2473
0
      0,  // sub_even
2474
0
      0,  // sub_even64
2475
0
      0,  // sub_odd
2476
0
      0,  // sub_odd64
2477
0
      0,  // sub_odd64_then_sub_even
2478
0
      0,  // sub_odd64_then_sub_odd
2479
0
    },
2480
0
    { // DFPRegs
2481
0
      11, // sub_even -> LowDFPRegs
2482
0
      0,  // sub_even64
2483
0
      11, // sub_odd -> LowDFPRegs
2484
0
      0,  // sub_odd64
2485
0
      0,  // sub_odd64_then_sub_even
2486
0
      0,  // sub_odd64_then_sub_odd
2487
0
    },
2488
0
    { // I64Regs
2489
0
      0,  // sub_even
2490
0
      0,  // sub_even64
2491
0
      0,  // sub_odd
2492
0
      0,  // sub_odd64
2493
0
      0,  // sub_odd64_then_sub_even
2494
0
      0,  // sub_odd64_then_sub_odd
2495
0
    },
2496
0
    { // PRRegs
2497
0
      0,  // sub_even
2498
0
      0,  // sub_even64
2499
0
      0,  // sub_odd
2500
0
      0,  // sub_odd64
2501
0
      0,  // sub_odd64_then_sub_even
2502
0
      0,  // sub_odd64_then_sub_odd
2503
0
    },
2504
0
    { // CoprocPair
2505
0
      9,  // sub_even -> CoprocPair
2506
0
      0,  // sub_even64
2507
0
      9,  // sub_odd -> CoprocPair
2508
0
      0,  // sub_odd64
2509
0
      0,  // sub_odd64_then_sub_even
2510
0
      0,  // sub_odd64_then_sub_odd
2511
0
    },
2512
0
    { // IntPair
2513
0
      10, // sub_even -> IntPair
2514
0
      0,  // sub_even64
2515
0
      10, // sub_odd -> IntPair
2516
0
      0,  // sub_odd64
2517
0
      0,  // sub_odd64_then_sub_even
2518
0
      0,  // sub_odd64_then_sub_odd
2519
0
    },
2520
0
    { // LowDFPRegs
2521
0
      11, // sub_even -> LowDFPRegs
2522
0
      0,  // sub_even64
2523
0
      11, // sub_odd -> LowDFPRegs
2524
0
      0,  // sub_odd64
2525
0
      0,  // sub_odd64_then_sub_even
2526
0
      0,  // sub_odd64_then_sub_odd
2527
0
    },
2528
0
    { // PRRegs_and_ASRRegs
2529
0
      0,  // sub_even
2530
0
      0,  // sub_even64
2531
0
      0,  // sub_odd
2532
0
      0,  // sub_odd64
2533
0
      0,  // sub_odd64_then_sub_even
2534
0
      0,  // sub_odd64_then_sub_odd
2535
0
    },
2536
0
    { // QFPRegs
2537
0
      14, // sub_even -> LowQFPRegs
2538
0
      13, // sub_even64 -> QFPRegs
2539
0
      14, // sub_odd -> LowQFPRegs
2540
0
      13, // sub_odd64 -> QFPRegs
2541
0
      14, // sub_odd64_then_sub_even -> LowQFPRegs
2542
0
      14, // sub_odd64_then_sub_odd -> LowQFPRegs
2543
0
    },
2544
0
    { // LowQFPRegs
2545
0
      14, // sub_even -> LowQFPRegs
2546
0
      14, // sub_even64 -> LowQFPRegs
2547
0
      14, // sub_odd -> LowQFPRegs
2548
0
      14, // sub_odd64 -> LowQFPRegs
2549
0
      14, // sub_odd64_then_sub_even -> LowQFPRegs
2550
0
      14, // sub_odd64_then_sub_odd -> LowQFPRegs
2551
0
    },
2552
0
  };
2553
0
  assert(RC && "Missing regclass");
2554
0
  if (!Idx) return RC;
2555
0
  --Idx;
2556
0
  assert(Idx < 6 && "Bad subreg");
2557
0
  unsigned TV = Table[RC->getID()][Idx];
2558
0
  return TV ? getRegClass(TV - 1) : nullptr;
2559
0
}
2560
2561
0
const TargetRegisterClass *SparcGenRegisterInfo::getSubRegisterClass(const TargetRegisterClass *RC, unsigned Idx) const {
2562
0
  static const uint8_t Table[14][6] = {
2563
0
    { // FCCRegs
2564
0
      0,  // FCCRegs:sub_even
2565
0
      0,  // FCCRegs:sub_even64
2566
0
      0,  // FCCRegs:sub_odd
2567
0
      0,  // FCCRegs:sub_odd64
2568
0
      0,  // FCCRegs:sub_odd64_then_sub_even
2569
0
      0,  // FCCRegs:sub_odd64_then_sub_odd
2570
0
    },
2571
0
    { // ASRRegs
2572
0
      0,  // ASRRegs:sub_even
2573
0
      0,  // ASRRegs:sub_even64
2574
0
      0,  // ASRRegs:sub_odd
2575
0
      0,  // ASRRegs:sub_odd64
2576
0
      0,  // ASRRegs:sub_odd64_then_sub_even
2577
0
      0,  // ASRRegs:sub_odd64_then_sub_odd
2578
0
    },
2579
0
    { // CoprocRegs
2580
0
      0,  // CoprocRegs:sub_even
2581
0
      0,  // CoprocRegs:sub_even64
2582
0
      0,  // CoprocRegs:sub_odd
2583
0
      0,  // CoprocRegs:sub_odd64
2584
0
      0,  // CoprocRegs:sub_odd64_then_sub_even
2585
0
      0,  // CoprocRegs:sub_odd64_then_sub_odd
2586
0
    },
2587
0
    { // FPRegs
2588
0
      0,  // FPRegs:sub_even
2589
0
      0,  // FPRegs:sub_even64
2590
0
      0,  // FPRegs:sub_odd
2591
0
      0,  // FPRegs:sub_odd64
2592
0
      0,  // FPRegs:sub_odd64_then_sub_even
2593
0
      0,  // FPRegs:sub_odd64_then_sub_odd
2594
0
    },
2595
0
    { // IntRegs
2596
0
      0,  // IntRegs:sub_even
2597
0
      0,  // IntRegs:sub_even64
2598
0
      0,  // IntRegs:sub_odd
2599
0
      0,  // IntRegs:sub_odd64
2600
0
      0,  // IntRegs:sub_odd64_then_sub_even
2601
0
      0,  // IntRegs:sub_odd64_then_sub_odd
2602
0
    },
2603
0
    { // DFPRegs
2604
0
      4,  // DFPRegs:sub_even -> FPRegs
2605
0
      0,  // DFPRegs:sub_even64
2606
0
      4,  // DFPRegs:sub_odd -> FPRegs
2607
0
      0,  // DFPRegs:sub_odd64
2608
0
      0,  // DFPRegs:sub_odd64_then_sub_even
2609
0
      0,  // DFPRegs:sub_odd64_then_sub_odd
2610
0
    },
2611
0
    { // I64Regs
2612
0
      0,  // I64Regs:sub_even
2613
0
      0,  // I64Regs:sub_even64
2614
0
      0,  // I64Regs:sub_odd
2615
0
      0,  // I64Regs:sub_odd64
2616
0
      0,  // I64Regs:sub_odd64_then_sub_even
2617
0
      0,  // I64Regs:sub_odd64_then_sub_odd
2618
0
    },
2619
0
    { // PRRegs
2620
0
      0,  // PRRegs:sub_even
2621
0
      0,  // PRRegs:sub_even64
2622
0
      0,  // PRRegs:sub_odd
2623
0
      0,  // PRRegs:sub_odd64
2624
0
      0,  // PRRegs:sub_odd64_then_sub_even
2625
0
      0,  // PRRegs:sub_odd64_then_sub_odd
2626
0
    },
2627
0
    { // CoprocPair
2628
0
      3,  // CoprocPair:sub_even -> CoprocRegs
2629
0
      0,  // CoprocPair:sub_even64
2630
0
      3,  // CoprocPair:sub_odd -> CoprocRegs
2631
0
      0,  // CoprocPair:sub_odd64
2632
0
      0,  // CoprocPair:sub_odd64_then_sub_even
2633
0
      0,  // CoprocPair:sub_odd64_then_sub_odd
2634
0
    },
2635
0
    { // IntPair
2636
0
      7,  // IntPair:sub_even -> I64Regs
2637
0
      0,  // IntPair:sub_even64
2638
0
      7,  // IntPair:sub_odd -> I64Regs
2639
0
      0,  // IntPair:sub_odd64
2640
0
      0,  // IntPair:sub_odd64_then_sub_even
2641
0
      0,  // IntPair:sub_odd64_then_sub_odd
2642
0
    },
2643
0
    { // LowDFPRegs
2644
0
      4,  // LowDFPRegs:sub_even -> FPRegs
2645
0
      0,  // LowDFPRegs:sub_even64
2646
0
      4,  // LowDFPRegs:sub_odd -> FPRegs
2647
0
      0,  // LowDFPRegs:sub_odd64
2648
0
      0,  // LowDFPRegs:sub_odd64_then_sub_even
2649
0
      0,  // LowDFPRegs:sub_odd64_then_sub_odd
2650
0
    },
2651
0
    { // PRRegs_and_ASRRegs
2652
0
      0,  // PRRegs_and_ASRRegs:sub_even
2653
0
      0,  // PRRegs_and_ASRRegs:sub_even64
2654
0
      0,  // PRRegs_and_ASRRegs:sub_odd
2655
0
      0,  // PRRegs_and_ASRRegs:sub_odd64
2656
0
      0,  // PRRegs_and_ASRRegs:sub_odd64_then_sub_even
2657
0
      0,  // PRRegs_and_ASRRegs:sub_odd64_then_sub_odd
2658
0
    },
2659
0
    { // QFPRegs
2660
0
      4,  // QFPRegs:sub_even -> FPRegs
2661
0
      6,  // QFPRegs:sub_even64 -> DFPRegs
2662
0
      4,  // QFPRegs:sub_odd -> FPRegs
2663
0
      6,  // QFPRegs:sub_odd64 -> DFPRegs
2664
0
      4,  // QFPRegs:sub_odd64_then_sub_even -> FPRegs
2665
0
      4,  // QFPRegs:sub_odd64_then_sub_odd -> FPRegs
2666
0
    },
2667
0
    { // LowQFPRegs
2668
0
      4,  // LowQFPRegs:sub_even -> FPRegs
2669
0
      11, // LowQFPRegs:sub_even64 -> LowDFPRegs
2670
0
      4,  // LowQFPRegs:sub_odd -> FPRegs
2671
0
      11, // LowQFPRegs:sub_odd64 -> LowDFPRegs
2672
0
      4,  // LowQFPRegs:sub_odd64_then_sub_even -> FPRegs
2673
0
      4,  // LowQFPRegs:sub_odd64_then_sub_odd -> FPRegs
2674
0
    },
2675
0
  };
2676
0
  assert(RC && "Missing regclass");
2677
0
  if (!Idx) return RC;
2678
0
  --Idx;
2679
0
  assert(Idx < 6 && "Bad subreg");
2680
0
  unsigned TV = Table[RC->getID()][Idx];
2681
0
  return TV ? getRegClass(TV - 1) : nullptr;
2682
0
}
2683
2684
/// Get the weight in units of pressure for this register class.
2685
const RegClassWeight &SparcGenRegisterInfo::
2686
0
getRegClassWeight(const TargetRegisterClass *RC) const {
2687
0
  static const RegClassWeight RCWeightTable[] = {
2688
0
    {1, 4},   // FCCRegs
2689
0
    {1, 1},   // ASRRegs
2690
0
    {0, 0},   // CoprocRegs
2691
0
    {1, 32},    // FPRegs
2692
0
    {1, 32},    // IntRegs
2693
0
    {2, 64},    // DFPRegs
2694
0
    {1, 32},    // I64Regs
2695
0
    {1, 17},    // PRRegs
2696
0
    {0, 0},   // CoprocPair
2697
0
    {2, 32},    // IntPair
2698
0
    {2, 32},    // LowDFPRegs
2699
0
    {1, 1},   // PRRegs_and_ASRRegs
2700
0
    {4, 64},    // QFPRegs
2701
0
    {4, 32},    // LowQFPRegs
2702
0
  };
2703
0
  return RCWeightTable[RC->getID()];
2704
0
}
2705
2706
/// Get the weight in units of pressure for this register unit.
2707
unsigned SparcGenRegisterInfo::
2708
0
getRegUnitWeight(unsigned RegUnit) const {
2709
0
  assert(RegUnit < 173 && "invalid register unit");
2710
0
  static const uint8_t RUWeightTable[] = {
2711
0
    1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 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, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, };
2712
0
  return RUWeightTable[RegUnit];
2713
0
}
2714
2715
2716
// Get the number of dimensions of register pressure.
2717
0
unsigned SparcGenRegisterInfo::getNumRegPressureSets() const {
2718
0
  return 6;
2719
0
}
2720
2721
// Get the name of this register unit pressure set.
2722
const char *SparcGenRegisterInfo::
2723
0
getRegPressureSetName(unsigned Idx) const {
2724
0
  static const char *PressureNameTable[] = {
2725
0
    "PRRegs_and_ASRRegs",
2726
0
    "FCCRegs",
2727
0
    "PRRegs",
2728
0
    "FPRegs",
2729
0
    "IntRegs",
2730
0
    "DFPRegs",
2731
0
  };
2732
0
  return PressureNameTable[Idx];
2733
0
}
2734
2735
// Get the register unit pressure limit for this dimension.
2736
// This limit must be adjusted dynamically for reserved registers.
2737
unsigned SparcGenRegisterInfo::
2738
0
getRegPressureSetLimit(const MachineFunction &MF, unsigned Idx) const {
2739
0
  static const uint8_t PressureLimitTable[] = {
2740
0
    1,    // 0: PRRegs_and_ASRRegs
2741
0
    4,    // 1: FCCRegs
2742
0
    17,   // 2: PRRegs
2743
0
    32,   // 3: FPRegs
2744
0
    32,   // 4: IntRegs
2745
0
    64,   // 5: DFPRegs
2746
0
  };
2747
0
  return PressureLimitTable[Idx];
2748
0
}
2749
2750
/// Table of pressure sets per register class or unit.
2751
static const int RCSetsTable[] = {
2752
  /* 0 */ 1, -1,
2753
  /* 2 */ 0, 2, -1,
2754
  /* 5 */ 4, -1,
2755
  /* 7 */ 3, 5, -1,
2756
};
2757
2758
/// Get the dimensions of register pressure impacted by this register class.
2759
/// Returns a -1 terminated array of pressure set IDs
2760
const int *SparcGenRegisterInfo::
2761
0
getRegClassPressureSets(const TargetRegisterClass *RC) const {
2762
0
  static const uint8_t RCSetStartTable[] = {
2763
0
    0,1,1,7,5,8,5,3,1,5,7,2,8,7,};
2764
0
  return &RCSetsTable[RCSetStartTable[RC->getID()]];
2765
0
}
2766
2767
/// Get the dimensions of register pressure impacted by this register unit.
2768
/// Returns a -1 terminated array of pressure set IDs
2769
const int *SparcGenRegisterInfo::
2770
0
getRegUnitPressureSets(unsigned RegUnit) const {
2771
0
  assert(RegUnit < 173 && "invalid register unit");
2772
0
  static const uint8_t RUSetStartTable[] = {
2773
0
    3,3,3,1,1,3,1,1,3,1,3,3,1,3,3,1,2,3,3,3,3,3,3,1,3,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,0,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,};
2774
0
  return &RCSetsTable[RUSetStartTable[RegUnit]];
2775
0
}
2776
2777
extern const MCRegisterDesc SparcRegDesc[];
2778
extern const int16_t SparcRegDiffLists[];
2779
extern const LaneBitmask SparcLaneMaskLists[];
2780
extern const char SparcRegStrings[];
2781
extern const char SparcRegClassStrings[];
2782
extern const MCPhysReg SparcRegUnitRoots[][2];
2783
extern const uint16_t SparcSubRegIdxLists[];
2784
extern const MCRegisterInfo::SubRegCoveredBits SparcSubRegIdxRanges[];
2785
extern const uint16_t SparcRegEncodingTable[];
2786
// SP Dwarf<->LLVM register mappings.
2787
extern const MCRegisterInfo::DwarfLLVMRegPair SPDwarfFlavour0Dwarf2L[];
2788
extern const unsigned SPDwarfFlavour0Dwarf2LSize;
2789
2790
extern const MCRegisterInfo::DwarfLLVMRegPair SPEHFlavour0Dwarf2L[];
2791
extern const unsigned SPEHFlavour0Dwarf2LSize;
2792
2793
extern const MCRegisterInfo::DwarfLLVMRegPair SPDwarfFlavour0L2Dwarf[];
2794
extern const unsigned SPDwarfFlavour0L2DwarfSize;
2795
2796
extern const MCRegisterInfo::DwarfLLVMRegPair SPEHFlavour0L2Dwarf[];
2797
extern const unsigned SPEHFlavour0L2DwarfSize;
2798
2799
SparcGenRegisterInfo::
2800
SparcGenRegisterInfo(unsigned RA, unsigned DwarfFlavour, unsigned EHFlavour,
2801
      unsigned PC, unsigned HwMode)
2802
  : TargetRegisterInfo(&SparcRegInfoDesc, RegisterClasses, RegisterClasses+14,
2803
             SubRegIndexNameTable, SubRegIndexLaneMaskTable,
2804
0
             LaneBitmask(0xFFFFFFFFFFFFFFFF), RegClassInfos, VTLists, HwMode) {
2805
0
  InitMCRegisterInfo(SparcRegDesc, 238, RA, PC,
2806
0
                     SparcMCRegisterClasses, 14,
2807
0
                     SparcRegUnitRoots,
2808
0
                     173,
2809
0
                     SparcRegDiffLists,
2810
0
                     SparcLaneMaskLists,
2811
0
                     SparcRegStrings,
2812
0
                     SparcRegClassStrings,
2813
0
                     SparcSubRegIdxLists,
2814
0
                     7,
2815
0
                     SparcSubRegIdxRanges,
2816
0
                     SparcRegEncodingTable);
2817
2818
0
  switch (DwarfFlavour) {
2819
0
  default:
2820
0
    llvm_unreachable("Unknown DWARF flavour");
2821
0
  case 0:
2822
0
    mapDwarfRegsToLLVMRegs(SPDwarfFlavour0Dwarf2L, SPDwarfFlavour0Dwarf2LSize, false);
2823
0
    break;
2824
0
  }
2825
0
  switch (EHFlavour) {
2826
0
  default:
2827
0
    llvm_unreachable("Unknown DWARF flavour");
2828
0
  case 0:
2829
0
    mapDwarfRegsToLLVMRegs(SPEHFlavour0Dwarf2L, SPEHFlavour0Dwarf2LSize, true);
2830
0
    break;
2831
0
  }
2832
0
  switch (DwarfFlavour) {
2833
0
  default:
2834
0
    llvm_unreachable("Unknown DWARF flavour");
2835
0
  case 0:
2836
0
    mapLLVMRegsToDwarfRegs(SPDwarfFlavour0L2Dwarf, SPDwarfFlavour0L2DwarfSize, false);
2837
0
    break;
2838
0
  }
2839
0
  switch (EHFlavour) {
2840
0
  default:
2841
0
    llvm_unreachable("Unknown DWARF flavour");
2842
0
  case 0:
2843
0
    mapLLVMRegsToDwarfRegs(SPEHFlavour0L2Dwarf, SPEHFlavour0L2DwarfSize, true);
2844
0
    break;
2845
0
  }
2846
0
}
2847
2848
static const MCPhysReg CSR_SaveList[] = { 0 };
2849
static const uint32_t CSR_RegMask[] = { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x40000000, 0x103fffc0, 0x00000000, 0x000003fc, };
2850
static const MCPhysReg RTCSR_SaveList[] = { 0 };
2851
static const uint32_t RTCSR_RegMask[] = { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x40000000, 0x00003000, 0x00000000, 0x00000020, };
2852
2853
2854
0
ArrayRef<const uint32_t *> SparcGenRegisterInfo::getRegMasks() const {
2855
0
  static const uint32_t *const Masks[] = {
2856
0
    CSR_RegMask,
2857
0
    RTCSR_RegMask,
2858
0
  };
2859
0
  return ArrayRef(Masks);
2860
0
}
2861
2862
bool SparcGenRegisterInfo::
2863
0
isGeneralPurposeRegister(const MachineFunction &MF, MCRegister PhysReg) const {
2864
0
  return
2865
0
      false;
2866
0
}
2867
2868
bool SparcGenRegisterInfo::
2869
0
isFixedRegister(const MachineFunction &MF, MCRegister PhysReg) const {
2870
0
  return
2871
0
      false;
2872
0
}
2873
2874
bool SparcGenRegisterInfo::
2875
0
isArgumentRegister(const MachineFunction &MF, MCRegister PhysReg) const {
2876
0
  return
2877
0
      false;
2878
0
}
2879
2880
bool SparcGenRegisterInfo::
2881
0
isConstantPhysReg(MCRegister PhysReg) const {
2882
0
  return
2883
0
      PhysReg == SP::G0 ||
2884
0
      false;
2885
0
}
2886
2887
0
ArrayRef<const char *> SparcGenRegisterInfo::getRegMaskNames() const {
2888
0
  static const char *Names[] = {
2889
0
    "CSR",
2890
0
    "RTCSR",
2891
0
  };
2892
0
  return ArrayRef(Names);
2893
0
}
2894
2895
const SparcFrameLowering *
2896
0
SparcGenRegisterInfo::getFrameLowering(const MachineFunction &MF) {
2897
0
  return static_cast<const SparcFrameLowering *>(
2898
0
      MF.getSubtarget().getFrameLowering());
2899
0
}
2900
2901
} // end namespace llvm
2902
2903
#endif // GET_REGINFO_TARGET_DESC
2904