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 getAArch64MCRegisterClass(RegClassID).getRegister(RegNo + FirstReg);
68 getAArch64MCRegisterClass(AArch64::GPR64x8ClassRegClassID)
69 .getRegister(RegNo >> 1);
74template <
unsigned RegClassID,
unsigned Multiple,
unsigned Min,
unsigned Max>
78 unsigned Reg = (RegNo * Multiple) + Min;
86template <
unsigned Min,
unsigned Max>
89 const void *Decoder) {
90 unsigned Reg = (RegNo * 2) + Min;
95 getAArch64MCRegisterClass(AArch64::ZPR2RegClassID).getRegister(
Reg);
106 getAArch64MCRegisterClass(AArch64::ZPR_KRegClassID).getRegister(RegNo);
113 const void *Decoder) {
117 getAArch64MCRegisterClass(AArch64::ZPR4RegClassID).getRegister(RegNo * 4);
154 getAArch64MCRegisterClass(AArch64::MPR16RegClassID).getRegister(RegNo);
163 getAArch64MCRegisterClass(AArch64::MPR32RegClassID).getRegister(RegNo);
172 getAArch64MCRegisterClass(AArch64::MPR64RegClassID).getRegister(RegNo);
181 getAArch64MCRegisterClass(AArch64::MPR128RegClassID).getRegister(RegNo);
188 const void *Decoder) {
189 if ((RegNo * 2) > 14)
192 getAArch64MCRegisterClass(AArch64::PPR2RegClassID).getRegister(RegNo * 2);
219 if (ImmVal > (1 << 16))
234 Inst, ImmVal * 4, Addr, Inst.
getOpcode() != AArch64::LDRXl, 0, 0, 4))
286 Inst, Rd, Address, Decoder);
288 Inst, Rn, Address, Decoder);
291 Inst, Rd, Address, Decoder);
293 Inst, Rn, Address, Decoder);
388 unsigned shift = (shiftHi << 6) | shiftLo;
392 case AArch64::ADDWrs:
393 case AArch64::ADDSWrs:
394 case AArch64::SUBWrs:
395 case AArch64::SUBSWrs:
400 case AArch64::ANDWrs:
401 case AArch64::ANDSWrs:
402 case AArch64::BICWrs:
403 case AArch64::BICSWrs:
404 case AArch64::ORRWrs:
405 case AArch64::ORNWrs:
406 case AArch64::EORWrs:
407 case AArch64::EONWrs: {
409 if (shiftLo >> 5 == 1)
419 case AArch64::ADDXrs:
420 case AArch64::ADDSXrs:
421 case AArch64::SUBXrs:
422 case AArch64::SUBSXrs:
427 case AArch64::ANDXrs:
428 case AArch64::ANDSXrs:
429 case AArch64::BICXrs:
430 case AArch64::BICSXrs:
431 case AArch64::ORRXrs:
432 case AArch64::ORNXrs:
433 case AArch64::EORXrs:
434 case AArch64::EONXrs:
458 case AArch64::MOVZWi:
459 case AArch64::MOVNWi:
460 case AArch64::MOVKWi:
461 if (shift & (1U << 5))
466 case AArch64::MOVZXi:
467 case AArch64::MOVNXi:
468 case AArch64::MOVKXi:
474 if (Inst.
getOpcode() == AArch64::MOVKWi ||
496 case AArch64::PRFMui:
500 case AArch64::STRBBui:
501 case AArch64::LDRBBui:
502 case AArch64::LDRSBWui:
503 case AArch64::STRHHui:
504 case AArch64::LDRHHui:
505 case AArch64::LDRSHWui:
506 case AArch64::STRWui:
507 case AArch64::LDRWui:
511 case AArch64::LDRSBXui:
512 case AArch64::LDRSHXui:
513 case AArch64::LDRSWui:
514 case AArch64::STRXui:
515 case AArch64::LDRXui:
519 case AArch64::LDRQui:
520 case AArch64::STRQui:
524 case AArch64::LDRDui:
525 case AArch64::STRDui:
529 case AArch64::LDRSui:
530 case AArch64::STRSui:
534 case AArch64::LDRHui:
535 case AArch64::STRHui:
539 case AArch64::LDRBui:
540 case AArch64::STRBui:
564 case AArch64::LDRSBWpre:
565 case AArch64::LDRSHWpre:
566 case AArch64::STRBBpre:
567 case AArch64::LDRBBpre:
568 case AArch64::STRHHpre:
569 case AArch64::LDRHHpre:
570 case AArch64::STRWpre:
571 case AArch64::LDRWpre:
572 case AArch64::LDRSBWpost:
573 case AArch64::LDRSHWpost:
574 case AArch64::STRBBpost:
575 case AArch64::LDRBBpost:
576 case AArch64::STRHHpost:
577 case AArch64::LDRHHpost:
578 case AArch64::STRWpost:
579 case AArch64::LDRWpost:
580 case AArch64::LDRSBXpre:
581 case AArch64::LDRSHXpre:
582 case AArch64::STRXpre:
583 case AArch64::LDRSWpre:
584 case AArch64::LDRXpre:
585 case AArch64::LDRSBXpost:
586 case AArch64::LDRSHXpost:
587 case AArch64::STRXpost:
588 case AArch64::LDRSWpost:
589 case AArch64::LDRXpost:
590 case AArch64::LDRQpre:
591 case AArch64::STRQpre:
592 case AArch64::LDRQpost:
593 case AArch64::STRQpost:
594 case AArch64::LDRDpre:
595 case AArch64::STRDpre:
596 case AArch64::LDRDpost:
597 case AArch64::STRDpost:
598 case AArch64::LDRSpre:
599 case AArch64::STRSpre:
600 case AArch64::LDRSpost:
601 case AArch64::STRSpost:
602 case AArch64::LDRHpre:
603 case AArch64::STRHpre:
604 case AArch64::LDRHpost:
605 case AArch64::STRHpost:
606 case AArch64::LDRBpre:
607 case AArch64::STRBpre:
608 case AArch64::LDRBpost:
609 case AArch64::STRBpost:
618 case AArch64::PRFUMi:
622 case AArch64::STURBBi:
623 case AArch64::LDURBBi:
624 case AArch64::LDURSBWi:
625 case AArch64::STURHHi:
626 case AArch64::LDURHHi:
627 case AArch64::LDURSHWi:
628 case AArch64::STURWi:
629 case AArch64::LDURWi:
630 case AArch64::LDTRSBWi:
631 case AArch64::LDTRSHWi:
632 case AArch64::STTRWi:
633 case AArch64::LDTRWi:
634 case AArch64::STTRHi:
635 case AArch64::LDTRHi:
636 case AArch64::LDTRBi:
637 case AArch64::STTRBi:
638 case AArch64::LDRSBWpre:
639 case AArch64::LDRSHWpre:
640 case AArch64::STRBBpre:
641 case AArch64::LDRBBpre:
642 case AArch64::STRHHpre:
643 case AArch64::LDRHHpre:
644 case AArch64::STRWpre:
645 case AArch64::LDRWpre:
646 case AArch64::LDRSBWpost:
647 case AArch64::LDRSHWpost:
648 case AArch64::STRBBpost:
649 case AArch64::LDRBBpost:
650 case AArch64::STRHHpost:
651 case AArch64::LDRHHpost:
652 case AArch64::STRWpost:
653 case AArch64::LDRWpost:
654 case AArch64::STLURBi:
655 case AArch64::STLURHi:
656 case AArch64::STLURWi:
657 case AArch64::LDAPURBi:
658 case AArch64::LDAPURSBWi:
659 case AArch64::LDAPURHi:
660 case AArch64::LDAPURSHWi:
661 case AArch64::LDAPURi:
665 case AArch64::LDURSBXi:
666 case AArch64::LDURSHXi:
667 case AArch64::LDURSWi:
668 case AArch64::STURXi:
669 case AArch64::LDURXi:
670 case AArch64::LDTRSBXi:
671 case AArch64::LDTRSHXi:
672 case AArch64::LDTRSWi:
673 case AArch64::STTRXi:
674 case AArch64::LDTRXi:
675 case AArch64::LDRSBXpre:
676 case AArch64::LDRSHXpre:
677 case AArch64::STRXpre:
678 case AArch64::LDRSWpre:
679 case AArch64::LDRXpre:
680 case AArch64::LDRSBXpost:
681 case AArch64::LDRSHXpost:
682 case AArch64::STRXpost:
683 case AArch64::LDRSWpost:
684 case AArch64::LDRXpost:
685 case AArch64::LDAPURSWi:
686 case AArch64::LDAPURSHXi:
687 case AArch64::LDAPURSBXi:
688 case AArch64::STLURXi:
689 case AArch64::LDAPURXi:
693 case AArch64::LDURQi:
694 case AArch64::STURQi:
695 case AArch64::LDRQpre:
696 case AArch64::STRQpre:
697 case AArch64::LDRQpost:
698 case AArch64::STRQpost:
702 case AArch64::LDURDi:
703 case AArch64::STURDi:
704 case AArch64::LDRDpre:
705 case AArch64::STRDpre:
706 case AArch64::LDRDpost:
707 case AArch64::STRDpost:
711 case AArch64::LDURSi:
712 case AArch64::STURSi:
713 case AArch64::LDRSpre:
714 case AArch64::STRSpre:
715 case AArch64::LDRSpost:
716 case AArch64::STRSpost:
720 case AArch64::LDURHi:
721 case AArch64::STURHi:
722 case AArch64::LDRHpre:
723 case AArch64::STRHpre:
724 case AArch64::LDRHpost:
725 case AArch64::STRHpost:
729 case AArch64::LDURBi:
730 case AArch64::STURBi:
731 case AArch64::LDRBpre:
732 case AArch64::STRBpre:
733 case AArch64::LDRBpost:
734 case AArch64::STRBpost:
749 if (IsLoad && IsIndexed && !IsFP && Rn != 31 && Rt == Rn)
767 case AArch64::STLXRW:
768 case AArch64::STLXRB:
769 case AArch64::STLXRH:
779 case AArch64::LDAXRW:
780 case AArch64::LDAXRB:
781 case AArch64::LDAXRH:
788 case AArch64::STLLRW:
789 case AArch64::STLLRB:
790 case AArch64::STLLRH:
791 case AArch64::LDLARW:
792 case AArch64::LDLARB:
793 case AArch64::LDLARH:
797 case AArch64::STLXRX:
803 case AArch64::LDAXRX:
806 case AArch64::LDLARX:
807 case AArch64::STLLRX:
811 case AArch64::STLXPW:
816 case AArch64::LDAXPW:
823 case AArch64::STLXPX:
828 case AArch64::LDAXPX:
841 if ((Opcode == AArch64::LDAXPW || Opcode == AArch64::LDXPW ||
842 Opcode == AArch64::LDAXPX || Opcode == AArch64::LDXPX) &&
859 bool NeedsDisjointWritebackTransfer =
false;
865 case AArch64::LDPXpost:
866 case AArch64::STPXpost:
867 case AArch64::LDPSWpost:
868 case AArch64::LDPXpre:
869 case AArch64::STPXpre:
870 case AArch64::LDPSWpre:
871 case AArch64::LDPWpost:
872 case AArch64::STPWpost:
873 case AArch64::LDPWpre:
874 case AArch64::STPWpre:
875 case AArch64::LDPQpost:
876 case AArch64::STPQpost:
877 case AArch64::LDPQpre:
878 case AArch64::STPQpre:
879 case AArch64::LDPDpost:
880 case AArch64::STPDpost:
881 case AArch64::LDPDpre:
882 case AArch64::STPDpre:
883 case AArch64::LDPSpost:
884 case AArch64::STPSpost:
885 case AArch64::LDPSpre:
886 case AArch64::STPSpre:
887 case AArch64::STGPpre:
888 case AArch64::STGPpost:
889 case AArch64::LDTPpre:
890 case AArch64::LDTPpost:
891 case AArch64::LDTPQpost:
892 case AArch64::LDTPQpre:
893 case AArch64::STTPpost:
894 case AArch64::STTPpre:
895 case AArch64::STTPQpost:
896 case AArch64::STTPQpre:
905 case AArch64::LDPXpost:
906 case AArch64::STPXpost:
907 case AArch64::LDPSWpost:
908 case AArch64::LDPXpre:
909 case AArch64::STPXpre:
910 case AArch64::LDPSWpre:
911 case AArch64::STGPpre:
912 case AArch64::STGPpost:
913 case AArch64::LDTPpost:
914 case AArch64::LDTPpre:
915 case AArch64::STTPpost:
916 case AArch64::STTPpre:
917 NeedsDisjointWritebackTransfer =
true;
919 case AArch64::LDNPXi:
920 case AArch64::STNPXi:
923 case AArch64::LDPSWi:
927 case AArch64::STTNPXi:
928 case AArch64::LDTNPXi:
934 case AArch64::LDPWpost:
935 case AArch64::STPWpost:
936 case AArch64::LDPWpre:
937 case AArch64::STPWpre:
938 NeedsDisjointWritebackTransfer =
true;
940 case AArch64::LDNPWi:
941 case AArch64::STNPWi:
949 case AArch64::LDNPQi:
950 case AArch64::STNPQi:
951 case AArch64::LDPQpost:
952 case AArch64::STPQpost:
955 case AArch64::LDPQpre:
956 case AArch64::STPQpre:
957 case AArch64::LDTPQi:
958 case AArch64::LDTPQpost:
959 case AArch64::LDTPQpre:
960 case AArch64::LDTNPQi:
961 case AArch64::STTPQi:
962 case AArch64::STTPQpost:
963 case AArch64::STTPQpre:
964 case AArch64::STTNPQi:
970 case AArch64::LDNPDi:
971 case AArch64::STNPDi:
972 case AArch64::LDPDpost:
973 case AArch64::STPDpost:
976 case AArch64::LDPDpre:
977 case AArch64::STPDpre:
983 case AArch64::LDNPSi:
984 case AArch64::STNPSi:
985 case AArch64::LDPSpost:
986 case AArch64::STPSpost:
989 case AArch64::LDPSpre:
990 case AArch64::STPSpre:
1003 if (IsLoad && Rt == Rt2)
1008 if (NeedsDisjointWritebackTransfer && Rn != 31 && (Rt == Rn || Rt2 == Rn))
1026 case AArch64::LDRAAwriteback:
1027 case AArch64::LDRABwriteback:
1029 Inst, Rn , Addr, Decoder);
1031 case AArch64::LDRAAindexed:
1032 case AArch64::LDRABindexed:
1042 if (writeback && Rt == Rn && Rn != 31) {
1057 unsigned shift = extend & 0x7;
1064 case AArch64::ADDWrx:
1065 case AArch64::SUBWrx:
1073 case AArch64::ADDSWrx:
1074 case AArch64::SUBSWrx:
1082 case AArch64::ADDXrx:
1083 case AArch64::SUBXrx:
1091 case AArch64::ADDSXrx:
1092 case AArch64::SUBSXrx:
1100 case AArch64::ADDXrx64:
1101 case AArch64::SUBXrx64:
1109 case AArch64::SUBSXrx64:
1110 case AArch64::ADDSXrx64:
1133 if (Inst.
getOpcode() == AArch64::ANDSXri)
1138 Inst, Rd, Addr, Decoder);
1145 if (Inst.
getOpcode() == AArch64::ANDSWri)
1150 Inst, Rd, Addr, Decoder);
1181 case AArch64::MOVIv4i16:
1182 case AArch64::MOVIv8i16:
1183 case AArch64::MVNIv4i16:
1184 case AArch64::MVNIv8i16:
1185 case AArch64::MOVIv2i32:
1186 case AArch64::MOVIv4i32:
1187 case AArch64::MVNIv2i32:
1188 case AArch64::MVNIv4i32:
1191 case AArch64::MOVIv2s_msl:
1192 case AArch64::MOVIv4s_msl:
1193 case AArch64::MVNIv2s_msl:
1194 case AArch64::MVNIv4s_msl:
1246 unsigned ShifterVal = (Imm >> 12) & 3;
1247 unsigned ImmVal = Imm & 0xFFF;
1249 if (ShifterVal != 0 && ShifterVal != 1)
1255 Inst, Rd, Addr, Decoder);
1264 Inst, Rd, Addr, Decoder);
1290 return Op1 == 0b000 && (Op2 == 0b000 ||
1301 uint64_t pstate_field = (op1 << 3) | op2;
1309 auto PState = AArch64PState::lookupPStateImm0_15ByEncoding(pstate_field);
1323 uint64_t pstate_field = (crm_high << 6) | (op1 << 3) | op2;
1331 auto PState = AArch64PState::lookupPStateImm0_1ByEncoding(pstate_field);
1367 MCRegister Reg = getAArch64MCRegisterClass(RegClassID).getRegister(RegNo / 2);
1376 Inst, AArch64::WSeqPairsClassRegClassID, RegNo, Addr, Decoder);
1383 Inst, AArch64::XSeqPairsClassRegClassID, RegNo, Addr, Decoder);
1418 if (Inst.
getOpcode() != AArch64::DUPM_ZI)
1433 if (Imm & ~((1LL << Bits) - 1))
1437 if (Imm & (1 << (Bits - 1)))
1438 Imm |= ~((1LL << Bits) - 1);
1445template <
int ElementW
idth>
1449 unsigned Shift = (Imm & 0x100) ? 8 : 0;
1450 if (ElementWidth == 8 && Shift)
1460 (Imm >= 12319 && Imm <= 16383 && ((Imm - 12319) % 32) == 0))
1477 if (AArch64SVCR::lookupSVCRByEncoding(Imm)) {
1493 if (Rd == Rs || Rs == Rn || Rd == Rn)
1499 Inst, Rd, Addr, Decoder) ||
1501 Inst, Rs, Addr, Decoder) ||
1503 Inst, Rn, Addr, Decoder) ||
1505 Inst, Rd, Addr, Decoder) ||
1507 Inst, Rs, Addr, Decoder) ||
1509 Inst, Rn, Addr, Decoder))
1524 if (Rd == Rm || Rm == Rn || Rd == Rn)
1530 Inst, Rd, Addr, Decoder) ||
1532 Inst, Rn, Addr, Decoder) ||
1534 Inst, Rd, Addr, Decoder) ||
1536 Inst, Rn, Addr, Decoder) ||
1538 Inst, Rm, Addr, Decoder))
1558 Inst, Rd, Addr, Decoder) ||
1560 Inst, Rn, Addr, Decoder) ||
1562 Inst, Rd, Addr, Decoder) ||
1564 Inst, Rn, Addr, Decoder))
1575 unsigned Mask = 0x18;
1577 if ((Rt & Mask) == Mask)
1592 case AArch64::PRFMroW:
1596 case AArch64::PRFMroX:
1616 Inst, RvBits, Addr, Decoder);
1627#include "AArch64GenDisassemblerTables.inc"
1628#include "AArch64GenInstrInfo.inc"
1645 if (Bytes.
size() < 4)
1651 (Bytes[3] << 24) | (Bytes[2] << 16) | (Bytes[1] << 8) | (Bytes[0] << 0);
1653 const uint8_t *Tables[] = {DecoderTable32, DecoderTableFallback32};
1655 for (
const auto *
Table : Tables) {
1677 std::unique_ptr<MCRelocationInfo> &&RelInfo) {
1679 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 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.