| 1 | /*===- TableGen'erated file -------------------------------------*- C++ -*-===*\ |
| 2 | |* *| |
| 3 | |* * MSP430 Disassembler *| |
| 4 | |* *| |
| 5 | |* Automatically generated file, do not edit! *| |
| 6 | |* *| |
| 7 | \*===----------------------------------------------------------------------===*/ |
| 8 | |
| 9 | |
| 10 | #include "llvm/MC/MCInst.h" |
| 11 | #include "llvm/MC/MCSubtargetInfo.h" |
| 12 | #include "llvm/Support/DataTypes.h" |
| 13 | #include "llvm/Support/Debug.h" |
| 14 | #include "llvm/Support/LEB128.h" |
| 15 | #include "llvm/Support/raw_ostream.h" |
| 16 | #include "llvm/TargetParser/SubtargetFeature.h" |
| 17 | #include <assert.h> |
| 18 | |
| 19 | namespace { |
| 20 | |
| 21 | // Helper functions for extracting fields from encoded instructions. |
| 22 | // InsnType must either be integral or an APInt-like object that must: |
| 23 | // * be default-constructible and copy-constructible |
| 24 | // * be constructible from an APInt (this can be private) |
| 25 | // * Support insertBits(bits, startBit, numBits) |
| 26 | // * Support extractBitsAsZExtValue(numBits, startBit) |
| 27 | // * Support the ~, &, ==, and != operators with other objects of the same type |
| 28 | // * Support the != and bitwise & with uint64_t |
| 29 | // * Support put (<<) to raw_ostream& |
| 30 | template <typename InsnType> |
| 31 | #if defined(_MSC_VER) && !defined(__clang__) |
| 32 | __declspec(noinline) |
| 33 | #endif |
| 34 | static std::enable_if_t<std::is_integral<InsnType>::value, InsnType> |
| 35 | fieldFromInstruction(const InsnType &insn, unsigned startBit, |
| 36 | unsigned numBits) { |
| 37 | assert(startBit + numBits <= 64 && "Cannot support >64-bit extractions!" ); |
| 38 | assert(startBit + numBits <= (sizeof(InsnType) * 8) && |
| 39 | "Instruction field out of bounds!" ); |
| 40 | InsnType fieldMask; |
| 41 | if (numBits == sizeof(InsnType) * 8) |
| 42 | fieldMask = (InsnType)(-1LL); |
| 43 | else |
| 44 | fieldMask = (((InsnType)1 << numBits) - 1) << startBit; |
| 45 | return (insn & fieldMask) >> startBit; |
| 46 | } |
| 47 | |
| 48 | template <typename InsnType> |
| 49 | static std::enable_if_t<!std::is_integral<InsnType>::value, uint64_t> |
| 50 | fieldFromInstruction(const InsnType &insn, unsigned startBit, |
| 51 | unsigned numBits) { |
| 52 | return insn.extractBitsAsZExtValue(numBits, startBit); |
| 53 | } |
| 54 | |
| 55 | // Helper function for inserting bits extracted from an encoded instruction into |
| 56 | // a field. |
| 57 | template <typename InsnType> |
| 58 | static void insertBits(InsnType &field, InsnType bits, unsigned startBit, |
| 59 | unsigned numBits) { |
| 60 | if constexpr (std::is_integral<InsnType>::value) { |
| 61 | assert(startBit + numBits <= sizeof field * 8); |
| 62 | (void)numBits; |
| 63 | field |= (InsnType)bits << startBit; |
| 64 | } else { |
| 65 | field.insertBits(bits, startBit, numBits); |
| 66 | } |
| 67 | } |
| 68 | |
| 69 | static bool Check(DecodeStatus &Out, DecodeStatus In) { |
| 70 | Out = static_cast<DecodeStatus>(Out & In); |
| 71 | return Out != MCDisassembler::Fail; |
| 72 | } |
| 73 | |
| 74 | static const uint8_t DecoderTable16[] = { |
| 75 | /* 0 */ MCD::OPC_ExtractField, 13, 3, // Inst{15-13} ... |
| 76 | /* 3 */ MCD::OPC_FilterValue, 0, 246, 0, // Skip to: 253 |
| 77 | /* 7 */ MCD::OPC_ExtractField, 6, 7, // Inst{12-6} ... |
| 78 | /* 10 */ MCD::OPC_FilterValue, 64, 25, 0, // Skip to: 39 |
| 79 | /* 14 */ MCD::OPC_ExtractField, 4, 2, // Inst{5-4} ... |
| 80 | /* 17 */ MCD::OPC_FilterValue, 0, 4, 0, // Skip to: 25 |
| 81 | /* 21 */ MCD::OPC_Decode, 173, 4, 0, // Opcode: RRC16r, DecodeIdx: 0 |
| 82 | /* 25 */ MCD::OPC_FilterValue, 2, 4, 0, // Skip to: 33 |
| 83 | /* 29 */ MCD::OPC_Decode, 171, 4, 1, // Opcode: RRC16n, DecodeIdx: 1 |
| 84 | /* 33 */ MCD::OPC_FilterValueOrFail, 3, |
| 85 | /* 35 */ MCD::OPC_Decode, 172, 4, 1, // Opcode: RRC16p, DecodeIdx: 1 |
| 86 | /* 39 */ MCD::OPC_FilterValue, 65, 25, 0, // Skip to: 68 |
| 87 | /* 43 */ MCD::OPC_ExtractField, 4, 2, // Inst{5-4} ... |
| 88 | /* 46 */ MCD::OPC_FilterValue, 0, 4, 0, // Skip to: 54 |
| 89 | /* 50 */ MCD::OPC_Decode, 177, 4, 2, // Opcode: RRC8r, DecodeIdx: 2 |
| 90 | /* 54 */ MCD::OPC_FilterValue, 2, 4, 0, // Skip to: 62 |
| 91 | /* 58 */ MCD::OPC_Decode, 175, 4, 1, // Opcode: RRC8n, DecodeIdx: 1 |
| 92 | /* 62 */ MCD::OPC_FilterValueOrFail, 3, |
| 93 | /* 64 */ MCD::OPC_Decode, 176, 4, 1, // Opcode: RRC8p, DecodeIdx: 1 |
| 94 | /* 68 */ MCD::OPC_FilterValue, 66, 25, 0, // Skip to: 97 |
| 95 | /* 72 */ MCD::OPC_ExtractField, 4, 2, // Inst{5-4} ... |
| 96 | /* 75 */ MCD::OPC_FilterValue, 0, 4, 0, // Skip to: 83 |
| 97 | /* 79 */ MCD::OPC_Decode, 235, 4, 0, // Opcode: SWPB16r, DecodeIdx: 0 |
| 98 | /* 83 */ MCD::OPC_FilterValue, 2, 4, 0, // Skip to: 91 |
| 99 | /* 87 */ MCD::OPC_Decode, 233, 4, 1, // Opcode: SWPB16n, DecodeIdx: 1 |
| 100 | /* 91 */ MCD::OPC_FilterValueOrFail, 3, |
| 101 | /* 93 */ MCD::OPC_Decode, 234, 4, 1, // Opcode: SWPB16p, DecodeIdx: 1 |
| 102 | /* 97 */ MCD::OPC_FilterValue, 68, 25, 0, // Skip to: 126 |
| 103 | /* 101 */ MCD::OPC_ExtractField, 4, 2, // Inst{5-4} ... |
| 104 | /* 104 */ MCD::OPC_FilterValue, 0, 4, 0, // Skip to: 112 |
| 105 | /* 108 */ MCD::OPC_Decode, 165, 4, 0, // Opcode: RRA16r, DecodeIdx: 0 |
| 106 | /* 112 */ MCD::OPC_FilterValue, 2, 4, 0, // Skip to: 120 |
| 107 | /* 116 */ MCD::OPC_Decode, 163, 4, 1, // Opcode: RRA16n, DecodeIdx: 1 |
| 108 | /* 120 */ MCD::OPC_FilterValueOrFail, 3, |
| 109 | /* 122 */ MCD::OPC_Decode, 164, 4, 1, // Opcode: RRA16p, DecodeIdx: 1 |
| 110 | /* 126 */ MCD::OPC_FilterValue, 69, 25, 0, // Skip to: 155 |
| 111 | /* 130 */ MCD::OPC_ExtractField, 4, 2, // Inst{5-4} ... |
| 112 | /* 133 */ MCD::OPC_FilterValue, 0, 4, 0, // Skip to: 141 |
| 113 | /* 137 */ MCD::OPC_Decode, 169, 4, 2, // Opcode: RRA8r, DecodeIdx: 2 |
| 114 | /* 141 */ MCD::OPC_FilterValue, 2, 4, 0, // Skip to: 149 |
| 115 | /* 145 */ MCD::OPC_Decode, 167, 4, 1, // Opcode: RRA8n, DecodeIdx: 1 |
| 116 | /* 149 */ MCD::OPC_FilterValueOrFail, 3, |
| 117 | /* 151 */ MCD::OPC_Decode, 168, 4, 1, // Opcode: RRA8p, DecodeIdx: 1 |
| 118 | /* 155 */ MCD::OPC_FilterValue, 70, 25, 0, // Skip to: 184 |
| 119 | /* 159 */ MCD::OPC_ExtractField, 4, 2, // Inst{5-4} ... |
| 120 | /* 162 */ MCD::OPC_FilterValue, 0, 4, 0, // Skip to: 170 |
| 121 | /* 166 */ MCD::OPC_Decode, 183, 4, 0, // Opcode: SEXT16r, DecodeIdx: 0 |
| 122 | /* 170 */ MCD::OPC_FilterValue, 2, 4, 0, // Skip to: 178 |
| 123 | /* 174 */ MCD::OPC_Decode, 181, 4, 1, // Opcode: SEXT16n, DecodeIdx: 1 |
| 124 | /* 178 */ MCD::OPC_FilterValueOrFail, 3, |
| 125 | /* 180 */ MCD::OPC_Decode, 182, 4, 1, // Opcode: SEXT16p, DecodeIdx: 1 |
| 126 | /* 184 */ MCD::OPC_FilterValue, 72, 14, 0, // Skip to: 202 |
| 127 | /* 188 */ MCD::OPC_CheckField, 4, 2, 0, 4, 0, // Skip to: 198 |
| 128 | /* 194 */ MCD::OPC_Decode, 158, 4, 1, // Opcode: PUSH16r, DecodeIdx: 1 |
| 129 | /* 198 */ MCD::OPC_Decode, 156, 4, 3, // Opcode: PUSH16c, DecodeIdx: 3 |
| 130 | /* 202 */ MCD::OPC_FilterValue, 73, 8, 0, // Skip to: 214 |
| 131 | /* 206 */ MCD::OPC_CheckFieldOrFail, 4, 2, 0, |
| 132 | /* 210 */ MCD::OPC_Decode, 159, 4, 4, // Opcode: PUSH8r, DecodeIdx: 4 |
| 133 | /* 214 */ MCD::OPC_FilterValue, 74, 25, 0, // Skip to: 243 |
| 134 | /* 218 */ MCD::OPC_ExtractField, 4, 2, // Inst{5-4} ... |
| 135 | /* 221 */ MCD::OPC_FilterValue, 0, 4, 0, // Skip to: 229 |
| 136 | /* 225 */ MCD::OPC_Decode, 208, 3, 1, // Opcode: CALLr, DecodeIdx: 1 |
| 137 | /* 229 */ MCD::OPC_FilterValue, 2, 4, 0, // Skip to: 237 |
| 138 | /* 233 */ MCD::OPC_Decode, 206, 3, 1, // Opcode: CALLn, DecodeIdx: 1 |
| 139 | /* 237 */ MCD::OPC_FilterValueOrFail, 3, |
| 140 | /* 239 */ MCD::OPC_Decode, 207, 3, 1, // Opcode: CALLp, DecodeIdx: 1 |
| 141 | /* 243 */ MCD::OPC_FilterValueOrFail, 76, |
| 142 | /* 245 */ MCD::OPC_CheckFieldOrFail, 0, 6, 0, |
| 143 | /* 249 */ MCD::OPC_Decode, 161, 4, 5, // Opcode: RETI, DecodeIdx: 5 |
| 144 | /* 253 */ MCD::OPC_FilterValueOrFail, 1, |
| 145 | /* 255 */ MCD::OPC_CheckField, 10, 3, 7, 4, 0, // Skip to: 265 |
| 146 | /* 261 */ MCD::OPC_Decode, 130, 4, 6, // Opcode: JMP, DecodeIdx: 6 |
| 147 | /* 265 */ MCD::OPC_Decode, 129, 4, 7, // Opcode: JCC, DecodeIdx: 7 |
| 148 | /* 269 */ MCD::OPC_Fail, |
| 149 | 0 |
| 150 | }; |
| 151 | |
| 152 | static const uint8_t DecoderTable32[] = { |
| 153 | /* 0 */ MCD::OPC_ExtractField, 4, 12, // Inst{15-4} ... |
| 154 | /* 3 */ MCD::OPC_FilterValue, 129, 2, 4, 0, // Skip to: 12 |
| 155 | /* 8 */ MCD::OPC_Decode, 170, 4, 8, // Opcode: RRC16m, DecodeIdx: 8 |
| 156 | /* 12 */ MCD::OPC_FilterValue, 133, 2, 4, 0, // Skip to: 21 |
| 157 | /* 17 */ MCD::OPC_Decode, 174, 4, 8, // Opcode: RRC8m, DecodeIdx: 8 |
| 158 | /* 21 */ MCD::OPC_FilterValue, 137, 2, 4, 0, // Skip to: 30 |
| 159 | /* 26 */ MCD::OPC_Decode, 232, 4, 8, // Opcode: SWPB16m, DecodeIdx: 8 |
| 160 | /* 30 */ MCD::OPC_FilterValue, 145, 2, 4, 0, // Skip to: 39 |
| 161 | /* 35 */ MCD::OPC_Decode, 162, 4, 8, // Opcode: RRA16m, DecodeIdx: 8 |
| 162 | /* 39 */ MCD::OPC_FilterValue, 149, 2, 4, 0, // Skip to: 48 |
| 163 | /* 44 */ MCD::OPC_Decode, 166, 4, 8, // Opcode: RRA8m, DecodeIdx: 8 |
| 164 | /* 48 */ MCD::OPC_FilterValue, 153, 2, 4, 0, // Skip to: 57 |
| 165 | /* 53 */ MCD::OPC_Decode, 180, 4, 8, // Opcode: SEXT16m, DecodeIdx: 8 |
| 166 | /* 57 */ MCD::OPC_FilterValue, 163, 2, 8, 0, // Skip to: 70 |
| 167 | /* 62 */ MCD::OPC_CheckFieldOrFail, 0, 4, 0, |
| 168 | /* 66 */ MCD::OPC_Decode, 157, 4, 9, // Opcode: PUSH16i, DecodeIdx: 9 |
| 169 | /* 70 */ MCD::OPC_FilterValue, 169, 2, 4, 0, // Skip to: 79 |
| 170 | /* 75 */ MCD::OPC_Decode, 205, 3, 8, // Opcode: CALLm, DecodeIdx: 8 |
| 171 | /* 79 */ MCD::OPC_FilterValueOrFail, 171, 2, |
| 172 | /* 82 */ MCD::OPC_CheckFieldOrFail, 0, 4, 0, |
| 173 | /* 86 */ MCD::OPC_Decode, 204, 3, 9, // Opcode: CALLi, DecodeIdx: 9 |
| 174 | /* 90 */ MCD::OPC_Fail, |
| 175 | 0 |
| 176 | }; |
| 177 | |
| 178 | static const uint8_t DecoderTableAlpha16[] = { |
| 179 | /* 0 */ MCD::OPC_ExtractField, 12, 4, // Inst{15-12} ... |
| 180 | /* 3 */ MCD::OPC_FilterValue, 4, 27, 0, // Skip to: 34 |
| 181 | /* 7 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
| 182 | /* 10 */ MCD::OPC_FilterValue, 0, 14, 0, // Skip to: 28 |
| 183 | /* 14 */ MCD::OPC_CheckField, 0, 4, 0, 4, 0, // Skip to: 24 |
| 184 | /* 20 */ MCD::OPC_Decode, 203, 3, 10, // Opcode: Br, DecodeIdx: 10 |
| 185 | /* 24 */ MCD::OPC_Decode, 141, 4, 11, // Opcode: MOV16rr, DecodeIdx: 11 |
| 186 | /* 28 */ MCD::OPC_FilterValueOrFail, 4, |
| 187 | /* 30 */ MCD::OPC_Decode, 152, 4, 12, // Opcode: MOV8rr, DecodeIdx: 12 |
| 188 | /* 34 */ MCD::OPC_FilterValue, 5, 17, 0, // Skip to: 55 |
| 189 | /* 38 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
| 190 | /* 41 */ MCD::OPC_FilterValue, 0, 4, 0, // Skip to: 49 |
| 191 | /* 45 */ MCD::OPC_Decode, 193, 2, 13, // Opcode: ADD16rr, DecodeIdx: 13 |
| 192 | /* 49 */ MCD::OPC_FilterValueOrFail, 4, |
| 193 | /* 51 */ MCD::OPC_Decode, 205, 2, 14, // Opcode: ADD8rr, DecodeIdx: 14 |
| 194 | /* 55 */ MCD::OPC_FilterValue, 6, 17, 0, // Skip to: 76 |
| 195 | /* 59 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
| 196 | /* 62 */ MCD::OPC_FilterValue, 0, 4, 0, // Skip to: 70 |
| 197 | /* 66 */ MCD::OPC_Decode, 217, 2, 13, // Opcode: ADDC16rr, DecodeIdx: 13 |
| 198 | /* 70 */ MCD::OPC_FilterValueOrFail, 4, |
| 199 | /* 72 */ MCD::OPC_Decode, 229, 2, 14, // Opcode: ADDC8rr, DecodeIdx: 14 |
| 200 | /* 76 */ MCD::OPC_FilterValue, 7, 17, 0, // Skip to: 97 |
| 201 | /* 80 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
| 202 | /* 83 */ MCD::OPC_FilterValue, 0, 4, 0, // Skip to: 91 |
| 203 | /* 87 */ MCD::OPC_Decode, 219, 4, 13, // Opcode: SUBC16rr, DecodeIdx: 13 |
| 204 | /* 91 */ MCD::OPC_FilterValueOrFail, 4, |
| 205 | /* 93 */ MCD::OPC_Decode, 231, 4, 14, // Opcode: SUBC8rr, DecodeIdx: 14 |
| 206 | /* 97 */ MCD::OPC_FilterValue, 8, 17, 0, // Skip to: 118 |
| 207 | /* 101 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
| 208 | /* 104 */ MCD::OPC_FilterValue, 0, 4, 0, // Skip to: 112 |
| 209 | /* 108 */ MCD::OPC_Decode, 195, 4, 13, // Opcode: SUB16rr, DecodeIdx: 13 |
| 210 | /* 112 */ MCD::OPC_FilterValueOrFail, 4, |
| 211 | /* 114 */ MCD::OPC_Decode, 207, 4, 14, // Opcode: SUB8rr, DecodeIdx: 14 |
| 212 | /* 118 */ MCD::OPC_FilterValue, 9, 17, 0, // Skip to: 139 |
| 213 | /* 122 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
| 214 | /* 125 */ MCD::OPC_FilterValue, 0, 4, 0, // Skip to: 133 |
| 215 | /* 129 */ MCD::OPC_Decode, 220, 3, 11, // Opcode: CMP16rr, DecodeIdx: 11 |
| 216 | /* 133 */ MCD::OPC_FilterValueOrFail, 4, |
| 217 | /* 135 */ MCD::OPC_Decode, 232, 3, 12, // Opcode: CMP8rr, DecodeIdx: 12 |
| 218 | /* 139 */ MCD::OPC_FilterValue, 10, 17, 0, // Skip to: 160 |
| 219 | /* 143 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
| 220 | /* 146 */ MCD::OPC_FilterValue, 0, 4, 0, // Skip to: 154 |
| 221 | /* 150 */ MCD::OPC_Decode, 244, 3, 13, // Opcode: DADD16rr, DecodeIdx: 13 |
| 222 | /* 154 */ MCD::OPC_FilterValueOrFail, 4, |
| 223 | /* 156 */ MCD::OPC_Decode, 128, 4, 14, // Opcode: DADD8rr, DecodeIdx: 14 |
| 224 | /* 160 */ MCD::OPC_FilterValue, 11, 17, 0, // Skip to: 181 |
| 225 | /* 164 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
| 226 | /* 167 */ MCD::OPC_FilterValue, 0, 4, 0, // Skip to: 175 |
| 227 | /* 171 */ MCD::OPC_Decode, 188, 3, 11, // Opcode: BIT16rr, DecodeIdx: 11 |
| 228 | /* 175 */ MCD::OPC_FilterValueOrFail, 4, |
| 229 | /* 177 */ MCD::OPC_Decode, 200, 3, 12, // Opcode: BIT8rr, DecodeIdx: 12 |
| 230 | /* 181 */ MCD::OPC_FilterValue, 12, 17, 0, // Skip to: 202 |
| 231 | /* 185 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
| 232 | /* 188 */ MCD::OPC_FilterValue, 0, 4, 0, // Skip to: 196 |
| 233 | /* 192 */ MCD::OPC_Decode, 140, 3, 13, // Opcode: BIC16rr, DecodeIdx: 13 |
| 234 | /* 196 */ MCD::OPC_FilterValueOrFail, 4, |
| 235 | /* 198 */ MCD::OPC_Decode, 152, 3, 14, // Opcode: BIC8rr, DecodeIdx: 14 |
| 236 | /* 202 */ MCD::OPC_FilterValue, 13, 17, 0, // Skip to: 223 |
| 237 | /* 206 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
| 238 | /* 209 */ MCD::OPC_FilterValue, 0, 4, 0, // Skip to: 217 |
| 239 | /* 213 */ MCD::OPC_Decode, 164, 3, 13, // Opcode: BIS16rr, DecodeIdx: 13 |
| 240 | /* 217 */ MCD::OPC_FilterValueOrFail, 4, |
| 241 | /* 219 */ MCD::OPC_Decode, 176, 3, 14, // Opcode: BIS8rr, DecodeIdx: 14 |
| 242 | /* 223 */ MCD::OPC_FilterValue, 14, 17, 0, // Skip to: 244 |
| 243 | /* 227 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
| 244 | /* 230 */ MCD::OPC_FilterValue, 0, 4, 0, // Skip to: 238 |
| 245 | /* 234 */ MCD::OPC_Decode, 255, 4, 13, // Opcode: XOR16rr, DecodeIdx: 13 |
| 246 | /* 238 */ MCD::OPC_FilterValueOrFail, 4, |
| 247 | /* 240 */ MCD::OPC_Decode, 139, 5, 14, // Opcode: XOR8rr, DecodeIdx: 14 |
| 248 | /* 244 */ MCD::OPC_FilterValueOrFail, 15, |
| 249 | /* 246 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
| 250 | /* 249 */ MCD::OPC_FilterValue, 0, 4, 0, // Skip to: 257 |
| 251 | /* 253 */ MCD::OPC_Decode, 244, 2, 13, // Opcode: AND16rr, DecodeIdx: 13 |
| 252 | /* 257 */ MCD::OPC_FilterValueOrFail, 4, |
| 253 | /* 259 */ MCD::OPC_Decode, 128, 3, 14, // Opcode: AND8rr, DecodeIdx: 14 |
| 254 | /* 263 */ MCD::OPC_Fail, |
| 255 | 0 |
| 256 | }; |
| 257 | |
| 258 | static const uint8_t DecoderTableAlpha32[] = { |
| 259 | /* 0 */ MCD::OPC_ExtractField, 12, 4, // Inst{15-12} ... |
| 260 | /* 3 */ MCD::OPC_FilterValue, 4, 17, 0, // Skip to: 24 |
| 261 | /* 7 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
| 262 | /* 10 */ MCD::OPC_FilterValue, 8, 4, 0, // Skip to: 18 |
| 263 | /* 14 */ MCD::OPC_Decode, 135, 4, 15, // Opcode: MOV16mr, DecodeIdx: 15 |
| 264 | /* 18 */ MCD::OPC_FilterValueOrFail, 12, |
| 265 | /* 20 */ MCD::OPC_Decode, 146, 4, 16, // Opcode: MOV8mr, DecodeIdx: 16 |
| 266 | /* 24 */ MCD::OPC_FilterValue, 5, 17, 0, // Skip to: 45 |
| 267 | /* 28 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
| 268 | /* 31 */ MCD::OPC_FilterValue, 8, 4, 0, // Skip to: 39 |
| 269 | /* 35 */ MCD::OPC_Decode, 187, 2, 15, // Opcode: ADD16mr, DecodeIdx: 15 |
| 270 | /* 39 */ MCD::OPC_FilterValueOrFail, 12, |
| 271 | /* 41 */ MCD::OPC_Decode, 199, 2, 16, // Opcode: ADD8mr, DecodeIdx: 16 |
| 272 | /* 45 */ MCD::OPC_FilterValue, 6, 17, 0, // Skip to: 66 |
| 273 | /* 49 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
| 274 | /* 52 */ MCD::OPC_FilterValue, 8, 4, 0, // Skip to: 60 |
| 275 | /* 56 */ MCD::OPC_Decode, 211, 2, 15, // Opcode: ADDC16mr, DecodeIdx: 15 |
| 276 | /* 60 */ MCD::OPC_FilterValueOrFail, 12, |
| 277 | /* 62 */ MCD::OPC_Decode, 223, 2, 16, // Opcode: ADDC8mr, DecodeIdx: 16 |
| 278 | /* 66 */ MCD::OPC_FilterValue, 7, 17, 0, // Skip to: 87 |
| 279 | /* 70 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
| 280 | /* 73 */ MCD::OPC_FilterValue, 8, 4, 0, // Skip to: 81 |
| 281 | /* 77 */ MCD::OPC_Decode, 213, 4, 15, // Opcode: SUBC16mr, DecodeIdx: 15 |
| 282 | /* 81 */ MCD::OPC_FilterValueOrFail, 12, |
| 283 | /* 83 */ MCD::OPC_Decode, 225, 4, 16, // Opcode: SUBC8mr, DecodeIdx: 16 |
| 284 | /* 87 */ MCD::OPC_FilterValue, 8, 17, 0, // Skip to: 108 |
| 285 | /* 91 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
| 286 | /* 94 */ MCD::OPC_FilterValue, 8, 4, 0, // Skip to: 102 |
| 287 | /* 98 */ MCD::OPC_Decode, 189, 4, 15, // Opcode: SUB16mr, DecodeIdx: 15 |
| 288 | /* 102 */ MCD::OPC_FilterValueOrFail, 12, |
| 289 | /* 104 */ MCD::OPC_Decode, 201, 4, 16, // Opcode: SUB8mr, DecodeIdx: 16 |
| 290 | /* 108 */ MCD::OPC_FilterValue, 9, 17, 0, // Skip to: 129 |
| 291 | /* 112 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
| 292 | /* 115 */ MCD::OPC_FilterValue, 8, 4, 0, // Skip to: 123 |
| 293 | /* 119 */ MCD::OPC_Decode, 214, 3, 15, // Opcode: CMP16mr, DecodeIdx: 15 |
| 294 | /* 123 */ MCD::OPC_FilterValueOrFail, 12, |
| 295 | /* 125 */ MCD::OPC_Decode, 226, 3, 16, // Opcode: CMP8mr, DecodeIdx: 16 |
| 296 | /* 129 */ MCD::OPC_FilterValue, 10, 17, 0, // Skip to: 150 |
| 297 | /* 133 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
| 298 | /* 136 */ MCD::OPC_FilterValue, 8, 4, 0, // Skip to: 144 |
| 299 | /* 140 */ MCD::OPC_Decode, 238, 3, 15, // Opcode: DADD16mr, DecodeIdx: 15 |
| 300 | /* 144 */ MCD::OPC_FilterValueOrFail, 12, |
| 301 | /* 146 */ MCD::OPC_Decode, 250, 3, 16, // Opcode: DADD8mr, DecodeIdx: 16 |
| 302 | /* 150 */ MCD::OPC_FilterValue, 11, 17, 0, // Skip to: 171 |
| 303 | /* 154 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
| 304 | /* 157 */ MCD::OPC_FilterValue, 8, 4, 0, // Skip to: 165 |
| 305 | /* 161 */ MCD::OPC_Decode, 182, 3, 15, // Opcode: BIT16mr, DecodeIdx: 15 |
| 306 | /* 165 */ MCD::OPC_FilterValueOrFail, 12, |
| 307 | /* 167 */ MCD::OPC_Decode, 194, 3, 16, // Opcode: BIT8mr, DecodeIdx: 16 |
| 308 | /* 171 */ MCD::OPC_FilterValue, 12, 17, 0, // Skip to: 192 |
| 309 | /* 175 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
| 310 | /* 178 */ MCD::OPC_FilterValue, 8, 4, 0, // Skip to: 186 |
| 311 | /* 182 */ MCD::OPC_Decode, 134, 3, 15, // Opcode: BIC16mr, DecodeIdx: 15 |
| 312 | /* 186 */ MCD::OPC_FilterValueOrFail, 12, |
| 313 | /* 188 */ MCD::OPC_Decode, 146, 3, 16, // Opcode: BIC8mr, DecodeIdx: 16 |
| 314 | /* 192 */ MCD::OPC_FilterValue, 13, 17, 0, // Skip to: 213 |
| 315 | /* 196 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
| 316 | /* 199 */ MCD::OPC_FilterValue, 8, 4, 0, // Skip to: 207 |
| 317 | /* 203 */ MCD::OPC_Decode, 158, 3, 15, // Opcode: BIS16mr, DecodeIdx: 15 |
| 318 | /* 207 */ MCD::OPC_FilterValueOrFail, 12, |
| 319 | /* 209 */ MCD::OPC_Decode, 170, 3, 16, // Opcode: BIS8mr, DecodeIdx: 16 |
| 320 | /* 213 */ MCD::OPC_FilterValue, 14, 17, 0, // Skip to: 234 |
| 321 | /* 217 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
| 322 | /* 220 */ MCD::OPC_FilterValue, 8, 4, 0, // Skip to: 228 |
| 323 | /* 224 */ MCD::OPC_Decode, 249, 4, 15, // Opcode: XOR16mr, DecodeIdx: 15 |
| 324 | /* 228 */ MCD::OPC_FilterValueOrFail, 12, |
| 325 | /* 230 */ MCD::OPC_Decode, 133, 5, 16, // Opcode: XOR8mr, DecodeIdx: 16 |
| 326 | /* 234 */ MCD::OPC_FilterValueOrFail, 15, |
| 327 | /* 236 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
| 328 | /* 239 */ MCD::OPC_FilterValue, 8, 4, 0, // Skip to: 247 |
| 329 | /* 243 */ MCD::OPC_Decode, 238, 2, 15, // Opcode: AND16mr, DecodeIdx: 15 |
| 330 | /* 247 */ MCD::OPC_FilterValueOrFail, 12, |
| 331 | /* 249 */ MCD::OPC_Decode, 250, 2, 16, // Opcode: AND8mr, DecodeIdx: 16 |
| 332 | /* 253 */ MCD::OPC_Fail, |
| 333 | 0 |
| 334 | }; |
| 335 | |
| 336 | static const uint8_t DecoderTableBeta16[] = { |
| 337 | /* 0 */ MCD::OPC_ExtractField, 12, 4, // Inst{15-12} ... |
| 338 | /* 3 */ MCD::OPC_FilterValue, 4, 17, 0, // Skip to: 24 |
| 339 | /* 7 */ MCD::OPC_ExtractField, 6, 2, // Inst{7-6} ... |
| 340 | /* 10 */ MCD::OPC_FilterValue, 0, 4, 0, // Skip to: 18 |
| 341 | /* 14 */ MCD::OPC_Decode, 136, 4, 17, // Opcode: MOV16rc, DecodeIdx: 17 |
| 342 | /* 18 */ MCD::OPC_FilterValueOrFail, 1, |
| 343 | /* 20 */ MCD::OPC_Decode, 147, 4, 18, // Opcode: MOV8rc, DecodeIdx: 18 |
| 344 | /* 24 */ MCD::OPC_FilterValue, 5, 17, 0, // Skip to: 45 |
| 345 | /* 28 */ MCD::OPC_ExtractField, 6, 2, // Inst{7-6} ... |
| 346 | /* 31 */ MCD::OPC_FilterValue, 0, 4, 0, // Skip to: 39 |
| 347 | /* 35 */ MCD::OPC_Decode, 188, 2, 19, // Opcode: ADD16rc, DecodeIdx: 19 |
| 348 | /* 39 */ MCD::OPC_FilterValueOrFail, 1, |
| 349 | /* 41 */ MCD::OPC_Decode, 200, 2, 20, // Opcode: ADD8rc, DecodeIdx: 20 |
| 350 | /* 45 */ MCD::OPC_FilterValue, 6, 17, 0, // Skip to: 66 |
| 351 | /* 49 */ MCD::OPC_ExtractField, 6, 2, // Inst{7-6} ... |
| 352 | /* 52 */ MCD::OPC_FilterValue, 0, 4, 0, // Skip to: 60 |
| 353 | /* 56 */ MCD::OPC_Decode, 212, 2, 19, // Opcode: ADDC16rc, DecodeIdx: 19 |
| 354 | /* 60 */ MCD::OPC_FilterValueOrFail, 1, |
| 355 | /* 62 */ MCD::OPC_Decode, 224, 2, 20, // Opcode: ADDC8rc, DecodeIdx: 20 |
| 356 | /* 66 */ MCD::OPC_FilterValue, 7, 17, 0, // Skip to: 87 |
| 357 | /* 70 */ MCD::OPC_ExtractField, 6, 2, // Inst{7-6} ... |
| 358 | /* 73 */ MCD::OPC_FilterValue, 0, 4, 0, // Skip to: 81 |
| 359 | /* 77 */ MCD::OPC_Decode, 214, 4, 19, // Opcode: SUBC16rc, DecodeIdx: 19 |
| 360 | /* 81 */ MCD::OPC_FilterValueOrFail, 1, |
| 361 | /* 83 */ MCD::OPC_Decode, 226, 4, 20, // Opcode: SUBC8rc, DecodeIdx: 20 |
| 362 | /* 87 */ MCD::OPC_FilterValue, 8, 17, 0, // Skip to: 108 |
| 363 | /* 91 */ MCD::OPC_ExtractField, 6, 2, // Inst{7-6} ... |
| 364 | /* 94 */ MCD::OPC_FilterValue, 0, 4, 0, // Skip to: 102 |
| 365 | /* 98 */ MCD::OPC_Decode, 190, 4, 19, // Opcode: SUB16rc, DecodeIdx: 19 |
| 366 | /* 102 */ MCD::OPC_FilterValueOrFail, 1, |
| 367 | /* 104 */ MCD::OPC_Decode, 202, 4, 20, // Opcode: SUB8rc, DecodeIdx: 20 |
| 368 | /* 108 */ MCD::OPC_FilterValue, 9, 17, 0, // Skip to: 129 |
| 369 | /* 112 */ MCD::OPC_ExtractField, 6, 2, // Inst{7-6} ... |
| 370 | /* 115 */ MCD::OPC_FilterValue, 0, 4, 0, // Skip to: 123 |
| 371 | /* 119 */ MCD::OPC_Decode, 215, 3, 17, // Opcode: CMP16rc, DecodeIdx: 17 |
| 372 | /* 123 */ MCD::OPC_FilterValueOrFail, 1, |
| 373 | /* 125 */ MCD::OPC_Decode, 227, 3, 18, // Opcode: CMP8rc, DecodeIdx: 18 |
| 374 | /* 129 */ MCD::OPC_FilterValue, 10, 17, 0, // Skip to: 150 |
| 375 | /* 133 */ MCD::OPC_ExtractField, 6, 2, // Inst{7-6} ... |
| 376 | /* 136 */ MCD::OPC_FilterValue, 0, 4, 0, // Skip to: 144 |
| 377 | /* 140 */ MCD::OPC_Decode, 239, 3, 19, // Opcode: DADD16rc, DecodeIdx: 19 |
| 378 | /* 144 */ MCD::OPC_FilterValueOrFail, 1, |
| 379 | /* 146 */ MCD::OPC_Decode, 251, 3, 20, // Opcode: DADD8rc, DecodeIdx: 20 |
| 380 | /* 150 */ MCD::OPC_FilterValue, 11, 17, 0, // Skip to: 171 |
| 381 | /* 154 */ MCD::OPC_ExtractField, 6, 2, // Inst{7-6} ... |
| 382 | /* 157 */ MCD::OPC_FilterValue, 0, 4, 0, // Skip to: 165 |
| 383 | /* 161 */ MCD::OPC_Decode, 183, 3, 17, // Opcode: BIT16rc, DecodeIdx: 17 |
| 384 | /* 165 */ MCD::OPC_FilterValueOrFail, 1, |
| 385 | /* 167 */ MCD::OPC_Decode, 195, 3, 18, // Opcode: BIT8rc, DecodeIdx: 18 |
| 386 | /* 171 */ MCD::OPC_FilterValue, 12, 17, 0, // Skip to: 192 |
| 387 | /* 175 */ MCD::OPC_ExtractField, 6, 2, // Inst{7-6} ... |
| 388 | /* 178 */ MCD::OPC_FilterValue, 0, 4, 0, // Skip to: 186 |
| 389 | /* 182 */ MCD::OPC_Decode, 135, 3, 19, // Opcode: BIC16rc, DecodeIdx: 19 |
| 390 | /* 186 */ MCD::OPC_FilterValueOrFail, 1, |
| 391 | /* 188 */ MCD::OPC_Decode, 147, 3, 20, // Opcode: BIC8rc, DecodeIdx: 20 |
| 392 | /* 192 */ MCD::OPC_FilterValue, 13, 17, 0, // Skip to: 213 |
| 393 | /* 196 */ MCD::OPC_ExtractField, 6, 2, // Inst{7-6} ... |
| 394 | /* 199 */ MCD::OPC_FilterValue, 0, 4, 0, // Skip to: 207 |
| 395 | /* 203 */ MCD::OPC_Decode, 159, 3, 19, // Opcode: BIS16rc, DecodeIdx: 19 |
| 396 | /* 207 */ MCD::OPC_FilterValueOrFail, 1, |
| 397 | /* 209 */ MCD::OPC_Decode, 171, 3, 20, // Opcode: BIS8rc, DecodeIdx: 20 |
| 398 | /* 213 */ MCD::OPC_FilterValue, 14, 17, 0, // Skip to: 234 |
| 399 | /* 217 */ MCD::OPC_ExtractField, 6, 2, // Inst{7-6} ... |
| 400 | /* 220 */ MCD::OPC_FilterValue, 0, 4, 0, // Skip to: 228 |
| 401 | /* 224 */ MCD::OPC_Decode, 250, 4, 19, // Opcode: XOR16rc, DecodeIdx: 19 |
| 402 | /* 228 */ MCD::OPC_FilterValueOrFail, 1, |
| 403 | /* 230 */ MCD::OPC_Decode, 134, 5, 20, // Opcode: XOR8rc, DecodeIdx: 20 |
| 404 | /* 234 */ MCD::OPC_FilterValueOrFail, 15, |
| 405 | /* 236 */ MCD::OPC_ExtractField, 6, 2, // Inst{7-6} ... |
| 406 | /* 239 */ MCD::OPC_FilterValue, 0, 4, 0, // Skip to: 247 |
| 407 | /* 243 */ MCD::OPC_Decode, 239, 2, 19, // Opcode: AND16rc, DecodeIdx: 19 |
| 408 | /* 247 */ MCD::OPC_FilterValueOrFail, 1, |
| 409 | /* 249 */ MCD::OPC_Decode, 251, 2, 20, // Opcode: AND8rc, DecodeIdx: 20 |
| 410 | /* 253 */ MCD::OPC_Fail, |
| 411 | 0 |
| 412 | }; |
| 413 | |
| 414 | static const uint8_t DecoderTableBeta32[] = { |
| 415 | /* 0 */ MCD::OPC_ExtractField, 12, 4, // Inst{15-12} ... |
| 416 | /* 3 */ MCD::OPC_FilterValue, 4, 17, 0, // Skip to: 24 |
| 417 | /* 7 */ MCD::OPC_ExtractField, 6, 2, // Inst{7-6} ... |
| 418 | /* 10 */ MCD::OPC_FilterValue, 2, 4, 0, // Skip to: 18 |
| 419 | /* 14 */ MCD::OPC_Decode, 131, 4, 21, // Opcode: MOV16mc, DecodeIdx: 21 |
| 420 | /* 18 */ MCD::OPC_FilterValueOrFail, 3, |
| 421 | /* 20 */ MCD::OPC_Decode, 142, 4, 21, // Opcode: MOV8mc, DecodeIdx: 21 |
| 422 | /* 24 */ MCD::OPC_FilterValue, 5, 17, 0, // Skip to: 45 |
| 423 | /* 28 */ MCD::OPC_ExtractField, 6, 2, // Inst{7-6} ... |
| 424 | /* 31 */ MCD::OPC_FilterValue, 2, 4, 0, // Skip to: 39 |
| 425 | /* 35 */ MCD::OPC_Decode, 182, 2, 21, // Opcode: ADD16mc, DecodeIdx: 21 |
| 426 | /* 39 */ MCD::OPC_FilterValueOrFail, 3, |
| 427 | /* 41 */ MCD::OPC_Decode, 194, 2, 21, // Opcode: ADD8mc, DecodeIdx: 21 |
| 428 | /* 45 */ MCD::OPC_FilterValue, 6, 17, 0, // Skip to: 66 |
| 429 | /* 49 */ MCD::OPC_ExtractField, 6, 2, // Inst{7-6} ... |
| 430 | /* 52 */ MCD::OPC_FilterValue, 2, 4, 0, // Skip to: 60 |
| 431 | /* 56 */ MCD::OPC_Decode, 206, 2, 21, // Opcode: ADDC16mc, DecodeIdx: 21 |
| 432 | /* 60 */ MCD::OPC_FilterValueOrFail, 3, |
| 433 | /* 62 */ MCD::OPC_Decode, 218, 2, 21, // Opcode: ADDC8mc, DecodeIdx: 21 |
| 434 | /* 66 */ MCD::OPC_FilterValue, 7, 17, 0, // Skip to: 87 |
| 435 | /* 70 */ MCD::OPC_ExtractField, 6, 2, // Inst{7-6} ... |
| 436 | /* 73 */ MCD::OPC_FilterValue, 2, 4, 0, // Skip to: 81 |
| 437 | /* 77 */ MCD::OPC_Decode, 208, 4, 21, // Opcode: SUBC16mc, DecodeIdx: 21 |
| 438 | /* 81 */ MCD::OPC_FilterValueOrFail, 3, |
| 439 | /* 83 */ MCD::OPC_Decode, 220, 4, 21, // Opcode: SUBC8mc, DecodeIdx: 21 |
| 440 | /* 87 */ MCD::OPC_FilterValue, 8, 17, 0, // Skip to: 108 |
| 441 | /* 91 */ MCD::OPC_ExtractField, 6, 2, // Inst{7-6} ... |
| 442 | /* 94 */ MCD::OPC_FilterValue, 2, 4, 0, // Skip to: 102 |
| 443 | /* 98 */ MCD::OPC_Decode, 184, 4, 21, // Opcode: SUB16mc, DecodeIdx: 21 |
| 444 | /* 102 */ MCD::OPC_FilterValueOrFail, 3, |
| 445 | /* 104 */ MCD::OPC_Decode, 196, 4, 21, // Opcode: SUB8mc, DecodeIdx: 21 |
| 446 | /* 108 */ MCD::OPC_FilterValue, 9, 17, 0, // Skip to: 129 |
| 447 | /* 112 */ MCD::OPC_ExtractField, 6, 2, // Inst{7-6} ... |
| 448 | /* 115 */ MCD::OPC_FilterValue, 2, 4, 0, // Skip to: 123 |
| 449 | /* 119 */ MCD::OPC_Decode, 209, 3, 21, // Opcode: CMP16mc, DecodeIdx: 21 |
| 450 | /* 123 */ MCD::OPC_FilterValueOrFail, 3, |
| 451 | /* 125 */ MCD::OPC_Decode, 221, 3, 21, // Opcode: CMP8mc, DecodeIdx: 21 |
| 452 | /* 129 */ MCD::OPC_FilterValue, 10, 17, 0, // Skip to: 150 |
| 453 | /* 133 */ MCD::OPC_ExtractField, 6, 2, // Inst{7-6} ... |
| 454 | /* 136 */ MCD::OPC_FilterValue, 2, 4, 0, // Skip to: 144 |
| 455 | /* 140 */ MCD::OPC_Decode, 233, 3, 21, // Opcode: DADD16mc, DecodeIdx: 21 |
| 456 | /* 144 */ MCD::OPC_FilterValueOrFail, 3, |
| 457 | /* 146 */ MCD::OPC_Decode, 245, 3, 21, // Opcode: DADD8mc, DecodeIdx: 21 |
| 458 | /* 150 */ MCD::OPC_FilterValue, 11, 17, 0, // Skip to: 171 |
| 459 | /* 154 */ MCD::OPC_ExtractField, 6, 2, // Inst{7-6} ... |
| 460 | /* 157 */ MCD::OPC_FilterValue, 2, 4, 0, // Skip to: 165 |
| 461 | /* 161 */ MCD::OPC_Decode, 177, 3, 21, // Opcode: BIT16mc, DecodeIdx: 21 |
| 462 | /* 165 */ MCD::OPC_FilterValueOrFail, 3, |
| 463 | /* 167 */ MCD::OPC_Decode, 189, 3, 21, // Opcode: BIT8mc, DecodeIdx: 21 |
| 464 | /* 171 */ MCD::OPC_FilterValue, 12, 17, 0, // Skip to: 192 |
| 465 | /* 175 */ MCD::OPC_ExtractField, 6, 2, // Inst{7-6} ... |
| 466 | /* 178 */ MCD::OPC_FilterValue, 2, 4, 0, // Skip to: 186 |
| 467 | /* 182 */ MCD::OPC_Decode, 129, 3, 21, // Opcode: BIC16mc, DecodeIdx: 21 |
| 468 | /* 186 */ MCD::OPC_FilterValueOrFail, 3, |
| 469 | /* 188 */ MCD::OPC_Decode, 141, 3, 21, // Opcode: BIC8mc, DecodeIdx: 21 |
| 470 | /* 192 */ MCD::OPC_FilterValue, 13, 17, 0, // Skip to: 213 |
| 471 | /* 196 */ MCD::OPC_ExtractField, 6, 2, // Inst{7-6} ... |
| 472 | /* 199 */ MCD::OPC_FilterValue, 2, 4, 0, // Skip to: 207 |
| 473 | /* 203 */ MCD::OPC_Decode, 153, 3, 21, // Opcode: BIS16mc, DecodeIdx: 21 |
| 474 | /* 207 */ MCD::OPC_FilterValueOrFail, 3, |
| 475 | /* 209 */ MCD::OPC_Decode, 165, 3, 21, // Opcode: BIS8mc, DecodeIdx: 21 |
| 476 | /* 213 */ MCD::OPC_FilterValue, 14, 17, 0, // Skip to: 234 |
| 477 | /* 217 */ MCD::OPC_ExtractField, 6, 2, // Inst{7-6} ... |
| 478 | /* 220 */ MCD::OPC_FilterValue, 2, 4, 0, // Skip to: 228 |
| 479 | /* 224 */ MCD::OPC_Decode, 244, 4, 21, // Opcode: XOR16mc, DecodeIdx: 21 |
| 480 | /* 228 */ MCD::OPC_FilterValueOrFail, 3, |
| 481 | /* 230 */ MCD::OPC_Decode, 128, 5, 21, // Opcode: XOR8mc, DecodeIdx: 21 |
| 482 | /* 234 */ MCD::OPC_FilterValueOrFail, 15, |
| 483 | /* 236 */ MCD::OPC_ExtractField, 6, 2, // Inst{7-6} ... |
| 484 | /* 239 */ MCD::OPC_FilterValue, 2, 4, 0, // Skip to: 247 |
| 485 | /* 243 */ MCD::OPC_Decode, 233, 2, 21, // Opcode: AND16mc, DecodeIdx: 21 |
| 486 | /* 247 */ MCD::OPC_FilterValueOrFail, 3, |
| 487 | /* 249 */ MCD::OPC_Decode, 245, 2, 21, // Opcode: AND8mc, DecodeIdx: 21 |
| 488 | /* 253 */ MCD::OPC_Fail, |
| 489 | 0 |
| 490 | }; |
| 491 | |
| 492 | static const uint8_t DecoderTableDelta16[] = { |
| 493 | /* 0 */ MCD::OPC_ExtractField, 12, 4, // Inst{15-12} ... |
| 494 | /* 3 */ MCD::OPC_FilterValue, 4, 59, 0, // Skip to: 66 |
| 495 | /* 7 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
| 496 | /* 10 */ MCD::OPC_FilterValue, 2, 4, 0, // Skip to: 18 |
| 497 | /* 14 */ MCD::OPC_Decode, 139, 4, 11, // Opcode: MOV16rn, DecodeIdx: 11 |
| 498 | /* 18 */ MCD::OPC_FilterValue, 3, 30, 0, // Skip to: 52 |
| 499 | /* 22 */ MCD::OPC_CheckField, 8, 4, 1, 10, 0, // Skip to: 38 |
| 500 | /* 28 */ MCD::OPC_CheckField, 0, 4, 0, 4, 0, // Skip to: 38 |
| 501 | /* 34 */ MCD::OPC_Decode, 160, 4, 5, // Opcode: RET, DecodeIdx: 5 |
| 502 | /* 38 */ MCD::OPC_CheckField, 8, 4, 1, 4, 0, // Skip to: 48 |
| 503 | /* 44 */ MCD::OPC_Decode, 155, 4, 1, // Opcode: POP16r, DecodeIdx: 1 |
| 504 | /* 48 */ MCD::OPC_Decode, 140, 4, 22, // Opcode: MOV16rp, DecodeIdx: 22 |
| 505 | /* 52 */ MCD::OPC_FilterValue, 6, 4, 0, // Skip to: 60 |
| 506 | /* 56 */ MCD::OPC_Decode, 150, 4, 23, // Opcode: MOV8rn, DecodeIdx: 23 |
| 507 | /* 60 */ MCD::OPC_FilterValueOrFail, 7, |
| 508 | /* 62 */ MCD::OPC_Decode, 151, 4, 24, // Opcode: MOV8rp, DecodeIdx: 24 |
| 509 | /* 66 */ MCD::OPC_FilterValue, 5, 33, 0, // Skip to: 103 |
| 510 | /* 70 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
| 511 | /* 73 */ MCD::OPC_FilterValue, 2, 4, 0, // Skip to: 81 |
| 512 | /* 77 */ MCD::OPC_Decode, 191, 2, 13, // Opcode: ADD16rn, DecodeIdx: 13 |
| 513 | /* 81 */ MCD::OPC_FilterValue, 3, 4, 0, // Skip to: 89 |
| 514 | /* 85 */ MCD::OPC_Decode, 192, 2, 25, // Opcode: ADD16rp, DecodeIdx: 25 |
| 515 | /* 89 */ MCD::OPC_FilterValue, 6, 4, 0, // Skip to: 97 |
| 516 | /* 93 */ MCD::OPC_Decode, 203, 2, 26, // Opcode: ADD8rn, DecodeIdx: 26 |
| 517 | /* 97 */ MCD::OPC_FilterValueOrFail, 7, |
| 518 | /* 99 */ MCD::OPC_Decode, 204, 2, 27, // Opcode: ADD8rp, DecodeIdx: 27 |
| 519 | /* 103 */ MCD::OPC_FilterValue, 6, 33, 0, // Skip to: 140 |
| 520 | /* 107 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
| 521 | /* 110 */ MCD::OPC_FilterValue, 2, 4, 0, // Skip to: 118 |
| 522 | /* 114 */ MCD::OPC_Decode, 215, 2, 13, // Opcode: ADDC16rn, DecodeIdx: 13 |
| 523 | /* 118 */ MCD::OPC_FilterValue, 3, 4, 0, // Skip to: 126 |
| 524 | /* 122 */ MCD::OPC_Decode, 216, 2, 25, // Opcode: ADDC16rp, DecodeIdx: 25 |
| 525 | /* 126 */ MCD::OPC_FilterValue, 6, 4, 0, // Skip to: 134 |
| 526 | /* 130 */ MCD::OPC_Decode, 227, 2, 26, // Opcode: ADDC8rn, DecodeIdx: 26 |
| 527 | /* 134 */ MCD::OPC_FilterValueOrFail, 7, |
| 528 | /* 136 */ MCD::OPC_Decode, 228, 2, 27, // Opcode: ADDC8rp, DecodeIdx: 27 |
| 529 | /* 140 */ MCD::OPC_FilterValue, 7, 33, 0, // Skip to: 177 |
| 530 | /* 144 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
| 531 | /* 147 */ MCD::OPC_FilterValue, 2, 4, 0, // Skip to: 155 |
| 532 | /* 151 */ MCD::OPC_Decode, 217, 4, 13, // Opcode: SUBC16rn, DecodeIdx: 13 |
| 533 | /* 155 */ MCD::OPC_FilterValue, 3, 4, 0, // Skip to: 163 |
| 534 | /* 159 */ MCD::OPC_Decode, 218, 4, 25, // Opcode: SUBC16rp, DecodeIdx: 25 |
| 535 | /* 163 */ MCD::OPC_FilterValue, 6, 4, 0, // Skip to: 171 |
| 536 | /* 167 */ MCD::OPC_Decode, 229, 4, 26, // Opcode: SUBC8rn, DecodeIdx: 26 |
| 537 | /* 171 */ MCD::OPC_FilterValueOrFail, 7, |
| 538 | /* 173 */ MCD::OPC_Decode, 230, 4, 27, // Opcode: SUBC8rp, DecodeIdx: 27 |
| 539 | /* 177 */ MCD::OPC_FilterValue, 8, 33, 0, // Skip to: 214 |
| 540 | /* 181 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
| 541 | /* 184 */ MCD::OPC_FilterValue, 2, 4, 0, // Skip to: 192 |
| 542 | /* 188 */ MCD::OPC_Decode, 193, 4, 13, // Opcode: SUB16rn, DecodeIdx: 13 |
| 543 | /* 192 */ MCD::OPC_FilterValue, 3, 4, 0, // Skip to: 200 |
| 544 | /* 196 */ MCD::OPC_Decode, 194, 4, 25, // Opcode: SUB16rp, DecodeIdx: 25 |
| 545 | /* 200 */ MCD::OPC_FilterValue, 6, 4, 0, // Skip to: 208 |
| 546 | /* 204 */ MCD::OPC_Decode, 205, 4, 26, // Opcode: SUB8rn, DecodeIdx: 26 |
| 547 | /* 208 */ MCD::OPC_FilterValueOrFail, 7, |
| 548 | /* 210 */ MCD::OPC_Decode, 206, 4, 27, // Opcode: SUB8rp, DecodeIdx: 27 |
| 549 | /* 214 */ MCD::OPC_FilterValue, 9, 33, 0, // Skip to: 251 |
| 550 | /* 218 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
| 551 | /* 221 */ MCD::OPC_FilterValue, 2, 4, 0, // Skip to: 229 |
| 552 | /* 225 */ MCD::OPC_Decode, 218, 3, 11, // Opcode: CMP16rn, DecodeIdx: 11 |
| 553 | /* 229 */ MCD::OPC_FilterValue, 3, 4, 0, // Skip to: 237 |
| 554 | /* 233 */ MCD::OPC_Decode, 219, 3, 11, // Opcode: CMP16rp, DecodeIdx: 11 |
| 555 | /* 237 */ MCD::OPC_FilterValue, 6, 4, 0, // Skip to: 245 |
| 556 | /* 241 */ MCD::OPC_Decode, 230, 3, 23, // Opcode: CMP8rn, DecodeIdx: 23 |
| 557 | /* 245 */ MCD::OPC_FilterValueOrFail, 7, |
| 558 | /* 247 */ MCD::OPC_Decode, 231, 3, 23, // Opcode: CMP8rp, DecodeIdx: 23 |
| 559 | /* 251 */ MCD::OPC_FilterValue, 10, 33, 0, // Skip to: 288 |
| 560 | /* 255 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
| 561 | /* 258 */ MCD::OPC_FilterValue, 2, 4, 0, // Skip to: 266 |
| 562 | /* 262 */ MCD::OPC_Decode, 242, 3, 13, // Opcode: DADD16rn, DecodeIdx: 13 |
| 563 | /* 266 */ MCD::OPC_FilterValue, 3, 4, 0, // Skip to: 274 |
| 564 | /* 270 */ MCD::OPC_Decode, 243, 3, 25, // Opcode: DADD16rp, DecodeIdx: 25 |
| 565 | /* 274 */ MCD::OPC_FilterValue, 6, 4, 0, // Skip to: 282 |
| 566 | /* 278 */ MCD::OPC_Decode, 254, 3, 26, // Opcode: DADD8rn, DecodeIdx: 26 |
| 567 | /* 282 */ MCD::OPC_FilterValueOrFail, 7, |
| 568 | /* 284 */ MCD::OPC_Decode, 255, 3, 27, // Opcode: DADD8rp, DecodeIdx: 27 |
| 569 | /* 288 */ MCD::OPC_FilterValue, 11, 33, 0, // Skip to: 325 |
| 570 | /* 292 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
| 571 | /* 295 */ MCD::OPC_FilterValue, 2, 4, 0, // Skip to: 303 |
| 572 | /* 299 */ MCD::OPC_Decode, 186, 3, 11, // Opcode: BIT16rn, DecodeIdx: 11 |
| 573 | /* 303 */ MCD::OPC_FilterValue, 3, 4, 0, // Skip to: 311 |
| 574 | /* 307 */ MCD::OPC_Decode, 187, 3, 11, // Opcode: BIT16rp, DecodeIdx: 11 |
| 575 | /* 311 */ MCD::OPC_FilterValue, 6, 4, 0, // Skip to: 319 |
| 576 | /* 315 */ MCD::OPC_Decode, 198, 3, 23, // Opcode: BIT8rn, DecodeIdx: 23 |
| 577 | /* 319 */ MCD::OPC_FilterValueOrFail, 7, |
| 578 | /* 321 */ MCD::OPC_Decode, 199, 3, 23, // Opcode: BIT8rp, DecodeIdx: 23 |
| 579 | /* 325 */ MCD::OPC_FilterValue, 12, 33, 0, // Skip to: 362 |
| 580 | /* 329 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
| 581 | /* 332 */ MCD::OPC_FilterValue, 2, 4, 0, // Skip to: 340 |
| 582 | /* 336 */ MCD::OPC_Decode, 138, 3, 13, // Opcode: BIC16rn, DecodeIdx: 13 |
| 583 | /* 340 */ MCD::OPC_FilterValue, 3, 4, 0, // Skip to: 348 |
| 584 | /* 344 */ MCD::OPC_Decode, 139, 3, 25, // Opcode: BIC16rp, DecodeIdx: 25 |
| 585 | /* 348 */ MCD::OPC_FilterValue, 6, 4, 0, // Skip to: 356 |
| 586 | /* 352 */ MCD::OPC_Decode, 150, 3, 26, // Opcode: BIC8rn, DecodeIdx: 26 |
| 587 | /* 356 */ MCD::OPC_FilterValueOrFail, 7, |
| 588 | /* 358 */ MCD::OPC_Decode, 151, 3, 27, // Opcode: BIC8rp, DecodeIdx: 27 |
| 589 | /* 362 */ MCD::OPC_FilterValue, 13, 33, 0, // Skip to: 399 |
| 590 | /* 366 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
| 591 | /* 369 */ MCD::OPC_FilterValue, 2, 4, 0, // Skip to: 377 |
| 592 | /* 373 */ MCD::OPC_Decode, 162, 3, 13, // Opcode: BIS16rn, DecodeIdx: 13 |
| 593 | /* 377 */ MCD::OPC_FilterValue, 3, 4, 0, // Skip to: 385 |
| 594 | /* 381 */ MCD::OPC_Decode, 163, 3, 25, // Opcode: BIS16rp, DecodeIdx: 25 |
| 595 | /* 385 */ MCD::OPC_FilterValue, 6, 4, 0, // Skip to: 393 |
| 596 | /* 389 */ MCD::OPC_Decode, 174, 3, 26, // Opcode: BIS8rn, DecodeIdx: 26 |
| 597 | /* 393 */ MCD::OPC_FilterValueOrFail, 7, |
| 598 | /* 395 */ MCD::OPC_Decode, 175, 3, 27, // Opcode: BIS8rp, DecodeIdx: 27 |
| 599 | /* 399 */ MCD::OPC_FilterValue, 14, 33, 0, // Skip to: 436 |
| 600 | /* 403 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
| 601 | /* 406 */ MCD::OPC_FilterValue, 2, 4, 0, // Skip to: 414 |
| 602 | /* 410 */ MCD::OPC_Decode, 253, 4, 13, // Opcode: XOR16rn, DecodeIdx: 13 |
| 603 | /* 414 */ MCD::OPC_FilterValue, 3, 4, 0, // Skip to: 422 |
| 604 | /* 418 */ MCD::OPC_Decode, 254, 4, 25, // Opcode: XOR16rp, DecodeIdx: 25 |
| 605 | /* 422 */ MCD::OPC_FilterValue, 6, 4, 0, // Skip to: 430 |
| 606 | /* 426 */ MCD::OPC_Decode, 137, 5, 26, // Opcode: XOR8rn, DecodeIdx: 26 |
| 607 | /* 430 */ MCD::OPC_FilterValueOrFail, 7, |
| 608 | /* 432 */ MCD::OPC_Decode, 138, 5, 27, // Opcode: XOR8rp, DecodeIdx: 27 |
| 609 | /* 436 */ MCD::OPC_FilterValueOrFail, 15, |
| 610 | /* 438 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
| 611 | /* 441 */ MCD::OPC_FilterValue, 2, 4, 0, // Skip to: 449 |
| 612 | /* 445 */ MCD::OPC_Decode, 242, 2, 13, // Opcode: AND16rn, DecodeIdx: 13 |
| 613 | /* 449 */ MCD::OPC_FilterValue, 3, 4, 0, // Skip to: 457 |
| 614 | /* 453 */ MCD::OPC_Decode, 243, 2, 25, // Opcode: AND16rp, DecodeIdx: 25 |
| 615 | /* 457 */ MCD::OPC_FilterValue, 6, 4, 0, // Skip to: 465 |
| 616 | /* 461 */ MCD::OPC_Decode, 254, 2, 26, // Opcode: AND8rn, DecodeIdx: 26 |
| 617 | /* 465 */ MCD::OPC_FilterValueOrFail, 7, |
| 618 | /* 467 */ MCD::OPC_Decode, 255, 2, 27, // Opcode: AND8rp, DecodeIdx: 27 |
| 619 | /* 471 */ MCD::OPC_Fail, |
| 620 | 0 |
| 621 | }; |
| 622 | |
| 623 | static const uint8_t DecoderTableDelta32[] = { |
| 624 | /* 0 */ MCD::OPC_ExtractField, 12, 4, // Inst{15-12} ... |
| 625 | /* 3 */ MCD::OPC_FilterValue, 4, 17, 0, // Skip to: 24 |
| 626 | /* 7 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
| 627 | /* 10 */ MCD::OPC_FilterValue, 10, 4, 0, // Skip to: 18 |
| 628 | /* 14 */ MCD::OPC_Decode, 134, 4, 15, // Opcode: MOV16mn, DecodeIdx: 15 |
| 629 | /* 18 */ MCD::OPC_FilterValueOrFail, 14, |
| 630 | /* 20 */ MCD::OPC_Decode, 145, 4, 15, // Opcode: MOV8mn, DecodeIdx: 15 |
| 631 | /* 24 */ MCD::OPC_FilterValue, 5, 33, 0, // Skip to: 61 |
| 632 | /* 28 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
| 633 | /* 31 */ MCD::OPC_FilterValue, 10, 4, 0, // Skip to: 39 |
| 634 | /* 35 */ MCD::OPC_Decode, 185, 2, 15, // Opcode: ADD16mn, DecodeIdx: 15 |
| 635 | /* 39 */ MCD::OPC_FilterValue, 11, 4, 0, // Skip to: 47 |
| 636 | /* 43 */ MCD::OPC_Decode, 186, 2, 15, // Opcode: ADD16mp, DecodeIdx: 15 |
| 637 | /* 47 */ MCD::OPC_FilterValue, 14, 4, 0, // Skip to: 55 |
| 638 | /* 51 */ MCD::OPC_Decode, 197, 2, 15, // Opcode: ADD8mn, DecodeIdx: 15 |
| 639 | /* 55 */ MCD::OPC_FilterValueOrFail, 15, |
| 640 | /* 57 */ MCD::OPC_Decode, 198, 2, 15, // Opcode: ADD8mp, DecodeIdx: 15 |
| 641 | /* 61 */ MCD::OPC_FilterValue, 6, 33, 0, // Skip to: 98 |
| 642 | /* 65 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
| 643 | /* 68 */ MCD::OPC_FilterValue, 10, 4, 0, // Skip to: 76 |
| 644 | /* 72 */ MCD::OPC_Decode, 209, 2, 15, // Opcode: ADDC16mn, DecodeIdx: 15 |
| 645 | /* 76 */ MCD::OPC_FilterValue, 11, 4, 0, // Skip to: 84 |
| 646 | /* 80 */ MCD::OPC_Decode, 210, 2, 15, // Opcode: ADDC16mp, DecodeIdx: 15 |
| 647 | /* 84 */ MCD::OPC_FilterValue, 14, 4, 0, // Skip to: 92 |
| 648 | /* 88 */ MCD::OPC_Decode, 221, 2, 15, // Opcode: ADDC8mn, DecodeIdx: 15 |
| 649 | /* 92 */ MCD::OPC_FilterValueOrFail, 15, |
| 650 | /* 94 */ MCD::OPC_Decode, 222, 2, 15, // Opcode: ADDC8mp, DecodeIdx: 15 |
| 651 | /* 98 */ MCD::OPC_FilterValue, 7, 33, 0, // Skip to: 135 |
| 652 | /* 102 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
| 653 | /* 105 */ MCD::OPC_FilterValue, 10, 4, 0, // Skip to: 113 |
| 654 | /* 109 */ MCD::OPC_Decode, 211, 4, 15, // Opcode: SUBC16mn, DecodeIdx: 15 |
| 655 | /* 113 */ MCD::OPC_FilterValue, 11, 4, 0, // Skip to: 121 |
| 656 | /* 117 */ MCD::OPC_Decode, 212, 4, 15, // Opcode: SUBC16mp, DecodeIdx: 15 |
| 657 | /* 121 */ MCD::OPC_FilterValue, 14, 4, 0, // Skip to: 129 |
| 658 | /* 125 */ MCD::OPC_Decode, 223, 4, 15, // Opcode: SUBC8mn, DecodeIdx: 15 |
| 659 | /* 129 */ MCD::OPC_FilterValueOrFail, 15, |
| 660 | /* 131 */ MCD::OPC_Decode, 224, 4, 15, // Opcode: SUBC8mp, DecodeIdx: 15 |
| 661 | /* 135 */ MCD::OPC_FilterValue, 8, 33, 0, // Skip to: 172 |
| 662 | /* 139 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
| 663 | /* 142 */ MCD::OPC_FilterValue, 10, 4, 0, // Skip to: 150 |
| 664 | /* 146 */ MCD::OPC_Decode, 187, 4, 15, // Opcode: SUB16mn, DecodeIdx: 15 |
| 665 | /* 150 */ MCD::OPC_FilterValue, 11, 4, 0, // Skip to: 158 |
| 666 | /* 154 */ MCD::OPC_Decode, 188, 4, 15, // Opcode: SUB16mp, DecodeIdx: 15 |
| 667 | /* 158 */ MCD::OPC_FilterValue, 14, 4, 0, // Skip to: 166 |
| 668 | /* 162 */ MCD::OPC_Decode, 199, 4, 15, // Opcode: SUB8mn, DecodeIdx: 15 |
| 669 | /* 166 */ MCD::OPC_FilterValueOrFail, 15, |
| 670 | /* 168 */ MCD::OPC_Decode, 200, 4, 15, // Opcode: SUB8mp, DecodeIdx: 15 |
| 671 | /* 172 */ MCD::OPC_FilterValue, 9, 33, 0, // Skip to: 209 |
| 672 | /* 176 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
| 673 | /* 179 */ MCD::OPC_FilterValue, 10, 4, 0, // Skip to: 187 |
| 674 | /* 183 */ MCD::OPC_Decode, 212, 3, 15, // Opcode: CMP16mn, DecodeIdx: 15 |
| 675 | /* 187 */ MCD::OPC_FilterValue, 11, 4, 0, // Skip to: 195 |
| 676 | /* 191 */ MCD::OPC_Decode, 213, 3, 15, // Opcode: CMP16mp, DecodeIdx: 15 |
| 677 | /* 195 */ MCD::OPC_FilterValue, 14, 4, 0, // Skip to: 203 |
| 678 | /* 199 */ MCD::OPC_Decode, 224, 3, 15, // Opcode: CMP8mn, DecodeIdx: 15 |
| 679 | /* 203 */ MCD::OPC_FilterValueOrFail, 15, |
| 680 | /* 205 */ MCD::OPC_Decode, 225, 3, 15, // Opcode: CMP8mp, DecodeIdx: 15 |
| 681 | /* 209 */ MCD::OPC_FilterValue, 10, 33, 0, // Skip to: 246 |
| 682 | /* 213 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
| 683 | /* 216 */ MCD::OPC_FilterValue, 10, 4, 0, // Skip to: 224 |
| 684 | /* 220 */ MCD::OPC_Decode, 236, 3, 15, // Opcode: DADD16mn, DecodeIdx: 15 |
| 685 | /* 224 */ MCD::OPC_FilterValue, 11, 4, 0, // Skip to: 232 |
| 686 | /* 228 */ MCD::OPC_Decode, 237, 3, 15, // Opcode: DADD16mp, DecodeIdx: 15 |
| 687 | /* 232 */ MCD::OPC_FilterValue, 14, 4, 0, // Skip to: 240 |
| 688 | /* 236 */ MCD::OPC_Decode, 248, 3, 15, // Opcode: DADD8mn, DecodeIdx: 15 |
| 689 | /* 240 */ MCD::OPC_FilterValueOrFail, 15, |
| 690 | /* 242 */ MCD::OPC_Decode, 249, 3, 15, // Opcode: DADD8mp, DecodeIdx: 15 |
| 691 | /* 246 */ MCD::OPC_FilterValue, 11, 33, 0, // Skip to: 283 |
| 692 | /* 250 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
| 693 | /* 253 */ MCD::OPC_FilterValue, 10, 4, 0, // Skip to: 261 |
| 694 | /* 257 */ MCD::OPC_Decode, 180, 3, 15, // Opcode: BIT16mn, DecodeIdx: 15 |
| 695 | /* 261 */ MCD::OPC_FilterValue, 11, 4, 0, // Skip to: 269 |
| 696 | /* 265 */ MCD::OPC_Decode, 181, 3, 15, // Opcode: BIT16mp, DecodeIdx: 15 |
| 697 | /* 269 */ MCD::OPC_FilterValue, 14, 4, 0, // Skip to: 277 |
| 698 | /* 273 */ MCD::OPC_Decode, 192, 3, 15, // Opcode: BIT8mn, DecodeIdx: 15 |
| 699 | /* 277 */ MCD::OPC_FilterValueOrFail, 15, |
| 700 | /* 279 */ MCD::OPC_Decode, 193, 3, 15, // Opcode: BIT8mp, DecodeIdx: 15 |
| 701 | /* 283 */ MCD::OPC_FilterValue, 12, 33, 0, // Skip to: 320 |
| 702 | /* 287 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
| 703 | /* 290 */ MCD::OPC_FilterValue, 10, 4, 0, // Skip to: 298 |
| 704 | /* 294 */ MCD::OPC_Decode, 132, 3, 15, // Opcode: BIC16mn, DecodeIdx: 15 |
| 705 | /* 298 */ MCD::OPC_FilterValue, 11, 4, 0, // Skip to: 306 |
| 706 | /* 302 */ MCD::OPC_Decode, 133, 3, 15, // Opcode: BIC16mp, DecodeIdx: 15 |
| 707 | /* 306 */ MCD::OPC_FilterValue, 14, 4, 0, // Skip to: 314 |
| 708 | /* 310 */ MCD::OPC_Decode, 144, 3, 15, // Opcode: BIC8mn, DecodeIdx: 15 |
| 709 | /* 314 */ MCD::OPC_FilterValueOrFail, 15, |
| 710 | /* 316 */ MCD::OPC_Decode, 145, 3, 15, // Opcode: BIC8mp, DecodeIdx: 15 |
| 711 | /* 320 */ MCD::OPC_FilterValue, 13, 33, 0, // Skip to: 357 |
| 712 | /* 324 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
| 713 | /* 327 */ MCD::OPC_FilterValue, 10, 4, 0, // Skip to: 335 |
| 714 | /* 331 */ MCD::OPC_Decode, 156, 3, 15, // Opcode: BIS16mn, DecodeIdx: 15 |
| 715 | /* 335 */ MCD::OPC_FilterValue, 11, 4, 0, // Skip to: 343 |
| 716 | /* 339 */ MCD::OPC_Decode, 157, 3, 15, // Opcode: BIS16mp, DecodeIdx: 15 |
| 717 | /* 343 */ MCD::OPC_FilterValue, 14, 4, 0, // Skip to: 351 |
| 718 | /* 347 */ MCD::OPC_Decode, 168, 3, 15, // Opcode: BIS8mn, DecodeIdx: 15 |
| 719 | /* 351 */ MCD::OPC_FilterValueOrFail, 15, |
| 720 | /* 353 */ MCD::OPC_Decode, 169, 3, 15, // Opcode: BIS8mp, DecodeIdx: 15 |
| 721 | /* 357 */ MCD::OPC_FilterValue, 14, 33, 0, // Skip to: 394 |
| 722 | /* 361 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
| 723 | /* 364 */ MCD::OPC_FilterValue, 10, 4, 0, // Skip to: 372 |
| 724 | /* 368 */ MCD::OPC_Decode, 247, 4, 15, // Opcode: XOR16mn, DecodeIdx: 15 |
| 725 | /* 372 */ MCD::OPC_FilterValue, 11, 4, 0, // Skip to: 380 |
| 726 | /* 376 */ MCD::OPC_Decode, 248, 4, 15, // Opcode: XOR16mp, DecodeIdx: 15 |
| 727 | /* 380 */ MCD::OPC_FilterValue, 14, 4, 0, // Skip to: 388 |
| 728 | /* 384 */ MCD::OPC_Decode, 131, 5, 15, // Opcode: XOR8mn, DecodeIdx: 15 |
| 729 | /* 388 */ MCD::OPC_FilterValueOrFail, 15, |
| 730 | /* 390 */ MCD::OPC_Decode, 132, 5, 15, // Opcode: XOR8mp, DecodeIdx: 15 |
| 731 | /* 394 */ MCD::OPC_FilterValueOrFail, 15, |
| 732 | /* 396 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
| 733 | /* 399 */ MCD::OPC_FilterValue, 10, 4, 0, // Skip to: 407 |
| 734 | /* 403 */ MCD::OPC_Decode, 236, 2, 15, // Opcode: AND16mn, DecodeIdx: 15 |
| 735 | /* 407 */ MCD::OPC_FilterValue, 11, 4, 0, // Skip to: 415 |
| 736 | /* 411 */ MCD::OPC_Decode, 237, 2, 15, // Opcode: AND16mp, DecodeIdx: 15 |
| 737 | /* 415 */ MCD::OPC_FilterValue, 14, 4, 0, // Skip to: 423 |
| 738 | /* 419 */ MCD::OPC_Decode, 248, 2, 15, // Opcode: AND8mn, DecodeIdx: 15 |
| 739 | /* 423 */ MCD::OPC_FilterValueOrFail, 15, |
| 740 | /* 425 */ MCD::OPC_Decode, 249, 2, 15, // Opcode: AND8mp, DecodeIdx: 15 |
| 741 | /* 429 */ MCD::OPC_Fail, |
| 742 | 0 |
| 743 | }; |
| 744 | |
| 745 | static const uint8_t DecoderTableGamma32[] = { |
| 746 | /* 0 */ MCD::OPC_ExtractField, 12, 4, // Inst{15-12} ... |
| 747 | /* 3 */ MCD::OPC_FilterValue, 4, 62, 0, // Skip to: 69 |
| 748 | /* 7 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
| 749 | /* 10 */ MCD::OPC_FilterValue, 1, 14, 0, // Skip to: 28 |
| 750 | /* 14 */ MCD::OPC_CheckField, 0, 4, 0, 4, 0, // Skip to: 24 |
| 751 | /* 20 */ MCD::OPC_Decode, 202, 3, 28, // Opcode: Bm, DecodeIdx: 28 |
| 752 | /* 24 */ MCD::OPC_Decode, 138, 4, 29, // Opcode: MOV16rm, DecodeIdx: 29 |
| 753 | /* 28 */ MCD::OPC_FilterValue, 3, 19, 0, // Skip to: 51 |
| 754 | /* 32 */ MCD::OPC_ExtractField, 8, 4, // Inst{11-8} ... |
| 755 | /* 35 */ MCD::OPC_FilterValueOrFail, 0, |
| 756 | /* 37 */ MCD::OPC_CheckField, 0, 4, 0, 4, 0, // Skip to: 47 |
| 757 | /* 43 */ MCD::OPC_Decode, 201, 3, 9, // Opcode: Bi, DecodeIdx: 9 |
| 758 | /* 47 */ MCD::OPC_Decode, 137, 4, 30, // Opcode: MOV16ri, DecodeIdx: 30 |
| 759 | /* 51 */ MCD::OPC_FilterValue, 5, 4, 0, // Skip to: 59 |
| 760 | /* 55 */ MCD::OPC_Decode, 149, 4, 31, // Opcode: MOV8rm, DecodeIdx: 31 |
| 761 | /* 59 */ MCD::OPC_FilterValueOrFail, 7, |
| 762 | /* 61 */ MCD::OPC_CheckFieldOrFail, 8, 4, 0, |
| 763 | /* 65 */ MCD::OPC_Decode, 148, 4, 32, // Opcode: MOV8ri, DecodeIdx: 32 |
| 764 | /* 69 */ MCD::OPC_FilterValue, 5, 41, 0, // Skip to: 114 |
| 765 | /* 73 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
| 766 | /* 76 */ MCD::OPC_FilterValue, 1, 4, 0, // Skip to: 84 |
| 767 | /* 80 */ MCD::OPC_Decode, 190, 2, 33, // Opcode: ADD16rm, DecodeIdx: 33 |
| 768 | /* 84 */ MCD::OPC_FilterValue, 3, 8, 0, // Skip to: 96 |
| 769 | /* 88 */ MCD::OPC_CheckFieldOrFail, 8, 4, 0, |
| 770 | /* 92 */ MCD::OPC_Decode, 189, 2, 34, // Opcode: ADD16ri, DecodeIdx: 34 |
| 771 | /* 96 */ MCD::OPC_FilterValue, 5, 4, 0, // Skip to: 104 |
| 772 | /* 100 */ MCD::OPC_Decode, 202, 2, 35, // Opcode: ADD8rm, DecodeIdx: 35 |
| 773 | /* 104 */ MCD::OPC_FilterValueOrFail, 7, |
| 774 | /* 106 */ MCD::OPC_CheckFieldOrFail, 8, 4, 0, |
| 775 | /* 110 */ MCD::OPC_Decode, 201, 2, 36, // Opcode: ADD8ri, DecodeIdx: 36 |
| 776 | /* 114 */ MCD::OPC_FilterValue, 6, 41, 0, // Skip to: 159 |
| 777 | /* 118 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
| 778 | /* 121 */ MCD::OPC_FilterValue, 1, 4, 0, // Skip to: 129 |
| 779 | /* 125 */ MCD::OPC_Decode, 214, 2, 33, // Opcode: ADDC16rm, DecodeIdx: 33 |
| 780 | /* 129 */ MCD::OPC_FilterValue, 3, 8, 0, // Skip to: 141 |
| 781 | /* 133 */ MCD::OPC_CheckFieldOrFail, 8, 4, 0, |
| 782 | /* 137 */ MCD::OPC_Decode, 213, 2, 34, // Opcode: ADDC16ri, DecodeIdx: 34 |
| 783 | /* 141 */ MCD::OPC_FilterValue, 5, 4, 0, // Skip to: 149 |
| 784 | /* 145 */ MCD::OPC_Decode, 226, 2, 35, // Opcode: ADDC8rm, DecodeIdx: 35 |
| 785 | /* 149 */ MCD::OPC_FilterValueOrFail, 7, |
| 786 | /* 151 */ MCD::OPC_CheckFieldOrFail, 8, 4, 0, |
| 787 | /* 155 */ MCD::OPC_Decode, 225, 2, 36, // Opcode: ADDC8ri, DecodeIdx: 36 |
| 788 | /* 159 */ MCD::OPC_FilterValue, 7, 41, 0, // Skip to: 204 |
| 789 | /* 163 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
| 790 | /* 166 */ MCD::OPC_FilterValue, 1, 4, 0, // Skip to: 174 |
| 791 | /* 170 */ MCD::OPC_Decode, 216, 4, 33, // Opcode: SUBC16rm, DecodeIdx: 33 |
| 792 | /* 174 */ MCD::OPC_FilterValue, 3, 8, 0, // Skip to: 186 |
| 793 | /* 178 */ MCD::OPC_CheckFieldOrFail, 8, 4, 0, |
| 794 | /* 182 */ MCD::OPC_Decode, 215, 4, 34, // Opcode: SUBC16ri, DecodeIdx: 34 |
| 795 | /* 186 */ MCD::OPC_FilterValue, 5, 4, 0, // Skip to: 194 |
| 796 | /* 190 */ MCD::OPC_Decode, 228, 4, 35, // Opcode: SUBC8rm, DecodeIdx: 35 |
| 797 | /* 194 */ MCD::OPC_FilterValueOrFail, 7, |
| 798 | /* 196 */ MCD::OPC_CheckFieldOrFail, 8, 4, 0, |
| 799 | /* 200 */ MCD::OPC_Decode, 227, 4, 36, // Opcode: SUBC8ri, DecodeIdx: 36 |
| 800 | /* 204 */ MCD::OPC_FilterValue, 8, 41, 0, // Skip to: 249 |
| 801 | /* 208 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
| 802 | /* 211 */ MCD::OPC_FilterValue, 1, 4, 0, // Skip to: 219 |
| 803 | /* 215 */ MCD::OPC_Decode, 192, 4, 33, // Opcode: SUB16rm, DecodeIdx: 33 |
| 804 | /* 219 */ MCD::OPC_FilterValue, 3, 8, 0, // Skip to: 231 |
| 805 | /* 223 */ MCD::OPC_CheckFieldOrFail, 8, 4, 0, |
| 806 | /* 227 */ MCD::OPC_Decode, 191, 4, 34, // Opcode: SUB16ri, DecodeIdx: 34 |
| 807 | /* 231 */ MCD::OPC_FilterValue, 5, 4, 0, // Skip to: 239 |
| 808 | /* 235 */ MCD::OPC_Decode, 204, 4, 35, // Opcode: SUB8rm, DecodeIdx: 35 |
| 809 | /* 239 */ MCD::OPC_FilterValueOrFail, 7, |
| 810 | /* 241 */ MCD::OPC_CheckFieldOrFail, 8, 4, 0, |
| 811 | /* 245 */ MCD::OPC_Decode, 203, 4, 36, // Opcode: SUB8ri, DecodeIdx: 36 |
| 812 | /* 249 */ MCD::OPC_FilterValue, 9, 41, 0, // Skip to: 294 |
| 813 | /* 253 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
| 814 | /* 256 */ MCD::OPC_FilterValue, 1, 4, 0, // Skip to: 264 |
| 815 | /* 260 */ MCD::OPC_Decode, 217, 3, 29, // Opcode: CMP16rm, DecodeIdx: 29 |
| 816 | /* 264 */ MCD::OPC_FilterValue, 3, 8, 0, // Skip to: 276 |
| 817 | /* 268 */ MCD::OPC_CheckFieldOrFail, 8, 4, 0, |
| 818 | /* 272 */ MCD::OPC_Decode, 216, 3, 30, // Opcode: CMP16ri, DecodeIdx: 30 |
| 819 | /* 276 */ MCD::OPC_FilterValue, 5, 4, 0, // Skip to: 284 |
| 820 | /* 280 */ MCD::OPC_Decode, 229, 3, 31, // Opcode: CMP8rm, DecodeIdx: 31 |
| 821 | /* 284 */ MCD::OPC_FilterValueOrFail, 7, |
| 822 | /* 286 */ MCD::OPC_CheckFieldOrFail, 8, 4, 0, |
| 823 | /* 290 */ MCD::OPC_Decode, 228, 3, 32, // Opcode: CMP8ri, DecodeIdx: 32 |
| 824 | /* 294 */ MCD::OPC_FilterValue, 10, 41, 0, // Skip to: 339 |
| 825 | /* 298 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
| 826 | /* 301 */ MCD::OPC_FilterValue, 1, 4, 0, // Skip to: 309 |
| 827 | /* 305 */ MCD::OPC_Decode, 241, 3, 33, // Opcode: DADD16rm, DecodeIdx: 33 |
| 828 | /* 309 */ MCD::OPC_FilterValue, 3, 8, 0, // Skip to: 321 |
| 829 | /* 313 */ MCD::OPC_CheckFieldOrFail, 8, 4, 0, |
| 830 | /* 317 */ MCD::OPC_Decode, 240, 3, 34, // Opcode: DADD16ri, DecodeIdx: 34 |
| 831 | /* 321 */ MCD::OPC_FilterValue, 5, 4, 0, // Skip to: 329 |
| 832 | /* 325 */ MCD::OPC_Decode, 253, 3, 35, // Opcode: DADD8rm, DecodeIdx: 35 |
| 833 | /* 329 */ MCD::OPC_FilterValueOrFail, 7, |
| 834 | /* 331 */ MCD::OPC_CheckFieldOrFail, 8, 4, 0, |
| 835 | /* 335 */ MCD::OPC_Decode, 252, 3, 36, // Opcode: DADD8ri, DecodeIdx: 36 |
| 836 | /* 339 */ MCD::OPC_FilterValue, 11, 41, 0, // Skip to: 384 |
| 837 | /* 343 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
| 838 | /* 346 */ MCD::OPC_FilterValue, 1, 4, 0, // Skip to: 354 |
| 839 | /* 350 */ MCD::OPC_Decode, 185, 3, 29, // Opcode: BIT16rm, DecodeIdx: 29 |
| 840 | /* 354 */ MCD::OPC_FilterValue, 3, 8, 0, // Skip to: 366 |
| 841 | /* 358 */ MCD::OPC_CheckFieldOrFail, 8, 4, 0, |
| 842 | /* 362 */ MCD::OPC_Decode, 184, 3, 30, // Opcode: BIT16ri, DecodeIdx: 30 |
| 843 | /* 366 */ MCD::OPC_FilterValue, 5, 4, 0, // Skip to: 374 |
| 844 | /* 370 */ MCD::OPC_Decode, 197, 3, 31, // Opcode: BIT8rm, DecodeIdx: 31 |
| 845 | /* 374 */ MCD::OPC_FilterValueOrFail, 7, |
| 846 | /* 376 */ MCD::OPC_CheckFieldOrFail, 8, 4, 0, |
| 847 | /* 380 */ MCD::OPC_Decode, 196, 3, 32, // Opcode: BIT8ri, DecodeIdx: 32 |
| 848 | /* 384 */ MCD::OPC_FilterValue, 12, 41, 0, // Skip to: 429 |
| 849 | /* 388 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
| 850 | /* 391 */ MCD::OPC_FilterValue, 1, 4, 0, // Skip to: 399 |
| 851 | /* 395 */ MCD::OPC_Decode, 137, 3, 33, // Opcode: BIC16rm, DecodeIdx: 33 |
| 852 | /* 399 */ MCD::OPC_FilterValue, 3, 8, 0, // Skip to: 411 |
| 853 | /* 403 */ MCD::OPC_CheckFieldOrFail, 8, 4, 0, |
| 854 | /* 407 */ MCD::OPC_Decode, 136, 3, 34, // Opcode: BIC16ri, DecodeIdx: 34 |
| 855 | /* 411 */ MCD::OPC_FilterValue, 5, 4, 0, // Skip to: 419 |
| 856 | /* 415 */ MCD::OPC_Decode, 149, 3, 35, // Opcode: BIC8rm, DecodeIdx: 35 |
| 857 | /* 419 */ MCD::OPC_FilterValueOrFail, 7, |
| 858 | /* 421 */ MCD::OPC_CheckFieldOrFail, 8, 4, 0, |
| 859 | /* 425 */ MCD::OPC_Decode, 148, 3, 36, // Opcode: BIC8ri, DecodeIdx: 36 |
| 860 | /* 429 */ MCD::OPC_FilterValue, 13, 41, 0, // Skip to: 474 |
| 861 | /* 433 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
| 862 | /* 436 */ MCD::OPC_FilterValue, 1, 4, 0, // Skip to: 444 |
| 863 | /* 440 */ MCD::OPC_Decode, 161, 3, 33, // Opcode: BIS16rm, DecodeIdx: 33 |
| 864 | /* 444 */ MCD::OPC_FilterValue, 3, 8, 0, // Skip to: 456 |
| 865 | /* 448 */ MCD::OPC_CheckFieldOrFail, 8, 4, 0, |
| 866 | /* 452 */ MCD::OPC_Decode, 160, 3, 34, // Opcode: BIS16ri, DecodeIdx: 34 |
| 867 | /* 456 */ MCD::OPC_FilterValue, 5, 4, 0, // Skip to: 464 |
| 868 | /* 460 */ MCD::OPC_Decode, 173, 3, 35, // Opcode: BIS8rm, DecodeIdx: 35 |
| 869 | /* 464 */ MCD::OPC_FilterValueOrFail, 7, |
| 870 | /* 466 */ MCD::OPC_CheckFieldOrFail, 8, 4, 0, |
| 871 | /* 470 */ MCD::OPC_Decode, 172, 3, 36, // Opcode: BIS8ri, DecodeIdx: 36 |
| 872 | /* 474 */ MCD::OPC_FilterValue, 14, 41, 0, // Skip to: 519 |
| 873 | /* 478 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
| 874 | /* 481 */ MCD::OPC_FilterValue, 1, 4, 0, // Skip to: 489 |
| 875 | /* 485 */ MCD::OPC_Decode, 252, 4, 33, // Opcode: XOR16rm, DecodeIdx: 33 |
| 876 | /* 489 */ MCD::OPC_FilterValue, 3, 8, 0, // Skip to: 501 |
| 877 | /* 493 */ MCD::OPC_CheckFieldOrFail, 8, 4, 0, |
| 878 | /* 497 */ MCD::OPC_Decode, 251, 4, 34, // Opcode: XOR16ri, DecodeIdx: 34 |
| 879 | /* 501 */ MCD::OPC_FilterValue, 5, 4, 0, // Skip to: 509 |
| 880 | /* 505 */ MCD::OPC_Decode, 136, 5, 35, // Opcode: XOR8rm, DecodeIdx: 35 |
| 881 | /* 509 */ MCD::OPC_FilterValueOrFail, 7, |
| 882 | /* 511 */ MCD::OPC_CheckFieldOrFail, 8, 4, 0, |
| 883 | /* 515 */ MCD::OPC_Decode, 135, 5, 36, // Opcode: XOR8ri, DecodeIdx: 36 |
| 884 | /* 519 */ MCD::OPC_FilterValueOrFail, 15, |
| 885 | /* 521 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
| 886 | /* 524 */ MCD::OPC_FilterValue, 1, 4, 0, // Skip to: 532 |
| 887 | /* 528 */ MCD::OPC_Decode, 241, 2, 33, // Opcode: AND16rm, DecodeIdx: 33 |
| 888 | /* 532 */ MCD::OPC_FilterValue, 3, 8, 0, // Skip to: 544 |
| 889 | /* 536 */ MCD::OPC_CheckFieldOrFail, 8, 4, 0, |
| 890 | /* 540 */ MCD::OPC_Decode, 240, 2, 34, // Opcode: AND16ri, DecodeIdx: 34 |
| 891 | /* 544 */ MCD::OPC_FilterValue, 5, 4, 0, // Skip to: 552 |
| 892 | /* 548 */ MCD::OPC_Decode, 253, 2, 35, // Opcode: AND8rm, DecodeIdx: 35 |
| 893 | /* 552 */ MCD::OPC_FilterValueOrFail, 7, |
| 894 | /* 554 */ MCD::OPC_CheckFieldOrFail, 8, 4, 0, |
| 895 | /* 558 */ MCD::OPC_Decode, 252, 2, 36, // Opcode: AND8ri, DecodeIdx: 36 |
| 896 | /* 562 */ MCD::OPC_Fail, |
| 897 | 0 |
| 898 | }; |
| 899 | |
| 900 | static const uint8_t DecoderTableGamma48[] = { |
| 901 | /* 0 */ MCD::OPC_ExtractField, 12, 4, // Inst{15-12} ... |
| 902 | /* 3 */ MCD::OPC_FilterValue, 4, 41, 0, // Skip to: 48 |
| 903 | /* 7 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
| 904 | /* 10 */ MCD::OPC_FilterValue, 9, 4, 0, // Skip to: 18 |
| 905 | /* 14 */ MCD::OPC_Decode, 133, 4, 37, // Opcode: MOV16mm, DecodeIdx: 37 |
| 906 | /* 18 */ MCD::OPC_FilterValue, 11, 8, 0, // Skip to: 30 |
| 907 | /* 22 */ MCD::OPC_CheckFieldOrFail, 8, 4, 0, |
| 908 | /* 26 */ MCD::OPC_Decode, 132, 4, 38, // Opcode: MOV16mi, DecodeIdx: 38 |
| 909 | /* 30 */ MCD::OPC_FilterValue, 13, 4, 0, // Skip to: 38 |
| 910 | /* 34 */ MCD::OPC_Decode, 144, 4, 37, // Opcode: MOV8mm, DecodeIdx: 37 |
| 911 | /* 38 */ MCD::OPC_FilterValueOrFail, 15, |
| 912 | /* 40 */ MCD::OPC_CheckFieldOrFail, 8, 4, 0, |
| 913 | /* 44 */ MCD::OPC_Decode, 143, 4, 38, // Opcode: MOV8mi, DecodeIdx: 38 |
| 914 | /* 48 */ MCD::OPC_FilterValue, 5, 41, 0, // Skip to: 93 |
| 915 | /* 52 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
| 916 | /* 55 */ MCD::OPC_FilterValue, 9, 4, 0, // Skip to: 63 |
| 917 | /* 59 */ MCD::OPC_Decode, 184, 2, 37, // Opcode: ADD16mm, DecodeIdx: 37 |
| 918 | /* 63 */ MCD::OPC_FilterValue, 11, 8, 0, // Skip to: 75 |
| 919 | /* 67 */ MCD::OPC_CheckFieldOrFail, 8, 4, 0, |
| 920 | /* 71 */ MCD::OPC_Decode, 183, 2, 38, // Opcode: ADD16mi, DecodeIdx: 38 |
| 921 | /* 75 */ MCD::OPC_FilterValue, 13, 4, 0, // Skip to: 83 |
| 922 | /* 79 */ MCD::OPC_Decode, 196, 2, 37, // Opcode: ADD8mm, DecodeIdx: 37 |
| 923 | /* 83 */ MCD::OPC_FilterValueOrFail, 15, |
| 924 | /* 85 */ MCD::OPC_CheckFieldOrFail, 8, 4, 0, |
| 925 | /* 89 */ MCD::OPC_Decode, 195, 2, 38, // Opcode: ADD8mi, DecodeIdx: 38 |
| 926 | /* 93 */ MCD::OPC_FilterValue, 6, 41, 0, // Skip to: 138 |
| 927 | /* 97 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
| 928 | /* 100 */ MCD::OPC_FilterValue, 9, 4, 0, // Skip to: 108 |
| 929 | /* 104 */ MCD::OPC_Decode, 208, 2, 37, // Opcode: ADDC16mm, DecodeIdx: 37 |
| 930 | /* 108 */ MCD::OPC_FilterValue, 11, 8, 0, // Skip to: 120 |
| 931 | /* 112 */ MCD::OPC_CheckFieldOrFail, 8, 4, 0, |
| 932 | /* 116 */ MCD::OPC_Decode, 207, 2, 38, // Opcode: ADDC16mi, DecodeIdx: 38 |
| 933 | /* 120 */ MCD::OPC_FilterValue, 13, 4, 0, // Skip to: 128 |
| 934 | /* 124 */ MCD::OPC_Decode, 220, 2, 37, // Opcode: ADDC8mm, DecodeIdx: 37 |
| 935 | /* 128 */ MCD::OPC_FilterValueOrFail, 15, |
| 936 | /* 130 */ MCD::OPC_CheckFieldOrFail, 8, 4, 0, |
| 937 | /* 134 */ MCD::OPC_Decode, 219, 2, 38, // Opcode: ADDC8mi, DecodeIdx: 38 |
| 938 | /* 138 */ MCD::OPC_FilterValue, 7, 41, 0, // Skip to: 183 |
| 939 | /* 142 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
| 940 | /* 145 */ MCD::OPC_FilterValue, 9, 4, 0, // Skip to: 153 |
| 941 | /* 149 */ MCD::OPC_Decode, 210, 4, 37, // Opcode: SUBC16mm, DecodeIdx: 37 |
| 942 | /* 153 */ MCD::OPC_FilterValue, 11, 8, 0, // Skip to: 165 |
| 943 | /* 157 */ MCD::OPC_CheckFieldOrFail, 8, 4, 0, |
| 944 | /* 161 */ MCD::OPC_Decode, 209, 4, 38, // Opcode: SUBC16mi, DecodeIdx: 38 |
| 945 | /* 165 */ MCD::OPC_FilterValue, 13, 4, 0, // Skip to: 173 |
| 946 | /* 169 */ MCD::OPC_Decode, 222, 4, 37, // Opcode: SUBC8mm, DecodeIdx: 37 |
| 947 | /* 173 */ MCD::OPC_FilterValueOrFail, 15, |
| 948 | /* 175 */ MCD::OPC_CheckFieldOrFail, 8, 4, 0, |
| 949 | /* 179 */ MCD::OPC_Decode, 221, 4, 38, // Opcode: SUBC8mi, DecodeIdx: 38 |
| 950 | /* 183 */ MCD::OPC_FilterValue, 8, 41, 0, // Skip to: 228 |
| 951 | /* 187 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
| 952 | /* 190 */ MCD::OPC_FilterValue, 9, 4, 0, // Skip to: 198 |
| 953 | /* 194 */ MCD::OPC_Decode, 186, 4, 37, // Opcode: SUB16mm, DecodeIdx: 37 |
| 954 | /* 198 */ MCD::OPC_FilterValue, 11, 8, 0, // Skip to: 210 |
| 955 | /* 202 */ MCD::OPC_CheckFieldOrFail, 8, 4, 0, |
| 956 | /* 206 */ MCD::OPC_Decode, 185, 4, 38, // Opcode: SUB16mi, DecodeIdx: 38 |
| 957 | /* 210 */ MCD::OPC_FilterValue, 13, 4, 0, // Skip to: 218 |
| 958 | /* 214 */ MCD::OPC_Decode, 198, 4, 37, // Opcode: SUB8mm, DecodeIdx: 37 |
| 959 | /* 218 */ MCD::OPC_FilterValueOrFail, 15, |
| 960 | /* 220 */ MCD::OPC_CheckFieldOrFail, 8, 4, 0, |
| 961 | /* 224 */ MCD::OPC_Decode, 197, 4, 38, // Opcode: SUB8mi, DecodeIdx: 38 |
| 962 | /* 228 */ MCD::OPC_FilterValue, 9, 41, 0, // Skip to: 273 |
| 963 | /* 232 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
| 964 | /* 235 */ MCD::OPC_FilterValue, 9, 4, 0, // Skip to: 243 |
| 965 | /* 239 */ MCD::OPC_Decode, 211, 3, 37, // Opcode: CMP16mm, DecodeIdx: 37 |
| 966 | /* 243 */ MCD::OPC_FilterValue, 11, 8, 0, // Skip to: 255 |
| 967 | /* 247 */ MCD::OPC_CheckFieldOrFail, 8, 4, 0, |
| 968 | /* 251 */ MCD::OPC_Decode, 210, 3, 38, // Opcode: CMP16mi, DecodeIdx: 38 |
| 969 | /* 255 */ MCD::OPC_FilterValue, 13, 4, 0, // Skip to: 263 |
| 970 | /* 259 */ MCD::OPC_Decode, 223, 3, 37, // Opcode: CMP8mm, DecodeIdx: 37 |
| 971 | /* 263 */ MCD::OPC_FilterValueOrFail, 15, |
| 972 | /* 265 */ MCD::OPC_CheckFieldOrFail, 8, 4, 0, |
| 973 | /* 269 */ MCD::OPC_Decode, 222, 3, 38, // Opcode: CMP8mi, DecodeIdx: 38 |
| 974 | /* 273 */ MCD::OPC_FilterValue, 10, 41, 0, // Skip to: 318 |
| 975 | /* 277 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
| 976 | /* 280 */ MCD::OPC_FilterValue, 9, 4, 0, // Skip to: 288 |
| 977 | /* 284 */ MCD::OPC_Decode, 235, 3, 37, // Opcode: DADD16mm, DecodeIdx: 37 |
| 978 | /* 288 */ MCD::OPC_FilterValue, 11, 8, 0, // Skip to: 300 |
| 979 | /* 292 */ MCD::OPC_CheckFieldOrFail, 8, 4, 0, |
| 980 | /* 296 */ MCD::OPC_Decode, 234, 3, 38, // Opcode: DADD16mi, DecodeIdx: 38 |
| 981 | /* 300 */ MCD::OPC_FilterValue, 13, 4, 0, // Skip to: 308 |
| 982 | /* 304 */ MCD::OPC_Decode, 247, 3, 37, // Opcode: DADD8mm, DecodeIdx: 37 |
| 983 | /* 308 */ MCD::OPC_FilterValueOrFail, 15, |
| 984 | /* 310 */ MCD::OPC_CheckFieldOrFail, 8, 4, 0, |
| 985 | /* 314 */ MCD::OPC_Decode, 246, 3, 38, // Opcode: DADD8mi, DecodeIdx: 38 |
| 986 | /* 318 */ MCD::OPC_FilterValue, 11, 41, 0, // Skip to: 363 |
| 987 | /* 322 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
| 988 | /* 325 */ MCD::OPC_FilterValue, 9, 4, 0, // Skip to: 333 |
| 989 | /* 329 */ MCD::OPC_Decode, 179, 3, 37, // Opcode: BIT16mm, DecodeIdx: 37 |
| 990 | /* 333 */ MCD::OPC_FilterValue, 11, 8, 0, // Skip to: 345 |
| 991 | /* 337 */ MCD::OPC_CheckFieldOrFail, 8, 4, 0, |
| 992 | /* 341 */ MCD::OPC_Decode, 178, 3, 38, // Opcode: BIT16mi, DecodeIdx: 38 |
| 993 | /* 345 */ MCD::OPC_FilterValue, 13, 4, 0, // Skip to: 353 |
| 994 | /* 349 */ MCD::OPC_Decode, 191, 3, 37, // Opcode: BIT8mm, DecodeIdx: 37 |
| 995 | /* 353 */ MCD::OPC_FilterValueOrFail, 15, |
| 996 | /* 355 */ MCD::OPC_CheckFieldOrFail, 8, 4, 0, |
| 997 | /* 359 */ MCD::OPC_Decode, 190, 3, 38, // Opcode: BIT8mi, DecodeIdx: 38 |
| 998 | /* 363 */ MCD::OPC_FilterValue, 12, 41, 0, // Skip to: 408 |
| 999 | /* 367 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
| 1000 | /* 370 */ MCD::OPC_FilterValue, 9, 4, 0, // Skip to: 378 |
| 1001 | /* 374 */ MCD::OPC_Decode, 131, 3, 37, // Opcode: BIC16mm, DecodeIdx: 37 |
| 1002 | /* 378 */ MCD::OPC_FilterValue, 11, 8, 0, // Skip to: 390 |
| 1003 | /* 382 */ MCD::OPC_CheckFieldOrFail, 8, 4, 0, |
| 1004 | /* 386 */ MCD::OPC_Decode, 130, 3, 38, // Opcode: BIC16mi, DecodeIdx: 38 |
| 1005 | /* 390 */ MCD::OPC_FilterValue, 13, 4, 0, // Skip to: 398 |
| 1006 | /* 394 */ MCD::OPC_Decode, 143, 3, 37, // Opcode: BIC8mm, DecodeIdx: 37 |
| 1007 | /* 398 */ MCD::OPC_FilterValueOrFail, 15, |
| 1008 | /* 400 */ MCD::OPC_CheckFieldOrFail, 8, 4, 0, |
| 1009 | /* 404 */ MCD::OPC_Decode, 142, 3, 38, // Opcode: BIC8mi, DecodeIdx: 38 |
| 1010 | /* 408 */ MCD::OPC_FilterValue, 13, 41, 0, // Skip to: 453 |
| 1011 | /* 412 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
| 1012 | /* 415 */ MCD::OPC_FilterValue, 9, 4, 0, // Skip to: 423 |
| 1013 | /* 419 */ MCD::OPC_Decode, 155, 3, 37, // Opcode: BIS16mm, DecodeIdx: 37 |
| 1014 | /* 423 */ MCD::OPC_FilterValue, 11, 8, 0, // Skip to: 435 |
| 1015 | /* 427 */ MCD::OPC_CheckFieldOrFail, 8, 4, 0, |
| 1016 | /* 431 */ MCD::OPC_Decode, 154, 3, 38, // Opcode: BIS16mi, DecodeIdx: 38 |
| 1017 | /* 435 */ MCD::OPC_FilterValue, 13, 4, 0, // Skip to: 443 |
| 1018 | /* 439 */ MCD::OPC_Decode, 167, 3, 37, // Opcode: BIS8mm, DecodeIdx: 37 |
| 1019 | /* 443 */ MCD::OPC_FilterValueOrFail, 15, |
| 1020 | /* 445 */ MCD::OPC_CheckFieldOrFail, 8, 4, 0, |
| 1021 | /* 449 */ MCD::OPC_Decode, 166, 3, 38, // Opcode: BIS8mi, DecodeIdx: 38 |
| 1022 | /* 453 */ MCD::OPC_FilterValue, 14, 41, 0, // Skip to: 498 |
| 1023 | /* 457 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
| 1024 | /* 460 */ MCD::OPC_FilterValue, 9, 4, 0, // Skip to: 468 |
| 1025 | /* 464 */ MCD::OPC_Decode, 246, 4, 37, // Opcode: XOR16mm, DecodeIdx: 37 |
| 1026 | /* 468 */ MCD::OPC_FilterValue, 11, 8, 0, // Skip to: 480 |
| 1027 | /* 472 */ MCD::OPC_CheckFieldOrFail, 8, 4, 0, |
| 1028 | /* 476 */ MCD::OPC_Decode, 245, 4, 38, // Opcode: XOR16mi, DecodeIdx: 38 |
| 1029 | /* 480 */ MCD::OPC_FilterValue, 13, 4, 0, // Skip to: 488 |
| 1030 | /* 484 */ MCD::OPC_Decode, 130, 5, 37, // Opcode: XOR8mm, DecodeIdx: 37 |
| 1031 | /* 488 */ MCD::OPC_FilterValueOrFail, 15, |
| 1032 | /* 490 */ MCD::OPC_CheckFieldOrFail, 8, 4, 0, |
| 1033 | /* 494 */ MCD::OPC_Decode, 129, 5, 38, // Opcode: XOR8mi, DecodeIdx: 38 |
| 1034 | /* 498 */ MCD::OPC_FilterValueOrFail, 15, |
| 1035 | /* 500 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
| 1036 | /* 503 */ MCD::OPC_FilterValue, 9, 4, 0, // Skip to: 511 |
| 1037 | /* 507 */ MCD::OPC_Decode, 235, 2, 37, // Opcode: AND16mm, DecodeIdx: 37 |
| 1038 | /* 511 */ MCD::OPC_FilterValue, 11, 8, 0, // Skip to: 523 |
| 1039 | /* 515 */ MCD::OPC_CheckFieldOrFail, 8, 4, 0, |
| 1040 | /* 519 */ MCD::OPC_Decode, 234, 2, 38, // Opcode: AND16mi, DecodeIdx: 38 |
| 1041 | /* 523 */ MCD::OPC_FilterValue, 13, 4, 0, // Skip to: 531 |
| 1042 | /* 527 */ MCD::OPC_Decode, 247, 2, 37, // Opcode: AND8mm, DecodeIdx: 37 |
| 1043 | /* 531 */ MCD::OPC_FilterValueOrFail, 15, |
| 1044 | /* 533 */ MCD::OPC_CheckFieldOrFail, 8, 4, 0, |
| 1045 | /* 537 */ MCD::OPC_Decode, 246, 2, 38, // Opcode: AND8mi, DecodeIdx: 38 |
| 1046 | /* 541 */ MCD::OPC_Fail, |
| 1047 | 0 |
| 1048 | }; |
| 1049 | |
| 1050 | // Handling 39 cases. |
| 1051 | template <typename InsnType> |
| 1052 | static DecodeStatus decodeToMCInst(unsigned Idx, DecodeStatus S, InsnType insn, MCInst &MI, uint64_t Address, const MCDisassembler *Decoder, bool &DecodeComplete) { |
| 1053 | DecodeComplete = true; |
| 1054 | using TmpType = std::conditional_t<std::is_integral<InsnType>::value, InsnType, uint64_t>; |
| 1055 | TmpType tmp; |
| 1056 | switch (Idx) { |
| 1057 | default: llvm_unreachable("Invalid index!" ); |
| 1058 | case 0: |
| 1059 | tmp = fieldFromInstruction(insn, 0, 4); |
| 1060 | if (!Check(S, DecodeGR16RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
| 1061 | tmp = fieldFromInstruction(insn, 0, 4); |
| 1062 | if (!Check(S, DecodeGR16RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
| 1063 | return S; |
| 1064 | case 1: |
| 1065 | tmp = fieldFromInstruction(insn, 0, 4); |
| 1066 | if (!Check(S, DecodeGR16RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
| 1067 | return S; |
| 1068 | case 2: |
| 1069 | tmp = fieldFromInstruction(insn, 0, 4); |
| 1070 | if (!Check(S, DecodeGR8RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
| 1071 | tmp = fieldFromInstruction(insn, 0, 4); |
| 1072 | if (!Check(S, DecodeGR8RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
| 1073 | return S; |
| 1074 | case 3: |
| 1075 | tmp = fieldFromInstruction(insn, 0, 6); |
| 1076 | if (!Check(S, DecodeCGImm(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
| 1077 | return S; |
| 1078 | case 4: |
| 1079 | tmp = fieldFromInstruction(insn, 0, 4); |
| 1080 | if (!Check(S, DecodeGR8RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
| 1081 | return S; |
| 1082 | case 5: |
| 1083 | return S; |
| 1084 | case 6: |
| 1085 | tmp = fieldFromInstruction(insn, 0, 10); |
| 1086 | MI.addOperand(Op: MCOperand::createImm(Val: tmp)); |
| 1087 | return S; |
| 1088 | case 7: |
| 1089 | tmp = fieldFromInstruction(insn, 0, 10); |
| 1090 | MI.addOperand(Op: MCOperand::createImm(Val: tmp)); |
| 1091 | tmp = fieldFromInstruction(insn, 10, 3); |
| 1092 | MI.addOperand(Op: MCOperand::createImm(Val: tmp)); |
| 1093 | return S; |
| 1094 | case 8: |
| 1095 | tmp = 0x0; |
| 1096 | insertBits(tmp, fieldFromInstruction(insn, 0, 4), 0, 4); |
| 1097 | insertBits(tmp, fieldFromInstruction(insn, 16, 16), 4, 16); |
| 1098 | if (!Check(S, DecodeMemOperand(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
| 1099 | return S; |
| 1100 | case 9: |
| 1101 | tmp = fieldFromInstruction(insn, 16, 16); |
| 1102 | MI.addOperand(Op: MCOperand::createImm(Val: tmp)); |
| 1103 | return S; |
| 1104 | case 10: |
| 1105 | tmp = fieldFromInstruction(insn, 8, 4); |
| 1106 | if (!Check(S, DecodeGR16RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
| 1107 | return S; |
| 1108 | case 11: |
| 1109 | tmp = fieldFromInstruction(insn, 0, 4); |
| 1110 | if (!Check(S, DecodeGR16RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
| 1111 | tmp = fieldFromInstruction(insn, 8, 4); |
| 1112 | if (!Check(S, DecodeGR16RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
| 1113 | return S; |
| 1114 | case 12: |
| 1115 | tmp = fieldFromInstruction(insn, 0, 4); |
| 1116 | if (!Check(S, DecodeGR8RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
| 1117 | tmp = fieldFromInstruction(insn, 8, 4); |
| 1118 | if (!Check(S, DecodeGR8RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
| 1119 | return S; |
| 1120 | case 13: |
| 1121 | tmp = fieldFromInstruction(insn, 0, 4); |
| 1122 | if (!Check(S, DecodeGR16RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
| 1123 | tmp = fieldFromInstruction(insn, 0, 4); |
| 1124 | if (!Check(S, DecodeGR16RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
| 1125 | tmp = fieldFromInstruction(insn, 8, 4); |
| 1126 | if (!Check(S, DecodeGR16RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
| 1127 | return S; |
| 1128 | case 14: |
| 1129 | tmp = fieldFromInstruction(insn, 0, 4); |
| 1130 | if (!Check(S, DecodeGR8RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
| 1131 | tmp = fieldFromInstruction(insn, 0, 4); |
| 1132 | if (!Check(S, DecodeGR8RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
| 1133 | tmp = fieldFromInstruction(insn, 8, 4); |
| 1134 | if (!Check(S, DecodeGR8RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
| 1135 | return S; |
| 1136 | case 15: |
| 1137 | tmp = 0x0; |
| 1138 | insertBits(tmp, fieldFromInstruction(insn, 0, 4), 0, 4); |
| 1139 | insertBits(tmp, fieldFromInstruction(insn, 16, 16), 4, 16); |
| 1140 | if (!Check(S, DecodeMemOperand(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
| 1141 | tmp = fieldFromInstruction(insn, 8, 4); |
| 1142 | if (!Check(S, DecodeGR16RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
| 1143 | return S; |
| 1144 | case 16: |
| 1145 | tmp = 0x0; |
| 1146 | insertBits(tmp, fieldFromInstruction(insn, 0, 4), 0, 4); |
| 1147 | insertBits(tmp, fieldFromInstruction(insn, 16, 16), 4, 16); |
| 1148 | if (!Check(S, DecodeMemOperand(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
| 1149 | tmp = fieldFromInstruction(insn, 8, 4); |
| 1150 | if (!Check(S, DecodeGR8RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
| 1151 | return S; |
| 1152 | case 17: |
| 1153 | tmp = fieldFromInstruction(insn, 0, 4); |
| 1154 | if (!Check(S, DecodeGR16RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
| 1155 | tmp = 0x0; |
| 1156 | insertBits(tmp, fieldFromInstruction(insn, 4, 2), 4, 2); |
| 1157 | insertBits(tmp, fieldFromInstruction(insn, 8, 4), 0, 4); |
| 1158 | if (!Check(S, DecodeCGImm(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
| 1159 | return S; |
| 1160 | case 18: |
| 1161 | tmp = fieldFromInstruction(insn, 0, 4); |
| 1162 | if (!Check(S, DecodeGR8RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
| 1163 | tmp = 0x0; |
| 1164 | insertBits(tmp, fieldFromInstruction(insn, 4, 2), 4, 2); |
| 1165 | insertBits(tmp, fieldFromInstruction(insn, 8, 4), 0, 4); |
| 1166 | if (!Check(S, DecodeCGImm(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
| 1167 | return S; |
| 1168 | case 19: |
| 1169 | tmp = fieldFromInstruction(insn, 0, 4); |
| 1170 | if (!Check(S, DecodeGR16RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
| 1171 | tmp = fieldFromInstruction(insn, 0, 4); |
| 1172 | if (!Check(S, DecodeGR16RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
| 1173 | tmp = 0x0; |
| 1174 | insertBits(tmp, fieldFromInstruction(insn, 4, 2), 4, 2); |
| 1175 | insertBits(tmp, fieldFromInstruction(insn, 8, 4), 0, 4); |
| 1176 | if (!Check(S, DecodeCGImm(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
| 1177 | return S; |
| 1178 | case 20: |
| 1179 | tmp = fieldFromInstruction(insn, 0, 4); |
| 1180 | if (!Check(S, DecodeGR8RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
| 1181 | tmp = fieldFromInstruction(insn, 0, 4); |
| 1182 | if (!Check(S, DecodeGR8RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
| 1183 | tmp = 0x0; |
| 1184 | insertBits(tmp, fieldFromInstruction(insn, 4, 2), 4, 2); |
| 1185 | insertBits(tmp, fieldFromInstruction(insn, 8, 4), 0, 4); |
| 1186 | if (!Check(S, DecodeCGImm(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
| 1187 | return S; |
| 1188 | case 21: |
| 1189 | tmp = 0x0; |
| 1190 | insertBits(tmp, fieldFromInstruction(insn, 0, 4), 0, 4); |
| 1191 | insertBits(tmp, fieldFromInstruction(insn, 16, 16), 4, 16); |
| 1192 | if (!Check(S, DecodeMemOperand(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
| 1193 | tmp = 0x0; |
| 1194 | insertBits(tmp, fieldFromInstruction(insn, 4, 2), 4, 2); |
| 1195 | insertBits(tmp, fieldFromInstruction(insn, 8, 4), 0, 4); |
| 1196 | if (!Check(S, DecodeCGImm(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
| 1197 | return S; |
| 1198 | case 22: |
| 1199 | tmp = fieldFromInstruction(insn, 0, 4); |
| 1200 | if (!Check(S, DecodeGR16RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
| 1201 | tmp = fieldFromInstruction(insn, 8, 4); |
| 1202 | if (!Check(S, DecodeGR16RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
| 1203 | tmp = fieldFromInstruction(insn, 8, 4); |
| 1204 | if (!Check(S, DecodeGR16RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
| 1205 | return S; |
| 1206 | case 23: |
| 1207 | tmp = fieldFromInstruction(insn, 0, 4); |
| 1208 | if (!Check(S, DecodeGR8RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
| 1209 | tmp = fieldFromInstruction(insn, 8, 4); |
| 1210 | if (!Check(S, DecodeGR16RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
| 1211 | return S; |
| 1212 | case 24: |
| 1213 | tmp = fieldFromInstruction(insn, 0, 4); |
| 1214 | if (!Check(S, DecodeGR8RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
| 1215 | tmp = fieldFromInstruction(insn, 8, 4); |
| 1216 | if (!Check(S, DecodeGR16RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
| 1217 | tmp = fieldFromInstruction(insn, 8, 4); |
| 1218 | if (!Check(S, DecodeGR16RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
| 1219 | return S; |
| 1220 | case 25: |
| 1221 | tmp = fieldFromInstruction(insn, 0, 4); |
| 1222 | if (!Check(S, DecodeGR16RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
| 1223 | tmp = fieldFromInstruction(insn, 8, 4); |
| 1224 | if (!Check(S, DecodeGR16RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
| 1225 | tmp = fieldFromInstruction(insn, 0, 4); |
| 1226 | if (!Check(S, DecodeGR16RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
| 1227 | tmp = fieldFromInstruction(insn, 8, 4); |
| 1228 | if (!Check(S, DecodeGR16RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
| 1229 | return S; |
| 1230 | case 26: |
| 1231 | tmp = fieldFromInstruction(insn, 0, 4); |
| 1232 | if (!Check(S, DecodeGR8RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
| 1233 | tmp = fieldFromInstruction(insn, 0, 4); |
| 1234 | if (!Check(S, DecodeGR8RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
| 1235 | tmp = fieldFromInstruction(insn, 8, 4); |
| 1236 | if (!Check(S, DecodeGR16RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
| 1237 | return S; |
| 1238 | case 27: |
| 1239 | tmp = fieldFromInstruction(insn, 0, 4); |
| 1240 | if (!Check(S, DecodeGR8RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
| 1241 | tmp = fieldFromInstruction(insn, 8, 4); |
| 1242 | if (!Check(S, DecodeGR16RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
| 1243 | tmp = fieldFromInstruction(insn, 0, 4); |
| 1244 | if (!Check(S, DecodeGR8RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
| 1245 | tmp = fieldFromInstruction(insn, 8, 4); |
| 1246 | if (!Check(S, DecodeGR16RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
| 1247 | return S; |
| 1248 | case 28: |
| 1249 | tmp = 0x0; |
| 1250 | insertBits(tmp, fieldFromInstruction(insn, 8, 4), 0, 4); |
| 1251 | insertBits(tmp, fieldFromInstruction(insn, 16, 16), 4, 16); |
| 1252 | if (!Check(S, DecodeMemOperand(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
| 1253 | return S; |
| 1254 | case 29: |
| 1255 | tmp = fieldFromInstruction(insn, 0, 4); |
| 1256 | if (!Check(S, DecodeGR16RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
| 1257 | tmp = 0x0; |
| 1258 | insertBits(tmp, fieldFromInstruction(insn, 8, 4), 0, 4); |
| 1259 | insertBits(tmp, fieldFromInstruction(insn, 16, 16), 4, 16); |
| 1260 | if (!Check(S, DecodeMemOperand(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
| 1261 | return S; |
| 1262 | case 30: |
| 1263 | tmp = fieldFromInstruction(insn, 0, 4); |
| 1264 | if (!Check(S, DecodeGR16RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
| 1265 | tmp = fieldFromInstruction(insn, 16, 16); |
| 1266 | MI.addOperand(Op: MCOperand::createImm(Val: tmp)); |
| 1267 | return S; |
| 1268 | case 31: |
| 1269 | tmp = fieldFromInstruction(insn, 0, 4); |
| 1270 | if (!Check(S, DecodeGR8RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
| 1271 | tmp = 0x0; |
| 1272 | insertBits(tmp, fieldFromInstruction(insn, 8, 4), 0, 4); |
| 1273 | insertBits(tmp, fieldFromInstruction(insn, 16, 16), 4, 16); |
| 1274 | if (!Check(S, DecodeMemOperand(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
| 1275 | return S; |
| 1276 | case 32: |
| 1277 | tmp = fieldFromInstruction(insn, 0, 4); |
| 1278 | if (!Check(S, DecodeGR8RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
| 1279 | tmp = fieldFromInstruction(insn, 16, 16); |
| 1280 | MI.addOperand(Op: MCOperand::createImm(Val: tmp)); |
| 1281 | return S; |
| 1282 | case 33: |
| 1283 | tmp = fieldFromInstruction(insn, 0, 4); |
| 1284 | if (!Check(S, DecodeGR16RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
| 1285 | tmp = fieldFromInstruction(insn, 0, 4); |
| 1286 | if (!Check(S, DecodeGR16RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
| 1287 | tmp = 0x0; |
| 1288 | insertBits(tmp, fieldFromInstruction(insn, 8, 4), 0, 4); |
| 1289 | insertBits(tmp, fieldFromInstruction(insn, 16, 16), 4, 16); |
| 1290 | if (!Check(S, DecodeMemOperand(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
| 1291 | return S; |
| 1292 | case 34: |
| 1293 | tmp = fieldFromInstruction(insn, 0, 4); |
| 1294 | if (!Check(S, DecodeGR16RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
| 1295 | tmp = fieldFromInstruction(insn, 0, 4); |
| 1296 | if (!Check(S, DecodeGR16RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
| 1297 | tmp = fieldFromInstruction(insn, 16, 16); |
| 1298 | MI.addOperand(Op: MCOperand::createImm(Val: tmp)); |
| 1299 | return S; |
| 1300 | case 35: |
| 1301 | tmp = fieldFromInstruction(insn, 0, 4); |
| 1302 | if (!Check(S, DecodeGR8RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
| 1303 | tmp = fieldFromInstruction(insn, 0, 4); |
| 1304 | if (!Check(S, DecodeGR8RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
| 1305 | tmp = 0x0; |
| 1306 | insertBits(tmp, fieldFromInstruction(insn, 8, 4), 0, 4); |
| 1307 | insertBits(tmp, fieldFromInstruction(insn, 16, 16), 4, 16); |
| 1308 | if (!Check(S, DecodeMemOperand(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
| 1309 | return S; |
| 1310 | case 36: |
| 1311 | tmp = fieldFromInstruction(insn, 0, 4); |
| 1312 | if (!Check(S, DecodeGR8RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
| 1313 | tmp = fieldFromInstruction(insn, 0, 4); |
| 1314 | if (!Check(S, DecodeGR8RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
| 1315 | tmp = fieldFromInstruction(insn, 16, 16); |
| 1316 | MI.addOperand(Op: MCOperand::createImm(Val: tmp)); |
| 1317 | return S; |
| 1318 | case 37: |
| 1319 | tmp = 0x0; |
| 1320 | insertBits(tmp, fieldFromInstruction(insn, 0, 4), 0, 4); |
| 1321 | insertBits(tmp, fieldFromInstruction(insn, 32, 16), 4, 16); |
| 1322 | if (!Check(S, DecodeMemOperand(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
| 1323 | tmp = 0x0; |
| 1324 | insertBits(tmp, fieldFromInstruction(insn, 8, 4), 0, 4); |
| 1325 | insertBits(tmp, fieldFromInstruction(insn, 16, 16), 4, 16); |
| 1326 | if (!Check(S, DecodeMemOperand(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
| 1327 | return S; |
| 1328 | case 38: |
| 1329 | tmp = 0x0; |
| 1330 | insertBits(tmp, fieldFromInstruction(insn, 0, 4), 0, 4); |
| 1331 | insertBits(tmp, fieldFromInstruction(insn, 32, 16), 4, 16); |
| 1332 | if (!Check(S, DecodeMemOperand(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
| 1333 | tmp = fieldFromInstruction(insn, 16, 16); |
| 1334 | MI.addOperand(Op: MCOperand::createImm(Val: tmp)); |
| 1335 | return S; |
| 1336 | } |
| 1337 | } |
| 1338 | |
| 1339 | static unsigned decodeNumToSkip(const uint8_t *&Ptr) { |
| 1340 | unsigned NumToSkip = *Ptr++; |
| 1341 | NumToSkip |= (*Ptr++) << 8; |
| 1342 | return NumToSkip; |
| 1343 | } |
| 1344 | |
| 1345 | template <typename InsnType> |
| 1346 | static DecodeStatus decodeInstruction(const uint8_t DecodeTable[], MCInst &MI, |
| 1347 | InsnType insn, uint64_t Address, |
| 1348 | const MCDisassembler *DisAsm, |
| 1349 | const MCSubtargetInfo &STI) { |
| 1350 | |
| 1351 | const uint8_t *Ptr = DecodeTable; |
| 1352 | uint64_t CurFieldValue = 0; |
| 1353 | DecodeStatus S = MCDisassembler::Success; |
| 1354 | while (true) { |
| 1355 | ptrdiff_t Loc = Ptr - DecodeTable; |
| 1356 | const uint8_t DecoderOp = *Ptr++; |
| 1357 | switch (DecoderOp) { |
| 1358 | default: |
| 1359 | errs() << Loc << ": Unexpected decode table opcode: " |
| 1360 | << (int)DecoderOp << '\n'; |
| 1361 | return MCDisassembler::Fail; |
| 1362 | case MCD::OPC_ExtractField: { |
| 1363 | // Decode the start value. |
| 1364 | unsigned Start = decodeULEB128AndIncUnsafe(p&: Ptr); |
| 1365 | unsigned Len = *Ptr++; |
| 1366 | CurFieldValue = fieldFromInstruction(insn, Start, Len); |
| 1367 | LLVM_DEBUG(dbgs() << Loc << ": OPC_ExtractField(" << Start << ", " |
| 1368 | << Len << "): " << CurFieldValue << "\n" ); |
| 1369 | break; |
| 1370 | } |
| 1371 | case MCD::OPC_FilterValue: |
| 1372 | case MCD::OPC_FilterValueOrFail: { |
| 1373 | bool IsFail = DecoderOp == MCD::OPC_FilterValueOrFail; |
| 1374 | // Decode the field value. |
| 1375 | uint64_t Val = decodeULEB128AndIncUnsafe(p&: Ptr); |
| 1376 | bool Failed = Val != CurFieldValue; |
| 1377 | unsigned NumToSkip = IsFail ? 0 : decodeNumToSkip(Ptr); |
| 1378 | |
| 1379 | // Note: Print NumToSkip even for OPC_FilterValueOrFail to simplify debug |
| 1380 | // prints. |
| 1381 | LLVM_DEBUG({ |
| 1382 | StringRef OpName = IsFail ? "OPC_FilterValueOrFail" : "OPC_FilterValue" ; |
| 1383 | dbgs() << Loc << ": " << OpName << '(' << Val << ", " << NumToSkip |
| 1384 | << ") " << (Failed ? "FAIL:" : "PASS:" ) |
| 1385 | << " continuing at " << (Ptr - DecodeTable) << '\n'; |
| 1386 | }); |
| 1387 | |
| 1388 | // Perform the filter operation. |
| 1389 | if (Failed) { |
| 1390 | if (IsFail) |
| 1391 | return MCDisassembler::Fail; |
| 1392 | Ptr += NumToSkip; |
| 1393 | } |
| 1394 | break; |
| 1395 | } |
| 1396 | case MCD::OPC_CheckField: |
| 1397 | case MCD::OPC_CheckFieldOrFail: { |
| 1398 | bool IsFail = DecoderOp == MCD::OPC_CheckFieldOrFail; |
| 1399 | // Decode the start value. |
| 1400 | unsigned Start = decodeULEB128AndIncUnsafe(p&: Ptr); |
| 1401 | unsigned Len = *Ptr; |
| 1402 | uint64_t FieldValue = fieldFromInstruction(insn, Start, Len); |
| 1403 | // Decode the field value. |
| 1404 | unsigned PtrLen = 0; |
| 1405 | uint64_t ExpectedValue = decodeULEB128(p: ++Ptr, n: &PtrLen); |
| 1406 | Ptr += PtrLen; |
| 1407 | bool Failed = ExpectedValue != FieldValue; |
| 1408 | unsigned NumToSkip = IsFail ? 0 : decodeNumToSkip(Ptr); |
| 1409 | |
| 1410 | LLVM_DEBUG({ |
| 1411 | StringRef OpName = IsFail ? "OPC_CheckFieldOrFail" : "OPC_CheckField" ; |
| 1412 | dbgs() << Loc << ": " << OpName << '(' << Start << ", " << Len << ", " |
| 1413 | << ExpectedValue << ", " << NumToSkip << "): FieldValue = " |
| 1414 | << FieldValue << ", ExpectedValue = " << ExpectedValue << ": " |
| 1415 | << (Failed ? "FAIL\n" : "PASS\n" ); |
| 1416 | }); |
| 1417 | |
| 1418 | // If the actual and expected values don't match, skip or fail. |
| 1419 | if (Failed) { |
| 1420 | if (IsFail) |
| 1421 | return MCDisassembler::Fail; |
| 1422 | Ptr += NumToSkip; |
| 1423 | } |
| 1424 | break; |
| 1425 | } |
| 1426 | case MCD::OPC_Decode: { |
| 1427 | // Decode the Opcode value. |
| 1428 | unsigned Opc = decodeULEB128AndIncUnsafe(p&: Ptr); |
| 1429 | unsigned DecodeIdx = decodeULEB128AndIncUnsafe(p&: Ptr); |
| 1430 | |
| 1431 | MI.clear(); |
| 1432 | MI.setOpcode(Opc); |
| 1433 | bool DecodeComplete; |
| 1434 | S = decodeToMCInst(DecodeIdx, S, insn, MI, Address, DisAsm, DecodeComplete); |
| 1435 | assert(DecodeComplete); |
| 1436 | |
| 1437 | LLVM_DEBUG(dbgs() << Loc << ": OPC_Decode: opcode " << Opc |
| 1438 | << ", using decoder " << DecodeIdx << ": " |
| 1439 | << (S != MCDisassembler::Fail ? "PASS\n" : "FAIL\n" )); |
| 1440 | return S; |
| 1441 | } |
| 1442 | case MCD::OPC_Fail: { |
| 1443 | LLVM_DEBUG(dbgs() << Loc << ": OPC_Fail\n" ); |
| 1444 | return MCDisassembler::Fail; |
| 1445 | } |
| 1446 | } |
| 1447 | } |
| 1448 | llvm_unreachable("bogosity detected in disassembler state machine!" ); |
| 1449 | } |
| 1450 | |
| 1451 | |
| 1452 | } // namespace |
| 1453 | |