LCOV - code coverage report
Current view: top level - build-llvm/lib/Target/XCore - XCoreGenDisassemblerTables.inc (source / functions) Hit Total Coverage
Test: llvm-toolchain.info Lines: 168 226 74.3 %
Date: 2017-09-14 15:23:50 Functions: 4 4 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
       2             : |*                                                                            *|
       3             : |*  * XCore Disassembler                                                      *|
       4             : |*                                                                            *|
       5             : |* Automatically generated file, do not edit!                                 *|
       6             : |*                                                                            *|
       7             : \*===----------------------------------------------------------------------===*/
       8             : 
       9             : #include "llvm/MC/MCInst.h"
      10             : #include "llvm/Support/Debug.h"
      11             : #include "llvm/Support/DataTypes.h"
      12             : #include "llvm/Support/LEB128.h"
      13             : #include "llvm/Support/raw_ostream.h"
      14             : #include <assert.h>
      15             : 
      16             : namespace llvm {
      17             : 
      18             : // Helper function for extracting fields from encoded instructions.
      19             : template<typename InsnType>
      20             : static InsnType fieldFromInstruction(InsnType insn, unsigned startBit,
      21             :                                      unsigned numBits) {
      22             :     assert(startBit + numBits <= (sizeof(InsnType)*8) &&
      23             :            "Instruction field out of bounds!");
      24             :     InsnType fieldMask;
      25         723 :     if (numBits == sizeof(InsnType)*8)
      26             :       fieldMask = (InsnType)(-1LL);
      27             :     else
      28        1438 :       fieldMask = (((InsnType)1 << numBits) - 1) << startBit;
      29        1425 :     return (insn & fieldMask) >> startBit;
      30             : }
      31             : 
      32             : static const uint8_t DecoderTable16[] = {
      33             : /* 0 */       MCD::OPC_ExtractField, 11, 5,  // Inst{15-11} ...
      34             : /* 3 */       MCD::OPC_FilterValue, 0, 117, 0, // Skip to: 124
      35             : /* 7 */       MCD::OPC_ExtractField, 0, 11,  // Inst{10-0} ...
      36             : /* 10 */      MCD::OPC_FilterValue, 236, 15, 4, 0, // Skip to: 19
      37             : /* 15 */      MCD::OPC_Decode, 197, 2, 0, // Opcode: WAITEU_0R
      38             : /* 19 */      MCD::OPC_FilterValue, 237, 15, 4, 0, // Skip to: 28
      39             : /* 24 */      MCD::OPC_Decode, 141, 1, 0, // Opcode: CLRE_0R
      40             : /* 28 */      MCD::OPC_FilterValue, 238, 15, 4, 0, // Skip to: 37
      41             : /* 33 */      MCD::OPC_Decode, 172, 2, 0, // Opcode: SSYNC_0r
      42             : /* 37 */      MCD::OPC_FilterValue, 239, 15, 4, 0, // Skip to: 46
      43             : /* 42 */      MCD::OPC_Decode, 175, 1, 0, // Opcode: FREET_0R
      44             : /* 46 */      MCD::OPC_FilterValue, 252, 15, 4, 0, // Skip to: 55
      45             : /* 51 */      MCD::OPC_Decode, 150, 1, 0, // Opcode: DCALL_0R
      46             : /* 55 */      MCD::OPC_FilterValue, 253, 15, 4, 0, // Skip to: 64
      47             : /* 60 */      MCD::OPC_Decode, 207, 1, 0, // Opcode: KRET_0R
      48             : /* 64 */      MCD::OPC_FilterValue, 254, 15, 4, 0, // Skip to: 73
      49             : /* 69 */      MCD::OPC_Decode, 156, 1, 0, // Opcode: DRET_0R
      50             : /* 73 */      MCD::OPC_FilterValue, 255, 15, 4, 0, // Skip to: 82
      51             : /* 78 */      MCD::OPC_Decode, 153, 2, 0, // Opcode: SETKEP_0R
      52             : /* 82 */      MCD::OPC_ExtractField, 4, 7,  // Inst{10-4} ...
      53             : /* 85 */      MCD::OPC_FilterValue, 126, 4, 0, // Skip to: 93
      54             : /* 89 */      MCD::OPC_Decode, 159, 1, 1, // Opcode: EDU_1r
      55             : /* 93 */      MCD::OPC_FilterValue, 127, 4, 0, // Skip to: 101
      56             : /* 97 */      MCD::OPC_Decode, 162, 1, 1, // Opcode: EEU_1r
      57             : /* 101 */     MCD::OPC_ExtractField, 4, 1,  // Inst{4} ...
      58             : /* 104 */     MCD::OPC_FilterValue, 0, 4, 0, // Skip to: 112
      59             : /* 108 */     MCD::OPC_Decode, 193, 1, 2, // Opcode: INITPC_2r
      60             : /* 112 */     MCD::OPC_FilterValue, 1, 4, 0, // Skip to: 120
      61             : /* 116 */     MCD::OPC_Decode, 187, 1, 2, // Opcode: GETST_2r
      62             : /* 120 */     MCD::OPC_Decode, 184, 2, 3, // Opcode: STW_2rus
      63             : /* 124 */     MCD::OPC_FilterValue, 1, 117, 0, // Skip to: 245
      64             : /* 128 */     MCD::OPC_ExtractField, 0, 11,  // Inst{10-0} ...
      65             : /* 131 */     MCD::OPC_FilterValue, 236, 15, 4, 0, // Skip to: 140
      66             : /* 136 */     MCD::OPC_Decode, 234, 1, 0, // Opcode: LDSPC_0R
      67             : /* 140 */     MCD::OPC_FilterValue, 237, 15, 4, 0, // Skip to: 149
      68             : /* 145 */     MCD::OPC_Decode, 177, 2, 0, // Opcode: STSPC_0R
      69             : /* 149 */     MCD::OPC_FilterValue, 238, 15, 4, 0, // Skip to: 158
      70             : /* 154 */     MCD::OPC_Decode, 235, 1, 0, // Opcode: LDSSR_0R
      71             : /* 158 */     MCD::OPC_FilterValue, 239, 15, 4, 0, // Skip to: 167
      72             : /* 163 */     MCD::OPC_Decode, 178, 2, 0, // Opcode: STSSR_0R
      73             : /* 167 */     MCD::OPC_FilterValue, 252, 15, 4, 0, // Skip to: 176
      74             : /* 172 */     MCD::OPC_Decode, 176, 2, 0, // Opcode: STSED_0R
      75             : /* 176 */     MCD::OPC_FilterValue, 253, 15, 4, 0, // Skip to: 185
      76             : /* 181 */     MCD::OPC_Decode, 175, 2, 0, // Opcode: STET_0R
      77             : /* 185 */     MCD::OPC_FilterValue, 254, 15, 4, 0, // Skip to: 194
      78             : /* 190 */     MCD::OPC_Decode, 177, 1, 0, // Opcode: GETED_0R
      79             : /* 194 */     MCD::OPC_FilterValue, 255, 15, 4, 0, // Skip to: 203
      80             : /* 199 */     MCD::OPC_Decode, 178, 1, 0, // Opcode: GETET_0R
      81             : /* 203 */     MCD::OPC_ExtractField, 4, 7,  // Inst{10-4} ...
      82             : /* 206 */     MCD::OPC_FilterValue, 126, 4, 0, // Skip to: 214
      83             : /* 210 */     MCD::OPC_Decode, 196, 2, 1, // Opcode: WAITET_1R
      84             : /* 214 */     MCD::OPC_FilterValue, 127, 4, 0, // Skip to: 222
      85             : /* 218 */     MCD::OPC_Decode, 195, 2, 1, // Opcode: WAITEF_1R
      86             : /* 222 */     MCD::OPC_ExtractField, 4, 1,  // Inst{4} ...
      87             : /* 225 */     MCD::OPC_FilterValue, 0, 4, 0, // Skip to: 233
      88             : /* 229 */     MCD::OPC_Decode, 191, 1, 2, // Opcode: INITDP_2r
      89             : /* 233 */     MCD::OPC_FilterValue, 1, 4, 0, // Skip to: 241
      90             : /* 237 */     MCD::OPC_Decode, 137, 2, 4, // Opcode: OUTT_2r
      91             : /* 241 */     MCD::OPC_Decode, 245, 1, 3, // Opcode: LDW_2rus
      92             : /* 245 */     MCD::OPC_FilterValue, 2, 107, 0, // Skip to: 356
      93             : /* 249 */     MCD::OPC_ExtractField, 0, 11,  // Inst{10-0} ...
      94             : /* 252 */     MCD::OPC_FilterValue, 236, 15, 4, 0, // Skip to: 261
      95             : /* 257 */     MCD::OPC_Decode, 151, 1, 0, // Opcode: DENTSP_0R
      96             : /* 261 */     MCD::OPC_FilterValue, 237, 15, 4, 0, // Skip to: 270
      97             : /* 266 */     MCD::OPC_Decode, 155, 1, 0, // Opcode: DRESTSP_0R
      98             : /* 270 */     MCD::OPC_FilterValue, 238, 15, 4, 0, // Skip to: 279
      99             : /* 275 */     MCD::OPC_Decode, 179, 1, 0, // Opcode: GETID_0R
     100             : /* 279 */     MCD::OPC_FilterValue, 239, 15, 4, 0, // Skip to: 288
     101             : /* 284 */     MCD::OPC_Decode, 180, 1, 0, // Opcode: GETKEP_0R
     102             : /* 288 */     MCD::OPC_FilterValue, 252, 15, 4, 0, // Skip to: 297
     103             : /* 293 */     MCD::OPC_Decode, 181, 1, 0, // Opcode: GETKSP_0R
     104             : /* 297 */     MCD::OPC_FilterValue, 253, 15, 4, 0, // Skip to: 306
     105             : /* 302 */     MCD::OPC_Decode, 233, 1, 0, // Opcode: LDSED_0R
     106             : /* 306 */     MCD::OPC_FilterValue, 254, 15, 4, 0, // Skip to: 315
     107             : /* 311 */     MCD::OPC_Decode, 231, 1, 0, // Opcode: LDET_0R
     108             : /* 315 */     MCD::OPC_ExtractField, 4, 7,  // Inst{10-4} ...
     109             : /* 318 */     MCD::OPC_FilterValue, 126, 4, 0, // Skip to: 326
     110             : /* 322 */     MCD::OPC_Decode, 174, 1, 1, // Opcode: FREER_1r
     111             : /* 326 */     MCD::OPC_FilterValue, 127, 4, 0, // Skip to: 334
     112             : /* 330 */     MCD::OPC_Decode, 253, 1, 1, // Opcode: MJOIN_1r
     113             : /* 334 */     MCD::OPC_ExtractField, 4, 1,  // Inst{4} ...
     114             : /* 337 */     MCD::OPC_FilterValue, 0, 4, 0, // Skip to: 345
     115             : /* 341 */     MCD::OPC_Decode, 194, 1, 2, // Opcode: INITSP_2r
     116             : /* 345 */     MCD::OPC_FilterValue, 1, 4, 0, // Skip to: 353
     117             : /* 349 */     MCD::OPC_Decode, 151, 2, 4, // Opcode: SETD_2r
     118             : /* 353 */     MCD::OPC_Decode, 105, 5, // Opcode: ADD_3r
     119             : /* 356 */     MCD::OPC_FilterValue, 3, 42, 0, // Skip to: 402
     120             : /* 360 */     MCD::OPC_ExtractField, 4, 7,  // Inst{10-4} ...
     121             : /* 363 */     MCD::OPC_FilterValue, 126, 4, 0, // Skip to: 371
     122             : /* 367 */     MCD::OPC_Decode, 194, 2, 1, // Opcode: TSTART_1R
     123             : /* 371 */     MCD::OPC_FilterValue, 127, 4, 0, // Skip to: 379
     124             : /* 375 */     MCD::OPC_Decode, 128, 2, 1, // Opcode: MSYNC_1r
     125             : /* 379 */     MCD::OPC_ExtractField, 4, 1,  // Inst{4} ...
     126             : /* 382 */     MCD::OPC_FilterValue, 0, 4, 0, // Skip to: 390
     127             : /* 386 */     MCD::OPC_Decode, 190, 1, 2, // Opcode: INITCP_2r
     128             : /* 390 */     MCD::OPC_FilterValue, 1, 4, 0, // Skip to: 398
     129             : /* 394 */     MCD::OPC_Decode, 192, 2, 6, // Opcode: TSETMR_2r
     130             : /* 398 */     MCD::OPC_Decode, 187, 2, 5, // Opcode: SUB_3r
     131             : /* 402 */     MCD::OPC_FilterValue, 4, 31, 0, // Skip to: 437
     132             : /* 406 */     MCD::OPC_ExtractField, 4, 7,  // Inst{10-4} ...
     133             : /* 409 */     MCD::OPC_FilterValue, 126, 3, 0, // Skip to: 416
     134             : /* 413 */     MCD::OPC_Decode, 118, 1, // Opcode: BLA_1r
     135             : /* 416 */     MCD::OPC_FilterValue, 127, 3, 0, // Skip to: 423
     136             : /* 420 */     MCD::OPC_Decode, 112, 1, // Opcode: BAU_1r
     137             : /* 423 */     MCD::OPC_CheckField, 4, 1, 1, 4, 0, // Skip to: 433
     138             : /* 429 */     MCD::OPC_Decode, 161, 1, 2, // Opcode: EET_2r
     139             : /* 433 */     MCD::OPC_Decode, 169, 2, 5, // Opcode: SHL_3r
     140             : /* 437 */     MCD::OPC_FilterValue, 5, 41, 0, // Skip to: 482
     141             : /* 441 */     MCD::OPC_ExtractField, 4, 7,  // Inst{10-4} ...
     142             : /* 444 */     MCD::OPC_FilterValue, 126, 4, 0, // Skip to: 452
     143             : /* 448 */     MCD::OPC_Decode, 135, 1, 1, // Opcode: BRU_1r
     144             : /* 452 */     MCD::OPC_FilterValue, 127, 4, 0, // Skip to: 460
     145             : /* 456 */     MCD::OPC_Decode, 159, 2, 1, // Opcode: SETSP_1r
     146             : /* 460 */     MCD::OPC_ExtractField, 4, 1,  // Inst{4} ...
     147             : /* 463 */     MCD::OPC_FilterValue, 0, 3, 0, // Skip to: 470
     148             : /* 467 */     MCD::OPC_Decode, 108, 7, // Opcode: ANDNOT_2r
     149             : /* 470 */     MCD::OPC_FilterValue, 1, 4, 0, // Skip to: 478
     150             : /* 474 */     MCD::OPC_Decode, 160, 1, 2, // Opcode: EEF_2r
     151             : /* 478 */     MCD::OPC_Decode, 171, 2, 5, // Opcode: SHR_3r
     152             : /* 482 */     MCD::OPC_FilterValue, 6, 42, 0, // Skip to: 528
     153             : /* 486 */     MCD::OPC_ExtractField, 4, 7,  // Inst{10-4} ...
     154             : /* 489 */     MCD::OPC_FilterValue, 126, 4, 0, // Skip to: 497
     155             : /* 493 */     MCD::OPC_Decode, 150, 2, 1, // Opcode: SETDP_1r
     156             : /* 497 */     MCD::OPC_FilterValue, 127, 4, 0, // Skip to: 505
     157             : /* 501 */     MCD::OPC_Decode, 146, 2, 1, // Opcode: SETCP_1r
     158             : /* 505 */     MCD::OPC_ExtractField, 4, 1,  // Inst{4} ...
     159             : /* 508 */     MCD::OPC_FilterValue, 0, 4, 0, // Skip to: 516
     160             : /* 512 */     MCD::OPC_Decode, 166, 2, 7, // Opcode: SEXT_2r
     161             : /* 516 */     MCD::OPC_FilterValue, 1, 4, 0, // Skip to: 524
     162             : /* 520 */     MCD::OPC_Decode, 167, 2, 8, // Opcode: SEXT_rus
     163             : /* 524 */     MCD::OPC_Decode, 168, 1, 5, // Opcode: EQ_3r
     164             : /* 528 */     MCD::OPC_FilterValue, 7, 41, 0, // Skip to: 573
     165             : /* 532 */     MCD::OPC_ExtractField, 4, 7,  // Inst{10-4} ...
     166             : /* 535 */     MCD::OPC_FilterValue, 126, 4, 0, // Skip to: 543
     167             : /* 539 */     MCD::OPC_Decode, 152, 1, 1, // Opcode: DGETREG_1r
     168             : /* 543 */     MCD::OPC_FilterValue, 127, 4, 0, // Skip to: 551
     169             : /* 547 */     MCD::OPC_Decode, 152, 2, 1, // Opcode: SETEV_1r
     170             : /* 551 */     MCD::OPC_ExtractField, 4, 1,  // Inst{4} ...
     171             : /* 554 */     MCD::OPC_FilterValue, 0, 4, 0, // Skip to: 562
     172             : /* 558 */     MCD::OPC_Decode, 188, 1, 2, // Opcode: GETTS_2r
     173             : /* 562 */     MCD::OPC_FilterValue, 1, 4, 0, // Skip to: 570
     174             : /* 566 */     MCD::OPC_Decode, 157, 2, 4, // Opcode: SETPT_2r
     175             : /* 570 */     MCD::OPC_Decode, 109, 5, // Opcode: AND_3r
     176             : /* 573 */     MCD::OPC_FilterValue, 8, 42, 0, // Skip to: 619
     177             : /* 577 */     MCD::OPC_ExtractField, 4, 7,  // Inst{10-4} ...
     178             : /* 580 */     MCD::OPC_FilterValue, 126, 4, 0, // Skip to: 588
     179             : /* 584 */     MCD::OPC_Decode, 200, 1, 1, // Opcode: KCALL_1r
     180             : /* 588 */     MCD::OPC_FilterValue, 127, 4, 0, // Skip to: 596
     181             : /* 592 */     MCD::OPC_Decode, 165, 2, 1, // Opcode: SETV_1r
     182             : /* 596 */     MCD::OPC_ExtractField, 4, 1,  // Inst{4} ...
     183             : /* 599 */     MCD::OPC_FilterValue, 0, 4, 0, // Skip to: 607
     184             : /* 603 */     MCD::OPC_Decode, 199, 2, 7, // Opcode: ZEXT_2r
     185             : /* 607 */     MCD::OPC_FilterValue, 1, 4, 0, // Skip to: 615
     186             : /* 611 */     MCD::OPC_Decode, 200, 2, 8, // Opcode: ZEXT_rus
     187             : /* 615 */     MCD::OPC_Decode, 132, 2, 5, // Opcode: OR_3r
     188             : /* 619 */     MCD::OPC_FilterValue, 9, 42, 0, // Skip to: 665
     189             : /* 623 */     MCD::OPC_ExtractField, 4, 7,  // Inst{10-4} ...
     190             : /* 626 */     MCD::OPC_FilterValue, 126, 4, 0, // Skip to: 634
     191             : /* 630 */     MCD::OPC_Decode, 157, 1, 1, // Opcode: ECALLF_1r
     192             : /* 634 */     MCD::OPC_FilterValue, 127, 4, 0, // Skip to: 642
     193             : /* 638 */     MCD::OPC_Decode, 158, 1, 1, // Opcode: ECALLT_1r
     194             : /* 642 */     MCD::OPC_ExtractField, 4, 1,  // Inst{4} ...
     195             : /* 645 */     MCD::OPC_FilterValue, 0, 4, 0, // Skip to: 653
     196             : /* 649 */     MCD::OPC_Decode, 133, 2, 2, // Opcode: OUTCT_2r
     197             : /* 653 */     MCD::OPC_FilterValue, 1, 4, 0, // Skip to: 661
     198             : /* 657 */     MCD::OPC_Decode, 134, 2, 9, // Opcode: OUTCT_rus
     199             : /* 661 */     MCD::OPC_Decode, 246, 1, 5, // Opcode: LDW_3r
     200             : /* 665 */     MCD::OPC_FilterValue, 10, 19, 0, // Skip to: 688
     201             : /* 669 */     MCD::OPC_ExtractField, 10, 1,  // Inst{10} ...
     202             : /* 672 */     MCD::OPC_FilterValue, 0, 4, 0, // Skip to: 680
     203             : /* 676 */     MCD::OPC_Decode, 180, 2, 10, // Opcode: STWDP_ru6
     204             : /* 680 */     MCD::OPC_FilterValue, 1, 77, 2, // Skip to: 1273
     205             : /* 684 */     MCD::OPC_Decode, 183, 2, 10, // Opcode: STWSP_ru6
     206             : /* 688 */     MCD::OPC_FilterValue, 11, 19, 0, // Skip to: 711
     207             : /* 692 */     MCD::OPC_ExtractField, 10, 1,  // Inst{10} ...
     208             : /* 695 */     MCD::OPC_FilterValue, 0, 4, 0, // Skip to: 703
     209             : /* 699 */     MCD::OPC_Decode, 241, 1, 10, // Opcode: LDWDP_ru6
     210             : /* 703 */     MCD::OPC_FilterValue, 1, 54, 2, // Skip to: 1273
     211             : /* 707 */     MCD::OPC_Decode, 244, 1, 10, // Opcode: LDWSP_ru6
     212             : /* 711 */     MCD::OPC_FilterValue, 12, 19, 0, // Skip to: 734
     213             : /* 715 */     MCD::OPC_ExtractField, 10, 1,  // Inst{10} ...
     214             : /* 718 */     MCD::OPC_FilterValue, 0, 4, 0, // Skip to: 726
     215             : /* 722 */     MCD::OPC_Decode, 223, 1, 10, // Opcode: LDAWDP_ru6
     216             : /* 726 */     MCD::OPC_FilterValue, 1, 31, 2, // Skip to: 1273
     217             : /* 730 */     MCD::OPC_Decode, 228, 1, 10, // Opcode: LDAWSP_ru6
     218             : /* 734 */     MCD::OPC_FilterValue, 13, 19, 0, // Skip to: 757
     219             : /* 738 */     MCD::OPC_ExtractField, 10, 1,  // Inst{10} ...
     220             : /* 741 */     MCD::OPC_FilterValue, 0, 4, 0, // Skip to: 749
     221             : /* 745 */     MCD::OPC_Decode, 230, 1, 10, // Opcode: LDC_ru6
     222             : /* 749 */     MCD::OPC_FilterValue, 1, 8, 2, // Skip to: 1273
     223             : /* 753 */     MCD::OPC_Decode, 238, 1, 10, // Opcode: LDWCP_ru6
     224             : /* 757 */     MCD::OPC_FilterValue, 14, 87, 0, // Skip to: 848
     225             : /* 761 */     MCD::OPC_ExtractField, 10, 1,  // Inst{10} ...
     226             : /* 764 */     MCD::OPC_FilterValue, 0, 38, 0, // Skip to: 806
     227             : /* 768 */     MCD::OPC_ExtractField, 6, 4,  // Inst{9-6} ...
     228             : /* 771 */     MCD::OPC_FilterValue, 12, 4, 0, // Skip to: 779
     229             : /* 775 */     MCD::OPC_Decode, 134, 1, 11, // Opcode: BRFU_u6
     230             : /* 779 */     MCD::OPC_FilterValue, 13, 3, 0, // Skip to: 786
     231             : /* 783 */     MCD::OPC_Decode, 117, 11, // Opcode: BLAT_u6
     232             : /* 786 */     MCD::OPC_FilterValue, 14, 4, 0, // Skip to: 794
     233             : /* 790 */     MCD::OPC_Decode, 170, 1, 11, // Opcode: EXTDP_u6
     234             : /* 794 */     MCD::OPC_FilterValue, 15, 4, 0, // Skip to: 802
     235             : /* 798 */     MCD::OPC_Decode, 202, 1, 11, // Opcode: KCALL_u6
     236             : /* 802 */     MCD::OPC_Decode, 132, 1, 12, // Opcode: BRFT_ru6
     237             : /* 806 */     MCD::OPC_FilterValue, 1, 207, 1, // Skip to: 1273
     238             : /* 810 */     MCD::OPC_ExtractField, 6, 4,  // Inst{9-6} ...
     239             : /* 813 */     MCD::OPC_FilterValue, 12, 4, 0, // Skip to: 821
     240             : /* 817 */     MCD::OPC_Decode, 128, 1, 13, // Opcode: BRBU_u6
     241             : /* 821 */     MCD::OPC_FilterValue, 13, 4, 0, // Skip to: 829
     242             : /* 825 */     MCD::OPC_Decode, 166, 1, 11, // Opcode: ENTSP_u6
     243             : /* 829 */     MCD::OPC_FilterValue, 14, 4, 0, // Skip to: 837
     244             : /* 833 */     MCD::OPC_Decode, 172, 1, 11, // Opcode: EXTSP_u6
     245             : /* 837 */     MCD::OPC_FilterValue, 15, 4, 0, // Skip to: 845
     246             : /* 841 */     MCD::OPC_Decode, 143, 2, 11, // Opcode: RETSP_u6
     247             : /* 845 */     MCD::OPC_Decode, 126, 14, // Opcode: BRBT_ru6
     248             : /* 848 */     MCD::OPC_FilterValue, 15, 72, 0, // Skip to: 924
     249             : /* 852 */     MCD::OPC_ExtractField, 10, 1,  // Inst{10} ...
     250             : /* 855 */     MCD::OPC_FilterValue, 0, 39, 0, // Skip to: 898
     251             : /* 859 */     MCD::OPC_ExtractField, 6, 4,  // Inst{9-6} ...
     252             : /* 862 */     MCD::OPC_FilterValue, 12, 4, 0, // Skip to: 870
     253             : /* 866 */     MCD::OPC_Decode, 146, 1, 11, // Opcode: CLRSR_u6
     254             : /* 870 */     MCD::OPC_FilterValue, 13, 4, 0, // Skip to: 878
     255             : /* 874 */     MCD::OPC_Decode, 163, 2, 11, // Opcode: SETSR_u6
     256             : /* 878 */     MCD::OPC_FilterValue, 14, 4, 0, // Skip to: 886
     257             : /* 882 */     MCD::OPC_Decode, 204, 1, 11, // Opcode: KENTSP_u6
     258             : /* 886 */     MCD::OPC_FilterValue, 15, 4, 0, // Skip to: 894
     259             : /* 890 */     MCD::OPC_Decode, 206, 1, 11, // Opcode: KRESTSP_u6
     260             : /* 894 */     MCD::OPC_Decode, 130, 1, 12, // Opcode: BRFF_ru6
     261             : /* 898 */     MCD::OPC_FilterValue, 1, 115, 1, // Skip to: 1273
     262             : /* 902 */     MCD::OPC_ExtractField, 6, 4,  // Inst{9-6} ...
     263             : /* 905 */     MCD::OPC_FilterValue, 12, 4, 0, // Skip to: 913
     264             : /* 909 */     MCD::OPC_Decode, 186, 1, 11, // Opcode: GETSR_u6
     265             : /* 913 */     MCD::OPC_FilterValue, 13, 4, 0, // Skip to: 921
     266             : /* 917 */     MCD::OPC_Decode, 221, 1, 11, // Opcode: LDAWCP_u6
     267             : /* 921 */     MCD::OPC_Decode, 124, 14, // Opcode: BRBF_ru6
     268             : /* 924 */     MCD::OPC_FilterValue, 16, 42, 0, // Skip to: 970
     269             : /* 928 */     MCD::OPC_ExtractField, 4, 7,  // Inst{10-4} ...
     270             : /* 931 */     MCD::OPC_FilterValue, 126, 4, 0, // Skip to: 939
     271             : /* 935 */     MCD::OPC_Decode, 142, 1, 1, // Opcode: CLRPT_1R
     272             : /* 939 */     MCD::OPC_FilterValue, 127, 4, 0, // Skip to: 947
     273             : /* 943 */     MCD::OPC_Decode, 188, 2, 1, // Opcode: SYNCR_1r
     274             : /* 947 */     MCD::OPC_ExtractField, 4, 1,  // Inst{4} ...
     275             : /* 950 */     MCD::OPC_FilterValue, 0, 4, 0, // Skip to: 958
     276             : /* 954 */     MCD::OPC_Decode, 184, 1, 9, // Opcode: GETR_rus
     277             : /* 958 */     MCD::OPC_FilterValue, 1, 4, 0, // Skip to: 966
     278             : /* 962 */     MCD::OPC_Decode, 189, 1, 2, // Opcode: INCT_2r
     279             : /* 966 */     MCD::OPC_Decode, 209, 1, 5, // Opcode: LD16S_3r
     280             : /* 970 */     MCD::OPC_FilterValue, 17, 23, 0, // Skip to: 997
     281             : /* 974 */     MCD::OPC_ExtractField, 4, 1,  // Inst{4} ...
     282             : /* 977 */     MCD::OPC_FilterValue, 0, 4, 0, // Skip to: 985
     283             : /* 981 */     MCD::OPC_Decode, 131, 2, 2, // Opcode: NOT
     284             : /* 985 */     MCD::OPC_FilterValue, 1, 4, 0, // Skip to: 993
     285             : /* 989 */     MCD::OPC_Decode, 197, 1, 2, // Opcode: INT_2r
     286             : /* 993 */     MCD::OPC_Decode, 210, 1, 5, // Opcode: LD8U_3r
     287             : /* 997 */     MCD::OPC_FilterValue, 18, 22, 0, // Skip to: 1023
     288             : /* 1001 */    MCD::OPC_ExtractField, 4, 1,  // Inst{4} ...
     289             : /* 1004 */    MCD::OPC_FilterValue, 0, 4, 0, // Skip to: 1012
     290             : /* 1008 */    MCD::OPC_Decode, 130, 2, 2, // Opcode: NEG
     291             : /* 1012 */    MCD::OPC_FilterValue, 1, 4, 0, // Skip to: 1020
     292             : /* 1016 */    MCD::OPC_Decode, 164, 1, 2, // Opcode: ENDIN_2r
     293             : /* 1020 */    MCD::OPC_Decode, 104, 3, // Opcode: ADD_2rus
     294             : /* 1023 */    MCD::OPC_FilterValue, 19, 4, 0, // Skip to: 1031
     295             : /* 1027 */    MCD::OPC_Decode, 186, 2, 3, // Opcode: SUB_2rus
     296             : /* 1031 */    MCD::OPC_FilterValue, 20, 23, 0, // Skip to: 1058
     297             : /* 1035 */    MCD::OPC_ExtractField, 4, 1,  // Inst{4} ...
     298             : /* 1038 */    MCD::OPC_FilterValue, 0, 4, 0, // Skip to: 1046
     299             : /* 1042 */    MCD::OPC_Decode, 254, 1, 2, // Opcode: MKMSK_2r
     300             : /* 1046 */    MCD::OPC_FilterValue, 1, 4, 0, // Skip to: 1054
     301             : /* 1050 */    MCD::OPC_Decode, 255, 1, 15, // Opcode: MKMSK_rus
     302             : /* 1054 */    MCD::OPC_Decode, 168, 2, 16, // Opcode: SHL_2rus
     303             : /* 1058 */    MCD::OPC_FilterValue, 21, 23, 0, // Skip to: 1085
     304             : /* 1062 */    MCD::OPC_ExtractField, 4, 1,  // Inst{4} ...
     305             : /* 1065 */    MCD::OPC_FilterValue, 0, 4, 0, // Skip to: 1073
     306             : /* 1069 */    MCD::OPC_Decode, 138, 2, 4, // Opcode: OUT_2r
     307             : /* 1073 */    MCD::OPC_FilterValue, 1, 4, 0, // Skip to: 1081
     308             : /* 1077 */    MCD::OPC_Decode, 136, 2, 7, // Opcode: OUTSHR_2r
     309             : /* 1081 */    MCD::OPC_Decode, 170, 2, 16, // Opcode: SHR_2rus
     310             : /* 1085 */    MCD::OPC_FilterValue, 22, 23, 0, // Skip to: 1112
     311             : /* 1089 */    MCD::OPC_ExtractField, 4, 1,  // Inst{4} ...
     312             : /* 1092 */    MCD::OPC_FilterValue, 0, 4, 0, // Skip to: 1100
     313             : /* 1096 */    MCD::OPC_Decode, 198, 1, 2, // Opcode: IN_2r
     314             : /* 1100 */    MCD::OPC_FilterValue, 1, 4, 0, // Skip to: 1108
     315             : /* 1104 */    MCD::OPC_Decode, 196, 1, 7, // Opcode: INSHR_2r
     316             : /* 1108 */    MCD::OPC_Decode, 167, 1, 3, // Opcode: EQ_2rus
     317             : /* 1112 */    MCD::OPC_FilterValue, 23, 23, 0, // Skip to: 1139
     318             : /* 1116 */    MCD::OPC_ExtractField, 4, 1,  // Inst{4} ...
     319             : /* 1119 */    MCD::OPC_FilterValue, 0, 4, 0, // Skip to: 1127
     320             : /* 1123 */    MCD::OPC_Decode, 139, 2, 2, // Opcode: PEEK_2r
     321             : /* 1127 */    MCD::OPC_FilterValue, 1, 4, 0, // Skip to: 1135
     322             : /* 1131 */    MCD::OPC_Decode, 189, 2, 2, // Opcode: TESTCT_2r
     323             : /* 1135 */    MCD::OPC_Decode, 193, 2, 17, // Opcode: TSETR_3r
     324             : /* 1139 */    MCD::OPC_FilterValue, 24, 23, 0, // Skip to: 1166
     325             : /* 1143 */    MCD::OPC_ExtractField, 4, 1,  // Inst{4} ...
     326             : /* 1146 */    MCD::OPC_FilterValue, 0, 4, 0, // Skip to: 1154
     327             : /* 1150 */    MCD::OPC_Decode, 155, 2, 4, // Opcode: SETPSC_2r
     328             : /* 1154 */    MCD::OPC_FilterValue, 1, 4, 0, // Skip to: 1162
     329             : /* 1158 */    MCD::OPC_Decode, 191, 2, 2, // Opcode: TESTWCT_2r
     330             : /* 1162 */    MCD::OPC_Decode, 248, 1, 5, // Opcode: LSS_3r
     331             : /* 1166 */    MCD::OPC_FilterValue, 25, 23, 0, // Skip to: 1193
     332             : /* 1170 */    MCD::OPC_ExtractField, 4, 1,  // Inst{4} ...
     333             : /* 1173 */    MCD::OPC_FilterValue, 0, 4, 0, // Skip to: 1181
     334             : /* 1177 */    MCD::OPC_Decode, 139, 1, 2, // Opcode: CHKCT_2r
     335             : /* 1181 */    MCD::OPC_FilterValue, 1, 4, 0, // Skip to: 1189
     336             : /* 1185 */    MCD::OPC_Decode, 140, 1, 15, // Opcode: CHKCT_rus
     337             : /* 1189 */    MCD::OPC_Decode, 250, 1, 5, // Opcode: LSU_3r
     338             : /* 1193 */    MCD::OPC_FilterValue, 26, 17, 0, // Skip to: 1214
     339             : /* 1197 */    MCD::OPC_ExtractField, 10, 1,  // Inst{10} ...
     340             : /* 1200 */    MCD::OPC_FilterValue, 0, 3, 0, // Skip to: 1207
     341             : /* 1204 */    MCD::OPC_Decode, 122, 18, // Opcode: BLRF_u10
     342             : /* 1207 */    MCD::OPC_FilterValue, 1, 62, 0, // Skip to: 1273
     343             : /* 1211 */    MCD::OPC_Decode, 120, 19, // Opcode: BLRB_u10
     344             : /* 1214 */    MCD::OPC_FilterValue, 27, 19, 0, // Skip to: 1237
     345             : /* 1218 */    MCD::OPC_ExtractField, 10, 1,  // Inst{10} ...
     346             : /* 1221 */    MCD::OPC_FilterValue, 0, 4, 0, // Skip to: 1229
     347             : /* 1225 */    MCD::OPC_Decode, 217, 1, 18, // Opcode: LDAPF_u10
     348             : /* 1229 */    MCD::OPC_FilterValue, 1, 40, 0, // Skip to: 1273
     349             : /* 1233 */    MCD::OPC_Decode, 214, 1, 19, // Opcode: LDAPB_u10
     350             : /* 1237 */    MCD::OPC_FilterValue, 28, 18, 0, // Skip to: 1259
     351             : /* 1241 */    MCD::OPC_ExtractField, 10, 1,  // Inst{10} ...
     352             : /* 1244 */    MCD::OPC_FilterValue, 0, 3, 0, // Skip to: 1251
     353             : /* 1248 */    MCD::OPC_Decode, 115, 18, // Opcode: BLACP_u10
     354             : /* 1251 */    MCD::OPC_FilterValue, 1, 18, 0, // Skip to: 1273
     355             : /* 1255 */    MCD::OPC_Decode, 239, 1, 18, // Opcode: LDWCP_u10
     356             : /* 1259 */    MCD::OPC_FilterValue, 29, 10, 0, // Skip to: 1273
     357             : /* 1263 */    MCD::OPC_CheckField, 10, 1, 0, 4, 0, // Skip to: 1273
     358             : /* 1269 */    MCD::OPC_Decode, 149, 2, 12, // Opcode: SETC_ru6
     359             : /* 1273 */    MCD::OPC_Fail,
     360             :   0
     361             : };
     362             : 
     363             : static const uint8_t DecoderTable32[] = {
     364             : /* 0 */       MCD::OPC_ExtractField, 27, 5,  // Inst{31-27} ...
     365             : /* 3 */       MCD::OPC_FilterValue, 0, 92, 0, // Skip to: 99
     366             : /* 7 */       MCD::OPC_ExtractField, 11, 5,  // Inst{15-11} ...
     367             : /* 10 */      MCD::OPC_FilterValue, 31, 239, 3, // Skip to: 1021
     368             : /* 14 */      MCD::OPC_ExtractField, 4, 1,  // Inst{4} ...
     369             : /* 17 */      MCD::OPC_FilterValue, 0, 10, 0, // Skip to: 31
     370             : /* 21 */      MCD::OPC_CheckField, 16, 11, 236, 15, 18, 0, // Skip to: 46
     371             : /* 28 */      MCD::OPC_Decode, 113, 20, // Opcode: BITREV_l2r
     372             : /* 31 */      MCD::OPC_FilterValue, 1, 11, 0, // Skip to: 46
     373             : /* 35 */      MCD::OPC_CheckField, 16, 11, 236, 15, 4, 0, // Skip to: 46
     374             : /* 42 */      MCD::OPC_Decode, 138, 1, 20, // Opcode: BYTEREV_l2r
     375             : /* 46 */      MCD::OPC_CheckField, 16, 11, 236, 15, 4, 0, // Skip to: 57
     376             : /* 53 */      MCD::OPC_Decode, 185, 2, 21, // Opcode: STW_l3r
     377             : /* 57 */      MCD::OPC_ExtractField, 20, 7,  // Inst{26-20} ...
     378             : /* 60 */      MCD::OPC_FilterValue, 126, 4, 0, // Skip to: 68
     379             : /* 64 */      MCD::OPC_Decode, 148, 1, 22, // Opcode: CRC8_l4r
     380             : /* 68 */      MCD::OPC_FilterValue, 127, 4, 0, // Skip to: 76
     381             : /* 72 */      MCD::OPC_Decode, 252, 1, 23, // Opcode: MACCU_l4r
     382             : /* 76 */      MCD::OPC_ExtractField, 20, 1,  // Inst{20} ...
     383             : /* 79 */      MCD::OPC_FilterValue, 0, 4, 0, // Skip to: 87
     384             : /* 83 */      MCD::OPC_Decode, 232, 1, 24, // Opcode: LDIVU_l5r
     385             : /* 87 */      MCD::OPC_FilterValue, 1, 4, 0, // Skip to: 95
     386             : /* 91 */      MCD::OPC_Decode, 208, 1, 24, // Opcode: LADD_l5r
     387             : /* 95 */      MCD::OPC_Decode, 247, 1, 25, // Opcode: LMUL_l6r
     388             : /* 99 */      MCD::OPC_FilterValue, 1, 87, 0, // Skip to: 190
     389             : /* 103 */     MCD::OPC_ExtractField, 11, 5,  // Inst{15-11} ...
     390             : /* 106 */     MCD::OPC_FilterValue, 31, 143, 3, // Skip to: 1021
     391             : /* 110 */     MCD::OPC_ExtractField, 20, 1,  // Inst{20} ...
     392             : /* 113 */     MCD::OPC_FilterValue, 0, 136, 3, // Skip to: 1021
     393             : /* 117 */     MCD::OPC_ExtractField, 4, 1,  // Inst{4} ...
     394             : /* 120 */     MCD::OPC_FilterValue, 0, 16, 0, // Skip to: 140
     395             : /* 124 */     MCD::OPC_CheckField, 21, 6, 63, 30, 0, // Skip to: 160
     396             : /* 130 */     MCD::OPC_CheckField, 16, 4, 12, 24, 0, // Skip to: 160
     397             : /* 136 */     MCD::OPC_Decode, 147, 1, 20, // Opcode: CLZ_l2r
     398             : /* 140 */     MCD::OPC_FilterValue, 1, 16, 0, // Skip to: 160
     399             : /* 144 */     MCD::OPC_CheckField, 21, 6, 63, 10, 0, // Skip to: 160
     400             : /* 150 */     MCD::OPC_CheckField, 16, 4, 12, 4, 0, // Skip to: 160
     401             : /* 156 */     MCD::OPC_Decode, 145, 2, 26, // Opcode: SETCLK_l2r
     402             : /* 160 */     MCD::OPC_CheckField, 21, 6, 63, 10, 0, // Skip to: 176
     403             : /* 166 */     MCD::OPC_CheckField, 16, 4, 12, 4, 0, // Skip to: 176
     404             : /* 172 */     MCD::OPC_Decode, 198, 2, 21, // Opcode: XOR_l3r
     405             : /* 176 */     MCD::OPC_CheckField, 21, 6, 63, 4, 0, // Skip to: 186
     406             : /* 182 */     MCD::OPC_Decode, 251, 1, 23, // Opcode: MACCS_l4r
     407             : /* 186 */     MCD::OPC_Decode, 249, 1, 24, // Opcode: LSUB_l5r
     408             : /* 190 */     MCD::OPC_FilterValue, 2, 31, 0, // Skip to: 225
     409             : /* 194 */     MCD::OPC_ExtractField, 11, 16,  // Inst{26-11} ...
     410             : /* 197 */     MCD::OPC_FilterValue, 159, 251, 3, 50, 3, // Skip to: 1021
     411             : /* 203 */     MCD::OPC_ExtractField, 4, 1,  // Inst{4} ...
     412             : /* 206 */     MCD::OPC_FilterValue, 0, 4, 0, // Skip to: 214
     413             : /* 210 */     MCD::OPC_Decode, 192, 1, 20, // Opcode: INITLR_l2r
     414             : /* 214 */     MCD::OPC_FilterValue, 1, 4, 0, // Skip to: 222
     415             : /* 218 */     MCD::OPC_Decode, 183, 1, 20, // Opcode: GETPS_l2r
     416             : /* 222 */     MCD::OPC_Decode, 111, 21, // Opcode: ASHR_l3r
     417             : /* 225 */     MCD::OPC_FilterValue, 3, 32, 0, // Skip to: 261
     418             : /* 229 */     MCD::OPC_ExtractField, 11, 16,  // Inst{26-11} ...
     419             : /* 232 */     MCD::OPC_FilterValue, 159, 251, 3, 15, 3, // Skip to: 1021
     420             : /* 238 */     MCD::OPC_ExtractField, 4, 1,  // Inst{4} ...
     421             : /* 241 */     MCD::OPC_FilterValue, 0, 4, 0, // Skip to: 249
     422             : /* 245 */     MCD::OPC_Decode, 156, 2, 26, // Opcode: SETPS_l2r
     423             : /* 249 */     MCD::OPC_FilterValue, 1, 4, 0, // Skip to: 257
     424             : /* 253 */     MCD::OPC_Decode, 176, 1, 20, // Opcode: GETD_l2r
     425             : /* 257 */     MCD::OPC_Decode, 226, 1, 21, // Opcode: LDAWF_l3r
     426             : /* 261 */     MCD::OPC_FilterValue, 4, 32, 0, // Skip to: 297
     427             : /* 265 */     MCD::OPC_ExtractField, 11, 16,  // Inst{26-11} ...
     428             : /* 268 */     MCD::OPC_FilterValue, 159, 251, 3, 235, 2, // Skip to: 1021
     429             : /* 274 */     MCD::OPC_ExtractField, 4, 1,  // Inst{4} ...
     430             : /* 277 */     MCD::OPC_FilterValue, 0, 4, 0, // Skip to: 285
     431             : /* 281 */     MCD::OPC_Decode, 190, 2, 20, // Opcode: TESTLCL_l2r
     432             : /* 285 */     MCD::OPC_FilterValue, 1, 4, 0, // Skip to: 293
     433             : /* 289 */     MCD::OPC_Decode, 164, 2, 26, // Opcode: SETTW_l2r
     434             : /* 293 */     MCD::OPC_Decode, 219, 1, 21, // Opcode: LDAWB_l3r
     435             : /* 297 */     MCD::OPC_FilterValue, 5, 32, 0, // Skip to: 333
     436             : /* 301 */     MCD::OPC_ExtractField, 11, 16,  // Inst{26-11} ...
     437             : /* 304 */     MCD::OPC_FilterValue, 159, 251, 3, 199, 2, // Skip to: 1021
     438             : /* 310 */     MCD::OPC_ExtractField, 4, 1,  // Inst{4} ...
     439             : /* 313 */     MCD::OPC_FilterValue, 0, 4, 0, // Skip to: 321
     440             : /* 317 */     MCD::OPC_Decode, 158, 2, 26, // Opcode: SETRDY_l2r
     441             : /* 321 */     MCD::OPC_FilterValue, 1, 4, 0, // Skip to: 329
     442             : /* 325 */     MCD::OPC_Decode, 147, 2, 20, // Opcode: SETC_l2r
     443             : /* 329 */     MCD::OPC_Decode, 212, 1, 21, // Opcode: LDA16F_l3r
     444             : /* 333 */     MCD::OPC_FilterValue, 6, 32, 0, // Skip to: 369
     445             : /* 337 */     MCD::OPC_ExtractField, 11, 16,  // Inst{26-11} ...
     446             : /* 340 */     MCD::OPC_FilterValue, 159, 251, 3, 163, 2, // Skip to: 1021
     447             : /* 346 */     MCD::OPC_ExtractField, 4, 1,  // Inst{4} ...
     448             : /* 349 */     MCD::OPC_FilterValue, 0, 4, 0, // Skip to: 357
     449             : /* 353 */     MCD::OPC_Decode, 154, 2, 26, // Opcode: SETN_l2r
     450             : /* 357 */     MCD::OPC_FilterValue, 1, 4, 0, // Skip to: 365
     451             : /* 361 */     MCD::OPC_Decode, 182, 1, 20, // Opcode: GETN_l2r
     452             : /* 365 */     MCD::OPC_Decode, 211, 1, 21, // Opcode: LDA16B_l3r
     453             : /* 369 */     MCD::OPC_FilterValue, 7, 12, 0, // Skip to: 385
     454             : /* 373 */     MCD::OPC_CheckField, 11, 16, 159, 251, 3, 128, 2, // Skip to: 1021
     455             : /* 381 */     MCD::OPC_Decode, 129, 2, 21, // Opcode: MUL_l3r
     456             : /* 385 */     MCD::OPC_FilterValue, 8, 12, 0, // Skip to: 401
     457             : /* 389 */     MCD::OPC_CheckField, 11, 16, 159, 251, 3, 112, 2, // Skip to: 1021
     458             : /* 397 */     MCD::OPC_Decode, 153, 1, 21, // Opcode: DIVS_l3r
     459             : /* 401 */     MCD::OPC_FilterValue, 9, 12, 0, // Skip to: 417
     460             : /* 405 */     MCD::OPC_CheckField, 11, 16, 159, 251, 3, 96, 2, // Skip to: 1021
     461             : /* 413 */     MCD::OPC_Decode, 154, 1, 21, // Opcode: DIVU_l3r
     462             : /* 417 */     MCD::OPC_FilterValue, 10, 31, 0, // Skip to: 452
     463             : /* 421 */     MCD::OPC_ExtractField, 26, 1,  // Inst{26} ...
     464             : /* 424 */     MCD::OPC_FilterValue, 0, 10, 0, // Skip to: 438
     465             : /* 428 */     MCD::OPC_CheckField, 10, 6, 60, 75, 2, // Skip to: 1021
     466             : /* 434 */     MCD::OPC_Decode, 179, 2, 27, // Opcode: STWDP_lru6
     467             : /* 438 */     MCD::OPC_FilterValue, 1, 67, 2, // Skip to: 1021
     468             : /* 442 */     MCD::OPC_CheckField, 10, 6, 60, 61, 2, // Skip to: 1021
     469             : /* 448 */     MCD::OPC_Decode, 182, 2, 27, // Opcode: STWSP_lru6
     470             : /* 452 */     MCD::OPC_FilterValue, 11, 31, 0, // Skip to: 487
     471             : /* 456 */     MCD::OPC_ExtractField, 26, 1,  // Inst{26} ...
     472             : /* 459 */     MCD::OPC_FilterValue, 0, 10, 0, // Skip to: 473
     473             : /* 463 */     MCD::OPC_CheckField, 10, 6, 60, 40, 2, // Skip to: 1021
     474             : /* 469 */     MCD::OPC_Decode, 240, 1, 27, // Opcode: LDWDP_lru6
     475             : /* 473 */     MCD::OPC_FilterValue, 1, 32, 2, // Skip to: 1021
     476             : /* 477 */     MCD::OPC_CheckField, 10, 6, 60, 26, 2, // Skip to: 1021
     477             : /* 483 */     MCD::OPC_Decode, 243, 1, 27, // Opcode: LDWSP_lru6
     478             : /* 487 */     MCD::OPC_FilterValue, 12, 31, 0, // Skip to: 522
     479             : /* 491 */     MCD::OPC_ExtractField, 26, 1,  // Inst{26} ...
     480             : /* 494 */     MCD::OPC_FilterValue, 0, 10, 0, // Skip to: 508
     481             : /* 498 */     MCD::OPC_CheckField, 10, 6, 60, 5, 2, // Skip to: 1021
     482             : /* 504 */     MCD::OPC_Decode, 222, 1, 27, // Opcode: LDAWDP_lru6
     483             : /* 508 */     MCD::OPC_FilterValue, 1, 253, 1, // Skip to: 1021
     484             : /* 512 */     MCD::OPC_CheckField, 10, 6, 60, 247, 1, // Skip to: 1021
     485             : /* 518 */     MCD::OPC_Decode, 227, 1, 27, // Opcode: LDAWSP_lru6
     486             : /* 522 */     MCD::OPC_FilterValue, 13, 31, 0, // Skip to: 557
     487             : /* 526 */     MCD::OPC_ExtractField, 26, 1,  // Inst{26} ...
     488             : /* 529 */     MCD::OPC_FilterValue, 0, 10, 0, // Skip to: 543
     489             : /* 533 */     MCD::OPC_CheckField, 10, 6, 60, 226, 1, // Skip to: 1021
     490             : /* 539 */     MCD::OPC_Decode, 229, 1, 27, // Opcode: LDC_lru6
     491             : /* 543 */     MCD::OPC_FilterValue, 1, 218, 1, // Skip to: 1021
     492             : /* 547 */     MCD::OPC_CheckField, 10, 6, 60, 212, 1, // Skip to: 1021
     493             : /* 553 */     MCD::OPC_Decode, 236, 1, 27, // Opcode: LDWCP_lru6
     494             : /* 557 */     MCD::OPC_FilterValue, 14, 100, 0, // Skip to: 661
     495             : /* 561 */     MCD::OPC_ExtractField, 26, 1,  // Inst{26} ...
     496             : /* 564 */     MCD::OPC_FilterValue, 0, 45, 0, // Skip to: 613
     497             : /* 568 */     MCD::OPC_ExtractField, 10, 6,  // Inst{15-10} ...
     498             : /* 571 */     MCD::OPC_FilterValue, 60, 190, 1, // Skip to: 1021
     499             : /* 575 */     MCD::OPC_ExtractField, 22, 4,  // Inst{25-22} ...
     500             : /* 578 */     MCD::OPC_FilterValue, 12, 4, 0, // Skip to: 586
     501             : /* 582 */     MCD::OPC_Decode, 133, 1, 28, // Opcode: BRFU_lu6
     502             : /* 586 */     MCD::OPC_FilterValue, 13, 3, 0, // Skip to: 593
     503             : /* 590 */     MCD::OPC_Decode, 116, 28, // Opcode: BLAT_lu6
     504             : /* 593 */     MCD::OPC_FilterValue, 14, 4, 0, // Skip to: 601
     505             : /* 597 */     MCD::OPC_Decode, 169, 1, 28, // Opcode: EXTDP_lu6
     506             : /* 601 */     MCD::OPC_FilterValue, 15, 4, 0, // Skip to: 609
     507             : /* 605 */     MCD::OPC_Decode, 201, 1, 28, // Opcode: KCALL_lu6
     508             : /* 609 */     MCD::OPC_Decode, 131, 1, 29, // Opcode: BRFT_lru6
     509             : /* 613 */     MCD::OPC_FilterValue, 1, 148, 1, // Skip to: 1021
     510             : /* 617 */     MCD::OPC_ExtractField, 10, 6,  // Inst{15-10} ...
     511             : /* 620 */     MCD::OPC_FilterValue, 60, 141, 1, // Skip to: 1021
     512             : /* 624 */     MCD::OPC_ExtractField, 22, 4,  // Inst{25-22} ...
     513             : /* 627 */     MCD::OPC_FilterValue, 12, 3, 0, // Skip to: 634
     514             : /* 631 */     MCD::OPC_Decode, 127, 30, // Opcode: BRBU_lu6
     515             : /* 634 */     MCD::OPC_FilterValue, 13, 4, 0, // Skip to: 642
     516             : /* 638 */     MCD::OPC_Decode, 165, 1, 28, // Opcode: ENTSP_lu6
     517             : /* 642 */     MCD::OPC_FilterValue, 14, 4, 0, // Skip to: 650
     518             : /* 646 */     MCD::OPC_Decode, 171, 1, 28, // Opcode: EXTSP_lu6
     519             : /* 650 */     MCD::OPC_FilterValue, 15, 4, 0, // Skip to: 658
     520             : /* 654 */     MCD::OPC_Decode, 142, 2, 28, // Opcode: RETSP_lu6
     521             : /* 658 */     MCD::OPC_Decode, 125, 31, // Opcode: BRBT_lru6
     522             : /* 661 */     MCD::OPC_FilterValue, 15, 86, 0, // Skip to: 751
     523             : /* 665 */     MCD::OPC_ExtractField, 26, 1,  // Inst{26} ...
     524             : /* 668 */     MCD::OPC_FilterValue, 0, 46, 0, // Skip to: 718
     525             : /* 672 */     MCD::OPC_ExtractField, 10, 6,  // Inst{15-10} ...
     526             : /* 675 */     MCD::OPC_FilterValue, 60, 86, 1, // Skip to: 1021
     527             : /* 679 */     MCD::OPC_ExtractField, 22, 4,  // Inst{25-22} ...
     528             : /* 682 */     MCD::OPC_FilterValue, 12, 4, 0, // Skip to: 690
     529             : /* 686 */     MCD::OPC_Decode, 145, 1, 28, // Opcode: CLRSR_lu6
     530             : /* 690 */     MCD::OPC_FilterValue, 13, 4, 0, // Skip to: 698
     531             : /* 694 */     MCD::OPC_Decode, 162, 2, 28, // Opcode: SETSR_lu6
     532             : /* 698 */     MCD::OPC_FilterValue, 14, 4, 0, // Skip to: 706
     533             : /* 702 */     MCD::OPC_Decode, 203, 1, 28, // Opcode: KENTSP_lu6
     534             : /* 706 */     MCD::OPC_FilterValue, 15, 4, 0, // Skip to: 714
     535             : /* 710 */     MCD::OPC_Decode, 205, 1, 28, // Opcode: KRESTSP_lu6
     536             : /* 714 */     MCD::OPC_Decode, 129, 1, 29, // Opcode: BRFF_lru6
     537             : /* 718 */     MCD::OPC_FilterValue, 1, 43, 1, // Skip to: 1021
     538             : /* 722 */     MCD::OPC_ExtractField, 10, 6,  // Inst{15-10} ...
     539             : /* 725 */     MCD::OPC_FilterValue, 60, 36, 1, // Skip to: 1021
     540             : /* 729 */     MCD::OPC_ExtractField, 22, 4,  // Inst{25-22} ...
     541             : /* 732 */     MCD::OPC_FilterValue, 12, 4, 0, // Skip to: 740
     542             : /* 736 */     MCD::OPC_Decode, 185, 1, 28, // Opcode: GETSR_lu6
     543             : /* 740 */     MCD::OPC_FilterValue, 13, 4, 0, // Skip to: 748
     544             : /* 744 */     MCD::OPC_Decode, 220, 1, 28, // Opcode: LDAWCP_lu6
     545             : /* 748 */     MCD::OPC_Decode, 123, 31, // Opcode: BRBF_lru6
     546             : /* 751 */     MCD::OPC_FilterValue, 16, 12, 0, // Skip to: 767
     547             : /* 755 */     MCD::OPC_CheckField, 11, 16, 159, 251, 3, 2, 1, // Skip to: 1021
     548             : /* 763 */     MCD::OPC_Decode, 173, 2, 21, // Opcode: ST16_l3r
     549             : /* 767 */     MCD::OPC_FilterValue, 17, 12, 0, // Skip to: 783
     550             : /* 771 */     MCD::OPC_CheckField, 11, 16, 159, 251, 3, 242, 0, // Skip to: 1021
     551             : /* 779 */     MCD::OPC_Decode, 174, 2, 21, // Opcode: ST8_l3r
     552             : /* 783 */     MCD::OPC_FilterValue, 18, 32, 0, // Skip to: 819
     553             : /* 787 */     MCD::OPC_ExtractField, 11, 16,  // Inst{26-11} ...
     554             : /* 790 */     MCD::OPC_FilterValue, 159, 251, 3, 3, 0, // Skip to: 799
     555             : /* 796 */     MCD::OPC_Decode, 110, 32, // Opcode: ASHR_l2rus
     556             : /* 799 */     MCD::OPC_FilterValue, 191, 251, 3, 4, 0, // Skip to: 809
     557             : /* 805 */     MCD::OPC_Decode, 135, 2, 32, // Opcode: OUTPW_l2rus
     558             : /* 809 */     MCD::OPC_FilterValue, 223, 251, 3, 206, 0, // Skip to: 1021
     559             : /* 815 */     MCD::OPC_Decode, 195, 1, 32, // Opcode: INPW_l2rus
     560             : /* 819 */     MCD::OPC_FilterValue, 19, 12, 0, // Skip to: 835
     561             : /* 823 */     MCD::OPC_CheckField, 11, 16, 159, 251, 3, 190, 0, // Skip to: 1021
     562             : /* 831 */     MCD::OPC_Decode, 225, 1, 33, // Opcode: LDAWF_l2rus
     563             : /* 835 */     MCD::OPC_FilterValue, 20, 12, 0, // Skip to: 851
     564             : /* 839 */     MCD::OPC_CheckField, 11, 16, 159, 251, 3, 174, 0, // Skip to: 1021
     565             : /* 847 */     MCD::OPC_Decode, 218, 1, 33, // Opcode: LDAWB_l2rus
     566             : /* 851 */     MCD::OPC_FilterValue, 21, 12, 0, // Skip to: 867
     567             : /* 855 */     MCD::OPC_CheckField, 11, 16, 159, 251, 3, 158, 0, // Skip to: 1021
     568             : /* 863 */     MCD::OPC_Decode, 149, 1, 34, // Opcode: CRC_l3r
     569             : /* 867 */     MCD::OPC_FilterValue, 24, 12, 0, // Skip to: 883
     570             : /* 871 */     MCD::OPC_CheckField, 11, 16, 159, 251, 3, 142, 0, // Skip to: 1021
     571             : /* 879 */     MCD::OPC_Decode, 140, 2, 21, // Opcode: REMS_l3r
     572             : /* 883 */     MCD::OPC_FilterValue, 25, 12, 0, // Skip to: 899
     573             : /* 887 */     MCD::OPC_CheckField, 11, 16, 159, 251, 3, 126, 0, // Skip to: 1021
     574             : /* 895 */     MCD::OPC_Decode, 141, 2, 21, // Opcode: REMU_l3r
     575             : /* 899 */     MCD::OPC_FilterValue, 26, 29, 0, // Skip to: 932
     576             : /* 903 */     MCD::OPC_ExtractField, 26, 1,  // Inst{26} ...
     577             : /* 906 */     MCD::OPC_FilterValue, 0, 9, 0, // Skip to: 919
     578             : /* 910 */     MCD::OPC_CheckField, 10, 6, 60, 105, 0, // Skip to: 1021
     579             : /* 916 */     MCD::OPC_Decode, 121, 35, // Opcode: BLRF_lu10
     580             : /* 919 */     MCD::OPC_FilterValue, 1, 98, 0, // Skip to: 1021
     581             : /* 923 */     MCD::OPC_CheckField, 10, 6, 60, 92, 0, // Skip to: 1021
     582             : /* 929 */     MCD::OPC_Decode, 119, 36, // Opcode: BLRB_lu10
     583             : /* 932 */     MCD::OPC_FilterValue, 27, 31, 0, // Skip to: 967
     584             : /* 936 */     MCD::OPC_ExtractField, 26, 1,  // Inst{26} ...
     585             : /* 939 */     MCD::OPC_FilterValue, 0, 10, 0, // Skip to: 953
     586             : /* 943 */     MCD::OPC_CheckField, 10, 6, 60, 72, 0, // Skip to: 1021
     587             : /* 949 */     MCD::OPC_Decode, 215, 1, 35, // Opcode: LDAPF_lu10
     588             : /* 953 */     MCD::OPC_FilterValue, 1, 64, 0, // Skip to: 1021
     589             : /* 957 */     MCD::OPC_CheckField, 10, 6, 60, 58, 0, // Skip to: 1021
     590             : /* 963 */     MCD::OPC_Decode, 213, 1, 36, // Opcode: LDAPB_lu10
     591             : /* 967 */     MCD::OPC_FilterValue, 28, 30, 0, // Skip to: 1001
     592             : /* 971 */     MCD::OPC_ExtractField, 26, 1,  // Inst{26} ...
     593             : /* 974 */     MCD::OPC_FilterValue, 0, 9, 0, // Skip to: 987
     594             : /* 978 */     MCD::OPC_CheckField, 10, 6, 60, 37, 0, // Skip to: 1021
     595             : /* 984 */     MCD::OPC_Decode, 114, 35, // Opcode: BLACP_lu10
     596             : /* 987 */     MCD::OPC_FilterValue, 1, 30, 0, // Skip to: 1021
     597             : /* 991 */     MCD::OPC_CheckField, 10, 6, 60, 24, 0, // Skip to: 1021
     598             : /* 997 */     MCD::OPC_Decode, 237, 1, 35, // Opcode: LDWCP_lu10
     599             : /* 1001 */    MCD::OPC_FilterValue, 29, 16, 0, // Skip to: 1021
     600             : /* 1005 */    MCD::OPC_CheckField, 26, 1, 0, 10, 0, // Skip to: 1021
     601             : /* 1011 */    MCD::OPC_CheckField, 10, 6, 60, 4, 0, // Skip to: 1021
     602             : /* 1017 */    MCD::OPC_Decode, 148, 2, 29, // Opcode: SETC_lru6
     603             : /* 1021 */    MCD::OPC_Fail,
     604             :   0
     605             : };
     606             : 
     607             : static bool checkDecoderPredicate(unsigned Idx, const FeatureBitset& Bits) {
     608           0 :   llvm_unreachable("Invalid index!");
     609             : }
     610             : 
     611             : template<typename InsnType>
     612         225 : static DecodeStatus decodeToMCInst(DecodeStatus S, unsigned Idx, InsnType insn, MCInst &MI,
     613             :                                    uint64_t Address, const void *Decoder, bool &DecodeComplete) {
     614         225 :   DecodeComplete = true;
     615             :   InsnType tmp;
     616         225 :   switch (Idx) {
     617           0 :   default: llvm_unreachable("Invalid index!");
     618             :   case 0:
     619             :     return S;
     620          22 :   case 1:
     621          22 :     tmp = fieldFromInstruction(insn, 0, 4);
     622          22 :     if (DecodeGRRegsRegisterClass(MI, tmp, Address, Decoder) == MCDisassembler::Fail) { return MCDisassembler::Fail; }
     623          22 :     return S;
     624          29 :   case 2:
     625          29 :     if (Decode2RInstruction(MI, insn, Address, Decoder) == MCDisassembler::Fail) { return MCDisassembler::Fail; }
     626          29 :     return S;
     627           1 :   case 3:
     628           1 :     if (Decode2RUSInstruction(MI, insn, Address, Decoder) == MCDisassembler::Fail) { return MCDisassembler::Fail; }
     629           1 :     return S;
     630           8 :   case 4:
     631           8 :     if (DecodeR2RInstruction(MI, insn, Address, Decoder) == MCDisassembler::Fail) { return MCDisassembler::Fail; }
     632           8 :     return S;
     633           1 :   case 5:
     634           1 :     if (Decode3RInstruction(MI, insn, Address, Decoder) == MCDisassembler::Fail) { return MCDisassembler::Fail; }
     635           1 :     return S;
     636           1 :   case 6:
     637           1 :     if (Decode2RImmInstruction(MI, insn, Address, Decoder) == MCDisassembler::Fail) { return MCDisassembler::Fail; }
     638           1 :     return S;
     639           7 :   case 7:
     640           7 :     if (Decode2RSrcDstInstruction(MI, insn, Address, Decoder) == MCDisassembler::Fail) { return MCDisassembler::Fail; }
     641           7 :     return S;
     642           3 :   case 8:
     643           3 :     if (DecodeRUSSrcDstBitpInstruction(MI, insn, Address, Decoder) == MCDisassembler::Fail) { return MCDisassembler::Fail; }
     644           3 :     return S;
     645           4 :   case 9:
     646           4 :     if (DecodeRUSInstruction(MI, insn, Address, Decoder) == MCDisassembler::Fail) { return MCDisassembler::Fail; }
     647           4 :     return S;
     648          16 :   case 10:
     649          16 :     tmp = fieldFromInstruction(insn, 6, 4);
     650          16 :     if (DecodeRRegsRegisterClass(MI, tmp, Address, Decoder) == MCDisassembler::Fail) { return MCDisassembler::Fail; }
     651          16 :     tmp = fieldFromInstruction(insn, 0, 6);
     652          48 :     MI.addOperand(MCOperand::createImm(tmp));
     653          16 :     return S;
     654          13 :   case 11:
     655          13 :     tmp = fieldFromInstruction(insn, 0, 6);
     656          39 :     MI.addOperand(MCOperand::createImm(tmp));
     657          13 :     return S;
     658           4 :   case 12:
     659           4 :     tmp = fieldFromInstruction(insn, 6, 4);
     660           4 :     if (DecodeGRRegsRegisterClass(MI, tmp, Address, Decoder) == MCDisassembler::Fail) { return MCDisassembler::Fail; }
     661           4 :     tmp = fieldFromInstruction(insn, 0, 6);
     662          12 :     MI.addOperand(MCOperand::createImm(tmp));
     663           4 :     return S;
     664           1 :   case 13:
     665           1 :     tmp = fieldFromInstruction(insn, 0, 6);
     666           2 :     if (DecodeNegImmOperand(MI, tmp, Address, Decoder) == MCDisassembler::Fail) { return MCDisassembler::Fail; }
     667           1 :     return S;
     668           1 :   case 14:
     669           1 :     tmp = fieldFromInstruction(insn, 6, 4);
     670           1 :     if (DecodeGRRegsRegisterClass(MI, tmp, Address, Decoder) == MCDisassembler::Fail) { return MCDisassembler::Fail; }
     671           1 :     tmp = fieldFromInstruction(insn, 0, 6);
     672           2 :     if (DecodeNegImmOperand(MI, tmp, Address, Decoder) == MCDisassembler::Fail) { return MCDisassembler::Fail; }
     673           1 :     return S;
     674           3 :   case 15:
     675           3 :     if (DecodeRUSBitpInstruction(MI, insn, Address, Decoder) == MCDisassembler::Fail) { return MCDisassembler::Fail; }
     676           3 :     return S;
     677           0 :   case 16:
     678           0 :     if (Decode2RUSBitpInstruction(MI, insn, Address, Decoder) == MCDisassembler::Fail) { return MCDisassembler::Fail; }
     679           0 :     return S;
     680           0 :   case 17:
     681           0 :     if (Decode3RImmInstruction(MI, insn, Address, Decoder) == MCDisassembler::Fail) { return MCDisassembler::Fail; }
     682           0 :     return S;
     683           4 :   case 18:
     684           4 :     tmp = fieldFromInstruction(insn, 0, 10);
     685          12 :     MI.addOperand(MCOperand::createImm(tmp));
     686           4 :     return S;
     687           2 :   case 19:
     688           2 :     tmp = fieldFromInstruction(insn, 0, 10);
     689           4 :     if (DecodeNegImmOperand(MI, tmp, Address, Decoder) == MCDisassembler::Fail) { return MCDisassembler::Fail; }
     690           2 :     return S;
     691          16 :   case 20:
     692          16 :     if (DecodeL2RInstruction(MI, insn, Address, Decoder) == MCDisassembler::Fail) { return MCDisassembler::Fail; }
     693           0 :     return S;
     694           7 :   case 21:
     695           7 :     if (DecodeL3RInstruction(MI, insn, Address, Decoder) == MCDisassembler::Fail) { return MCDisassembler::Fail; }
     696           0 :     return S;
     697           1 :   case 22:
     698           1 :     if (DecodeL4RSrcDstInstruction(MI, insn, Address, Decoder) == MCDisassembler::Fail) { return MCDisassembler::Fail; }
     699           0 :     return S;
     700           2 :   case 23:
     701           2 :     if (DecodeL4RSrcDstSrcDstInstruction(MI, insn, Address, Decoder) == MCDisassembler::Fail) { return MCDisassembler::Fail; }
     702           0 :     return S;
     703           4 :   case 24:
     704           4 :     if (DecodeL5RInstruction(MI, insn, Address, Decoder) == MCDisassembler::Fail) { return MCDisassembler::Fail; }
     705           0 :     return S;
     706           0 :   case 25:
     707           0 :     if (DecodeL6RInstruction(MI, insn, Address, Decoder) == MCDisassembler::Fail) { return MCDisassembler::Fail; }
     708           0 :     return S;
     709           5 :   case 26:
     710           5 :     if (DecodeLR2RInstruction(MI, insn, Address, Decoder) == MCDisassembler::Fail) { return MCDisassembler::Fail; }
     711           0 :     return S;
     712          16 :   case 27:
     713          16 :     tmp = fieldFromInstruction(insn, 22, 4);
     714          16 :     if (DecodeRRegsRegisterClass(MI, tmp, Address, Decoder) == MCDisassembler::Fail) { return MCDisassembler::Fail; }
     715          16 :     tmp = 0;
     716          16 :     tmp |= fieldFromInstruction(insn, 0, 10) << 6;
     717          16 :     tmp |= fieldFromInstruction(insn, 16, 6) << 0;
     718          48 :     MI.addOperand(MCOperand::createImm(tmp));
     719           0 :     return S;
     720          13 :   case 28:
     721          13 :     tmp = 0;
     722          13 :     tmp |= fieldFromInstruction(insn, 0, 10) << 6;
     723          13 :     tmp |= fieldFromInstruction(insn, 16, 6) << 0;
     724          39 :     MI.addOperand(MCOperand::createImm(tmp));
     725           0 :     return S;
     726           4 :   case 29:
     727           4 :     tmp = fieldFromInstruction(insn, 22, 4);
     728           4 :     if (DecodeGRRegsRegisterClass(MI, tmp, Address, Decoder) == MCDisassembler::Fail) { return MCDisassembler::Fail; }
     729           4 :     tmp = 0;
     730           4 :     tmp |= fieldFromInstruction(insn, 0, 10) << 6;
     731           4 :     tmp |= fieldFromInstruction(insn, 16, 6) << 0;
     732          12 :     MI.addOperand(MCOperand::createImm(tmp));
     733           0 :     return S;
     734           1 :   case 30:
     735           1 :     tmp = 0;
     736           1 :     tmp |= fieldFromInstruction(insn, 0, 10) << 6;
     737           1 :     tmp |= fieldFromInstruction(insn, 16, 6) << 0;
     738           2 :     if (DecodeNegImmOperand(MI, tmp, Address, Decoder) == MCDisassembler::Fail) { return MCDisassembler::Fail; }
     739           0 :     return S;
     740           1 :   case 31:
     741           1 :     tmp = fieldFromInstruction(insn, 22, 4);
     742           1 :     if (DecodeGRRegsRegisterClass(MI, tmp, Address, Decoder) == MCDisassembler::Fail) { return MCDisassembler::Fail; }
     743           1 :     tmp = 0;
     744           1 :     tmp |= fieldFromInstruction(insn, 0, 10) << 6;
     745           1 :     tmp |= fieldFromInstruction(insn, 16, 6) << 0;
     746           2 :     if (DecodeNegImmOperand(MI, tmp, Address, Decoder) == MCDisassembler::Fail) { return MCDisassembler::Fail; }
     747           0 :     return S;
     748           3 :   case 32:
     749           3 :     if (DecodeL2RUSBitpInstruction(MI, insn, Address, Decoder) == MCDisassembler::Fail) { return MCDisassembler::Fail; }
     750           0 :     return S;
     751           2 :   case 33:
     752           2 :     if (DecodeL2RUSInstruction(MI, insn, Address, Decoder) == MCDisassembler::Fail) { return MCDisassembler::Fail; }
     753           0 :     return S;
     754           1 :   case 34:
     755           1 :     if (DecodeL3RSrcDstInstruction(MI, insn, Address, Decoder) == MCDisassembler::Fail) { return MCDisassembler::Fail; }
     756           0 :     return S;
     757           4 :   case 35:
     758           4 :     tmp = 0;
     759           4 :     tmp |= fieldFromInstruction(insn, 0, 10) << 10;
     760           4 :     tmp |= fieldFromInstruction(insn, 16, 10) << 0;
     761          12 :     MI.addOperand(MCOperand::createImm(tmp));
     762           0 :     return S;
     763           2 :   case 36:
     764           2 :     tmp = 0;
     765           2 :     tmp |= fieldFromInstruction(insn, 0, 10) << 10;
     766           2 :     tmp |= fieldFromInstruction(insn, 16, 10) << 0;
     767           4 :     if (DecodeNegImmOperand(MI, tmp, Address, Decoder) == MCDisassembler::Fail) { return MCDisassembler::Fail; }
     768           0 :     return S;
     769             :   }
     770             : }
     771             : 
     772             : template<typename InsnType>
     773         307 : static DecodeStatus decodeInstruction(const uint8_t DecodeTable[], MCInst &MI,
     774             :                                       InsnType insn, uint64_t Address,
     775             :                                       const void *DisAsm,
     776             :                                       const MCSubtargetInfo &STI) {
     777         225 :   const FeatureBitset& Bits = STI.getFeatureBits();
     778             : 
     779         225 :   const uint8_t *Ptr = DecodeTable;
     780         225 :   uint32_t CurFieldValue = 0;
     781         225 :   DecodeStatus S = MCDisassembler::Success;
     782             :   while (true) {
     783        6828 :     ptrdiff_t Loc = Ptr - DecodeTable;
     784        6828 :     switch (*Ptr) {
     785           0 :     default:
     786           0 :       errs() << Loc << ": Unexpected decode table opcode!\n";
     787           0 :       return MCDisassembler::Fail;
     788         659 :     case MCD::OPC_ExtractField: {
     789         659 :       unsigned Start = *++Ptr;
     790         659 :       unsigned Len = *++Ptr;
     791         659 :       ++Ptr;
     792         659 :       CurFieldValue = fieldFromInstruction(insn, Start, Len);
     793             :       DEBUG(dbgs() << Loc << ": OPC_ExtractField(" << Start << ", "
     794             :                    << Len << "): " << CurFieldValue << "\n");
     795         429 :       break;
     796             :     }
     797        5798 :     case MCD::OPC_FilterValue: {
     798             :       // Decode the field value.
     799             :       unsigned Len;
     800        5798 :       InsnType Val = decodeULEB128(++Ptr, &Len);
     801        5798 :       Ptr += Len;
     802             :       // NumToSkip is a plain 16-bit integer.
     803        5798 :       unsigned NumToSkip = *Ptr++;
     804        5798 :       NumToSkip |= (*Ptr++) << 8;
     805             : 
     806             :       // Perform the filter operation.
     807        5798 :       if (Val != CurFieldValue)
     808        5279 :         Ptr += NumToSkip;
     809             :       DEBUG(dbgs() << Loc << ": OPC_FilterValue(" << Val << ", " << NumToSkip
     810             :                    << "): " << ((Val != CurFieldValue) ? "FAIL:" : "PASS:")
     811             :                    << " continuing at " << (Ptr - DecodeTable) << "\n");
     812             : 
     813             :       break;
     814             :     }
     815          64 :     case MCD::OPC_CheckField: {
     816          64 :       unsigned Start = *++Ptr;
     817          64 :       unsigned Len = *++Ptr;
     818         125 :       InsnType FieldValue = fieldFromInstruction(insn, Start, Len);
     819             :       // Decode the field value.
     820          64 :       uint32_t ExpectedValue = decodeULEB128(++Ptr, &Len);
     821          64 :       Ptr += Len;
     822             :       // NumToSkip is a plain 16-bit integer.
     823          64 :       unsigned NumToSkip = *Ptr++;
     824          64 :       NumToSkip |= (*Ptr++) << 8;
     825             : 
     826             :       // If the actual and expected values don't match, skip.
     827          64 :       if (ExpectedValue != FieldValue)
     828          16 :         Ptr += NumToSkip;
     829             :       DEBUG(dbgs() << Loc << ": OPC_CheckField(" << Start << ", "
     830             :                    << Len << ", " << ExpectedValue << ", " << NumToSkip
     831             :                    << "): FieldValue = " << FieldValue << ", ExpectedValue = "
     832             :                    << ExpectedValue << ": "
     833             :                    << ((ExpectedValue == FieldValue) ? "PASS\n" : "FAIL\n"));
     834             :       break;
     835             :     }
     836           0 :     case MCD::OPC_CheckPredicate: {
     837             :       unsigned Len;
     838             :       // Decode the Predicate Index value.
     839           0 :       unsigned PIdx = decodeULEB128(++Ptr, &Len);
     840           0 :       Ptr += Len;
     841             :       // NumToSkip is a plain 16-bit integer.
     842           0 :       unsigned NumToSkip = *Ptr++;
     843           0 :       NumToSkip |= (*Ptr++) << 8;
     844             :       // Check the predicate.
     845             :       bool Pred;
     846           0 :       if (!(Pred = checkDecoderPredicate(PIdx, Bits)))
     847             :         Ptr += NumToSkip;
     848             :       (void)Pred;
     849             :       DEBUG(dbgs() << Loc << ": OPC_CheckPredicate(" << PIdx << "): "
     850             :             << (Pred ? "PASS\n" : "FAIL\n"));
     851             : 
     852             :       break;
     853             :     }
     854         225 :     case MCD::OPC_Decode: {
     855             :       unsigned Len;
     856             :       // Decode the Opcode value.
     857         225 :       unsigned Opc = decodeULEB128(++Ptr, &Len);
     858         225 :       Ptr += Len;
     859         225 :       unsigned DecodeIdx = decodeULEB128(Ptr, &Len);
     860         225 :       Ptr += Len;
     861             : 
     862         225 :       MI.clear();
     863         450 :       MI.setOpcode(Opc);
     864             :       bool DecodeComplete;
     865         225 :       S = decodeToMCInst(S, DecodeIdx, insn, MI, Address, DisAsm, DecodeComplete);
     866             :       assert(DecodeComplete);
     867             : 
     868             :       DEBUG(dbgs() << Loc << ": OPC_Decode: opcode " << Opc
     869             :                    << ", using decoder " << DecodeIdx << ": "
     870             :                    << (S != MCDisassembler::Fail ? "PASS" : "FAIL") << "\n");
     871             :       return S;
     872             :     }
     873           0 :     case MCD::OPC_TryDecode: {
     874             :       unsigned Len;
     875             :       // Decode the Opcode value.
     876           0 :       unsigned Opc = decodeULEB128(++Ptr, &Len);
     877           0 :       Ptr += Len;
     878           0 :       unsigned DecodeIdx = decodeULEB128(Ptr, &Len);
     879           0 :       Ptr += Len;
     880             :       // NumToSkip is a plain 16-bit integer.
     881           0 :       unsigned NumToSkip = *Ptr++;
     882           0 :       NumToSkip |= (*Ptr++) << 8;
     883             : 
     884             :       // Perform the decode operation.
     885           0 :       MCInst TmpMI;
     886           0 :       TmpMI.setOpcode(Opc);
     887             :       bool DecodeComplete;
     888           0 :       S = decodeToMCInst(S, DecodeIdx, insn, TmpMI, Address, DisAsm, DecodeComplete);
     889             :       DEBUG(dbgs() << Loc << ": OPC_TryDecode: opcode " << Opc
     890             :                    << ", using decoder " << DecodeIdx << ": ");
     891             : 
     892           0 :       if (DecodeComplete) {
     893             :         // Decoding complete.
     894             :         DEBUG(dbgs() << (S != MCDisassembler::Fail ? "PASS" : "FAIL") << "\n");
     895           0 :         MI = TmpMI;
     896           0 :         return S;
     897             :       } else {
     898             :         assert(S == MCDisassembler::Fail);
     899             :         // If the decoding was incomplete, skip.
     900           0 :         Ptr += NumToSkip;
     901             :         DEBUG(dbgs() << "FAIL: continuing at " << (Ptr - DecodeTable) << "\n");
     902             :         // Reset decode status. This also drops a SoftFail status that could be
     903             :         // set before the decode attempt.
     904           0 :         S = MCDisassembler::Success;
     905             :       }
     906           0 :       break;
     907             :     }
     908           0 :     case MCD::OPC_SoftFail: {
     909             :       // Decode the mask values.
     910             :       unsigned Len;
     911           0 :       InsnType PositiveMask = decodeULEB128(++Ptr, &Len);
     912           0 :       Ptr += Len;
     913           0 :       InsnType NegativeMask = decodeULEB128(Ptr, &Len);
     914           0 :       Ptr += Len;
     915           0 :       bool Fail = (insn & PositiveMask) || (~insn & NegativeMask);
     916             :       if (Fail)
     917             :         S = MCDisassembler::SoftFail;
     918             :       DEBUG(dbgs() << Loc << ": OPC_SoftFail: " << (Fail ? "FAIL\n":"PASS\n"));
     919             :       break;
     920             :     }
     921             :     case MCD::OPC_Fail: {
     922             :       DEBUG(dbgs() << Loc << ": OPC_Fail\n");
     923             :       return MCDisassembler::Fail;
     924             :     }
     925             :     }
     926             :   }
     927             :   llvm_unreachable("bogosity detected in disassembler state machine!");
     928             : }
     929             : 
     930             : 
     931             : } // End llvm namespace

Generated by: LCOV version 1.13