33#define DEBUG_TYPE "aarch64-disassembler"
45#define Success MCDisassembler::Success
46#define Fail MCDisassembler::Fail
47#define SoftFail MCDisassembler::SoftFail
49template <
unsigned RegClassID,
unsigned FirstReg,
unsigned NumRegsInClass>
53 if (RegNo > NumRegsInClass - 1)
57 getAArch64MCRegisterClass(RegClassID).getRegister(RegNo + FirstReg);
71 getAArch64MCRegisterClass(AArch64::GPR64x8ClassRegClassID)
72 .getRegister(RegNo >> 1);
77template <
unsigned RegClassID,
unsigned Multiple,
unsigned Min,
unsigned Max>
81 unsigned Reg = (RegNo * Multiple) + Min;
89template <
unsigned Min,
unsigned Max>
92 const void *Decoder) {
93 unsigned Reg = (RegNo * 2) + Min;
98 getAArch64MCRegisterClass(AArch64::ZPR2RegClassID).getRegister(
Reg);
109 getAArch64MCRegisterClass(AArch64::ZPR_KRegClassID).getRegister(RegNo);
116 const void *Decoder) {
120 getAArch64MCRegisterClass(AArch64::ZPR4RegClassID).getRegister(RegNo * 4);
157 getAArch64MCRegisterClass(AArch64::MPR16RegClassID).getRegister(RegNo);
166 getAArch64MCRegisterClass(AArch64::MPR32RegClassID).getRegister(RegNo);
175 getAArch64MCRegisterClass(AArch64::MPR64RegClassID).getRegister(RegNo);
184 getAArch64MCRegisterClass(AArch64::MPR128RegClassID).getRegister(RegNo);
191 const void *Decoder) {
192 if ((RegNo * 2) > 14)
195 getAArch64MCRegisterClass(AArch64::PPR2RegClassID).getRegister(RegNo * 2);
222 if (ImmVal > (1 << 16))
237 Inst, ImmVal * 4, Addr, Inst.
getOpcode() != AArch64::LDRXl, 0, 0, 4))
289 Inst, Rd, Address, Decoder);
291 Inst, Rn, Address, Decoder);
294 Inst, Rd, Address, Decoder);
296 Inst, Rn, Address, Decoder);
391 unsigned shift = (shiftHi << 6) | shiftLo;
395 case AArch64::ADDWrs:
396 case AArch64::ADDSWrs:
397 case AArch64::SUBWrs:
398 case AArch64::SUBSWrs:
403 case AArch64::ANDWrs:
404 case AArch64::ANDSWrs:
405 case AArch64::BICWrs:
406 case AArch64::BICSWrs:
407 case AArch64::ORRWrs:
408 case AArch64::ORNWrs:
409 case AArch64::EORWrs:
410 case AArch64::EONWrs: {
412 if (shiftLo >> 5 == 1)
422 case AArch64::ADDXrs:
423 case AArch64::ADDSXrs:
424 case AArch64::SUBXrs:
425 case AArch64::SUBSXrs:
430 case AArch64::ANDXrs:
431 case AArch64::ANDSXrs:
432 case AArch64::BICXrs:
433 case AArch64::BICSXrs:
434 case AArch64::ORRXrs:
435 case AArch64::ORNXrs:
436 case AArch64::EORXrs:
437 case AArch64::EONXrs:
461 case AArch64::MOVZWi:
462 case AArch64::MOVNWi:
463 case AArch64::MOVKWi:
464 if (shift & (1U << 5))
469 case AArch64::MOVZXi:
470 case AArch64::MOVNXi:
471 case AArch64::MOVKXi:
477 if (Inst.
getOpcode() == AArch64::MOVKWi ||
499 case AArch64::PRFMui:
503 case AArch64::STRBBui:
504 case AArch64::LDRBBui:
505 case AArch64::LDRSBWui:
506 case AArch64::STRHHui:
507 case AArch64::LDRHHui:
508 case AArch64::LDRSHWui:
509 case AArch64::STRWui:
510 case AArch64::LDRWui:
514 case AArch64::LDRSBXui:
515 case AArch64::LDRSHXui:
516 case AArch64::LDRSWui:
517 case AArch64::STRXui:
518 case AArch64::LDRXui:
522 case AArch64::LDRQui:
523 case AArch64::STRQui:
527 case AArch64::LDRDui:
528 case AArch64::STRDui:
532 case AArch64::LDRSui:
533 case AArch64::STRSui:
537 case AArch64::LDRHui:
538 case AArch64::STRHui:
542 case AArch64::LDRBui:
543 case AArch64::STRBui:
567 case AArch64::LDRSBWpre:
568 case AArch64::LDRSHWpre:
569 case AArch64::STRBBpre:
570 case AArch64::LDRBBpre:
571 case AArch64::STRHHpre:
572 case AArch64::LDRHHpre:
573 case AArch64::STRWpre:
574 case AArch64::LDRWpre:
575 case AArch64::LDRSBWpost:
576 case AArch64::LDRSHWpost:
577 case AArch64::STRBBpost:
578 case AArch64::LDRBBpost:
579 case AArch64::STRHHpost:
580 case AArch64::LDRHHpost:
581 case AArch64::STRWpost:
582 case AArch64::LDRWpost:
583 case AArch64::LDRSBXpre:
584 case AArch64::LDRSHXpre:
585 case AArch64::STRXpre:
586 case AArch64::LDRSWpre:
587 case AArch64::LDRXpre:
588 case AArch64::LDRSBXpost:
589 case AArch64::LDRSHXpost:
590 case AArch64::STRXpost:
591 case AArch64::LDRSWpost:
592 case AArch64::LDRXpost:
593 case AArch64::LDRQpre:
594 case AArch64::STRQpre:
595 case AArch64::LDRQpost:
596 case AArch64::STRQpost:
597 case AArch64::LDRDpre:
598 case AArch64::STRDpre:
599 case AArch64::LDRDpost:
600 case AArch64::STRDpost:
601 case AArch64::LDRSpre:
602 case AArch64::STRSpre:
603 case AArch64::LDRSpost:
604 case AArch64::STRSpost:
605 case AArch64::LDRHpre:
606 case AArch64::STRHpre:
607 case AArch64::LDRHpost:
608 case AArch64::STRHpost:
609 case AArch64::LDRBpre:
610 case AArch64::STRBpre:
611 case AArch64::LDRBpost:
612 case AArch64::STRBpost:
621 case AArch64::PRFUMi:
625 case AArch64::STURBBi:
626 case AArch64::LDURBBi:
627 case AArch64::LDURSBWi:
628 case AArch64::STURHHi:
629 case AArch64::LDURHHi:
630 case AArch64::LDURSHWi:
631 case AArch64::STURWi:
632 case AArch64::LDURWi:
633 case AArch64::LDTRSBWi:
634 case AArch64::LDTRSHWi:
635 case AArch64::STTRWi:
636 case AArch64::LDTRWi:
637 case AArch64::STTRHi:
638 case AArch64::LDTRHi:
639 case AArch64::LDTRBi:
640 case AArch64::STTRBi:
641 case AArch64::LDRSBWpre:
642 case AArch64::LDRSHWpre:
643 case AArch64::STRBBpre:
644 case AArch64::LDRBBpre:
645 case AArch64::STRHHpre:
646 case AArch64::LDRHHpre:
647 case AArch64::STRWpre:
648 case AArch64::LDRWpre:
649 case AArch64::LDRSBWpost:
650 case AArch64::LDRSHWpost:
651 case AArch64::STRBBpost:
652 case AArch64::LDRBBpost:
653 case AArch64::STRHHpost:
654 case AArch64::LDRHHpost:
655 case AArch64::STRWpost:
656 case AArch64::LDRWpost:
657 case AArch64::STLURBi:
658 case AArch64::STLURHi:
659 case AArch64::STLURWi:
660 case AArch64::LDAPURBi:
661 case AArch64::LDAPURSBWi:
662 case AArch64::LDAPURHi:
663 case AArch64::LDAPURSHWi:
664 case AArch64::LDAPURi:
668 case AArch64::LDURSBXi:
669 case AArch64::LDURSHXi:
670 case AArch64::LDURSWi:
671 case AArch64::STURXi:
672 case AArch64::LDURXi:
673 case AArch64::LDTRSBXi:
674 case AArch64::LDTRSHXi:
675 case AArch64::LDTRSWi:
676 case AArch64::STTRXi:
677 case AArch64::LDTRXi:
678 case AArch64::LDRSBXpre:
679 case AArch64::LDRSHXpre:
680 case AArch64::STRXpre:
681 case AArch64::LDRSWpre:
682 case AArch64::LDRXpre:
683 case AArch64::LDRSBXpost:
684 case AArch64::LDRSHXpost:
685 case AArch64::STRXpost:
686 case AArch64::LDRSWpost:
687 case AArch64::LDRXpost:
688 case AArch64::LDAPURSWi:
689 case AArch64::LDAPURSHXi:
690 case AArch64::LDAPURSBXi:
691 case AArch64::STLURXi:
692 case AArch64::LDAPURXi:
696 case AArch64::LDURQi:
697 case AArch64::STURQi:
698 case AArch64::LDRQpre:
699 case AArch64::STRQpre:
700 case AArch64::LDRQpost:
701 case AArch64::STRQpost:
705 case AArch64::LDURDi:
706 case AArch64::STURDi:
707 case AArch64::LDRDpre:
708 case AArch64::STRDpre:
709 case AArch64::LDRDpost:
710 case AArch64::STRDpost:
714 case AArch64::LDURSi:
715 case AArch64::STURSi:
716 case AArch64::LDRSpre:
717 case AArch64::STRSpre:
718 case AArch64::LDRSpost:
719 case AArch64::STRSpost:
723 case AArch64::LDURHi:
724 case AArch64::STURHi:
725 case AArch64::LDRHpre:
726 case AArch64::STRHpre:
727 case AArch64::LDRHpost:
728 case AArch64::STRHpost:
732 case AArch64::LDURBi:
733 case AArch64::STURBi:
734 case AArch64::LDRBpre:
735 case AArch64::STRBpre:
736 case AArch64::LDRBpost:
737 case AArch64::STRBpost:
752 if (IsLoad && IsIndexed && !IsFP && Rn != 31 && Rt == Rn)
770 case AArch64::STLXRW:
771 case AArch64::STLXRB:
772 case AArch64::STLXRH:
782 case AArch64::LDAXRW:
783 case AArch64::LDAXRB:
784 case AArch64::LDAXRH:
791 case AArch64::STLLRW:
792 case AArch64::STLLRB:
793 case AArch64::STLLRH:
794 case AArch64::LDLARW:
795 case AArch64::LDLARB:
796 case AArch64::LDLARH:
800 case AArch64::STLXRX:
806 case AArch64::LDAXRX:
809 case AArch64::LDLARX:
810 case AArch64::STLLRX:
814 case AArch64::STLXPW:
819 case AArch64::LDAXPW:
826 case AArch64::STLXPX:
831 case AArch64::LDAXPX:
844 if ((Opcode == AArch64::LDAXPW || Opcode == AArch64::LDXPW ||
845 Opcode == AArch64::LDAXPX || Opcode == AArch64::LDXPX) &&
862 bool NeedsDisjointWritebackTransfer =
false;
868 case AArch64::LDPXpost:
869 case AArch64::STPXpost:
870 case AArch64::LDPSWpost:
871 case AArch64::LDPXpre:
872 case AArch64::STPXpre:
873 case AArch64::LDPSWpre:
874 case AArch64::LDPWpost:
875 case AArch64::STPWpost:
876 case AArch64::LDPWpre:
877 case AArch64::STPWpre:
878 case AArch64::LDPQpost:
879 case AArch64::STPQpost:
880 case AArch64::LDPQpre:
881 case AArch64::STPQpre:
882 case AArch64::LDPDpost:
883 case AArch64::STPDpost:
884 case AArch64::LDPDpre:
885 case AArch64::STPDpre:
886 case AArch64::LDPSpost:
887 case AArch64::STPSpost:
888 case AArch64::LDPSpre:
889 case AArch64::STPSpre:
890 case AArch64::STGPpre:
891 case AArch64::STGPpost:
892 case AArch64::LDTPpre:
893 case AArch64::LDTPpost:
894 case AArch64::LDTPQpost:
895 case AArch64::LDTPQpre:
896 case AArch64::STTPpost:
897 case AArch64::STTPpre:
898 case AArch64::STTPQpost:
899 case AArch64::STTPQpre:
908 case AArch64::LDPXpost:
909 case AArch64::STPXpost:
910 case AArch64::LDPSWpost:
911 case AArch64::LDPXpre:
912 case AArch64::STPXpre:
913 case AArch64::LDPSWpre:
914 case AArch64::STGPpre:
915 case AArch64::STGPpost:
916 case AArch64::LDTPpost:
917 case AArch64::LDTPpre:
918 case AArch64::STTPpost:
919 case AArch64::STTPpre:
920 NeedsDisjointWritebackTransfer =
true;
922 case AArch64::LDNPXi:
923 case AArch64::STNPXi:
926 case AArch64::LDPSWi:
930 case AArch64::STTNPXi:
931 case AArch64::LDTNPXi:
937 case AArch64::LDPWpost:
938 case AArch64::STPWpost:
939 case AArch64::LDPWpre:
940 case AArch64::STPWpre:
941 NeedsDisjointWritebackTransfer =
true;
943 case AArch64::LDNPWi:
944 case AArch64::STNPWi:
952 case AArch64::LDNPQi:
953 case AArch64::STNPQi:
954 case AArch64::LDPQpost:
955 case AArch64::STPQpost:
958 case AArch64::LDPQpre:
959 case AArch64::STPQpre:
960 case AArch64::LDTPQi:
961 case AArch64::LDTPQpost:
962 case AArch64::LDTPQpre:
963 case AArch64::LDTNPQi:
964 case AArch64::STTPQi:
965 case AArch64::STTPQpost:
966 case AArch64::STTPQpre:
967 case AArch64::STTNPQi:
973 case AArch64::LDNPDi:
974 case AArch64::STNPDi:
975 case AArch64::LDPDpost:
976 case AArch64::STPDpost:
979 case AArch64::LDPDpre:
980 case AArch64::STPDpre:
986 case AArch64::LDNPSi:
987 case AArch64::STNPSi:
988 case AArch64::LDPSpost:
989 case AArch64::STPSpost:
992 case AArch64::LDPSpre:
993 case AArch64::STPSpre:
1006 if (IsLoad && Rt == Rt2)
1011 if (NeedsDisjointWritebackTransfer && Rn != 31 && (Rt == Rn || Rt2 == Rn))
1029 case AArch64::LDRAAwriteback:
1030 case AArch64::LDRABwriteback:
1032 Inst, Rn , Addr, Decoder);
1034 case AArch64::LDRAAindexed:
1035 case AArch64::LDRABindexed:
1045 if (writeback && Rt == Rn && Rn != 31) {
1060 unsigned shift = extend & 0x7;
1067 case AArch64::ADDWrx:
1068 case AArch64::SUBWrx:
1076 case AArch64::ADDSWrx:
1077 case AArch64::SUBSWrx:
1085 case AArch64::ADDXrx:
1086 case AArch64::SUBXrx:
1094 case AArch64::ADDSXrx:
1095 case AArch64::SUBSXrx:
1103 case AArch64::ADDXrx64:
1104 case AArch64::SUBXrx64:
1112 case AArch64::SUBSXrx64:
1113 case AArch64::ADDSXrx64:
1136 if (Inst.
getOpcode() == AArch64::ANDSXri)
1141 Inst, Rd, Addr, Decoder);
1148 if (Inst.
getOpcode() == AArch64::ANDSWri)
1153 Inst, Rd, Addr, Decoder);
1184 case AArch64::MOVIv4i16:
1185 case AArch64::MOVIv8i16:
1186 case AArch64::MVNIv4i16:
1187 case AArch64::MVNIv8i16:
1188 case AArch64::MOVIv2i32:
1189 case AArch64::MOVIv4i32:
1190 case AArch64::MVNIv2i32:
1191 case AArch64::MVNIv4i32:
1194 case AArch64::MOVIv2s_msl:
1195 case AArch64::MOVIv4s_msl:
1196 case AArch64::MVNIv2s_msl:
1197 case AArch64::MVNIv4s_msl:
1249 unsigned ShifterVal = (Imm >> 12) & 3;
1250 unsigned ImmVal = Imm & 0xFFF;
1252 if (ShifterVal != 0 && ShifterVal != 1)
1258 Inst, Rd, Addr, Decoder);
1267 Inst, Rd, Addr, Decoder);
1293 return Op1 == 0b000 && (Op2 == 0b000 ||
1304 uint64_t pstate_field = (op1 << 3) | op2;
1312 auto PState = AArch64PState::lookupPStateImm0_15ByEncoding(pstate_field);
1326 uint64_t pstate_field = (crm_high << 6) | (op1 << 3) | op2;
1334 auto PState = AArch64PState::lookupPStateImm0_1ByEncoding(pstate_field);
1370 MCRegister Reg = getAArch64MCRegisterClass(RegClassID).getRegister(RegNo / 2);
1379 Inst, AArch64::WSeqPairsClassRegClassID, RegNo, Addr, Decoder);
1386 Inst, AArch64::XSeqPairsClassRegClassID, RegNo, Addr, Decoder);
1421 if (Inst.
getOpcode() != AArch64::DUPM_ZI)
1436 if (Imm & ~((1LL << Bits) - 1))
1440 if (Imm & (1 << (Bits - 1)))
1441 Imm |= ~((1LL << Bits) - 1);
1450 if (Imm & ~((1ULL << Bits) - 1))
1458template <
int ElementW
idth>
1462 unsigned Shift = (Imm & 0x100) ? 8 : 0;
1463 if (ElementWidth == 8 && Shift)
1473 (Imm >= 12319 && Imm <= 16383 && ((Imm - 12319) % 32) == 0))
1490 if (AArch64SVCR::lookupSVCRByEncoding(Imm)) {
1506 if (Rd == Rs || Rs == Rn || Rd == Rn)
1512 Inst, Rd, Addr, Decoder) ||
1514 Inst, Rs, Addr, Decoder) ||
1516 Inst, Rn, Addr, Decoder) ||
1518 Inst, Rd, Addr, Decoder) ||
1520 Inst, Rs, Addr, Decoder) ||
1522 Inst, Rn, Addr, Decoder))
1537 if (Rd == Rm || Rm == Rn || Rd == Rn)
1543 Inst, Rd, Addr, Decoder) ||
1545 Inst, Rn, Addr, Decoder) ||
1547 Inst, Rd, Addr, Decoder) ||
1549 Inst, Rn, Addr, Decoder) ||
1551 Inst, Rm, Addr, Decoder))
1571 Inst, Rd, Addr, Decoder) ||
1573 Inst, Rn, Addr, Decoder) ||
1575 Inst, Rd, Addr, Decoder) ||
1577 Inst, Rn, Addr, Decoder))
1588 unsigned Mask = 0x18;
1590 if ((Rt & Mask) == Mask)
1605 case AArch64::PRFMroW:
1609 case AArch64::PRFMroX:
1629 Inst, RvBits, Addr, Decoder);
1640#include "AArch64GenDisassemblerTables.inc"
1641#include "AArch64GenInstrInfo.inc"
1658 if (Bytes.
size() < 4)
1664 (Bytes[3] << 24) | (Bytes[2] << 16) | (Bytes[1] << 8) | (Bytes[0] << 0);
1666 const uint8_t *Tables[] = {DecoderTable32, DecoderTableFallback32};
1668 for (
const auto *Table : Tables) {
1670 decodeInstruction(Table,
MI, Insn,
Address,
this,
STI);
1690 std::unique_ptr<MCRelocationInfo> &&RelInfo) {
1692 SymbolLookUp, DisInfo);
static DecodeStatus DecodeUnconditionalBranch(MCInst &Inst, uint32_t insn, uint64_t Addr, const MCDisassembler *Decoder)
static DecodeStatus DecodeMPR32RegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodePCRelLabel16(MCInst &Inst, unsigned Imm, uint64_t Addr, const MCDisassembler *Decoder)
static DecodeStatus DecodeMPR8RegisterClass(MCInst &Inst, const MCDisassembler *Decoder)
static DecodeStatus DecodeSystemPStateImm0_1Instruction(MCInst &Inst, uint32_t insn, uint64_t Addr, const MCDisassembler *Decoder)
static DecodeStatus DecodeMPR64RegisterClass(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 DecodeStatus DecodeHinteUImm16(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 DecodeMPRRegisterClass(MCInst &Inst, const MCDisassembler *Decoder)
static DecodeStatus DecodeMulMinMaxRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, 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 DecodeStatus DecodeSETMemGoOpInstruction(MCInst &Inst, uint32_t insn, uint64_t Addr, const MCDisassembler *Decoder)
static DecodeStatus DecodeUImm(MCInst &Inst, uint64_t Imm, uint64_t Address, const MCDisassembler *Decoder)
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 DecodeZeroImm(MCInst &Inst, 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 DecodeMPR16RegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, 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 DecodeMPR128RegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeMRSSystemRegister(MCInst &Inst, unsigned Imm, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeZTRRegisterClass(MCInst &Inst, 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...
Represent a constant reference to an array (0 or more elements consecutively in memory),...
size_t size() const
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
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()
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.