31#define DEBUG_TYPE "aarch64-disassembler"
38template <
unsigned RegClassID,
unsigned FirstReg,
unsigned NumRegsInClass>
45template <
unsigned Min,
unsigned Max>
51template <
unsigned Min,
unsigned Max>
58template <
unsigned NumBitsForTile>
199template <
int ElementW
idth>
217#include "AArch64GenDisassemblerTables.inc"
218#include "AArch64GenInstrInfo.inc"
220#define Success MCDisassembler::Success
221#define Fail MCDisassembler::Fail
222#define SoftFail MCDisassembler::SoftFail
239 if (Bytes.
size() < 4)
245 (Bytes[3] << 24) | (Bytes[2] << 16) | (Bytes[1] << 8) | (Bytes[0] << 0);
247 const uint8_t *Tables[] = {DecoderTable32, DecoderTableFallback32};
249 for (
const auto *Table : Tables) {
258 for (
unsigned i = 0; i <
Desc.getNumOperands(); i++) {
260 switch (
Desc.operands()[i].RegClass) {
263 case AArch64::MPRRegClassID:
266 case AArch64::MPR8RegClassID:
269 case AArch64::ZTRRegClassID:
273 }
else if (
Desc.operands()[i].OperandType ==
279 if (
MI.getOpcode() == AArch64::LDR_ZA ||
280 MI.getOpcode() == AArch64::STR_ZA) {
285 assert(Imm4Op.
isImm() &&
"Unexpected operand type!");
286 MI.addOperand(Imm4Op);
308 std::unique_ptr<MCRelocationInfo> &&RelInfo) {
310 SymbolLookUp, DisInfo);
337template <
unsigned RegClassID,
unsigned FirstReg,
unsigned NumRegsInClass>
341 if (RegNo > NumRegsInClass - 1)
345 AArch64MCRegisterClasses[RegClassID].getRegister(RegNo + FirstReg);
359 AArch64MCRegisterClasses[AArch64::GPR64x8ClassRegClassID].getRegister(
365template <
unsigned Min,
unsigned Max>
369 unsigned Reg = (RegNo * 2) + Min;
370 if (Reg < Min || Reg > Max || (Reg & 1))
373 AArch64MCRegisterClasses[AArch64::ZPRRegClassID].getRegister(Reg);
378template <
unsigned Min,
unsigned Max>
381 const void *Decoder) {
382 unsigned Reg = (RegNo * 2) + Min;
383 if (Reg < Min || Reg > Max || (Reg & 1))
387 AArch64MCRegisterClasses[AArch64::ZPR2RegClassID].getRegister(Reg);
398 AArch64MCRegisterClasses[AArch64::ZPR_KRegClassID].getRegister(RegNo);
405 const void *Decoder) {
409 AArch64MCRegisterClasses[AArch64::ZPR4RegClassID].getRegister(RegNo * 4);
426 {AArch64::ZAH0, AArch64::ZAH1},
427 {AArch64::ZAS0, AArch64::ZAS1, AArch64::ZAS2, AArch64::ZAS3},
428 {AArch64::ZAD0, AArch64::ZAD1, AArch64::ZAD2, AArch64::ZAD3, AArch64::ZAD4,
429 AArch64::ZAD5, AArch64::ZAD6, AArch64::ZAD7},
430 {AArch64::ZAQ0, AArch64::ZAQ1, AArch64::ZAQ2, AArch64::ZAQ3, AArch64::ZAQ4,
431 AArch64::ZAQ5, AArch64::ZAQ6, AArch64::ZAQ7, AArch64::ZAQ8, AArch64::ZAQ9,
432 AArch64::ZAQ10, AArch64::ZAQ11, AArch64::ZAQ12, AArch64::ZAQ13,
433 AArch64::ZAQ14, AArch64::ZAQ15}};
435template <
unsigned NumBitsForTile>
439 unsigned LastReg = (1 << NumBitsForTile) - 1;
449 const void *Decoder) {
450 if ((RegNo * 2) > 14)
453 AArch64MCRegisterClasses[AArch64::PPR2RegClassID].getRegister(RegNo * 2);
480 if (ImmVal > (1 << 16))
492 int64_t ImmVal = Imm;
495 if (ImmVal & (1 << (19 - 1)))
496 ImmVal |= ~((1LL << 19) - 1);
499 Inst, ImmVal * 4,
Addr, Inst.
getOpcode() != AArch64::LDRXl, 0, 0, 4))
506 int64_t ImmVal = Imm;
509 if (ImmVal & (1 << (9 - 1)))
510 ImmVal |= ~((1LL << 9) - 1);
549 unsigned Rd = fieldFromInstruction(
Insn, 0, 5);
550 unsigned Rn = fieldFromInstruction(
Insn, 5, 5);
551 unsigned IsToVec = fieldFromInstruction(
Insn, 16, 1);
554 DecodeSimpleRegisterClass<AArch64::FPR128RegClassID, 0, 32>(
556 DecodeSimpleRegisterClass<AArch64::GPR64RegClassID, 0, 32>(
559 DecodeSimpleRegisterClass<AArch64::GPR64RegClassID, 0, 32>(
561 DecodeSimpleRegisterClass<AArch64::FPR128RegClassID, 0, 32>(
652 unsigned Rd = fieldFromInstruction(insn, 0, 5);
653 unsigned Rn = fieldFromInstruction(insn, 5, 5);
654 unsigned Rm = fieldFromInstruction(insn, 16, 5);
655 unsigned shiftHi = fieldFromInstruction(insn, 22, 2);
656 unsigned shiftLo = fieldFromInstruction(insn, 10, 6);
657 unsigned shift = (shiftHi << 6) | shiftLo;
661 case AArch64::ADDWrs:
662 case AArch64::ADDSWrs:
663 case AArch64::SUBWrs:
664 case AArch64::SUBSWrs:
669 case AArch64::ANDWrs:
670 case AArch64::ANDSWrs:
671 case AArch64::BICWrs:
672 case AArch64::BICSWrs:
673 case AArch64::ORRWrs:
674 case AArch64::ORNWrs:
675 case AArch64::EORWrs:
676 case AArch64::EONWrs: {
678 if (shiftLo >> 5 == 1)
680 DecodeSimpleRegisterClass<AArch64::GPR32RegClassID, 0, 32>(Inst, Rd,
Addr,
682 DecodeSimpleRegisterClass<AArch64::GPR32RegClassID, 0, 32>(Inst, Rn,
Addr,
684 DecodeSimpleRegisterClass<AArch64::GPR32RegClassID, 0, 32>(Inst, Rm,
Addr,
688 case AArch64::ADDXrs:
689 case AArch64::ADDSXrs:
690 case AArch64::SUBXrs:
691 case AArch64::SUBSXrs:
696 case AArch64::ANDXrs:
697 case AArch64::ANDSXrs:
698 case AArch64::BICXrs:
699 case AArch64::BICSXrs:
700 case AArch64::ORRXrs:
701 case AArch64::ORNXrs:
702 case AArch64::EORXrs:
703 case AArch64::EONXrs:
704 DecodeSimpleRegisterClass<AArch64::GPR64RegClassID, 0, 32>(Inst, Rd,
Addr,
706 DecodeSimpleRegisterClass<AArch64::GPR64RegClassID, 0, 32>(Inst, Rn,
Addr,
708 DecodeSimpleRegisterClass<AArch64::GPR64RegClassID, 0, 32>(Inst, Rm,
Addr,
720 unsigned Rd = fieldFromInstruction(insn, 0, 5);
721 unsigned imm = fieldFromInstruction(insn, 5, 16);
722 unsigned shift = fieldFromInstruction(insn, 21, 2);
727 case AArch64::MOVZWi:
728 case AArch64::MOVNWi:
729 case AArch64::MOVKWi:
730 if (shift & (1U << 5))
732 DecodeSimpleRegisterClass<AArch64::GPR32RegClassID, 0, 32>(Inst, Rd,
Addr,
735 case AArch64::MOVZXi:
736 case AArch64::MOVNXi:
737 case AArch64::MOVKXi:
738 DecodeSimpleRegisterClass<AArch64::GPR64RegClassID, 0, 32>(Inst, Rd,
Addr,
743 if (Inst.
getOpcode() == AArch64::MOVKWi ||
755 unsigned Rt = fieldFromInstruction(insn, 0, 5);
756 unsigned Rn = fieldFromInstruction(insn, 5, 5);
757 unsigned offset = fieldFromInstruction(insn, 10, 12);
762 case AArch64::PRFMui:
766 case AArch64::STRBBui:
767 case AArch64::LDRBBui:
768 case AArch64::LDRSBWui:
769 case AArch64::STRHHui:
770 case AArch64::LDRHHui:
771 case AArch64::LDRSHWui:
772 case AArch64::STRWui:
773 case AArch64::LDRWui:
774 DecodeSimpleRegisterClass<AArch64::GPR32RegClassID, 0, 32>(Inst, Rt,
Addr,
777 case AArch64::LDRSBXui:
778 case AArch64::LDRSHXui:
779 case AArch64::LDRSWui:
780 case AArch64::STRXui:
781 case AArch64::LDRXui:
782 DecodeSimpleRegisterClass<AArch64::GPR64RegClassID, 0, 32>(Inst, Rt,
Addr,
785 case AArch64::LDRQui:
786 case AArch64::STRQui:
787 DecodeSimpleRegisterClass<AArch64::FPR128RegClassID, 0, 32>(Inst, Rt,
Addr,
790 case AArch64::LDRDui:
791 case AArch64::STRDui:
792 DecodeSimpleRegisterClass<AArch64::FPR64RegClassID, 0, 32>(Inst, Rt,
Addr,
795 case AArch64::LDRSui:
796 case AArch64::STRSui:
797 DecodeSimpleRegisterClass<AArch64::FPR32RegClassID, 0, 32>(Inst, Rt,
Addr,
800 case AArch64::LDRHui:
801 case AArch64::STRHui:
802 DecodeSimpleRegisterClass<AArch64::FPR16RegClassID, 0, 32>(Inst, Rt,
Addr,
805 case AArch64::LDRBui:
806 case AArch64::STRBui:
807 DecodeSimpleRegisterClass<AArch64::FPR8RegClassID, 0, 32>(Inst, Rt,
Addr,
812 DecodeSimpleRegisterClass<AArch64::GPR64spRegClassID, 0, 32>(Inst, Rn,
Addr,
822 unsigned Rt = fieldFromInstruction(insn, 0, 5);
823 unsigned Rn = fieldFromInstruction(insn, 5, 5);
824 int64_t offset = fieldFromInstruction(insn, 12, 9);
828 if (offset & (1 << (9 - 1)))
829 offset |= ~((1LL << 9) - 1);
835 case AArch64::LDRSBWpre:
836 case AArch64::LDRSHWpre:
837 case AArch64::STRBBpre:
838 case AArch64::LDRBBpre:
839 case AArch64::STRHHpre:
840 case AArch64::LDRHHpre:
841 case AArch64::STRWpre:
842 case AArch64::LDRWpre:
843 case AArch64::LDRSBWpost:
844 case AArch64::LDRSHWpost:
845 case AArch64::STRBBpost:
846 case AArch64::LDRBBpost:
847 case AArch64::STRHHpost:
848 case AArch64::LDRHHpost:
849 case AArch64::STRWpost:
850 case AArch64::LDRWpost:
851 case AArch64::LDRSBXpre:
852 case AArch64::LDRSHXpre:
853 case AArch64::STRXpre:
854 case AArch64::LDRSWpre:
855 case AArch64::LDRXpre:
856 case AArch64::LDRSBXpost:
857 case AArch64::LDRSHXpost:
858 case AArch64::STRXpost:
859 case AArch64::LDRSWpost:
860 case AArch64::LDRXpost:
861 case AArch64::LDRQpre:
862 case AArch64::STRQpre:
863 case AArch64::LDRQpost:
864 case AArch64::STRQpost:
865 case AArch64::LDRDpre:
866 case AArch64::STRDpre:
867 case AArch64::LDRDpost:
868 case AArch64::STRDpost:
869 case AArch64::LDRSpre:
870 case AArch64::STRSpre:
871 case AArch64::LDRSpost:
872 case AArch64::STRSpost:
873 case AArch64::LDRHpre:
874 case AArch64::STRHpre:
875 case AArch64::LDRHpost:
876 case AArch64::STRHpost:
877 case AArch64::LDRBpre:
878 case AArch64::STRBpre:
879 case AArch64::LDRBpost:
880 case AArch64::STRBpost:
881 DecodeSimpleRegisterClass<AArch64::GPR64spRegClassID, 0, 32>(Inst, Rn,
Addr,
889 case AArch64::PRFUMi:
893 case AArch64::STURBBi:
894 case AArch64::LDURBBi:
895 case AArch64::LDURSBWi:
896 case AArch64::STURHHi:
897 case AArch64::LDURHHi:
898 case AArch64::LDURSHWi:
899 case AArch64::STURWi:
900 case AArch64::LDURWi:
901 case AArch64::LDTRSBWi:
902 case AArch64::LDTRSHWi:
903 case AArch64::STTRWi:
904 case AArch64::LDTRWi:
905 case AArch64::STTRHi:
906 case AArch64::LDTRHi:
907 case AArch64::LDTRBi:
908 case AArch64::STTRBi:
909 case AArch64::LDRSBWpre:
910 case AArch64::LDRSHWpre:
911 case AArch64::STRBBpre:
912 case AArch64::LDRBBpre:
913 case AArch64::STRHHpre:
914 case AArch64::LDRHHpre:
915 case AArch64::STRWpre:
916 case AArch64::LDRWpre:
917 case AArch64::LDRSBWpost:
918 case AArch64::LDRSHWpost:
919 case AArch64::STRBBpost:
920 case AArch64::LDRBBpost:
921 case AArch64::STRHHpost:
922 case AArch64::LDRHHpost:
923 case AArch64::STRWpost:
924 case AArch64::LDRWpost:
925 case AArch64::STLURBi:
926 case AArch64::STLURHi:
927 case AArch64::STLURWi:
928 case AArch64::LDAPURBi:
929 case AArch64::LDAPURSBWi:
930 case AArch64::LDAPURHi:
931 case AArch64::LDAPURSHWi:
932 case AArch64::LDAPURi:
933 DecodeSimpleRegisterClass<AArch64::GPR32RegClassID, 0, 32>(Inst, Rt,
Addr,
936 case AArch64::LDURSBXi:
937 case AArch64::LDURSHXi:
938 case AArch64::LDURSWi:
939 case AArch64::STURXi:
940 case AArch64::LDURXi:
941 case AArch64::LDTRSBXi:
942 case AArch64::LDTRSHXi:
943 case AArch64::LDTRSWi:
944 case AArch64::STTRXi:
945 case AArch64::LDTRXi:
946 case AArch64::LDRSBXpre:
947 case AArch64::LDRSHXpre:
948 case AArch64::STRXpre:
949 case AArch64::LDRSWpre:
950 case AArch64::LDRXpre:
951 case AArch64::LDRSBXpost:
952 case AArch64::LDRSHXpost:
953 case AArch64::STRXpost:
954 case AArch64::LDRSWpost:
955 case AArch64::LDRXpost:
956 case AArch64::LDAPURSWi:
957 case AArch64::LDAPURSHXi:
958 case AArch64::LDAPURSBXi:
959 case AArch64::STLURXi:
960 case AArch64::LDAPURXi:
961 DecodeSimpleRegisterClass<AArch64::GPR64RegClassID, 0, 32>(Inst, Rt,
Addr,
964 case AArch64::LDURQi:
965 case AArch64::STURQi:
966 case AArch64::LDRQpre:
967 case AArch64::STRQpre:
968 case AArch64::LDRQpost:
969 case AArch64::STRQpost:
970 DecodeSimpleRegisterClass<AArch64::FPR128RegClassID, 0, 32>(Inst, Rt,
Addr,
973 case AArch64::LDURDi:
974 case AArch64::STURDi:
975 case AArch64::LDRDpre:
976 case AArch64::STRDpre:
977 case AArch64::LDRDpost:
978 case AArch64::STRDpost:
979 DecodeSimpleRegisterClass<AArch64::FPR64RegClassID, 0, 32>(Inst, Rt,
Addr,
982 case AArch64::LDURSi:
983 case AArch64::STURSi:
984 case AArch64::LDRSpre:
985 case AArch64::STRSpre:
986 case AArch64::LDRSpost:
987 case AArch64::STRSpost:
988 DecodeSimpleRegisterClass<AArch64::FPR32RegClassID, 0, 32>(Inst, Rt,
Addr,
991 case AArch64::LDURHi:
992 case AArch64::STURHi:
993 case AArch64::LDRHpre:
994 case AArch64::STRHpre:
995 case AArch64::LDRHpost:
996 case AArch64::STRHpost:
997 DecodeSimpleRegisterClass<AArch64::FPR16RegClassID, 0, 32>(Inst, Rt,
Addr,
1000 case AArch64::LDURBi:
1001 case AArch64::STURBi:
1002 case AArch64::LDRBpre:
1003 case AArch64::STRBpre:
1004 case AArch64::LDRBpost:
1005 case AArch64::STRBpost:
1006 DecodeSimpleRegisterClass<AArch64::FPR8RegClassID, 0, 32>(Inst, Rt,
Addr,
1011 DecodeSimpleRegisterClass<AArch64::GPR64spRegClassID, 0, 32>(Inst, Rn,
Addr,
1015 bool IsLoad = fieldFromInstruction(insn, 22, 1);
1016 bool IsIndexed = fieldFromInstruction(insn, 10, 2) != 0;
1017 bool IsFP = fieldFromInstruction(insn, 26, 1);
1020 if (IsLoad && IsIndexed && !IsFP && Rn != 31 && Rt == Rn)
1029 unsigned Rt = fieldFromInstruction(insn, 0, 5);
1030 unsigned Rn = fieldFromInstruction(insn, 5, 5);
1031 unsigned Rt2 = fieldFromInstruction(insn, 10, 5);
1032 unsigned Rs = fieldFromInstruction(insn, 16, 5);
1038 case AArch64::STLXRW:
1039 case AArch64::STLXRB:
1040 case AArch64::STLXRH:
1041 case AArch64::STXRW:
1042 case AArch64::STXRB:
1043 case AArch64::STXRH:
1044 DecodeSimpleRegisterClass<AArch64::GPR32RegClassID, 0, 32>(Inst, Rs,
Addr,
1047 case AArch64::LDARW:
1048 case AArch64::LDARB:
1049 case AArch64::LDARH:
1050 case AArch64::LDAXRW:
1051 case AArch64::LDAXRB:
1052 case AArch64::LDAXRH:
1053 case AArch64::LDXRW:
1054 case AArch64::LDXRB:
1055 case AArch64::LDXRH:
1056 case AArch64::STLRW:
1057 case AArch64::STLRB:
1058 case AArch64::STLRH:
1059 case AArch64::STLLRW:
1060 case AArch64::STLLRB:
1061 case AArch64::STLLRH:
1062 case AArch64::LDLARW:
1063 case AArch64::LDLARB:
1064 case AArch64::LDLARH:
1065 DecodeSimpleRegisterClass<AArch64::GPR32RegClassID, 0, 32>(Inst, Rt,
Addr,
1068 case AArch64::STLXRX:
1069 case AArch64::STXRX:
1070 DecodeSimpleRegisterClass<AArch64::GPR32RegClassID, 0, 32>(Inst, Rs,
Addr,
1073 case AArch64::LDARX:
1074 case AArch64::LDAXRX:
1075 case AArch64::LDXRX:
1076 case AArch64::STLRX:
1077 case AArch64::LDLARX:
1078 case AArch64::STLLRX:
1079 DecodeSimpleRegisterClass<AArch64::GPR64RegClassID, 0, 32>(Inst, Rt,
Addr,
1082 case AArch64::STLXPW:
1083 case AArch64::STXPW:
1084 DecodeSimpleRegisterClass<AArch64::GPR32RegClassID, 0, 32>(Inst, Rs,
Addr,
1087 case AArch64::LDAXPW:
1088 case AArch64::LDXPW:
1089 DecodeSimpleRegisterClass<AArch64::GPR32RegClassID, 0, 32>(Inst, Rt,
Addr,
1091 DecodeSimpleRegisterClass<AArch64::GPR32RegClassID, 0, 32>(Inst, Rt2,
Addr,
1094 case AArch64::STLXPX:
1095 case AArch64::STXPX:
1096 DecodeSimpleRegisterClass<AArch64::GPR32RegClassID, 0, 32>(Inst, Rs,
Addr,
1099 case AArch64::LDAXPX:
1100 case AArch64::LDXPX:
1101 DecodeSimpleRegisterClass<AArch64::GPR64RegClassID, 0, 32>(Inst, Rt,
Addr,
1103 DecodeSimpleRegisterClass<AArch64::GPR64RegClassID, 0, 32>(Inst, Rt2,
Addr,
1108 DecodeSimpleRegisterClass<AArch64::GPR64spRegClassID, 0, 32>(Inst, Rn,
Addr,
1112 if ((Opcode == AArch64::LDAXPW || Opcode == AArch64::LDXPW ||
1113 Opcode == AArch64::LDAXPX || Opcode == AArch64::LDXPX) &&
1123 unsigned Rt = fieldFromInstruction(insn, 0, 5);
1124 unsigned Rn = fieldFromInstruction(insn, 5, 5);
1125 unsigned Rt2 = fieldFromInstruction(insn, 10, 5);
1126 int64_t offset = fieldFromInstruction(insn, 15, 7);
1127 bool IsLoad = fieldFromInstruction(insn, 22, 1);
1131 if (offset & (1 << (7 - 1)))
1132 offset |= ~((1LL << 7) - 1);
1135 bool NeedsDisjointWritebackTransfer =
false;
1141 case AArch64::LDPXpost:
1142 case AArch64::STPXpost:
1143 case AArch64::LDPSWpost:
1144 case AArch64::LDPXpre:
1145 case AArch64::STPXpre:
1146 case AArch64::LDPSWpre:
1147 case AArch64::LDPWpost:
1148 case AArch64::STPWpost:
1149 case AArch64::LDPWpre:
1150 case AArch64::STPWpre:
1151 case AArch64::LDPQpost:
1152 case AArch64::STPQpost:
1153 case AArch64::LDPQpre:
1154 case AArch64::STPQpre:
1155 case AArch64::LDPDpost:
1156 case AArch64::STPDpost:
1157 case AArch64::LDPDpre:
1158 case AArch64::STPDpre:
1159 case AArch64::LDPSpost:
1160 case AArch64::STPSpost:
1161 case AArch64::LDPSpre:
1162 case AArch64::STPSpre:
1163 case AArch64::STGPpre:
1164 case AArch64::STGPpost:
1165 case AArch64::LDTPpre:
1166 case AArch64::LDTPpost:
1167 case AArch64::LDTPQpost:
1168 case AArch64::LDTPQpre:
1169 case AArch64::STTPpost:
1170 case AArch64::STTPpre:
1171 case AArch64::STTPQpost:
1172 case AArch64::STTPQpre:
1173 DecodeSimpleRegisterClass<AArch64::GPR64spRegClassID, 0, 32>(Inst, Rn,
Addr,
1181 case AArch64::LDPXpost:
1182 case AArch64::STPXpost:
1183 case AArch64::LDPSWpost:
1184 case AArch64::LDPXpre:
1185 case AArch64::STPXpre:
1186 case AArch64::LDPSWpre:
1187 case AArch64::STGPpre:
1188 case AArch64::STGPpost:
1189 case AArch64::LDTPpost:
1190 case AArch64::LDTPpre:
1191 case AArch64::STTPpost:
1192 case AArch64::STTPpre:
1193 NeedsDisjointWritebackTransfer =
true;
1195 case AArch64::LDNPXi:
1196 case AArch64::STNPXi:
1197 case AArch64::LDPXi:
1198 case AArch64::STPXi:
1199 case AArch64::LDPSWi:
1200 case AArch64::STGPi:
1201 case AArch64::LDTPi:
1202 case AArch64::STTPi:
1203 case AArch64::STTNPXi:
1204 case AArch64::LDTNPXi:
1205 DecodeSimpleRegisterClass<AArch64::GPR64RegClassID, 0, 32>(Inst, Rt,
Addr,
1207 DecodeSimpleRegisterClass<AArch64::GPR64RegClassID, 0, 32>(Inst, Rt2,
Addr,
1210 case AArch64::LDPWpost:
1211 case AArch64::STPWpost:
1212 case AArch64::LDPWpre:
1213 case AArch64::STPWpre:
1214 NeedsDisjointWritebackTransfer =
true;
1216 case AArch64::LDNPWi:
1217 case AArch64::STNPWi:
1218 case AArch64::LDPWi:
1219 case AArch64::STPWi:
1220 DecodeSimpleRegisterClass<AArch64::GPR32RegClassID, 0, 32>(Inst, Rt,
Addr,
1222 DecodeSimpleRegisterClass<AArch64::GPR32RegClassID, 0, 32>(Inst, Rt2,
Addr,
1225 case AArch64::LDNPQi:
1226 case AArch64::STNPQi:
1227 case AArch64::LDPQpost:
1228 case AArch64::STPQpost:
1229 case AArch64::LDPQi:
1230 case AArch64::STPQi:
1231 case AArch64::LDPQpre:
1232 case AArch64::STPQpre:
1233 case AArch64::LDTPQi:
1234 case AArch64::LDTPQpost:
1235 case AArch64::LDTPQpre:
1236 case AArch64::LDTNPQi:
1237 case AArch64::STTPQi:
1238 case AArch64::STTPQpost:
1239 case AArch64::STTPQpre:
1240 case AArch64::STTNPQi:
1241 DecodeSimpleRegisterClass<AArch64::FPR128RegClassID, 0, 32>(Inst, Rt,
Addr,
1243 DecodeSimpleRegisterClass<AArch64::FPR128RegClassID, 0, 32>(Inst, Rt2,
Addr,
1246 case AArch64::LDNPDi:
1247 case AArch64::STNPDi:
1248 case AArch64::LDPDpost:
1249 case AArch64::STPDpost:
1250 case AArch64::LDPDi:
1251 case AArch64::STPDi:
1252 case AArch64::LDPDpre:
1253 case AArch64::STPDpre:
1254 DecodeSimpleRegisterClass<AArch64::FPR64RegClassID, 0, 32>(Inst, Rt,
Addr,
1256 DecodeSimpleRegisterClass<AArch64::FPR64RegClassID, 0, 32>(Inst, Rt2,
Addr,
1259 case AArch64::LDNPSi:
1260 case AArch64::STNPSi:
1261 case AArch64::LDPSpost:
1262 case AArch64::STPSpost:
1263 case AArch64::LDPSi:
1264 case AArch64::STPSi:
1265 case AArch64::LDPSpre:
1266 case AArch64::STPSpre:
1267 DecodeSimpleRegisterClass<AArch64::FPR32RegClassID, 0, 32>(Inst, Rt,
Addr,
1269 DecodeSimpleRegisterClass<AArch64::FPR32RegClassID, 0, 32>(Inst, Rt2,
Addr,
1274 DecodeSimpleRegisterClass<AArch64::GPR64spRegClassID, 0, 32>(Inst, Rn,
Addr,
1279 if (IsLoad && Rt == Rt2)
1284 if (NeedsDisjointWritebackTransfer && Rn != 31 && (Rt == Rn || Rt2 == Rn))
1293 unsigned Rt = fieldFromInstruction(insn, 0, 5);
1294 unsigned Rn = fieldFromInstruction(insn, 5, 5);
1295 uint64_t offset = fieldFromInstruction(insn, 22, 1) << 9 |
1296 fieldFromInstruction(insn, 12, 9);
1297 unsigned writeback = fieldFromInstruction(insn, 11, 1);
1302 case AArch64::LDRAAwriteback:
1303 case AArch64::LDRABwriteback:
1304 DecodeSimpleRegisterClass<AArch64::GPR64spRegClassID, 0, 32>(
1305 Inst, Rn ,
Addr, Decoder);
1307 case AArch64::LDRAAindexed:
1308 case AArch64::LDRABindexed:
1312 DecodeSimpleRegisterClass<AArch64::GPR64RegClassID, 0, 32>(Inst, Rt,
Addr,
1314 DecodeSimpleRegisterClass<AArch64::GPR64spRegClassID, 0, 32>(Inst, Rn,
Addr,
1316 DecodeSImm<10>(Inst, offset,
Addr, Decoder);
1318 if (writeback && Rt == Rn && Rn != 31) {
1328 unsigned Rd = fieldFromInstruction(insn, 0, 5);
1329 unsigned Rn = fieldFromInstruction(insn, 5, 5);
1330 unsigned Rm = fieldFromInstruction(insn, 16, 5);
1331 unsigned extend = fieldFromInstruction(insn, 10, 6);
1333 unsigned shift = extend & 0x7;
1340 case AArch64::ADDWrx:
1341 case AArch64::SUBWrx:
1342 DecodeSimpleRegisterClass<AArch64::GPR32spRegClassID, 0, 32>(Inst, Rd,
Addr,
1344 DecodeSimpleRegisterClass<AArch64::GPR32spRegClassID, 0, 32>(Inst, Rn,
Addr,
1346 DecodeSimpleRegisterClass<AArch64::GPR32RegClassID, 0, 32>(Inst, Rm,
Addr,
1349 case AArch64::ADDSWrx:
1350 case AArch64::SUBSWrx:
1351 DecodeSimpleRegisterClass<AArch64::GPR32RegClassID, 0, 32>(Inst, Rd,
Addr,
1353 DecodeSimpleRegisterClass<AArch64::GPR32spRegClassID, 0, 32>(Inst, Rn,
Addr,
1355 DecodeSimpleRegisterClass<AArch64::GPR32RegClassID, 0, 32>(Inst, Rm,
Addr,
1358 case AArch64::ADDXrx:
1359 case AArch64::SUBXrx:
1360 DecodeSimpleRegisterClass<AArch64::GPR64spRegClassID, 0, 32>(Inst, Rd,
Addr,
1362 DecodeSimpleRegisterClass<AArch64::GPR64spRegClassID, 0, 32>(Inst, Rn,
Addr,
1364 DecodeSimpleRegisterClass<AArch64::GPR32RegClassID, 0, 32>(Inst, Rm,
Addr,
1367 case AArch64::ADDSXrx:
1368 case AArch64::SUBSXrx:
1369 DecodeSimpleRegisterClass<AArch64::GPR64RegClassID, 0, 32>(Inst, Rd,
Addr,
1371 DecodeSimpleRegisterClass<AArch64::GPR64spRegClassID, 0, 32>(Inst, Rn,
Addr,
1373 DecodeSimpleRegisterClass<AArch64::GPR32RegClassID, 0, 32>(Inst, Rm,
Addr,
1376 case AArch64::ADDXrx64:
1377 case AArch64::SUBXrx64:
1378 DecodeSimpleRegisterClass<AArch64::GPR64spRegClassID, 0, 32>(Inst, Rd,
Addr,
1380 DecodeSimpleRegisterClass<AArch64::GPR64spRegClassID, 0, 32>(Inst, Rn,
Addr,
1382 DecodeSimpleRegisterClass<AArch64::GPR64RegClassID, 0, 32>(Inst, Rm,
Addr,
1385 case AArch64::SUBSXrx64:
1386 case AArch64::ADDSXrx64:
1387 DecodeSimpleRegisterClass<AArch64::GPR64RegClassID, 0, 32>(Inst, Rd,
Addr,
1389 DecodeSimpleRegisterClass<AArch64::GPR64spRegClassID, 0, 32>(Inst, Rn,
Addr,
1391 DecodeSimpleRegisterClass<AArch64::GPR64RegClassID, 0, 32>(Inst, Rm,
Addr,
1403 unsigned Rd = fieldFromInstruction(insn, 0, 5);
1404 unsigned Rn = fieldFromInstruction(insn, 5, 5);
1405 unsigned Datasize = fieldFromInstruction(insn, 31, 1);
1409 if (Inst.
getOpcode() == AArch64::ANDSXri)
1410 DecodeSimpleRegisterClass<AArch64::GPR64RegClassID, 0, 32>(Inst, Rd,
Addr,
1413 DecodeSimpleRegisterClass<AArch64::GPR64spRegClassID, 0, 32>(
1414 Inst, Rd,
Addr, Decoder);
1415 DecodeSimpleRegisterClass<AArch64::GPR64RegClassID, 0, 32>(Inst, Rn,
Addr,
1417 imm = fieldFromInstruction(insn, 10, 13);
1421 if (Inst.
getOpcode() == AArch64::ANDSWri)
1422 DecodeSimpleRegisterClass<AArch64::GPR32RegClassID, 0, 32>(Inst, Rd,
Addr,
1425 DecodeSimpleRegisterClass<AArch64::GPR32spRegClassID, 0, 32>(
1426 Inst, Rd,
Addr, Decoder);
1427 DecodeSimpleRegisterClass<AArch64::GPR32RegClassID, 0, 32>(Inst, Rn,
Addr,
1429 imm = fieldFromInstruction(insn, 10, 12);
1440 unsigned Rd = fieldFromInstruction(insn, 0, 5);
1441 unsigned cmode = fieldFromInstruction(insn, 12, 4);
1442 unsigned imm = fieldFromInstruction(insn, 16, 3) << 5;
1443 imm |= fieldFromInstruction(insn, 5, 5);
1446 DecodeSimpleRegisterClass<AArch64::FPR64RegClassID, 0, 32>(Inst, Rd,
Addr,
1449 DecodeSimpleRegisterClass<AArch64::FPR128RegClassID, 0, 32>(Inst, Rd,
Addr,
1457 case AArch64::MOVIv4i16:
1458 case AArch64::MOVIv8i16:
1459 case AArch64::MVNIv4i16:
1460 case AArch64::MVNIv8i16:
1461 case AArch64::MOVIv2i32:
1462 case AArch64::MOVIv4i32:
1463 case AArch64::MVNIv2i32:
1464 case AArch64::MVNIv4i32:
1467 case AArch64::MOVIv2s_msl:
1468 case AArch64::MOVIv4s_msl:
1469 case AArch64::MVNIv2s_msl:
1470 case AArch64::MVNIv4s_msl:
1481 unsigned Rd = fieldFromInstruction(insn, 0, 5);
1482 unsigned cmode = fieldFromInstruction(insn, 12, 4);
1483 unsigned imm = fieldFromInstruction(insn, 16, 3) << 5;
1484 imm |= fieldFromInstruction(insn, 5, 5);
1487 DecodeSimpleRegisterClass<AArch64::FPR128RegClassID, 0, 32>(Inst, Rd,
Addr,
1489 DecodeSimpleRegisterClass<AArch64::FPR128RegClassID, 0, 32>(Inst, Rd,
Addr,
1501 unsigned Rd = fieldFromInstruction(insn, 0, 5);
1502 int64_t imm = fieldFromInstruction(insn, 5, 19) << 2;
1503 imm |= fieldFromInstruction(insn, 29, 2);
1506 if (imm & (1 << (21 - 1)))
1507 imm |= ~((1LL << 21) - 1);
1509 DecodeSimpleRegisterClass<AArch64::GPR64RegClassID, 0, 32>(Inst, Rd,
Addr,
1520 unsigned Rd = fieldFromInstruction(insn, 0, 5);
1521 unsigned Rn = fieldFromInstruction(insn, 5, 5);
1522 unsigned Imm = fieldFromInstruction(insn, 10, 14);
1523 unsigned S = fieldFromInstruction(insn, 29, 1);
1524 unsigned Datasize = fieldFromInstruction(insn, 31, 1);
1526 unsigned ShifterVal = (Imm >> 12) & 3;
1527 unsigned ImmVal = Imm & 0xFFF;
1529 if (ShifterVal != 0 && ShifterVal != 1)
1534 DecodeSimpleRegisterClass<AArch64::GPR64spRegClassID, 0, 32>(
1535 Inst, Rd,
Addr, Decoder);
1537 DecodeSimpleRegisterClass<AArch64::GPR64RegClassID, 0, 32>(Inst, Rd,
Addr,
1539 DecodeSimpleRegisterClass<AArch64::GPR64spRegClassID, 0, 32>(Inst, Rn,
Addr,
1543 DecodeSimpleRegisterClass<AArch64::GPR32spRegClassID, 0, 32>(
1544 Inst, Rd,
Addr, Decoder);
1546 DecodeSimpleRegisterClass<AArch64::GPR32RegClassID, 0, 32>(Inst, Rd,
Addr,
1548 DecodeSimpleRegisterClass<AArch64::GPR32spRegClassID, 0, 32>(Inst, Rn,
Addr,
1561 int64_t imm = fieldFromInstruction(insn, 0, 26);
1564 if (imm & (1 << (26 - 1)))
1565 imm |= ~((1LL << 26) - 1);
1574 return Op1 == 0b000 && (Op2 == 0b000 ||
1582 uint64_t op1 = fieldFromInstruction(insn, 16, 3);
1583 uint64_t op2 = fieldFromInstruction(insn, 5, 3);
1584 uint64_t imm = fieldFromInstruction(insn, 8, 4);
1585 uint64_t pstate_field = (op1 << 3) | op2;
1593 auto PState = AArch64PState::lookupPStateImm0_15ByEncoding(pstate_field);
1603 uint64_t op1 = fieldFromInstruction(insn, 16, 3);
1604 uint64_t op2 = fieldFromInstruction(insn, 5, 3);
1605 uint64_t crm_high = fieldFromInstruction(insn, 9, 3);
1606 uint64_t imm = fieldFromInstruction(insn, 8, 1);
1607 uint64_t pstate_field = (crm_high << 6) | (op1 << 3) | op2;
1615 auto PState = AArch64PState::lookupPStateImm0_1ByEncoding(pstate_field);
1625 uint64_t Rt = fieldFromInstruction(insn, 0, 5);
1626 uint64_t bit = fieldFromInstruction(insn, 31, 1) << 5;
1627 bit |= fieldFromInstruction(insn, 19, 5);
1628 int64_t dst = fieldFromInstruction(insn, 5, 14);
1631 if (dst & (1 << (14 - 1)))
1632 dst |= ~((1LL << 14) - 1);
1634 if (fieldFromInstruction(insn, 31, 1) == 0)
1635 DecodeSimpleRegisterClass<AArch64::GPR32RegClassID, 0, 32>(Inst, Rt,
Addr,
1638 DecodeSimpleRegisterClass<AArch64::GPR64RegClassID, 0, 32>(Inst, Rt,
Addr,
1655 unsigned Reg = AArch64MCRegisterClasses[RegClassID].getRegister(RegNo / 2);
1664 Inst, AArch64::WSeqPairsClassRegClassID, RegNo,
Addr, Decoder);
1671 Inst, AArch64::XSeqPairsClassRegClassID, RegNo,
Addr, Decoder);
1677 unsigned op1 = fieldFromInstruction(insn, 16, 3);
1678 unsigned CRn = fieldFromInstruction(insn, 12, 4);
1679 unsigned CRm = fieldFromInstruction(insn, 8, 4);
1680 unsigned op2 = fieldFromInstruction(insn, 5, 3);
1681 unsigned Rt = fieldFromInstruction(insn, 0, 5);
1689 DecodeSimpleRegisterClass<AArch64::GPR64RegClassID, 0, 32>(Inst, Rt,
Addr,
1698 unsigned Zdn = fieldFromInstruction(insn, 0, 5);
1699 unsigned imm = fieldFromInstruction(insn, 5, 13);
1704 DecodeSimpleRegisterClass<AArch64::ZPRRegClassID, 0, 32>(Inst, Zdn,
Addr,
1706 if (Inst.
getOpcode() != AArch64::DUPM_ZI)
1707 DecodeSimpleRegisterClass<AArch64::ZPRRegClassID, 0, 32>(Inst, Zdn,
Addr,
1716 if (Imm & ~((1LL << Bits) - 1))
1720 if (Imm & (1 << (Bits - 1)))
1721 Imm |= ~((1LL << Bits) - 1);
1728template <
int ElementW
idth>
1732 unsigned Shift = (Imm & 0x100) ? 8 : 0;
1733 if (ElementWidth == 8 && Shift)
1750 if (AArch64SVCR::lookupSVCRByEncoding(Imm)) {
1760 unsigned Rd = fieldFromInstruction(insn, 0, 5);
1761 unsigned Rs = fieldFromInstruction(insn, 16, 5);
1762 unsigned Rn = fieldFromInstruction(insn, 5, 5);
1766 if (Rd == Rs || Rs == Rn || Rd == Rn)
1771 if (!DecodeSimpleRegisterClass<AArch64::GPR64commonRegClassID, 0, 31>(
1772 Inst, Rd,
Addr, Decoder) ||
1773 !DecodeSimpleRegisterClass<AArch64::GPR64commonRegClassID, 0, 31>(
1774 Inst, Rs,
Addr, Decoder) ||
1775 !DecodeSimpleRegisterClass<AArch64::GPR64RegClassID, 0, 32>(
1776 Inst, Rn,
Addr, Decoder) ||
1777 !DecodeSimpleRegisterClass<AArch64::GPR64commonRegClassID, 0, 31>(
1778 Inst, Rd,
Addr, Decoder) ||
1779 !DecodeSimpleRegisterClass<AArch64::GPR64commonRegClassID, 0, 31>(
1780 Inst, Rs,
Addr, Decoder) ||
1781 !DecodeSimpleRegisterClass<AArch64::GPR64RegClassID, 0, 32>(
1782 Inst, Rn,
Addr, Decoder))
1791 unsigned Rd = fieldFromInstruction(insn, 0, 5);
1792 unsigned Rm = fieldFromInstruction(insn, 16, 5);
1793 unsigned Rn = fieldFromInstruction(insn, 5, 5);
1797 if (Rd == Rm || Rm == Rn || Rd == Rn)
1802 if (!DecodeSimpleRegisterClass<AArch64::GPR64commonRegClassID, 0, 31>(
1803 Inst, Rd,
Addr, Decoder) ||
1804 !DecodeSimpleRegisterClass<AArch64::GPR64RegClassID, 0, 32>(
1805 Inst, Rn,
Addr, Decoder) ||
1806 !DecodeSimpleRegisterClass<AArch64::GPR64commonRegClassID, 0, 31>(
1807 Inst, Rd,
Addr, Decoder) ||
1808 !DecodeSimpleRegisterClass<AArch64::GPR64RegClassID, 0, 32>(
1809 Inst, Rn,
Addr, Decoder) ||
1810 !DecodeSimpleRegisterClass<AArch64::GPR64RegClassID, 0, 32>(
1811 Inst, Rm,
Addr, Decoder))
1822 unsigned Mask = 0x18;
1823 uint64_t Rt = fieldFromInstruction(insn, 0, 5);
1824 if ((Rt & Mask) == Mask)
1827 uint64_t Rn = fieldFromInstruction(insn, 5, 5);
1828 uint64_t Shift = fieldFromInstruction(insn, 12, 1);
1829 uint64_t Extend = fieldFromInstruction(insn, 15, 1);
1830 uint64_t Rm = fieldFromInstruction(insn, 16, 5);
1833 DecodeSimpleRegisterClass<AArch64::GPR64spRegClassID, 0, 32>(Inst, Rn,
Addr,
1839 case AArch64::PRFMroW:
1840 DecodeSimpleRegisterClass<AArch64::GPR32RegClassID, 0, 32>(Inst, Rm,
Addr,
1843 case AArch64::PRFMroX:
1844 DecodeSimpleRegisterClass<AArch64::GPR64RegClassID, 0, 32>(Inst, Rm,
Addr,
static DecodeStatus DecodeUnconditionalBranch(MCInst &Inst, uint32_t insn, uint64_t Address, 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 DecodeFixedPointScaleImm64(MCInst &Inst, unsigned Imm, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeAddSubERegInstruction(MCInst &Inst, uint32_t insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeModImmInstruction(MCInst &Inst, uint32_t insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeLogicalImmInstruction(MCInst &Inst, uint32_t insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeMoveImmInstruction(MCInst &Inst, uint32_t insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeSystemPStateImm0_1Instruction(MCInst &Inst, uint32_t insn, uint64_t Address, 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 DecodeUnsignedLdStInstruction(MCInst &Inst, uint32_t insn, uint64_t Address, const MCDisassembler *Decoder)
static const MCPhysReg MatrixZATileDecoderTable[5][16]
static DecodeStatus DecodeXSeqPairsClassRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Addr, const MCDisassembler *Decoder)
static DecodeStatus DecodeAuthLoadInstruction(MCInst &Inst, uint32_t insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeVecShiftL16Imm(MCInst &Inst, unsigned Imm, uint64_t Addr, const MCDisassembler *Decoder)
static DecodeStatus DecodePairLdStInstruction(MCInst &Inst, uint32_t insn, uint64_t Address, 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 DecodePPR2Mul2RegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeSystemPStateImm0_15Instruction(MCInst &Inst, uint32_t insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeVecShiftL8Imm(MCInst &Inst, unsigned Imm, uint64_t Addr, const MCDisassembler *Decoder)
static DecodeStatus DecodePCRelLabel16(MCInst &Inst, unsigned Imm, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeSVEIncDecImm(MCInst &Inst, unsigned Imm, uint64_t Addr, const MCDisassembler *Decoder)
static DecodeStatus DecodeFixedPointScaleImm32(MCInst &Inst, unsigned Imm, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeTestAndBranch(MCInst &Inst, uint32_t insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeSVELogicalImmInstruction(MCInst &Inst, uint32_t insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeVecShiftRImm(MCInst &Inst, unsigned Imm, unsigned Add)
LLVM_EXTERNAL_VISIBILITY void LLVMInitializeAArch64Disassembler()
static DecodeStatus DecodeVecShiftR64Imm(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 DecodePCRelLabel9(MCInst &Inst, unsigned Imm, uint64_t Address, 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 DecodeAddSubImmShift(MCInst &Inst, uint32_t insn, uint64_t Address, const MCDisassembler *Decoder)
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)
static DecodeStatus DecodeSETMemOpInstruction(MCInst &Inst, uint32_t insn, uint64_t Addr, const MCDisassembler *Decoder)
static DecodeStatus DecodePCRelLabel19(MCInst &Inst, unsigned Imm, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeThreeAddrSRegInstruction(MCInst &Inst, uint32_t insn, uint64_t Address, 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 Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeExclusiveLdStInstruction(MCInst &Inst, uint32_t insn, uint64_t Address, 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 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 DecodeAdrInstruction(MCInst &Inst, uint32_t insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodePRFMRegInstruction(MCInst &Inst, uint32_t insn, 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 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 DecodeModImmTiedInstruction(MCInst &Inst, uint32_t insn, uint64_t Address, const MCDisassembler *Decoder)
SmallVector< AArch64_IMM::ImmInsnModel, 4 > Insn
#define LLVM_EXTERNAL_VISIBILITY
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
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.
Instances of this class represent operands of the MCInst class.
static MCOperand createReg(MCRegister Reg)
static MCOperand createImm(int64_t Val)
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"...
This is an optimization pass for GlobalISel generic memory operations.
Target & getTheAArch64beTarget()
Target & getTheAArch64leTarget()
Target & getTheAArch64_32Target()
Target & getTheARM64_32Target()
Target & getTheARM64Target()
Description of the encoding of one expression Op.
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.