34 #define DEBUG_TYPE "arm-disassembler" 53 void advanceITState() {
58 bool instrInITBlock() {
59 return !ITStates.empty();
63 bool instrLastInITBlock() {
64 return ITStates.size() == 1;
71 void setITState(
char Firstcond,
char Mask) {
73 unsigned NumTZ = countTrailingZeros<uint8_t>(
Mask);
74 unsigned char CCBits =
static_cast<unsigned char>(Firstcond & 0xf);
75 assert(NumTZ <= 3 &&
"Invalid IT mask!");
77 for (
unsigned Pos = NumTZ+1; Pos <= 3; ++Pos) {
78 unsigned Else = (Mask >> Pos) & 1;
79 ITStates.push_back(CCBits ^ Else);
81 ITStates.push_back(CCBits);
85 std::vector<unsigned char> ITStates;
91 unsigned getVPTPred() {
93 if (instrInVPTBlock())
94 Pred = VPTStates.back();
98 void advanceVPTState() {
102 bool instrInVPTBlock() {
103 return !VPTStates.empty();
106 bool instrLastInVPTBlock() {
107 return VPTStates.size() == 1;
110 void setVPTState(
char Mask) {
112 unsigned NumTZ = countTrailingZeros<uint8_t>(
Mask);
113 assert(NumTZ <= 3 &&
"Invalid VPT mask!");
115 for (
unsigned Pos = NumTZ+1; Pos <= 3; ++Pos) {
116 bool T = ((Mask >> Pos) & 1) == 0;
136 ~ARMDisassembler()
override =
default;
151 mutable ITStatus ITBlock;
152 mutable VPTStatus VPTBlock;
178 uint64_t
Address,
const void *Decoder);
180 uint64_t
Address,
const void *Decoder);
182 uint64_t
Address,
const void *Decoder);
184 uint64_t
Address,
const void *Decoder);
186 unsigned RegNo, uint64_t
Address,
187 const void *Decoder);
189 unsigned RegNo, uint64_t
Address,
190 const void *Decoder);
192 unsigned RegNo, uint64_t
Address,
193 const void *Decoder);
195 MCInst &Inst,
unsigned RegNo, uint64_t
Address,
const void *Decoder);
197 uint64_t
Address,
const void *Decoder);
199 uint64_t
Address,
const void *Decoder);
201 uint64_t
Address,
const void *Decoder);
203 uint64_t
Address,
const void *Decoder);
206 const void *Decoder);
208 uint64_t
Address,
const void *Decoder);
210 uint64_t
Address,
const void *Decoder);
212 uint64_t
Address,
const void *Decoder);
214 uint64_t
Address,
const void *Decoder);
216 uint64_t
Address,
const void *Decoder);
220 const void *Decoder);
222 uint64_t
Address,
const void *Decoder);
224 uint64_t
Address,
const void *Decoder);
226 uint64_t
Address,
const void *Decoder);
228 uint64_t
Address,
const void *Decoder);
230 uint64_t
Address,
const void *Decoder);
232 unsigned RegNo, uint64_t
Address,
233 const void *Decoder);
236 uint64_t
Address,
const void *Decoder);
238 uint64_t
Address,
const void *Decoder);
240 uint64_t
Address,
const void *Decoder);
242 uint64_t
Address,
const void *Decoder);
244 uint64_t
Address,
const void *Decoder);
247 uint64_t
Address,
const void *Decoder);
249 uint64_t
Address,
const void *Decoder);
253 const void *Decoder);
255 uint64_t
Address,
const void *Decoder);
257 uint64_t
Address,
const void *Decoder);
259 uint64_t
Address,
const void *Decoder);
261 uint64_t
Address,
const void *Decoder);
266 const void *Decoder);
268 uint64_t
Address,
const void *Decoder);
270 uint64_t
Address,
const void *Decoder);
272 uint64_t
Address,
const void *Decoder);
274 uint64_t
Address,
const void *Decoder);
276 uint64_t
Address,
const void *Decoder);
278 uint64_t
Address,
const void *Decoder);
280 uint64_t
Address,
const void *Decoder);
282 uint64_t
Address,
const void *Decoder);
284 uint64_t
Address,
const void *Decoder);
286 uint64_t
Address,
const void *Decoder);
288 uint64_t
Address,
const void *Decoder);
290 uint64_t
Address,
const void *Decoder);
292 uint64_t
Address,
const void *Decoder);
294 uint64_t
Address,
const void *Decoder);
296 uint64_t
Address,
const void *Decoder);
298 uint64_t
Address,
const void *Decoder);
300 uint64_t
Address,
const void *Decoder);
302 uint64_t
Address,
const void *Decoder);
304 uint64_t
Address,
const void *Decoder);
306 uint64_t
Address,
const void *Decoder);
308 uint64_t
Address,
const void *Decoder);
310 uint64_t
Address,
const void *Decoder);
312 uint64_t
Address,
const void *Decoder);
314 uint64_t
Address,
const void *Decoder);
316 uint64_t
Address,
const void *Decoder);
318 uint64_t
Address,
const void *Decoder);
320 uint64_t
Address,
const void *Decoder);
322 uint64_t
Address,
const void *Decoder);
324 uint64_t
Address,
const void *Decoder);
326 uint64_t
Address,
const void *Decoder);
328 uint64_t
Address,
const void *Decoder);
330 uint64_t
Address,
const void *Decoder);
332 uint64_t
Address,
const void *Decoder);
334 uint64_t
Address,
const void *Decoder);
336 uint64_t
Address,
const void *Decoder);
338 uint64_t
Address,
const void *Decoder);
341 uint64_t
Address,
const void *Decoder);
343 uint64_t
Address,
const void *Decoder);
345 uint64_t
Address,
const void *Decoder);
347 uint64_t
Address,
const void *Decoder);
349 uint64_t
Address,
const void *Decoder);
351 uint64_t
Address,
const void *Decoder);
353 uint64_t
Address,
const void *Decoder);
355 uint64_t
Address,
const void *Decoder);
357 uint64_t
Address,
const void *Decoder);
359 uint64_t
Address,
const void *Decoder);
361 uint64_t
Address,
const void *Decoder);
363 uint64_t
Address,
const void *Decoder);
365 uint64_t
Address,
const void *Decoder);
367 uint64_t
Address,
const void *Decoder);
369 uint64_t
Address,
const void *Decoder);
371 uint64_t
Address,
const void *Decoder);
373 uint64_t
Address,
const void *Decoder);
375 uint64_t
Address,
const void *Decoder);
377 uint64_t
Address,
const void *Decoder);
379 uint64_t
Address,
const void *Decoder);
381 uint64_t
Address,
const void *Decoder);
383 uint64_t
Address,
const void *Decoder);
385 uint64_t
Address,
const void *Decoder);
387 uint64_t
Address,
const void *Decoder);
389 uint64_t
Address,
const void *Decoder);
391 uint64_t
Address,
const void *Decoder);
395 const void *Decoder);
398 uint64_t
Address,
const void *Decoder);
400 uint64_t
Address,
const void *Decoder);
402 uint64_t
Address,
const void *Decoder);
404 uint64_t
Address,
const void *Decoder);
406 uint64_t
Address,
const void *Decoder);
408 uint64_t
Address,
const void *Decoder);
410 uint64_t
Address,
const void *Decoder);
412 uint64_t
Address,
const void *Decoder);
414 uint64_t
Address,
const void *Decoder);
416 uint64_t
Address,
const void *Decoder);
418 uint64_t
Address,
const void* Decoder);
420 uint64_t
Address,
const void* Decoder);
422 uint64_t
Address,
const void* Decoder);
424 uint64_t
Address,
const void* Decoder);
426 uint64_t
Address,
const void *Decoder);
428 uint64_t
Address,
const void *Decoder);
430 uint64_t
Address,
const void *Decoder);
433 const void *Decoder);
435 uint64_t
Address,
const void *Decoder);
437 uint64_t
Address,
const void *Decoder);
440 uint64_t
Address,
const void *Decoder);
442 uint64_t
Address,
const void *Decoder);
445 uint64_t
Address,
const void *Decoder);
446 template<
int shift,
int WriteBack>
448 uint64_t
Address,
const void *Decoder);
450 uint64_t
Address,
const void *Decoder);
452 uint64_t
Address,
const void *Decoder);
454 uint64_t
Address,
const void *Decoder);
456 uint64_t
Address,
const void *Decoder);
458 uint64_t
Address,
const void *Decoder);
460 uint64_t
Address,
const void *Decoder);
462 uint64_t
Address,
const void *Decoder);
464 uint64_t
Address,
const void *Decoder);
466 uint64_t
Address,
const void *Decoder);
468 uint64_t
Address,
const void *Decoder);
470 uint64_t
Address,
const void *Decoder);
472 uint64_t
Address,
const void *Decoder);
474 uint64_t
Address,
const void *Decoder);
476 uint64_t
Address,
const void *Decoder);
478 uint64_t
Address,
const void *Decoder);
480 uint64_t
Address,
const void *Decoder);
482 uint64_t
Address,
const void *Decoder);
485 uint64_t
Address,
const void *Decoder);
487 uint64_t
Address,
const void *Decoder);
489 uint64_t
Address,
const void *Decoder);
491 template <
bool isSigned,
bool isNeg,
bool zeroPermitted,
int size>
493 uint64_t
Address,
const void *Decoder);
496 const void *Decoder);
499 const void *Decoder);
501 const void *Decoder);
504 const void *Decoder);
506 const void *Decoder);
508 uint64_t
Address,
const void *Decoder);
510 uint64_t
Address,
const void *Decoder);
513 const void *Decoder);
516 const void *Decoder);
519 const void *Decoder);
523 const void *Decoder);
524 template<
bool Writeback>
527 const void *Decoder);
530 uint64_t
Address,
const void *Decoder);
533 uint64_t
Address,
const void *Decoder);
536 uint64_t
Address,
const void *Decoder);
537 template<
unsigned MinLog,
unsigned MaxLog>
540 const void *Decoder);
544 const void *Decoder);
545 template<
unsigned start>
548 const void *Decoder);
551 const void *Decoder);
554 const void *Decoder);
556 uint64_t
Address,
const void *Decoder);
558 uint64_t
Address,
const void *Decoder);
559 template<
bool scalar, OperandDecoder predicate_decoder>
561 uint64_t
Address,
const void *Decoder);
563 uint64_t
Address,
const void *Decoder);
565 uint64_t
Address,
const void *Decoder);
568 const void *Decoder);
570 uint64_t
Address,
const void *Decoder);
572 #include "ARMGenDisassemblerTables.inc" 577 return new ARMDisassembler(STI, Ctx);
608 default:
return Result;
616 if (STI.getFeatureBits()[ARM::ModeThumb])
617 return getThumbInstruction(MI,
Size, Bytes,
Address, CS);
618 return getARMInstruction(MI,
Size, Bytes,
Address, CS);
627 assert(!STI.getFeatureBits()[ARM::ModeThumb] &&
628 "Asked to disassemble an ARM instruction but Subtarget is in Thumb " 632 if (Bytes.
size() < 4) {
639 (Bytes[3] << 24) | (Bytes[2] << 16) | (Bytes[1] << 8) | (Bytes[0] << 0);
643 decodeInstruction(DecoderTableARM32, MI, Insn,
Address,
this, STI);
654 const DecodeTable Tables[] = {
655 {DecoderTableVFP32,
false}, {DecoderTableVFPV832,
false},
656 {DecoderTableNEONData32,
true}, {DecoderTableNEONLoadStore32,
true},
657 {DecoderTableNEONDup32,
true}, {DecoderTablev8NEON32,
false},
658 {DecoderTablev8Crypto32,
false},
661 for (
auto Table : Tables) {
662 Result = decodeInstruction(Table.P, MI, Insn,
Address,
this, STI);
674 decodeInstruction(DecoderTableCoProc32, MI, Insn,
Address,
this, STI);
704 MCInst &MI,
const void *Decoder) {
721 const void *Decoder) {
734 for (
unsigned i = 0; i < NumOps; ++i, ++
I) {
735 if (I == MI.
end())
break;
736 if (OpInfo[i].isOptionalDef() && OpInfo[i].
RegClass == ARM::CCRRegClassID) {
737 if (i > 0 && OpInfo[i-1].isPredicate())
continue;
749 for (
unsigned i = 0; i < NumOps; ++i) {
761 ARMDisassembler::AddThumbPredicate(
MCInst &MI)
const {
764 const FeatureBitset &FeatureBits = getSubtargetInfo().getFeatureBits();
785 if (ITBlock.instrInITBlock())
791 if (MI.
getOperand(0).
getImm() == 0x10 && (FeatureBits[ARM::FeatureRAS]) != 0)
800 if (ITBlock.instrInITBlock() && !ITBlock.instrLastInITBlock())
817 if (ITBlock.instrInITBlock()) {
818 CC = ITBlock.getITCC();
819 ITBlock.advanceITState();
820 }
else if (VPTBlock.instrInVPTBlock()) {
821 VCC = VPTBlock.getVPTPred();
822 VPTBlock.advanceVPTState();
829 for (
unsigned i = 0; i < NumOps; ++i, ++CCI) {
830 if (OpInfo[i].isPredicate() || CCI == MI.
end())
break;
846 for (VCCPos = 0; VCCPos < NumOps; ++VCCPos, ++VCCI) {
861 "Inactive register in vpred_r is not tied to an output!");
876 void ARMDisassembler::UpdateThumbVFPPredicate(
879 CC = ITBlock.getITCC();
882 if (ITBlock.instrInITBlock())
883 ITBlock.advanceITState();
884 else if (VPTBlock.instrInVPTBlock()) {
885 CC = VPTBlock.getVPTPred();
886 VPTBlock.advanceVPTState();
892 for (
unsigned i = 0; i < NumOps; ++i, ++
I) {
893 if (OpInfo[i].isPredicate() ) {
901 I->setReg(ARM::CPSR);
913 assert(STI.getFeatureBits()[ARM::ModeThumb] &&
914 "Asked to disassemble in Thumb mode but Subtarget is in ARM mode!");
917 if (Bytes.
size() < 2) {
922 uint16_t Insn16 = (Bytes[1] << 8) | Bytes[0];
924 decodeInstruction(DecoderTableThumb16, MI, Insn16,
Address,
this, STI);
927 Check(Result, AddThumbPredicate(MI));
931 Result = decodeInstruction(DecoderTableThumbSBit16, MI, Insn16,
Address,
this,
935 bool InITBlock = ITBlock.instrInITBlock();
936 Check(Result, AddThumbPredicate(MI));
942 decodeInstruction(DecoderTableThumb216, MI, Insn16,
Address,
this, STI);
948 if (MI.
getOpcode() == ARM::t2IT && ITBlock.instrInITBlock())
951 Check(Result, AddThumbPredicate(MI));
959 ITBlock.setITState(Firstcond, Mask);
963 CS <<
"unpredictable IT predicate sequence";
970 if (Bytes.
size() < 4) {
976 (Bytes[3] << 8) | (Bytes[2] << 0) | (Bytes[1] << 24) | (Bytes[0] << 16);
979 decodeInstruction(DecoderTableMVE32, MI, Insn32,
Address,
this, STI);
988 Check(Result, AddThumbPredicate(MI));
992 VPTBlock.setVPTState(Mask);
999 decodeInstruction(DecoderTableThumb32, MI, Insn32,
Address,
this, STI);
1002 bool InITBlock = ITBlock.instrInITBlock();
1003 Check(Result, AddThumbPredicate(MI));
1009 decodeInstruction(DecoderTableThumb232, MI, Insn32,
Address,
this, STI);
1012 Check(Result, AddThumbPredicate(MI));
1016 if (fieldFromInstruction(Insn32, 28, 4) == 0xE) {
1018 decodeInstruction(DecoderTableVFP32, MI, Insn32,
Address,
this, STI);
1021 UpdateThumbVFPPredicate(Result, MI);
1027 decodeInstruction(DecoderTableVFPV832, MI, Insn32,
Address,
this, STI);
1033 if (fieldFromInstruction(Insn32, 28, 4) == 0xE) {
1034 Result = decodeInstruction(DecoderTableNEONDup32, MI, Insn32,
Address,
this,
1038 Check(Result, AddThumbPredicate(MI));
1043 if (fieldFromInstruction(Insn32, 24, 8) == 0xF9) {
1045 NEONLdStInsn &= 0xF0FFFFFF;
1046 NEONLdStInsn |= 0x04000000;
1047 Result = decodeInstruction(DecoderTableNEONLoadStore32, MI, NEONLdStInsn,
1051 Check(Result, AddThumbPredicate(MI));
1056 if (fieldFromInstruction(Insn32, 24, 4) == 0xF) {
1058 NEONDataInsn &= 0xF0FFFFFF;
1059 NEONDataInsn |= (NEONDataInsn & 0x10000000) >> 4;
1060 NEONDataInsn |= 0x12000000;
1061 Result = decodeInstruction(DecoderTableNEONData32, MI, NEONDataInsn,
1065 Check(Result, AddThumbPredicate(MI));
1070 NEONCryptoInsn &= 0xF0FFFFFF;
1071 NEONCryptoInsn |= (NEONCryptoInsn & 0x10000000) >> 4;
1072 NEONCryptoInsn |= 0x12000000;
1073 Result = decodeInstruction(DecoderTablev8Crypto32, MI, NEONCryptoInsn,
1081 NEONv8Insn &= 0xF3FFFFFF;
1082 Result = decodeInstruction(DecoderTablev8NEON32, MI, NEONv8Insn,
Address,
1091 decodeInstruction(DecoderTableThumb2CoProc32, MI, Insn32,
Address,
this, STI);
1094 Check(Result, AddThumbPredicate(MI));
1114 ARM::R0, ARM::R1,
ARM::R2, ARM::R3,
1116 ARM::R8, ARM::R9, ARM::R10, ARM::R11,
1117 ARM::R12, ARM::SP, ARM::LR, ARM::PC
1121 ARM::R0, ARM::R1,
ARM::R2, ARM::R3,
1123 ARM::R8, ARM::R9, ARM::R10, ARM::R11,
1124 ARM::R12, 0, ARM::LR, ARM::APSR
1128 uint64_t
Address,
const void *Decoder) {
1132 unsigned Register = GPRDecoderTable[RegNo];
1139 const void *Decoder) {
1143 unsigned Register = CLRMGPRDecoderTable[RegNo];
1153 uint64_t
Address,
const void *Decoder) {
1166 uint64_t
Address,
const void *Decoder) {
1181 uint64_t
Address,
const void *Decoder) {
1199 uint64_t
Address,
const void *Decoder) {
1208 uint64_t
Address,
const void *Decoder) {
1215 ARM::R0_R1, ARM::R2_R3, ARM::R4_R5, ARM::R6_R7,
1216 ARM::R8_R9, ARM::R10_R11, ARM::R12_SP
1220 uint64_t
Address,
const void *Decoder) {
1226 if ((RegNo & 1) || RegNo == 0xe)
1229 unsigned RegisterPair = GPRPairDecoderTable[RegNo/2];
1236 const void *Decoder) {
1240 unsigned Register = GPRDecoderTable[RegNo];
1246 uint64_t
Address,
const void *Decoder) {
1265 Register = ARM::R12;
1276 uint64_t
Address,
const void *Decoder) {
1280 ((
const MCDisassembler*)Decoder)->getSubtargetInfo().getFeatureBits();
1282 if ((RegNo == 13 && !featureBits[ARM::HasV8Ops]) || RegNo == 15)
1290 ARM::S0, ARM::S1, ARM::S2, ARM::S3,
1291 ARM::S4, ARM::S5, ARM::S6, ARM::S7,
1292 ARM::S8, ARM::S9, ARM::S10, ARM::S11,
1293 ARM::S12, ARM::S13, ARM::S14, ARM::S15,
1294 ARM::S16, ARM::S17, ARM::S18, ARM::S19,
1295 ARM::S20, ARM::S21, ARM::S22, ARM::S23,
1296 ARM::S24, ARM::S25, ARM::S26, ARM::S27,
1297 ARM::S28, ARM::S29, ARM::S30, ARM::S31
1301 uint64_t
Address,
const void *Decoder) {
1305 unsigned Register = SPRDecoderTable[RegNo];
1311 uint64_t
Address,
const void *Decoder) {
1316 ARM::D0, ARM::D1, ARM::D2, ARM::D3,
1317 ARM::D4, ARM::D5, ARM::D6, ARM::D7,
1318 ARM::D8, ARM::D9, ARM::D10, ARM::D11,
1319 ARM::D12, ARM::D13, ARM::D14, ARM::D15,
1320 ARM::D16, ARM::D17, ARM::D18, ARM::D19,
1321 ARM::D20, ARM::D21, ARM::D22, ARM::D23,
1322 ARM::D24, ARM::D25, ARM::D26, ARM::D27,
1323 ARM::D28, ARM::D29, ARM::D30, ARM::D31
1327 uint64_t
Address,
const void *Decoder) {
1329 ((
const MCDisassembler*)Decoder)->getSubtargetInfo().getFeatureBits();
1331 bool hasD32 = featureBits[ARM::FeatureD32];
1333 if (RegNo > 31 || (!hasD32 && RegNo > 15))
1336 unsigned Register = DPRDecoderTable[RegNo];
1342 uint64_t
Address,
const void *Decoder) {
1349 uint64_t
Address,
const void *Decoder) {
1357 uint64_t
Address,
const void *Decoder) {
1364 ARM::Q0, ARM::Q1, ARM::Q2, ARM::Q3,
1365 ARM::Q4, ARM::Q5, ARM::Q6, ARM::Q7,
1366 ARM::Q8, ARM::Q9, ARM::Q10, ARM::Q11,
1367 ARM::Q12, ARM::Q13, ARM::Q14, ARM::Q15
1371 uint64_t
Address,
const void *Decoder) {
1372 if (RegNo > 31 || (RegNo & 1) != 0)
1376 unsigned Register = QPRDecoderTable[RegNo];
1382 ARM::Q0, ARM::D1_D2, ARM::Q1, ARM::D3_D4, ARM::Q2, ARM::D5_D6,
1383 ARM::Q3, ARM::D7_D8, ARM::Q4, ARM::D9_D10, ARM::Q5, ARM::D11_D12,
1384 ARM::Q6, ARM::D13_D14, ARM::Q7, ARM::D15_D16, ARM::Q8, ARM::D17_D18,
1385 ARM::Q9, ARM::D19_D20, ARM::Q10, ARM::D21_D22, ARM::Q11, ARM::D23_D24,
1386 ARM::Q12, ARM::D25_D26, ARM::Q13, ARM::D27_D28, ARM::Q14, ARM::D29_D30,
1391 uint64_t
Address,
const void *Decoder) {
1395 unsigned Register = DPairDecoderTable[RegNo];
1401 ARM::D0_D2, ARM::D1_D3, ARM::D2_D4, ARM::D3_D5,
1402 ARM::D4_D6, ARM::D5_D7, ARM::D6_D8, ARM::D7_D9,
1403 ARM::D8_D10, ARM::D9_D11, ARM::D10_D12, ARM::D11_D13,
1404 ARM::D12_D14, ARM::D13_D15, ARM::D14_D16, ARM::D15_D17,
1405 ARM::D16_D18, ARM::D17_D19, ARM::D18_D20, ARM::D19_D21,
1406 ARM::D20_D22, ARM::D21_D23, ARM::D22_D24, ARM::D23_D25,
1407 ARM::D24_D26, ARM::D25_D27, ARM::D26_D28, ARM::D27_D29,
1408 ARM::D28_D30, ARM::D29_D31
1414 const void *Decoder) {
1418 unsigned Register = DPairSpacedDecoderTable[RegNo];
1424 uint64_t
Address,
const void *Decoder) {
1428 if (Inst.
getOpcode() == ARM::tBcc && Val == 0xE)
1441 uint64_t
Address,
const void *Decoder) {
1450 uint64_t
Address,
const void *Decoder) {
1453 unsigned Rm = fieldFromInstruction(Val, 0, 4);
1454 unsigned type = fieldFromInstruction(Val, 5, 2);
1455 unsigned imm = fieldFromInstruction(Val, 7, 5);
1480 unsigned Op = Shift | (imm << 3);
1487 uint64_t
Address,
const void *Decoder) {
1490 unsigned Rm = fieldFromInstruction(Val, 0, 4);
1491 unsigned type = fieldFromInstruction(Val, 5, 2);
1492 unsigned Rs = fieldFromInstruction(Val, 8, 4);
1522 uint64_t
Address,
const void *Decoder) {
1525 bool NeedDisjointWriteback =
false;
1526 unsigned WritebackReg = 0;
1531 case ARM::LDMIA_UPD:
1532 case ARM::LDMDB_UPD:
1533 case ARM::LDMIB_UPD:
1534 case ARM::LDMDA_UPD:
1535 case ARM::t2LDMIA_UPD:
1536 case ARM::t2LDMDB_UPD:
1537 case ARM::t2STMIA_UPD:
1538 case ARM::t2STMDB_UPD:
1539 NeedDisjointWriteback =
true;
1549 for (
unsigned i = 0; i < 16; ++i) {
1550 if (Val & (1 << i)) {
1559 if (NeedDisjointWriteback && WritebackReg == Inst.
end()[-1].getReg())
1569 uint64_t
Address,
const void *Decoder) {
1572 unsigned Vd = fieldFromInstruction(Val, 8, 5);
1573 unsigned regs = fieldFromInstruction(Val, 0, 8);
1576 if (regs == 0 || (Vd + regs) > 32) {
1577 regs = Vd + regs > 32 ? 32 - Vd : regs;
1584 for (
unsigned i = 0; i < (regs - 1); ++i) {
1593 uint64_t
Address,
const void *Decoder) {
1596 unsigned Vd = fieldFromInstruction(Val, 8, 5);
1597 unsigned regs = fieldFromInstruction(Val, 1, 7);
1600 if (regs == 0 || regs > 16 || (Vd + regs) > 32) {
1601 regs = Vd + regs > 32 ? 32 - Vd : regs;
1603 regs = std::min(16u, regs);
1609 for (
unsigned i = 0; i < (regs - 1); ++i) {
1618 uint64_t
Address,
const void *Decoder) {
1624 unsigned msb = fieldFromInstruction(Val, 5, 5);
1625 unsigned lsb = fieldFromInstruction(Val, 0, 5);
1637 if (msb != 31) msb_mask = (1U << (msb+1)) - 1;
1638 uint32_t lsb_mask = (1U << lsb) - 1;
1645 uint64_t
Address,
const void *Decoder) {
1648 unsigned pred = fieldFromInstruction(Insn, 28, 4);
1649 unsigned CRd = fieldFromInstruction(Insn, 12, 4);
1650 unsigned coproc = fieldFromInstruction(Insn, 8, 4);
1651 unsigned imm = fieldFromInstruction(Insn, 0, 8);
1652 unsigned Rn = fieldFromInstruction(Insn, 16, 4);
1653 unsigned U = fieldFromInstruction(Insn, 23, 1);
1655 ((
const MCDisassembler*)Decoder)->getSubtargetInfo().getFeatureBits();
1658 case ARM::LDC_OFFSET:
1661 case ARM::LDC_OPTION:
1662 case ARM::LDCL_OFFSET:
1664 case ARM::LDCL_POST:
1665 case ARM::LDCL_OPTION:
1666 case ARM::STC_OFFSET:
1669 case ARM::STC_OPTION:
1670 case ARM::STCL_OFFSET:
1672 case ARM::STCL_POST:
1673 case ARM::STCL_OPTION:
1674 case ARM::t2LDC_OFFSET:
1675 case ARM::t2LDC_PRE:
1676 case ARM::t2LDC_POST:
1677 case ARM::t2LDC_OPTION:
1678 case ARM::t2LDCL_OFFSET:
1679 case ARM::t2LDCL_PRE:
1680 case ARM::t2LDCL_POST:
1681 case ARM::t2LDCL_OPTION:
1682 case ARM::t2STC_OFFSET:
1683 case ARM::t2STC_PRE:
1684 case ARM::t2STC_POST:
1685 case ARM::t2STC_OPTION:
1686 case ARM::t2STCL_OFFSET:
1687 case ARM::t2STCL_PRE:
1688 case ARM::t2STCL_POST:
1689 case ARM::t2STCL_OPTION:
1690 case ARM::t2LDC2_OFFSET:
1691 case ARM::t2LDC2L_OFFSET:
1692 case ARM::t2LDC2_PRE:
1693 case ARM::t2LDC2L_PRE:
1694 case ARM::t2STC2_OFFSET:
1695 case ARM::t2STC2L_OFFSET:
1696 case ARM::t2STC2_PRE:
1697 case ARM::t2STC2L_PRE:
1698 case ARM::LDC2_OFFSET:
1699 case ARM::LDC2L_OFFSET:
1701 case ARM::LDC2L_PRE:
1702 case ARM::STC2_OFFSET:
1703 case ARM::STC2L_OFFSET:
1705 case ARM::STC2L_PRE:
1706 case ARM::t2LDC2_OPTION:
1707 case ARM::t2STC2_OPTION:
1708 case ARM::t2LDC2_POST:
1709 case ARM::t2LDC2L_POST:
1710 case ARM::t2STC2_POST:
1711 case ARM::t2STC2L_POST:
1712 case ARM::LDC2_POST:
1713 case ARM::LDC2L_POST:
1714 case ARM::STC2_POST:
1715 case ARM::STC2L_POST:
1716 if (coproc == 0xA || coproc == 0xB ||
1717 (featureBits[ARM::HasV8_1MMainlineOps] &&
1718 (coproc == 0x8 || coproc == 0x9 || coproc == 0xA || coproc == 0xB ||
1719 coproc == 0xE || coproc == 0xF)))
1726 if (featureBits[ARM::HasV8Ops] && (coproc != 14))
1735 case ARM::t2LDC2_OFFSET:
1736 case ARM::t2LDC2L_OFFSET:
1737 case ARM::t2LDC2_PRE:
1738 case ARM::t2LDC2L_PRE:
1739 case ARM::t2STC2_OFFSET:
1740 case ARM::t2STC2L_OFFSET:
1741 case ARM::t2STC2_PRE:
1742 case ARM::t2STC2L_PRE:
1743 case ARM::LDC2_OFFSET:
1744 case ARM::LDC2L_OFFSET:
1746 case ARM::LDC2L_PRE:
1747 case ARM::STC2_OFFSET:
1748 case ARM::STC2L_OFFSET:
1750 case ARM::STC2L_PRE:
1751 case ARM::t2LDC_OFFSET:
1752 case ARM::t2LDCL_OFFSET:
1753 case ARM::t2LDC_PRE:
1754 case ARM::t2LDCL_PRE:
1755 case ARM::t2STC_OFFSET:
1756 case ARM::t2STCL_OFFSET:
1757 case ARM::t2STC_PRE:
1758 case ARM::t2STCL_PRE:
1759 case ARM::LDC_OFFSET:
1760 case ARM::LDCL_OFFSET:
1763 case ARM::STC_OFFSET:
1764 case ARM::STCL_OFFSET:
1770 case ARM::t2LDC2_POST:
1771 case ARM::t2LDC2L_POST:
1772 case ARM::t2STC2_POST:
1773 case ARM::t2STC2L_POST:
1774 case ARM::LDC2_POST:
1775 case ARM::LDC2L_POST:
1776 case ARM::STC2_POST:
1777 case ARM::STC2L_POST:
1778 case ARM::t2LDC_POST:
1779 case ARM::t2LDCL_POST:
1780 case ARM::t2STC_POST:
1781 case ARM::t2STCL_POST:
1783 case ARM::LDCL_POST:
1785 case ARM::STCL_POST:
1796 case ARM::LDC_OFFSET:
1799 case ARM::LDC_OPTION:
1800 case ARM::LDCL_OFFSET:
1802 case ARM::LDCL_POST:
1803 case ARM::LDCL_OPTION:
1804 case ARM::STC_OFFSET:
1807 case ARM::STC_OPTION:
1808 case ARM::STCL_OFFSET:
1810 case ARM::STCL_POST:
1811 case ARM::STCL_OPTION:
1824 uint64_t
Address,
const void *Decoder) {
1827 unsigned Rn = fieldFromInstruction(Insn, 16, 4);
1828 unsigned Rt = fieldFromInstruction(Insn, 12, 4);
1829 unsigned Rm = fieldFromInstruction(Insn, 0, 4);
1830 unsigned imm = fieldFromInstruction(Insn, 0, 12);
1831 unsigned pred = fieldFromInstruction(Insn, 28, 4);
1832 unsigned reg = fieldFromInstruction(Insn, 25, 1);
1833 unsigned P = fieldFromInstruction(Insn, 24, 1);
1834 unsigned W = fieldFromInstruction(Insn, 21, 1);
1838 case ARM::STR_POST_IMM:
1839 case ARM::STR_POST_REG:
1840 case ARM::STRB_POST_IMM:
1841 case ARM::STRB_POST_REG:
1842 case ARM::STRT_POST_REG:
1843 case ARM::STRT_POST_IMM:
1844 case ARM::STRBT_POST_REG:
1845 case ARM::STRBT_POST_IMM:
1858 case ARM::LDR_POST_IMM:
1859 case ARM::LDR_POST_REG:
1860 case ARM::LDRB_POST_IMM:
1861 case ARM::LDRB_POST_REG:
1862 case ARM::LDRBT_POST_REG:
1863 case ARM::LDRBT_POST_IMM:
1864 case ARM::LDRT_POST_REG:
1865 case ARM::LDRT_POST_IMM:
1877 if (!fieldFromInstruction(Insn, 23, 1))
1880 bool writeback = (P == 0) || (W == 1);
1881 unsigned idx_mode = 0;
1884 else if (!P && writeback)
1887 if (writeback && (Rn == 15 || Rn == Rt))
1894 switch( fieldFromInstruction(Insn, 5, 2)) {
1910 unsigned amt = fieldFromInstruction(Insn, 7, 5);
1929 uint64_t
Address,
const void *Decoder) {
1932 unsigned Rn = fieldFromInstruction(Val, 13, 4);
1933 unsigned Rm = fieldFromInstruction(Val, 0, 4);
1934 unsigned type = fieldFromInstruction(Val, 5, 2);
1935 unsigned imm = fieldFromInstruction(Val, 7, 5);
1936 unsigned U = fieldFromInstruction(Val, 12, 1);
1973 uint64_t
Address,
const void *Decoder) {
1976 unsigned Rt = fieldFromInstruction(Insn, 12, 4);
1977 unsigned Rn = fieldFromInstruction(Insn, 16, 4);
1978 unsigned Rm = fieldFromInstruction(Insn, 0, 4);
1979 unsigned type = fieldFromInstruction(Insn, 22, 1);
1980 unsigned imm = fieldFromInstruction(Insn, 8, 4);
1981 unsigned U = ((~fieldFromInstruction(Insn, 23, 1)) & 1) << 8;
1982 unsigned pred = fieldFromInstruction(Insn, 28, 4);
1983 unsigned W = fieldFromInstruction(Insn, 21, 1);
1984 unsigned P = fieldFromInstruction(Insn, 24, 1);
1985 unsigned Rt2 = Rt + 1;
1987 bool writeback = (W == 1) | (P == 0);
1993 case ARM::STRD_POST:
1996 case ARM::LDRD_POST:
2005 case ARM::STRD_POST:
2006 if (P == 0 && W == 1)
2009 if (writeback && (Rn == 15 || Rn == Rt || Rn == Rt2))
2011 if (type && Rm == 15)
2015 if (!type && fieldFromInstruction(Insn, 8, 4))
2020 case ARM::STRH_POST:
2023 if (writeback && (Rn == 15 || Rn == Rt))
2025 if (!type && Rm == 15)
2030 case ARM::LDRD_POST:
2031 if (type && Rn == 15) {
2036 if (P == 0 && W == 1)
2038 if (!type && (Rt2 == 15 || Rm == 15 || Rm == Rt || Rm == Rt2))
2040 if (!type && writeback && Rn == 15)
2042 if (writeback && (Rn == Rt || Rn == Rt2))
2047 case ARM::LDRH_POST:
2048 if (type && Rn == 15) {
2055 if (!type && Rm == 15)
2057 if (!type && writeback && (Rn == 15 || Rn == Rt))
2061 case ARM::LDRSH_PRE:
2062 case ARM::LDRSH_POST:
2064 case ARM::LDRSB_PRE:
2065 case ARM::LDRSB_POST:
2066 if (type && Rn == 15) {
2071 if (type && (Rt == 15 || (writeback && Rn == Rt)))
2073 if (!type && (Rt == 15 || Rm == 15))
2075 if (!type && writeback && (Rn == 15 || Rn == Rt))
2092 case ARM::STRD_POST:
2095 case ARM::STRH_POST:
2109 case ARM::STRD_POST:
2112 case ARM::LDRD_POST:
2125 case ARM::LDRD_POST:
2128 case ARM::LDRH_POST:
2130 case ARM::LDRSH_PRE:
2131 case ARM::LDRSH_POST:
2133 case ARM::LDRSB_PRE:
2134 case ARM::LDRSB_POST:
2164 uint64_t
Address,
const void *Decoder) {
2167 unsigned Rn = fieldFromInstruction(Insn, 16, 4);
2168 unsigned mode = fieldFromInstruction(Insn, 23, 2);
2193 uint64_t
Address,
const void *Decoder) {
2196 unsigned Rd = fieldFromInstruction(Insn, 12, 4);
2197 unsigned Rm = fieldFromInstruction(Insn, 0, 4);
2198 unsigned Rn = fieldFromInstruction(Insn, 16, 4);
2199 unsigned pred = fieldFromInstruction(Insn, 28, 4);
2217 uint64_t
Address,
const void *Decoder) {
2220 unsigned Rn = fieldFromInstruction(Insn, 16, 4);
2221 unsigned pred = fieldFromInstruction(Insn, 28, 4);
2222 unsigned reglist = fieldFromInstruction(Insn, 0, 16);
2230 case ARM::LDMDA_UPD:
2236 case ARM::LDMDB_UPD:
2242 case ARM::LDMIA_UPD:
2248 case ARM::LDMIB_UPD:
2254 case ARM::STMDA_UPD:
2260 case ARM::STMDB_UPD:
2266 case ARM::STMIA_UPD:
2272 case ARM::STMIB_UPD:
2280 if (fieldFromInstruction(Insn, 20, 1) == 0) {
2282 if (!(fieldFromInstruction(Insn, 22, 1) == 1 &&
2283 fieldFromInstruction(Insn, 20, 1) == 0))
2308 uint64_t
Address,
const void *Decoder) {
2309 unsigned pred = fieldFromInstruction(Insn, 28, 4);
2310 unsigned imm8 = fieldFromInstruction(Insn, 0, 8);
2323 if (imm8 == 0x10 && pred != 0xe && ((FeatureBits[ARM::FeatureRAS]) != 0))
2330 uint64_t
Address,
const void *Decoder) {
2331 unsigned imod = fieldFromInstruction(Insn, 18, 2);
2332 unsigned M = fieldFromInstruction(Insn, 17, 1);
2333 unsigned iflags = fieldFromInstruction(Insn, 6, 3);
2334 unsigned mode = fieldFromInstruction(Insn, 0, 5);
2340 if (fieldFromInstruction(Insn, 5, 1) != 0 ||
2341 fieldFromInstruction(Insn, 16, 1) != 0 ||
2342 fieldFromInstruction(Insn, 20, 8) != 0x10)
2357 }
else if (imod && !M) {
2362 }
else if (!imod && M) {
2377 uint64_t
Address,
const void *Decoder) {
2378 unsigned imod = fieldFromInstruction(Insn, 9, 2);
2379 unsigned M = fieldFromInstruction(Insn, 8, 1);
2380 unsigned iflags = fieldFromInstruction(Insn, 5, 3);
2381 unsigned mode = fieldFromInstruction(Insn, 0, 5);
2397 }
else if (imod && !M) {
2402 }
else if (!imod && M) {
2408 int imm = fieldFromInstruction(Insn, 0, 8);
2419 uint64_t
Address,
const void *Decoder) {
2422 unsigned Rd = fieldFromInstruction(Insn, 8, 4);
2425 imm |= (fieldFromInstruction(Insn, 0, 8) << 0);
2426 imm |= (fieldFromInstruction(Insn, 12, 3) << 8);
2427 imm |= (fieldFromInstruction(Insn, 16, 4) << 12);
2428 imm |= (fieldFromInstruction(Insn, 26, 1) << 11);
2443 uint64_t
Address,
const void *Decoder) {
2446 unsigned Rd = fieldFromInstruction(Insn, 12, 4);
2447 unsigned pred = fieldFromInstruction(Insn, 28, 4);
2450 imm |= (fieldFromInstruction(Insn, 0, 12) << 0);
2451 imm |= (fieldFromInstruction(Insn, 16, 4) << 12);
2470 uint64_t
Address,
const void *Decoder) {
2473 unsigned Rd = fieldFromInstruction(Insn, 16, 4);
2474 unsigned Rn = fieldFromInstruction(Insn, 0, 4);
2475 unsigned Rm = fieldFromInstruction(Insn, 8, 4);
2476 unsigned Ra = fieldFromInstruction(Insn, 12, 4);
2477 unsigned pred = fieldFromInstruction(Insn, 28, 4);
2498 uint64_t
Address,
const void *Decoder) {
2501 unsigned Pred = fieldFromInstruction(Insn, 28, 4);
2502 unsigned Rn = fieldFromInstruction(Insn, 16, 4);
2503 unsigned Rm = fieldFromInstruction(Insn, 0, 4);
2519 uint64_t
Address,
const void *Decoder) {
2522 unsigned Imm = fieldFromInstruction(Insn, 9, 1);
2527 if (!FeatureBits[ARM::HasV8_1aOps] ||
2528 !FeatureBits[ARM::HasV8Ops])
2533 if (fieldFromInstruction(Insn, 20,12) != 0xf11 ||
2534 fieldFromInstruction(Insn, 4,4) != 0)
2536 if (fieldFromInstruction(Insn, 10,10) != 0 ||
2537 fieldFromInstruction(Insn, 0,4) != 0)
2547 uint64_t
Address,
const void *Decoder) {
2550 unsigned add = fieldFromInstruction(Val, 12, 1);
2551 unsigned imm = fieldFromInstruction(Val, 0, 12);
2552 unsigned Rn = fieldFromInstruction(Val, 13, 4);
2557 if (!add) imm *= -1;
2558 if (imm == 0 && !add) imm = INT32_MIN;
2567 uint64_t
Address,
const void *Decoder) {
2570 unsigned Rn = fieldFromInstruction(Val, 9, 4);
2572 unsigned U = fieldFromInstruction(Val, 8, 1);
2573 unsigned imm = fieldFromInstruction(Val, 0, 8);
2587 uint64_t
Address,
const void *Decoder) {
2590 unsigned Rn = fieldFromInstruction(Val, 9, 4);
2592 unsigned U = fieldFromInstruction(Val, 8, 1);
2593 unsigned imm = fieldFromInstruction(Val, 0, 8);
2607 uint64_t
Address,
const void *Decoder) {
2613 uint64_t
Address,
const void *Decoder) {
2622 unsigned S = fieldFromInstruction(Insn, 26, 1);
2623 unsigned J1 = fieldFromInstruction(Insn, 13, 1);
2624 unsigned J2 = fieldFromInstruction(Insn, 11, 1);
2625 unsigned I1 = !(J1 ^ S);
2626 unsigned I2 = !(J2 ^ S);
2627 unsigned imm10 = fieldFromInstruction(Insn, 16, 10);
2628 unsigned imm11 = fieldFromInstruction(Insn, 0, 11);
2629 unsigned tmp = (S << 23) | (I1 << 22) | (I2 << 21) | (imm10 << 11) | imm11;
2630 int imm32 = SignExtend32<25>(tmp << 1);
2632 true, 4, Inst, Decoder))
2640 uint64_t
Address,
const void *Decoder) {
2643 unsigned pred = fieldFromInstruction(Insn, 28, 4);
2644 unsigned imm = fieldFromInstruction(Insn, 0, 24) << 2;
2648 imm |= fieldFromInstruction(Insn, 24, 1) << 1;
2650 true, 4, Inst, Decoder))
2656 true, 4, Inst, Decoder))
2665 uint64_t
Address,
const void *Decoder) {
2668 unsigned Rm = fieldFromInstruction(Val, 0, 4);
2669 unsigned align = fieldFromInstruction(Val, 4, 2);
2682 uint64_t
Address,
const void *Decoder) {
2685 unsigned Rd = fieldFromInstruction(Insn, 12, 4);
2686 Rd |= fieldFromInstruction(Insn, 22, 1) << 4;
2687 unsigned wb = fieldFromInstruction(Insn, 16, 4);
2688 unsigned Rn = fieldFromInstruction(Insn, 16, 4);
2689 Rn |= fieldFromInstruction(Insn, 4, 2) << 4;
2690 unsigned Rm = fieldFromInstruction(Insn, 0, 4);
2694 case ARM::VLD1q16:
case ARM::VLD1q32:
case ARM::VLD1q64:
case ARM::VLD1q8:
2695 case ARM::VLD1q16wb_fixed:
case ARM::VLD1q16wb_register:
2696 case ARM::VLD1q32wb_fixed:
case ARM::VLD1q32wb_register:
2697 case ARM::VLD1q64wb_fixed:
case ARM::VLD1q64wb_register:
2698 case ARM::VLD1q8wb_fixed:
case ARM::VLD1q8wb_register:
2699 case ARM::VLD2d16:
case ARM::VLD2d32:
case ARM::VLD2d8:
2700 case ARM::VLD2d16wb_fixed:
case ARM::VLD2d16wb_register:
2701 case ARM::VLD2d32wb_fixed:
case ARM::VLD2d32wb_register:
2702 case ARM::VLD2d8wb_fixed:
case ARM::VLD2d8wb_register:
2709 case ARM::VLD2b16wb_fixed:
2710 case ARM::VLD2b16wb_register:
2711 case ARM::VLD2b32wb_fixed:
2712 case ARM::VLD2b32wb_register:
2713 case ARM::VLD2b8wb_fixed:
2714 case ARM::VLD2b8wb_register:
2728 case ARM::VLD3d8_UPD:
2729 case ARM::VLD3d16_UPD:
2730 case ARM::VLD3d32_UPD:
2734 case ARM::VLD4d8_UPD:
2735 case ARM::VLD4d16_UPD:
2736 case ARM::VLD4d32_UPD:
2743 case ARM::VLD3q8_UPD:
2744 case ARM::VLD3q16_UPD:
2745 case ARM::VLD3q32_UPD:
2749 case ARM::VLD4q8_UPD:
2750 case ARM::VLD4q16_UPD:
2751 case ARM::VLD4q32_UPD:
2764 case ARM::VLD3d8_UPD:
2765 case ARM::VLD3d16_UPD:
2766 case ARM::VLD3d32_UPD:
2770 case ARM::VLD4d8_UPD:
2771 case ARM::VLD4d16_UPD:
2772 case ARM::VLD4d32_UPD:
2779 case ARM::VLD3q8_UPD:
2780 case ARM::VLD3q16_UPD:
2781 case ARM::VLD3q32_UPD:
2785 case ARM::VLD4q8_UPD:
2786 case ARM::VLD4q16_UPD:
2787 case ARM::VLD4q32_UPD:
2800 case ARM::VLD4d8_UPD:
2801 case ARM::VLD4d16_UPD:
2802 case ARM::VLD4d32_UPD:
2809 case ARM::VLD4q8_UPD:
2810 case ARM::VLD4q16_UPD:
2811 case ARM::VLD4q32_UPD:
2821 case ARM::VLD1d8wb_fixed:
2822 case ARM::VLD1d16wb_fixed:
2823 case ARM::VLD1d32wb_fixed:
2824 case ARM::VLD1d64wb_fixed:
2825 case ARM::VLD1d8wb_register:
2826 case ARM::VLD1d16wb_register:
2827 case ARM::VLD1d32wb_register:
2828 case ARM::VLD1d64wb_register:
2829 case ARM::VLD1q8wb_fixed:
2830 case ARM::VLD1q16wb_fixed:
2831 case ARM::VLD1q32wb_fixed:
2832 case ARM::VLD1q64wb_fixed:
2833 case ARM::VLD1q8wb_register:
2834 case ARM::VLD1q16wb_register:
2835 case ARM::VLD1q32wb_register:
2836 case ARM::VLD1q64wb_register:
2837 case ARM::VLD1d8Twb_fixed:
2838 case ARM::VLD1d8Twb_register:
2839 case ARM::VLD1d16Twb_fixed:
2840 case ARM::VLD1d16Twb_register:
2841 case ARM::VLD1d32Twb_fixed:
2842 case ARM::VLD1d32Twb_register:
2843 case ARM::VLD1d64Twb_fixed:
2844 case ARM::VLD1d64Twb_register:
2845 case ARM::VLD1d8Qwb_fixed:
2846 case ARM::VLD1d8Qwb_register:
2847 case ARM::VLD1d16Qwb_fixed:
2848 case ARM::VLD1d16Qwb_register:
2849 case ARM::VLD1d32Qwb_fixed:
2850 case ARM::VLD1d32Qwb_register:
2851 case ARM::VLD1d64Qwb_fixed:
2852 case ARM::VLD1d64Qwb_register:
2853 case ARM::VLD2d8wb_fixed:
2854 case ARM::VLD2d16wb_fixed:
2855 case ARM::VLD2d32wb_fixed:
2856 case ARM::VLD2q8wb_fixed:
2857 case ARM::VLD2q16wb_fixed:
2858 case ARM::VLD2q32wb_fixed:
2859 case ARM::VLD2d8wb_register:
2860 case ARM::VLD2d16wb_register:
2861 case ARM::VLD2d32wb_register:
2862 case ARM::VLD2q8wb_register:
2863 case ARM::VLD2q16wb_register:
2864 case ARM::VLD2q32wb_register:
2865 case ARM::VLD2b8wb_fixed:
2866 case ARM::VLD2b16wb_fixed:
2867 case ARM::VLD2b32wb_fixed:
2868 case ARM::VLD2b8wb_register:
2869 case ARM::VLD2b16wb_register:
2870 case ARM::VLD2b32wb_register:
2873 case ARM::VLD3d8_UPD:
2874 case ARM::VLD3d16_UPD:
2875 case ARM::VLD3d32_UPD:
2876 case ARM::VLD3q8_UPD:
2877 case ARM::VLD3q16_UPD:
2878 case ARM::VLD3q32_UPD:
2879 case ARM::VLD4d8_UPD:
2880 case ARM::VLD4d16_UPD:
2881 case ARM::VLD4d32_UPD:
2882 case ARM::VLD4q8_UPD:
2883 case ARM::VLD4q16_UPD:
2884 case ARM::VLD4q32_UPD:
2911 case ARM::VLD1d8wb_fixed:
2912 case ARM::VLD1d16wb_fixed:
2913 case ARM::VLD1d32wb_fixed:
2914 case ARM::VLD1d64wb_fixed:
2915 case ARM::VLD1d8Twb_fixed:
2916 case ARM::VLD1d16Twb_fixed:
2917 case ARM::VLD1d32Twb_fixed:
2918 case ARM::VLD1d64Twb_fixed:
2919 case ARM::VLD1d8Qwb_fixed:
2920 case ARM::VLD1d16Qwb_fixed:
2921 case ARM::VLD1d32Qwb_fixed:
2922 case ARM::VLD1d64Qwb_fixed:
2923 case ARM::VLD1d8wb_register:
2924 case ARM::VLD1d16wb_register:
2925 case ARM::VLD1d32wb_register:
2926 case ARM::VLD1d64wb_register:
2927 case ARM::VLD1q8wb_fixed:
2928 case ARM::VLD1q16wb_fixed:
2929 case ARM::VLD1q32wb_fixed:
2930 case ARM::VLD1q64wb_fixed:
2931 case ARM::VLD1q8wb_register:
2932 case ARM::VLD1q16wb_register:
2933 case ARM::VLD1q32wb_register:
2934 case ARM::VLD1q64wb_register:
2938 if (Rm != 0xD && Rm != 0xF &&
2942 case ARM::VLD2d8wb_fixed:
2943 case ARM::VLD2d16wb_fixed:
2944 case ARM::VLD2d32wb_fixed:
2945 case ARM::VLD2b8wb_fixed:
2946 case ARM::VLD2b16wb_fixed:
2947 case ARM::VLD2b32wb_fixed:
2948 case ARM::VLD2q8wb_fixed:
2949 case ARM::VLD2q16wb_fixed:
2950 case ARM::VLD2q32wb_fixed:
2958 uint64_t
Address,
const void *Decoder) {
2959 unsigned type = fieldFromInstruction(Insn, 8, 4);
2960 unsigned align = fieldFromInstruction(Insn, 4, 2);
2965 unsigned load = fieldFromInstruction(Insn, 21, 1);
2971 uint64_t
Address,
const void *Decoder) {
2972 unsigned size = fieldFromInstruction(Insn, 6, 2);
2975 unsigned type = fieldFromInstruction(Insn, 8, 4);
2976 unsigned align = fieldFromInstruction(Insn, 4, 2);
2980 unsigned load = fieldFromInstruction(Insn, 21, 1);
2986 uint64_t
Address,
const void *Decoder) {
2987 unsigned size = fieldFromInstruction(Insn, 6, 2);
2990 unsigned align = fieldFromInstruction(Insn, 4, 2);
2993 unsigned load = fieldFromInstruction(Insn, 21, 1);
2999 uint64_t
Address,
const void *Decoder) {
3000 unsigned size = fieldFromInstruction(Insn, 6, 2);
3003 unsigned load = fieldFromInstruction(Insn, 21, 1);
3009 uint64_t
Address,
const void *Decoder) {
3012 unsigned Rd = fieldFromInstruction(Insn, 12, 4);
3013 Rd |= fieldFromInstruction(Insn, 22, 1) << 4;
3014 unsigned wb = fieldFromInstruction(Insn, 16, 4);
3015 unsigned Rn = fieldFromInstruction(Insn, 16, 4);
3016 Rn |= fieldFromInstruction(Insn, 4, 2) << 4;
3017 unsigned Rm = fieldFromInstruction(Insn, 0, 4);
3021 case ARM::VST1d8wb_fixed:
3022 case ARM::VST1d16wb_fixed:
3023 case ARM::VST1d32wb_fixed:
3024 case ARM::VST1d64wb_fixed:
3025 case ARM::VST1d8wb_register:
3026 case ARM::VST1d16wb_register:
3027 case ARM::VST1d32wb_register:
3028 case ARM::VST1d64wb_register:
3029 case ARM::VST1q8wb_fixed:
3030 case ARM::VST1q16wb_fixed:
3031 case ARM::VST1q32wb_fixed:
3032 case ARM::VST1q64wb_fixed:
3033 case ARM::VST1q8wb_register:
3034 case ARM::VST1q16wb_register:
3035 case ARM::VST1q32wb_register:
3036 case ARM::VST1q64wb_register:
3037 case ARM::VST1d8Twb_fixed:
3038 case ARM::VST1d16Twb_fixed:
3039 case ARM::VST1d32Twb_fixed:
3040 case ARM::VST1d64Twb_fixed:
3041 case ARM::VST1d8Twb_register:
3042 case ARM::VST1d16Twb_register:
3043 case ARM::VST1d32Twb_register:
3044 case ARM::VST1d64Twb_register:
3045 case ARM::VST1d8Qwb_fixed:
3046 case ARM::VST1d16Qwb_fixed:
3047 case ARM::VST1d32Qwb_fixed:
3048 case ARM::VST1d64Qwb_fixed:
3049 case ARM::VST1d8Qwb_register:
3050 case ARM::VST1d16Qwb_register:
3051 case ARM::VST1d32Qwb_register:
3052 case ARM::VST1d64Qwb_register:
3053 case ARM::VST2d8wb_fixed:
3054 case ARM::VST2d16wb_fixed:
3055 case ARM::VST2d32wb_fixed:
3056 case ARM::VST2d8wb_register:
3057 case ARM::VST2d16wb_register:
3058 case ARM::VST2d32wb_register:
3059 case ARM::VST2q8wb_fixed:
3060 case ARM::VST2q16wb_fixed:
3061 case ARM::VST2q32wb_fixed:
3062 case ARM::VST2q8wb_register:
3063 case ARM::VST2q16wb_register:
3064 case ARM::VST2q32wb_register:
3065 case ARM::VST2b8wb_fixed:
3066 case ARM::VST2b16wb_fixed:
3067 case ARM::VST2b32wb_fixed:
3068 case ARM::VST2b8wb_register:
3069 case ARM::VST2b16wb_register:
3070 case ARM::VST2b32wb_register:
3075 case ARM::VST3d8_UPD:
3076 case ARM::VST3d16_UPD:
3077 case ARM::VST3d32_UPD:
3078 case ARM::VST3q8_UPD:
3079 case ARM::VST3q16_UPD:
3080 case ARM::VST3q32_UPD:
3081 case ARM::VST4d8_UPD:
3082 case ARM::VST4d16_UPD:
3083 case ARM::VST4d32_UPD:
3084 case ARM::VST4q8_UPD:
3085 case ARM::VST4q16_UPD:
3086 case ARM::VST4q32_UPD:
3103 else if (Rm != 0xF) {
3108 case ARM::VST1d8wb_fixed:
3109 case ARM::VST1d16wb_fixed:
3110 case ARM::VST1d32wb_fixed:
3111 case ARM::VST1d64wb_fixed:
3112 case ARM::VST1q8wb_fixed:
3113 case ARM::VST1q16wb_fixed:
3114 case ARM::VST1q32wb_fixed:
3115 case ARM::VST1q64wb_fixed:
3116 case ARM::VST1d8Twb_fixed:
3117 case ARM::VST1d16Twb_fixed:
3118 case ARM::VST1d32Twb_fixed:
3119 case ARM::VST1d64Twb_fixed:
3120 case ARM::VST1d8Qwb_fixed:
3121 case ARM::VST1d16Qwb_fixed:
3122 case ARM::VST1d32Qwb_fixed:
3123 case ARM::VST1d64Qwb_fixed:
3124 case ARM::VST2d8wb_fixed:
3125 case ARM::VST2d16wb_fixed:
3126 case ARM::VST2d32wb_fixed:
3127 case ARM::VST2q8wb_fixed:
3128 case ARM::VST2q16wb_fixed:
3129 case ARM::VST2q32wb_fixed:
3130 case ARM::VST2b8wb_fixed:
3131 case ARM::VST2b16wb_fixed:
3132 case ARM::VST2b32wb_fixed:
3142 case ARM::VST1q16wb_fixed:
3143 case ARM::VST1q16wb_register:
3144 case ARM::VST1q32wb_fixed:
3145 case ARM::VST1q32wb_register:
3146 case ARM::VST1q64wb_fixed:
3147 case ARM::VST1q64wb_register:
3148 case ARM::VST1q8wb_fixed:
3149 case ARM::VST1q8wb_register:
3153 case ARM::VST2d16wb_fixed:
3154 case ARM::VST2d16wb_register:
3155 case ARM::VST2d32wb_fixed:
3156 case ARM::VST2d32wb_register:
3157 case ARM::VST2d8wb_fixed:
3158 case ARM::VST2d8wb_register:
3165 case ARM::VST2b16wb_fixed:
3166 case ARM::VST2b16wb_register:
3167 case ARM::VST2b32wb_fixed:
3168 case ARM::VST2b32wb_register:
3169 case ARM::VST2b8wb_fixed:
3170 case ARM::VST2b8wb_register:
3184 case ARM::VST3d8_UPD:
3185 case ARM::VST3d16_UPD:
3186 case ARM::VST3d32_UPD:
3190 case ARM::VST4d8_UPD:
3191 case ARM::VST4d16_UPD:
3192 case ARM::VST4d32_UPD:
3199 case ARM::VST3q8_UPD:
3200 case ARM::VST3q16_UPD:
3201 case ARM::VST3q32_UPD:
3205 case ARM::VST4q8_UPD:
3206 case ARM::VST4q16_UPD:
3207 case ARM::VST4q32_UPD:
3220 case ARM::VST3d8_UPD:
3221 case ARM::VST3d16_UPD:
3222 case ARM::VST3d32_UPD:
3226 case ARM::VST4d8_UPD:
3227 case ARM::VST4d16_UPD:
3228 case ARM::VST4d32_UPD:
3235 case ARM::VST3q8_UPD:
3236 case ARM::VST3q16_UPD:
3237 case ARM::VST3q32_UPD:
3241 case ARM::VST4q8_UPD:
3242 case ARM::VST4q16_UPD:
3243 case ARM::VST4q32_UPD:
3256 case ARM::VST4d8_UPD:
3257 case ARM::VST4d16_UPD:
3258 case ARM::VST4d32_UPD:
3265 case ARM::VST4q8_UPD:
3266 case ARM::VST4q16_UPD:
3267 case ARM::VST4q32_UPD:
3279 uint64_t
Address,
const void *Decoder) {
3282 unsigned Rd = fieldFromInstruction(Insn, 12, 4);
3283 Rd |= fieldFromInstruction(Insn, 22, 1) << 4;
3284 unsigned Rn = fieldFromInstruction(Insn, 16, 4);
3285 unsigned Rm = fieldFromInstruction(Insn, 0, 4);
3286 unsigned align = fieldFromInstruction(Insn, 4, 1);
3287 unsigned size = fieldFromInstruction(Insn, 6, 2);
3289 if (size == 0 && align == 1)
3291 align *= (1 <<
size);
3294 case ARM::VLD1DUPq16:
case ARM::VLD1DUPq32:
case ARM::VLD1DUPq8:
3295 case ARM::VLD1DUPq16wb_fixed:
case ARM::VLD1DUPq16wb_register:
3296 case ARM::VLD1DUPq32wb_fixed:
case ARM::VLD1DUPq32wb_register:
3297 case ARM::VLD1DUPq8wb_fixed:
case ARM::VLD1DUPq8wb_register:
3318 if (Rm != 0xD && Rm != 0xF &&
3326 uint64_t
Address,
const void *Decoder) {
3329 unsigned Rd = fieldFromInstruction(Insn, 12, 4);
3330 Rd |= fieldFromInstruction(Insn, 22, 1) << 4;
3331 unsigned Rn = fieldFromInstruction(Insn, 16, 4);
3332 unsigned Rm = fieldFromInstruction(Insn, 0, 4);
3333 unsigned align = fieldFromInstruction(Insn, 4, 1);
3334 unsigned size = 1 << fieldFromInstruction(Insn, 6, 2);
3338 case ARM::VLD2DUPd16:
case ARM::VLD2DUPd32:
case ARM::VLD2DUPd8:
3339 case ARM::VLD2DUPd16wb_fixed:
case ARM::VLD2DUPd16wb_register:
3340 case ARM::VLD2DUPd32wb_fixed:
case ARM::VLD2DUPd32wb_register:
3341 case ARM::VLD2DUPd8wb_fixed:
case ARM::VLD2DUPd8wb_register:
3345 case ARM::VLD2DUPd16x2:
case ARM::VLD2DUPd32x2:
case ARM::VLD2DUPd8x2:
3346 case ARM::VLD2DUPd16x2wb_fixed:
case ARM::VLD2DUPd16x2wb_register:
3347 case ARM::VLD2DUPd32x2wb_fixed:
case ARM::VLD2DUPd32x2wb_register:
3348 case ARM::VLD2DUPd8x2wb_fixed:
case ARM::VLD2DUPd8x2wb_register:
3365 if (Rm != 0xD && Rm != 0xF) {
3374 uint64_t
Address,
const void *Decoder) {
3377 unsigned Rd = fieldFromInstruction(Insn, 12, 4);
3378 Rd |= fieldFromInstruction(Insn, 22, 1) << 4;
3379 unsigned Rn = fieldFromInstruction(Insn, 16, 4);
3380 unsigned Rm = fieldFromInstruction(Insn, 0, 4);
3381 unsigned inc = fieldFromInstruction(Insn, 5, 1) + 1;
3400 else if (Rm != 0xF) {
3409 uint64_t
Address,
const void *Decoder) {
3412 unsigned Rd = fieldFromInstruction(Insn, 12, 4);
3413 Rd |= fieldFromInstruction(Insn, 22, 1) << 4;
3414 unsigned Rn = fieldFromInstruction(Insn, 16, 4);
3415 unsigned Rm = fieldFromInstruction(Insn, 0, 4);
3416 unsigned size = fieldFromInstruction(Insn, 6, 2);
3417 unsigned inc = fieldFromInstruction(Insn, 5, 1) + 1;
3418 unsigned align = fieldFromInstruction(Insn, 4, 1);
3452 else if (Rm != 0xF) {
3462 uint64_t
Address,
const void *Decoder) {
3465 unsigned Rd = fieldFromInstruction(Insn, 12, 4);
3466 Rd |= fieldFromInstruction(Insn, 22, 1) << 4;
3467 unsigned imm = fieldFromInstruction(Insn, 0, 4);
3468 imm |= fieldFromInstruction(Insn, 16, 3) << 4;
3469 imm |= fieldFromInstruction(Insn, 24, 1) << 7;
3470 imm |= fieldFromInstruction(Insn, 8, 4) << 8;
3471 imm |= fieldFromInstruction(Insn, 5, 1) << 12;
3472 unsigned Q = fieldFromInstruction(Insn, 6, 1);
3485 case ARM::VORRiv4i16:
3486 case ARM::VORRiv2i32:
3487 case ARM::VBICiv4i16:
3488 case ARM::VBICiv2i32:
3492 case ARM::VORRiv8i16:
3493 case ARM::VORRiv4i32:
3494 case ARM::VBICiv8i16:
3495 case ARM::VBICiv4i32:
3508 uint64_t
Address,
const void *Decoder) {
3511 unsigned Qd = ((fieldFromInstruction(Insn, 22, 1) << 3) |
3512 fieldFromInstruction(Insn, 13, 3));
3513 unsigned cmode = fieldFromInstruction(Insn, 8, 4);
3514 unsigned imm = fieldFromInstruction(Insn, 0, 4);
3515 imm |= fieldFromInstruction(Insn, 16, 3) << 4;
3516 imm |= fieldFromInstruction(Insn, 28, 1) << 7;
3518 imm |= fieldFromInstruction(Insn, 5, 1) << 12;
3520 if (cmode == 0xF && Inst.
getOpcode() == ARM::MVE_VMVNimmi32)
3536 uint64_t
Address,
const void *Decoder) {
3539 unsigned Qd = fieldFromInstruction(Insn, 13, 3);
3540 Qd |= fieldFromInstruction(Insn, 22, 1) << 3;
3545 unsigned Qn = fieldFromInstruction(Insn, 17, 3);
3546 Qn |= fieldFromInstruction(Insn, 7, 1) << 3;
3549 unsigned Qm = fieldFromInstruction(Insn, 1, 3);
3550 Qm |= fieldFromInstruction(Insn, 5, 1) << 3;
3553 if (!fieldFromInstruction(Insn, 12, 1))
3561 uint64_t
Address,
const void *Decoder) {
3564 unsigned Rd = fieldFromInstruction(Insn, 12, 4);
3565 Rd |= fieldFromInstruction(Insn, 22, 1) << 4;
3566 unsigned Rm = fieldFromInstruction(Insn, 0, 4);
3567 Rm |= fieldFromInstruction(Insn, 5, 1) << 4;
3568 unsigned size = fieldFromInstruction(Insn, 18, 2);
3580 uint64_t
Address,
const void *Decoder) {
3586 uint64_t
Address,
const void *Decoder) {
3592 uint64_t
Address,
const void *Decoder) {
3598 uint64_t
Address,
const void *Decoder) {
3604 uint64_t
Address,
const void *Decoder) {
3607 unsigned Rd = fieldFromInstruction(Insn, 12, 4);
3608 Rd |= fieldFromInstruction(Insn, 22, 1) << 4;
3609 unsigned Rn = fieldFromInstruction(Insn, 16, 4);
3610 Rn |= fieldFromInstruction(Insn, 7, 1) << 4;
3611 unsigned Rm = fieldFromInstruction(Insn, 0, 4);
3612 Rm |= fieldFromInstruction(Insn, 5, 1) << 4;
3613 unsigned op = fieldFromInstruction(Insn, 6, 1);
3640 uint64_t
Address,
const void *Decoder) {
3643 unsigned dst = fieldFromInstruction(Insn, 8, 3);
3644 unsigned imm = fieldFromInstruction(Insn, 0, 8);
3664 uint64_t
Address,
const void *Decoder) {
3666 true, 2, Inst, Decoder))
3672 uint64_t
Address,
const void *Decoder) {
3674 true, 4, Inst, Decoder))
3680 uint64_t
Address,
const void *Decoder) {
3682 true, 2, Inst, Decoder))
3688 uint64_t
Address,
const void *Decoder) {
3691 unsigned Rn = fieldFromInstruction(Val, 0, 3);
3692 unsigned Rm = fieldFromInstruction(Val, 3, 3);
3703 uint64_t
Address,
const void *Decoder) {
3706 unsigned Rn = fieldFromInstruction(Val, 0, 3);
3707 unsigned imm = fieldFromInstruction(Val, 3, 5);
3717 uint64_t
Address,
const void *Decoder) {
3718 unsigned imm = Val << 2;
3727 uint64_t
Address,
const void *Decoder) {
3735 uint64_t
Address,
const void *Decoder) {
3738 unsigned Rn = fieldFromInstruction(Val, 6, 4);
3739 unsigned Rm = fieldFromInstruction(Val, 2, 4);
3740 unsigned imm = fieldFromInstruction(Val, 0, 2);
3764 uint64_t
Address,
const void *Decoder) {
3767 unsigned Rt = fieldFromInstruction(Insn, 12, 4);
3768 unsigned Rn = fieldFromInstruction(Insn, 16, 4);
3771 ((
const MCDisassembler*)Decoder)->getSubtargetInfo().getFeatureBits();
3773 bool hasMP = featureBits[ARM::FeatureMP];
3774 bool hasV7Ops = featureBits[ARM::HasV7Ops];
3829 if (!hasV7Ops || !hasMP)
3837 unsigned addrmode = fieldFromInstruction(Insn, 4, 2);
3838 addrmode |= fieldFromInstruction(Insn, 0, 4) << 2;
3839 addrmode |= fieldFromInstruction(Insn, 16, 4) << 6;
3847 uint64_t
Address,
const void* Decoder) {
3850 unsigned Rn = fieldFromInstruction(Insn, 16, 4);
3851 unsigned Rt = fieldFromInstruction(Insn, 12, 4);
3852 unsigned U = fieldFromInstruction(Insn, 9, 1);
3853 unsigned imm = fieldFromInstruction(Insn, 0, 8);
3856 unsigned add = fieldFromInstruction(Insn, 9, 1);
3859 ((
const MCDisassembler*)Decoder)->getSubtargetInfo().getFeatureBits();
3861 bool hasMP = featureBits[ARM::FeatureMP];
3862 bool hasV7Ops = featureBits[ARM::HasV7Ops];
3872 case ARM::t2LDRSBi8:
3878 case ARM::t2LDRSHi8:
3895 case ARM::t2LDRSHi8:
3901 case ARM::t2LDRSBi8:
3917 if (!hasV7Ops || !hasMP)
3931 uint64_t
Address,
const void* Decoder) {
3934 unsigned Rn = fieldFromInstruction(Insn, 16, 4);
3935 unsigned Rt = fieldFromInstruction(Insn, 12, 4);
3936 unsigned imm = fieldFromInstruction(Insn, 0, 12);
3940 ((
const MCDisassembler*)Decoder)->getSubtargetInfo().getFeatureBits();
3942 bool hasMP = featureBits[ARM::FeatureMP];
3943 bool hasV7Ops = featureBits[ARM::HasV7Ops];
3950 case ARM::t2LDRHi12:
3953 case ARM::t2LDRSHi12:
3956 case ARM::t2LDRBi12:
3959 case ARM::t2LDRSBi12:
3976 case ARM::t2LDRSHi12:
3978 case ARM::t2LDRHi12:
3981 case ARM::t2LDRSBi12:
3996 case ARM::t2PLDWi12:
3997 if (!hasV7Ops || !hasMP)
4011 uint64_t
Address,
const void* Decoder) {
4014 unsigned Rn = fieldFromInstruction(Insn, 16, 4);
4015 unsigned Rt = fieldFromInstruction(Insn, 12, 4);
4016 unsigned imm = fieldFromInstruction(Insn, 0, 8);
4050 uint64_t
Address,
const void* Decoder) {
4053 unsigned Rt = fieldFromInstruction(Insn, 12, 4);
4054 unsigned U = fieldFromInstruction(Insn, 23, 1);
4055 int imm = fieldFromInstruction(Insn, 0, 12);
4058 ((
const MCDisassembler*)Decoder)->getSubtargetInfo().getFeatureBits();
4060 bool hasV7Ops = featureBits[ARM::HasV7Ops];
4064 case ARM::t2LDRBpci:
4065 case ARM::t2LDRHpci:
4068 case ARM::t2LDRSBpci:
4071 case ARM::t2LDRSHpci:
4103 uint64_t
Address,
const void *Decoder) {
4107 int imm = Val & 0xFF;
4109 if (!(Val & 0x100)) imm *= -1;
4117 const void *Decoder) {
4121 int imm = Val & 0x7F;
4132 uint64_t
Address,
const void *Decoder) {
4135 unsigned Rn = fieldFromInstruction(Val, 9, 4);
4136 unsigned imm = fieldFromInstruction(Val, 0, 9);
4148 const void *Decoder) {
4151 unsigned Rn = fieldFromInstruction(Val, 8, 4);
4152 unsigned imm = fieldFromInstruction(Val, 0, 8);
4163 uint64_t
Address,
const void *Decoder) {
4166 unsigned Rn = fieldFromInstruction(Val, 8, 4);
4167 unsigned imm = fieldFromInstruction(Val, 0, 8);
4178 uint64_t
Address,
const void *Decoder) {
4179 int imm = Val & 0xFF;
4182 else if (!(Val & 0x100))
4191 uint64_t
Address,
const void *Decoder) {
4192 int imm = Val & 0x7F;
4195 else if (!(Val & 0x80))
4197 if (imm != INT32_MIN)
4198 imm *= (1U << shift);
4205 uint64_t
Address,
const void *Decoder) {
4208 unsigned Rn = fieldFromInstruction(Val, 9, 4);
4209 unsigned imm = fieldFromInstruction(Val, 0, 9);
4253 const void *Decoder) {
4256 unsigned Rn = fieldFromInstruction(Val, 8, 3);
4257 unsigned imm = fieldFromInstruction(Val, 0, 8);
4261 if (!
Check(S, DecodeT2Imm7<shift>(Inst, imm, Address, Decoder)))
4267 template<
int shift,
int WriteBack>
4270 const void *Decoder) {
4273 unsigned Rn = fieldFromInstruction(Val, 8, 4);
4274 unsigned imm = fieldFromInstruction(Val, 0, 8);
4280 if (!
Check(S, DecodeT2Imm7<shift>(Inst, imm, Address, Decoder)))
4287 uint64_t
Address,
const void *Decoder) {
4290 unsigned Rt = fieldFromInstruction(Insn, 12, 4);
4291 unsigned Rn = fieldFromInstruction(Insn, 16, 4);
4292 unsigned addr = fieldFromInstruction(Insn, 0, 8);
4293 addr |= fieldFromInstruction(Insn, 9, 1) << 8;
4295 unsigned load = fieldFromInstruction(Insn, 20, 1);
4299 case ARM::t2LDR_PRE:
4300 case ARM::t2LDR_POST:
4303 case ARM::t2LDRB_PRE:
4304 case ARM::t2LDRB_POST:
4307 case ARM::t2LDRH_PRE:
4308 case ARM::t2LDRH_POST:
4311 case ARM::t2LDRSB_PRE:
4312 case ARM::t2LDRSB_POST:
4318 case ARM::t2LDRSH_PRE:
4319 case ARM::t2LDRSH_POST:
4348 uint64_t
Address,
const void *Decoder) {
4351 unsigned Rn = fieldFromInstruction(Val, 13, 4);
4352 unsigned imm = fieldFromInstruction(Val, 0, 12);
4357 case ARM::t2STRBi12:
4358 case ARM::t2STRHi12:
4374 uint64_t
Address,
const void *Decoder) {
4375 unsigned imm = fieldFromInstruction(Insn, 0, 7);
4385 uint64_t
Address,
const void *Decoder) {
4389 unsigned Rdm = fieldFromInstruction(Insn, 0, 3);
4390 Rdm |= fieldFromInstruction(Insn, 7, 1) << 3;
4397 }
else if (Inst.
getOpcode() == ARM::tADDspr) {
4398 unsigned Rm = fieldFromInstruction(Insn, 3, 4);
4410 uint64_t
Address,
const void *Decoder) {
4411 unsigned imod = fieldFromInstruction(Insn, 4, 1) | 0x2;
4412 unsigned flags = fieldFromInstruction(Insn, 0, 3);
4421 uint64_t
Address,
const void *Decoder) {
4423 unsigned Rm = fieldFromInstruction(Insn, 0, 4);
4424 unsigned add = fieldFromInstruction(Insn, 4, 1);
4434 uint64_t
Address,
const void *Decoder) {
4436 unsigned Rn = fieldFromInstruction(Insn, 3, 4);
4437 unsigned Qm = fieldFromInstruction(Insn, 0, 3);
4449 uint64_t
Address,
const void *Decoder) {
4451 unsigned Qm = fieldFromInstruction(Insn, 8, 3);
4452 int imm = fieldFromInstruction(Insn, 0, 7);
4457 if(!fieldFromInstruction(Insn, 7, 1)) {
4463 if (imm != INT32_MIN)
4464 imm *= (1U << shift);
4471 uint64_t
Address,
const void *Decoder) {
4479 unsigned S = (Val >> 23) & 1;
4480 unsigned J1 = (Val >> 22) & 1;
4481 unsigned J2 = (Val >> 21) & 1;
4482 unsigned I1 = !(J1 ^ S);
4483 unsigned I2 = !(J2 ^ S);
4484 unsigned tmp = (Val & ~0x600000) | (I1 << 22) | (I2 << 21);
4485 int imm32 = SignExtend32<25>(tmp << 1);
4488 (Address & ~2u) + imm32 + 4,
4489 true, 4, Inst, Decoder))
4495 uint64_t
Address,
const void *Decoder) {
4496 if (Val == 0xA || Val == 0xB)
4500 ((
const MCDisassembler*)Decoder)->getSubtargetInfo().getFeatureBits();
4511 uint64_t
Address,
const void *Decoder) {
4514 unsigned Rn = fieldFromInstruction(Insn, 16, 4);
4515 unsigned Rm = fieldFromInstruction(Insn, 0, 4);
4527 uint64_t
Address,
const void *Decoder) {
4530 unsigned pred = fieldFromInstruction(Insn, 22, 4);
4531 if (pred == 0xE || pred == 0xF) {
4532 unsigned opc = fieldFromInstruction(Insn, 4, 28);
4547 unsigned imm = fieldFromInstruction(Insn, 0, 4);
4551 unsigned brtarget = fieldFromInstruction(Insn, 0, 11) << 1;
4552 brtarget |= fieldFromInstruction(Insn, 11, 1) << 19;
4553 brtarget |= fieldFromInstruction(Insn, 13, 1) << 18;
4554 brtarget |= fieldFromInstruction(Insn, 16, 6) << 12;
4555 brtarget |= fieldFromInstruction(Insn, 26, 1) << 20;
4569 uint64_t
Address,
const void *Decoder) {
4570 unsigned ctrl = fieldFromInstruction(Val, 10, 2);
4572 unsigned byte = fieldFromInstruction(Val, 8, 2);
4573 unsigned imm = fieldFromInstruction(Val, 0, 8);
4590 unsigned unrot = fieldFromInstruction(Val, 0, 7) | 0x80;
4591 unsigned rot = fieldFromInstruction(Val, 7, 5);
4592 unsigned imm = (unrot >> rot) | (unrot << ((32-rot)&31));
4601 uint64_t
Address,
const void *Decoder) {
4603 true, 2, Inst, Decoder))
4610 const void *Decoder) {
4618 unsigned S = (Val >> 23) & 1;
4619 unsigned J1 = (Val >> 22) & 1;
4620 unsigned J2 = (Val >> 21) & 1;
4621 unsigned I1 = !(J1 ^ S);
4622 unsigned I2 = !(J2 ^ S);
4623 unsigned tmp = (Val & ~0x600000) | (I1 << 22) | (I2 << 21);
4624 int imm32 = SignExtend32<25>(tmp << 1);
4627 true, 4, Inst, Decoder))
4633 uint64_t
Address,
const void *Decoder) {
4642 uint64_t
Address,
const void *Decoder) {
4651 uint64_t
Address,
const void *Decoder) {
4654 ((
const MCDisassembler*)Decoder)->getSubtargetInfo().getFeatureBits();
4656 if (FeatureBits[ARM::FeatureMClass]) {
4657 unsigned ValLow = Val & 0xff;
4676 if (!(FeatureBits[ARM::HasV7Ops]))
4684 if (!(FeatureBits[ARM::HasV8MMainlineOps]))
4694 if (!(FeatureBits[ARM::Feature8MSecExt]))
4704 unsigned Mask = fieldFromInstruction(Val, 10, 2);
4705 if (!(FeatureBits[ARM::HasV7Ops])) {
4718 if (Mask == 0 || (Mask != 2 && ValLow > 3) ||
4719 (!(FeatureBits[ARM::FeatureDSP]) && (Mask & 1)))
4733 uint64_t
Address,
const void *Decoder) {
4734 unsigned R = fieldFromInstruction(Val, 5, 1);
4735 unsigned SysM = fieldFromInstruction(Val, 0, 5);
4740 if (!ARMBankedReg::lookupBankedRegByEncoding((R << 5) | SysM))
4748 uint64_t
Address,
const void *Decoder) {
4751 unsigned Rt = fieldFromInstruction(Insn, 12, 4);
4752 unsigned Rn = fieldFromInstruction(Insn, 16, 4);
4753 unsigned pred = fieldFromInstruction(Insn, 28, 4);
4770 const void *Decoder) {
4773 unsigned Rd = fieldFromInstruction(Insn, 12, 4);
4774 unsigned Rt = fieldFromInstruction(Insn, 0, 4);
4775 unsigned Rn = fieldFromInstruction(Insn, 16, 4);
4776 unsigned pred = fieldFromInstruction(Insn, 28, 4);
4781 if (Rn == 0xF || Rd == Rn || Rd == Rt || Rd == Rt+1)
4795 uint64_t
Address,
const void *Decoder) {
4798 unsigned Rn = fieldFromInstruction(Insn, 16, 4);
4799 unsigned Rt = fieldFromInstruction(Insn, 12, 4);
4800 unsigned imm = fieldFromInstruction(Insn, 0, 12);
4801 imm |= fieldFromInstruction(Insn, 16, 4) << 13;
4802 imm |= fieldFromInstruction(Insn, 23, 1) << 12;
4803 unsigned pred = fieldFromInstruction(Insn, 28, 4);
4820 uint64_t
Address,
const void *Decoder) {
4823 unsigned Rn = fieldFromInstruction(Insn, 16, 4);
4824 unsigned Rt = fieldFromInstruction(Insn, 12, 4);
4825 unsigned imm = fieldFromInstruction(Insn, 0, 12);
4826 imm |= fieldFromInstruction(Insn, 16, 4) << 13;
4827 imm |= fieldFromInstruction(Insn, 23, 1) << 12;
4828 unsigned pred = fieldFromInstruction(Insn, 28, 4);
4829 unsigned Rm = fieldFromInstruction(Insn, 0, 4);
4847 uint64_t
Address,
const void *Decoder) {
4850 unsigned Rn = fieldFromInstruction(Insn, 16, 4);
4851 unsigned Rt = fieldFromInstruction(Insn, 12, 4);
4852 unsigned imm = fieldFromInstruction(Insn, 0, 12);
4853 imm |= fieldFromInstruction(Insn, 16, 4) << 13;
4854 imm |= fieldFromInstruction(Insn, 23, 1) << 12;
4855 unsigned pred = fieldFromInstruction(Insn, 28, 4);
4872 uint64_t
Address,
const void *Decoder) {
4875 unsigned Rn = fieldFromInstruction(Insn, 16, 4);
4876 unsigned Rt = fieldFromInstruction(Insn, 12, 4);
4877 unsigned imm = fieldFromInstruction(Insn, 0, 12);
4878 imm |= fieldFromInstruction(Insn, 16, 4) << 13;
4879 imm |= fieldFromInstruction(Insn, 23, 1) << 12;
4880 unsigned pred = fieldFromInstruction(Insn, 28, 4);
4897 uint64_t
Address,
const void *Decoder) {
4900 unsigned Rn = fieldFromInstruction(Insn, 16, 4);
4901 unsigned Rm = fieldFromInstruction(Insn, 0, 4);
4902 unsigned Rd = fieldFromInstruction(Insn, 12, 4);
4903 Rd |= fieldFromInstruction(Insn, 22, 1) << 4;
4904 unsigned size = fieldFromInstruction(Insn, 10, 2);
4912 if (fieldFromInstruction(Insn, 4, 1))
4914 index = fieldFromInstruction(Insn, 5, 3);
4917 if (fieldFromInstruction(Insn, 5, 1))
4919 index = fieldFromInstruction(Insn, 6, 2);
4920 if (fieldFromInstruction(Insn, 4, 1))
4924 if (fieldFromInstruction(Insn, 6, 1))
4926 index = fieldFromInstruction(Insn, 7, 1);
4928 switch (fieldFromInstruction(Insn, 4, 2)) {
4964 uint64_t
Address,
const void *Decoder) {
4967 unsigned Rn = fieldFromInstruction(Insn, 16, 4);
4968 unsigned Rm = fieldFromInstruction(Insn, 0, 4);
4969 unsigned Rd = fieldFromInstruction(Insn, 12, 4);
4970 Rd |= fieldFromInstruction(Insn, 22, 1) << 4;
4971 unsigned size = fieldFromInstruction(Insn, 10, 2);
4979 if (fieldFromInstruction(Insn, 4, 1))
4981 index = fieldFromInstruction(Insn, 5, 3);
4984 if (fieldFromInstruction(Insn, 5, 1))
4986 index = fieldFromInstruction(Insn, 6, 2);
4987 if (fieldFromInstruction(Insn, 4, 1))
4991 if (fieldFromInstruction(Insn, 6, 1))
4993 index = fieldFromInstruction(Insn, 7, 1);
4995 switch (fieldFromInstruction(Insn, 4, 2)) {
5029 uint64_t
Address,
const void *Decoder) {
5032 unsigned Rn = fieldFromInstruction(Insn, 16, 4);
5033 unsigned Rm = fieldFromInstruction(Insn, 0, 4);
5034 unsigned Rd = fieldFromInstruction(Insn, 12, 4);
5035 Rd |= fieldFromInstruction(Insn, 22, 1) << 4;
5036 unsigned size = fieldFromInstruction(Insn, 10, 2);
5045 index = fieldFromInstruction(Insn, 5, 3);
5046 if (fieldFromInstruction(Insn, 4, 1))
5050 index = fieldFromInstruction(Insn, 6, 2);
5051 if (fieldFromInstruction(Insn, 4, 1))
5053 if (fieldFromInstruction(Insn, 5, 1))
5057 if (fieldFromInstruction(Insn, 5, 1))
5059 index = fieldFromInstruction(Insn, 7, 1);
5060 if (fieldFromInstruction(Insn, 4, 1) != 0)
5062 if (fieldFromInstruction(Insn, 6, 1))
5096 uint64_t
Address,
const void *Decoder) {
5099 unsigned Rn = fieldFromInstruction(Insn, 16, 4);
5100 unsigned Rm = fieldFromInstruction(Insn, 0, 4);
5101 unsigned Rd = fieldFromInstruction(Insn, 12, 4);
5102 Rd |= fieldFromInstruction(Insn, 22, 1) << 4;
5103 unsigned size = fieldFromInstruction(Insn, 10, 2);
5112 index = fieldFromInstruction(Insn, 5, 3);
5113 if (fieldFromInstruction(Insn, 4, 1))
5117 index = fieldFromInstruction(Insn, 6, 2);
5118 if (fieldFromInstruction(Insn, 4, 1))
5120 if (fieldFromInstruction(Insn, 5, 1))
5124 if (fieldFromInstruction(Insn, 5, 1))
5126 index = fieldFromInstruction(Insn, 7, 1);
5127 if (fieldFromInstruction(Insn, 4, 1) != 0)
5129 if (fieldFromInstruction(Insn, 6, 1))
5159 uint64_t
Address,
const void *Decoder) {
5162 unsigned Rn = fieldFromInstruction(Insn, 16, 4);
5163 unsigned Rm = fieldFromInstruction(Insn, 0, 4);
5164 unsigned Rd = fieldFromInstruction(Insn, 12, 4);
5165 Rd |= fieldFromInstruction(Insn, 22, 1) << 4;
5166 unsigned size = fieldFromInstruction(Insn, 10, 2);
5175 if (fieldFromInstruction(Insn, 4, 1))
5177 index = fieldFromInstruction(Insn, 5, 3);
5180 if (fieldFromInstruction(Insn, 4, 1))
5182 index = fieldFromInstruction(Insn, 6, 2);
5183 if (fieldFromInstruction(Insn, 5, 1))
5187 if (fieldFromInstruction(Insn, 4, 2))
5189 index = fieldFromInstruction(Insn, 7, 1);
5190 if (fieldFromInstruction(Insn, 6, 1))
5229 uint64_t
Address,
const void *Decoder) {
5232 unsigned Rn = fieldFromInstruction(Insn, 16, 4);
5233 unsigned Rm = fieldFromInstruction(Insn, 0, 4);
5234 unsigned Rd = fieldFromInstruction(Insn, 12, 4);
5235 Rd |= fieldFromInstruction(Insn, 22, 1) << 4;
5236 unsigned size = fieldFromInstruction(Insn, 10, 2);
5245 if (fieldFromInstruction(Insn, 4, 1))
5247 index = fieldFromInstruction(Insn, 5, 3);
5250 if (fieldFromInstruction(Insn, 4, 1))
5252 index = fieldFromInstruction(Insn, 6, 2);
5253 if (fieldFromInstruction(Insn, 5, 1))
5257 if (fieldFromInstruction(Insn, 4, 2))
5259 index = fieldFromInstruction(Insn, 7, 1);
5260 if (fieldFromInstruction(Insn, 6, 1))
5292 uint64_t
Address,
const void *Decoder) {
5295 unsigned Rn = fieldFromInstruction(Insn, 16, 4);
5296 unsigned Rm = fieldFromInstruction(Insn, 0, 4);
5297 unsigned Rd = fieldFromInstruction(Insn, 12, 4);
5298 Rd |= fieldFromInstruction(Insn, 22, 1) << 4;
5299 unsigned size = fieldFromInstruction(Insn, 10, 2);
5308 if (fieldFromInstruction(Insn, 4, 1))
5310 index = fieldFromInstruction(Insn, 5, 3);
5313 if (fieldFromInstruction(Insn, 4, 1))
5315 index = fieldFromInstruction(Insn, 6, 2);
5316 if (fieldFromInstruction(Insn, 5, 1))
5320 switch (fieldFromInstruction(Insn, 4, 2)) {
5326 align = 4 << fieldFromInstruction(Insn, 4, 2);
break;
5329 index = fieldFromInstruction(Insn, 7, 1);
5330 if (fieldFromInstruction(Insn, 6, 1))
5373 uint64_t
Address,
const void *Decoder) {
5376 unsigned Rn = fieldFromInstruction(Insn, 16, 4);
5377 unsigned Rm = fieldFromInstruction(Insn, 0, 4);
5378 unsigned Rd = fieldFromInstruction(Insn, 12, 4);
5379 Rd |= fieldFromInstruction(Insn, 22, 1) << 4;
5380 unsigned size = fieldFromInstruction(Insn, 10, 2);
5389 if (fieldFromInstruction(Insn, 4, 1))
5391 index = fieldFromInstruction(Insn, 5, 3);
5394 if (fieldFromInstruction(Insn, 4, 1))
5396 index = fieldFromInstruction(Insn, 6, 2);
5397 if (fieldFromInstruction(Insn, 5, 1))
5401 switch (fieldFromInstruction(Insn, 4, 2)) {
5407 align = 4 << fieldFromInstruction(Insn, 4, 2);
break;
5410 index = fieldFromInstruction(Insn, 7, 1);
5411 if (fieldFromInstruction(Insn, 6, 1))
5445 uint64_t
Address,
const void *Decoder) {
5447 unsigned Rt = fieldFromInstruction(Insn, 12, 4);
5448 unsigned Rt2 = fieldFromInstruction(Insn, 16, 4);
5449 unsigned Rm = fieldFromInstruction(Insn, 5, 1);
5450 unsigned pred = fieldFromInstruction(Insn, 28, 4);
5451 Rm |= fieldFromInstruction(Insn, 0, 4) << 1;
5453 if (Rt == 0xF || Rt2 == 0xF || Rm == 0x1F)
5471 uint64_t
Address,
const void *Decoder) {
5473 unsigned Rt = fieldFromInstruction(Insn, 12, 4);
5474 unsigned Rt2 = fieldFromInstruction(Insn, 16, 4);
5475 unsigned Rm = fieldFromInstruction(Insn, 5, 1);
5476 unsigned pred = fieldFromInstruction(Insn, 28, 4);
5477 Rm |= fieldFromInstruction(Insn, 0, 4) << 1;
5479 if (Rt == 0xF || Rt2 == 0xF || Rm == 0x1F)
5497 uint64_t
Address,
const void *Decoder) {
5499 unsigned pred = fieldFromInstruction(Insn, 4, 4);
5500 unsigned mask = fieldFromInstruction(Insn, 0, 4);
5515 unsigned LowBit = mask & -mask;
5516 unsigned BitsAboveLowBit = 0xF & (-LowBit << 1);
5517 mask ^= BitsAboveLowBit;
5527 uint64_t
Address,
const void *Decoder) {
5530 unsigned Rt = fieldFromInstruction(Insn, 12, 4);
5531 unsigned Rt2 = fieldFromInstruction(Insn, 8, 4);
5532 unsigned Rn = fieldFromInstruction(Insn, 16, 4);
5533 unsigned addr = fieldFromInstruction(Insn, 0, 8);
5534 unsigned W = fieldFromInstruction(Insn, 21, 1);
5535 unsigned U = fieldFromInstruction(Insn, 23, 1);
5536 unsigned P = fieldFromInstruction(Insn, 24, 1);
5537 bool writeback = (W == 1) | (P == 0);
5539 addr |= (U << 8) | (Rn << 9);
5541 if (writeback && (Rn == Rt || Rn == Rt2))
5564 uint64_t
Address,
const void *Decoder) {
5567 unsigned Rt = fieldFromInstruction(Insn, 12, 4);
5568 unsigned Rt2 = fieldFromInstruction(Insn, 8, 4);
5569 unsigned Rn = fieldFromInstruction(Insn, 16, 4);
5570 unsigned addr = fieldFromInstruction(Insn, 0, 8);
5571 unsigned W = fieldFromInstruction(Insn, 21, 1);
5572 unsigned U = fieldFromInstruction(Insn, 23, 1);
5573 unsigned P = fieldFromInstruction(Insn, 24, 1);
5574 bool writeback = (W == 1) | (P == 0);
5576 addr |= (U << 8) | (Rn << 9);
5578 if (writeback && (Rn == Rt || Rn == Rt2))
5598 uint64_t
Address,
const void *Decoder) {
5599 unsigned sign1 = fieldFromInstruction(Insn, 21, 1);
5600 unsigned sign2 = fieldFromInstruction(Insn, 23, 1);
5602 const unsigned Rd = fieldFromInstruction(Insn, 8, 4);
5606 unsigned Val = fieldFromInstruction(Insn, 0, 8);
5607 Val |= fieldFromInstruction(Insn, 12, 3) << 8;
5608 Val |= fieldFromInstruction(Insn, 26, 1) << 11;
5625 const void *Decoder) {
5635 uint64_t
Address,
const void *Decoder) {
5636 unsigned Rt = fieldFromInstruction(Insn, 12, 4);
5637 unsigned Rt2 = fieldFromInstruction(Insn, 0, 4);
5638 unsigned Rn = fieldFromInstruction(Insn, 16, 4);
5639 unsigned pred = fieldFromInstruction(Insn, 28, 4);
5646 if (Rt == Rn || Rn == Rt2)
5662 uint64_t
Address,
const void *Decoder) {
5664 ((
const MCDisassembler *)Decoder)->getSubtargetInfo().getFeatureBits();
5665 bool hasFullFP16 = featureBits[ARM::FeatureFullFP16];
5667 unsigned Vd = (fieldFromInstruction(Insn, 12, 4) << 0);
5668 Vd |= (fieldFromInstruction(Insn, 22, 1) << 4);
5669 unsigned Vm = (fieldFromInstruction(Insn, 0, 4) << 0);
5670 Vm |= (fieldFromInstruction(Insn, 5, 1) << 4);
5671 unsigned imm = fieldFromInstruction(Insn, 16, 6);
5672 unsigned cmode = fieldFromInstruction(Insn, 8, 4);
5673 unsigned op = fieldFromInstruction(Insn, 5, 1);
5678 if (!(imm & 0x38)) {
5721 uint64_t
Address,
const void *Decoder) {
5723 ((
const MCDisassembler *)Decoder)->getSubtargetInfo().getFeatureBits();
5724 bool hasFullFP16 = featureBits[ARM::FeatureFullFP16];
5726 unsigned Vd = (fieldFromInstruction(Insn, 12, 4) << 0);
5727 Vd |= (fieldFromInstruction(Insn, 22, 1) << 4);
5728 unsigned Vm = (fieldFromInstruction(Insn, 0, 4) << 0);
5729 Vm |= (fieldFromInstruction(Insn, 5, 1) << 4);
5730 unsigned imm = fieldFromInstruction(Insn, 16, 6);
5731 unsigned cmode = fieldFromInstruction(Insn, 8, 4);
5732 unsigned op = fieldFromInstruction(Insn, 5, 1);
5737 if (!(imm & 0x38)) {
5782 const void *Decoder) {
5783 unsigned Vd = (fieldFromInstruction(Insn, 12, 4) << 0);
5784 Vd |= (fieldFromInstruction(Insn, 22, 1) << 4);
5785 unsigned Vn = (fieldFromInstruction(Insn, 16, 4) << 0);
5786 Vn |= (fieldFromInstruction(Insn, 7, 1) << 4);
5787 unsigned Vm = (fieldFromInstruction(Insn, 0, 4) << 0);
5788 Vm |= (fieldFromInstruction(Insn, 5, 1) << 4);
5789 unsigned q = (fieldFromInstruction(Insn, 6, 1) << 0);
5790 unsigned rotate = (fieldFromInstruction(Insn, 20, 2) << 0);
5796 if (!
Check(S, DestRegDecoder(Inst, Vd, Address, Decoder)))
5798 if (!
Check(S, DestRegDecoder(Inst, Vd, Address, Decoder)))
5800 if (!
Check(S, DestRegDecoder(Inst, Vn, Address, Decoder)))
5813 uint64_t
Address,
const void *Decoder) {
5816 unsigned Rn = fieldFromInstruction(Val, 16, 4);
5817 unsigned Rt = fieldFromInstruction(Val, 12, 4);
5818 unsigned Rm = fieldFromInstruction(Val, 0, 4);
5819 Rm |= (fieldFromInstruction(Val, 23, 1) << 4);
5820 unsigned Cond = fieldFromInstruction(Val, 28, 4);
5822 if (fieldFromInstruction(Val, 8, 4) != 0 || Rn == Rt)
5840 uint64_t
Address,
const void *Decoder) {
5843 unsigned CRm = fieldFromInstruction(Val, 0, 4);
5844 unsigned opc1 = fieldFromInstruction(Val, 4, 4);
5845 unsigned cop = fieldFromInstruction(Val, 8, 4);
5846 unsigned Rt = fieldFromInstruction(Val, 12, 4);
5847 unsigned Rt2 = fieldFromInstruction(Val, 16, 4);
5849 if ((cop & ~0x1) == 0xa)
5886 const void *Decoder) {
5888 ((
const MCDisassembler *)Decoder)->getSubtargetInfo().getFeatureBits();
5894 case ARM::VMSR_FPSCR_NZCVQC:
5903 unsigned Rt = fieldFromInstruction(Val, 12, 4);
5905 if (featureBits[ARM::ModeThumb] && !featureBits[ARM::HasV8Ops]) {
5906 if (Rt == 13 || Rt == 15)
5915 case ARM::VMRS_FPSCR_NZCVQC:
5923 if (featureBits[ARM::ModeThumb]) {
5927 unsigned pred = fieldFromInstruction(Val, 28, 4);
5935 template <
bool isSigned,
bool isNeg,
bool zeroPermitted,
int size>
5938 const void *Decoder) {
5940 if (Val == 0 && !zeroPermitted)
5945 DecVal = SignExtend32<size + 1>(Val << 1);
5947 DecVal = (Val << 1);
5957 const void *Decoder) {
5960 Val = LocImm + (2 << Val);
5969 const void *Decoder) {
5977 const void *Decoder) {
5983 unsigned Imm = fieldFromInstruction(Insn, 11, 1) |
5984 fieldFromInstruction(Insn, 1, 10) << 1;
5986 case ARM::t2LEUpdate:
5992 if (!
Check(S, DecodeBFLabelOperand<false, true, true, 11>(
5993 Inst, Imm, Address, Decoder)))
5997 case ARM::MVE_WLSTP_8:
5998 case ARM::MVE_WLSTP_16:
5999 case ARM::MVE_WLSTP_32:
6000 case ARM::MVE_WLSTP_64:
6004 Address, Decoder)) ||
6005 !
Check(S, DecodeBFLabelOperand<false, false, true, 11>(
6006 Inst, Imm, Address, Decoder)))
6010 case ARM::MVE_DLSTP_8:
6011 case ARM::MVE_DLSTP_16:
6012 case ARM::MVE_DLSTP_32:
6013 case ARM::MVE_DLSTP_64:
6014 unsigned Rn = fieldFromInstruction(Insn, 16, 4);
6019 uint32_t CanonicalLCTP = 0xF00FE001, SBZMask = 0x00300FFE;
6020 if ((Insn & ~SBZMask) != CanonicalLCTP)
6022 if (Insn != CanonicalLCTP)
6029 fieldFromInstruction(Insn, 16, 4),
6040 const void *Decoder) {
6052 uint64_t
Address,
const void *Decoder) {
6053 if ((RegNo) + 1 > 11)
6056 unsigned Register = GPRDecoderTable[(RegNo) + 1];
6062 uint64_t
Address,
const void *Decoder) {
6066 unsigned Register = GPRDecoderTable[(RegNo)];
6072 const void *Decoder) {
6077 if (Inst.
getOpcode() == ARM::VSCCLRMD) {
6078 unsigned reglist = (fieldFromInstruction(Insn, 1, 7) << 1) |
6079 (fieldFromInstruction(Insn, 12, 4) << 8) |
6080 (fieldFromInstruction(Insn, 22, 1) << 12);
6085 unsigned reglist = fieldFromInstruction(Insn, 0, 8) |
6086 (fieldFromInstruction(Insn, 22, 1) << 8) |
6087 (fieldFromInstruction(Insn, 12, 4) << 9);
6099 const void *Decoder) {
6103 unsigned Register = QPRDecoderTable[RegNo];
6109 ARM::Q0_Q1, ARM::Q1_Q2, ARM::Q2_Q3, ARM::Q3_Q4,
6110 ARM::Q4_Q5, ARM::Q5_Q6, ARM::Q6_Q7
6115 const void *Decoder) {
6119 unsigned Register = QQPRDecoderTable[RegNo];
6125 ARM::Q0_Q1_Q2_Q3, ARM::Q1_Q2_Q3_Q4, ARM::Q2_Q3_Q4_Q5,
6126 ARM::Q3_Q4_Q5_Q6, ARM::Q4_Q5_Q6_Q7
6131 const void *Decoder) {
6135 unsigned Register = QQQQPRDecoderTable[RegNo];
6142 const void *Decoder) {
6150 unsigned CurBit = 0;
6151 for (
int i = 3; i >= 0; --i) {
6154 CurBit ^= (Val >> i) & 1U;
6157 Imm |= (CurBit << i);
6160 if ((Val & ~(~0U << i)) == 0) {
6172 uint64_t
Address,
const void *Decoder) {
6186 const void *Decoder) {
6194 const void *Decoder) {
6196 switch (Val & 0x3) {
6217 const void *Decoder) {
6224 const void *Decoder) {
6254 uint64_t
Address,
const void *Decoder) {
6257 unsigned DecodedVal = 64 - Val;
6260 case ARM::MVE_VCVTf16s16_fix:
6261 case ARM::MVE_VCVTs16f16_fix:
6262 case ARM::MVE_VCVTf16u16_fix:
6263 case ARM::MVE_VCVTu16f16_fix:
6264 if (DecodedVal > 16)
6267 case ARM::MVE_VCVTf32s32_fix:
6268 case ARM::MVE_VCVTs32f32_fix:
6269 case ARM::MVE_VCVTf32u32_fix:
6270 case ARM::MVE_VCVTu32f32_fix:
6271 if (DecodedVal > 32)
6283 case ARM::VSTR_P0_off:
6284 case ARM::VSTR_P0_pre:
6285 case ARM::VSTR_P0_post:
6286 case ARM::VLDR_P0_off:
6287 case ARM::VLDR_P0_pre:
6288 case ARM::VLDR_P0_post:
6295 template<
bool Writeback>
6298 const void *Decoder) {
6300 case ARM::VSTR_FPSCR_pre:
6301 case ARM::VSTR_FPSCR_NZCVQC_pre:
6302 case ARM::VLDR_FPSCR_pre:
6303 case ARM::VLDR_FPSCR_NZCVQC_pre:
6304 case ARM::VSTR_FPSCR_off:
6305 case ARM::VSTR_FPSCR_NZCVQC_off:
6306 case ARM::VLDR_FPSCR_off:
6307 case ARM::VLDR_FPSCR_NZCVQC_off:
6308 case ARM::VSTR_FPSCR_post:
6309 case ARM::VSTR_FPSCR_NZCVQC_post:
6310 case ARM::VLDR_FPSCR_post:
6311 case ARM::VLDR_FPSCR_NZCVQC_post:
6313 ((
const MCDisassembler *)Decoder)->getSubtargetInfo().getFeatureBits();
6315 if (!featureBits[ARM::HasMVEIntegerOps] && !featureBits[ARM::FeatureVFP2])
6322 unsigned Rn = fieldFromInstruction(Val, 16, 4);
6323 unsigned addr = fieldFromInstruction(Val, 0, 7) |
6324 (fieldFromInstruction(Val, 23, 1) << 7) | (Rn << 8);
6340 MCInst &Inst,
unsigned Val, uint64_t
Address,
const void *Decoder,
6344 unsigned Qd = fieldFromInstruction(Val, 13, 3);
6345 unsigned addr = fieldFromInstruction(Val, 0, 7) |
6346 (fieldFromInstruction(Val, 23, 1) << 7) | (Rn << 8);
6348 if (!
Check(S, RnDecoder(Inst, Rn, Address, Decoder)))
6352 if (!
Check(S, AddrDecoder(Inst, addr, Address, Decoder)))
6358 template <
int shift>
6360 uint64_t
Address,
const void *Decoder) {
6362 fieldFromInstruction(Val, 16, 3),
6364 DecodeTAddrModeImm7<shift>);
6367 template <
int shift>
6369 uint64_t
Address,
const void *Decoder) {
6371 fieldFromInstruction(Val, 16, 4),
6373 DecodeT2AddrModeImm7<shift,1>);
6376 template <
int shift>
6378 uint64_t
Address,
const void *Decoder) {
6380 fieldFromInstruction(Val, 17, 3),
6382 DecodeMveAddrModeQ<shift>);
6385 template<
unsigned MinLog,
unsigned MaxLog>
6388 const void *Decoder) {
6391 if (Val < MinLog || Val > MaxLog)
6398 template <
int shift>
6401 const void *Decoder) {
6408 template<
unsigned start>
6411 const void *Decoder) {
6420 uint64_t
Address,
const void *Decoder) {
6422 unsigned Rt = fieldFromInstruction(Insn, 0, 4);
6423 unsigned Rt2 = fieldFromInstruction(Insn, 16, 4);
6424 unsigned Qd = ((fieldFromInstruction(Insn, 22, 1) << 3) |
6425 fieldFromInstruction(Insn, 13, 3));
6426 unsigned index = fieldFromInstruction(Insn, 4, 1);
6434 if (!
Check(S, DecodeMVEPairVectorIndexOperand<2>(Inst, index, Address, Decoder)))
6436 if (!
Check(S, DecodeMVEPairVectorIndexOperand<0>(Inst, index, Address, Decoder)))
6443 uint64_t
Address,
const void *Decoder) {
6445 unsigned Rt = fieldFromInstruction(Insn, 0, 4);
6446 unsigned Rt2 = fieldFromInstruction(Insn, 16, 4);
6447 unsigned Qd = ((fieldFromInstruction(Insn, 22, 1) << 3) |
6448 fieldFromInstruction(Insn, 13, 3));
6449 unsigned index = fieldFromInstruction(Insn, 4, 1);
6459 if (!
Check(S, DecodeMVEPairVectorIndexOperand<2>(Inst, index, Address, Decoder)))
6461 if (!
Check(S, DecodeMVEPairVectorIndexOperand<0>(Inst, index, Address, Decoder)))
6468 MCInst &Inst,
unsigned Insn, uint64_t
Address,
const void *Decoder) {
6471 unsigned RdaLo = fieldFromInstruction(Insn, 17, 3) << 1;
6472 unsigned RdaHi = fieldFromInstruction(Insn, 9, 3) << 1;
6473 unsigned Rm = fieldFromInstruction(Insn, 12, 4);
6481 unsigned Rda = fieldFromInstruction(Insn, 16, 4);
6484 case ARM::MVE_ASRLr:
6485 case ARM::MVE_SQRSHRL:
6488 case ARM::MVE_LSLLr:
6489 case ARM::MVE_UQRSHLL:
6508 if (fieldFromInstruction (Insn, 6, 3) != 4)
6536 if (Inst.
getOpcode() == ARM::MVE_SQRSHRL ||
6538 unsigned Saturate = fieldFromInstruction(Insn, 7, 1);
6547 const void *Decoder) {
6549 unsigned Qd = ((fieldFromInstruction(Insn, 22, 1) << 3) |
6550 fieldFromInstruction(Insn, 13, 3));
6551 unsigned Qm = ((fieldFromInstruction(Insn, 5, 1) << 3) |
6552 fieldFromInstruction(Insn, 1, 3));
6553 unsigned imm6 = fieldFromInstruction(Insn, 16, 6);
6565 template<
bool scalar, OperandDecoder predicate_decoder>
6567 const void *Decoder) {
6570 unsigned Qn = fieldFromInstruction(Insn, 17, 3);
6577 fc = fieldFromInstruction(Insn, 12, 1) << 2 |
6578 fieldFromInstruction(Insn, 7, 1) |
6579 fieldFromInstruction(Insn, 5, 1) << 1;
6580 unsigned Rm = fieldFromInstruction(Insn, 0, 4);
6584 fc = fieldFromInstruction(Insn, 12, 1) << 2 |
6585 fieldFromInstruction(Insn, 7, 1) |
6586 fieldFromInstruction(Insn, 0, 1) << 1;
6587 unsigned Qm = fieldFromInstruction(Insn, 5, 1) << 4 |
6588 fieldFromInstruction(Insn, 1, 3);
6593 if (!
Check(S, predicate_decoder(Inst, fc, Address, Decoder)))
6604 const void *Decoder) {
6607 unsigned Rn = fieldFromInstruction(Insn, 16, 4);
6614 const void *Decoder) {
6622 uint64_t
Address,
const void *Decoder) {
6623 const unsigned Rd = fieldFromInstruction(Insn, 8, 4);
6624 const unsigned Rn = fieldFromInstruction(Insn, 16, 4);
6625 const unsigned Imm12 = fieldFromInstruction(Insn, 26, 1) << 11 |
6626 fieldFromInstruction(Insn, 12, 3) << 8 |
6627 fieldFromInstruction(Insn, 0, 8);
6628 const unsigned TypeT3 = fieldFromInstruction(Insn, 25, 1);
6629 unsigned sign1 = fieldFromInstruction(Insn, 21, 1);
6630 unsigned sign2 = fieldFromInstruction(Insn, 23, 1);
6631 unsigned S = fieldFromInstruction(Insn, 20, 1);
6642 Inst.
setOpcode(sign1 ? ARM::t2SUBspImm12 : ARM::t2ADDspImm12);
6646 Inst.
setOpcode(sign1 ? ARM::t2SUBspImm : ARM::t2ADDspImm);
static DecodeStatus DecodeVSTInstruction(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static MCDisassembler * createARMDisassembler(const Target &T, const MCSubtargetInfo &STI, MCContext &Ctx)
static DecodeStatus DecodeT2LoadImm12(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeT2AddrModeSOReg(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeAddrMode3Instruction(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeThumbBROperand(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static const uint16_t GPRPairDecoderTable[]
static bool isVectorPredicable(unsigned Opcode)
static DecodeStatus DecodeThumbAddrModePC(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
This class represents lattice values for constants.
static DecodeStatus DecodeArmMOVTWInstruction(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeVLDST1Instruction(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeAddrModeImm12Operand(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeInstSyncBarrierOption(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
DecodeStatus
Ternary decode status.
static DecodeStatus DecodeBFLabelOperand(MCInst &Inst, unsigned val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeVLD1DupInstruction(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
Superclass for all disassemblers.
static DecodeStatus DecodeSTRPreReg(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
bool tryAddingSymbolicOperand(MCInst &Inst, int64_t Value, uint64_t Address, bool IsBranch, uint64_t Offset, uint64_t InstSize) const
static DecodeStatus DecodeThumb2BCCInstruction(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeSORegRegOperand(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
Describe properties that are true of each instruction in the target description file.
static DecodeStatus DecodeRegListOperand(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static const uint16_t CLRMGPRDecoderTable[]
static DecodeStatus DecodeAddrMode7Operand(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeDPRRegListOperand(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeRFEInstruction(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeT2LDRDPreInstruction(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static const uint16_t GPRDecoderTable[]
static DecodeStatus DecodeVCVTQ(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeExpandedImmOperand(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeMVE_MEM_2_pre(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static void RegisterMCDisassembler(Target &T, Target::MCDisassemblerCtorTy Fn)
RegisterMCDisassembler - Register a MCDisassembler implementation for the given target.
static DecodeStatus DecodeT2Imm7S4(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeShiftRight64Imm(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeT2AddrModeImm7s4(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeVLD2LN(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeDPR_8RegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
Target & getTheThumbLETarget()
static DecodeStatus DecodeVMOVSRR(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeBranchImmInstruction(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeGPRwithZRnospRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeVpredROperand(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeMVEVCVTt1fp(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeDPairRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeMVEVMOVDRegtoQ(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
amode Optimize addressing mode
static DecodeStatus DecodeT2Imm7(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeMQPRRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeShiftRight8Imm(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static MCOperand createReg(unsigned Reg)
static DecodeStatus DecodeAddrMode5FP16Operand(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
const FeatureBitset & getFeatureBits() const
static DecodeStatus DecodeVLD1LN(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeThumbBCCTargetOperand(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static bool isVPTOpcode(int Opc)
static DecodeStatus DecodeT2ShifterImmOperand(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodetGPRRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeT2AddrModeImm0_1020s4(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodetGPREvenRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeT2CPSInstruction(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static bool Check(DecodeStatus &Out, DecodeStatus In)
static const uint16_t DPairSpacedDecoderTable[]
static DecodeStatus DecodeMVEVPNOT(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeCPSInstruction(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeTBLInstruction(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeRestrictedIPredicateOperand(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodePostIdxReg(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeQQPRRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
static DecodeStatus DecodePredNoALOperand(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
Target & getTheARMBETarget()
static DecodeStatus DecodeT2AddrModeImm7(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeHPRRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
unsigned getReg() const
Returns the register number.
Context object for machine code objects.
static DecodeStatus DecodeDPR_VFP2RegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
Target & getTheThumbBETarget()
static DecodeStatus DecodeVLD4LN(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeT2LoadT(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeThumbAddrModeIS(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeMveAddrModeRQ(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeT2AddSubSPImm(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static const uint16_t SPRDecoderTable[]
static DecodeStatus checkDecodedInstruction(MCInst &MI, uint64_t &Size, uint64_t Address, raw_ostream &CS, uint32_t Insn, DecodeStatus Result)
static DecodeStatus DecodeBitfieldMaskOperand(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
iterator insert(iterator I, const MCOperand &Op)
static DecodeStatus DecodeSwap(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
Instances of this class represent a single low-level machine instruction.
static DecodeStatus DecodeThumbAddSpecialReg(MCInst &Inst, uint16_t Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeThumbTableBranch(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
unsigned short NumOperands
static DecodeStatus DecodeLDRPreReg(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeCoprocessor(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
void tryAddingPcLoadReferenceComment(int64_t Value, uint64_t Address) const
static DecodeStatus DecodeVPTMaskOperand(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeLDRPreImm(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static const uint16_t DPRDecoderTable[]
static DecodeStatus DecodeT2MOVTWInstruction(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
unsigned getAM5Opc(AddrOpc Opc, unsigned char Offset)
getAM5Opc - This function encodes the addrmode5 opc field.
static DecodeStatus DecoderGPRRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeTAddrModeImm7(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
LLVM_EXTERNAL_VISIBILITY void LLVMInitializeARMDisassembler()
const MCInstrDesc ARMInsts[]
Container class for subtarget features.
static DecodeStatus DecodeT2LdStPre(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeCopMemInstruction(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
constexpr bool isPowerOf2_32(uint32_t Value)
Return true if the argument is a power of two > 0.
static const uint16_t DPairDecoderTable[]
static DecodeStatus DecodeT2Imm8S4(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeVLD2DupInstruction(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeMVEVMOVQtoDReg(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeBankedReg(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeT2SOImm(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
size_t size() const
size - Get the array size.
static DecodeStatus DecodeSPRRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
static const uint16_t QPRDecoderTable[]
static DecodeStatus DecodeT2LoadLabel(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeGPRwithZRRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeSORegImmOperand(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeVSHLMaxInstruction(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeVCVTImmOperand(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeT2AddrModeImm8(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeMVE_MEM_pre(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder, unsigned Rn, OperandDecoder RnDecoder, OperandDecoder AddrDecoder)
static DecodeStatus DecodeT2BInstruction(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeThumbBLXOffset(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
unsigned getNumOperands() const
static DecodeStatus DecodeHINTInstruction(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeThumbCmpBROperand(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
bool isPredicable() const
Return true if this instruction has a predicate operand that controls execution.
SmallVectorImpl< MCOperand >::iterator iterator
static DecodeStatus DecodeGPRRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeVLD3DupInstruction(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeLOLoop(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeVLDST3Instruction(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodePowerTwoOperand(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeMVEModImmInstruction(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static const uint16_t QQPRDecoderTable[]
static DecodeStatus DecodeThumbAddSPReg(MCInst &Inst, uint16_t Insn, uint64_t Address, const void *Decoder)
static bool isValidCoprocessorNumber(unsigned Num, const FeatureBitset &featureBits)
isValidCoprocessorNumber - decide whether an explicit coprocessor number is legal in generic instruct...
static DecodeStatus DecodeVST2LN(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodetcGPRRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
static DecodeStatus DecodeRestrictedSPredicateOperand(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeMVEOverlappingLongShift(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeVSTRVLDR_SYSREG(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
DecodeStatus OperandDecoder(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
int getOperandConstraint(unsigned OpNum, MCOI::OperandConstraint Constraint) const
Returns the value of the specific constraint if it is set.
static DecodeStatus DecodeBFAfterTargetOperand(MCInst &Inst, unsigned val, uint64_t Address, const void *Decoder)
void setOpcode(unsigned Op)
static DecodeStatus DecodeRestrictedUPredicateOperand(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeMVE_MEM_3_pre(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
auto size(R &&Range, typename std::enable_if< std::is_same< typename std::iterator_traits< decltype(Range.begin())>::iterator_category, std::random_access_iterator_tag >::value, void >::type *=nullptr) -> decltype(std::distance(Range.begin(), Range.end()))
Get the size of a range.
static DecodeStatus DecodeAddrMode6Operand(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeDoubleRegStore(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
Align max(MaybeAlign Lhs, Align Rhs)
unsigned getAM5FP16Opc(AddrOpc Opc, unsigned char Offset)
getAM5FP16Opc - This function encodes the addrmode5fp16 opc field.
static DecodeStatus DecodeThumbBLTargetOperand(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
unsigned getAM2Opc(AddrOpc Opc, unsigned Imm12, ShiftOpc SO, unsigned IdxMode=0)
static uint64_t add(uint64_t LeftOp, uint64_t RightOp)
static DecodeStatus DecodeT2LoadImm8(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecoderForMRRC2AndMCRR2(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeVSCCLRM(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small...
static DecodeStatus DecodeMVEPairVectorIndexOperand(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
const MCOperand & getOperand(unsigned i) const
static DecodeStatus DecodeTSTInstruction(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeIT(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeT2BROperand(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeMemMultipleWritebackInstruction(MCInst &Inst, unsigned Insn, uint64_t Adddress, const void *Decoder)
static DecodeStatus DecodeForVMRSandVMSR(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
bool isVpred(OperandType op)
static DecodeStatus DecodeQADDInstruction(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static void AddThumb1SBit(MCInst &MI, bool InITBlock)
static unsigned FixedRegForVSTRVLDR_SYSREG(unsigned Opcode)
#define LLVM_EXTERNAL_VISIBILITY
static const uint16_t QQQQPRDecoderTable[]
static DecodeStatus DecodeDoubleRegLoad(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeAddrMode5Operand(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeSPRRegListOperand(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
Target - Wrapper for Target specific information.
static DecodeStatus DecodeSTRPreImm(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodePredicateOperand(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeMVEVADCInstruction(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeCLRMGPRRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeRestrictedFPPredicateOperand(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeMveAddrModeQ(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeNEONComplexLane64Instruction(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
OperandType
Operands are tagged with one of the values of this enum.
static DecodeStatus DecodeT2Imm8(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeLDR(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeMVE_MEM_1_pre(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeVLDInstruction(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
int16_t RegClass
This specifies the register class enumeration of the operand if the operand is a register.
static DecodeStatus DecodetGPROddRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeT2AddrModeImm8s4(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeVMOVRRS(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeDPairSpacedRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeThumbAddrModeRR(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeVST1LN(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeThumbAddrModeSP(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeVLDST4Instruction(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
Generic base class for all target subtargets.
static DecodeStatus DecodeCCOutOperand(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeGPRwithAPSRRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeMSRMask(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeVCVTD(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeGPRspRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeGPRnopcRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeVLD4DupInstruction(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeMVEVCMP(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
static bool isBranch(unsigned Opcode)
static DecodeStatus DecodeVST4LN(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeThumbAddSPImm(MCInst &Inst, uint16_t Val, uint64_t Address, const void *Decoder)
LLVM Value Representation.
static DecodeStatus DecodeT2LoadShift(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
#define LLVM_FALLTHROUGH
LLVM_FALLTHROUGH - Mark fallthrough cases in switch statements.
const MCOperandInfo * OpInfo
std::underlying_type< E >::type Mask()
Get a bitmask with 1s in all places up to the high-order bit of E's largest value.
static DecodeStatus DecodeSETPANInstruction(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
const MCSubtargetInfo & getSubtargetInfo() const
static DecodeStatus DecodeSORegMemOperand(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
This class implements an extremely fast bulk output stream that can only output to a stream...
static DecodeStatus DecodeT2STRDPreInstruction(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeQPRRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeDPRRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
void addOperand(const MCOperand &Op)
static DecodeStatus DecodeQQQQPRRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
static void tryAddingPcLoadReferenceComment(uint64_t Address, int Value, const void *Decoder)
tryAddingPcLoadReferenceComment - trys to add a comment as to what is being referenced by a load inst...
static DecodeStatus DecodeVST3LN(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeT2Adr(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeShiftRight32Imm(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
Target & getTheARMLETarget()
This holds information about one operand of a machine instruction, indicating the register class for ...
unsigned getOpcode() const
static DecodeStatus DecodeGPRPairRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeLongShiftOperand(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeThumbCPS(MCInst &Inst, uint16_t Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeMemBarrierOption(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeShiftRight16Imm(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeVMOVModImmInstruction(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static MCOperand createImm(int64_t Val)
static DecodeStatus DecodeVLD3LN(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeSPR_8RegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeAddrMode2IdxInstruction(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeT2AddrModeImm12(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeSMLAInstruction(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static bool tryAddingSymbolicOperand(uint64_t Address, int32_t Value, bool isBranch, uint64_t InstSize, MCInst &MI, const void *Decoder)
tryAddingSymbolicOperand - trys to add a symbolic operand in place of the immediate Value in the MCIn...
Wrapper class representing virtual and physical registers.
static DecodeStatus DecodeMveVCTP(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeVLDST2Instruction(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)