33#define DEBUG_TYPE "aarch64-disassembler"
42#define Success MCDisassembler::Success
43#define Fail MCDisassembler::Fail
44#define SoftFail MCDisassembler::SoftFail
46template <
unsigned RegClassID,
unsigned FirstReg,
unsigned NumRegsInClass>
50 if (RegNo > NumRegsInClass - 1)
54 AArch64MCRegisterClasses[RegClassID].getRegister(RegNo + FirstReg);
68 AArch64MCRegisterClasses[AArch64::GPR64x8ClassRegClassID].getRegister(
74template <
unsigned Min,
unsigned Max>
78 unsigned Reg = (RegNo * 2) + Min;
82 AArch64MCRegisterClasses[AArch64::ZPRRegClassID].getRegister(
Reg);
87template <
unsigned Min,
unsigned Max>
90 const void *Decoder) {
91 unsigned Reg = (RegNo * 2) + Min;
96 AArch64MCRegisterClasses[AArch64::ZPR2RegClassID].getRegister(
Reg);
107 AArch64MCRegisterClasses[AArch64::ZPR_KRegClassID].getRegister(RegNo);
114 const void *Decoder) {
118 AArch64MCRegisterClasses[AArch64::ZPR4RegClassID].getRegister(RegNo * 4);
135 {AArch64::ZAH0, AArch64::ZAH1},
136 {AArch64::ZAS0, AArch64::ZAS1, AArch64::ZAS2, AArch64::ZAS3},
137 {AArch64::ZAD0, AArch64::ZAD1, AArch64::ZAD2, AArch64::ZAD3, AArch64::ZAD4,
138 AArch64::ZAD5, AArch64::ZAD6, AArch64::ZAD7},
139 {AArch64::ZAQ0, AArch64::ZAQ1, AArch64::ZAQ2, AArch64::ZAQ3, AArch64::ZAQ4,
140 AArch64::ZAQ5, AArch64::ZAQ6, AArch64::ZAQ7, AArch64::ZAQ8, AArch64::ZAQ9,
141 AArch64::ZAQ10, AArch64::ZAQ11, AArch64::ZAQ12, AArch64::ZAQ13,
142 AArch64::ZAQ14, AArch64::ZAQ15}};
144template <
unsigned NumBitsForTile>
148 unsigned LastReg = (1 << NumBitsForTile) - 1;
158 const void *Decoder) {
159 if ((RegNo * 2) > 14)
162 AArch64MCRegisterClasses[AArch64::PPR2RegClassID].getRegister(RegNo * 2);
189 if (ImmVal > (1 << 16))
204 Inst, ImmVal * 4, Addr, Inst.
getOpcode() != AArch64::LDRXl, 0, 0, 4))
256 Inst, Rd, Address, Decoder);
258 Inst, Rn, Address, Decoder);
261 Inst, Rd, Address, Decoder);
263 Inst, Rn, Address, Decoder);
358 unsigned shift = (shiftHi << 6) | shiftLo;
362 case AArch64::ADDWrs:
363 case AArch64::ADDSWrs:
364 case AArch64::SUBWrs:
365 case AArch64::SUBSWrs:
370 case AArch64::ANDWrs:
371 case AArch64::ANDSWrs:
372 case AArch64::BICWrs:
373 case AArch64::BICSWrs:
374 case AArch64::ORRWrs:
375 case AArch64::ORNWrs:
376 case AArch64::EORWrs:
377 case AArch64::EONWrs: {
379 if (shiftLo >> 5 == 1)
389 case AArch64::ADDXrs:
390 case AArch64::ADDSXrs:
391 case AArch64::SUBXrs:
392 case AArch64::SUBSXrs:
397 case AArch64::ANDXrs:
398 case AArch64::ANDSXrs:
399 case AArch64::BICXrs:
400 case AArch64::BICSXrs:
401 case AArch64::ORRXrs:
402 case AArch64::ORNXrs:
403 case AArch64::EORXrs:
404 case AArch64::EONXrs:
428 case AArch64::MOVZWi:
429 case AArch64::MOVNWi:
430 case AArch64::MOVKWi:
431 if (shift & (1U << 5))
436 case AArch64::MOVZXi:
437 case AArch64::MOVNXi:
438 case AArch64::MOVKXi:
444 if (Inst.
getOpcode() == AArch64::MOVKWi ||
466 case AArch64::PRFMui:
470 case AArch64::STRBBui:
471 case AArch64::LDRBBui:
472 case AArch64::LDRSBWui:
473 case AArch64::STRHHui:
474 case AArch64::LDRHHui:
475 case AArch64::LDRSHWui:
476 case AArch64::STRWui:
477 case AArch64::LDRWui:
481 case AArch64::LDRSBXui:
482 case AArch64::LDRSHXui:
483 case AArch64::LDRSWui:
484 case AArch64::STRXui:
485 case AArch64::LDRXui:
489 case AArch64::LDRQui:
490 case AArch64::STRQui:
494 case AArch64::LDRDui:
495 case AArch64::STRDui:
499 case AArch64::LDRSui:
500 case AArch64::STRSui:
504 case AArch64::LDRHui:
505 case AArch64::STRHui:
509 case AArch64::LDRBui:
510 case AArch64::STRBui:
534 case AArch64::LDRSBWpre:
535 case AArch64::LDRSHWpre:
536 case AArch64::STRBBpre:
537 case AArch64::LDRBBpre:
538 case AArch64::STRHHpre:
539 case AArch64::LDRHHpre:
540 case AArch64::STRWpre:
541 case AArch64::LDRWpre:
542 case AArch64::LDRSBWpost:
543 case AArch64::LDRSHWpost:
544 case AArch64::STRBBpost:
545 case AArch64::LDRBBpost:
546 case AArch64::STRHHpost:
547 case AArch64::LDRHHpost:
548 case AArch64::STRWpost:
549 case AArch64::LDRWpost:
550 case AArch64::LDRSBXpre:
551 case AArch64::LDRSHXpre:
552 case AArch64::STRXpre:
553 case AArch64::LDRSWpre:
554 case AArch64::LDRXpre:
555 case AArch64::LDRSBXpost:
556 case AArch64::LDRSHXpost:
557 case AArch64::STRXpost:
558 case AArch64::LDRSWpost:
559 case AArch64::LDRXpost:
560 case AArch64::LDRQpre:
561 case AArch64::STRQpre:
562 case AArch64::LDRQpost:
563 case AArch64::STRQpost:
564 case AArch64::LDRDpre:
565 case AArch64::STRDpre:
566 case AArch64::LDRDpost:
567 case AArch64::STRDpost:
568 case AArch64::LDRSpre:
569 case AArch64::STRSpre:
570 case AArch64::LDRSpost:
571 case AArch64::STRSpost:
572 case AArch64::LDRHpre:
573 case AArch64::STRHpre:
574 case AArch64::LDRHpost:
575 case AArch64::STRHpost:
576 case AArch64::LDRBpre:
577 case AArch64::STRBpre:
578 case AArch64::LDRBpost:
579 case AArch64::STRBpost:
588 case AArch64::PRFUMi:
592 case AArch64::STURBBi:
593 case AArch64::LDURBBi:
594 case AArch64::LDURSBWi:
595 case AArch64::STURHHi:
596 case AArch64::LDURHHi:
597 case AArch64::LDURSHWi:
598 case AArch64::STURWi:
599 case AArch64::LDURWi:
600 case AArch64::LDTRSBWi:
601 case AArch64::LDTRSHWi:
602 case AArch64::STTRWi:
603 case AArch64::LDTRWi:
604 case AArch64::STTRHi:
605 case AArch64::LDTRHi:
606 case AArch64::LDTRBi:
607 case AArch64::STTRBi:
608 case AArch64::LDRSBWpre:
609 case AArch64::LDRSHWpre:
610 case AArch64::STRBBpre:
611 case AArch64::LDRBBpre:
612 case AArch64::STRHHpre:
613 case AArch64::LDRHHpre:
614 case AArch64::STRWpre:
615 case AArch64::LDRWpre:
616 case AArch64::LDRSBWpost:
617 case AArch64::LDRSHWpost:
618 case AArch64::STRBBpost:
619 case AArch64::LDRBBpost:
620 case AArch64::STRHHpost:
621 case AArch64::LDRHHpost:
622 case AArch64::STRWpost:
623 case AArch64::LDRWpost:
624 case AArch64::STLURBi:
625 case AArch64::STLURHi:
626 case AArch64::STLURWi:
627 case AArch64::LDAPURBi:
628 case AArch64::LDAPURSBWi:
629 case AArch64::LDAPURHi:
630 case AArch64::LDAPURSHWi:
631 case AArch64::LDAPURi:
635 case AArch64::LDURSBXi:
636 case AArch64::LDURSHXi:
637 case AArch64::LDURSWi:
638 case AArch64::STURXi:
639 case AArch64::LDURXi:
640 case AArch64::LDTRSBXi:
641 case AArch64::LDTRSHXi:
642 case AArch64::LDTRSWi:
643 case AArch64::STTRXi:
644 case AArch64::LDTRXi:
645 case AArch64::LDRSBXpre:
646 case AArch64::LDRSHXpre:
647 case AArch64::STRXpre:
648 case AArch64::LDRSWpre:
649 case AArch64::LDRXpre:
650 case AArch64::LDRSBXpost:
651 case AArch64::LDRSHXpost:
652 case AArch64::STRXpost:
653 case AArch64::LDRSWpost:
654 case AArch64::LDRXpost:
655 case AArch64::LDAPURSWi:
656 case AArch64::LDAPURSHXi:
657 case AArch64::LDAPURSBXi:
658 case AArch64::STLURXi:
659 case AArch64::LDAPURXi:
663 case AArch64::LDURQi:
664 case AArch64::STURQi:
665 case AArch64::LDRQpre:
666 case AArch64::STRQpre:
667 case AArch64::LDRQpost:
668 case AArch64::STRQpost:
672 case AArch64::LDURDi:
673 case AArch64::STURDi:
674 case AArch64::LDRDpre:
675 case AArch64::STRDpre:
676 case AArch64::LDRDpost:
677 case AArch64::STRDpost:
681 case AArch64::LDURSi:
682 case AArch64::STURSi:
683 case AArch64::LDRSpre:
684 case AArch64::STRSpre:
685 case AArch64::LDRSpost:
686 case AArch64::STRSpost:
690 case AArch64::LDURHi:
691 case AArch64::STURHi:
692 case AArch64::LDRHpre:
693 case AArch64::STRHpre:
694 case AArch64::LDRHpost:
695 case AArch64::STRHpost:
699 case AArch64::LDURBi:
700 case AArch64::STURBi:
701 case AArch64::LDRBpre:
702 case AArch64::STRBpre:
703 case AArch64::LDRBpost:
704 case AArch64::STRBpost:
719 if (IsLoad && IsIndexed && !IsFP && Rn != 31 && Rt == Rn)
737 case AArch64::STLXRW:
738 case AArch64::STLXRB:
739 case AArch64::STLXRH:
749 case AArch64::LDAXRW:
750 case AArch64::LDAXRB:
751 case AArch64::LDAXRH:
758 case AArch64::STLLRW:
759 case AArch64::STLLRB:
760 case AArch64::STLLRH:
761 case AArch64::LDLARW:
762 case AArch64::LDLARB:
763 case AArch64::LDLARH:
767 case AArch64::STLXRX:
773 case AArch64::LDAXRX:
776 case AArch64::LDLARX:
777 case AArch64::STLLRX:
781 case AArch64::STLXPW:
786 case AArch64::LDAXPW:
793 case AArch64::STLXPX:
798 case AArch64::LDAXPX:
811 if ((Opcode == AArch64::LDAXPW || Opcode == AArch64::LDXPW ||
812 Opcode == AArch64::LDAXPX || Opcode == AArch64::LDXPX) &&
829 bool NeedsDisjointWritebackTransfer =
false;
835 case AArch64::LDPXpost:
836 case AArch64::STPXpost:
837 case AArch64::LDPSWpost:
838 case AArch64::LDPXpre:
839 case AArch64::STPXpre:
840 case AArch64::LDPSWpre:
841 case AArch64::LDPWpost:
842 case AArch64::STPWpost:
843 case AArch64::LDPWpre:
844 case AArch64::STPWpre:
845 case AArch64::LDPQpost:
846 case AArch64::STPQpost:
847 case AArch64::LDPQpre:
848 case AArch64::STPQpre:
849 case AArch64::LDPDpost:
850 case AArch64::STPDpost:
851 case AArch64::LDPDpre:
852 case AArch64::STPDpre:
853 case AArch64::LDPSpost:
854 case AArch64::STPSpost:
855 case AArch64::LDPSpre:
856 case AArch64::STPSpre:
857 case AArch64::STGPpre:
858 case AArch64::STGPpost:
859 case AArch64::LDTPpre:
860 case AArch64::LDTPpost:
861 case AArch64::LDTPQpost:
862 case AArch64::LDTPQpre:
863 case AArch64::STTPpost:
864 case AArch64::STTPpre:
865 case AArch64::STTPQpost:
866 case AArch64::STTPQpre:
875 case AArch64::LDPXpost:
876 case AArch64::STPXpost:
877 case AArch64::LDPSWpost:
878 case AArch64::LDPXpre:
879 case AArch64::STPXpre:
880 case AArch64::LDPSWpre:
881 case AArch64::STGPpre:
882 case AArch64::STGPpost:
883 case AArch64::LDTPpost:
884 case AArch64::LDTPpre:
885 case AArch64::STTPpost:
886 case AArch64::STTPpre:
887 NeedsDisjointWritebackTransfer =
true;
889 case AArch64::LDNPXi:
890 case AArch64::STNPXi:
893 case AArch64::LDPSWi:
897 case AArch64::STTNPXi:
898 case AArch64::LDTNPXi:
904 case AArch64::LDPWpost:
905 case AArch64::STPWpost:
906 case AArch64::LDPWpre:
907 case AArch64::STPWpre:
908 NeedsDisjointWritebackTransfer =
true;
910 case AArch64::LDNPWi:
911 case AArch64::STNPWi:
919 case AArch64::LDNPQi:
920 case AArch64::STNPQi:
921 case AArch64::LDPQpost:
922 case AArch64::STPQpost:
925 case AArch64::LDPQpre:
926 case AArch64::STPQpre:
927 case AArch64::LDTPQi:
928 case AArch64::LDTPQpost:
929 case AArch64::LDTPQpre:
930 case AArch64::LDTNPQi:
931 case AArch64::STTPQi:
932 case AArch64::STTPQpost:
933 case AArch64::STTPQpre:
934 case AArch64::STTNPQi:
940 case AArch64::LDNPDi:
941 case AArch64::STNPDi:
942 case AArch64::LDPDpost:
943 case AArch64::STPDpost:
946 case AArch64::LDPDpre:
947 case AArch64::STPDpre:
953 case AArch64::LDNPSi:
954 case AArch64::STNPSi:
955 case AArch64::LDPSpost:
956 case AArch64::STPSpost:
959 case AArch64::LDPSpre:
960 case AArch64::STPSpre:
973 if (IsLoad && Rt == Rt2)
978 if (NeedsDisjointWritebackTransfer && Rn != 31 && (Rt == Rn || Rt2 == Rn))
996 case AArch64::LDRAAwriteback:
997 case AArch64::LDRABwriteback:
999 Inst, Rn , Addr, Decoder);
1001 case AArch64::LDRAAindexed:
1002 case AArch64::LDRABindexed:
1012 if (writeback && Rt == Rn && Rn != 31) {
1027 unsigned shift = extend & 0x7;
1034 case AArch64::ADDWrx:
1035 case AArch64::SUBWrx:
1043 case AArch64::ADDSWrx:
1044 case AArch64::SUBSWrx:
1052 case AArch64::ADDXrx:
1053 case AArch64::SUBXrx:
1061 case AArch64::ADDSXrx:
1062 case AArch64::SUBSXrx:
1070 case AArch64::ADDXrx64:
1071 case AArch64::SUBXrx64:
1079 case AArch64::SUBSXrx64:
1080 case AArch64::ADDSXrx64:
1103 if (Inst.
getOpcode() == AArch64::ANDSXri)
1108 Inst, Rd, Addr, Decoder);
1115 if (Inst.
getOpcode() == AArch64::ANDSWri)
1120 Inst, Rd, Addr, Decoder);
1151 case AArch64::MOVIv4i16:
1152 case AArch64::MOVIv8i16:
1153 case AArch64::MVNIv4i16:
1154 case AArch64::MVNIv8i16:
1155 case AArch64::MOVIv2i32:
1156 case AArch64::MOVIv4i32:
1157 case AArch64::MVNIv2i32:
1158 case AArch64::MVNIv4i32:
1161 case AArch64::MOVIv2s_msl:
1162 case AArch64::MOVIv4s_msl:
1163 case AArch64::MVNIv2s_msl:
1164 case AArch64::MVNIv4s_msl:
1216 unsigned ShifterVal = (Imm >> 12) & 3;
1217 unsigned ImmVal = Imm & 0xFFF;
1219 if (ShifterVal != 0 && ShifterVal != 1)
1225 Inst, Rd, Addr, Decoder);
1234 Inst, Rd, Addr, Decoder);
1260 return Op1 == 0b000 && (Op2 == 0b000 ||
1271 uint64_t pstate_field = (op1 << 3) | op2;
1279 auto PState = AArch64PState::lookupPStateImm0_15ByEncoding(pstate_field);
1293 uint64_t pstate_field = (crm_high << 6) | (op1 << 3) | op2;
1301 auto PState = AArch64PState::lookupPStateImm0_1ByEncoding(pstate_field);
1337 MCRegister Reg = AArch64MCRegisterClasses[RegClassID].getRegister(RegNo / 2);
1346 Inst, AArch64::WSeqPairsClassRegClassID, RegNo, Addr, Decoder);
1353 Inst, AArch64::XSeqPairsClassRegClassID, RegNo, Addr, Decoder);
1388 if (Inst.
getOpcode() != AArch64::DUPM_ZI)
1398 if (Imm & ~((1LL << Bits) - 1))
1402 if (Imm & (1 << (Bits - 1)))
1403 Imm |= ~((1LL << Bits) - 1);
1410template <
int ElementW
idth>
1414 unsigned Shift = (Imm & 0x100) ? 8 : 0;
1415 if (ElementWidth == 8 && Shift)
1432 if (AArch64SVCR::lookupSVCRByEncoding(Imm)) {
1448 if (Rd == Rs || Rs == Rn || Rd == Rn)
1454 Inst, Rd, Addr, Decoder) ||
1456 Inst, Rs, Addr, Decoder) ||
1458 Inst, Rn, Addr, Decoder) ||
1460 Inst, Rd, Addr, Decoder) ||
1462 Inst, Rs, Addr, Decoder) ||
1464 Inst, Rn, Addr, Decoder))
1479 if (Rd == Rm || Rm == Rn || Rd == Rn)
1485 Inst, Rd, Addr, Decoder) ||
1487 Inst, Rn, Addr, Decoder) ||
1489 Inst, Rd, Addr, Decoder) ||
1491 Inst, Rn, Addr, Decoder) ||
1493 Inst, Rm, Addr, Decoder))
1504 unsigned Mask = 0x18;
1506 if ((Rt & Mask) == Mask)
1521 case AArch64::PRFMroW:
1525 case AArch64::PRFMroX:
1544 Inst, RvBits, Addr, Decoder);
1555#include "AArch64GenDisassemblerTables.inc"
1556#include "AArch64GenInstrInfo.inc"
1573 if (Bytes.
size() < 4)
1579 (Bytes[3] << 24) | (Bytes[2] << 16) | (Bytes[1] << 8) | (Bytes[0] << 0);
1581 const uint8_t *Tables[] = {DecoderTable32, DecoderTableFallback32};
1583 for (
const auto *Table : Tables) {
1585 decodeInstruction(Table,
MI, Insn,
Address,
this,
STI);
1592 for (
unsigned i = 0; i <
Desc.getNumOperands(); i++) {
1594 switch (
Desc.operands()[i].RegClass) {
1597 case AArch64::MPRRegClassID:
1600 case AArch64::MPR8RegClassID:
1603 case AArch64::ZTRRegClassID:
1607 }
else if (
Desc.operands()[i].OperandType ==
1632 std::unique_ptr<MCRelocationInfo> &&RelInfo) {
1634 SymbolLookUp, DisInfo);
static DecodeStatus DecodeUnconditionalBranch(MCInst &Inst, uint32_t insn, uint64_t Addr, const MCDisassembler *Decoder)
static DecodeStatus DecodePCRelLabel16(MCInst &Inst, unsigned Imm, uint64_t Addr, const MCDisassembler *Decoder)
static DecodeStatus DecodeSystemPStateImm0_1Instruction(MCInst &Inst, uint32_t insn, uint64_t Addr, const MCDisassembler *Decoder)
static DecodeStatus DecodeZPRMul2_MinMax(MCInst &Inst, unsigned RegNo, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeVecShiftL64Imm(MCInst &Inst, unsigned Imm, uint64_t Addr, const MCDisassembler *Decoder)
static DecodeStatus DecodeVecShiftL32Imm(MCInst &Inst, unsigned Imm, uint64_t Addr, const MCDisassembler *Decoder)
static MCSymbolizer * createAArch64ExternalSymbolizer(const Triple &TT, LLVMOpInfoCallback GetOpInfo, LLVMSymbolLookupCallback SymbolLookUp, void *DisInfo, MCContext *Ctx, std::unique_ptr< MCRelocationInfo > &&RelInfo)
static DecodeStatus DecodeCPYMemOpInstruction(MCInst &Inst, uint32_t insn, uint64_t Addr, const MCDisassembler *Decoder)
static DecodeStatus DecodeVecShiftR8Imm(MCInst &Inst, unsigned Imm, uint64_t Addr, const MCDisassembler *Decoder)
static DecodeStatus DecodeUnsignedLdStInstruction(MCInst &Inst, uint32_t insn, uint64_t Addr, const MCDisassembler *Decoder)
static DecodeStatus DecodeModImmTiedInstruction(MCInst &Inst, uint32_t insn, uint64_t Addr, const MCDisassembler *Decoder)
static DecodeStatus DecodeFixedPointScaleImm64(MCInst &Inst, unsigned Imm, uint64_t Addr, const MCDisassembler *Decoder)
static DecodeStatus DecodeSystemPStateImm0_15Instruction(MCInst &Inst, uint32_t insn, uint64_t Addr, const MCDisassembler *Decoder)
static DecodeStatus DecodeModImmInstruction(MCInst &Inst, uint32_t insn, uint64_t Addr, const MCDisassembler *Decoder)
static MCDisassembler * createAArch64Disassembler(const Target &T, const MCSubtargetInfo &STI, MCContext &Ctx)
static DecodeStatus DecodeGPR64x8ClassRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeThreeAddrSRegInstruction(MCInst &Inst, uint32_t insn, uint64_t Addr, const MCDisassembler *Decoder)
static const MCPhysReg MatrixZATileDecoderTable[5][16]
static DecodeStatus DecodeXSeqPairsClassRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Addr, const MCDisassembler *Decoder)
static DecodeStatus DecodeExclusiveLdStInstruction(MCInst &Inst, uint32_t insn, uint64_t Addr, const MCDisassembler *Decoder)
static DecodeStatus DecodeVecShiftL16Imm(MCInst &Inst, unsigned Imm, uint64_t Addr, const MCDisassembler *Decoder)
static DecodeStatus DecodeTestAndBranch(MCInst &Inst, uint32_t insn, uint64_t Addr, const MCDisassembler *Decoder)
static DecodeStatus DecodeMatrixTile(MCInst &Inst, unsigned RegNo, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeSImm(MCInst &Inst, uint64_t Imm, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeVecShiftR32ImmNarrow(MCInst &Inst, unsigned Imm, uint64_t Addr, const MCDisassembler *Decoder)
static DecodeStatus DecodeZK(MCInst &Inst, unsigned RegNo, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeAdrInstruction(MCInst &Inst, uint32_t insn, uint64_t Addr, const MCDisassembler *Decoder)
static DecodeStatus DecodePPR2Mul2RegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
static DecodeStatus DecodePairLdStInstruction(MCInst &Inst, uint32_t insn, uint64_t Addr, const MCDisassembler *Decoder)
static DecodeStatus DecodeVecShiftL8Imm(MCInst &Inst, unsigned Imm, uint64_t Addr, const MCDisassembler *Decoder)
static DecodeStatus DecodeSVEIncDecImm(MCInst &Inst, unsigned Imm, uint64_t Addr, const MCDisassembler *Decoder)
static DecodeStatus DecodeVecShiftRImm(MCInst &Inst, unsigned Imm, unsigned Add)
static DecodeStatus DecodeFixedPointScaleImm32(MCInst &Inst, unsigned Imm, uint64_t Addr, const MCDisassembler *Decoder)
static DecodeStatus DecodeMoveImmInstruction(MCInst &Inst, uint32_t insn, uint64_t Addr, const MCDisassembler *Decoder)
static DecodeStatus DecodeVecShiftR64Imm(MCInst &Inst, unsigned Imm, uint64_t Addr, const MCDisassembler *Decoder)
static DecodeStatus DecodePCRelLabel9(MCInst &Inst, unsigned Imm, uint64_t Addr, const MCDisassembler *Decoder)
static DecodeStatus DecodeVecShiftLImm(MCInst &Inst, unsigned Imm, unsigned Add)
static DecodeStatus DecodeVecShiftR16ImmNarrow(MCInst &Inst, unsigned Imm, uint64_t Addr, const MCDisassembler *Decoder)
static DecodeStatus DecodeSVCROp(MCInst &Inst, unsigned Imm, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeWSeqPairsClassRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Addr, const MCDisassembler *Decoder)
static DecodeStatus DecodeVecShiftR64ImmNarrow(MCInst &Inst, unsigned Imm, uint64_t Addr, const MCDisassembler *Decoder)
static DecodeStatus DecodeZPR4Mul4RegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeSMESpillFillInstruction(MCInst &Inst, uint32_t Bits, uint64_t Addr, const MCDisassembler *Decoder)
static DecodeStatus DecodeLogicalImmInstruction(MCInst &Inst, uint32_t insn, uint64_t Addr, const MCDisassembler *Decoder)
MCDisassembler::DecodeStatus DecodeStatus
static DecodeStatus DecodeMSRSystemRegister(MCInst &Inst, unsigned Imm, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeZPR2Mul2RegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
LLVM_ABI LLVM_EXTERNAL_VISIBILITY void LLVMInitializeAArch64Disassembler()
static DecodeStatus DecodeSETMemOpInstruction(MCInst &Inst, uint32_t insn, uint64_t Addr, const MCDisassembler *Decoder)
static DecodeStatus DecodeSVELogicalImmInstruction(MCInst &Inst, uint32_t insn, uint64_t Addr, const MCDisassembler *Decoder)
static DecodeStatus DecodeMemExtend(MCInst &Inst, unsigned Imm, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeSignedLdStInstruction(MCInst &Inst, uint32_t insn, uint64_t Addr, const MCDisassembler *Decoder)
static DecodeStatus DecodeAuthLoadInstruction(MCInst &Inst, uint32_t insn, uint64_t Addr, const MCDisassembler *Decoder)
static DecodeStatus DecodeSyspXzrInstruction(MCInst &Inst, uint32_t insn, uint64_t Addr, const MCDisassembler *Decoder)
static DecodeStatus DecodeFMOVLaneInstruction(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeAddSubERegInstruction(MCInst &Inst, uint32_t insn, uint64_t Addr, const MCDisassembler *Decoder)
static bool isInvalidPState(uint64_t Op1, uint64_t Op2)
static DecodeStatus DecodeSimpleRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeMatrixTileListRegisterClass(MCInst &Inst, unsigned RegMask, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeVecShiftR16Imm(MCInst &Inst, unsigned Imm, uint64_t Addr, const MCDisassembler *Decoder)
static DecodeStatus DecodeVecShiftR32Imm(MCInst &Inst, unsigned Imm, uint64_t Addr, const MCDisassembler *Decoder)
static DecodeStatus DecodeImm8OptLsl(MCInst &Inst, unsigned Imm, uint64_t Addr, const MCDisassembler *Decoder)
static DecodeStatus DecodePRFMRegInstruction(MCInst &Inst, uint32_t insn, uint64_t Addr, const MCDisassembler *Decoder)
static DecodeStatus DecodeAddSubImmShift(MCInst &Inst, uint32_t insn, uint64_t Addr, const MCDisassembler *Decoder)
static DecodeStatus DecodeGPRSeqPairsClassRegisterClass(MCInst &Inst, unsigned RegClassID, unsigned RegNo, uint64_t Addr, const MCDisassembler *Decoder)
static DecodeStatus DecodeMRSSystemRegister(MCInst &Inst, unsigned Imm, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodePCRelLabel19(MCInst &Inst, unsigned Imm, uint64_t Addr, const MCDisassembler *Decoder)
#define LLVM_EXTERNAL_VISIBILITY
MCDisassembler::DecodeStatus getInstruction(MCInst &Instr, uint64_t &Size, ArrayRef< uint8_t > Bytes, uint64_t Address, raw_ostream &CStream) const override
Returns the disassembly of a single instruction.
uint64_t suggestBytesToSkip(ArrayRef< uint8_t > Bytes, uint64_t Address) const override
Suggest a distance to skip in a buffer of data to find the next place to look for the start of an ins...
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
size_t size() const
size - Get the array size.
Context object for machine code objects.
Superclass for all disassemblers.
bool tryAddingSymbolicOperand(MCInst &Inst, int64_t Value, uint64_t Address, bool IsBranch, uint64_t Offset, uint64_t OpSize, uint64_t InstSize) const
const MCSubtargetInfo & getSubtargetInfo() const
const MCSubtargetInfo & STI
raw_ostream * CommentStream
DecodeStatus
Ternary decode status.
Instances of this class represent a single low-level machine instruction.
unsigned getOpcode() const
void addOperand(const MCOperand Op)
const MCOperand & getOperand(unsigned i) const
Describe properties that are true of each instruction in the target description file.
static MCOperand createReg(MCRegister Reg)
static MCOperand createImm(int64_t Val)
Wrapper class representing physical registers. Should be passed by value.
Generic base class for all target subtargets.
const FeatureBitset & getFeatureBits() const
Symbolize and annotate disassembled instructions.
Wrapper class representing virtual and physical registers.
Target - Wrapper for Target specific information.
Triple - Helper class for working with autoconf configuration names.
This class implements an extremely fast bulk output stream that can only output to a stream.
const char *(* LLVMSymbolLookupCallback)(void *DisInfo, uint64_t ReferenceValue, uint64_t *ReferenceType, uint64_t ReferencePC, const char **ReferenceName)
The type for the symbol lookup function.
int(* LLVMOpInfoCallback)(void *DisInfo, uint64_t PC, uint64_t Offset, uint64_t OpSize, uint64_t InstSize, int TagType, void *TagBuf)
The type for the operand information call back function.
static bool isValidDecodeLogicalImmediate(uint64_t val, unsigned regSize)
isValidDecodeLogicalImmediate - Check to see if the logical immediate value in the form "N:immr:imms"...
std::enable_if_t< std::is_integral_v< IntType >, IntType > fieldFromInstruction(const IntType &Insn, unsigned StartBit, unsigned NumBits)
This is an optimization pass for GlobalISel generic memory operations.
Target & getTheAArch64beTarget()
Target & getTheAArch64leTarget()
Target & getTheAArch64_32Target()
Target & getTheARM64_32Target()
uint16_t MCPhysReg
An unsigned integer type large enough to represent all physical registers, but not necessarily virtua...
Target & getTheARM64Target()
constexpr int64_t SignExtend64(uint64_t x)
Sign-extend the number in the bottom B bits of X to a 64-bit integer.
static void RegisterMCSymbolizer(Target &T, Target::MCSymbolizerCtorTy Fn)
RegisterMCSymbolizer - Register an MCSymbolizer implementation for the given target.
static void RegisterMCDisassembler(Target &T, Target::MCDisassemblerCtorTy Fn)
RegisterMCDisassembler - Register a MCDisassembler implementation for the given target.