34#define DEBUG_TYPE "aarch64-disassembler"
41template <
unsigned RegClassID,
unsigned FirstReg,
unsigned NumRegsInClass>
54template <
unsigned NumBitsForTile>
192template <
int ElementW
idth>
210#include "AArch64GenDisassemblerTables.inc"
211#include "AArch64GenInstrInfo.inc"
213#define Success MCDisassembler::Success
214#define Fail MCDisassembler::Fail
215#define SoftFail MCDisassembler::SoftFail
232 if (Bytes.
size() < 4)
238 (Bytes[3] << 24) | (Bytes[2] << 16) | (Bytes[1] << 8) | (Bytes[0] << 0);
240 const uint8_t *Tables[] = {DecoderTable32, DecoderTableFallback32};
242 for (
const auto *Table : Tables) {
251 for (
unsigned i = 0; i <
Desc.getNumOperands(); i++) {
253 switch (
Desc.operands()[i].RegClass) {
256 case AArch64::MPRRegClassID:
259 case AArch64::MPR8RegClassID:
262 case AArch64::ZTRRegClassID:
266 }
else if (
Desc.operands()[i].OperandType ==
272 if (
MI.getOpcode() == AArch64::LDR_ZA ||
273 MI.getOpcode() == AArch64::STR_ZA) {
278 assert(Imm4Op.
isImm() &&
"Unexpected operand type!");
279 MI.addOperand(Imm4Op);
301 std::unique_ptr<MCRelocationInfo> &&RelInfo) {
303 SymbolLookUp, DisInfo);
330template <
unsigned RegClassID,
unsigned FirstReg,
unsigned NumRegsInClass>
334 if (RegNo > NumRegsInClass - 1)
338 AArch64MCRegisterClasses[RegClassID].getRegister(RegNo + FirstReg);
352 AArch64MCRegisterClasses[AArch64::GPR64x8ClassRegClassID].getRegister(
360 const void *Decoder) {
364 AArch64MCRegisterClasses[AArch64::ZPR2RegClassID].getRegister(RegNo * 2);
371 const void *Decoder) {
375 AArch64MCRegisterClasses[AArch64::ZPR4RegClassID].getRegister(RegNo * 4);
392 {AArch64::ZAH0, AArch64::ZAH1},
393 {AArch64::ZAS0, AArch64::ZAS1, AArch64::ZAS2, AArch64::ZAS3},
394 {AArch64::ZAD0, AArch64::ZAD1, AArch64::ZAD2, AArch64::ZAD3, AArch64::ZAD4,
395 AArch64::ZAD5, AArch64::ZAD6, AArch64::ZAD7},
396 {AArch64::ZAQ0, AArch64::ZAQ1, AArch64::ZAQ2, AArch64::ZAQ3, AArch64::ZAQ4,
397 AArch64::ZAQ5, AArch64::ZAQ6, AArch64::ZAQ7, AArch64::ZAQ8, AArch64::ZAQ9,
398 AArch64::ZAQ10, AArch64::ZAQ11, AArch64::ZAQ12, AArch64::ZAQ13,
399 AArch64::ZAQ14, AArch64::ZAQ15}};
401template <
unsigned NumBitsForTile>
405 unsigned LastReg = (1 << NumBitsForTile) - 1;
415 const void *Decoder) {
416 if ((RegNo * 2) > 14)
419 AArch64MCRegisterClasses[AArch64::PPR2RegClassID].getRegister(RegNo * 2);
446 if (ImmVal > (1 << 16))
458 int64_t ImmVal = Imm;
461 if (ImmVal & (1 << (19 - 1)))
462 ImmVal |= ~((1LL << 19) - 1);
465 Inst, ImmVal * 4,
Addr, Inst.
getOpcode() != AArch64::LDRXl, 0, 0, 4))
501 unsigned Rd = fieldFromInstruction(
Insn, 0, 5);
502 unsigned Rn = fieldFromInstruction(
Insn, 5, 5);
503 unsigned IsToVec = fieldFromInstruction(
Insn, 16, 1);
506 DecodeSimpleRegisterClass<AArch64::FPR128RegClassID, 0, 32>(
508 DecodeSimpleRegisterClass<AArch64::GPR64RegClassID, 0, 32>(
511 DecodeSimpleRegisterClass<AArch64::GPR64RegClassID, 0, 32>(
513 DecodeSimpleRegisterClass<AArch64::FPR128RegClassID, 0, 32>(
604 unsigned Rd = fieldFromInstruction(insn, 0, 5);
605 unsigned Rn = fieldFromInstruction(insn, 5, 5);
606 unsigned Rm = fieldFromInstruction(insn, 16, 5);
607 unsigned shiftHi = fieldFromInstruction(insn, 22, 2);
608 unsigned shiftLo = fieldFromInstruction(insn, 10, 6);
609 unsigned shift = (shiftHi << 6) | shiftLo;
613 case AArch64::ADDWrs:
614 case AArch64::ADDSWrs:
615 case AArch64::SUBWrs:
616 case AArch64::SUBSWrs:
621 case AArch64::ANDWrs:
622 case AArch64::ANDSWrs:
623 case AArch64::BICWrs:
624 case AArch64::BICSWrs:
625 case AArch64::ORRWrs:
626 case AArch64::ORNWrs:
627 case AArch64::EORWrs:
628 case AArch64::EONWrs: {
630 if (shiftLo >> 5 == 1)
632 DecodeSimpleRegisterClass<AArch64::GPR32RegClassID, 0, 32>(Inst, Rd,
Addr,
634 DecodeSimpleRegisterClass<AArch64::GPR32RegClassID, 0, 32>(Inst, Rn,
Addr,
636 DecodeSimpleRegisterClass<AArch64::GPR32RegClassID, 0, 32>(Inst, Rm,
Addr,
640 case AArch64::ADDXrs:
641 case AArch64::ADDSXrs:
642 case AArch64::SUBXrs:
643 case AArch64::SUBSXrs:
648 case AArch64::ANDXrs:
649 case AArch64::ANDSXrs:
650 case AArch64::BICXrs:
651 case AArch64::BICSXrs:
652 case AArch64::ORRXrs:
653 case AArch64::ORNXrs:
654 case AArch64::EORXrs:
655 case AArch64::EONXrs:
656 DecodeSimpleRegisterClass<AArch64::GPR64RegClassID, 0, 32>(Inst, Rd,
Addr,
658 DecodeSimpleRegisterClass<AArch64::GPR64RegClassID, 0, 32>(Inst, Rn,
Addr,
660 DecodeSimpleRegisterClass<AArch64::GPR64RegClassID, 0, 32>(Inst, Rm,
Addr,
672 unsigned Rd = fieldFromInstruction(insn, 0, 5);
673 unsigned imm = fieldFromInstruction(insn, 5, 16);
674 unsigned shift = fieldFromInstruction(insn, 21, 2);
679 case AArch64::MOVZWi:
680 case AArch64::MOVNWi:
681 case AArch64::MOVKWi:
682 if (shift & (1U << 5))
684 DecodeSimpleRegisterClass<AArch64::GPR32RegClassID, 0, 32>(Inst, Rd,
Addr,
687 case AArch64::MOVZXi:
688 case AArch64::MOVNXi:
689 case AArch64::MOVKXi:
690 DecodeSimpleRegisterClass<AArch64::GPR64RegClassID, 0, 32>(Inst, Rd,
Addr,
695 if (Inst.
getOpcode() == AArch64::MOVKWi ||
707 unsigned Rt = fieldFromInstruction(insn, 0, 5);
708 unsigned Rn = fieldFromInstruction(insn, 5, 5);
709 unsigned offset = fieldFromInstruction(insn, 10, 12);
714 case AArch64::PRFMui:
718 case AArch64::STRBBui:
719 case AArch64::LDRBBui:
720 case AArch64::LDRSBWui:
721 case AArch64::STRHHui:
722 case AArch64::LDRHHui:
723 case AArch64::LDRSHWui:
724 case AArch64::STRWui:
725 case AArch64::LDRWui:
726 DecodeSimpleRegisterClass<AArch64::GPR32RegClassID, 0, 32>(Inst, Rt,
Addr,
729 case AArch64::LDRSBXui:
730 case AArch64::LDRSHXui:
731 case AArch64::LDRSWui:
732 case AArch64::STRXui:
733 case AArch64::LDRXui:
734 DecodeSimpleRegisterClass<AArch64::GPR64RegClassID, 0, 32>(Inst, Rt,
Addr,
737 case AArch64::LDRQui:
738 case AArch64::STRQui:
739 DecodeSimpleRegisterClass<AArch64::FPR128RegClassID, 0, 32>(Inst, Rt,
Addr,
742 case AArch64::LDRDui:
743 case AArch64::STRDui:
744 DecodeSimpleRegisterClass<AArch64::FPR64RegClassID, 0, 32>(Inst, Rt,
Addr,
747 case AArch64::LDRSui:
748 case AArch64::STRSui:
749 DecodeSimpleRegisterClass<AArch64::FPR32RegClassID, 0, 32>(Inst, Rt,
Addr,
752 case AArch64::LDRHui:
753 case AArch64::STRHui:
754 DecodeSimpleRegisterClass<AArch64::FPR16RegClassID, 0, 32>(Inst, Rt,
Addr,
757 case AArch64::LDRBui:
758 case AArch64::STRBui:
759 DecodeSimpleRegisterClass<AArch64::FPR8RegClassID, 0, 32>(Inst, Rt,
Addr,
764 DecodeSimpleRegisterClass<AArch64::GPR64spRegClassID, 0, 32>(Inst, Rn,
Addr,
774 unsigned Rt = fieldFromInstruction(insn, 0, 5);
775 unsigned Rn = fieldFromInstruction(insn, 5, 5);
776 int64_t offset = fieldFromInstruction(insn, 12, 9);
780 if (offset & (1 << (9 - 1)))
781 offset |= ~((1LL << 9) - 1);
787 case AArch64::LDRSBWpre:
788 case AArch64::LDRSHWpre:
789 case AArch64::STRBBpre:
790 case AArch64::LDRBBpre:
791 case AArch64::STRHHpre:
792 case AArch64::LDRHHpre:
793 case AArch64::STRWpre:
794 case AArch64::LDRWpre:
795 case AArch64::LDRSBWpost:
796 case AArch64::LDRSHWpost:
797 case AArch64::STRBBpost:
798 case AArch64::LDRBBpost:
799 case AArch64::STRHHpost:
800 case AArch64::LDRHHpost:
801 case AArch64::STRWpost:
802 case AArch64::LDRWpost:
803 case AArch64::LDRSBXpre:
804 case AArch64::LDRSHXpre:
805 case AArch64::STRXpre:
806 case AArch64::LDRSWpre:
807 case AArch64::LDRXpre:
808 case AArch64::LDRSBXpost:
809 case AArch64::LDRSHXpost:
810 case AArch64::STRXpost:
811 case AArch64::LDRSWpost:
812 case AArch64::LDRXpost:
813 case AArch64::LDRQpre:
814 case AArch64::STRQpre:
815 case AArch64::LDRQpost:
816 case AArch64::STRQpost:
817 case AArch64::LDRDpre:
818 case AArch64::STRDpre:
819 case AArch64::LDRDpost:
820 case AArch64::STRDpost:
821 case AArch64::LDRSpre:
822 case AArch64::STRSpre:
823 case AArch64::LDRSpost:
824 case AArch64::STRSpost:
825 case AArch64::LDRHpre:
826 case AArch64::STRHpre:
827 case AArch64::LDRHpost:
828 case AArch64::STRHpost:
829 case AArch64::LDRBpre:
830 case AArch64::STRBpre:
831 case AArch64::LDRBpost:
832 case AArch64::STRBpost:
833 DecodeSimpleRegisterClass<AArch64::GPR64spRegClassID, 0, 32>(Inst, Rn,
Addr,
841 case AArch64::PRFUMi:
845 case AArch64::STURBBi:
846 case AArch64::LDURBBi:
847 case AArch64::LDURSBWi:
848 case AArch64::STURHHi:
849 case AArch64::LDURHHi:
850 case AArch64::LDURSHWi:
851 case AArch64::STURWi:
852 case AArch64::LDURWi:
853 case AArch64::LDTRSBWi:
854 case AArch64::LDTRSHWi:
855 case AArch64::STTRWi:
856 case AArch64::LDTRWi:
857 case AArch64::STTRHi:
858 case AArch64::LDTRHi:
859 case AArch64::LDTRBi:
860 case AArch64::STTRBi:
861 case AArch64::LDRSBWpre:
862 case AArch64::LDRSHWpre:
863 case AArch64::STRBBpre:
864 case AArch64::LDRBBpre:
865 case AArch64::STRHHpre:
866 case AArch64::LDRHHpre:
867 case AArch64::STRWpre:
868 case AArch64::LDRWpre:
869 case AArch64::LDRSBWpost:
870 case AArch64::LDRSHWpost:
871 case AArch64::STRBBpost:
872 case AArch64::LDRBBpost:
873 case AArch64::STRHHpost:
874 case AArch64::LDRHHpost:
875 case AArch64::STRWpost:
876 case AArch64::LDRWpost:
877 case AArch64::STLURBi:
878 case AArch64::STLURHi:
879 case AArch64::STLURWi:
880 case AArch64::LDAPURBi:
881 case AArch64::LDAPURSBWi:
882 case AArch64::LDAPURHi:
883 case AArch64::LDAPURSHWi:
884 case AArch64::LDAPURi:
885 DecodeSimpleRegisterClass<AArch64::GPR32RegClassID, 0, 32>(Inst, Rt,
Addr,
888 case AArch64::LDURSBXi:
889 case AArch64::LDURSHXi:
890 case AArch64::LDURSWi:
891 case AArch64::STURXi:
892 case AArch64::LDURXi:
893 case AArch64::LDTRSBXi:
894 case AArch64::LDTRSHXi:
895 case AArch64::LDTRSWi:
896 case AArch64::STTRXi:
897 case AArch64::LDTRXi:
898 case AArch64::LDRSBXpre:
899 case AArch64::LDRSHXpre:
900 case AArch64::STRXpre:
901 case AArch64::LDRSWpre:
902 case AArch64::LDRXpre:
903 case AArch64::LDRSBXpost:
904 case AArch64::LDRSHXpost:
905 case AArch64::STRXpost:
906 case AArch64::LDRSWpost:
907 case AArch64::LDRXpost:
908 case AArch64::LDAPURSWi:
909 case AArch64::LDAPURSHXi:
910 case AArch64::LDAPURSBXi:
911 case AArch64::STLURXi:
912 case AArch64::LDAPURXi:
913 DecodeSimpleRegisterClass<AArch64::GPR64RegClassID, 0, 32>(Inst, Rt,
Addr,
916 case AArch64::LDURQi:
917 case AArch64::STURQi:
918 case AArch64::LDRQpre:
919 case AArch64::STRQpre:
920 case AArch64::LDRQpost:
921 case AArch64::STRQpost:
922 DecodeSimpleRegisterClass<AArch64::FPR128RegClassID, 0, 32>(Inst, Rt,
Addr,
925 case AArch64::LDURDi:
926 case AArch64::STURDi:
927 case AArch64::LDRDpre:
928 case AArch64::STRDpre:
929 case AArch64::LDRDpost:
930 case AArch64::STRDpost:
931 DecodeSimpleRegisterClass<AArch64::FPR64RegClassID, 0, 32>(Inst, Rt,
Addr,
934 case AArch64::LDURSi:
935 case AArch64::STURSi:
936 case AArch64::LDRSpre:
937 case AArch64::STRSpre:
938 case AArch64::LDRSpost:
939 case AArch64::STRSpost:
940 DecodeSimpleRegisterClass<AArch64::FPR32RegClassID, 0, 32>(Inst, Rt,
Addr,
943 case AArch64::LDURHi:
944 case AArch64::STURHi:
945 case AArch64::LDRHpre:
946 case AArch64::STRHpre:
947 case AArch64::LDRHpost:
948 case AArch64::STRHpost:
949 DecodeSimpleRegisterClass<AArch64::FPR16RegClassID, 0, 32>(Inst, Rt,
Addr,
952 case AArch64::LDURBi:
953 case AArch64::STURBi:
954 case AArch64::LDRBpre:
955 case AArch64::STRBpre:
956 case AArch64::LDRBpost:
957 case AArch64::STRBpost:
958 DecodeSimpleRegisterClass<AArch64::FPR8RegClassID, 0, 32>(Inst, Rt,
Addr,
963 DecodeSimpleRegisterClass<AArch64::GPR64spRegClassID, 0, 32>(Inst, Rn,
Addr,
967 bool IsLoad = fieldFromInstruction(insn, 22, 1);
968 bool IsIndexed = fieldFromInstruction(insn, 10, 2) != 0;
969 bool IsFP = fieldFromInstruction(insn, 26, 1);
972 if (IsLoad && IsIndexed && !IsFP && Rn != 31 && Rt == Rn)
981 unsigned Rt = fieldFromInstruction(insn, 0, 5);
982 unsigned Rn = fieldFromInstruction(insn, 5, 5);
983 unsigned Rt2 = fieldFromInstruction(insn, 10, 5);
984 unsigned Rs = fieldFromInstruction(insn, 16, 5);
990 case AArch64::STLXRW:
991 case AArch64::STLXRB:
992 case AArch64::STLXRH:
996 DecodeSimpleRegisterClass<AArch64::GPR32RegClassID, 0, 32>(Inst, Rs,
Addr,
1000 case AArch64::LDARB:
1001 case AArch64::LDARH:
1002 case AArch64::LDAXRW:
1003 case AArch64::LDAXRB:
1004 case AArch64::LDAXRH:
1005 case AArch64::LDXRW:
1006 case AArch64::LDXRB:
1007 case AArch64::LDXRH:
1008 case AArch64::STLRW:
1009 case AArch64::STLRB:
1010 case AArch64::STLRH:
1011 case AArch64::STLLRW:
1012 case AArch64::STLLRB:
1013 case AArch64::STLLRH:
1014 case AArch64::LDLARW:
1015 case AArch64::LDLARB:
1016 case AArch64::LDLARH:
1017 DecodeSimpleRegisterClass<AArch64::GPR32RegClassID, 0, 32>(Inst, Rt,
Addr,
1020 case AArch64::STLXRX:
1021 case AArch64::STXRX:
1022 DecodeSimpleRegisterClass<AArch64::GPR32RegClassID, 0, 32>(Inst, Rs,
Addr,
1025 case AArch64::LDARX:
1026 case AArch64::LDAXRX:
1027 case AArch64::LDXRX:
1028 case AArch64::STLRX:
1029 case AArch64::LDLARX:
1030 case AArch64::STLLRX:
1031 DecodeSimpleRegisterClass<AArch64::GPR64RegClassID, 0, 32>(Inst, Rt,
Addr,
1034 case AArch64::STLXPW:
1035 case AArch64::STXPW:
1036 DecodeSimpleRegisterClass<AArch64::GPR32RegClassID, 0, 32>(Inst, Rs,
Addr,
1039 case AArch64::LDAXPW:
1040 case AArch64::LDXPW:
1041 DecodeSimpleRegisterClass<AArch64::GPR32RegClassID, 0, 32>(Inst, Rt,
Addr,
1043 DecodeSimpleRegisterClass<AArch64::GPR32RegClassID, 0, 32>(Inst, Rt2,
Addr,
1046 case AArch64::STLXPX:
1047 case AArch64::STXPX:
1048 DecodeSimpleRegisterClass<AArch64::GPR32RegClassID, 0, 32>(Inst, Rs,
Addr,
1051 case AArch64::LDAXPX:
1052 case AArch64::LDXPX:
1053 DecodeSimpleRegisterClass<AArch64::GPR64RegClassID, 0, 32>(Inst, Rt,
Addr,
1055 DecodeSimpleRegisterClass<AArch64::GPR64RegClassID, 0, 32>(Inst, Rt2,
Addr,
1060 DecodeSimpleRegisterClass<AArch64::GPR64spRegClassID, 0, 32>(Inst, Rn,
Addr,
1064 if ((Opcode == AArch64::LDAXPW || Opcode == AArch64::LDXPW ||
1065 Opcode == AArch64::LDAXPX || Opcode == AArch64::LDXPX) &&
1075 unsigned Rt = fieldFromInstruction(insn, 0, 5);
1076 unsigned Rn = fieldFromInstruction(insn, 5, 5);
1077 unsigned Rt2 = fieldFromInstruction(insn, 10, 5);
1078 int64_t offset = fieldFromInstruction(insn, 15, 7);
1079 bool IsLoad = fieldFromInstruction(insn, 22, 1);
1083 if (offset & (1 << (7 - 1)))
1084 offset |= ~((1LL << 7) - 1);
1087 bool NeedsDisjointWritebackTransfer =
false;
1093 case AArch64::LDPXpost:
1094 case AArch64::STPXpost:
1095 case AArch64::LDPSWpost:
1096 case AArch64::LDPXpre:
1097 case AArch64::STPXpre:
1098 case AArch64::LDPSWpre:
1099 case AArch64::LDPWpost:
1100 case AArch64::STPWpost:
1101 case AArch64::LDPWpre:
1102 case AArch64::STPWpre:
1103 case AArch64::LDPQpost:
1104 case AArch64::STPQpost:
1105 case AArch64::LDPQpre:
1106 case AArch64::STPQpre:
1107 case AArch64::LDPDpost:
1108 case AArch64::STPDpost:
1109 case AArch64::LDPDpre:
1110 case AArch64::STPDpre:
1111 case AArch64::LDPSpost:
1112 case AArch64::STPSpost:
1113 case AArch64::LDPSpre:
1114 case AArch64::STPSpre:
1115 case AArch64::STGPpre:
1116 case AArch64::STGPpost:
1117 DecodeSimpleRegisterClass<AArch64::GPR64spRegClassID, 0, 32>(Inst, Rn,
Addr,
1125 case AArch64::LDPXpost:
1126 case AArch64::STPXpost:
1127 case AArch64::LDPSWpost:
1128 case AArch64::LDPXpre:
1129 case AArch64::STPXpre:
1130 case AArch64::LDPSWpre:
1131 case AArch64::STGPpre:
1132 case AArch64::STGPpost:
1133 NeedsDisjointWritebackTransfer =
true;
1135 case AArch64::LDNPXi:
1136 case AArch64::STNPXi:
1137 case AArch64::LDPXi:
1138 case AArch64::STPXi:
1139 case AArch64::LDPSWi:
1140 case AArch64::STGPi:
1141 DecodeSimpleRegisterClass<AArch64::GPR64RegClassID, 0, 32>(Inst, Rt,
Addr,
1143 DecodeSimpleRegisterClass<AArch64::GPR64RegClassID, 0, 32>(Inst, Rt2,
Addr,
1146 case AArch64::LDPWpost:
1147 case AArch64::STPWpost:
1148 case AArch64::LDPWpre:
1149 case AArch64::STPWpre:
1150 NeedsDisjointWritebackTransfer =
true;
1152 case AArch64::LDNPWi:
1153 case AArch64::STNPWi:
1154 case AArch64::LDPWi:
1155 case AArch64::STPWi:
1156 DecodeSimpleRegisterClass<AArch64::GPR32RegClassID, 0, 32>(Inst, Rt,
Addr,
1158 DecodeSimpleRegisterClass<AArch64::GPR32RegClassID, 0, 32>(Inst, Rt2,
Addr,
1161 case AArch64::LDNPQi:
1162 case AArch64::STNPQi:
1163 case AArch64::LDPQpost:
1164 case AArch64::STPQpost:
1165 case AArch64::LDPQi:
1166 case AArch64::STPQi:
1167 case AArch64::LDPQpre:
1168 case AArch64::STPQpre:
1169 DecodeSimpleRegisterClass<AArch64::FPR128RegClassID, 0, 32>(Inst, Rt,
Addr,
1171 DecodeSimpleRegisterClass<AArch64::FPR128RegClassID, 0, 32>(Inst, Rt2,
Addr,
1174 case AArch64::LDNPDi:
1175 case AArch64::STNPDi:
1176 case AArch64::LDPDpost:
1177 case AArch64::STPDpost:
1178 case AArch64::LDPDi:
1179 case AArch64::STPDi:
1180 case AArch64::LDPDpre:
1181 case AArch64::STPDpre:
1182 DecodeSimpleRegisterClass<AArch64::FPR64RegClassID, 0, 32>(Inst, Rt,
Addr,
1184 DecodeSimpleRegisterClass<AArch64::FPR64RegClassID, 0, 32>(Inst, Rt2,
Addr,
1187 case AArch64::LDNPSi:
1188 case AArch64::STNPSi:
1189 case AArch64::LDPSpost:
1190 case AArch64::STPSpost:
1191 case AArch64::LDPSi:
1192 case AArch64::STPSi:
1193 case AArch64::LDPSpre:
1194 case AArch64::STPSpre:
1195 DecodeSimpleRegisterClass<AArch64::FPR32RegClassID, 0, 32>(Inst, Rt,
Addr,
1197 DecodeSimpleRegisterClass<AArch64::FPR32RegClassID, 0, 32>(Inst, Rt2,
Addr,
1202 DecodeSimpleRegisterClass<AArch64::GPR64spRegClassID, 0, 32>(Inst, Rn,
Addr,
1207 if (IsLoad && Rt == Rt2)
1212 if (NeedsDisjointWritebackTransfer && Rn != 31 && (Rt == Rn || Rt2 == Rn))
1221 unsigned Rt = fieldFromInstruction(insn, 0, 5);
1222 unsigned Rn = fieldFromInstruction(insn, 5, 5);
1223 uint64_t offset = fieldFromInstruction(insn, 22, 1) << 9 |
1224 fieldFromInstruction(insn, 12, 9);
1225 unsigned writeback = fieldFromInstruction(insn, 11, 1);
1230 case AArch64::LDRAAwriteback:
1231 case AArch64::LDRABwriteback:
1232 DecodeSimpleRegisterClass<AArch64::GPR64spRegClassID, 0, 32>(
1233 Inst, Rn ,
Addr, Decoder);
1235 case AArch64::LDRAAindexed:
1236 case AArch64::LDRABindexed:
1240 DecodeSimpleRegisterClass<AArch64::GPR64RegClassID, 0, 32>(Inst, Rt,
Addr,
1242 DecodeSimpleRegisterClass<AArch64::GPR64spRegClassID, 0, 32>(Inst, Rn,
Addr,
1244 DecodeSImm<10>(Inst, offset,
Addr, Decoder);
1246 if (writeback && Rt == Rn && Rn != 31) {
1256 unsigned Rd = fieldFromInstruction(insn, 0, 5);
1257 unsigned Rn = fieldFromInstruction(insn, 5, 5);
1258 unsigned Rm = fieldFromInstruction(insn, 16, 5);
1259 unsigned extend = fieldFromInstruction(insn, 10, 6);
1261 unsigned shift = extend & 0x7;
1268 case AArch64::ADDWrx:
1269 case AArch64::SUBWrx:
1270 DecodeSimpleRegisterClass<AArch64::GPR32spRegClassID, 0, 32>(Inst, Rd,
Addr,
1272 DecodeSimpleRegisterClass<AArch64::GPR32spRegClassID, 0, 32>(Inst, Rn,
Addr,
1274 DecodeSimpleRegisterClass<AArch64::GPR32RegClassID, 0, 32>(Inst, Rm,
Addr,
1277 case AArch64::ADDSWrx:
1278 case AArch64::SUBSWrx:
1279 DecodeSimpleRegisterClass<AArch64::GPR32RegClassID, 0, 32>(Inst, Rd,
Addr,
1281 DecodeSimpleRegisterClass<AArch64::GPR32spRegClassID, 0, 32>(Inst, Rn,
Addr,
1283 DecodeSimpleRegisterClass<AArch64::GPR32RegClassID, 0, 32>(Inst, Rm,
Addr,
1286 case AArch64::ADDXrx:
1287 case AArch64::SUBXrx:
1288 DecodeSimpleRegisterClass<AArch64::GPR64spRegClassID, 0, 32>(Inst, Rd,
Addr,
1290 DecodeSimpleRegisterClass<AArch64::GPR64spRegClassID, 0, 32>(Inst, Rn,
Addr,
1292 DecodeSimpleRegisterClass<AArch64::GPR32RegClassID, 0, 32>(Inst, Rm,
Addr,
1295 case AArch64::ADDSXrx:
1296 case AArch64::SUBSXrx:
1297 DecodeSimpleRegisterClass<AArch64::GPR64RegClassID, 0, 32>(Inst, Rd,
Addr,
1299 DecodeSimpleRegisterClass<AArch64::GPR64spRegClassID, 0, 32>(Inst, Rn,
Addr,
1301 DecodeSimpleRegisterClass<AArch64::GPR32RegClassID, 0, 32>(Inst, Rm,
Addr,
1304 case AArch64::ADDXrx64:
1305 case AArch64::SUBXrx64:
1306 DecodeSimpleRegisterClass<AArch64::GPR64spRegClassID, 0, 32>(Inst, Rd,
Addr,
1308 DecodeSimpleRegisterClass<AArch64::GPR64spRegClassID, 0, 32>(Inst, Rn,
Addr,
1310 DecodeSimpleRegisterClass<AArch64::GPR64RegClassID, 0, 32>(Inst, Rm,
Addr,
1313 case AArch64::SUBSXrx64:
1314 case AArch64::ADDSXrx64:
1315 DecodeSimpleRegisterClass<AArch64::GPR64RegClassID, 0, 32>(Inst, Rd,
Addr,
1317 DecodeSimpleRegisterClass<AArch64::GPR64spRegClassID, 0, 32>(Inst, Rn,
Addr,
1319 DecodeSimpleRegisterClass<AArch64::GPR64RegClassID, 0, 32>(Inst, Rm,
Addr,
1331 unsigned Rd = fieldFromInstruction(insn, 0, 5);
1332 unsigned Rn = fieldFromInstruction(insn, 5, 5);
1333 unsigned Datasize = fieldFromInstruction(insn, 31, 1);
1337 if (Inst.
getOpcode() == AArch64::ANDSXri)
1338 DecodeSimpleRegisterClass<AArch64::GPR64RegClassID, 0, 32>(Inst, Rd,
Addr,
1341 DecodeSimpleRegisterClass<AArch64::GPR64spRegClassID, 0, 32>(
1342 Inst, Rd,
Addr, Decoder);
1343 DecodeSimpleRegisterClass<AArch64::GPR64RegClassID, 0, 32>(Inst, Rn,
Addr,
1345 imm = fieldFromInstruction(insn, 10, 13);
1349 if (Inst.
getOpcode() == AArch64::ANDSWri)
1350 DecodeSimpleRegisterClass<AArch64::GPR32RegClassID, 0, 32>(Inst, Rd,
Addr,
1353 DecodeSimpleRegisterClass<AArch64::GPR32spRegClassID, 0, 32>(
1354 Inst, Rd,
Addr, Decoder);
1355 DecodeSimpleRegisterClass<AArch64::GPR32RegClassID, 0, 32>(Inst, Rn,
Addr,
1357 imm = fieldFromInstruction(insn, 10, 12);
1368 unsigned Rd = fieldFromInstruction(insn, 0, 5);
1369 unsigned cmode = fieldFromInstruction(insn, 12, 4);
1370 unsigned imm = fieldFromInstruction(insn, 16, 3) << 5;
1371 imm |= fieldFromInstruction(insn, 5, 5);
1374 DecodeSimpleRegisterClass<AArch64::FPR64RegClassID, 0, 32>(Inst, Rd,
Addr,
1377 DecodeSimpleRegisterClass<AArch64::FPR128RegClassID, 0, 32>(Inst, Rd,
Addr,
1385 case AArch64::MOVIv4i16:
1386 case AArch64::MOVIv8i16:
1387 case AArch64::MVNIv4i16:
1388 case AArch64::MVNIv8i16:
1389 case AArch64::MOVIv2i32:
1390 case AArch64::MOVIv4i32:
1391 case AArch64::MVNIv2i32:
1392 case AArch64::MVNIv4i32:
1395 case AArch64::MOVIv2s_msl:
1396 case AArch64::MOVIv4s_msl:
1397 case AArch64::MVNIv2s_msl:
1398 case AArch64::MVNIv4s_msl:
1409 unsigned Rd = fieldFromInstruction(insn, 0, 5);
1410 unsigned cmode = fieldFromInstruction(insn, 12, 4);
1411 unsigned imm = fieldFromInstruction(insn, 16, 3) << 5;
1412 imm |= fieldFromInstruction(insn, 5, 5);
1415 DecodeSimpleRegisterClass<AArch64::FPR128RegClassID, 0, 32>(Inst, Rd,
Addr,
1417 DecodeSimpleRegisterClass<AArch64::FPR128RegClassID, 0, 32>(Inst, Rd,
Addr,
1429 unsigned Rd = fieldFromInstruction(insn, 0, 5);
1430 int64_t imm = fieldFromInstruction(insn, 5, 19) << 2;
1431 imm |= fieldFromInstruction(insn, 29, 2);
1434 if (imm & (1 << (21 - 1)))
1435 imm |= ~((1LL << 21) - 1);
1437 DecodeSimpleRegisterClass<AArch64::GPR64RegClassID, 0, 32>(Inst, Rd,
Addr,
1448 unsigned Rd = fieldFromInstruction(insn, 0, 5);
1449 unsigned Rn = fieldFromInstruction(insn, 5, 5);
1450 unsigned Imm = fieldFromInstruction(insn, 10, 14);
1451 unsigned S = fieldFromInstruction(insn, 29, 1);
1452 unsigned Datasize = fieldFromInstruction(insn, 31, 1);
1454 unsigned ShifterVal = (Imm >> 12) & 3;
1455 unsigned ImmVal = Imm & 0xFFF;
1457 if (ShifterVal != 0 && ShifterVal != 1)
1462 DecodeSimpleRegisterClass<AArch64::GPR64spRegClassID, 0, 32>(
1463 Inst, Rd,
Addr, Decoder);
1465 DecodeSimpleRegisterClass<AArch64::GPR64RegClassID, 0, 32>(Inst, Rd,
Addr,
1467 DecodeSimpleRegisterClass<AArch64::GPR64spRegClassID, 0, 32>(Inst, Rn,
Addr,
1471 DecodeSimpleRegisterClass<AArch64::GPR32spRegClassID, 0, 32>(
1472 Inst, Rd,
Addr, Decoder);
1474 DecodeSimpleRegisterClass<AArch64::GPR32RegClassID, 0, 32>(Inst, Rd,
Addr,
1476 DecodeSimpleRegisterClass<AArch64::GPR32spRegClassID, 0, 32>(Inst, Rn,
Addr,
1489 int64_t imm = fieldFromInstruction(insn, 0, 26);
1492 if (imm & (1 << (26 - 1)))
1493 imm |= ~((1LL << 26) - 1);
1502 return Op1 == 0b000 && (Op2 == 0b000 ||
1510 uint64_t op1 = fieldFromInstruction(insn, 16, 3);
1511 uint64_t op2 = fieldFromInstruction(insn, 5, 3);
1512 uint64_t imm = fieldFromInstruction(insn, 8, 4);
1513 uint64_t pstate_field = (op1 << 3) | op2;
1521 auto PState = AArch64PState::lookupPStateImm0_15ByEncoding(pstate_field);
1531 uint64_t op1 = fieldFromInstruction(insn, 16, 3);
1532 uint64_t op2 = fieldFromInstruction(insn, 5, 3);
1533 uint64_t crm_high = fieldFromInstruction(insn, 9, 3);
1534 uint64_t imm = fieldFromInstruction(insn, 8, 1);
1535 uint64_t pstate_field = (crm_high << 6) | (op1 << 3) | op2;
1543 auto PState = AArch64PState::lookupPStateImm0_1ByEncoding(pstate_field);
1553 uint64_t Rt = fieldFromInstruction(insn, 0, 5);
1554 uint64_t bit = fieldFromInstruction(insn, 31, 1) << 5;
1555 bit |= fieldFromInstruction(insn, 19, 5);
1556 int64_t dst = fieldFromInstruction(insn, 5, 14);
1559 if (dst & (1 << (14 - 1)))
1560 dst |= ~((1LL << 14) - 1);
1562 if (fieldFromInstruction(insn, 31, 1) == 0)
1563 DecodeSimpleRegisterClass<AArch64::GPR32RegClassID, 0, 32>(Inst, Rt,
Addr,
1566 DecodeSimpleRegisterClass<AArch64::GPR64RegClassID, 0, 32>(Inst, Rt,
Addr,
1583 unsigned Reg = AArch64MCRegisterClasses[RegClassID].getRegister(RegNo / 2);
1592 Inst, AArch64::WSeqPairsClassRegClassID, RegNo,
Addr, Decoder);
1599 Inst, AArch64::XSeqPairsClassRegClassID, RegNo,
Addr, Decoder);
1605 unsigned op1 = fieldFromInstruction(insn, 16, 3);
1606 unsigned CRn = fieldFromInstruction(insn, 12, 4);
1607 unsigned CRm = fieldFromInstruction(insn, 8, 4);
1608 unsigned op2 = fieldFromInstruction(insn, 5, 3);
1609 unsigned Rt = fieldFromInstruction(insn, 0, 5);
1617 DecodeSimpleRegisterClass<AArch64::GPR64RegClassID, 0, 32>(Inst, Rt,
Addr,
1626 unsigned Zdn = fieldFromInstruction(insn, 0, 5);
1627 unsigned imm = fieldFromInstruction(insn, 5, 13);
1632 DecodeSimpleRegisterClass<AArch64::ZPRRegClassID, 0, 32>(Inst, Zdn,
Addr,
1634 if (Inst.
getOpcode() != AArch64::DUPM_ZI)
1635 DecodeSimpleRegisterClass<AArch64::ZPRRegClassID, 0, 32>(Inst, Zdn,
Addr,
1644 if (Imm & ~((1LL << Bits) - 1))
1648 if (Imm & (1 << (Bits - 1)))
1649 Imm |= ~((1LL << Bits) - 1);
1656template <
int ElementW
idth>
1659 unsigned Val = (uint8_t)Imm;
1660 unsigned Shift = (Imm & 0x100) ? 8 : 0;
1661 if (ElementWidth == 8 && Shift)
1678 if (AArch64SVCR::lookupSVCRByEncoding(Imm)) {
1688 unsigned Rd = fieldFromInstruction(insn, 0, 5);
1689 unsigned Rs = fieldFromInstruction(insn, 16, 5);
1690 unsigned Rn = fieldFromInstruction(insn, 5, 5);
1694 if (Rd == Rs || Rs == Rn || Rd == Rn)
1699 if (!DecodeSimpleRegisterClass<AArch64::GPR64commonRegClassID, 0, 31>(
1700 Inst, Rd,
Addr, Decoder) ||
1701 !DecodeSimpleRegisterClass<AArch64::GPR64commonRegClassID, 0, 31>(
1702 Inst, Rs,
Addr, Decoder) ||
1703 !DecodeSimpleRegisterClass<AArch64::GPR64RegClassID, 0, 32>(
1704 Inst, Rn,
Addr, Decoder) ||
1705 !DecodeSimpleRegisterClass<AArch64::GPR64commonRegClassID, 0, 31>(
1706 Inst, Rd,
Addr, Decoder) ||
1707 !DecodeSimpleRegisterClass<AArch64::GPR64commonRegClassID, 0, 31>(
1708 Inst, Rs,
Addr, Decoder) ||
1709 !DecodeSimpleRegisterClass<AArch64::GPR64RegClassID, 0, 32>(
1710 Inst, Rn,
Addr, Decoder))
1719 unsigned Rd = fieldFromInstruction(insn, 0, 5);
1720 unsigned Rm = fieldFromInstruction(insn, 16, 5);
1721 unsigned Rn = fieldFromInstruction(insn, 5, 5);
1725 if (Rd == Rm || Rm == Rn || Rd == Rn)
1730 if (!DecodeSimpleRegisterClass<AArch64::GPR64commonRegClassID, 0, 31>(
1731 Inst, Rd,
Addr, Decoder) ||
1732 !DecodeSimpleRegisterClass<AArch64::GPR64RegClassID, 0, 32>(
1733 Inst, Rn,
Addr, Decoder) ||
1734 !DecodeSimpleRegisterClass<AArch64::GPR64commonRegClassID, 0, 31>(
1735 Inst, Rd,
Addr, Decoder) ||
1736 !DecodeSimpleRegisterClass<AArch64::GPR64RegClassID, 0, 32>(
1737 Inst, Rn,
Addr, Decoder) ||
1738 !DecodeSimpleRegisterClass<AArch64::GPR64RegClassID, 0, 32>(
1739 Inst, Rm,
Addr, Decoder))
1750 unsigned Mask = 0x18;
1751 uint64_t Rt = fieldFromInstruction(insn, 0, 5);
1752 if ((Rt & Mask) == Mask)
1755 uint64_t Rn = fieldFromInstruction(insn, 5, 5);
1756 uint64_t Shift = fieldFromInstruction(insn, 12, 1);
1757 uint64_t Extend = fieldFromInstruction(insn, 15, 1);
1758 uint64_t Rm = fieldFromInstruction(insn, 16, 5);
1761 DecodeSimpleRegisterClass<AArch64::GPR64spRegClassID, 0, 32>(Inst, Rn,
Addr,
1767 case AArch64::PRFMroW:
1768 DecodeSimpleRegisterClass<AArch64::GPR32RegClassID, 0, 32>(Inst, Rm,
Addr,
1771 case AArch64::PRFMroX:
1772 DecodeSimpleRegisterClass<AArch64::GPR64RegClassID, 0, 32>(Inst, Rm,
Addr,
static DecodeStatus DecodeUnconditionalBranch(MCInst &Inst, uint32_t insn, 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 DecodeZPR2Mul2RegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *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 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 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 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(unsigned 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.