Coverage Report

Created: 2024-01-17 10:31

/src/build/lib/Target/SystemZ/SystemZGenRegisterInfo.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 SystemZMCRegisterClasses[];
17
18
namespace SystemZ {
19
enum {
20
  NoRegister,
21
  CC = 1,
22
  FPC = 2,
23
  A0 = 3,
24
  A1 = 4,
25
  A2 = 5,
26
  A3 = 6,
27
  A4 = 7,
28
  A5 = 8,
29
  A6 = 9,
30
  A7 = 10,
31
  A8 = 11,
32
  A9 = 12,
33
  A10 = 13,
34
  A11 = 14,
35
  A12 = 15,
36
  A13 = 16,
37
  A14 = 17,
38
  A15 = 18,
39
  C0 = 19,
40
  C1 = 20,
41
  C2 = 21,
42
  C3 = 22,
43
  C4 = 23,
44
  C5 = 24,
45
  C6 = 25,
46
  C7 = 26,
47
  C8 = 27,
48
  C9 = 28,
49
  C10 = 29,
50
  C11 = 30,
51
  C12 = 31,
52
  C13 = 32,
53
  C14 = 33,
54
  C15 = 34,
55
  V0 = 35,
56
  V1 = 36,
57
  V2 = 37,
58
  V3 = 38,
59
  V4 = 39,
60
  V5 = 40,
61
  V6 = 41,
62
  V7 = 42,
63
  V8 = 43,
64
  V9 = 44,
65
  V10 = 45,
66
  V11 = 46,
67
  V12 = 47,
68
  V13 = 48,
69
  V14 = 49,
70
  V15 = 50,
71
  V16 = 51,
72
  V17 = 52,
73
  V18 = 53,
74
  V19 = 54,
75
  V20 = 55,
76
  V21 = 56,
77
  V22 = 57,
78
  V23 = 58,
79
  V24 = 59,
80
  V25 = 60,
81
  V26 = 61,
82
  V27 = 62,
83
  V28 = 63,
84
  V29 = 64,
85
  V30 = 65,
86
  V31 = 66,
87
  F0D = 67,
88
  F1D = 68,
89
  F2D = 69,
90
  F3D = 70,
91
  F4D = 71,
92
  F5D = 72,
93
  F6D = 73,
94
  F7D = 74,
95
  F8D = 75,
96
  F9D = 76,
97
  F10D = 77,
98
  F11D = 78,
99
  F12D = 79,
100
  F13D = 80,
101
  F14D = 81,
102
  F15D = 82,
103
  F16D = 83,
104
  F17D = 84,
105
  F18D = 85,
106
  F19D = 86,
107
  F20D = 87,
108
  F21D = 88,
109
  F22D = 89,
110
  F23D = 90,
111
  F24D = 91,
112
  F25D = 92,
113
  F26D = 93,
114
  F27D = 94,
115
  F28D = 95,
116
  F29D = 96,
117
  F30D = 97,
118
  F31D = 98,
119
  F0Q = 99,
120
  F1Q = 100,
121
  F4Q = 101,
122
  F5Q = 102,
123
  F8Q = 103,
124
  F9Q = 104,
125
  F12Q = 105,
126
  F13Q = 106,
127
  F0S = 107,
128
  F1S = 108,
129
  F2S = 109,
130
  F3S = 110,
131
  F4S = 111,
132
  F5S = 112,
133
  F6S = 113,
134
  F7S = 114,
135
  F8S = 115,
136
  F9S = 116,
137
  F10S = 117,
138
  F11S = 118,
139
  F12S = 119,
140
  F13S = 120,
141
  F14S = 121,
142
  F15S = 122,
143
  F16S = 123,
144
  F17S = 124,
145
  F18S = 125,
146
  F19S = 126,
147
  F20S = 127,
148
  F21S = 128,
149
  F22S = 129,
150
  F23S = 130,
151
  F24S = 131,
152
  F25S = 132,
153
  F26S = 133,
154
  F27S = 134,
155
  F28S = 135,
156
  F29S = 136,
157
  F30S = 137,
158
  F31S = 138,
159
  R0D = 139,
160
  R1D = 140,
161
  R2D = 141,
162
  R3D = 142,
163
  R4D = 143,
164
  R5D = 144,
165
  R6D = 145,
166
  R7D = 146,
167
  R8D = 147,
168
  R9D = 148,
169
  R10D = 149,
170
  R11D = 150,
171
  R12D = 151,
172
  R13D = 152,
173
  R14D = 153,
174
  R15D = 154,
175
  R0H = 155,
176
  R1H = 156,
177
  R2H = 157,
178
  R3H = 158,
179
  R4H = 159,
180
  R5H = 160,
181
  R6H = 161,
182
  R7H = 162,
183
  R8H = 163,
184
  R9H = 164,
185
  R10H = 165,
186
  R11H = 166,
187
  R12H = 167,
188
  R13H = 168,
189
  R14H = 169,
190
  R15H = 170,
191
  R0L = 171,
192
  R1L = 172,
193
  R2L = 173,
194
  R3L = 174,
195
  R4L = 175,
196
  R5L = 176,
197
  R6L = 177,
198
  R7L = 178,
199
  R8L = 179,
200
  R9L = 180,
201
  R10L = 181,
202
  R11L = 182,
203
  R12L = 183,
204
  R13L = 184,
205
  R14L = 185,
206
  R15L = 186,
207
  R0Q = 187,
208
  R2Q = 188,
209
  R4Q = 189,
210
  R6Q = 190,
211
  R8Q = 191,
212
  R10Q = 192,
213
  R12Q = 193,
214
  R14Q = 194,
215
  NUM_TARGET_REGS // 195
216
};
217
} // end namespace SystemZ
218
219
// Register classes
220
221
namespace SystemZ {
222
enum {
223
  GRX32BitRegClassID = 0,
224
  VR32BitRegClassID = 1,
225
  AR32BitRegClassID = 2,
226
  FP32BitRegClassID = 3,
227
  GR32BitRegClassID = 4,
228
  GRH32BitRegClassID = 5,
229
  ADDR32BitRegClassID = 6,
230
  CCRRegClassID = 7,
231
  FPCRegsRegClassID = 8,
232
  AnyRegBitRegClassID = 9,
233
  AnyRegBit_with_subreg_h32_in_FP32BitRegClassID = 10,
234
  VR64BitRegClassID = 11,
235
  AnyRegBit_with_subreg_h64RegClassID = 12,
236
  CR64BitRegClassID = 13,
237
  FP64BitRegClassID = 14,
238
  GR64BitRegClassID = 15,
239
  ADDR64BitRegClassID = 16,
240
  VR128BitRegClassID = 17,
241
  VF128BitRegClassID = 18,
242
  FP128BitRegClassID = 19,
243
  GR128BitRegClassID = 20,
244
  ADDR128BitRegClassID = 21,
245
246
};
247
} // end namespace SystemZ
248
249
250
// Subregister indices
251
252
namespace SystemZ {
253
enum : uint16_t {
254
  NoSubRegister,
255
  subreg_h32, // 1
256
  subreg_h64, // 2
257
  subreg_l32, // 3
258
  subreg_l64, // 4
259
  subreg_lh32,  // 5
260
  subreg_ll32,  // 6
261
  NUM_TARGET_SUBREGS
262
};
263
} // end namespace SystemZ
264
265
// Register pressure sets enum.
266
namespace SystemZ {
267
enum RegisterPressureSets {
268
  FP32Bit = 0,
269
  GR32Bit = 1,
270
  GRH32Bit = 2,
271
  GRX32Bit = 3,
272
  VR32Bit = 4,
273
};
274
} // end namespace SystemZ
275
276
} // end namespace llvm
277
278
#endif // GET_REGINFO_ENUM
279
280
/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
281
|*                                                                            *|
282
|* MC Register Information                                                    *|
283
|*                                                                            *|
284
|* Automatically generated file, do not edit!                                 *|
285
|*                                                                            *|
286
\*===----------------------------------------------------------------------===*/
287
288
289
#ifdef GET_REGINFO_MC_DESC
290
#undef GET_REGINFO_MC_DESC
291
292
namespace llvm {
293
294
extern const int16_t SystemZRegDiffLists[] = {
295
  /* 0 */ -40, -32, 0,
296
  /* 3 */ -48, 32, -16, -15, 32, -16, 0,
297
  /* 10 */ -47, 32, -16, -15, 32, -16, 0,
298
  /* 17 */ -46, 32, -16, -15, 32, -16, 0,
299
  /* 24 */ -45, 32, -16, -15, 32, -16, 0,
300
  /* 31 */ -44, 32, -16, -15, 32, -16, 0,
301
  /* 38 */ -43, 32, -16, -15, 32, -16, 0,
302
  /* 45 */ -42, 32, -16, -15, 32, -16, 0,
303
  /* 52 */ -41, 32, -16, -15, 32, -16, 0,
304
  /* 59 */ 1, 1, 1, 0,
305
  /* 63 */ 2, 0,
306
  /* 65 */ -32, 40, -38, 40, 0,
307
  /* 70 */ -30, 40, -38, 40, 0,
308
  /* 75 */ -28, 40, -38, 40, 0,
309
  /* 80 */ -26, 40, -38, 40, 0,
310
  /* 85 */ -32, 40, 0,
311
  /* 88 */ -16, 40, 0,
312
  /* 91 */ 32, 40, 0,
313
  /* 94 */ -32, 41, 0,
314
  /* 97 */ -16, 41, 0,
315
  /* 100 */ -32, 42, 0,
316
  /* 103 */ -16, 42, 0,
317
  /* 106 */ -32, 43, 0,
318
  /* 109 */ -16, 43, 0,
319
  /* 112 */ -32, 44, 0,
320
  /* 115 */ -16, 44, 0,
321
  /* 118 */ -32, 45, 0,
322
  /* 121 */ -16, 45, 0,
323
  /* 124 */ -32, 46, 0,
324
  /* 127 */ -16, 46, 0,
325
  /* 130 */ -32, 47, 0,
326
  /* 133 */ -16, 47, 0,
327
  /* 136 */ -32, 48, 0,
328
  /* 139 */ -16, 48, 0,
329
  /* 142 */ -40, -32, 56, 0,
330
  /* 146 */ -40, -32, 58, 0,
331
  /* 150 */ -40, -32, 60, 0,
332
  /* 154 */ -40, -32, 62, 0,
333
  /* 158 */ -40, -32, 64, 0,
334
};
335
336
extern const LaneBitmask SystemZLaneMaskLists[] = {
337
  /* 0 */ LaneBitmask(0x0000000000000002), LaneBitmask(0x0000000000000001), LaneBitmask::getAll(),
338
  /* 3 */ LaneBitmask(0x0000000000000001), LaneBitmask(0x0000000000000004), LaneBitmask::getAll(),
339
  /* 6 */ LaneBitmask(0x0000000000000002), LaneBitmask(0x0000000000000001), LaneBitmask(0x0000000000000008), LaneBitmask(0x0000000000000004), LaneBitmask::getAll(),
340
  /* 11 */ LaneBitmask(0xFFFFFFFFFFFFFFFF), LaneBitmask::getAll(),
341
};
342
343
extern const uint16_t SystemZSubRegIdxLists[] = {
344
  /* 0 */ 2, 1, 0,
345
  /* 3 */ 3, 1, 0,
346
  /* 6 */ 2, 1, 4, 5, 0,
347
  /* 11 */ 2, 3, 1, 4, 6, 5, 0,
348
};
349
350
extern const MCRegisterInfo::SubRegCoveredBits SystemZSubRegIdxRanges[] = {
351
  { 65535, 65535 },
352
  { 32, 32 }, // subreg_h32
353
  { 64, 64 }, // subreg_h64
354
  { 0, 32 },  // subreg_l32
355
  { 0, 64 },  // subreg_l64
356
  { 32, 32 }, // subreg_lh32
357
  { 0, 32 },  // subreg_ll32
358
};
359
360
361
#ifdef __GNUC__
362
#pragma GCC diagnostic push
363
#pragma GCC diagnostic ignored "-Woverlength-strings"
364
#endif
365
extern const char SystemZRegStrings[] = {
366
  /* 0 */ "A10\0"
367
  /* 4 */ "C10\0"
368
  /* 8 */ "V10\0"
369
  /* 12 */ "V20\0"
370
  /* 16 */ "V30\0"
371
  /* 20 */ "A0\0"
372
  /* 23 */ "C0\0"
373
  /* 26 */ "V0\0"
374
  /* 29 */ "A11\0"
375
  /* 33 */ "C11\0"
376
  /* 37 */ "V11\0"
377
  /* 41 */ "V21\0"
378
  /* 45 */ "V31\0"
379
  /* 49 */ "A1\0"
380
  /* 52 */ "C1\0"
381
  /* 55 */ "V1\0"
382
  /* 58 */ "A12\0"
383
  /* 62 */ "C12\0"
384
  /* 66 */ "V12\0"
385
  /* 70 */ "V22\0"
386
  /* 74 */ "A2\0"
387
  /* 77 */ "C2\0"
388
  /* 80 */ "V2\0"
389
  /* 83 */ "A13\0"
390
  /* 87 */ "C13\0"
391
  /* 91 */ "V13\0"
392
  /* 95 */ "V23\0"
393
  /* 99 */ "A3\0"
394
  /* 102 */ "C3\0"
395
  /* 105 */ "V3\0"
396
  /* 108 */ "A14\0"
397
  /* 112 */ "C14\0"
398
  /* 116 */ "V14\0"
399
  /* 120 */ "V24\0"
400
  /* 124 */ "A4\0"
401
  /* 127 */ "C4\0"
402
  /* 130 */ "V4\0"
403
  /* 133 */ "A15\0"
404
  /* 137 */ "C15\0"
405
  /* 141 */ "V15\0"
406
  /* 145 */ "V25\0"
407
  /* 149 */ "A5\0"
408
  /* 152 */ "C5\0"
409
  /* 155 */ "V5\0"
410
  /* 158 */ "V16\0"
411
  /* 162 */ "V26\0"
412
  /* 166 */ "A6\0"
413
  /* 169 */ "C6\0"
414
  /* 172 */ "V6\0"
415
  /* 175 */ "V17\0"
416
  /* 179 */ "V27\0"
417
  /* 183 */ "A7\0"
418
  /* 186 */ "C7\0"
419
  /* 189 */ "V7\0"
420
  /* 192 */ "V18\0"
421
  /* 196 */ "V28\0"
422
  /* 200 */ "A8\0"
423
  /* 203 */ "C8\0"
424
  /* 206 */ "V8\0"
425
  /* 209 */ "V19\0"
426
  /* 213 */ "V29\0"
427
  /* 217 */ "A9\0"
428
  /* 220 */ "C9\0"
429
  /* 223 */ "V9\0"
430
  /* 226 */ "CC\0"
431
  /* 229 */ "FPC\0"
432
  /* 233 */ "F10D\0"
433
  /* 238 */ "R10D\0"
434
  /* 243 */ "F20D\0"
435
  /* 248 */ "F30D\0"
436
  /* 253 */ "F0D\0"
437
  /* 257 */ "R0D\0"
438
  /* 261 */ "F11D\0"
439
  /* 266 */ "R11D\0"
440
  /* 271 */ "F21D\0"
441
  /* 276 */ "F31D\0"
442
  /* 281 */ "F1D\0"
443
  /* 285 */ "R1D\0"
444
  /* 289 */ "F12D\0"
445
  /* 294 */ "R12D\0"
446
  /* 299 */ "F22D\0"
447
  /* 304 */ "F2D\0"
448
  /* 308 */ "R2D\0"
449
  /* 312 */ "F13D\0"
450
  /* 317 */ "R13D\0"
451
  /* 322 */ "F23D\0"
452
  /* 327 */ "F3D\0"
453
  /* 331 */ "R3D\0"
454
  /* 335 */ "F14D\0"
455
  /* 340 */ "R14D\0"
456
  /* 345 */ "F24D\0"
457
  /* 350 */ "F4D\0"
458
  /* 354 */ "R4D\0"
459
  /* 358 */ "F15D\0"
460
  /* 363 */ "R15D\0"
461
  /* 368 */ "F25D\0"
462
  /* 373 */ "F5D\0"
463
  /* 377 */ "R5D\0"
464
  /* 381 */ "F16D\0"
465
  /* 386 */ "F26D\0"
466
  /* 391 */ "F6D\0"
467
  /* 395 */ "R6D\0"
468
  /* 399 */ "F17D\0"
469
  /* 404 */ "F27D\0"
470
  /* 409 */ "F7D\0"
471
  /* 413 */ "R7D\0"
472
  /* 417 */ "F18D\0"
473
  /* 422 */ "F28D\0"
474
  /* 427 */ "F8D\0"
475
  /* 431 */ "R8D\0"
476
  /* 435 */ "F19D\0"
477
  /* 440 */ "F29D\0"
478
  /* 445 */ "F9D\0"
479
  /* 449 */ "R9D\0"
480
  /* 453 */ "R10H\0"
481
  /* 458 */ "R0H\0"
482
  /* 462 */ "R11H\0"
483
  /* 467 */ "R1H\0"
484
  /* 471 */ "R12H\0"
485
  /* 476 */ "R2H\0"
486
  /* 480 */ "R13H\0"
487
  /* 485 */ "R3H\0"
488
  /* 489 */ "R14H\0"
489
  /* 494 */ "R4H\0"
490
  /* 498 */ "R15H\0"
491
  /* 503 */ "R5H\0"
492
  /* 507 */ "R6H\0"
493
  /* 511 */ "R7H\0"
494
  /* 515 */ "R8H\0"
495
  /* 519 */ "R9H\0"
496
  /* 523 */ "R10L\0"
497
  /* 528 */ "R0L\0"
498
  /* 532 */ "R11L\0"
499
  /* 537 */ "R1L\0"
500
  /* 541 */ "R12L\0"
501
  /* 546 */ "R2L\0"
502
  /* 550 */ "R13L\0"
503
  /* 555 */ "R3L\0"
504
  /* 559 */ "R14L\0"
505
  /* 564 */ "R4L\0"
506
  /* 568 */ "R15L\0"
507
  /* 573 */ "R5L\0"
508
  /* 577 */ "R6L\0"
509
  /* 581 */ "R7L\0"
510
  /* 585 */ "R8L\0"
511
  /* 589 */ "R9L\0"
512
  /* 593 */ "R10Q\0"
513
  /* 598 */ "F0Q\0"
514
  /* 602 */ "R0Q\0"
515
  /* 606 */ "F1Q\0"
516
  /* 610 */ "F12Q\0"
517
  /* 615 */ "R12Q\0"
518
  /* 620 */ "R2Q\0"
519
  /* 624 */ "F13Q\0"
520
  /* 629 */ "R14Q\0"
521
  /* 634 */ "F4Q\0"
522
  /* 638 */ "R4Q\0"
523
  /* 642 */ "F5Q\0"
524
  /* 646 */ "R6Q\0"
525
  /* 650 */ "F8Q\0"
526
  /* 654 */ "R8Q\0"
527
  /* 658 */ "F9Q\0"
528
  /* 662 */ "F10S\0"
529
  /* 667 */ "F20S\0"
530
  /* 672 */ "F30S\0"
531
  /* 677 */ "F0S\0"
532
  /* 681 */ "F11S\0"
533
  /* 686 */ "F21S\0"
534
  /* 691 */ "F31S\0"
535
  /* 696 */ "F1S\0"
536
  /* 700 */ "F12S\0"
537
  /* 705 */ "F22S\0"
538
  /* 710 */ "F2S\0"
539
  /* 714 */ "F13S\0"
540
  /* 719 */ "F23S\0"
541
  /* 724 */ "F3S\0"
542
  /* 728 */ "F14S\0"
543
  /* 733 */ "F24S\0"
544
  /* 738 */ "F4S\0"
545
  /* 742 */ "F15S\0"
546
  /* 747 */ "F25S\0"
547
  /* 752 */ "F5S\0"
548
  /* 756 */ "F16S\0"
549
  /* 761 */ "F26S\0"
550
  /* 766 */ "F6S\0"
551
  /* 770 */ "F17S\0"
552
  /* 775 */ "F27S\0"
553
  /* 780 */ "F7S\0"
554
  /* 784 */ "F18S\0"
555
  /* 789 */ "F28S\0"
556
  /* 794 */ "F8S\0"
557
  /* 798 */ "F19S\0"
558
  /* 803 */ "F29S\0"
559
  /* 808 */ "F9S\0"
560
};
561
#ifdef __GNUC__
562
#pragma GCC diagnostic pop
563
#endif
564
565
extern const MCRegisterDesc SystemZRegDesc[] = { // Descriptors
566
  { 3, 0, 0, 0, 0, 0 },
567
  { 226, 2, 2, 2, 8192, 11 },
568
  { 229, 2, 2, 2, 8193, 11 },
569
  { 20, 2, 2, 2, 8194, 11 },
570
  { 49, 2, 2, 2, 8195, 11 },
571
  { 74, 2, 2, 2, 8196, 11 },
572
  { 99, 2, 2, 2, 8197, 11 },
573
  { 124, 2, 2, 2, 8198, 11 },
574
  { 149, 2, 2, 2, 8199, 11 },
575
  { 166, 2, 2, 2, 8200, 11 },
576
  { 183, 2, 2, 2, 8201, 11 },
577
  { 200, 2, 2, 2, 8202, 11 },
578
  { 217, 2, 2, 2, 8203, 11 },
579
  { 0, 2, 2, 2, 8204, 11 },
580
  { 29, 2, 2, 2, 8205, 11 },
581
  { 58, 2, 2, 2, 8206, 11 },
582
  { 83, 2, 2, 2, 8207, 11 },
583
  { 108, 2, 2, 2, 8208, 11 },
584
  { 133, 2, 2, 2, 8209, 11 },
585
  { 23, 2, 2, 2, 8210, 11 },
586
  { 52, 2, 2, 2, 8211, 11 },
587
  { 77, 2, 2, 2, 8212, 11 },
588
  { 102, 2, 2, 2, 8213, 11 },
589
  { 127, 2, 2, 2, 8214, 11 },
590
  { 152, 2, 2, 2, 8215, 11 },
591
  { 169, 2, 2, 2, 8216, 11 },
592
  { 186, 2, 2, 2, 8217, 11 },
593
  { 203, 2, 2, 2, 8218, 11 },
594
  { 220, 2, 2, 2, 8219, 11 },
595
  { 4, 2, 2, 2, 8220, 11 },
596
  { 33, 2, 2, 2, 8221, 11 },
597
  { 62, 2, 2, 2, 8222, 11 },
598
  { 87, 2, 2, 2, 8223, 11 },
599
  { 112, 2, 2, 2, 8224, 11 },
600
  { 137, 2, 2, 2, 8225, 11 },
601
  { 26, 91, 2, 0, 8226, 1 },
602
  { 55, 91, 2, 0, 8227, 1 },
603
  { 80, 91, 2, 0, 8228, 1 },
604
  { 105, 91, 2, 0, 8229, 1 },
605
  { 130, 91, 2, 0, 8230, 1 },
606
  { 155, 91, 2, 0, 8231, 1 },
607
  { 172, 91, 2, 0, 8232, 1 },
608
  { 189, 91, 2, 0, 8233, 1 },
609
  { 206, 91, 2, 0, 8234, 1 },
610
  { 223, 91, 2, 0, 8235, 1 },
611
  { 8, 91, 2, 0, 8236, 1 },
612
  { 37, 91, 2, 0, 8237, 1 },
613
  { 66, 91, 2, 0, 8238, 1 },
614
  { 91, 91, 2, 0, 8239, 1 },
615
  { 116, 91, 2, 0, 8240, 1 },
616
  { 141, 91, 2, 0, 8241, 1 },
617
  { 158, 91, 2, 0, 8242, 1 },
618
  { 175, 91, 2, 0, 8243, 1 },
619
  { 192, 91, 2, 0, 8244, 1 },
620
  { 209, 91, 2, 0, 8245, 1 },
621
  { 12, 91, 2, 0, 8246, 1 },
622
  { 41, 91, 2, 0, 8247, 1 },
623
  { 70, 91, 2, 0, 8248, 1 },
624
  { 95, 91, 2, 0, 8249, 1 },
625
  { 120, 91, 2, 0, 8250, 1 },
626
  { 145, 91, 2, 0, 8251, 1 },
627
  { 162, 91, 2, 0, 8252, 1 },
628
  { 179, 91, 2, 0, 8253, 1 },
629
  { 196, 91, 2, 0, 8254, 1 },
630
  { 213, 91, 2, 0, 8255, 1 },
631
  { 16, 91, 2, 0, 8256, 1 },
632
  { 45, 91, 2, 0, 8257, 1 },
633
  { 253, 68, 159, 1, 8226, 1 },
634
  { 281, 68, 159, 1, 8227, 1 },
635
  { 304, 68, 155, 1, 8228, 1 },
636
  { 327, 68, 155, 1, 8229, 1 },
637
  { 350, 68, 155, 1, 8230, 1 },
638
  { 373, 68, 155, 1, 8231, 1 },
639
  { 391, 68, 151, 1, 8232, 1 },
640
  { 409, 68, 151, 1, 8233, 1 },
641
  { 427, 68, 151, 1, 8234, 1 },
642
  { 445, 68, 151, 1, 8235, 1 },
643
  { 233, 68, 147, 1, 8236, 1 },
644
  { 261, 68, 147, 1, 8237, 1 },
645
  { 289, 68, 147, 1, 8238, 1 },
646
  { 312, 68, 147, 1, 8239, 1 },
647
  { 335, 68, 143, 1, 8240, 1 },
648
  { 358, 68, 143, 1, 8241, 1 },
649
  { 381, 68, 1, 1, 8242, 1 },
650
  { 399, 68, 1, 1, 8243, 1 },
651
  { 417, 68, 1, 1, 8244, 1 },
652
  { 435, 68, 1, 1, 8245, 1 },
653
  { 243, 68, 1, 1, 8246, 1 },
654
  { 271, 68, 1, 1, 8247, 1 },
655
  { 299, 68, 1, 1, 8248, 1 },
656
  { 322, 68, 1, 1, 8249, 1 },
657
  { 345, 68, 1, 1, 8250, 1 },
658
  { 368, 68, 1, 1, 8251, 1 },
659
  { 386, 68, 1, 1, 8252, 1 },
660
  { 404, 68, 1, 1, 8253, 1 },
661
  { 422, 68, 1, 1, 8254, 1 },
662
  { 440, 68, 1, 1, 8255, 1 },
663
  { 248, 68, 1, 1, 8256, 1 },
664
  { 276, 68, 1, 1, 8257, 1 },
665
  { 598, 65, 2, 6, 258082, 3 },
666
  { 606, 65, 2, 6, 258083, 3 },
667
  { 634, 70, 2, 6, 258086, 3 },
668
  { 642, 70, 2, 6, 258087, 3 },
669
  { 650, 75, 2, 6, 258090, 3 },
670
  { 658, 75, 2, 6, 258091, 3 },
671
  { 610, 80, 2, 6, 258094, 3 },
672
  { 624, 80, 2, 6, 258095, 3 },
673
  { 677, 2, 158, 2, 8226, 11 },
674
  { 696, 2, 158, 2, 8227, 11 },
675
  { 710, 2, 154, 2, 8228, 11 },
676
  { 724, 2, 154, 2, 8229, 11 },
677
  { 738, 2, 154, 2, 8230, 11 },
678
  { 752, 2, 154, 2, 8231, 11 },
679
  { 766, 2, 150, 2, 8232, 11 },
680
  { 780, 2, 150, 2, 8233, 11 },
681
  { 794, 2, 150, 2, 8234, 11 },
682
  { 808, 2, 150, 2, 8235, 11 },
683
  { 662, 2, 146, 2, 8236, 11 },
684
  { 681, 2, 146, 2, 8237, 11 },
685
  { 700, 2, 146, 2, 8238, 11 },
686
  { 714, 2, 146, 2, 8239, 11 },
687
  { 728, 2, 142, 2, 8240, 11 },
688
  { 742, 2, 142, 2, 8241, 11 },
689
  { 756, 2, 0, 2, 8242, 11 },
690
  { 770, 2, 0, 2, 8243, 11 },
691
  { 784, 2, 0, 2, 8244, 11 },
692
  { 798, 2, 0, 2, 8245, 11 },
693
  { 667, 2, 0, 2, 8246, 11 },
694
  { 686, 2, 0, 2, 8247, 11 },
695
  { 705, 2, 0, 2, 8248, 11 },
696
  { 719, 2, 0, 2, 8249, 11 },
697
  { 733, 2, 0, 2, 8250, 11 },
698
  { 747, 2, 0, 2, 8251, 11 },
699
  { 761, 2, 0, 2, 8252, 11 },
700
  { 775, 2, 0, 2, 8253, 11 },
701
  { 789, 2, 0, 2, 8254, 11 },
702
  { 803, 2, 0, 2, 8255, 11 },
703
  { 672, 2, 0, 2, 8256, 11 },
704
  { 691, 2, 0, 2, 8257, 11 },
705
  { 257, 7, 137, 3, 249922, 0 },
706
  { 285, 7, 131, 3, 249924, 0 },
707
  { 308, 7, 131, 3, 249926, 0 },
708
  { 331, 7, 125, 3, 249928, 0 },
709
  { 354, 7, 125, 3, 249930, 0 },
710
  { 377, 7, 119, 3, 249932, 0 },
711
  { 395, 7, 119, 3, 249934, 0 },
712
  { 413, 7, 113, 3, 249936, 0 },
713
  { 431, 7, 113, 3, 249938, 0 },
714
  { 449, 7, 107, 3, 249940, 0 },
715
  { 238, 7, 107, 3, 249942, 0 },
716
  { 266, 7, 101, 3, 249944, 0 },
717
  { 294, 7, 101, 3, 249946, 0 },
718
  { 317, 7, 95, 3, 249948, 0 },
719
  { 340, 7, 95, 3, 249950, 0 },
720
  { 363, 7, 68, 3, 249952, 0 },
721
  { 458, 2, 139, 2, 8259, 11 },
722
  { 467, 2, 133, 2, 8261, 11 },
723
  { 476, 2, 133, 2, 8263, 11 },
724
  { 485, 2, 127, 2, 8265, 11 },
725
  { 494, 2, 127, 2, 8267, 11 },
726
  { 503, 2, 121, 2, 8269, 11 },
727
  { 507, 2, 121, 2, 8271, 11 },
728
  { 511, 2, 115, 2, 8273, 11 },
729
  { 515, 2, 115, 2, 8275, 11 },
730
  { 519, 2, 109, 2, 8277, 11 },
731
  { 453, 2, 109, 2, 8279, 11 },
732
  { 462, 2, 103, 2, 8281, 11 },
733
  { 471, 2, 103, 2, 8283, 11 },
734
  { 480, 2, 97, 2, 8285, 11 },
735
  { 489, 2, 97, 2, 8287, 11 },
736
  { 498, 2, 88, 2, 8289, 11 },
737
  { 528, 2, 136, 2, 8258, 11 },
738
  { 537, 2, 130, 2, 8260, 11 },
739
  { 546, 2, 130, 2, 8262, 11 },
740
  { 555, 2, 124, 2, 8264, 11 },
741
  { 564, 2, 124, 2, 8266, 11 },
742
  { 573, 2, 118, 2, 8268, 11 },
743
  { 577, 2, 118, 2, 8270, 11 },
744
  { 581, 2, 112, 2, 8272, 11 },
745
  { 585, 2, 112, 2, 8274, 11 },
746
  { 589, 2, 106, 2, 8276, 11 },
747
  { 523, 2, 106, 2, 8278, 11 },
748
  { 532, 2, 100, 2, 8280, 11 },
749
  { 541, 2, 100, 2, 8282, 11 },
750
  { 550, 2, 94, 2, 8284, 11 },
751
  { 559, 2, 94, 2, 8286, 11 },
752
  { 568, 2, 85, 2, 8288, 11 },
753
  { 602, 3, 2, 11, 241730, 6 },
754
  { 620, 10, 2, 11, 241734, 6 },
755
  { 638, 17, 2, 11, 241738, 6 },
756
  { 646, 24, 2, 11, 241742, 6 },
757
  { 654, 31, 2, 11, 241746, 6 },
758
  { 593, 38, 2, 11, 241750, 6 },
759
  { 615, 45, 2, 11, 241754, 6 },
760
  { 629, 52, 2, 11, 241758, 6 },
761
};
762
763
extern const MCPhysReg SystemZRegUnitRoots[][2] = {
764
  { SystemZ::CC },
765
  { SystemZ::FPC },
766
  { SystemZ::A0 },
767
  { SystemZ::A1 },
768
  { SystemZ::A2 },
769
  { SystemZ::A3 },
770
  { SystemZ::A4 },
771
  { SystemZ::A5 },
772
  { SystemZ::A6 },
773
  { SystemZ::A7 },
774
  { SystemZ::A8 },
775
  { SystemZ::A9 },
776
  { SystemZ::A10 },
777
  { SystemZ::A11 },
778
  { SystemZ::A12 },
779
  { SystemZ::A13 },
780
  { SystemZ::A14 },
781
  { SystemZ::A15 },
782
  { SystemZ::C0 },
783
  { SystemZ::C1 },
784
  { SystemZ::C2 },
785
  { SystemZ::C3 },
786
  { SystemZ::C4 },
787
  { SystemZ::C5 },
788
  { SystemZ::C6 },
789
  { SystemZ::C7 },
790
  { SystemZ::C8 },
791
  { SystemZ::C9 },
792
  { SystemZ::C10 },
793
  { SystemZ::C11 },
794
  { SystemZ::C12 },
795
  { SystemZ::C13 },
796
  { SystemZ::C14 },
797
  { SystemZ::C15 },
798
  { SystemZ::F0S },
799
  { SystemZ::F1S },
800
  { SystemZ::F2S },
801
  { SystemZ::F3S },
802
  { SystemZ::F4S },
803
  { SystemZ::F5S },
804
  { SystemZ::F6S },
805
  { SystemZ::F7S },
806
  { SystemZ::F8S },
807
  { SystemZ::F9S },
808
  { SystemZ::F10S },
809
  { SystemZ::F11S },
810
  { SystemZ::F12S },
811
  { SystemZ::F13S },
812
  { SystemZ::F14S },
813
  { SystemZ::F15S },
814
  { SystemZ::F16S },
815
  { SystemZ::F17S },
816
  { SystemZ::F18S },
817
  { SystemZ::F19S },
818
  { SystemZ::F20S },
819
  { SystemZ::F21S },
820
  { SystemZ::F22S },
821
  { SystemZ::F23S },
822
  { SystemZ::F24S },
823
  { SystemZ::F25S },
824
  { SystemZ::F26S },
825
  { SystemZ::F27S },
826
  { SystemZ::F28S },
827
  { SystemZ::F29S },
828
  { SystemZ::F30S },
829
  { SystemZ::F31S },
830
  { SystemZ::R0L },
831
  { SystemZ::R0H },
832
  { SystemZ::R1L },
833
  { SystemZ::R1H },
834
  { SystemZ::R2L },
835
  { SystemZ::R2H },
836
  { SystemZ::R3L },
837
  { SystemZ::R3H },
838
  { SystemZ::R4L },
839
  { SystemZ::R4H },
840
  { SystemZ::R5L },
841
  { SystemZ::R5H },
842
  { SystemZ::R6L },
843
  { SystemZ::R6H },
844
  { SystemZ::R7L },
845
  { SystemZ::R7H },
846
  { SystemZ::R8L },
847
  { SystemZ::R8H },
848
  { SystemZ::R9L },
849
  { SystemZ::R9H },
850
  { SystemZ::R10L },
851
  { SystemZ::R10H },
852
  { SystemZ::R11L },
853
  { SystemZ::R11H },
854
  { SystemZ::R12L },
855
  { SystemZ::R12H },
856
  { SystemZ::R13L },
857
  { SystemZ::R13H },
858
  { SystemZ::R14L },
859
  { SystemZ::R14H },
860
  { SystemZ::R15L },
861
  { SystemZ::R15H },
862
};
863
864
namespace {     // Register classes...
865
  // GRX32Bit Register Class...
866
  const MCPhysReg GRX32Bit[] = {
867
    SystemZ::R0L, SystemZ::R1L, SystemZ::R2L, SystemZ::R3L, SystemZ::R4L, SystemZ::R5L, SystemZ::R0H, SystemZ::R1H, SystemZ::R2H, SystemZ::R3H, SystemZ::R4H, SystemZ::R5H, SystemZ::R15L, SystemZ::R15H, SystemZ::R14L, SystemZ::R14H, SystemZ::R13L, SystemZ::R13H, SystemZ::R12L, SystemZ::R12H, SystemZ::R11L, SystemZ::R11H, SystemZ::R10L, SystemZ::R10H, SystemZ::R9L, SystemZ::R9H, SystemZ::R8L, SystemZ::R8H, SystemZ::R7L, SystemZ::R7H, SystemZ::R6L, SystemZ::R6H, 
868
  };
869
870
  // GRX32Bit Bit set.
871
  const uint8_t GRX32BitBits[] = {
872
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0xff, 0xff, 0x07, 
873
  };
874
875
  // VR32Bit Register Class...
876
  const MCPhysReg VR32Bit[] = {
877
    SystemZ::F0S, SystemZ::F1S, SystemZ::F2S, SystemZ::F3S, SystemZ::F4S, SystemZ::F5S, SystemZ::F6S, SystemZ::F7S, SystemZ::F16S, SystemZ::F17S, SystemZ::F18S, SystemZ::F19S, SystemZ::F20S, SystemZ::F21S, SystemZ::F22S, SystemZ::F23S, SystemZ::F24S, SystemZ::F25S, SystemZ::F26S, SystemZ::F27S, SystemZ::F28S, SystemZ::F29S, SystemZ::F30S, SystemZ::F31S, SystemZ::F8S, SystemZ::F9S, SystemZ::F10S, SystemZ::F11S, SystemZ::F12S, SystemZ::F13S, SystemZ::F14S, SystemZ::F15S, 
878
  };
879
880
  // VR32Bit Bit set.
881
  const uint8_t VR32BitBits[] = {
882
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0xff, 0xff, 0x07, 
883
  };
884
885
  // AR32Bit Register Class...
886
  const MCPhysReg AR32Bit[] = {
887
    SystemZ::A0, SystemZ::A1, SystemZ::A2, SystemZ::A3, SystemZ::A4, SystemZ::A5, SystemZ::A6, SystemZ::A7, SystemZ::A8, SystemZ::A9, SystemZ::A10, SystemZ::A11, SystemZ::A12, SystemZ::A13, SystemZ::A14, SystemZ::A15, 
888
  };
889
890
  // AR32Bit Bit set.
891
  const uint8_t AR32BitBits[] = {
892
    0xf8, 0xff, 0x07, 
893
  };
894
895
  // FP32Bit Register Class...
896
  const MCPhysReg FP32Bit[] = {
897
    SystemZ::F0S, SystemZ::F1S, SystemZ::F2S, SystemZ::F3S, SystemZ::F4S, SystemZ::F5S, SystemZ::F6S, SystemZ::F7S, SystemZ::F8S, SystemZ::F9S, SystemZ::F10S, SystemZ::F11S, SystemZ::F12S, SystemZ::F13S, SystemZ::F14S, SystemZ::F15S, 
898
  };
899
900
  // FP32Bit Bit set.
901
  const uint8_t FP32BitBits[] = {
902
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0x07, 
903
  };
904
905
  // GR32Bit Register Class...
906
  const MCPhysReg GR32Bit[] = {
907
    SystemZ::R0L, SystemZ::R1L, SystemZ::R2L, SystemZ::R3L, SystemZ::R4L, SystemZ::R5L, SystemZ::R15L, SystemZ::R14L, SystemZ::R13L, SystemZ::R12L, SystemZ::R11L, SystemZ::R10L, SystemZ::R9L, SystemZ::R8L, SystemZ::R7L, SystemZ::R6L, 
908
  };
909
910
  // GR32Bit Bit set.
911
  const uint8_t GR32BitBits[] = {
912
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0x07, 
913
  };
914
915
  // GRH32Bit Register Class...
916
  const MCPhysReg GRH32Bit[] = {
917
    SystemZ::R0H, SystemZ::R1H, SystemZ::R2H, SystemZ::R3H, SystemZ::R4H, SystemZ::R5H, SystemZ::R15H, SystemZ::R14H, SystemZ::R13H, SystemZ::R12H, SystemZ::R11H, SystemZ::R10H, SystemZ::R9H, SystemZ::R8H, SystemZ::R7H, SystemZ::R6H, 
918
  };
919
920
  // GRH32Bit Bit set.
921
  const uint8_t GRH32BitBits[] = {
922
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0x07, 
923
  };
924
925
  // ADDR32Bit Register Class...
926
  const MCPhysReg ADDR32Bit[] = {
927
    SystemZ::R1L, SystemZ::R2L, SystemZ::R3L, SystemZ::R4L, SystemZ::R5L, SystemZ::R15L, SystemZ::R14L, SystemZ::R13L, SystemZ::R12L, SystemZ::R11L, SystemZ::R10L, SystemZ::R9L, SystemZ::R8L, SystemZ::R7L, SystemZ::R6L, 
928
  };
929
930
  // ADDR32Bit Bit set.
931
  const uint8_t ADDR32BitBits[] = {
932
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x07, 
933
  };
934
935
  // CCR Register Class...
936
  const MCPhysReg CCR[] = {
937
    SystemZ::CC, 
938
  };
939
940
  // CCR Bit set.
941
  const uint8_t CCRBits[] = {
942
    0x02, 
943
  };
944
945
  // FPCRegs Register Class...
946
  const MCPhysReg FPCRegs[] = {
947
    SystemZ::FPC, 
948
  };
949
950
  // FPCRegs Bit set.
951
  const uint8_t FPCRegsBits[] = {
952
    0x04, 
953
  };
954
955
  // AnyRegBit Register Class...
956
  const MCPhysReg AnyRegBit[] = {
957
    SystemZ::R0D, SystemZ::R1D, SystemZ::R2D, SystemZ::R3D, SystemZ::R4D, SystemZ::R5D, SystemZ::R6D, SystemZ::R7D, SystemZ::R8D, SystemZ::R9D, SystemZ::R10D, SystemZ::R11D, SystemZ::R12D, SystemZ::R13D, SystemZ::R14D, SystemZ::R15D, SystemZ::F0D, SystemZ::F1D, SystemZ::F2D, SystemZ::F3D, SystemZ::F4D, SystemZ::F5D, SystemZ::F6D, SystemZ::F7D, SystemZ::F8D, SystemZ::F9D, SystemZ::F10D, SystemZ::F11D, SystemZ::F12D, SystemZ::F13D, SystemZ::F14D, SystemZ::F15D, SystemZ::V0, SystemZ::V1, SystemZ::V2, SystemZ::V3, SystemZ::V4, SystemZ::V5, SystemZ::V6, SystemZ::V7, SystemZ::V8, SystemZ::V9, SystemZ::V10, SystemZ::V11, SystemZ::V12, SystemZ::V13, SystemZ::V14, SystemZ::V15, 
958
  };
959
960
  // AnyRegBit Bit set.
961
  const uint8_t AnyRegBitBits[] = {
962
    0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0x07, 0x00, 0xf8, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0x07, 
963
  };
964
965
  // AnyRegBit_with_subreg_h32_in_FP32Bit Register Class...
966
  const MCPhysReg AnyRegBit_with_subreg_h32_in_FP32Bit[] = {
967
    SystemZ::F0D, SystemZ::F1D, SystemZ::F2D, SystemZ::F3D, SystemZ::F4D, SystemZ::F5D, SystemZ::F6D, SystemZ::F7D, SystemZ::F8D, SystemZ::F9D, SystemZ::F10D, SystemZ::F11D, SystemZ::F12D, SystemZ::F13D, SystemZ::F14D, SystemZ::F15D, SystemZ::V0, SystemZ::V1, SystemZ::V2, SystemZ::V3, SystemZ::V4, SystemZ::V5, SystemZ::V6, SystemZ::V7, SystemZ::V8, SystemZ::V9, SystemZ::V10, SystemZ::V11, SystemZ::V12, SystemZ::V13, SystemZ::V14, SystemZ::V15, 
968
  };
969
970
  // AnyRegBit_with_subreg_h32_in_FP32Bit Bit set.
971
  const uint8_t AnyRegBit_with_subreg_h32_in_FP32BitBits[] = {
972
    0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0x07, 0x00, 0xf8, 0xff, 0x07, 
973
  };
974
975
  // VR64Bit Register Class...
976
  const MCPhysReg VR64Bit[] = {
977
    SystemZ::F0D, SystemZ::F1D, SystemZ::F2D, SystemZ::F3D, SystemZ::F4D, SystemZ::F5D, SystemZ::F6D, SystemZ::F7D, SystemZ::F16D, SystemZ::F17D, SystemZ::F18D, SystemZ::F19D, SystemZ::F20D, SystemZ::F21D, SystemZ::F22D, SystemZ::F23D, SystemZ::F24D, SystemZ::F25D, SystemZ::F26D, SystemZ::F27D, SystemZ::F28D, SystemZ::F29D, SystemZ::F30D, SystemZ::F31D, SystemZ::F8D, SystemZ::F9D, SystemZ::F10D, SystemZ::F11D, SystemZ::F12D, SystemZ::F13D, SystemZ::F14D, SystemZ::F15D, 
978
  };
979
980
  // VR64Bit Bit set.
981
  const uint8_t VR64BitBits[] = {
982
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0xff, 0xff, 0x07, 
983
  };
984
985
  // AnyRegBit_with_subreg_h64 Register Class...
986
  const MCPhysReg AnyRegBit_with_subreg_h64[] = {
987
    SystemZ::V0, SystemZ::V1, SystemZ::V2, SystemZ::V3, SystemZ::V4, SystemZ::V5, SystemZ::V6, SystemZ::V7, SystemZ::V8, SystemZ::V9, SystemZ::V10, SystemZ::V11, SystemZ::V12, SystemZ::V13, SystemZ::V14, SystemZ::V15, 
988
  };
989
990
  // AnyRegBit_with_subreg_h64 Bit set.
991
  const uint8_t AnyRegBit_with_subreg_h64Bits[] = {
992
    0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0x07, 
993
  };
994
995
  // CR64Bit Register Class...
996
  const MCPhysReg CR64Bit[] = {
997
    SystemZ::C0, SystemZ::C1, SystemZ::C2, SystemZ::C3, SystemZ::C4, SystemZ::C5, SystemZ::C6, SystemZ::C7, SystemZ::C8, SystemZ::C9, SystemZ::C10, SystemZ::C11, SystemZ::C12, SystemZ::C13, SystemZ::C14, SystemZ::C15, 
998
  };
999
1000
  // CR64Bit Bit set.
1001
  const uint8_t CR64BitBits[] = {
1002
    0x00, 0x00, 0xf8, 0xff, 0x07, 
1003
  };
1004
1005
  // FP64Bit Register Class...
1006
  const MCPhysReg FP64Bit[] = {
1007
    SystemZ::F0D, SystemZ::F1D, SystemZ::F2D, SystemZ::F3D, SystemZ::F4D, SystemZ::F5D, SystemZ::F6D, SystemZ::F7D, SystemZ::F8D, SystemZ::F9D, SystemZ::F10D, SystemZ::F11D, SystemZ::F12D, SystemZ::F13D, SystemZ::F14D, SystemZ::F15D, 
1008
  };
1009
1010
  // FP64Bit Bit set.
1011
  const uint8_t FP64BitBits[] = {
1012
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0x07, 
1013
  };
1014
1015
  // GR64Bit Register Class...
1016
  const MCPhysReg GR64Bit[] = {
1017
    SystemZ::R0D, SystemZ::R1D, SystemZ::R2D, SystemZ::R3D, SystemZ::R4D, SystemZ::R5D, SystemZ::R15D, SystemZ::R14D, SystemZ::R13D, SystemZ::R12D, SystemZ::R11D, SystemZ::R10D, SystemZ::R9D, SystemZ::R8D, SystemZ::R7D, SystemZ::R6D, 
1018
  };
1019
1020
  // GR64Bit Bit set.
1021
  const uint8_t GR64BitBits[] = {
1022
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0x07, 
1023
  };
1024
1025
  // ADDR64Bit Register Class...
1026
  const MCPhysReg ADDR64Bit[] = {
1027
    SystemZ::R1D, SystemZ::R2D, SystemZ::R3D, SystemZ::R4D, SystemZ::R5D, SystemZ::R15D, SystemZ::R14D, SystemZ::R13D, SystemZ::R12D, SystemZ::R11D, SystemZ::R10D, SystemZ::R9D, SystemZ::R8D, SystemZ::R7D, SystemZ::R6D, 
1028
  };
1029
1030
  // ADDR64Bit Bit set.
1031
  const uint8_t ADDR64BitBits[] = {
1032
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x07, 
1033
  };
1034
1035
  // VR128Bit Register Class...
1036
  const MCPhysReg VR128Bit[] = {
1037
    SystemZ::V0, SystemZ::V1, SystemZ::V2, SystemZ::V3, SystemZ::V4, SystemZ::V5, SystemZ::V6, SystemZ::V7, SystemZ::V16, SystemZ::V17, SystemZ::V18, SystemZ::V19, SystemZ::V20, SystemZ::V21, SystemZ::V22, SystemZ::V23, SystemZ::V24, SystemZ::V25, SystemZ::V26, SystemZ::V27, SystemZ::V28, SystemZ::V29, SystemZ::V30, SystemZ::V31, SystemZ::V8, SystemZ::V9, SystemZ::V10, SystemZ::V11, SystemZ::V12, SystemZ::V13, SystemZ::V14, SystemZ::V15, 
1038
  };
1039
1040
  // VR128Bit Bit set.
1041
  const uint8_t VR128BitBits[] = {
1042
    0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0xff, 0xff, 0x07, 
1043
  };
1044
1045
  // VF128Bit Register Class...
1046
  const MCPhysReg VF128Bit[] = {
1047
    SystemZ::V0, SystemZ::V1, SystemZ::V2, SystemZ::V3, SystemZ::V4, SystemZ::V5, SystemZ::V6, SystemZ::V7, SystemZ::V8, SystemZ::V9, SystemZ::V10, SystemZ::V11, SystemZ::V12, SystemZ::V13, SystemZ::V14, SystemZ::V15, 
1048
  };
1049
1050
  // VF128Bit Bit set.
1051
  const uint8_t VF128BitBits[] = {
1052
    0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0x07, 
1053
  };
1054
1055
  // FP128Bit Register Class...
1056
  const MCPhysReg FP128Bit[] = {
1057
    SystemZ::F0Q, SystemZ::F1Q, SystemZ::F4Q, SystemZ::F5Q, SystemZ::F8Q, SystemZ::F9Q, SystemZ::F12Q, SystemZ::F13Q, 
1058
  };
1059
1060
  // FP128Bit Bit set.
1061
  const uint8_t FP128BitBits[] = {
1062
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x07, 
1063
  };
1064
1065
  // GR128Bit Register Class...
1066
  const MCPhysReg GR128Bit[] = {
1067
    SystemZ::R0Q, SystemZ::R2Q, SystemZ::R4Q, SystemZ::R12Q, SystemZ::R10Q, SystemZ::R8Q, SystemZ::R6Q, SystemZ::R14Q, 
1068
  };
1069
1070
  // GR128Bit Bit set.
1071
  const uint8_t GR128BitBits[] = {
1072
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x07, 
1073
  };
1074
1075
  // ADDR128Bit Register Class...
1076
  const MCPhysReg ADDR128Bit[] = {
1077
    SystemZ::R2Q, SystemZ::R4Q, SystemZ::R12Q, SystemZ::R10Q, SystemZ::R8Q, SystemZ::R6Q, SystemZ::R14Q, 
1078
  };
1079
1080
  // ADDR128Bit Bit set.
1081
  const uint8_t ADDR128BitBits[] = {
1082
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x07, 
1083
  };
1084
1085
} // end anonymous namespace
1086
1087
1088
#ifdef __GNUC__
1089
#pragma GCC diagnostic push
1090
#pragma GCC diagnostic ignored "-Woverlength-strings"
1091
#endif
1092
extern const char SystemZRegClassStrings[] = {
1093
  /* 0 */ "AnyRegBit_with_subreg_h64\0"
1094
  /* 26 */ "CCR\0"
1095
  /* 30 */ "FPCRegs\0"
1096
  /* 38 */ "GRH32Bit\0"
1097
  /* 47 */ "AnyRegBit_with_subreg_h32_in_FP32Bit\0"
1098
  /* 84 */ "AR32Bit\0"
1099
  /* 92 */ "ADDR32Bit\0"
1100
  /* 102 */ "GR32Bit\0"
1101
  /* 110 */ "VR32Bit\0"
1102
  /* 118 */ "GRX32Bit\0"
1103
  /* 127 */ "FP64Bit\0"
1104
  /* 135 */ "CR64Bit\0"
1105
  /* 143 */ "ADDR64Bit\0"
1106
  /* 153 */ "GR64Bit\0"
1107
  /* 161 */ "VR64Bit\0"
1108
  /* 169 */ "VF128Bit\0"
1109
  /* 178 */ "FP128Bit\0"
1110
  /* 187 */ "ADDR128Bit\0"
1111
  /* 198 */ "GR128Bit\0"
1112
  /* 207 */ "VR128Bit\0"
1113
  /* 216 */ "AnyRegBit\0"
1114
};
1115
#ifdef __GNUC__
1116
#pragma GCC diagnostic pop
1117
#endif
1118
1119
extern const MCRegisterClass SystemZMCRegisterClasses[] = {
1120
  { GRX32Bit, GRX32BitBits, 118, 32, sizeof(GRX32BitBits), SystemZ::GRX32BitRegClassID, 32, 1, true },
1121
  { VR32Bit, VR32BitBits, 110, 32, sizeof(VR32BitBits), SystemZ::VR32BitRegClassID, 32, 1, true },
1122
  { AR32Bit, AR32BitBits, 84, 16, sizeof(AR32BitBits), SystemZ::AR32BitRegClassID, 32, 1, false },
1123
  { FP32Bit, FP32BitBits, 76, 16, sizeof(FP32BitBits), SystemZ::FP32BitRegClassID, 32, 1, true },
1124
  { GR32Bit, GR32BitBits, 102, 16, sizeof(GR32BitBits), SystemZ::GR32BitRegClassID, 32, 1, true },
1125
  { GRH32Bit, GRH32BitBits, 38, 16, sizeof(GRH32BitBits), SystemZ::GRH32BitRegClassID, 32, 1, true },
1126
  { ADDR32Bit, ADDR32BitBits, 92, 15, sizeof(ADDR32BitBits), SystemZ::ADDR32BitRegClassID, 32, 1, true },
1127
  { CCR, CCRBits, 26, 1, sizeof(CCRBits), SystemZ::CCRRegClassID, 32, -1, false },
1128
  { FPCRegs, FPCRegsBits, 30, 1, sizeof(FPCRegsBits), SystemZ::FPCRegsRegClassID, 32, 1, false },
1129
  { AnyRegBit, AnyRegBitBits, 216, 48, sizeof(AnyRegBitBits), SystemZ::AnyRegBitRegClassID, 64, 1, false },
1130
  { AnyRegBit_with_subreg_h32_in_FP32Bit, AnyRegBit_with_subreg_h32_in_FP32BitBits, 47, 32, sizeof(AnyRegBit_with_subreg_h32_in_FP32BitBits), SystemZ::AnyRegBit_with_subreg_h32_in_FP32BitRegClassID, 64, 1, false },
1131
  { VR64Bit, VR64BitBits, 161, 32, sizeof(VR64BitBits), SystemZ::VR64BitRegClassID, 64, 1, true },
1132
  { AnyRegBit_with_subreg_h64, AnyRegBit_with_subreg_h64Bits, 0, 16, sizeof(AnyRegBit_with_subreg_h64Bits), SystemZ::AnyRegBit_with_subreg_h64RegClassID, 64, 1, false },
1133
  { CR64Bit, CR64BitBits, 135, 16, sizeof(CR64BitBits), SystemZ::CR64BitRegClassID, 64, 1, false },
1134
  { FP64Bit, FP64BitBits, 127, 16, sizeof(FP64BitBits), SystemZ::FP64BitRegClassID, 64, 1, true },
1135
  { GR64Bit, GR64BitBits, 153, 16, sizeof(GR64BitBits), SystemZ::GR64BitRegClassID, 64, 1, true },
1136
  { ADDR64Bit, ADDR64BitBits, 143, 15, sizeof(ADDR64BitBits), SystemZ::ADDR64BitRegClassID, 64, 1, true },
1137
  { VR128Bit, VR128BitBits, 207, 32, sizeof(VR128BitBits), SystemZ::VR128BitRegClassID, 128, 1, true },
1138
  { VF128Bit, VF128BitBits, 169, 16, sizeof(VF128BitBits), SystemZ::VF128BitRegClassID, 128, 1, true },
1139
  { FP128Bit, FP128BitBits, 178, 8, sizeof(FP128BitBits), SystemZ::FP128BitRegClassID, 128, 1, true },
1140
  { GR128Bit, GR128BitBits, 198, 8, sizeof(GR128BitBits), SystemZ::GR128BitRegClassID, 128, 1, true },
1141
  { ADDR128Bit, ADDR128BitBits, 187, 7, sizeof(ADDR128BitBits), SystemZ::ADDR128BitRegClassID, 128, 1, true },
1142
};
1143
1144
// SystemZ Dwarf<->LLVM register mappings.
1145
extern const MCRegisterInfo::DwarfLLVMRegPair SystemZDwarfFlavour0Dwarf2L[] = {
1146
  { 0U, SystemZ::R0D },
1147
  { 1U, SystemZ::R1D },
1148
  { 2U, SystemZ::R2D },
1149
  { 3U, SystemZ::R3D },
1150
  { 4U, SystemZ::R4D },
1151
  { 5U, SystemZ::R5D },
1152
  { 6U, SystemZ::R6D },
1153
  { 7U, SystemZ::R7D },
1154
  { 8U, SystemZ::R8D },
1155
  { 9U, SystemZ::R9D },
1156
  { 10U, SystemZ::R10D },
1157
  { 11U, SystemZ::R11D },
1158
  { 12U, SystemZ::R12D },
1159
  { 13U, SystemZ::R13D },
1160
  { 14U, SystemZ::R14D },
1161
  { 15U, SystemZ::R15D },
1162
  { 16U, SystemZ::F0D },
1163
  { 17U, SystemZ::F2D },
1164
  { 18U, SystemZ::F4D },
1165
  { 19U, SystemZ::F6D },
1166
  { 20U, SystemZ::F1D },
1167
  { 21U, SystemZ::F3D },
1168
  { 22U, SystemZ::F5D },
1169
  { 23U, SystemZ::F7D },
1170
  { 24U, SystemZ::F8D },
1171
  { 25U, SystemZ::F10D },
1172
  { 26U, SystemZ::F12D },
1173
  { 27U, SystemZ::F14D },
1174
  { 28U, SystemZ::F9D },
1175
  { 29U, SystemZ::F11D },
1176
  { 30U, SystemZ::F13D },
1177
  { 31U, SystemZ::F15D },
1178
  { 32U, SystemZ::C0 },
1179
  { 33U, SystemZ::C1 },
1180
  { 34U, SystemZ::C2 },
1181
  { 35U, SystemZ::C3 },
1182
  { 36U, SystemZ::C4 },
1183
  { 37U, SystemZ::C5 },
1184
  { 38U, SystemZ::C6 },
1185
  { 39U, SystemZ::C7 },
1186
  { 40U, SystemZ::C8 },
1187
  { 41U, SystemZ::C9 },
1188
  { 42U, SystemZ::C10 },
1189
  { 43U, SystemZ::C11 },
1190
  { 44U, SystemZ::C12 },
1191
  { 45U, SystemZ::C13 },
1192
  { 46U, SystemZ::C14 },
1193
  { 47U, SystemZ::C15 },
1194
  { 48U, SystemZ::A0 },
1195
  { 49U, SystemZ::A1 },
1196
  { 50U, SystemZ::A2 },
1197
  { 51U, SystemZ::A3 },
1198
  { 52U, SystemZ::A4 },
1199
  { 53U, SystemZ::A5 },
1200
  { 54U, SystemZ::A6 },
1201
  { 55U, SystemZ::A7 },
1202
  { 56U, SystemZ::A8 },
1203
  { 57U, SystemZ::A9 },
1204
  { 58U, SystemZ::A10 },
1205
  { 59U, SystemZ::A11 },
1206
  { 60U, SystemZ::A12 },
1207
  { 61U, SystemZ::A13 },
1208
  { 62U, SystemZ::A14 },
1209
  { 63U, SystemZ::A15 },
1210
  { 68U, SystemZ::F16D },
1211
  { 69U, SystemZ::F18D },
1212
  { 70U, SystemZ::F20D },
1213
  { 71U, SystemZ::F22D },
1214
  { 72U, SystemZ::F17D },
1215
  { 73U, SystemZ::F19D },
1216
  { 74U, SystemZ::F21D },
1217
  { 75U, SystemZ::F23D },
1218
  { 76U, SystemZ::F24D },
1219
  { 77U, SystemZ::F26D },
1220
  { 78U, SystemZ::F28D },
1221
  { 79U, SystemZ::F30D },
1222
  { 80U, SystemZ::F25D },
1223
  { 81U, SystemZ::F27D },
1224
  { 82U, SystemZ::F29D },
1225
  { 83U, SystemZ::F31D },
1226
};
1227
extern const unsigned SystemZDwarfFlavour0Dwarf2LSize = std::size(SystemZDwarfFlavour0Dwarf2L);
1228
1229
extern const MCRegisterInfo::DwarfLLVMRegPair SystemZEHFlavour0Dwarf2L[] = {
1230
  { 0U, SystemZ::R0D },
1231
  { 1U, SystemZ::R1D },
1232
  { 2U, SystemZ::R2D },
1233
  { 3U, SystemZ::R3D },
1234
  { 4U, SystemZ::R4D },
1235
  { 5U, SystemZ::R5D },
1236
  { 6U, SystemZ::R6D },
1237
  { 7U, SystemZ::R7D },
1238
  { 8U, SystemZ::R8D },
1239
  { 9U, SystemZ::R9D },
1240
  { 10U, SystemZ::R10D },
1241
  { 11U, SystemZ::R11D },
1242
  { 12U, SystemZ::R12D },
1243
  { 13U, SystemZ::R13D },
1244
  { 14U, SystemZ::R14D },
1245
  { 15U, SystemZ::R15D },
1246
  { 16U, SystemZ::F0D },
1247
  { 17U, SystemZ::F2D },
1248
  { 18U, SystemZ::F4D },
1249
  { 19U, SystemZ::F6D },
1250
  { 20U, SystemZ::F1D },
1251
  { 21U, SystemZ::F3D },
1252
  { 22U, SystemZ::F5D },
1253
  { 23U, SystemZ::F7D },
1254
  { 24U, SystemZ::F8D },
1255
  { 25U, SystemZ::F10D },
1256
  { 26U, SystemZ::F12D },
1257
  { 27U, SystemZ::F14D },
1258
  { 28U, SystemZ::F9D },
1259
  { 29U, SystemZ::F11D },
1260
  { 30U, SystemZ::F13D },
1261
  { 31U, SystemZ::F15D },
1262
  { 32U, SystemZ::C0 },
1263
  { 33U, SystemZ::C1 },
1264
  { 34U, SystemZ::C2 },
1265
  { 35U, SystemZ::C3 },
1266
  { 36U, SystemZ::C4 },
1267
  { 37U, SystemZ::C5 },
1268
  { 38U, SystemZ::C6 },
1269
  { 39U, SystemZ::C7 },
1270
  { 40U, SystemZ::C8 },
1271
  { 41U, SystemZ::C9 },
1272
  { 42U, SystemZ::C10 },
1273
  { 43U, SystemZ::C11 },
1274
  { 44U, SystemZ::C12 },
1275
  { 45U, SystemZ::C13 },
1276
  { 46U, SystemZ::C14 },
1277
  { 47U, SystemZ::C15 },
1278
  { 48U, SystemZ::A0 },
1279
  { 49U, SystemZ::A1 },
1280
  { 50U, SystemZ::A2 },
1281
  { 51U, SystemZ::A3 },
1282
  { 52U, SystemZ::A4 },
1283
  { 53U, SystemZ::A5 },
1284
  { 54U, SystemZ::A6 },
1285
  { 55U, SystemZ::A7 },
1286
  { 56U, SystemZ::A8 },
1287
  { 57U, SystemZ::A9 },
1288
  { 58U, SystemZ::A10 },
1289
  { 59U, SystemZ::A11 },
1290
  { 60U, SystemZ::A12 },
1291
  { 61U, SystemZ::A13 },
1292
  { 62U, SystemZ::A14 },
1293
  { 63U, SystemZ::A15 },
1294
  { 68U, SystemZ::F16D },
1295
  { 69U, SystemZ::F18D },
1296
  { 70U, SystemZ::F20D },
1297
  { 71U, SystemZ::F22D },
1298
  { 72U, SystemZ::F17D },
1299
  { 73U, SystemZ::F19D },
1300
  { 74U, SystemZ::F21D },
1301
  { 75U, SystemZ::F23D },
1302
  { 76U, SystemZ::F24D },
1303
  { 77U, SystemZ::F26D },
1304
  { 78U, SystemZ::F28D },
1305
  { 79U, SystemZ::F30D },
1306
  { 80U, SystemZ::F25D },
1307
  { 81U, SystemZ::F27D },
1308
  { 82U, SystemZ::F29D },
1309
  { 83U, SystemZ::F31D },
1310
};
1311
extern const unsigned SystemZEHFlavour0Dwarf2LSize = std::size(SystemZEHFlavour0Dwarf2L);
1312
1313
extern const MCRegisterInfo::DwarfLLVMRegPair SystemZDwarfFlavour0L2Dwarf[] = {
1314
  { SystemZ::A0, 48U },
1315
  { SystemZ::A1, 49U },
1316
  { SystemZ::A2, 50U },
1317
  { SystemZ::A3, 51U },
1318
  { SystemZ::A4, 52U },
1319
  { SystemZ::A5, 53U },
1320
  { SystemZ::A6, 54U },
1321
  { SystemZ::A7, 55U },
1322
  { SystemZ::A8, 56U },
1323
  { SystemZ::A9, 57U },
1324
  { SystemZ::A10, 58U },
1325
  { SystemZ::A11, 59U },
1326
  { SystemZ::A12, 60U },
1327
  { SystemZ::A13, 61U },
1328
  { SystemZ::A14, 62U },
1329
  { SystemZ::A15, 63U },
1330
  { SystemZ::C0, 32U },
1331
  { SystemZ::C1, 33U },
1332
  { SystemZ::C2, 34U },
1333
  { SystemZ::C3, 35U },
1334
  { SystemZ::C4, 36U },
1335
  { SystemZ::C5, 37U },
1336
  { SystemZ::C6, 38U },
1337
  { SystemZ::C7, 39U },
1338
  { SystemZ::C8, 40U },
1339
  { SystemZ::C9, 41U },
1340
  { SystemZ::C10, 42U },
1341
  { SystemZ::C11, 43U },
1342
  { SystemZ::C12, 44U },
1343
  { SystemZ::C13, 45U },
1344
  { SystemZ::C14, 46U },
1345
  { SystemZ::C15, 47U },
1346
  { SystemZ::V0, 16U },
1347
  { SystemZ::V1, 20U },
1348
  { SystemZ::V2, 17U },
1349
  { SystemZ::V3, 21U },
1350
  { SystemZ::V4, 18U },
1351
  { SystemZ::V5, 22U },
1352
  { SystemZ::V6, 19U },
1353
  { SystemZ::V7, 23U },
1354
  { SystemZ::V8, 24U },
1355
  { SystemZ::V9, 28U },
1356
  { SystemZ::V10, 25U },
1357
  { SystemZ::V11, 29U },
1358
  { SystemZ::V12, 26U },
1359
  { SystemZ::V13, 30U },
1360
  { SystemZ::V14, 27U },
1361
  { SystemZ::V15, 31U },
1362
  { SystemZ::V16, 68U },
1363
  { SystemZ::V17, 72U },
1364
  { SystemZ::V18, 69U },
1365
  { SystemZ::V19, 73U },
1366
  { SystemZ::V20, 70U },
1367
  { SystemZ::V21, 74U },
1368
  { SystemZ::V22, 71U },
1369
  { SystemZ::V23, 75U },
1370
  { SystemZ::V24, 76U },
1371
  { SystemZ::V25, 80U },
1372
  { SystemZ::V26, 77U },
1373
  { SystemZ::V27, 81U },
1374
  { SystemZ::V28, 78U },
1375
  { SystemZ::V29, 82U },
1376
  { SystemZ::V30, 79U },
1377
  { SystemZ::V31, 83U },
1378
  { SystemZ::F0D, 16U },
1379
  { SystemZ::F1D, 20U },
1380
  { SystemZ::F2D, 17U },
1381
  { SystemZ::F3D, 21U },
1382
  { SystemZ::F4D, 18U },
1383
  { SystemZ::F5D, 22U },
1384
  { SystemZ::F6D, 19U },
1385
  { SystemZ::F7D, 23U },
1386
  { SystemZ::F8D, 24U },
1387
  { SystemZ::F9D, 28U },
1388
  { SystemZ::F10D, 25U },
1389
  { SystemZ::F11D, 29U },
1390
  { SystemZ::F12D, 26U },
1391
  { SystemZ::F13D, 30U },
1392
  { SystemZ::F14D, 27U },
1393
  { SystemZ::F15D, 31U },
1394
  { SystemZ::F16D, 68U },
1395
  { SystemZ::F17D, 72U },
1396
  { SystemZ::F18D, 69U },
1397
  { SystemZ::F19D, 73U },
1398
  { SystemZ::F20D, 70U },
1399
  { SystemZ::F21D, 74U },
1400
  { SystemZ::F22D, 71U },
1401
  { SystemZ::F23D, 75U },
1402
  { SystemZ::F24D, 76U },
1403
  { SystemZ::F25D, 80U },
1404
  { SystemZ::F26D, 77U },
1405
  { SystemZ::F27D, 81U },
1406
  { SystemZ::F28D, 78U },
1407
  { SystemZ::F29D, 82U },
1408
  { SystemZ::F30D, 79U },
1409
  { SystemZ::F31D, 83U },
1410
  { SystemZ::R0D, 0U },
1411
  { SystemZ::R1D, 1U },
1412
  { SystemZ::R2D, 2U },
1413
  { SystemZ::R3D, 3U },
1414
  { SystemZ::R4D, 4U },
1415
  { SystemZ::R5D, 5U },
1416
  { SystemZ::R6D, 6U },
1417
  { SystemZ::R7D, 7U },
1418
  { SystemZ::R8D, 8U },
1419
  { SystemZ::R9D, 9U },
1420
  { SystemZ::R10D, 10U },
1421
  { SystemZ::R11D, 11U },
1422
  { SystemZ::R12D, 12U },
1423
  { SystemZ::R13D, 13U },
1424
  { SystemZ::R14D, 14U },
1425
  { SystemZ::R15D, 15U },
1426
};
1427
extern const unsigned SystemZDwarfFlavour0L2DwarfSize = std::size(SystemZDwarfFlavour0L2Dwarf);
1428
1429
extern const MCRegisterInfo::DwarfLLVMRegPair SystemZEHFlavour0L2Dwarf[] = {
1430
  { SystemZ::A0, 48U },
1431
  { SystemZ::A1, 49U },
1432
  { SystemZ::A2, 50U },
1433
  { SystemZ::A3, 51U },
1434
  { SystemZ::A4, 52U },
1435
  { SystemZ::A5, 53U },
1436
  { SystemZ::A6, 54U },
1437
  { SystemZ::A7, 55U },
1438
  { SystemZ::A8, 56U },
1439
  { SystemZ::A9, 57U },
1440
  { SystemZ::A10, 58U },
1441
  { SystemZ::A11, 59U },
1442
  { SystemZ::A12, 60U },
1443
  { SystemZ::A13, 61U },
1444
  { SystemZ::A14, 62U },
1445
  { SystemZ::A15, 63U },
1446
  { SystemZ::C0, 32U },
1447
  { SystemZ::C1, 33U },
1448
  { SystemZ::C2, 34U },
1449
  { SystemZ::C3, 35U },
1450
  { SystemZ::C4, 36U },
1451
  { SystemZ::C5, 37U },
1452
  { SystemZ::C6, 38U },
1453
  { SystemZ::C7, 39U },
1454
  { SystemZ::C8, 40U },
1455
  { SystemZ::C9, 41U },
1456
  { SystemZ::C10, 42U },
1457
  { SystemZ::C11, 43U },
1458
  { SystemZ::C12, 44U },
1459
  { SystemZ::C13, 45U },
1460
  { SystemZ::C14, 46U },
1461
  { SystemZ::C15, 47U },
1462
  { SystemZ::V0, 16U },
1463
  { SystemZ::V1, 20U },
1464
  { SystemZ::V2, 17U },
1465
  { SystemZ::V3, 21U },
1466
  { SystemZ::V4, 18U },
1467
  { SystemZ::V5, 22U },
1468
  { SystemZ::V6, 19U },
1469
  { SystemZ::V7, 23U },
1470
  { SystemZ::V8, 24U },
1471
  { SystemZ::V9, 28U },
1472
  { SystemZ::V10, 25U },
1473
  { SystemZ::V11, 29U },
1474
  { SystemZ::V12, 26U },
1475
  { SystemZ::V13, 30U },
1476
  { SystemZ::V14, 27U },
1477
  { SystemZ::V15, 31U },
1478
  { SystemZ::V16, 68U },
1479
  { SystemZ::V17, 72U },
1480
  { SystemZ::V18, 69U },
1481
  { SystemZ::V19, 73U },
1482
  { SystemZ::V20, 70U },
1483
  { SystemZ::V21, 74U },
1484
  { SystemZ::V22, 71U },
1485
  { SystemZ::V23, 75U },
1486
  { SystemZ::V24, 76U },
1487
  { SystemZ::V25, 80U },
1488
  { SystemZ::V26, 77U },
1489
  { SystemZ::V27, 81U },
1490
  { SystemZ::V28, 78U },
1491
  { SystemZ::V29, 82U },
1492
  { SystemZ::V30, 79U },
1493
  { SystemZ::V31, 83U },
1494
  { SystemZ::F0D, 16U },
1495
  { SystemZ::F1D, 20U },
1496
  { SystemZ::F2D, 17U },
1497
  { SystemZ::F3D, 21U },
1498
  { SystemZ::F4D, 18U },
1499
  { SystemZ::F5D, 22U },
1500
  { SystemZ::F6D, 19U },
1501
  { SystemZ::F7D, 23U },
1502
  { SystemZ::F8D, 24U },
1503
  { SystemZ::F9D, 28U },
1504
  { SystemZ::F10D, 25U },
1505
  { SystemZ::F11D, 29U },
1506
  { SystemZ::F12D, 26U },
1507
  { SystemZ::F13D, 30U },
1508
  { SystemZ::F14D, 27U },
1509
  { SystemZ::F15D, 31U },
1510
  { SystemZ::F16D, 68U },
1511
  { SystemZ::F17D, 72U },
1512
  { SystemZ::F18D, 69U },
1513
  { SystemZ::F19D, 73U },
1514
  { SystemZ::F20D, 70U },
1515
  { SystemZ::F21D, 74U },
1516
  { SystemZ::F22D, 71U },
1517
  { SystemZ::F23D, 75U },
1518
  { SystemZ::F24D, 76U },
1519
  { SystemZ::F25D, 80U },
1520
  { SystemZ::F26D, 77U },
1521
  { SystemZ::F27D, 81U },
1522
  { SystemZ::F28D, 78U },
1523
  { SystemZ::F29D, 82U },
1524
  { SystemZ::F30D, 79U },
1525
  { SystemZ::F31D, 83U },
1526
  { SystemZ::R0D, 0U },
1527
  { SystemZ::R1D, 1U },
1528
  { SystemZ::R2D, 2U },
1529
  { SystemZ::R3D, 3U },
1530
  { SystemZ::R4D, 4U },
1531
  { SystemZ::R5D, 5U },
1532
  { SystemZ::R6D, 6U },
1533
  { SystemZ::R7D, 7U },
1534
  { SystemZ::R8D, 8U },
1535
  { SystemZ::R9D, 9U },
1536
  { SystemZ::R10D, 10U },
1537
  { SystemZ::R11D, 11U },
1538
  { SystemZ::R12D, 12U },
1539
  { SystemZ::R13D, 13U },
1540
  { SystemZ::R14D, 14U },
1541
  { SystemZ::R15D, 15U },
1542
};
1543
extern const unsigned SystemZEHFlavour0L2DwarfSize = std::size(SystemZEHFlavour0L2Dwarf);
1544
1545
extern const uint16_t SystemZRegEncodingTable[] = {
1546
  0,
1547
  0,
1548
  0,
1549
  0,
1550
  1,
1551
  2,
1552
  3,
1553
  4,
1554
  5,
1555
  6,
1556
  7,
1557
  8,
1558
  9,
1559
  10,
1560
  11,
1561
  12,
1562
  13,
1563
  14,
1564
  15,
1565
  0,
1566
  1,
1567
  2,
1568
  3,
1569
  4,
1570
  5,
1571
  6,
1572
  7,
1573
  8,
1574
  9,
1575
  10,
1576
  11,
1577
  12,
1578
  13,
1579
  14,
1580
  15,
1581
  0,
1582
  1,
1583
  2,
1584
  3,
1585
  4,
1586
  5,
1587
  6,
1588
  7,
1589
  8,
1590
  9,
1591
  10,
1592
  11,
1593
  12,
1594
  13,
1595
  14,
1596
  15,
1597
  16,
1598
  17,
1599
  18,
1600
  19,
1601
  20,
1602
  21,
1603
  22,
1604
  23,
1605
  24,
1606
  25,
1607
  26,
1608
  27,
1609
  28,
1610
  29,
1611
  30,
1612
  31,
1613
  0,
1614
  1,
1615
  2,
1616
  3,
1617
  4,
1618
  5,
1619
  6,
1620
  7,
1621
  8,
1622
  9,
1623
  10,
1624
  11,
1625
  12,
1626
  13,
1627
  14,
1628
  15,
1629
  16,
1630
  17,
1631
  18,
1632
  19,
1633
  20,
1634
  21,
1635
  22,
1636
  23,
1637
  24,
1638
  25,
1639
  26,
1640
  27,
1641
  28,
1642
  29,
1643
  30,
1644
  31,
1645
  0,
1646
  1,
1647
  4,
1648
  5,
1649
  8,
1650
  9,
1651
  12,
1652
  13,
1653
  0,
1654
  1,
1655
  2,
1656
  3,
1657
  4,
1658
  5,
1659
  6,
1660
  7,
1661
  8,
1662
  9,
1663
  10,
1664
  11,
1665
  12,
1666
  13,
1667
  14,
1668
  15,
1669
  16,
1670
  17,
1671
  18,
1672
  19,
1673
  20,
1674
  21,
1675
  22,
1676
  23,
1677
  24,
1678
  25,
1679
  26,
1680
  27,
1681
  28,
1682
  29,
1683
  30,
1684
  31,
1685
  0,
1686
  1,
1687
  2,
1688
  3,
1689
  4,
1690
  5,
1691
  6,
1692
  7,
1693
  8,
1694
  9,
1695
  10,
1696
  11,
1697
  12,
1698
  13,
1699
  14,
1700
  15,
1701
  0,
1702
  1,
1703
  2,
1704
  3,
1705
  4,
1706
  5,
1707
  6,
1708
  7,
1709
  8,
1710
  9,
1711
  10,
1712
  11,
1713
  12,
1714
  13,
1715
  14,
1716
  15,
1717
  0,
1718
  1,
1719
  2,
1720
  3,
1721
  4,
1722
  5,
1723
  6,
1724
  7,
1725
  8,
1726
  9,
1727
  10,
1728
  11,
1729
  12,
1730
  13,
1731
  14,
1732
  15,
1733
  0,
1734
  2,
1735
  4,
1736
  6,
1737
  8,
1738
  10,
1739
  12,
1740
  14,
1741
};
1742
0
static inline void InitSystemZMCRegisterInfo(MCRegisterInfo *RI, unsigned RA, unsigned DwarfFlavour = 0, unsigned EHFlavour = 0, unsigned PC = 0) {
1743
0
  RI->InitMCRegisterInfo(SystemZRegDesc, 195, RA, PC, SystemZMCRegisterClasses, 22, SystemZRegUnitRoots, 98, SystemZRegDiffLists, SystemZLaneMaskLists, SystemZRegStrings, SystemZRegClassStrings, SystemZSubRegIdxLists, 7,
1744
0
SystemZSubRegIdxRanges, SystemZRegEncodingTable);
1745
1746
0
  switch (DwarfFlavour) {
1747
0
  default:
1748
0
    llvm_unreachable("Unknown DWARF flavour");
1749
0
  case 0:
1750
0
    RI->mapDwarfRegsToLLVMRegs(SystemZDwarfFlavour0Dwarf2L, SystemZDwarfFlavour0Dwarf2LSize, false);
1751
0
    break;
1752
0
  }
1753
0
  switch (EHFlavour) {
1754
0
  default:
1755
0
    llvm_unreachable("Unknown DWARF flavour");
1756
0
  case 0:
1757
0
    RI->mapDwarfRegsToLLVMRegs(SystemZEHFlavour0Dwarf2L, SystemZEHFlavour0Dwarf2LSize, true);
1758
0
    break;
1759
0
  }
1760
0
  switch (DwarfFlavour) {
1761
0
  default:
1762
0
    llvm_unreachable("Unknown DWARF flavour");
1763
0
  case 0:
1764
0
    RI->mapLLVMRegsToDwarfRegs(SystemZDwarfFlavour0L2Dwarf, SystemZDwarfFlavour0L2DwarfSize, false);
1765
0
    break;
1766
0
  }
1767
0
  switch (EHFlavour) {
1768
0
  default:
1769
0
    llvm_unreachable("Unknown DWARF flavour");
1770
0
  case 0:
1771
0
    RI->mapLLVMRegsToDwarfRegs(SystemZEHFlavour0L2Dwarf, SystemZEHFlavour0L2DwarfSize, true);
1772
0
    break;
1773
0
  }
1774
0
}
1775
1776
} // end namespace llvm
1777
1778
#endif // GET_REGINFO_MC_DESC
1779
1780
/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
1781
|*                                                                            *|
1782
|* Register Information Header Fragment                                       *|
1783
|*                                                                            *|
1784
|* Automatically generated file, do not edit!                                 *|
1785
|*                                                                            *|
1786
\*===----------------------------------------------------------------------===*/
1787
1788
1789
#ifdef GET_REGINFO_HEADER
1790
#undef GET_REGINFO_HEADER
1791
1792
#include "llvm/CodeGen/TargetRegisterInfo.h"
1793
1794
namespace llvm {
1795
1796
class SystemZFrameLowering;
1797
1798
struct SystemZGenRegisterInfo : public TargetRegisterInfo {
1799
  explicit SystemZGenRegisterInfo(unsigned RA, unsigned D = 0, unsigned E = 0,
1800
      unsigned PC = 0, unsigned HwMode = 0);
1801
  unsigned composeSubRegIndicesImpl(unsigned, unsigned) const override;
1802
  LaneBitmask composeSubRegIndexLaneMaskImpl(unsigned, LaneBitmask) const override;
1803
  LaneBitmask reverseComposeSubRegIndexLaneMaskImpl(unsigned, LaneBitmask) const override;
1804
  const TargetRegisterClass *getSubClassWithSubReg(const TargetRegisterClass *, unsigned) const override;
1805
  const TargetRegisterClass *getSubRegisterClass(const TargetRegisterClass *, unsigned) const override;
1806
  const RegClassWeight &getRegClassWeight(const TargetRegisterClass *RC) const override;
1807
  unsigned getRegUnitWeight(unsigned RegUnit) const override;
1808
  unsigned getNumRegPressureSets() const override;
1809
  const char *getRegPressureSetName(unsigned Idx) const override;
1810
  unsigned getRegPressureSetLimit(const MachineFunction &MF, unsigned Idx) const override;
1811
  const int *getRegClassPressureSets(const TargetRegisterClass *RC) const override;
1812
  const int *getRegUnitPressureSets(unsigned RegUnit) const override;
1813
  ArrayRef<const char *> getRegMaskNames() const override;
1814
  ArrayRef<const uint32_t *> getRegMasks() const override;
1815
  bool isGeneralPurposeRegister(const MachineFunction &, MCRegister) const override;
1816
  bool isFixedRegister(const MachineFunction &, MCRegister) const override;
1817
  bool isArgumentRegister(const MachineFunction &, MCRegister) const override;
1818
  bool isConstantPhysReg(MCRegister PhysReg) const override final;
1819
  /// Devirtualized TargetFrameLowering.
1820
  static const SystemZFrameLowering *getFrameLowering(
1821
      const MachineFunction &MF);
1822
};
1823
1824
namespace SystemZ { // Register classes
1825
  extern const TargetRegisterClass GRX32BitRegClass;
1826
  extern const TargetRegisterClass VR32BitRegClass;
1827
  extern const TargetRegisterClass AR32BitRegClass;
1828
  extern const TargetRegisterClass FP32BitRegClass;
1829
  extern const TargetRegisterClass GR32BitRegClass;
1830
  extern const TargetRegisterClass GRH32BitRegClass;
1831
  extern const TargetRegisterClass ADDR32BitRegClass;
1832
  extern const TargetRegisterClass CCRRegClass;
1833
  extern const TargetRegisterClass FPCRegsRegClass;
1834
  extern const TargetRegisterClass AnyRegBitRegClass;
1835
  extern const TargetRegisterClass AnyRegBit_with_subreg_h32_in_FP32BitRegClass;
1836
  extern const TargetRegisterClass VR64BitRegClass;
1837
  extern const TargetRegisterClass AnyRegBit_with_subreg_h64RegClass;
1838
  extern const TargetRegisterClass CR64BitRegClass;
1839
  extern const TargetRegisterClass FP64BitRegClass;
1840
  extern const TargetRegisterClass GR64BitRegClass;
1841
  extern const TargetRegisterClass ADDR64BitRegClass;
1842
  extern const TargetRegisterClass VR128BitRegClass;
1843
  extern const TargetRegisterClass VF128BitRegClass;
1844
  extern const TargetRegisterClass FP128BitRegClass;
1845
  extern const TargetRegisterClass GR128BitRegClass;
1846
  extern const TargetRegisterClass ADDR128BitRegClass;
1847
} // end namespace SystemZ
1848
1849
} // end namespace llvm
1850
1851
#endif // GET_REGINFO_HEADER
1852
1853
/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
1854
|*                                                                            *|
1855
|* Target Register and Register Classes Information                           *|
1856
|*                                                                            *|
1857
|* Automatically generated file, do not edit!                                 *|
1858
|*                                                                            *|
1859
\*===----------------------------------------------------------------------===*/
1860
1861
1862
#ifdef GET_REGINFO_TARGET_DESC
1863
#undef GET_REGINFO_TARGET_DESC
1864
1865
namespace llvm {
1866
1867
extern const MCRegisterClass SystemZMCRegisterClasses[];
1868
1869
static const MVT::SimpleValueType VTLists[] = {
1870
  /* 0 */ MVT::i32, MVT::Other,
1871
  /* 2 */ MVT::i64, MVT::Other,
1872
  /* 4 */ MVT::f32, MVT::Other,
1873
  /* 6 */ MVT::f64, MVT::Other,
1874
  /* 8 */ MVT::v16i8, MVT::v8i16, MVT::v4i32, MVT::v2i64, MVT::i128, MVT::v4f32, MVT::v2f64, MVT::f128, MVT::Other,
1875
  /* 17 */ MVT::f32, MVT::v4i8, MVT::v2i16, MVT::Other,
1876
  /* 21 */ MVT::i64, MVT::f64, MVT::v8i8, MVT::v4i16, MVT::v2i32, MVT::v2f32, MVT::Other,
1877
  /* 28 */ MVT::v16i8, MVT::v8i16, MVT::v4i32, MVT::v2i64, MVT::v4f32, MVT::v2f64, MVT::Other,
1878
  /* 35 */ MVT::Untyped, MVT::Other,
1879
};
1880
1881
static const char *SubRegIndexNameTable[] = { "subreg_h32", "subreg_h64", "subreg_l32", "subreg_l64", "subreg_lh32", "subreg_ll32", "" };
1882
1883
1884
static const LaneBitmask SubRegIndexLaneMaskTable[] = {
1885
  LaneBitmask::getAll(),
1886
  LaneBitmask(0x0000000000000001), // subreg_h32
1887
  LaneBitmask(0x0000000000000003), // subreg_h64
1888
  LaneBitmask(0x0000000000000002), // subreg_l32
1889
  LaneBitmask(0x000000000000000C), // subreg_l64
1890
  LaneBitmask(0x0000000000000004), // subreg_lh32
1891
  LaneBitmask(0x0000000000000008), // subreg_ll32
1892
 };
1893
1894
1895
1896
static const TargetRegisterInfo::RegClassInfo RegClassInfos[] = {
1897
  // Mode = 0 (Default)
1898
  { 32, 32, 32, /*VTLists+*/0 },    // GRX32Bit
1899
  { 32, 32, 32, /*VTLists+*/17 },    // VR32Bit
1900
  { 32, 32, 32, /*VTLists+*/0 },    // AR32Bit
1901
  { 32, 32, 32, /*VTLists+*/4 },    // FP32Bit
1902
  { 32, 32, 32, /*VTLists+*/0 },    // GR32Bit
1903
  { 32, 32, 32, /*VTLists+*/0 },    // GRH32Bit
1904
  { 32, 32, 32, /*VTLists+*/0 },    // ADDR32Bit
1905
  { 32, 32, 32, /*VTLists+*/0 },    // CCR
1906
  { 32, 32, 32, /*VTLists+*/0 },    // FPCRegs
1907
  { 64, 64, 64, /*VTLists+*/21 },    // AnyRegBit
1908
  { 64, 64, 64, /*VTLists+*/21 },    // AnyRegBit_with_subreg_h32_in_FP32Bit
1909
  { 64, 64, 64, /*VTLists+*/22 },    // VR64Bit
1910
  { 64, 64, 64, /*VTLists+*/21 },    // AnyRegBit_with_subreg_h64
1911
  { 64, 64, 64, /*VTLists+*/2 },    // CR64Bit
1912
  { 64, 64, 64, /*VTLists+*/6 },    // FP64Bit
1913
  { 64, 64, 64, /*VTLists+*/2 },    // GR64Bit
1914
  { 64, 64, 64, /*VTLists+*/2 },    // ADDR64Bit
1915
  { 128, 128, 128, /*VTLists+*/8 },    // VR128Bit
1916
  { 128, 128, 128, /*VTLists+*/28 },    // VF128Bit
1917
  { 128, 128, 128, /*VTLists+*/15 },    // FP128Bit
1918
  { 128, 128, 128, /*VTLists+*/35 },    // GR128Bit
1919
  { 128, 128, 128, /*VTLists+*/35 },    // ADDR128Bit
1920
};
1921
1922
static const TargetRegisterClass *const NullRegClasses[] = { nullptr };
1923
1924
static const uint32_t GRX32BitSubClassMask[] = {
1925
  0x00000071, 
1926
  0x00318000, // subreg_h32
1927
  0x00318000, // subreg_l32
1928
  0x00300000, // subreg_lh32
1929
  0x00300000, // subreg_ll32
1930
};
1931
1932
static const uint32_t VR32BitSubClassMask[] = {
1933
  0x0000000a, 
1934
  0x000e5c00, // subreg_h32
1935
  0x00080000, // subreg_lh32
1936
};
1937
1938
static const uint32_t AR32BitSubClassMask[] = {
1939
  0x00000004, 
1940
};
1941
1942
static const uint32_t FP32BitSubClassMask[] = {
1943
  0x00000008, 
1944
  0x000c5400, // subreg_h32
1945
  0x00080000, // subreg_lh32
1946
};
1947
1948
static const uint32_t GR32BitSubClassMask[] = {
1949
  0x00000050, 
1950
  0x00318000, // subreg_l32
1951
  0x00300000, // subreg_ll32
1952
};
1953
1954
static const uint32_t GRH32BitSubClassMask[] = {
1955
  0x00000020, 
1956
  0x00318000, // subreg_h32
1957
  0x00300000, // subreg_lh32
1958
};
1959
1960
static const uint32_t ADDR32BitSubClassMask[] = {
1961
  0x00000040, 
1962
  0x00210000, // subreg_l32
1963
  0x00300000, // subreg_ll32
1964
};
1965
1966
static const uint32_t CCRSubClassMask[] = {
1967
  0x00000080, 
1968
};
1969
1970
static const uint32_t FPCRegsSubClassMask[] = {
1971
  0x00000100, 
1972
};
1973
1974
static const uint32_t AnyRegBitSubClassMask[] = {
1975
  0x0005d600, 
1976
  0x003c1000, // subreg_h64
1977
  0x00380000, // subreg_l64
1978
};
1979
1980
static const uint32_t AnyRegBit_with_subreg_h32_in_FP32BitSubClassMask[] = {
1981
  0x00045400, 
1982
  0x000c1000, // subreg_h64
1983
  0x00080000, // subreg_l64
1984
};
1985
1986
static const uint32_t VR64BitSubClassMask[] = {
1987
  0x00004800, 
1988
  0x000e1000, // subreg_h64
1989
  0x00080000, // subreg_l64
1990
};
1991
1992
static const uint32_t AnyRegBit_with_subreg_h64SubClassMask[] = {
1993
  0x00041000, 
1994
};
1995
1996
static const uint32_t CR64BitSubClassMask[] = {
1997
  0x00002000, 
1998
};
1999
2000
static const uint32_t FP64BitSubClassMask[] = {
2001
  0x00004000, 
2002
  0x000c1000, // subreg_h64
2003
  0x00080000, // subreg_l64
2004
};
2005
2006
static const uint32_t GR64BitSubClassMask[] = {
2007
  0x00018000, 
2008
  0x00300000, // subreg_h64
2009
  0x00300000, // subreg_l64
2010
};
2011
2012
static const uint32_t ADDR64BitSubClassMask[] = {
2013
  0x00010000, 
2014
  0x00200000, // subreg_h64
2015
  0x00300000, // subreg_l64
2016
};
2017
2018
static const uint32_t VR128BitSubClassMask[] = {
2019
  0x00060000, 
2020
};
2021
2022
static const uint32_t VF128BitSubClassMask[] = {
2023
  0x00040000, 
2024
};
2025
2026
static const uint32_t FP128BitSubClassMask[] = {
2027
  0x00080000, 
2028
};
2029
2030
static const uint32_t GR128BitSubClassMask[] = {
2031
  0x00300000, 
2032
};
2033
2034
static const uint32_t ADDR128BitSubClassMask[] = {
2035
  0x00200000, 
2036
};
2037
2038
static const uint16_t SuperRegIdxSeqs[] = {
2039
  /* 0 */ 2, 4, 0,
2040
  /* 3 */ 1, 5, 0,
2041
  /* 6 */ 3, 6, 0,
2042
  /* 9 */ 1, 3, 5, 6, 0,
2043
};
2044
2045
static const TargetRegisterClass *const FP32BitSuperclasses[] = {
2046
  &SystemZ::VR32BitRegClass,
2047
  nullptr
2048
};
2049
2050
static const TargetRegisterClass *const GR32BitSuperclasses[] = {
2051
  &SystemZ::GRX32BitRegClass,
2052
  nullptr
2053
};
2054
2055
static const TargetRegisterClass *const GRH32BitSuperclasses[] = {
2056
  &SystemZ::GRX32BitRegClass,
2057
  nullptr
2058
};
2059
2060
static const TargetRegisterClass *const ADDR32BitSuperclasses[] = {
2061
  &SystemZ::GRX32BitRegClass,
2062
  &SystemZ::GR32BitRegClass,
2063
  nullptr
2064
};
2065
2066
static const TargetRegisterClass *const AnyRegBit_with_subreg_h32_in_FP32BitSuperclasses[] = {
2067
  &SystemZ::AnyRegBitRegClass,
2068
  nullptr
2069
};
2070
2071
static const TargetRegisterClass *const AnyRegBit_with_subreg_h64Superclasses[] = {
2072
  &SystemZ::AnyRegBitRegClass,
2073
  &SystemZ::AnyRegBit_with_subreg_h32_in_FP32BitRegClass,
2074
  nullptr
2075
};
2076
2077
static const TargetRegisterClass *const FP64BitSuperclasses[] = {
2078
  &SystemZ::AnyRegBitRegClass,
2079
  &SystemZ::AnyRegBit_with_subreg_h32_in_FP32BitRegClass,
2080
  &SystemZ::VR64BitRegClass,
2081
  nullptr
2082
};
2083
2084
static const TargetRegisterClass *const GR64BitSuperclasses[] = {
2085
  &SystemZ::AnyRegBitRegClass,
2086
  nullptr
2087
};
2088
2089
static const TargetRegisterClass *const ADDR64BitSuperclasses[] = {
2090
  &SystemZ::AnyRegBitRegClass,
2091
  &SystemZ::GR64BitRegClass,
2092
  nullptr
2093
};
2094
2095
static const TargetRegisterClass *const VF128BitSuperclasses[] = {
2096
  &SystemZ::AnyRegBitRegClass,
2097
  &SystemZ::AnyRegBit_with_subreg_h32_in_FP32BitRegClass,
2098
  &SystemZ::AnyRegBit_with_subreg_h64RegClass,
2099
  &SystemZ::VR128BitRegClass,
2100
  nullptr
2101
};
2102
2103
static const TargetRegisterClass *const ADDR128BitSuperclasses[] = {
2104
  &SystemZ::GR128BitRegClass,
2105
  nullptr
2106
};
2107
2108
2109
0
static inline unsigned GRX32BitAltOrderSelect(const MachineFunction &MF) {
2110
0
        const SystemZSubtarget &S = MF.getSubtarget<SystemZSubtarget>();
2111
0
        return S.isTargetXPLINK64();
2112
0
      }
2113
2114
0
static ArrayRef<MCPhysReg> GRX32BitGetRawAllocationOrder(const MachineFunction &MF) {
2115
0
  static const MCPhysReg AltOrder1[] = { SystemZ::R0L, SystemZ::R1L, SystemZ::R2L, SystemZ::R3L, SystemZ::R0H, SystemZ::R1H, SystemZ::R2H, SystemZ::R3H, SystemZ::R4L, SystemZ::R4H, SystemZ::R5L, SystemZ::R5H, SystemZ::R6L, SystemZ::R6H, SystemZ::R7L, SystemZ::R7H, SystemZ::R8L, SystemZ::R8H, SystemZ::R9L, SystemZ::R9H, SystemZ::R10L, SystemZ::R10H, SystemZ::R11L, SystemZ::R11H, SystemZ::R12L, SystemZ::R12H, SystemZ::R13L, SystemZ::R13H, SystemZ::R14L, SystemZ::R14H, SystemZ::R15L, SystemZ::R15H };
2116
0
  const MCRegisterClass &MCR = SystemZMCRegisterClasses[SystemZ::GRX32BitRegClassID];
2117
0
  const ArrayRef<MCPhysReg> Order[] = {
2118
0
    ArrayRef(MCR.begin(), MCR.getNumRegs()),
2119
0
    ArrayRef(AltOrder1)
2120
0
  };
2121
0
  const unsigned Select = GRX32BitAltOrderSelect(MF);
2122
0
  assert(Select < 2);
2123
0
  return Order[Select];
2124
0
}
2125
2126
0
static inline unsigned VR32BitAltOrderSelect(const MachineFunction &MF) {
2127
0
        const SystemZSubtarget &S = MF.getSubtarget<SystemZSubtarget>();
2128
0
        return S.isTargetXPLINK64();
2129
0
      }
2130
2131
0
static ArrayRef<MCPhysReg> VR32BitGetRawAllocationOrder(const MachineFunction &MF) {
2132
0
  static const MCPhysReg AltOrder1[] = { SystemZ::F0S, SystemZ::F1S, SystemZ::F2S, SystemZ::F3S, SystemZ::F4S, SystemZ::F5S, SystemZ::F6S, SystemZ::F7S, SystemZ::F16S, SystemZ::F17S, SystemZ::F18S, SystemZ::F19S, SystemZ::F20S, SystemZ::F21S, SystemZ::F22S, SystemZ::F23S, SystemZ::F24S, SystemZ::F25S, SystemZ::F26S, SystemZ::F27S, SystemZ::F28S, SystemZ::F29S, SystemZ::F30S, SystemZ::F31S, SystemZ::F8S, SystemZ::F9S, SystemZ::F10S, SystemZ::F11S, SystemZ::F12S, SystemZ::F13S, SystemZ::F14S, SystemZ::F15S };
2133
0
  const MCRegisterClass &MCR = SystemZMCRegisterClasses[SystemZ::VR32BitRegClassID];
2134
0
  const ArrayRef<MCPhysReg> Order[] = {
2135
0
    ArrayRef(MCR.begin(), MCR.getNumRegs()),
2136
0
    ArrayRef(AltOrder1)
2137
0
  };
2138
0
  const unsigned Select = VR32BitAltOrderSelect(MF);
2139
0
  assert(Select < 2);
2140
0
  return Order[Select];
2141
0
}
2142
2143
0
static inline unsigned AR32BitAltOrderSelect(const MachineFunction &MF) {
2144
0
        const SystemZSubtarget &S = MF.getSubtarget<SystemZSubtarget>();
2145
0
        return S.isTargetXPLINK64();
2146
0
      }
2147
2148
0
static ArrayRef<MCPhysReg> AR32BitGetRawAllocationOrder(const MachineFunction &MF) {
2149
0
  const MCRegisterClass &MCR = SystemZMCRegisterClasses[SystemZ::AR32BitRegClassID];
2150
0
  const ArrayRef<MCPhysReg> Order[] = {
2151
0
    ArrayRef(MCR.begin(), MCR.getNumRegs())
2152
0
  };
2153
0
  const unsigned Select = AR32BitAltOrderSelect(MF);
2154
0
  assert(Select < 1);
2155
0
  return Order[Select];
2156
0
}
2157
2158
0
static inline unsigned FP32BitAltOrderSelect(const MachineFunction &MF) {
2159
0
        const SystemZSubtarget &S = MF.getSubtarget<SystemZSubtarget>();
2160
0
        return S.isTargetXPLINK64();
2161
0
      }
2162
2163
0
static ArrayRef<MCPhysReg> FP32BitGetRawAllocationOrder(const MachineFunction &MF) {
2164
0
  static const MCPhysReg AltOrder1[] = { SystemZ::F0S, SystemZ::F1S, SystemZ::F2S, SystemZ::F3S, SystemZ::F4S, SystemZ::F5S, SystemZ::F6S, SystemZ::F7S, SystemZ::F8S, SystemZ::F9S, SystemZ::F10S, SystemZ::F11S, SystemZ::F12S, SystemZ::F13S, SystemZ::F14S, SystemZ::F15S };
2165
0
  const MCRegisterClass &MCR = SystemZMCRegisterClasses[SystemZ::FP32BitRegClassID];
2166
0
  const ArrayRef<MCPhysReg> Order[] = {
2167
0
    ArrayRef(MCR.begin(), MCR.getNumRegs()),
2168
0
    ArrayRef(AltOrder1)
2169
0
  };
2170
0
  const unsigned Select = FP32BitAltOrderSelect(MF);
2171
0
  assert(Select < 2);
2172
0
  return Order[Select];
2173
0
}
2174
2175
0
static inline unsigned GR32BitAltOrderSelect(const MachineFunction &MF) {
2176
0
        const SystemZSubtarget &S = MF.getSubtarget<SystemZSubtarget>();
2177
0
        return S.isTargetXPLINK64();
2178
0
      }
2179
2180
0
static ArrayRef<MCPhysReg> GR32BitGetRawAllocationOrder(const MachineFunction &MF) {
2181
0
  static const MCPhysReg AltOrder1[] = { SystemZ::R0L, SystemZ::R1L, SystemZ::R2L, SystemZ::R3L, SystemZ::R4L, SystemZ::R5L, SystemZ::R6L, SystemZ::R7L, SystemZ::R8L, SystemZ::R9L, SystemZ::R10L, SystemZ::R11L, SystemZ::R12L, SystemZ::R13L, SystemZ::R14L, SystemZ::R15L };
2182
0
  const MCRegisterClass &MCR = SystemZMCRegisterClasses[SystemZ::GR32BitRegClassID];
2183
0
  const ArrayRef<MCPhysReg> Order[] = {
2184
0
    ArrayRef(MCR.begin(), MCR.getNumRegs()),
2185
0
    ArrayRef(AltOrder1)
2186
0
  };
2187
0
  const unsigned Select = GR32BitAltOrderSelect(MF);
2188
0
  assert(Select < 2);
2189
0
  return Order[Select];
2190
0
}
2191
2192
0
static inline unsigned GRH32BitAltOrderSelect(const MachineFunction &MF) {
2193
0
        const SystemZSubtarget &S = MF.getSubtarget<SystemZSubtarget>();
2194
0
        return S.isTargetXPLINK64();
2195
0
      }
2196
2197
0
static ArrayRef<MCPhysReg> GRH32BitGetRawAllocationOrder(const MachineFunction &MF) {
2198
0
  static const MCPhysReg AltOrder1[] = { SystemZ::R0H, SystemZ::R1H, SystemZ::R2H, SystemZ::R3H, SystemZ::R4H, SystemZ::R5H, SystemZ::R6H, SystemZ::R7H, SystemZ::R8H, SystemZ::R9H, SystemZ::R10H, SystemZ::R11H, SystemZ::R12H, SystemZ::R13H, SystemZ::R14H, SystemZ::R15H };
2199
0
  const MCRegisterClass &MCR = SystemZMCRegisterClasses[SystemZ::GRH32BitRegClassID];
2200
0
  const ArrayRef<MCPhysReg> Order[] = {
2201
0
    ArrayRef(MCR.begin(), MCR.getNumRegs()),
2202
0
    ArrayRef(AltOrder1)
2203
0
  };
2204
0
  const unsigned Select = GRH32BitAltOrderSelect(MF);
2205
0
  assert(Select < 2);
2206
0
  return Order[Select];
2207
0
}
2208
2209
0
static inline unsigned ADDR32BitAltOrderSelect(const MachineFunction &MF) {
2210
0
        const SystemZSubtarget &S = MF.getSubtarget<SystemZSubtarget>();
2211
0
        return S.isTargetXPLINK64();
2212
0
      }
2213
2214
0
static ArrayRef<MCPhysReg> ADDR32BitGetRawAllocationOrder(const MachineFunction &MF) {
2215
0
  static const MCPhysReg AltOrder1[] = { SystemZ::R1L, SystemZ::R2L, SystemZ::R3L, SystemZ::R4L, SystemZ::R5L, SystemZ::R6L, SystemZ::R7L, SystemZ::R8L, SystemZ::R9L, SystemZ::R10L, SystemZ::R11L, SystemZ::R12L, SystemZ::R13L, SystemZ::R14L, SystemZ::R15L };
2216
0
  const MCRegisterClass &MCR = SystemZMCRegisterClasses[SystemZ::ADDR32BitRegClassID];
2217
0
  const ArrayRef<MCPhysReg> Order[] = {
2218
0
    ArrayRef(MCR.begin(), MCR.getNumRegs()),
2219
0
    ArrayRef(AltOrder1)
2220
0
  };
2221
0
  const unsigned Select = ADDR32BitAltOrderSelect(MF);
2222
0
  assert(Select < 2);
2223
0
  return Order[Select];
2224
0
}
2225
2226
0
static inline unsigned AnyRegBitAltOrderSelect(const MachineFunction &MF) {
2227
0
        const SystemZSubtarget &S = MF.getSubtarget<SystemZSubtarget>();
2228
0
        return S.isTargetXPLINK64();
2229
0
      }
2230
2231
0
static ArrayRef<MCPhysReg> AnyRegBitGetRawAllocationOrder(const MachineFunction &MF) {
2232
0
  const MCRegisterClass &MCR = SystemZMCRegisterClasses[SystemZ::AnyRegBitRegClassID];
2233
0
  const ArrayRef<MCPhysReg> Order[] = {
2234
0
    ArrayRef(MCR.begin(), MCR.getNumRegs())
2235
0
  };
2236
0
  const unsigned Select = AnyRegBitAltOrderSelect(MF);
2237
0
  assert(Select < 1);
2238
0
  return Order[Select];
2239
0
}
2240
2241
0
static inline unsigned AnyRegBit_with_subreg_h32_in_FP32BitAltOrderSelect(const MachineFunction &MF) {
2242
0
        const SystemZSubtarget &S = MF.getSubtarget<SystemZSubtarget>();
2243
0
        return S.isTargetXPLINK64();
2244
0
      }
2245
2246
0
static ArrayRef<MCPhysReg> AnyRegBit_with_subreg_h32_in_FP32BitGetRawAllocationOrder(const MachineFunction &MF) {
2247
0
  const MCRegisterClass &MCR = SystemZMCRegisterClasses[SystemZ::AnyRegBit_with_subreg_h32_in_FP32BitRegClassID];
2248
0
  const ArrayRef<MCPhysReg> Order[] = {
2249
0
    ArrayRef(MCR.begin(), MCR.getNumRegs())
2250
0
  };
2251
0
  const unsigned Select = AnyRegBit_with_subreg_h32_in_FP32BitAltOrderSelect(MF);
2252
0
  assert(Select < 1);
2253
0
  return Order[Select];
2254
0
}
2255
2256
0
static inline unsigned VR64BitAltOrderSelect(const MachineFunction &MF) {
2257
0
        const SystemZSubtarget &S = MF.getSubtarget<SystemZSubtarget>();
2258
0
        return S.isTargetXPLINK64();
2259
0
      }
2260
2261
0
static ArrayRef<MCPhysReg> VR64BitGetRawAllocationOrder(const MachineFunction &MF) {
2262
0
  static const MCPhysReg AltOrder1[] = { SystemZ::F0D, SystemZ::F1D, SystemZ::F2D, SystemZ::F3D, SystemZ::F4D, SystemZ::F5D, SystemZ::F6D, SystemZ::F7D, SystemZ::F16D, SystemZ::F17D, SystemZ::F18D, SystemZ::F19D, SystemZ::F20D, SystemZ::F21D, SystemZ::F22D, SystemZ::F23D, SystemZ::F24D, SystemZ::F25D, SystemZ::F26D, SystemZ::F27D, SystemZ::F28D, SystemZ::F29D, SystemZ::F30D, SystemZ::F31D, SystemZ::F8D, SystemZ::F9D, SystemZ::F10D, SystemZ::F11D, SystemZ::F12D, SystemZ::F13D, SystemZ::F14D, SystemZ::F15D };
2263
0
  const MCRegisterClass &MCR = SystemZMCRegisterClasses[SystemZ::VR64BitRegClassID];
2264
0
  const ArrayRef<MCPhysReg> Order[] = {
2265
0
    ArrayRef(MCR.begin(), MCR.getNumRegs()),
2266
0
    ArrayRef(AltOrder1)
2267
0
  };
2268
0
  const unsigned Select = VR64BitAltOrderSelect(MF);
2269
0
  assert(Select < 2);
2270
0
  return Order[Select];
2271
0
}
2272
2273
0
static inline unsigned AnyRegBit_with_subreg_h64AltOrderSelect(const MachineFunction &MF) {
2274
0
        const SystemZSubtarget &S = MF.getSubtarget<SystemZSubtarget>();
2275
0
        return S.isTargetXPLINK64();
2276
0
      }
2277
2278
0
static ArrayRef<MCPhysReg> AnyRegBit_with_subreg_h64GetRawAllocationOrder(const MachineFunction &MF) {
2279
0
  const MCRegisterClass &MCR = SystemZMCRegisterClasses[SystemZ::AnyRegBit_with_subreg_h64RegClassID];
2280
0
  const ArrayRef<MCPhysReg> Order[] = {
2281
0
    ArrayRef(MCR.begin(), MCR.getNumRegs())
2282
0
  };
2283
0
  const unsigned Select = AnyRegBit_with_subreg_h64AltOrderSelect(MF);
2284
0
  assert(Select < 1);
2285
0
  return Order[Select];
2286
0
}
2287
2288
0
static inline unsigned CR64BitAltOrderSelect(const MachineFunction &MF) {
2289
0
        const SystemZSubtarget &S = MF.getSubtarget<SystemZSubtarget>();
2290
0
        return S.isTargetXPLINK64();
2291
0
      }
2292
2293
0
static ArrayRef<MCPhysReg> CR64BitGetRawAllocationOrder(const MachineFunction &MF) {
2294
0
  const MCRegisterClass &MCR = SystemZMCRegisterClasses[SystemZ::CR64BitRegClassID];
2295
0
  const ArrayRef<MCPhysReg> Order[] = {
2296
0
    ArrayRef(MCR.begin(), MCR.getNumRegs())
2297
0
  };
2298
0
  const unsigned Select = CR64BitAltOrderSelect(MF);
2299
0
  assert(Select < 1);
2300
0
  return Order[Select];
2301
0
}
2302
2303
0
static inline unsigned FP64BitAltOrderSelect(const MachineFunction &MF) {
2304
0
        const SystemZSubtarget &S = MF.getSubtarget<SystemZSubtarget>();
2305
0
        return S.isTargetXPLINK64();
2306
0
      }
2307
2308
0
static ArrayRef<MCPhysReg> FP64BitGetRawAllocationOrder(const MachineFunction &MF) {
2309
0
  static const MCPhysReg AltOrder1[] = { SystemZ::F0D, SystemZ::F1D, SystemZ::F2D, SystemZ::F3D, SystemZ::F4D, SystemZ::F5D, SystemZ::F6D, SystemZ::F7D, SystemZ::F8D, SystemZ::F9D, SystemZ::F10D, SystemZ::F11D, SystemZ::F12D, SystemZ::F13D, SystemZ::F14D, SystemZ::F15D };
2310
0
  const MCRegisterClass &MCR = SystemZMCRegisterClasses[SystemZ::FP64BitRegClassID];
2311
0
  const ArrayRef<MCPhysReg> Order[] = {
2312
0
    ArrayRef(MCR.begin(), MCR.getNumRegs()),
2313
0
    ArrayRef(AltOrder1)
2314
0
  };
2315
0
  const unsigned Select = FP64BitAltOrderSelect(MF);
2316
0
  assert(Select < 2);
2317
0
  return Order[Select];
2318
0
}
2319
2320
0
static inline unsigned GR64BitAltOrderSelect(const MachineFunction &MF) {
2321
0
        const SystemZSubtarget &S = MF.getSubtarget<SystemZSubtarget>();
2322
0
        return S.isTargetXPLINK64();
2323
0
      }
2324
2325
0
static ArrayRef<MCPhysReg> GR64BitGetRawAllocationOrder(const MachineFunction &MF) {
2326
0
  static const MCPhysReg AltOrder1[] = { SystemZ::R0D, SystemZ::R1D, SystemZ::R2D, SystemZ::R3D, SystemZ::R4D, SystemZ::R5D, SystemZ::R6D, SystemZ::R7D, SystemZ::R8D, SystemZ::R9D, SystemZ::R10D, SystemZ::R11D, SystemZ::R12D, SystemZ::R13D, SystemZ::R14D, SystemZ::R15D };
2327
0
  const MCRegisterClass &MCR = SystemZMCRegisterClasses[SystemZ::GR64BitRegClassID];
2328
0
  const ArrayRef<MCPhysReg> Order[] = {
2329
0
    ArrayRef(MCR.begin(), MCR.getNumRegs()),
2330
0
    ArrayRef(AltOrder1)
2331
0
  };
2332
0
  const unsigned Select = GR64BitAltOrderSelect(MF);
2333
0
  assert(Select < 2);
2334
0
  return Order[Select];
2335
0
}
2336
2337
0
static inline unsigned ADDR64BitAltOrderSelect(const MachineFunction &MF) {
2338
0
        const SystemZSubtarget &S = MF.getSubtarget<SystemZSubtarget>();
2339
0
        return S.isTargetXPLINK64();
2340
0
      }
2341
2342
0
static ArrayRef<MCPhysReg> ADDR64BitGetRawAllocationOrder(const MachineFunction &MF) {
2343
0
  static const MCPhysReg AltOrder1[] = { SystemZ::R1D, SystemZ::R2D, SystemZ::R3D, SystemZ::R4D, SystemZ::R5D, SystemZ::R6D, SystemZ::R7D, SystemZ::R8D, SystemZ::R9D, SystemZ::R10D, SystemZ::R11D, SystemZ::R12D, SystemZ::R13D, SystemZ::R14D, SystemZ::R15D };
2344
0
  const MCRegisterClass &MCR = SystemZMCRegisterClasses[SystemZ::ADDR64BitRegClassID];
2345
0
  const ArrayRef<MCPhysReg> Order[] = {
2346
0
    ArrayRef(MCR.begin(), MCR.getNumRegs()),
2347
0
    ArrayRef(AltOrder1)
2348
0
  };
2349
0
  const unsigned Select = ADDR64BitAltOrderSelect(MF);
2350
0
  assert(Select < 2);
2351
0
  return Order[Select];
2352
0
}
2353
2354
0
static inline unsigned VR128BitAltOrderSelect(const MachineFunction &MF) {
2355
0
        const SystemZSubtarget &S = MF.getSubtarget<SystemZSubtarget>();
2356
0
        return S.isTargetXPLINK64();
2357
0
      }
2358
2359
0
static ArrayRef<MCPhysReg> VR128BitGetRawAllocationOrder(const MachineFunction &MF) {
2360
0
  static const MCPhysReg AltOrder1[] = { SystemZ::V0, SystemZ::V1, SystemZ::V2, SystemZ::V3, SystemZ::V4, SystemZ::V5, SystemZ::V6, SystemZ::V7, SystemZ::V16, SystemZ::V17, SystemZ::V18, SystemZ::V19, SystemZ::V20, SystemZ::V21, SystemZ::V22, SystemZ::V23, SystemZ::V24, SystemZ::V25, SystemZ::V26, SystemZ::V27, SystemZ::V28, SystemZ::V29, SystemZ::V30, SystemZ::V31, SystemZ::V8, SystemZ::V9, SystemZ::V10, SystemZ::V11, SystemZ::V12, SystemZ::V13, SystemZ::V14, SystemZ::V15 };
2361
0
  const MCRegisterClass &MCR = SystemZMCRegisterClasses[SystemZ::VR128BitRegClassID];
2362
0
  const ArrayRef<MCPhysReg> Order[] = {
2363
0
    ArrayRef(MCR.begin(), MCR.getNumRegs()),
2364
0
    ArrayRef(AltOrder1)
2365
0
  };
2366
0
  const unsigned Select = VR128BitAltOrderSelect(MF);
2367
0
  assert(Select < 2);
2368
0
  return Order[Select];
2369
0
}
2370
2371
0
static inline unsigned VF128BitAltOrderSelect(const MachineFunction &MF) {
2372
0
        const SystemZSubtarget &S = MF.getSubtarget<SystemZSubtarget>();
2373
0
        return S.isTargetXPLINK64();
2374
0
      }
2375
2376
0
static ArrayRef<MCPhysReg> VF128BitGetRawAllocationOrder(const MachineFunction &MF) {
2377
0
  static const MCPhysReg AltOrder1[] = { SystemZ::V0, SystemZ::V1, SystemZ::V2, SystemZ::V3, SystemZ::V4, SystemZ::V5, SystemZ::V6, SystemZ::V7, SystemZ::V8, SystemZ::V9, SystemZ::V10, SystemZ::V11, SystemZ::V12, SystemZ::V13, SystemZ::V14, SystemZ::V15 };
2378
0
  const MCRegisterClass &MCR = SystemZMCRegisterClasses[SystemZ::VF128BitRegClassID];
2379
0
  const ArrayRef<MCPhysReg> Order[] = {
2380
0
    ArrayRef(MCR.begin(), MCR.getNumRegs()),
2381
0
    ArrayRef(AltOrder1)
2382
0
  };
2383
0
  const unsigned Select = VF128BitAltOrderSelect(MF);
2384
0
  assert(Select < 2);
2385
0
  return Order[Select];
2386
0
}
2387
2388
0
static inline unsigned FP128BitAltOrderSelect(const MachineFunction &MF) {
2389
0
        const SystemZSubtarget &S = MF.getSubtarget<SystemZSubtarget>();
2390
0
        return S.isTargetXPLINK64();
2391
0
      }
2392
2393
0
static ArrayRef<MCPhysReg> FP128BitGetRawAllocationOrder(const MachineFunction &MF) {
2394
0
  static const MCPhysReg AltOrder1[] = { SystemZ::F0Q, SystemZ::F1Q, SystemZ::F4Q, SystemZ::F5Q, SystemZ::F8Q, SystemZ::F9Q, SystemZ::F12Q, SystemZ::F13Q };
2395
0
  const MCRegisterClass &MCR = SystemZMCRegisterClasses[SystemZ::FP128BitRegClassID];
2396
0
  const ArrayRef<MCPhysReg> Order[] = {
2397
0
    ArrayRef(MCR.begin(), MCR.getNumRegs()),
2398
0
    ArrayRef(AltOrder1)
2399
0
  };
2400
0
  const unsigned Select = FP128BitAltOrderSelect(MF);
2401
0
  assert(Select < 2);
2402
0
  return Order[Select];
2403
0
}
2404
2405
0
static inline unsigned GR128BitAltOrderSelect(const MachineFunction &MF) {
2406
0
        const SystemZSubtarget &S = MF.getSubtarget<SystemZSubtarget>();
2407
0
        return S.isTargetXPLINK64();
2408
0
      }
2409
2410
0
static ArrayRef<MCPhysReg> GR128BitGetRawAllocationOrder(const MachineFunction &MF) {
2411
0
  static const MCPhysReg AltOrder1[] = { SystemZ::R0Q, SystemZ::R2Q, SystemZ::R4Q, SystemZ::R6Q, SystemZ::R8Q, SystemZ::R10Q, SystemZ::R12Q, SystemZ::R14Q };
2412
0
  const MCRegisterClass &MCR = SystemZMCRegisterClasses[SystemZ::GR128BitRegClassID];
2413
0
  const ArrayRef<MCPhysReg> Order[] = {
2414
0
    ArrayRef(MCR.begin(), MCR.getNumRegs()),
2415
0
    ArrayRef(AltOrder1)
2416
0
  };
2417
0
  const unsigned Select = GR128BitAltOrderSelect(MF);
2418
0
  assert(Select < 2);
2419
0
  return Order[Select];
2420
0
}
2421
2422
0
static inline unsigned ADDR128BitAltOrderSelect(const MachineFunction &MF) {
2423
0
        const SystemZSubtarget &S = MF.getSubtarget<SystemZSubtarget>();
2424
0
        return S.isTargetXPLINK64();
2425
0
      }
2426
2427
0
static ArrayRef<MCPhysReg> ADDR128BitGetRawAllocationOrder(const MachineFunction &MF) {
2428
0
  static const MCPhysReg AltOrder1[] = { SystemZ::R2Q, SystemZ::R4Q, SystemZ::R6Q, SystemZ::R8Q, SystemZ::R10Q, SystemZ::R12Q, SystemZ::R14Q };
2429
0
  const MCRegisterClass &MCR = SystemZMCRegisterClasses[SystemZ::ADDR128BitRegClassID];
2430
0
  const ArrayRef<MCPhysReg> Order[] = {
2431
0
    ArrayRef(MCR.begin(), MCR.getNumRegs()),
2432
0
    ArrayRef(AltOrder1)
2433
0
  };
2434
0
  const unsigned Select = ADDR128BitAltOrderSelect(MF);
2435
0
  assert(Select < 2);
2436
0
  return Order[Select];
2437
0
}
2438
2439
namespace SystemZ {   // Register class instances
2440
  extern const TargetRegisterClass GRX32BitRegClass = {
2441
    &SystemZMCRegisterClasses[GRX32BitRegClassID],
2442
    GRX32BitSubClassMask,
2443
    SuperRegIdxSeqs + 9,
2444
    LaneBitmask(0x0000000000000001),
2445
    0,
2446
    false,
2447
    0x00, /* TSFlags */
2448
    false, /* HasDisjunctSubRegs */
2449
    false, /* CoveredBySubRegs */
2450
    NullRegClasses,
2451
    GRX32BitGetRawAllocationOrder
2452
  };
2453
2454
  extern const TargetRegisterClass VR32BitRegClass = {
2455
    &SystemZMCRegisterClasses[VR32BitRegClassID],
2456
    VR32BitSubClassMask,
2457
    SuperRegIdxSeqs + 3,
2458
    LaneBitmask(0x0000000000000001),
2459
    0,
2460
    false,
2461
    0x00, /* TSFlags */
2462
    false, /* HasDisjunctSubRegs */
2463
    false, /* CoveredBySubRegs */
2464
    NullRegClasses,
2465
    VR32BitGetRawAllocationOrder
2466
  };
2467
2468
  extern const TargetRegisterClass AR32BitRegClass = {
2469
    &SystemZMCRegisterClasses[AR32BitRegClassID],
2470
    AR32BitSubClassMask,
2471
    SuperRegIdxSeqs + 2,
2472
    LaneBitmask(0x0000000000000001),
2473
    0,
2474
    false,
2475
    0x00, /* TSFlags */
2476
    false, /* HasDisjunctSubRegs */
2477
    false, /* CoveredBySubRegs */
2478
    NullRegClasses,
2479
    AR32BitGetRawAllocationOrder
2480
  };
2481
2482
  extern const TargetRegisterClass FP32BitRegClass = {
2483
    &SystemZMCRegisterClasses[FP32BitRegClassID],
2484
    FP32BitSubClassMask,
2485
    SuperRegIdxSeqs + 3,
2486
    LaneBitmask(0x0000000000000001),
2487
    0,
2488
    false,
2489
    0x00, /* TSFlags */
2490
    false, /* HasDisjunctSubRegs */
2491
    false, /* CoveredBySubRegs */
2492
    FP32BitSuperclasses,
2493
    FP32BitGetRawAllocationOrder
2494
  };
2495
2496
  extern const TargetRegisterClass GR32BitRegClass = {
2497
    &SystemZMCRegisterClasses[GR32BitRegClassID],
2498
    GR32BitSubClassMask,
2499
    SuperRegIdxSeqs + 6,
2500
    LaneBitmask(0x0000000000000001),
2501
    0,
2502
    false,
2503
    0x00, /* TSFlags */
2504
    false, /* HasDisjunctSubRegs */
2505
    false, /* CoveredBySubRegs */
2506
    GR32BitSuperclasses,
2507
    GR32BitGetRawAllocationOrder
2508
  };
2509
2510
  extern const TargetRegisterClass GRH32BitRegClass = {
2511
    &SystemZMCRegisterClasses[GRH32BitRegClassID],
2512
    GRH32BitSubClassMask,
2513
    SuperRegIdxSeqs + 3,
2514
    LaneBitmask(0x0000000000000001),
2515
    0,
2516
    false,
2517
    0x00, /* TSFlags */
2518
    false, /* HasDisjunctSubRegs */
2519
    false, /* CoveredBySubRegs */
2520
    GRH32BitSuperclasses,
2521
    GRH32BitGetRawAllocationOrder
2522
  };
2523
2524
  extern const TargetRegisterClass ADDR32BitRegClass = {
2525
    &SystemZMCRegisterClasses[ADDR32BitRegClassID],
2526
    ADDR32BitSubClassMask,
2527
    SuperRegIdxSeqs + 6,
2528
    LaneBitmask(0x0000000000000001),
2529
    0,
2530
    false,
2531
    0x00, /* TSFlags */
2532
    false, /* HasDisjunctSubRegs */
2533
    false, /* CoveredBySubRegs */
2534
    ADDR32BitSuperclasses,
2535
    ADDR32BitGetRawAllocationOrder
2536
  };
2537
2538
  extern const TargetRegisterClass CCRRegClass = {
2539
    &SystemZMCRegisterClasses[CCRRegClassID],
2540
    CCRSubClassMask,
2541
    SuperRegIdxSeqs + 2,
2542
    LaneBitmask(0x0000000000000001),
2543
    0,
2544
    false,
2545
    0x00, /* TSFlags */
2546
    false, /* HasDisjunctSubRegs */
2547
    false, /* CoveredBySubRegs */
2548
    NullRegClasses,
2549
    nullptr
2550
  };
2551
2552
  extern const TargetRegisterClass FPCRegsRegClass = {
2553
    &SystemZMCRegisterClasses[FPCRegsRegClassID],
2554
    FPCRegsSubClassMask,
2555
    SuperRegIdxSeqs + 2,
2556
    LaneBitmask(0x0000000000000001),
2557
    0,
2558
    false,
2559
    0x00, /* TSFlags */
2560
    false, /* HasDisjunctSubRegs */
2561
    false, /* CoveredBySubRegs */
2562
    NullRegClasses,
2563
    nullptr
2564
  };
2565
2566
  extern const TargetRegisterClass AnyRegBitRegClass = {
2567
    &SystemZMCRegisterClasses[AnyRegBitRegClassID],
2568
    AnyRegBitSubClassMask,
2569
    SuperRegIdxSeqs + 0,
2570
    LaneBitmask(0x0000000000000003),
2571
    0,
2572
    false,
2573
    0x00, /* TSFlags */
2574
    true, /* HasDisjunctSubRegs */
2575
    false, /* CoveredBySubRegs */
2576
    NullRegClasses,
2577
    AnyRegBitGetRawAllocationOrder
2578
  };
2579
2580
  extern const TargetRegisterClass AnyRegBit_with_subreg_h32_in_FP32BitRegClass = {
2581
    &SystemZMCRegisterClasses[AnyRegBit_with_subreg_h32_in_FP32BitRegClassID],
2582
    AnyRegBit_with_subreg_h32_in_FP32BitSubClassMask,
2583
    SuperRegIdxSeqs + 0,
2584
    LaneBitmask(0x0000000000000003),
2585
    0,
2586
    false,
2587
    0x00, /* TSFlags */
2588
    false, /* HasDisjunctSubRegs */
2589
    false, /* CoveredBySubRegs */
2590
    AnyRegBit_with_subreg_h32_in_FP32BitSuperclasses,
2591
    AnyRegBit_with_subreg_h32_in_FP32BitGetRawAllocationOrder
2592
  };
2593
2594
  extern const TargetRegisterClass VR64BitRegClass = {
2595
    &SystemZMCRegisterClasses[VR64BitRegClassID],
2596
    VR64BitSubClassMask,
2597
    SuperRegIdxSeqs + 0,
2598
    LaneBitmask(0x0000000000000001),
2599
    0,
2600
    false,
2601
    0x00, /* TSFlags */
2602
    false, /* HasDisjunctSubRegs */
2603
    false, /* CoveredBySubRegs */
2604
    NullRegClasses,
2605
    VR64BitGetRawAllocationOrder
2606
  };
2607
2608
  extern const TargetRegisterClass AnyRegBit_with_subreg_h64RegClass = {
2609
    &SystemZMCRegisterClasses[AnyRegBit_with_subreg_h64RegClassID],
2610
    AnyRegBit_with_subreg_h64SubClassMask,
2611
    SuperRegIdxSeqs + 2,
2612
    LaneBitmask(0x0000000000000003),
2613
    0,
2614
    false,
2615
    0x00, /* TSFlags */
2616
    false, /* HasDisjunctSubRegs */
2617
    false, /* CoveredBySubRegs */
2618
    AnyRegBit_with_subreg_h64Superclasses,
2619
    AnyRegBit_with_subreg_h64GetRawAllocationOrder
2620
  };
2621
2622
  extern const TargetRegisterClass CR64BitRegClass = {
2623
    &SystemZMCRegisterClasses[CR64BitRegClassID],
2624
    CR64BitSubClassMask,
2625
    SuperRegIdxSeqs + 2,
2626
    LaneBitmask(0x0000000000000001),
2627
    0,
2628
    false,
2629
    0x00, /* TSFlags */
2630
    false, /* HasDisjunctSubRegs */
2631
    false, /* CoveredBySubRegs */
2632
    NullRegClasses,
2633
    CR64BitGetRawAllocationOrder
2634
  };
2635
2636
  extern const TargetRegisterClass FP64BitRegClass = {
2637
    &SystemZMCRegisterClasses[FP64BitRegClassID],
2638
    FP64BitSubClassMask,
2639
    SuperRegIdxSeqs + 0,
2640
    LaneBitmask(0x0000000000000001),
2641
    0,
2642
    false,
2643
    0x00, /* TSFlags */
2644
    false, /* HasDisjunctSubRegs */
2645
    false, /* CoveredBySubRegs */
2646
    FP64BitSuperclasses,
2647
    FP64BitGetRawAllocationOrder
2648
  };
2649
2650
  extern const TargetRegisterClass GR64BitRegClass = {
2651
    &SystemZMCRegisterClasses[GR64BitRegClassID],
2652
    GR64BitSubClassMask,
2653
    SuperRegIdxSeqs + 0,
2654
    LaneBitmask(0x0000000000000003),
2655
    0,
2656
    false,
2657
    0x00, /* TSFlags */
2658
    true, /* HasDisjunctSubRegs */
2659
    true, /* CoveredBySubRegs */
2660
    GR64BitSuperclasses,
2661
    GR64BitGetRawAllocationOrder
2662
  };
2663
2664
  extern const TargetRegisterClass ADDR64BitRegClass = {
2665
    &SystemZMCRegisterClasses[ADDR64BitRegClassID],
2666
    ADDR64BitSubClassMask,
2667
    SuperRegIdxSeqs + 0,
2668
    LaneBitmask(0x0000000000000003),
2669
    0,
2670
    false,
2671
    0x00, /* TSFlags */
2672
    true, /* HasDisjunctSubRegs */
2673
    true, /* CoveredBySubRegs */
2674
    ADDR64BitSuperclasses,
2675
    ADDR64BitGetRawAllocationOrder
2676
  };
2677
2678
  extern const TargetRegisterClass VR128BitRegClass = {
2679
    &SystemZMCRegisterClasses[VR128BitRegClassID],
2680
    VR128BitSubClassMask,
2681
    SuperRegIdxSeqs + 2,
2682
    LaneBitmask(0x0000000000000003),
2683
    0,
2684
    false,
2685
    0x00, /* TSFlags */
2686
    false, /* HasDisjunctSubRegs */
2687
    false, /* CoveredBySubRegs */
2688
    NullRegClasses,
2689
    VR128BitGetRawAllocationOrder
2690
  };
2691
2692
  extern const TargetRegisterClass VF128BitRegClass = {
2693
    &SystemZMCRegisterClasses[VF128BitRegClassID],
2694
    VF128BitSubClassMask,
2695
    SuperRegIdxSeqs + 2,
2696
    LaneBitmask(0x0000000000000003),
2697
    0,
2698
    false,
2699
    0x00, /* TSFlags */
2700
    false, /* HasDisjunctSubRegs */
2701
    false, /* CoveredBySubRegs */
2702
    VF128BitSuperclasses,
2703
    VF128BitGetRawAllocationOrder
2704
  };
2705
2706
  extern const TargetRegisterClass FP128BitRegClass = {
2707
    &SystemZMCRegisterClasses[FP128BitRegClassID],
2708
    FP128BitSubClassMask,
2709
    SuperRegIdxSeqs + 2,
2710
    LaneBitmask(0x000000000000000F),
2711
    0,
2712
    false,
2713
    0x00, /* TSFlags */
2714
    true, /* HasDisjunctSubRegs */
2715
    true, /* CoveredBySubRegs */
2716
    NullRegClasses,
2717
    FP128BitGetRawAllocationOrder
2718
  };
2719
2720
  extern const TargetRegisterClass GR128BitRegClass = {
2721
    &SystemZMCRegisterClasses[GR128BitRegClassID],
2722
    GR128BitSubClassMask,
2723
    SuperRegIdxSeqs + 2,
2724
    LaneBitmask(0x000000000000000F),
2725
    0,
2726
    false,
2727
    0x00, /* TSFlags */
2728
    true, /* HasDisjunctSubRegs */
2729
    true, /* CoveredBySubRegs */
2730
    NullRegClasses,
2731
    GR128BitGetRawAllocationOrder
2732
  };
2733
2734
  extern const TargetRegisterClass ADDR128BitRegClass = {
2735
    &SystemZMCRegisterClasses[ADDR128BitRegClassID],
2736
    ADDR128BitSubClassMask,
2737
    SuperRegIdxSeqs + 2,
2738
    LaneBitmask(0x000000000000000F),
2739
    0,
2740
    false,
2741
    0x00, /* TSFlags */
2742
    true, /* HasDisjunctSubRegs */
2743
    true, /* CoveredBySubRegs */
2744
    ADDR128BitSuperclasses,
2745
    ADDR128BitGetRawAllocationOrder
2746
  };
2747
2748
} // end namespace SystemZ
2749
2750
namespace {
2751
  const TargetRegisterClass *const RegisterClasses[] = {
2752
    &SystemZ::GRX32BitRegClass,
2753
    &SystemZ::VR32BitRegClass,
2754
    &SystemZ::AR32BitRegClass,
2755
    &SystemZ::FP32BitRegClass,
2756
    &SystemZ::GR32BitRegClass,
2757
    &SystemZ::GRH32BitRegClass,
2758
    &SystemZ::ADDR32BitRegClass,
2759
    &SystemZ::CCRRegClass,
2760
    &SystemZ::FPCRegsRegClass,
2761
    &SystemZ::AnyRegBitRegClass,
2762
    &SystemZ::AnyRegBit_with_subreg_h32_in_FP32BitRegClass,
2763
    &SystemZ::VR64BitRegClass,
2764
    &SystemZ::AnyRegBit_with_subreg_h64RegClass,
2765
    &SystemZ::CR64BitRegClass,
2766
    &SystemZ::FP64BitRegClass,
2767
    &SystemZ::GR64BitRegClass,
2768
    &SystemZ::ADDR64BitRegClass,
2769
    &SystemZ::VR128BitRegClass,
2770
    &SystemZ::VF128BitRegClass,
2771
    &SystemZ::FP128BitRegClass,
2772
    &SystemZ::GR128BitRegClass,
2773
    &SystemZ::ADDR128BitRegClass,
2774
  };
2775
} // end anonymous namespace
2776
2777
static const uint8_t CostPerUseTable[] = { 
2778
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, };
2779
2780
2781
static const bool InAllocatableClassTable[] = { 
2782
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, 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, };
2783
2784
2785
static const TargetRegisterInfoDesc SystemZRegInfoDesc = { // Extra Descriptors
2786
CostPerUseTable, 1, InAllocatableClassTable};
2787
2788
0
unsigned SystemZGenRegisterInfo::composeSubRegIndicesImpl(unsigned IdxA, unsigned IdxB) const {
2789
0
  static const uint8_t RowMap[6] = {
2790
0
    0, 0, 0, 1, 0, 0, 
2791
0
  };
2792
0
  static const uint8_t Rows[2][6] = {
2793
0
    { SystemZ::subreg_h32, 0, SystemZ::subreg_l32, 0, 0, 0, },
2794
0
    { SystemZ::subreg_lh32, 0, SystemZ::subreg_ll32, 0, 0, 0, },
2795
0
  };
2796
2797
0
  --IdxA; assert(IdxA < 6); (void) IdxA;
2798
0
  --IdxB; assert(IdxB < 6);
2799
0
  return Rows[RowMap[IdxA]][IdxB];
2800
0
}
2801
2802
  struct MaskRolOp {
2803
    LaneBitmask Mask;
2804
    uint8_t  RotateLeft;
2805
  };
2806
  static const MaskRolOp LaneMaskComposeSequences[] = {
2807
    { LaneBitmask(0xFFFFFFFFFFFFFFFF),  0 }, { LaneBitmask::getNone(), 0 },   // Sequence 0
2808
    { LaneBitmask(0xFFFFFFFFFFFFFFFF),  1 }, { LaneBitmask::getNone(), 0 },   // Sequence 2
2809
    { LaneBitmask(0xFFFFFFFFFFFFFFFF),  2 }, { LaneBitmask::getNone(), 0 },   // Sequence 4
2810
    { LaneBitmask(0xFFFFFFFFFFFFFFFF),  3 }, { LaneBitmask::getNone(), 0 }  // Sequence 6
2811
  };
2812
  static const uint8_t CompositeSequences[] = {
2813
    0, // to subreg_h32
2814
    0, // to subreg_h64
2815
    2, // to subreg_l32
2816
    4, // to subreg_l64
2817
    4, // to subreg_lh32
2818
    6 // to subreg_ll32
2819
  };
2820
2821
0
LaneBitmask SystemZGenRegisterInfo::composeSubRegIndexLaneMaskImpl(unsigned IdxA, LaneBitmask LaneMask) const {
2822
0
  --IdxA; assert(IdxA < 6 && "Subregister index out of bounds");
2823
0
  LaneBitmask Result;
2824
0
  for (const MaskRolOp *Ops =
2825
0
       &LaneMaskComposeSequences[CompositeSequences[IdxA]];
2826
0
       Ops->Mask.any(); ++Ops) {
2827
0
    LaneBitmask::Type M = LaneMask.getAsInteger() & Ops->Mask.getAsInteger();
2828
0
    if (unsigned S = Ops->RotateLeft)
2829
0
      Result |= LaneBitmask((M << S) | (M >> (LaneBitmask::BitWidth - S)));
2830
0
    else
2831
0
      Result |= LaneBitmask(M);
2832
0
  }
2833
0
  return Result;
2834
0
}
2835
2836
0
LaneBitmask SystemZGenRegisterInfo::reverseComposeSubRegIndexLaneMaskImpl(unsigned IdxA,  LaneBitmask LaneMask) const {
2837
0
  LaneMask &= getSubRegIndexLaneMask(IdxA);
2838
0
  --IdxA; assert(IdxA < 6 && "Subregister index out of bounds");
2839
0
  LaneBitmask Result;
2840
0
  for (const MaskRolOp *Ops =
2841
0
       &LaneMaskComposeSequences[CompositeSequences[IdxA]];
2842
0
       Ops->Mask.any(); ++Ops) {
2843
0
    LaneBitmask::Type M = LaneMask.getAsInteger();
2844
0
    if (unsigned S = Ops->RotateLeft)
2845
0
      Result |= LaneBitmask((M >> S) | (M << (LaneBitmask::BitWidth - S)));
2846
0
    else
2847
0
      Result |= LaneBitmask(M);
2848
0
  }
2849
0
  return Result;
2850
0
}
2851
2852
0
const TargetRegisterClass *SystemZGenRegisterInfo::getSubClassWithSubReg(const TargetRegisterClass *RC, unsigned Idx) const {
2853
0
  static const uint8_t Table[22][6] = {
2854
0
    { // GRX32Bit
2855
0
      0,  // subreg_h32
2856
0
      0,  // subreg_h64
2857
0
      0,  // subreg_l32
2858
0
      0,  // subreg_l64
2859
0
      0,  // subreg_lh32
2860
0
      0,  // subreg_ll32
2861
0
    },
2862
0
    { // VR32Bit
2863
0
      0,  // subreg_h32
2864
0
      0,  // subreg_h64
2865
0
      0,  // subreg_l32
2866
0
      0,  // subreg_l64
2867
0
      0,  // subreg_lh32
2868
0
      0,  // subreg_ll32
2869
0
    },
2870
0
    { // AR32Bit
2871
0
      0,  // subreg_h32
2872
0
      0,  // subreg_h64
2873
0
      0,  // subreg_l32
2874
0
      0,  // subreg_l64
2875
0
      0,  // subreg_lh32
2876
0
      0,  // subreg_ll32
2877
0
    },
2878
0
    { // FP32Bit
2879
0
      0,  // subreg_h32
2880
0
      0,  // subreg_h64
2881
0
      0,  // subreg_l32
2882
0
      0,  // subreg_l64
2883
0
      0,  // subreg_lh32
2884
0
      0,  // subreg_ll32
2885
0
    },
2886
0
    { // GR32Bit
2887
0
      0,  // subreg_h32
2888
0
      0,  // subreg_h64
2889
0
      0,  // subreg_l32
2890
0
      0,  // subreg_l64
2891
0
      0,  // subreg_lh32
2892
0
      0,  // subreg_ll32
2893
0
    },
2894
0
    { // GRH32Bit
2895
0
      0,  // subreg_h32
2896
0
      0,  // subreg_h64
2897
0
      0,  // subreg_l32
2898
0
      0,  // subreg_l64
2899
0
      0,  // subreg_lh32
2900
0
      0,  // subreg_ll32
2901
0
    },
2902
0
    { // ADDR32Bit
2903
0
      0,  // subreg_h32
2904
0
      0,  // subreg_h64
2905
0
      0,  // subreg_l32
2906
0
      0,  // subreg_l64
2907
0
      0,  // subreg_lh32
2908
0
      0,  // subreg_ll32
2909
0
    },
2910
0
    { // CCR
2911
0
      0,  // subreg_h32
2912
0
      0,  // subreg_h64
2913
0
      0,  // subreg_l32
2914
0
      0,  // subreg_l64
2915
0
      0,  // subreg_lh32
2916
0
      0,  // subreg_ll32
2917
0
    },
2918
0
    { // FPCRegs
2919
0
      0,  // subreg_h32
2920
0
      0,  // subreg_h64
2921
0
      0,  // subreg_l32
2922
0
      0,  // subreg_l64
2923
0
      0,  // subreg_lh32
2924
0
      0,  // subreg_ll32
2925
0
    },
2926
0
    { // AnyRegBit
2927
0
      10, // subreg_h32 -> AnyRegBit
2928
0
      13, // subreg_h64 -> AnyRegBit_with_subreg_h64
2929
0
      16, // subreg_l32 -> GR64Bit
2930
0
      0,  // subreg_l64
2931
0
      0,  // subreg_lh32
2932
0
      0,  // subreg_ll32
2933
0
    },
2934
0
    { // AnyRegBit_with_subreg_h32_in_FP32Bit
2935
0
      11, // subreg_h32 -> AnyRegBit_with_subreg_h32_in_FP32Bit
2936
0
      13, // subreg_h64 -> AnyRegBit_with_subreg_h64
2937
0
      0,  // subreg_l32
2938
0
      0,  // subreg_l64
2939
0
      0,  // subreg_lh32
2940
0
      0,  // subreg_ll32
2941
0
    },
2942
0
    { // VR64Bit
2943
0
      12, // subreg_h32 -> VR64Bit
2944
0
      0,  // subreg_h64
2945
0
      0,  // subreg_l32
2946
0
      0,  // subreg_l64
2947
0
      0,  // subreg_lh32
2948
0
      0,  // subreg_ll32
2949
0
    },
2950
0
    { // AnyRegBit_with_subreg_h64
2951
0
      13, // subreg_h32 -> AnyRegBit_with_subreg_h64
2952
0
      13, // subreg_h64 -> AnyRegBit_with_subreg_h64
2953
0
      0,  // subreg_l32
2954
0
      0,  // subreg_l64
2955
0
      0,  // subreg_lh32
2956
0
      0,  // subreg_ll32
2957
0
    },
2958
0
    { // CR64Bit
2959
0
      0,  // subreg_h32
2960
0
      0,  // subreg_h64
2961
0
      0,  // subreg_l32
2962
0
      0,  // subreg_l64
2963
0
      0,  // subreg_lh32
2964
0
      0,  // subreg_ll32
2965
0
    },
2966
0
    { // FP64Bit
2967
0
      15, // subreg_h32 -> FP64Bit
2968
0
      0,  // subreg_h64
2969
0
      0,  // subreg_l32
2970
0
      0,  // subreg_l64
2971
0
      0,  // subreg_lh32
2972
0
      0,  // subreg_ll32
2973
0
    },
2974
0
    { // GR64Bit
2975
0
      16, // subreg_h32 -> GR64Bit
2976
0
      0,  // subreg_h64
2977
0
      16, // subreg_l32 -> GR64Bit
2978
0
      0,  // subreg_l64
2979
0
      0,  // subreg_lh32
2980
0
      0,  // subreg_ll32
2981
0
    },
2982
0
    { // ADDR64Bit
2983
0
      17, // subreg_h32 -> ADDR64Bit
2984
0
      0,  // subreg_h64
2985
0
      17, // subreg_l32 -> ADDR64Bit
2986
0
      0,  // subreg_l64
2987
0
      0,  // subreg_lh32
2988
0
      0,  // subreg_ll32
2989
0
    },
2990
0
    { // VR128Bit
2991
0
      18, // subreg_h32 -> VR128Bit
2992
0
      18, // subreg_h64 -> VR128Bit
2993
0
      0,  // subreg_l32
2994
0
      0,  // subreg_l64
2995
0
      0,  // subreg_lh32
2996
0
      0,  // subreg_ll32
2997
0
    },
2998
0
    { // VF128Bit
2999
0
      19, // subreg_h32 -> VF128Bit
3000
0
      19, // subreg_h64 -> VF128Bit
3001
0
      0,  // subreg_l32
3002
0
      0,  // subreg_l64
3003
0
      0,  // subreg_lh32
3004
0
      0,  // subreg_ll32
3005
0
    },
3006
0
    { // FP128Bit
3007
0
      20, // subreg_h32 -> FP128Bit
3008
0
      20, // subreg_h64 -> FP128Bit
3009
0
      0,  // subreg_l32
3010
0
      20, // subreg_l64 -> FP128Bit
3011
0
      20, // subreg_lh32 -> FP128Bit
3012
0
      0,  // subreg_ll32
3013
0
    },
3014
0
    { // GR128Bit
3015
0
      21, // subreg_h32 -> GR128Bit
3016
0
      21, // subreg_h64 -> GR128Bit
3017
0
      21, // subreg_l32 -> GR128Bit
3018
0
      21, // subreg_l64 -> GR128Bit
3019
0
      21, // subreg_lh32 -> GR128Bit
3020
0
      21, // subreg_ll32 -> GR128Bit
3021
0
    },
3022
0
    { // ADDR128Bit
3023
0
      22, // subreg_h32 -> ADDR128Bit
3024
0
      22, // subreg_h64 -> ADDR128Bit
3025
0
      22, // subreg_l32 -> ADDR128Bit
3026
0
      22, // subreg_l64 -> ADDR128Bit
3027
0
      22, // subreg_lh32 -> ADDR128Bit
3028
0
      22, // subreg_ll32 -> ADDR128Bit
3029
0
    },
3030
0
  };
3031
0
  assert(RC && "Missing regclass");
3032
0
  if (!Idx) return RC;
3033
0
  --Idx;
3034
0
  assert(Idx < 6 && "Bad subreg");
3035
0
  unsigned TV = Table[RC->getID()][Idx];
3036
0
  return TV ? getRegClass(TV - 1) : nullptr;
3037
0
}
3038
3039
0
const TargetRegisterClass *SystemZGenRegisterInfo::getSubRegisterClass(const TargetRegisterClass *RC, unsigned Idx) const {
3040
0
  static const uint8_t Table[22][6] = {
3041
0
    { // GRX32Bit
3042
0
      0,  // GRX32Bit:subreg_h32
3043
0
      0,  // GRX32Bit:subreg_h64
3044
0
      0,  // GRX32Bit:subreg_l32
3045
0
      0,  // GRX32Bit:subreg_l64
3046
0
      0,  // GRX32Bit:subreg_lh32
3047
0
      0,  // GRX32Bit:subreg_ll32
3048
0
    },
3049
0
    { // VR32Bit
3050
0
      0,  // VR32Bit:subreg_h32
3051
0
      0,  // VR32Bit:subreg_h64
3052
0
      0,  // VR32Bit:subreg_l32
3053
0
      0,  // VR32Bit:subreg_l64
3054
0
      0,  // VR32Bit:subreg_lh32
3055
0
      0,  // VR32Bit:subreg_ll32
3056
0
    },
3057
0
    { // AR32Bit
3058
0
      0,  // AR32Bit:subreg_h32
3059
0
      0,  // AR32Bit:subreg_h64
3060
0
      0,  // AR32Bit:subreg_l32
3061
0
      0,  // AR32Bit:subreg_l64
3062
0
      0,  // AR32Bit:subreg_lh32
3063
0
      0,  // AR32Bit:subreg_ll32
3064
0
    },
3065
0
    { // FP32Bit
3066
0
      0,  // FP32Bit:subreg_h32
3067
0
      0,  // FP32Bit:subreg_h64
3068
0
      0,  // FP32Bit:subreg_l32
3069
0
      0,  // FP32Bit:subreg_l64
3070
0
      0,  // FP32Bit:subreg_lh32
3071
0
      0,  // FP32Bit:subreg_ll32
3072
0
    },
3073
0
    { // GR32Bit
3074
0
      0,  // GR32Bit:subreg_h32
3075
0
      0,  // GR32Bit:subreg_h64
3076
0
      0,  // GR32Bit:subreg_l32
3077
0
      0,  // GR32Bit:subreg_l64
3078
0
      0,  // GR32Bit:subreg_lh32
3079
0
      0,  // GR32Bit:subreg_ll32
3080
0
    },
3081
0
    { // GRH32Bit
3082
0
      0,  // GRH32Bit:subreg_h32
3083
0
      0,  // GRH32Bit:subreg_h64
3084
0
      0,  // GRH32Bit:subreg_l32
3085
0
      0,  // GRH32Bit:subreg_l64
3086
0
      0,  // GRH32Bit:subreg_lh32
3087
0
      0,  // GRH32Bit:subreg_ll32
3088
0
    },
3089
0
    { // ADDR32Bit
3090
0
      0,  // ADDR32Bit:subreg_h32
3091
0
      0,  // ADDR32Bit:subreg_h64
3092
0
      0,  // ADDR32Bit:subreg_l32
3093
0
      0,  // ADDR32Bit:subreg_l64
3094
0
      0,  // ADDR32Bit:subreg_lh32
3095
0
      0,  // ADDR32Bit:subreg_ll32
3096
0
    },
3097
0
    { // CCR
3098
0
      0,  // CCR:subreg_h32
3099
0
      0,  // CCR:subreg_h64
3100
0
      0,  // CCR:subreg_l32
3101
0
      0,  // CCR:subreg_l64
3102
0
      0,  // CCR:subreg_lh32
3103
0
      0,  // CCR:subreg_ll32
3104
0
    },
3105
0
    { // FPCRegs
3106
0
      0,  // FPCRegs:subreg_h32
3107
0
      0,  // FPCRegs:subreg_h64
3108
0
      0,  // FPCRegs:subreg_l32
3109
0
      0,  // FPCRegs:subreg_l64
3110
0
      0,  // FPCRegs:subreg_lh32
3111
0
      0,  // FPCRegs:subreg_ll32
3112
0
    },
3113
0
    { // AnyRegBit
3114
0
      2,  // AnyRegBit:subreg_h32 -> VR32Bit
3115
0
      15, // AnyRegBit:subreg_h64 -> FP64Bit
3116
0
      5,  // AnyRegBit:subreg_l32 -> GR32Bit
3117
0
      0,  // AnyRegBit:subreg_l64
3118
0
      0,  // AnyRegBit:subreg_lh32
3119
0
      0,  // AnyRegBit:subreg_ll32
3120
0
    },
3121
0
    { // AnyRegBit_with_subreg_h32_in_FP32Bit
3122
0
      2,  // AnyRegBit_with_subreg_h32_in_FP32Bit:subreg_h32 -> VR32Bit
3123
0
      15, // AnyRegBit_with_subreg_h32_in_FP32Bit:subreg_h64 -> FP64Bit
3124
0
      0,  // AnyRegBit_with_subreg_h32_in_FP32Bit:subreg_l32
3125
0
      0,  // AnyRegBit_with_subreg_h32_in_FP32Bit:subreg_l64
3126
0
      0,  // AnyRegBit_with_subreg_h32_in_FP32Bit:subreg_lh32
3127
0
      0,  // AnyRegBit_with_subreg_h32_in_FP32Bit:subreg_ll32
3128
0
    },
3129
0
    { // VR64Bit
3130
0
      2,  // VR64Bit:subreg_h32 -> VR32Bit
3131
0
      0,  // VR64Bit:subreg_h64
3132
0
      0,  // VR64Bit:subreg_l32
3133
0
      0,  // VR64Bit:subreg_l64
3134
0
      0,  // VR64Bit:subreg_lh32
3135
0
      0,  // VR64Bit:subreg_ll32
3136
0
    },
3137
0
    { // AnyRegBit_with_subreg_h64
3138
0
      4,  // AnyRegBit_with_subreg_h64:subreg_h32 -> FP32Bit
3139
0
      15, // AnyRegBit_with_subreg_h64:subreg_h64 -> FP64Bit
3140
0
      0,  // AnyRegBit_with_subreg_h64:subreg_l32
3141
0
      0,  // AnyRegBit_with_subreg_h64:subreg_l64
3142
0
      0,  // AnyRegBit_with_subreg_h64:subreg_lh32
3143
0
      0,  // AnyRegBit_with_subreg_h64:subreg_ll32
3144
0
    },
3145
0
    { // CR64Bit
3146
0
      0,  // CR64Bit:subreg_h32
3147
0
      0,  // CR64Bit:subreg_h64
3148
0
      0,  // CR64Bit:subreg_l32
3149
0
      0,  // CR64Bit:subreg_l64
3150
0
      0,  // CR64Bit:subreg_lh32
3151
0
      0,  // CR64Bit:subreg_ll32
3152
0
    },
3153
0
    { // FP64Bit
3154
0
      4,  // FP64Bit:subreg_h32 -> FP32Bit
3155
0
      0,  // FP64Bit:subreg_h64
3156
0
      0,  // FP64Bit:subreg_l32
3157
0
      0,  // FP64Bit:subreg_l64
3158
0
      0,  // FP64Bit:subreg_lh32
3159
0
      0,  // FP64Bit:subreg_ll32
3160
0
    },
3161
0
    { // GR64Bit
3162
0
      6,  // GR64Bit:subreg_h32 -> GRH32Bit
3163
0
      0,  // GR64Bit:subreg_h64
3164
0
      5,  // GR64Bit:subreg_l32 -> GR32Bit
3165
0
      0,  // GR64Bit:subreg_l64
3166
0
      0,  // GR64Bit:subreg_lh32
3167
0
      0,  // GR64Bit:subreg_ll32
3168
0
    },
3169
0
    { // ADDR64Bit
3170
0
      6,  // ADDR64Bit:subreg_h32 -> GRH32Bit
3171
0
      0,  // ADDR64Bit:subreg_h64
3172
0
      7,  // ADDR64Bit:subreg_l32 -> ADDR32Bit
3173
0
      0,  // ADDR64Bit:subreg_l64
3174
0
      0,  // ADDR64Bit:subreg_lh32
3175
0
      0,  // ADDR64Bit:subreg_ll32
3176
0
    },
3177
0
    { // VR128Bit
3178
0
      2,  // VR128Bit:subreg_h32 -> VR32Bit
3179
0
      12, // VR128Bit:subreg_h64 -> VR64Bit
3180
0
      0,  // VR128Bit:subreg_l32
3181
0
      0,  // VR128Bit:subreg_l64
3182
0
      0,  // VR128Bit:subreg_lh32
3183
0
      0,  // VR128Bit:subreg_ll32
3184
0
    },
3185
0
    { // VF128Bit
3186
0
      4,  // VF128Bit:subreg_h32 -> FP32Bit
3187
0
      15, // VF128Bit:subreg_h64 -> FP64Bit
3188
0
      0,  // VF128Bit:subreg_l32
3189
0
      0,  // VF128Bit:subreg_l64
3190
0
      0,  // VF128Bit:subreg_lh32
3191
0
      0,  // VF128Bit:subreg_ll32
3192
0
    },
3193
0
    { // FP128Bit
3194
0
      4,  // FP128Bit:subreg_h32 -> FP32Bit
3195
0
      15, // FP128Bit:subreg_h64 -> FP64Bit
3196
0
      0,  // FP128Bit:subreg_l32
3197
0
      15, // FP128Bit:subreg_l64 -> FP64Bit
3198
0
      4,  // FP128Bit:subreg_lh32 -> FP32Bit
3199
0
      0,  // FP128Bit:subreg_ll32
3200
0
    },
3201
0
    { // GR128Bit
3202
0
      6,  // GR128Bit:subreg_h32 -> GRH32Bit
3203
0
      16, // GR128Bit:subreg_h64 -> GR64Bit
3204
0
      5,  // GR128Bit:subreg_l32 -> GR32Bit
3205
0
      17, // GR128Bit:subreg_l64 -> ADDR64Bit
3206
0
      6,  // GR128Bit:subreg_lh32 -> GRH32Bit
3207
0
      7,  // GR128Bit:subreg_ll32 -> ADDR32Bit
3208
0
    },
3209
0
    { // ADDR128Bit
3210
0
      6,  // ADDR128Bit:subreg_h32 -> GRH32Bit
3211
0
      17, // ADDR128Bit:subreg_h64 -> ADDR64Bit
3212
0
      7,  // ADDR128Bit:subreg_l32 -> ADDR32Bit
3213
0
      17, // ADDR128Bit:subreg_l64 -> ADDR64Bit
3214
0
      6,  // ADDR128Bit:subreg_lh32 -> GRH32Bit
3215
0
      7,  // ADDR128Bit:subreg_ll32 -> ADDR32Bit
3216
0
    },
3217
0
  };
3218
0
  assert(RC && "Missing regclass");
3219
0
  if (!Idx) return RC;
3220
0
  --Idx;
3221
0
  assert(Idx < 6 && "Bad subreg");
3222
0
  unsigned TV = Table[RC->getID()][Idx];
3223
0
  return TV ? getRegClass(TV - 1) : nullptr;
3224
0
}
3225
3226
/// Get the weight in units of pressure for this register class.
3227
const RegClassWeight &SystemZGenRegisterInfo::
3228
0
getRegClassWeight(const TargetRegisterClass *RC) const {
3229
0
  static const RegClassWeight RCWeightTable[] = {
3230
0
    {1, 32},    // GRX32Bit
3231
0
    {1, 32},    // VR32Bit
3232
0
    {0, 0},   // AR32Bit
3233
0
    {1, 16},    // FP32Bit
3234
0
    {1, 16},    // GR32Bit
3235
0
    {1, 16},    // GRH32Bit
3236
0
    {1, 15},    // ADDR32Bit
3237
0
    {0, 0},   // CCR
3238
0
    {0, 0},   // FPCRegs
3239
0
    {1, 48},    // AnyRegBit
3240
0
    {1, 16},    // AnyRegBit_with_subreg_h32_in_FP32Bit
3241
0
    {1, 32},    // VR64Bit
3242
0
    {1, 16},    // AnyRegBit_with_subreg_h64
3243
0
    {0, 0},   // CR64Bit
3244
0
    {1, 16},    // FP64Bit
3245
0
    {2, 32},    // GR64Bit
3246
0
    {2, 30},    // ADDR64Bit
3247
0
    {1, 32},    // VR128Bit
3248
0
    {1, 16},    // VF128Bit
3249
0
    {2, 16},    // FP128Bit
3250
0
    {4, 32},    // GR128Bit
3251
0
    {4, 28},    // ADDR128Bit
3252
0
  };
3253
0
  return RCWeightTable[RC->getID()];
3254
0
}
3255
3256
/// Get the weight in units of pressure for this register unit.
3257
unsigned SystemZGenRegisterInfo::
3258
0
getRegUnitWeight(unsigned RegUnit) const {
3259
0
  assert(RegUnit < 98 && "invalid register unit");
3260
  // All register units have unit weight.
3261
0
  return 1;
3262
0
}
3263
3264
3265
// Get the number of dimensions of register pressure.
3266
0
unsigned SystemZGenRegisterInfo::getNumRegPressureSets() const {
3267
0
  return 5;
3268
0
}
3269
3270
// Get the name of this register unit pressure set.
3271
const char *SystemZGenRegisterInfo::
3272
0
getRegPressureSetName(unsigned Idx) const {
3273
0
  static const char *PressureNameTable[] = {
3274
0
    "FP32Bit",
3275
0
    "GR32Bit",
3276
0
    "GRH32Bit",
3277
0
    "GRX32Bit",
3278
0
    "VR32Bit",
3279
0
  };
3280
0
  return PressureNameTable[Idx];
3281
0
}
3282
3283
// Get the register unit pressure limit for this dimension.
3284
// This limit must be adjusted dynamically for reserved registers.
3285
unsigned SystemZGenRegisterInfo::
3286
0
getRegPressureSetLimit(const MachineFunction &MF, unsigned Idx) const {
3287
0
  static const uint8_t PressureLimitTable[] = {
3288
0
    16,   // 0: FP32Bit
3289
0
    16,   // 1: GR32Bit
3290
0
    16,   // 2: GRH32Bit
3291
0
    32,   // 3: GRX32Bit
3292
0
    32,   // 4: VR32Bit
3293
0
  };
3294
0
  return PressureLimitTable[Idx];
3295
0
}
3296
3297
/// Table of pressure sets per register class or unit.
3298
static const int RCSetsTable[] = {
3299
  /* 0 */ 1, 3, -1,
3300
  /* 3 */ 2, 3, -1,
3301
  /* 6 */ 0, 4, -1,
3302
};
3303
3304
/// Get the dimensions of register pressure impacted by this register class.
3305
/// Returns a -1 terminated array of pressure set IDs
3306
const int *SystemZGenRegisterInfo::
3307
0
getRegClassPressureSets(const TargetRegisterClass *RC) const {
3308
0
  static const uint8_t RCSetStartTable[] = {
3309
0
    1,7,2,6,0,3,0,2,2,2,2,7,2,2,6,1,1,7,6,6,1,1,};
3310
0
  return &RCSetsTable[RCSetStartTable[RC->getID()]];
3311
0
}
3312
3313
/// Get the dimensions of register pressure impacted by this register unit.
3314
/// Returns a -1 terminated array of pressure set IDs
3315
const int *SystemZGenRegisterInfo::
3316
0
getRegUnitPressureSets(unsigned RegUnit) const {
3317
0
  assert(RegUnit < 98 && "invalid register unit");
3318
0
  static const uint8_t RUSetStartTable[] = {
3319
0
    2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,0,3,0,3,0,3,0,3,0,3,0,3,0,3,0,3,0,3,0,3,0,3,0,3,0,3,0,3,0,3,0,3,};
3320
0
  return &RCSetsTable[RUSetStartTable[RegUnit]];
3321
0
}
3322
3323
extern const MCRegisterDesc SystemZRegDesc[];
3324
extern const int16_t SystemZRegDiffLists[];
3325
extern const LaneBitmask SystemZLaneMaskLists[];
3326
extern const char SystemZRegStrings[];
3327
extern const char SystemZRegClassStrings[];
3328
extern const MCPhysReg SystemZRegUnitRoots[][2];
3329
extern const uint16_t SystemZSubRegIdxLists[];
3330
extern const MCRegisterInfo::SubRegCoveredBits SystemZSubRegIdxRanges[];
3331
extern const uint16_t SystemZRegEncodingTable[];
3332
// SystemZ Dwarf<->LLVM register mappings.
3333
extern const MCRegisterInfo::DwarfLLVMRegPair SystemZDwarfFlavour0Dwarf2L[];
3334
extern const unsigned SystemZDwarfFlavour0Dwarf2LSize;
3335
3336
extern const MCRegisterInfo::DwarfLLVMRegPair SystemZEHFlavour0Dwarf2L[];
3337
extern const unsigned SystemZEHFlavour0Dwarf2LSize;
3338
3339
extern const MCRegisterInfo::DwarfLLVMRegPair SystemZDwarfFlavour0L2Dwarf[];
3340
extern const unsigned SystemZDwarfFlavour0L2DwarfSize;
3341
3342
extern const MCRegisterInfo::DwarfLLVMRegPair SystemZEHFlavour0L2Dwarf[];
3343
extern const unsigned SystemZEHFlavour0L2DwarfSize;
3344
3345
SystemZGenRegisterInfo::
3346
SystemZGenRegisterInfo(unsigned RA, unsigned DwarfFlavour, unsigned EHFlavour,
3347
      unsigned PC, unsigned HwMode)
3348
  : TargetRegisterInfo(&SystemZRegInfoDesc, RegisterClasses, RegisterClasses+22,
3349
             SubRegIndexNameTable, SubRegIndexLaneMaskTable,
3350
0
             LaneBitmask(0xFFFFFFFFFFFFFFFC), RegClassInfos, VTLists, HwMode) {
3351
0
  InitMCRegisterInfo(SystemZRegDesc, 195, RA, PC,
3352
0
                     SystemZMCRegisterClasses, 22,
3353
0
                     SystemZRegUnitRoots,
3354
0
                     98,
3355
0
                     SystemZRegDiffLists,
3356
0
                     SystemZLaneMaskLists,
3357
0
                     SystemZRegStrings,
3358
0
                     SystemZRegClassStrings,
3359
0
                     SystemZSubRegIdxLists,
3360
0
                     7,
3361
0
                     SystemZSubRegIdxRanges,
3362
0
                     SystemZRegEncodingTable);
3363
3364
0
  switch (DwarfFlavour) {
3365
0
  default:
3366
0
    llvm_unreachable("Unknown DWARF flavour");
3367
0
  case 0:
3368
0
    mapDwarfRegsToLLVMRegs(SystemZDwarfFlavour0Dwarf2L, SystemZDwarfFlavour0Dwarf2LSize, false);
3369
0
    break;
3370
0
  }
3371
0
  switch (EHFlavour) {
3372
0
  default:
3373
0
    llvm_unreachable("Unknown DWARF flavour");
3374
0
  case 0:
3375
0
    mapDwarfRegsToLLVMRegs(SystemZEHFlavour0Dwarf2L, SystemZEHFlavour0Dwarf2LSize, true);
3376
0
    break;
3377
0
  }
3378
0
  switch (DwarfFlavour) {
3379
0
  default:
3380
0
    llvm_unreachable("Unknown DWARF flavour");
3381
0
  case 0:
3382
0
    mapLLVMRegsToDwarfRegs(SystemZDwarfFlavour0L2Dwarf, SystemZDwarfFlavour0L2DwarfSize, false);
3383
0
    break;
3384
0
  }
3385
0
  switch (EHFlavour) {
3386
0
  default:
3387
0
    llvm_unreachable("Unknown DWARF flavour");
3388
0
  case 0:
3389
0
    mapLLVMRegsToDwarfRegs(SystemZEHFlavour0L2Dwarf, SystemZEHFlavour0L2DwarfSize, true);
3390
0
    break;
3391
0
  }
3392
0
}
3393
3394
static const MCPhysReg CSR_SystemZ_AllRegs_SaveList[] = { SystemZ::R2D, SystemZ::R3D, SystemZ::R4D, SystemZ::R5D, SystemZ::R6D, SystemZ::R7D, SystemZ::R8D, SystemZ::R9D, SystemZ::R10D, SystemZ::R11D, SystemZ::R12D, SystemZ::R13D, SystemZ::R14D, SystemZ::R15D, SystemZ::F0D, SystemZ::F1D, SystemZ::F2D, SystemZ::F3D, SystemZ::F4D, SystemZ::F5D, SystemZ::F6D, SystemZ::F7D, SystemZ::F8D, SystemZ::F9D, SystemZ::F10D, SystemZ::F11D, SystemZ::F12D, SystemZ::F13D, SystemZ::F14D, SystemZ::F15D, 0 };
3395
static const uint32_t CSR_SystemZ_AllRegs_RegMask[] = { 0x00000000, 0x00000000, 0x0007fff8, 0x07fffff8, 0xe7ffe000, 0xf7ffe7ff, 0x00000007, };
3396
static const MCPhysReg CSR_SystemZ_AllRegs_Vector_SaveList[] = { SystemZ::R2D, SystemZ::R3D, SystemZ::R4D, SystemZ::R5D, SystemZ::R6D, SystemZ::R7D, SystemZ::R8D, SystemZ::R9D, SystemZ::R10D, SystemZ::R11D, SystemZ::R12D, SystemZ::R13D, SystemZ::R14D, SystemZ::R15D, SystemZ::V0, SystemZ::V1, SystemZ::V2, SystemZ::V3, SystemZ::V4, SystemZ::V5, SystemZ::V6, SystemZ::V7, SystemZ::V8, SystemZ::V9, SystemZ::V10, SystemZ::V11, SystemZ::V12, SystemZ::V13, SystemZ::V14, SystemZ::V15, SystemZ::V16, SystemZ::V17, SystemZ::V18, SystemZ::V19, SystemZ::V20, SystemZ::V21, SystemZ::V22, SystemZ::V23, SystemZ::V24, SystemZ::V25, SystemZ::V26, SystemZ::V27, SystemZ::V28, SystemZ::V29, SystemZ::V30, SystemZ::V31, 0 };
3397
static const uint32_t CSR_SystemZ_AllRegs_Vector_RegMask[] = { 0x00000000, 0xfffffff8, 0xffffffff, 0xffffffff, 0xe7ffe7ff, 0xf7ffe7ff, 0x00000007, };
3398
static const MCPhysReg CSR_SystemZ_ELF_SaveList[] = { SystemZ::R6D, SystemZ::R7D, SystemZ::R8D, SystemZ::R9D, SystemZ::R10D, SystemZ::R11D, SystemZ::R12D, SystemZ::R13D, SystemZ::R14D, SystemZ::R15D, SystemZ::F8D, SystemZ::F9D, SystemZ::F10D, SystemZ::F11D, SystemZ::F12D, SystemZ::F13D, SystemZ::F14D, SystemZ::F15D, 0 };
3399
static const uint32_t CSR_SystemZ_ELF_RegMask[] = { 0x00000000, 0x00000000, 0x0007f800, 0x07f80780, 0x07fe0000, 0xc7fe07fe, 0x00000007, };
3400
static const MCPhysReg CSR_SystemZ_NoRegs_SaveList[] = { 0 };
3401
static const uint32_t CSR_SystemZ_NoRegs_RegMask[] = { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, };
3402
static const MCPhysReg CSR_SystemZ_SwiftError_SaveList[] = { SystemZ::R6D, SystemZ::R7D, SystemZ::R8D, SystemZ::R10D, SystemZ::R11D, SystemZ::R12D, SystemZ::R13D, SystemZ::R14D, SystemZ::R15D, SystemZ::F8D, SystemZ::F9D, SystemZ::F10D, SystemZ::F11D, SystemZ::F12D, SystemZ::F13D, SystemZ::F14D, SystemZ::F15D, 0 };
3403
static const uint32_t CSR_SystemZ_SwiftError_RegMask[] = { 0x00000000, 0x00000000, 0x0007f800, 0x07f80780, 0x07ee0000, 0x47ee07ee, 0x00000007, };
3404
static const MCPhysReg CSR_SystemZ_XPLINK64_SaveList[] = { SystemZ::R8D, SystemZ::R9D, SystemZ::R10D, SystemZ::R11D, SystemZ::R12D, SystemZ::R13D, SystemZ::R14D, SystemZ::R15D, SystemZ::F15D, SystemZ::F14D, SystemZ::F13D, SystemZ::F12D, SystemZ::F11D, SystemZ::F10D, SystemZ::F9D, SystemZ::F8D, 0 };
3405
static const uint32_t CSR_SystemZ_XPLINK64_RegMask[] = { 0x00000000, 0x00000000, 0x0007f800, 0x07f80780, 0x07f80000, 0x87f807f8, 0x00000007, };
3406
static const MCPhysReg CSR_SystemZ_XPLINK64_Vector_SaveList[] = { SystemZ::R8D, SystemZ::R9D, SystemZ::R10D, SystemZ::R11D, SystemZ::R12D, SystemZ::R13D, SystemZ::R14D, SystemZ::R15D, SystemZ::F15D, SystemZ::F14D, SystemZ::F13D, SystemZ::F12D, SystemZ::F11D, SystemZ::F10D, SystemZ::F9D, SystemZ::F8D, SystemZ::V23, SystemZ::V22, SystemZ::V21, SystemZ::V20, SystemZ::V19, SystemZ::V18, SystemZ::V17, SystemZ::V16, 0 };
3407
static const uint32_t CSR_SystemZ_XPLINK64_Vector_RegMask[] = { 0x00000000, 0x07f80000, 0x07fff800, 0xfff80780, 0x07f80007, 0x87f807f8, 0x00000007, };
3408
3409
3410
0
ArrayRef<const uint32_t *> SystemZGenRegisterInfo::getRegMasks() const {
3411
0
  static const uint32_t *const Masks[] = {
3412
0
    CSR_SystemZ_AllRegs_RegMask,
3413
0
    CSR_SystemZ_AllRegs_Vector_RegMask,
3414
0
    CSR_SystemZ_ELF_RegMask,
3415
0
    CSR_SystemZ_NoRegs_RegMask,
3416
0
    CSR_SystemZ_SwiftError_RegMask,
3417
0
    CSR_SystemZ_XPLINK64_RegMask,
3418
0
    CSR_SystemZ_XPLINK64_Vector_RegMask,
3419
0
  };
3420
0
  return ArrayRef(Masks);
3421
0
}
3422
3423
bool SystemZGenRegisterInfo::
3424
0
isGeneralPurposeRegister(const MachineFunction &MF, MCRegister PhysReg) const {
3425
0
  return
3426
0
      false;
3427
0
}
3428
3429
bool SystemZGenRegisterInfo::
3430
0
isFixedRegister(const MachineFunction &MF, MCRegister PhysReg) const {
3431
0
  return
3432
0
      false;
3433
0
}
3434
3435
bool SystemZGenRegisterInfo::
3436
0
isArgumentRegister(const MachineFunction &MF, MCRegister PhysReg) const {
3437
0
  return
3438
0
      false;
3439
0
}
3440
3441
bool SystemZGenRegisterInfo::
3442
0
isConstantPhysReg(MCRegister PhysReg) const {
3443
0
  return
3444
0
      false;
3445
0
}
3446
3447
0
ArrayRef<const char *> SystemZGenRegisterInfo::getRegMaskNames() const {
3448
0
  static const char *Names[] = {
3449
0
    "CSR_SystemZ_AllRegs",
3450
0
    "CSR_SystemZ_AllRegs_Vector",
3451
0
    "CSR_SystemZ_ELF",
3452
0
    "CSR_SystemZ_NoRegs",
3453
0
    "CSR_SystemZ_SwiftError",
3454
0
    "CSR_SystemZ_XPLINK64",
3455
0
    "CSR_SystemZ_XPLINK64_Vector",
3456
0
  };
3457
0
  return ArrayRef(Names);
3458
0
}
3459
3460
const SystemZFrameLowering *
3461
0
SystemZGenRegisterInfo::getFrameLowering(const MachineFunction &MF) {
3462
0
  return static_cast<const SystemZFrameLowering *>(
3463
0
      MF.getSubtarget().getFrameLowering());
3464
0
}
3465
3466
} // end namespace llvm
3467
3468
#endif // GET_REGINFO_TARGET_DESC
3469