37#define DEBUG_TYPE "arm-disassembler"
55 void advanceITState() { ITStates.pop_back(); }
58 bool instrInITBlock() {
return !ITStates.empty(); }
61 bool instrLastInITBlock() {
return ITStates.size() == 1; }
67 void setITState(
char Firstcond,
char Mask) {
70 unsigned char CCBits =
static_cast<unsigned char>(Firstcond & 0xf);
71 assert(NumTZ <= 3 &&
"Invalid IT mask!");
73 for (
unsigned Pos = NumTZ + 1; Pos <= 3; ++Pos) {
74 unsigned Else = (Mask >> Pos) & 1;
75 ITStates.push_back(CCBits ^ Else);
77 ITStates.push_back(CCBits);
81 std::vector<unsigned char> ITStates;
86 unsigned getVPTPred() {
88 if (instrInVPTBlock())
89 Pred = VPTStates.back();
93 void advanceVPTState() { VPTStates.pop_back(); }
95 bool instrInVPTBlock() {
return !VPTStates.empty(); }
97 bool instrLastInVPTBlock() {
return VPTStates.size() == 1; }
99 void setVPTState(
char Mask) {
102 assert(NumTZ <= 3 &&
"Invalid VPT mask!");
104 for (
unsigned Pos = NumTZ + 1; Pos <= 3; ++Pos) {
105 bool T = ((Mask >> Pos) & 1) == 0;
121 std::unique_ptr<const MCInstrInfo> MCII;
126 InstructionEndianness = STI.
hasFeature(ARM::ModeBigEndianInstructions)
131 ~ARMDisassembler()
override =
default;
149 mutable ITStatus ITBlock;
150 mutable VPTStatus VPTBlock;
152 void AddThumb1SBit(
MCInst &
MI,
bool InITBlock)
const;
211 ARM::R0, ARM::R1, ARM::R2, ARM::R3,
212 ARM::R4, ARM::R5, ARM::R6, ARM::R7,
213 ARM::R8, ARM::R9, ARM::R10, ARM::R11,
214 ARM::R12, ARM::SP, ARM::LR, ARM::PC
218 ARM::R0, ARM::R1, ARM::R2, ARM::R3,
219 ARM::R4, ARM::R5, ARM::R6, ARM::R7,
220 ARM::R8, ARM::R9, ARM::R10, ARM::R11,
221 ARM::R12, 0, ARM::LR, ARM::APSR
327 ARM::R0_R1, ARM::R2_R3, ARM::R4_R5, ARM::R6_R7,
328 ARM::R8_R9, ARM::R10_R11, ARM::R12_SP
358 if ((RegNo & 1) || RegNo > 10)
413 if ((RegNo == 13 && !featureBits[ARM::HasV8Ops]) || RegNo == 15)
421 ARM::S0, ARM::S1, ARM::S2, ARM::S3,
422 ARM::S4, ARM::S5, ARM::S6, ARM::S7,
423 ARM::S8, ARM::S9, ARM::S10, ARM::S11,
424 ARM::S12, ARM::S13, ARM::S14, ARM::S15,
425 ARM::S16, ARM::S17, ARM::S18, ARM::S19,
426 ARM::S20, ARM::S21, ARM::S22, ARM::S23,
427 ARM::S24, ARM::S25, ARM::S26, ARM::S27,
428 ARM::S28, ARM::S29, ARM::S30, ARM::S31
449 ARM::D0, ARM::D1, ARM::D2, ARM::D3,
450 ARM::D4, ARM::D5, ARM::D6, ARM::D7,
451 ARM::D8, ARM::D9, ARM::D10, ARM::D11,
452 ARM::D12, ARM::D13, ARM::D14, ARM::D15,
453 ARM::D16, ARM::D17, ARM::D18, ARM::D19,
454 ARM::D20, ARM::D21, ARM::D22, ARM::D23,
455 ARM::D24, ARM::D25, ARM::D26, ARM::D27,
456 ARM::D28, ARM::D29, ARM::D30, ARM::D31
465 return featureBits[ARM::FeatureD32];
471 if (RegNo > (
PermitsD32(Inst, Decoder) ? 31u : 15u))
504 ARM::Q0, ARM::Q1, ARM::Q2, ARM::Q3,
505 ARM::Q4, ARM::Q5, ARM::Q6, ARM::Q7,
506 ARM::Q8, ARM::Q9, ARM::Q10, ARM::Q11,
507 ARM::Q12, ARM::Q13, ARM::Q14, ARM::Q15
513 if (RegNo > 31 || (RegNo & 1) != 0)
523 ARM::Q0, ARM::D1_D2, ARM::Q1, ARM::D3_D4, ARM::Q2, ARM::D5_D6,
524 ARM::Q3, ARM::D7_D8, ARM::Q4, ARM::D9_D10, ARM::Q5, ARM::D11_D12,
525 ARM::Q6, ARM::D13_D14, ARM::Q7, ARM::D15_D16, ARM::Q8, ARM::D17_D18,
526 ARM::Q9, ARM::D19_D20, ARM::Q10, ARM::D21_D22, ARM::Q11, ARM::D23_D24,
527 ARM::Q12, ARM::D25_D26, ARM::Q13, ARM::D27_D28, ARM::Q14, ARM::D29_D30,
543 ARM::D0_D2, ARM::D1_D3, ARM::D2_D4, ARM::D3_D5,
544 ARM::D4_D6, ARM::D5_D7, ARM::D6_D8, ARM::D7_D9,
545 ARM::D8_D10, ARM::D9_D11, ARM::D10_D12, ARM::D11_D13,
546 ARM::D12_D14, ARM::D13_D15, ARM::D14_D16, ARM::D15_D17,
547 ARM::D16_D18, ARM::D17_D19, ARM::D18_D20, ARM::D19_D21,
548 ARM::D20_D22, ARM::D21_D23, ARM::D22_D24, ARM::D23_D25,
549 ARM::D24_D26, ARM::D25_D27, ARM::D26_D28, ARM::D27_D29,
550 ARM::D28_D30, ARM::D29_D31
576 ARM::Q0_Q1, ARM::Q1_Q2, ARM::Q2_Q3, ARM::Q3_Q4,
577 ARM::Q4_Q5, ARM::Q5_Q6, ARM::Q6_Q7
592 ARM::Q0_Q1_Q2_Q3, ARM::Q1_Q2_Q3_Q4, ARM::Q2_Q3_Q4_Q5,
593 ARM::Q3_Q4_Q5_Q6, ARM::Q4_Q5_Q6_Q7
615 if (Inst.
getOpcode() == ARM::tBcc && Val == 0xE)
618 static_cast<const ARMDisassembler *
>(Decoder)->MCII.
get();
671 unsigned Op = Shift | (imm << 3);
718 bool NeedDisjointWriteback =
false;
728 case ARM::t2LDMIA_UPD:
729 case ARM::t2LDMDB_UPD:
730 case ARM::t2STMIA_UPD:
731 case ARM::t2STMDB_UPD:
732 NeedDisjointWriteback =
true;
742 for (
unsigned i = 0; i < 16; ++i) {
743 if (Val & (1 << i)) {
752 if (NeedDisjointWriteback && WritebackReg == Inst.
end()[-1].getReg())
770 if (regs == 0 || (Vd + regs) > 32) {
771 regs = Vd + regs > 32 ? 32 - Vd : regs;
772 regs = std::max( 1u, regs);
778 for (
unsigned i = 0; i < (regs - 1); ++i) {
795 unsigned MaxReg =
PermitsD32(Inst, Decoder) ? 32 : 16;
796 if (regs == 0 || (Vd + regs) > MaxReg) {
797 regs = Vd + regs > MaxReg ? MaxReg - Vd : regs;
798 regs = std::max( 1u, regs);
799 regs = std::min(MaxReg, regs);
805 for (
unsigned i = 0; i < (regs - 1); ++i) {
834 if (msb != 31) msb_mask = (1U << (msb+1)) - 1;
835 uint32_t lsb_mask = (1U << lsb) - 1;
856 case ARM::LDC_OFFSET:
859 case ARM::LDC_OPTION:
860 case ARM::LDCL_OFFSET:
863 case ARM::LDCL_OPTION:
864 case ARM::STC_OFFSET:
867 case ARM::STC_OPTION:
868 case ARM::STCL_OFFSET:
871 case ARM::STCL_OPTION:
872 case ARM::t2LDC_OFFSET:
874 case ARM::t2LDC_POST:
875 case ARM::t2LDC_OPTION:
876 case ARM::t2LDCL_OFFSET:
877 case ARM::t2LDCL_PRE:
878 case ARM::t2LDCL_POST:
879 case ARM::t2LDCL_OPTION:
880 case ARM::t2STC_OFFSET:
882 case ARM::t2STC_POST:
883 case ARM::t2STC_OPTION:
884 case ARM::t2STCL_OFFSET:
885 case ARM::t2STCL_PRE:
886 case ARM::t2STCL_POST:
887 case ARM::t2STCL_OPTION:
888 case ARM::t2LDC2_OFFSET:
889 case ARM::t2LDC2L_OFFSET:
890 case ARM::t2LDC2_PRE:
891 case ARM::t2LDC2L_PRE:
892 case ARM::t2STC2_OFFSET:
893 case ARM::t2STC2L_OFFSET:
894 case ARM::t2STC2_PRE:
895 case ARM::t2STC2L_PRE:
896 case ARM::LDC2_OFFSET:
897 case ARM::LDC2L_OFFSET:
900 case ARM::STC2_OFFSET:
901 case ARM::STC2L_OFFSET:
904 case ARM::t2LDC2_OPTION:
905 case ARM::t2STC2_OPTION:
906 case ARM::t2LDC2_POST:
907 case ARM::t2LDC2L_POST:
908 case ARM::t2STC2_POST:
909 case ARM::t2STC2L_POST:
911 case ARM::LDC2L_POST:
913 case ARM::STC2L_POST:
914 if (coproc == 0xA || coproc == 0xB ||
915 (featureBits[ARM::HasV8_1MMainlineOps] &&
916 (coproc == 0x8 || coproc == 0x9 || coproc == 0xA || coproc == 0xB ||
917 coproc == 0xE || coproc == 0xF)))
924 if (featureBits[ARM::HasV8Ops] && (coproc != 14))
933 case ARM::t2LDC2_OFFSET:
934 case ARM::t2LDC2L_OFFSET:
935 case ARM::t2LDC2_PRE:
936 case ARM::t2LDC2L_PRE:
937 case ARM::t2STC2_OFFSET:
938 case ARM::t2STC2L_OFFSET:
939 case ARM::t2STC2_PRE:
940 case ARM::t2STC2L_PRE:
941 case ARM::LDC2_OFFSET:
942 case ARM::LDC2L_OFFSET:
945 case ARM::STC2_OFFSET:
946 case ARM::STC2L_OFFSET:
949 case ARM::t2LDC_OFFSET:
950 case ARM::t2LDCL_OFFSET:
952 case ARM::t2LDCL_PRE:
953 case ARM::t2STC_OFFSET:
954 case ARM::t2STCL_OFFSET:
956 case ARM::t2STCL_PRE:
957 case ARM::LDC_OFFSET:
958 case ARM::LDCL_OFFSET:
961 case ARM::STC_OFFSET:
962 case ARM::STCL_OFFSET:
968 case ARM::t2LDC2_POST:
969 case ARM::t2LDC2L_POST:
970 case ARM::t2STC2_POST:
971 case ARM::t2STC2L_POST:
973 case ARM::LDC2L_POST:
975 case ARM::STC2L_POST:
976 case ARM::t2LDC_POST:
977 case ARM::t2LDCL_POST:
978 case ARM::t2STC_POST:
979 case ARM::t2STCL_POST:
994 case ARM::LDC_OFFSET:
997 case ARM::LDC_OPTION:
998 case ARM::LDCL_OFFSET:
1000 case ARM::LDCL_POST:
1001 case ARM::LDCL_OPTION:
1002 case ARM::STC_OFFSET:
1005 case ARM::STC_OPTION:
1006 case ARM::STCL_OFFSET:
1008 case ARM::STCL_POST:
1009 case ARM::STCL_OPTION:
1036 case ARM::STR_POST_IMM:
1037 case ARM::STR_POST_REG:
1038 case ARM::STRB_POST_IMM:
1039 case ARM::STRB_POST_REG:
1040 case ARM::STRT_POST_REG:
1041 case ARM::STRT_POST_IMM:
1042 case ARM::STRBT_POST_REG:
1043 case ARM::STRBT_POST_IMM:
1056 case ARM::LDR_POST_IMM:
1057 case ARM::LDR_POST_REG:
1058 case ARM::LDRB_POST_IMM:
1059 case ARM::LDRB_POST_REG:
1060 case ARM::LDRBT_POST_REG:
1061 case ARM::LDRBT_POST_IMM:
1062 case ARM::LDRT_POST_REG:
1063 case ARM::LDRT_POST_IMM:
1078 bool writeback = (
P == 0) || (W == 1);
1079 unsigned idx_mode = 0;
1082 else if (!
P && writeback)
1085 if (writeback && (Rn == 15 || Rn == Rt))
1197 unsigned Rt2 = Rt + 1;
1199 bool writeback = (W == 1) | (
P == 0);
1205 case ARM::STRD_POST:
1208 case ARM::LDRD_POST:
1217 case ARM::STRD_POST:
1218 if (
P == 0 && W == 1)
1221 if (writeback && (Rn == 15 || Rn == Rt || Rn == Rt2))
1223 if (type && Rm == 15)
1232 case ARM::STRH_POST:
1235 if (writeback && (Rn == 15 || Rn == Rt))
1237 if (!type && Rm == 15)
1242 case ARM::LDRD_POST:
1243 if (type && Rn == 15) {
1248 if (
P == 0 && W == 1)
1250 if (!type && (Rt2 == 15 || Rm == 15 || Rm == Rt || Rm == Rt2))
1252 if (!type && writeback && Rn == 15)
1254 if (writeback && (Rn == Rt || Rn == Rt2))
1259 case ARM::LDRH_POST:
1260 if (type && Rn == 15) {
1267 if (!type && Rm == 15)
1269 if (!type && writeback && (Rn == 15 || Rn == Rt))
1273 case ARM::LDRSH_PRE:
1274 case ARM::LDRSH_POST:
1276 case ARM::LDRSB_PRE:
1277 case ARM::LDRSB_POST:
1278 if (type && Rn == 15) {
1283 if (type && (Rt == 15 || (writeback && Rn == Rt)))
1285 if (!type && (Rt == 15 || Rm == 15))
1287 if (!type && writeback && (Rn == 15 || Rn == Rt))
1304 case ARM::STRD_POST:
1307 case ARM::STRH_POST:
1321 case ARM::STRD_POST:
1324 case ARM::LDRD_POST:
1337 case ARM::LDRD_POST:
1340 case ARM::LDRH_POST:
1342 case ARM::LDRSH_PRE:
1343 case ARM::LDRSH_POST:
1345 case ARM::LDRSB_PRE:
1346 case ARM::LDRSB_POST:
1416 }
else if (imod && !M) {
1421 }
else if (!imod && M) {
1475 case ARM::LDMDA_UPD:
1481 case ARM::LDMDB_UPD:
1487 case ARM::LDMIA_UPD:
1493 case ARM::LDMIB_UPD:
1499 case ARM::STMDA_UPD:
1505 case ARM::STMDB_UPD:
1511 case ARM::STMIA_UPD:
1517 case ARM::STMIB_UPD:
1569 if (imm8 == 0x10 && pred != 0xe && ((FeatureBits[ARM::FeatureRAS]) != 0))
1597 }
else if (imod && !M) {
1602 }
else if (!imod && M) {
1623 unsigned Opcode = ARM::t2HINT;
1626 Opcode = ARM::t2PACBTI;
1627 }
else if (imm == 0x1D) {
1628 Opcode = ARM::t2PAC;
1629 }
else if (imm == 0x2D) {
1630 Opcode = ARM::t2AUT;
1631 }
else if (imm == 0x0F) {
1632 Opcode = ARM::t2BTI;
1636 if (Opcode == ARM::t2HINT) {
1735 if (!FeatureBits[ARM::HasV8_1aOps] ||
1736 !FeatureBits[ARM::HasV8Ops])
1788 if (!add) imm *= -1;
1789 if (imm == 0 && !add) imm = INT32_MIN;
1859 unsigned I1 = !(J1 ^ S);
1860 unsigned I2 = !(J2 ^ S);
1863 unsigned tmp = (S << 23) | (I1 << 22) | (I2 << 21) | (imm10 << 11) | imm11;
1866 true, 4, Inst, Decoder))
1884 true, 4, Inst, Decoder))
1890 true, 4, Inst, Decoder))
1934 case ARM::VLD1q16:
case ARM::VLD1q32:
case ARM::VLD1q64:
case ARM::VLD1q8:
1935 case ARM::VLD1q16wb_fixed:
case ARM::VLD1q16wb_register:
1936 case ARM::VLD1q32wb_fixed:
case ARM::VLD1q32wb_register:
1937 case ARM::VLD1q64wb_fixed:
case ARM::VLD1q64wb_register:
1938 case ARM::VLD1q8wb_fixed:
case ARM::VLD1q8wb_register:
1939 case ARM::VLD2d16:
case ARM::VLD2d32:
case ARM::VLD2d8:
1940 case ARM::VLD2d16wb_fixed:
case ARM::VLD2d16wb_register:
1941 case ARM::VLD2d32wb_fixed:
case ARM::VLD2d32wb_register:
1942 case ARM::VLD2d8wb_fixed:
case ARM::VLD2d8wb_register:
1949 case ARM::VLD2b16wb_fixed:
1950 case ARM::VLD2b16wb_register:
1951 case ARM::VLD2b32wb_fixed:
1952 case ARM::VLD2b32wb_register:
1953 case ARM::VLD2b8wb_fixed:
1954 case ARM::VLD2b8wb_register:
1968 case ARM::VLD3d8_UPD:
1969 case ARM::VLD3d16_UPD:
1970 case ARM::VLD3d32_UPD:
1974 case ARM::VLD4d8_UPD:
1975 case ARM::VLD4d16_UPD:
1976 case ARM::VLD4d32_UPD:
1983 case ARM::VLD3q8_UPD:
1984 case ARM::VLD3q16_UPD:
1985 case ARM::VLD3q32_UPD:
1989 case ARM::VLD4q8_UPD:
1990 case ARM::VLD4q16_UPD:
1991 case ARM::VLD4q32_UPD:
2004 case ARM::VLD3d8_UPD:
2005 case ARM::VLD3d16_UPD:
2006 case ARM::VLD3d32_UPD:
2010 case ARM::VLD4d8_UPD:
2011 case ARM::VLD4d16_UPD:
2012 case ARM::VLD4d32_UPD:
2019 case ARM::VLD3q8_UPD:
2020 case ARM::VLD3q16_UPD:
2021 case ARM::VLD3q32_UPD:
2025 case ARM::VLD4q8_UPD:
2026 case ARM::VLD4q16_UPD:
2027 case ARM::VLD4q32_UPD:
2040 case ARM::VLD4d8_UPD:
2041 case ARM::VLD4d16_UPD:
2042 case ARM::VLD4d32_UPD:
2049 case ARM::VLD4q8_UPD:
2050 case ARM::VLD4q16_UPD:
2051 case ARM::VLD4q32_UPD:
2061 case ARM::VLD1d8wb_fixed:
2062 case ARM::VLD1d16wb_fixed:
2063 case ARM::VLD1d32wb_fixed:
2064 case ARM::VLD1d64wb_fixed:
2065 case ARM::VLD1d8wb_register:
2066 case ARM::VLD1d16wb_register:
2067 case ARM::VLD1d32wb_register:
2068 case ARM::VLD1d64wb_register:
2069 case ARM::VLD1q8wb_fixed:
2070 case ARM::VLD1q16wb_fixed:
2071 case ARM::VLD1q32wb_fixed:
2072 case ARM::VLD1q64wb_fixed:
2073 case ARM::VLD1q8wb_register:
2074 case ARM::VLD1q16wb_register:
2075 case ARM::VLD1q32wb_register:
2076 case ARM::VLD1q64wb_register:
2077 case ARM::VLD1d8Twb_fixed:
2078 case ARM::VLD1d8Twb_register:
2079 case ARM::VLD1d16Twb_fixed:
2080 case ARM::VLD1d16Twb_register:
2081 case ARM::VLD1d32Twb_fixed:
2082 case ARM::VLD1d32Twb_register:
2083 case ARM::VLD1d64Twb_fixed:
2084 case ARM::VLD1d64Twb_register:
2085 case ARM::VLD1d8Qwb_fixed:
2086 case ARM::VLD1d8Qwb_register:
2087 case ARM::VLD1d16Qwb_fixed:
2088 case ARM::VLD1d16Qwb_register:
2089 case ARM::VLD1d32Qwb_fixed:
2090 case ARM::VLD1d32Qwb_register:
2091 case ARM::VLD1d64Qwb_fixed:
2092 case ARM::VLD1d64Qwb_register:
2093 case ARM::VLD2d8wb_fixed:
2094 case ARM::VLD2d16wb_fixed:
2095 case ARM::VLD2d32wb_fixed:
2096 case ARM::VLD2q8wb_fixed:
2097 case ARM::VLD2q16wb_fixed:
2098 case ARM::VLD2q32wb_fixed:
2099 case ARM::VLD2d8wb_register:
2100 case ARM::VLD2d16wb_register:
2101 case ARM::VLD2d32wb_register:
2102 case ARM::VLD2q8wb_register:
2103 case ARM::VLD2q16wb_register:
2104 case ARM::VLD2q32wb_register:
2105 case ARM::VLD2b8wb_fixed:
2106 case ARM::VLD2b16wb_fixed:
2107 case ARM::VLD2b32wb_fixed:
2108 case ARM::VLD2b8wb_register:
2109 case ARM::VLD2b16wb_register:
2110 case ARM::VLD2b32wb_register:
2113 case ARM::VLD3d8_UPD:
2114 case ARM::VLD3d16_UPD:
2115 case ARM::VLD3d32_UPD:
2116 case ARM::VLD3q8_UPD:
2117 case ARM::VLD3q16_UPD:
2118 case ARM::VLD3q32_UPD:
2119 case ARM::VLD4d8_UPD:
2120 case ARM::VLD4d16_UPD:
2121 case ARM::VLD4d32_UPD:
2122 case ARM::VLD4q8_UPD:
2123 case ARM::VLD4q16_UPD:
2124 case ARM::VLD4q32_UPD:
2151 case ARM::VLD1d8wb_fixed:
2152 case ARM::VLD1d16wb_fixed:
2153 case ARM::VLD1d32wb_fixed:
2154 case ARM::VLD1d64wb_fixed:
2155 case ARM::VLD1d8Twb_fixed:
2156 case ARM::VLD1d16Twb_fixed:
2157 case ARM::VLD1d32Twb_fixed:
2158 case ARM::VLD1d64Twb_fixed:
2159 case ARM::VLD1d8Qwb_fixed:
2160 case ARM::VLD1d16Qwb_fixed:
2161 case ARM::VLD1d32Qwb_fixed:
2162 case ARM::VLD1d64Qwb_fixed:
2163 case ARM::VLD1d8wb_register:
2164 case ARM::VLD1d16wb_register:
2165 case ARM::VLD1d32wb_register:
2166 case ARM::VLD1d64wb_register:
2167 case ARM::VLD1q8wb_fixed:
2168 case ARM::VLD1q16wb_fixed:
2169 case ARM::VLD1q32wb_fixed:
2170 case ARM::VLD1q64wb_fixed:
2171 case ARM::VLD1q8wb_register:
2172 case ARM::VLD1q16wb_register:
2173 case ARM::VLD1q32wb_register:
2174 case ARM::VLD1q64wb_register:
2178 if (Rm != 0xD && Rm != 0xF &&
2182 case ARM::VLD2d8wb_fixed:
2183 case ARM::VLD2d16wb_fixed:
2184 case ARM::VLD2d32wb_fixed:
2185 case ARM::VLD2b8wb_fixed:
2186 case ARM::VLD2b16wb_fixed:
2187 case ARM::VLD2b32wb_fixed:
2188 case ARM::VLD2q8wb_fixed:
2189 case ARM::VLD2q16wb_fixed:
2190 case ARM::VLD2q32wb_fixed:
2211 case ARM::VST1d8wb_fixed:
2212 case ARM::VST1d16wb_fixed:
2213 case ARM::VST1d32wb_fixed:
2214 case ARM::VST1d64wb_fixed:
2215 case ARM::VST1d8wb_register:
2216 case ARM::VST1d16wb_register:
2217 case ARM::VST1d32wb_register:
2218 case ARM::VST1d64wb_register:
2219 case ARM::VST1q8wb_fixed:
2220 case ARM::VST1q16wb_fixed:
2221 case ARM::VST1q32wb_fixed:
2222 case ARM::VST1q64wb_fixed:
2223 case ARM::VST1q8wb_register:
2224 case ARM::VST1q16wb_register:
2225 case ARM::VST1q32wb_register:
2226 case ARM::VST1q64wb_register:
2227 case ARM::VST1d8Twb_fixed:
2228 case ARM::VST1d16Twb_fixed:
2229 case ARM::VST1d32Twb_fixed:
2230 case ARM::VST1d64Twb_fixed:
2231 case ARM::VST1d8Twb_register:
2232 case ARM::VST1d16Twb_register:
2233 case ARM::VST1d32Twb_register:
2234 case ARM::VST1d64Twb_register:
2235 case ARM::VST1d8Qwb_fixed:
2236 case ARM::VST1d16Qwb_fixed:
2237 case ARM::VST1d32Qwb_fixed:
2238 case ARM::VST1d64Qwb_fixed:
2239 case ARM::VST1d8Qwb_register:
2240 case ARM::VST1d16Qwb_register:
2241 case ARM::VST1d32Qwb_register:
2242 case ARM::VST1d64Qwb_register:
2243 case ARM::VST2d8wb_fixed:
2244 case ARM::VST2d16wb_fixed:
2245 case ARM::VST2d32wb_fixed:
2246 case ARM::VST2d8wb_register:
2247 case ARM::VST2d16wb_register:
2248 case ARM::VST2d32wb_register:
2249 case ARM::VST2q8wb_fixed:
2250 case ARM::VST2q16wb_fixed:
2251 case ARM::VST2q32wb_fixed:
2252 case ARM::VST2q8wb_register:
2253 case ARM::VST2q16wb_register:
2254 case ARM::VST2q32wb_register:
2255 case ARM::VST2b8wb_fixed:
2256 case ARM::VST2b16wb_fixed:
2257 case ARM::VST2b32wb_fixed:
2258 case ARM::VST2b8wb_register:
2259 case ARM::VST2b16wb_register:
2260 case ARM::VST2b32wb_register:
2265 case ARM::VST3d8_UPD:
2266 case ARM::VST3d16_UPD:
2267 case ARM::VST3d32_UPD:
2268 case ARM::VST3q8_UPD:
2269 case ARM::VST3q16_UPD:
2270 case ARM::VST3q32_UPD:
2271 case ARM::VST4d8_UPD:
2272 case ARM::VST4d16_UPD:
2273 case ARM::VST4d32_UPD:
2274 case ARM::VST4q8_UPD:
2275 case ARM::VST4q16_UPD:
2276 case ARM::VST4q32_UPD:
2293 else if (Rm != 0xF) {
2298 case ARM::VST1d8wb_fixed:
2299 case ARM::VST1d16wb_fixed:
2300 case ARM::VST1d32wb_fixed:
2301 case ARM::VST1d64wb_fixed:
2302 case ARM::VST1q8wb_fixed:
2303 case ARM::VST1q16wb_fixed:
2304 case ARM::VST1q32wb_fixed:
2305 case ARM::VST1q64wb_fixed:
2306 case ARM::VST1d8Twb_fixed:
2307 case ARM::VST1d16Twb_fixed:
2308 case ARM::VST1d32Twb_fixed:
2309 case ARM::VST1d64Twb_fixed:
2310 case ARM::VST1d8Qwb_fixed:
2311 case ARM::VST1d16Qwb_fixed:
2312 case ARM::VST1d32Qwb_fixed:
2313 case ARM::VST1d64Qwb_fixed:
2314 case ARM::VST2d8wb_fixed:
2315 case ARM::VST2d16wb_fixed:
2316 case ARM::VST2d32wb_fixed:
2317 case ARM::VST2q8wb_fixed:
2318 case ARM::VST2q16wb_fixed:
2319 case ARM::VST2q32wb_fixed:
2320 case ARM::VST2b8wb_fixed:
2321 case ARM::VST2b16wb_fixed:
2322 case ARM::VST2b32wb_fixed:
2332 case ARM::VST1q16wb_fixed:
2333 case ARM::VST1q16wb_register:
2334 case ARM::VST1q32wb_fixed:
2335 case ARM::VST1q32wb_register:
2336 case ARM::VST1q64wb_fixed:
2337 case ARM::VST1q64wb_register:
2338 case ARM::VST1q8wb_fixed:
2339 case ARM::VST1q8wb_register:
2343 case ARM::VST2d16wb_fixed:
2344 case ARM::VST2d16wb_register:
2345 case ARM::VST2d32wb_fixed:
2346 case ARM::VST2d32wb_register:
2347 case ARM::VST2d8wb_fixed:
2348 case ARM::VST2d8wb_register:
2355 case ARM::VST2b16wb_fixed:
2356 case ARM::VST2b16wb_register:
2357 case ARM::VST2b32wb_fixed:
2358 case ARM::VST2b32wb_register:
2359 case ARM::VST2b8wb_fixed:
2360 case ARM::VST2b8wb_register:
2374 case ARM::VST3d8_UPD:
2375 case ARM::VST3d16_UPD:
2376 case ARM::VST3d32_UPD:
2380 case ARM::VST4d8_UPD:
2381 case ARM::VST4d16_UPD:
2382 case ARM::VST4d32_UPD:
2389 case ARM::VST3q8_UPD:
2390 case ARM::VST3q16_UPD:
2391 case ARM::VST3q32_UPD:
2395 case ARM::VST4q8_UPD:
2396 case ARM::VST4q16_UPD:
2397 case ARM::VST4q32_UPD:
2410 case ARM::VST3d8_UPD:
2411 case ARM::VST3d16_UPD:
2412 case ARM::VST3d32_UPD:
2416 case ARM::VST4d8_UPD:
2417 case ARM::VST4d16_UPD:
2418 case ARM::VST4d32_UPD:
2425 case ARM::VST3q8_UPD:
2426 case ARM::VST3q16_UPD:
2427 case ARM::VST3q32_UPD:
2431 case ARM::VST4q8_UPD:
2432 case ARM::VST4q16_UPD:
2433 case ARM::VST4q32_UPD:
2446 case ARM::VST4d8_UPD:
2447 case ARM::VST4d16_UPD:
2448 case ARM::VST4d32_UPD:
2455 case ARM::VST4q8_UPD:
2456 case ARM::VST4q16_UPD:
2457 case ARM::VST4q32_UPD:
2535 if (
size == 0 && align == 1)
2537 align *= (1 <<
size);
2540 case ARM::VLD1DUPq16:
case ARM::VLD1DUPq32:
case ARM::VLD1DUPq8:
2541 case ARM::VLD1DUPq16wb_fixed:
case ARM::VLD1DUPq16wb_register:
2542 case ARM::VLD1DUPq32wb_fixed:
case ARM::VLD1DUPq32wb_register:
2543 case ARM::VLD1DUPq8wb_fixed:
case ARM::VLD1DUPq8wb_register:
2564 if (Rm != 0xD && Rm != 0xF &&
2585 case ARM::VLD2DUPd16:
case ARM::VLD2DUPd32:
case ARM::VLD2DUPd8:
2586 case ARM::VLD2DUPd16wb_fixed:
case ARM::VLD2DUPd16wb_register:
2587 case ARM::VLD2DUPd32wb_fixed:
case ARM::VLD2DUPd32wb_register:
2588 case ARM::VLD2DUPd8wb_fixed:
case ARM::VLD2DUPd8wb_register:
2592 case ARM::VLD2DUPd16x2:
case ARM::VLD2DUPd32x2:
case ARM::VLD2DUPd8x2:
2593 case ARM::VLD2DUPd16x2wb_fixed:
case ARM::VLD2DUPd16x2wb_register:
2594 case ARM::VLD2DUPd32x2wb_fixed:
case ARM::VLD2DUPd32x2wb_register:
2595 case ARM::VLD2DUPd8x2wb_fixed:
case ARM::VLD2DUPd8x2wb_register:
2612 if (Rm != 0xD && Rm != 0xF) {
2648 else if (Rm != 0xF) {
2701 else if (Rm != 0xF) {
2734 case ARM::VORRiv4i16:
2735 case ARM::VORRiv2i32:
2736 case ARM::VBICiv4i16:
2737 case ARM::VBICiv2i32:
2741 case ARM::VORRiv8i16:
2742 case ARM::VORRiv4i32:
2743 case ARM::VBICiv8i16:
2744 case ARM::VBICiv4i32:
2769 if (cmode == 0xF && Inst.
getOpcode() == ARM::MVE_VMVNimmi32)
2919 true, 2, Inst, Decoder))
2928 true, 4, Inst, Decoder))
2937 true, 2, Inst, Decoder))
2976 unsigned imm = Val << 2;
3035 bool hasV7Ops = featureBits[ARM::HasV7Ops];
3039 case ARM::t2LDRBpci:
3040 case ARM::t2LDRHpci:
3043 case ARM::t2LDRSBpci:
3046 case ARM::t2LDRSHpci:
3088 bool hasMP = featureBits[ARM::FeatureMP];
3089 bool hasV7Ops = featureBits[ARM::HasV7Ops];
3144 if (!hasV7Ops || !hasMP)
3177 bool hasMP = featureBits[ARM::FeatureMP];
3178 bool hasV7Ops = featureBits[ARM::HasV7Ops];
3188 case ARM::t2LDRSBi8:
3194 case ARM::t2LDRSHi8:
3211 case ARM::t2LDRSHi8:
3217 case ARM::t2LDRSBi8:
3233 if (!hasV7Ops || !hasMP)
3257 case ARM::t2STRBi12:
3258 case ARM::t2STRHi12:
3286 bool hasMP = featureBits[ARM::FeatureMP];
3287 bool hasV7Ops = featureBits[ARM::HasV7Ops];
3294 case ARM::t2LDRHi12:
3297 case ARM::t2LDRSHi12:
3300 case ARM::t2LDRBi12:
3303 case ARM::t2LDRSBi12:
3320 case ARM::t2LDRSHi12:
3322 case ARM::t2LDRHi12:
3325 case ARM::t2LDRSBi12:
3340 case ARM::t2PLDWi12:
3341 if (!hasV7Ops || !hasMP)
3398 int imm = Val & 0xFF;
3400 if (!(Val & 0x100)) imm *= -1;
3412 int imm = Val & 0x7F;
3472 int imm = Val & 0xFF;
3475 else if (!(Val & 0x100))
3485 int imm = Val & 0x7F;
3488 else if (!(Val & 0x80))
3490 if (imm != INT32_MIN)
3491 imm *= (1U << shift);
3561template <
int shift,
int WriteBack>
3594 case ARM::t2LDR_PRE:
3595 case ARM::t2LDR_POST:
3598 case ARM::t2LDRB_PRE:
3599 case ARM::t2LDRB_POST:
3602 case ARM::t2LDRH_PRE:
3603 case ARM::t2LDRH_POST:
3606 case ARM::t2LDRSB_PRE:
3607 case ARM::t2LDRSB_POST:
3613 case ARM::t2LDRSH_PRE:
3614 case ARM::t2LDRSH_POST:
3668 }
else if (Inst.
getOpcode() == ARM::tADDspr) {
3738 if (imm != INT32_MIN)
3739 imm *= (1U << shift);
3755 unsigned S = (Val >> 23) & 1;
3756 unsigned J1 = (Val >> 22) & 1;
3757 unsigned J2 = (Val >> 21) & 1;
3758 unsigned I1 = !(J1 ^ S);
3759 unsigned I2 = !(J2 ^ S);
3760 unsigned tmp = (Val & ~0x600000) | (I1 << 22) | (I2 << 21);
3764 (Address & ~2u) + imm32 + 4,
3765 true, 4, Inst, Decoder))
3773 if (Val == 0xA || Val == 0xB)
3820 if (pred == 0xE || pred == 0xF) {
3892 true, 2, Inst, Decoder))
3907 unsigned S = (Val >> 23) & 1;
3908 unsigned J1 = (Val >> 22) & 1;
3909 unsigned J2 = (Val >> 21) & 1;
3910 unsigned I1 = !(J1 ^ S);
3911 unsigned I2 = !(J2 ^ S);
3912 unsigned tmp = (Val & ~0x600000) | (I1 << 22) | (I2 << 21);
3916 true, 4, Inst, Decoder))
3937 if (FeatureBits[ARM::FeatureMClass]) {
3938 unsigned ValLow = Val & 0xff;
3957 if (!(FeatureBits[ARM::HasV7Ops]))
3965 if (!(FeatureBits[ARM::HasV8MMainlineOps]))
3975 if (!(FeatureBits[ARM::Feature8MSecExt]))
3994 if (!(FeatureBits[ARM::FeaturePACBTI]))
4005 if (!(FeatureBits[ARM::HasV7Ops])) {
4018 if (Mask == 0 || (Mask != 2 && ValLow > 3) ||
4019 (!(FeatureBits[ARM::FeatureDSP]) && (Mask & 1)))
4041 if (!ARMBankedReg::lookupBankedRegByEncoding((R << 5) | SysM))
4083 if (Rn == 0xF || Rd == Rn || Rd == Rt || Rd == Rt+1)
4759 if (Rt == 0xF || Rt2 == 0xF || Rm == 0x1F)
4785 if (Rt == 0xF || Rt2 == 0xF || Rm == 0x1F)
4821 unsigned LowBit = mask & -mask;
4822 unsigned BitsAboveLowBit = 0xF & (-LowBit << 1);
4823 mask ^= BitsAboveLowBit;
4843 bool writeback = (W == 1) | (
P == 0);
4845 addr |= (U << 8) | (Rn << 9);
4847 if (writeback && (Rn == Rt || Rn == Rt2))
4880 bool writeback = (W == 1) | (
P == 0);
4882 addr |= (U << 8) | (Rn << 9);
4884 if (writeback && (Rn == Rt || Rn == Rt2))
4952 if (Rt == Rn || Rn == Rt2)
4971 bool hasFullFP16 = featureBits[ARM::FeatureFullFP16];
4984 if (!(imm & 0x38)) {
5030 bool hasFullFP16 = featureBits[ARM::FeatureFullFP16];
5043 if (!(imm & 0x38)) {
5102 if (!
Check(S, DestRegDecoder(Inst, Vd, Address, Decoder)))
5104 if (!
Check(S, DestRegDecoder(Inst, Vd, Address, Decoder)))
5106 if (!
Check(S, DestRegDecoder(Inst, Vn, Address, Decoder)))
5156 if ((cop & ~0x1) == 0xa)
5201 case ARM::VMSR_FPSCR_NZCVQC:
5212 if (featureBits[ARM::ModeThumb] && !featureBits[ARM::HasV8Ops]) {
5213 if (Rt == 13 || Rt == 15)
5222 case ARM::VMRS_FPSCR_NZCVQC:
5230 if (featureBits[ARM::ModeThumb]) {
5242template <
bool isSigned,
bool isNeg,
bool zeroPermitted,
int size>
5247 if (Val == 0 && !zeroPermitted)
5254 DecVal = (Val << 1);
5267 Val = LocImm + (2 << Val);
5293 case ARM::t2LEUpdate:
5300 Inst, Imm, Address, Decoder)))
5304 case ARM::MVE_WLSTP_8:
5305 case ARM::MVE_WLSTP_16:
5306 case ARM::MVE_WLSTP_32:
5307 case ARM::MVE_WLSTP_64:
5311 Address, Decoder)) ||
5313 Inst, Imm, Address, Decoder)))
5317 case ARM::MVE_DLSTP_8:
5318 case ARM::MVE_DLSTP_16:
5319 case ARM::MVE_DLSTP_32:
5320 case ARM::MVE_DLSTP_64:
5326 uint32_t CanonicalLCTP = 0xF00FE001, SBZMask = 0x00300FFE;
5327 if ((Insn & ~SBZMask) != CanonicalLCTP)
5329 if (Insn != CanonicalLCTP)
5361 if ((RegNo) + 1 > 11)
5407 }
else if (Inst.
getOpcode() == ARM::VSCCLRMD) {
5418 unsigned max_reg = Vd + regs;
5419 if (max_reg > 64 || (max_reg > 32 && (max_reg & 1)))
5421 unsigned max_sreg = std::min(32u, max_reg);
5422 unsigned max_dreg = std::min(32u, max_reg / 2);
5423 for (
unsigned i = Vd; i < max_sreg; ++i)
5426 for (
unsigned i = 16; i < max_dreg; ++i)
5445 unsigned CurBit = 0;
5446 for (
int i = 3; i >= 0; --i) {
5449 CurBit ^= (Val >> i) & 1U;
5452 Imm |= (CurBit << i);
5455 if ((Val & ~(~0U << i)) == 0) {
5501 switch (Val & 0x3) {
5562 unsigned DecodedVal = 64 - Val;
5565 case ARM::MVE_VCVTf16s16_fix:
5566 case ARM::MVE_VCVTs16f16_fix:
5567 case ARM::MVE_VCVTf16u16_fix:
5568 case ARM::MVE_VCVTu16f16_fix:
5569 if (DecodedVal > 16)
5572 case ARM::MVE_VCVTf32s32_fix:
5573 case ARM::MVE_VCVTs32f32_fix:
5574 case ARM::MVE_VCVTf32u32_fix:
5575 case ARM::MVE_VCVTu32f32_fix:
5576 if (DecodedVal > 32)
5588 case ARM::VSTR_P0_off:
5589 case ARM::VSTR_P0_pre:
5590 case ARM::VSTR_P0_post:
5591 case ARM::VLDR_P0_off:
5592 case ARM::VLDR_P0_pre:
5593 case ARM::VLDR_P0_post:
5595 case ARM::VSTR_FPSCR_NZCVQC_off:
5596 case ARM::VSTR_FPSCR_NZCVQC_pre:
5597 case ARM::VSTR_FPSCR_NZCVQC_post:
5598 case ARM::VLDR_FPSCR_NZCVQC_off:
5599 case ARM::VLDR_FPSCR_NZCVQC_pre:
5600 case ARM::VLDR_FPSCR_NZCVQC_post:
5607template <
bool Writeback>
5612 case ARM::VSTR_FPSCR_pre:
5613 case ARM::VSTR_FPSCR_NZCVQC_pre:
5614 case ARM::VLDR_FPSCR_pre:
5615 case ARM::VLDR_FPSCR_NZCVQC_pre:
5616 case ARM::VSTR_FPSCR_off:
5617 case ARM::VSTR_FPSCR_NZCVQC_off:
5618 case ARM::VLDR_FPSCR_off:
5619 case ARM::VLDR_FPSCR_NZCVQC_off:
5620 case ARM::VSTR_FPSCR_post:
5621 case ARM::VSTR_FPSCR_NZCVQC_post:
5622 case ARM::VLDR_FPSCR_post:
5623 case ARM::VLDR_FPSCR_NZCVQC_post:
5627 if (!featureBits[ARM::HasMVEIntegerOps] && !featureBits[ARM::FeatureVFP2])
5661 if (!
Check(S, RnDecoder(Inst, Rn, Address, Decoder)))
5665 if (!
Check(S, AddrDecoder(Inst, addr, Address, Decoder)))
5701template <
unsigned MinLog,
unsigned MaxLog>
5707 if (Val < MinLog || Val > MaxLog)
5714template <
unsigned start>
5793 case ARM::MVE_ASRLr:
5794 case ARM::MVE_SQRSHRL:
5797 case ARM::MVE_LSLLr:
5798 case ARM::MVE_UQRSHLL:
5845 if (Inst.
getOpcode() == ARM::MVE_SQRSHRL ||
5875template <
bool scalar, OperandDecoder predicate_decoder>
5903 if (!
Check(S, predicate_decoder(Inst, fc, Address, Decoder)))
5950 Inst.
setOpcode(sign1 ? ARM::t2SUBspImm12 : ARM::t2ADDspImm12);
5953 Inst.
setOpcode(sign1 ? ARM::t2SUBspImm : ARM::t2ADDspImm);
5983#include "ARMGenDisassemblerTables.inc"
5990 switch (
MI.getOpcode()) {
6002 case ARM::t2ADDri12:
6006 case ARM::t2SUBri12:
6009 if (
MI.getOperand(0).getReg() == ARM::SP &&
6010 MI.getOperand(1).getReg() != ARM::SP)
6013 default:
return Result;
6022 if (!STI.hasFeature(ARM::ModeThumb))
6037 if (Bytes.
size() < 2)
6041 Bytes.
data(), InstructionEndianness);
6042 return Insn16 < 0xE800 ? 2 : 4;
6046 ArrayRef<uint8_t> Bytes,
6048 raw_ostream &CS)
const {
6050 if (STI.hasFeature(ARM::ModeThumb))
6054 if (S == DecodeStatus::Fail)
6058 const MCInstrDesc &MCID = MCII->get(
MI.getOpcode());
6062 Twine(
MI.getNumOperands()) +
"\n");
6069 ArrayRef<uint8_t> Bytes,
6071 raw_ostream &CS)
const {
6072 CommentStream = &CS;
6074 assert(!STI.hasFeature(ARM::ModeThumb) &&
6075 "Asked to disassemble an ARM instruction but Subtarget is in Thumb "
6079 if (Bytes.
size() < 4) {
6086 InstructionEndianness);
6090 decodeInstruction(DecoderTableARM32,
MI, Insn,
Address,
this, STI);
6096 struct DecodeTable {
6101 const DecodeTable Tables[] = {
6102 {DecoderTableVFP32,
false}, {DecoderTableVFPV832,
false},
6103 {DecoderTableNEONData32,
true}, {DecoderTableNEONLoadStore32,
true},
6104 {DecoderTableNEONDup32,
false}, {DecoderTablev8NEON32,
false},
6105 {DecoderTablev8Crypto32,
false},
6108 for (
auto Table : Tables) {
6114 if (Table.DecodePred && MCII->get(
MI.getOpcode()).isPredicable()) {
6123 decodeInstruction(DecoderTableCoProc32,
MI, Insn,
Address,
this, STI);
6137void ARMDisassembler::AddThumb1SBit(MCInst &
MI,
bool InITBlock)
const {
6138 const MCInstrDesc &MCID = MCII->get(
MI.getOpcode());
6141 if (
I ==
MI.end())
break;
6142 if (MCID.
operands()[i].isOptionalDef() &&
6143 MCID.
operands()[i].RegClass == ARM::CCRRegClassID) {
6144 if (i > 0 && MCID.
operands()[i - 1].isPredicate())
6153bool ARMDisassembler::isVectorPredicable(
const MCInst &
MI)
const {
6154 const MCInstrDesc &MCID = MCII->get(
MI.getOpcode());
6167ARMDisassembler::AddThumbPredicate(MCInst &
MI)
const {
6170 const FeatureBitset &FeatureBits = getSubtargetInfo().getFeatureBits();
6174 switch (
MI.getOpcode()) {
6191 if (ITBlock.instrInITBlock())
6197 if (
MI.getOperand(0).getImm() == 0x10 && (FeatureBits[ARM::FeatureRAS]) != 0)
6206 if (ITBlock.instrInITBlock() && !ITBlock.instrLastInITBlock())
6223 if (ITBlock.instrInITBlock()) {
6224 CC = ITBlock.getITCC();
6225 ITBlock.advanceITState();
6226 }
else if (VPTBlock.instrInVPTBlock()) {
6227 VCC = VPTBlock.getVPTPred();
6228 VPTBlock.advanceVPTState();
6231 const MCInstrDesc &MCID = MCII->get(
MI.getOpcode());
6234 for (
unsigned i = 0; i < MCID.
NumOperands; ++i, ++CCI) {
6235 if (MCID.
operands()[i].isPredicate() || CCI ==
MI.end())
6252 for (VCCPos = 0; VCCPos < MCID.
NumOperands; ++VCCPos, ++VCCI) {
6270 "Inactive register in vpred_r is not tied to an output!");
6272 MI.insert(VCCI, MCOperand(
MI.getOperand(TiedOp)));
6286void ARMDisassembler::UpdateThumbPredicate(
DecodeStatus &S, MCInst &
MI)
const {
6288 CC = ITBlock.getITCC();
6291 if (ITBlock.instrInITBlock())
6292 ITBlock.advanceITState();
6293 else if (VPTBlock.instrInVPTBlock()) {
6294 CC = VPTBlock.getVPTPred();
6295 VPTBlock.advanceVPTState();
6298 const MCInstrDesc &MCID = MCII->get(
MI.getOpcode());
6302 for (
unsigned i = 0; i <
NumOps; ++i, ++
I) {
6303 if (OpInfo[i].isPredicate() ) {
6309 I->setReg(ARM::NoRegister);
6311 I->setReg(ARM::CPSR);
6318 ArrayRef<uint8_t> Bytes,
6320 raw_ostream &CS)
const {
6321 CommentStream = &CS;
6323 assert(STI.hasFeature(ARM::ModeThumb) &&
6324 "Asked to disassemble in Thumb mode but Subtarget is in ARM mode!");
6327 if (Bytes.
size() < 2) {
6333 Bytes.
data(), InstructionEndianness);
6335 decodeInstruction(DecoderTableThumb16,
MI, Insn16,
Address,
this, STI);
6338 Check(Result, AddThumbPredicate(
MI));
6342 Result = decodeInstruction(DecoderTableThumbSBit16,
MI, Insn16,
Address,
this,
6346 bool InITBlock = ITBlock.instrInITBlock();
6347 Check(Result, AddThumbPredicate(
MI));
6348 AddThumb1SBit(
MI, InITBlock);
6353 decodeInstruction(DecoderTableThumb216,
MI, Insn16,
Address,
this, STI);
6359 if (
MI.getOpcode() == ARM::t2IT && ITBlock.instrInITBlock())
6362 Check(Result, AddThumbPredicate(
MI));
6367 if (
MI.getOpcode() == ARM::t2IT) {
6368 unsigned Firstcond =
MI.getOperand(0).getImm();
6369 unsigned Mask =
MI.getOperand(1).getImm();
6370 ITBlock.setITState(Firstcond, Mask);
6374 CS <<
"unpredictable IT predicate sequence";
6381 if (Bytes.
size() < 4) {
6388 Bytes.
data() + 2, InstructionEndianness);
6391 decodeInstruction(DecoderTableMVE32,
MI, Insn32,
Address,
this, STI);
6397 if (
isVPTOpcode(
MI.getOpcode()) && VPTBlock.instrInVPTBlock())
6400 Check(Result, AddThumbPredicate(
MI));
6403 unsigned Mask =
MI.getOperand(0).getImm();
6404 VPTBlock.setVPTState(Mask);
6411 decodeInstruction(DecoderTableThumb32,
MI, Insn32,
Address,
this, STI);
6414 bool InITBlock = ITBlock.instrInITBlock();
6415 Check(Result, AddThumbPredicate(
MI));
6416 AddThumb1SBit(
MI, InITBlock);
6421 decodeInstruction(DecoderTableThumb232,
MI, Insn32,
Address,
this, STI);
6424 Check(Result, AddThumbPredicate(
MI));
6430 decodeInstruction(DecoderTableVFP32,
MI, Insn32,
Address,
this, STI);
6433 UpdateThumbPredicate(Result,
MI);
6439 decodeInstruction(DecoderTableVFPV832,
MI, Insn32,
Address,
this, STI);
6446 Result = decodeInstruction(DecoderTableNEONDup32,
MI, Insn32,
Address,
this,
6450 UpdateThumbPredicate(Result,
MI);
6456 uint32_t NEONLdStInsn = Insn32;
6457 NEONLdStInsn &= 0xF0FFFFFF;
6458 NEONLdStInsn |= 0x04000000;
6459 Result = decodeInstruction(DecoderTableNEONLoadStore32,
MI, NEONLdStInsn,
6463 Check(Result, AddThumbPredicate(
MI));
6469 uint32_t NEONDataInsn = Insn32;
6470 NEONDataInsn &= 0xF0FFFFFF;
6471 NEONDataInsn |= (NEONDataInsn & 0x10000000) >> 4;
6472 NEONDataInsn |= 0x12000000;
6473 Result = decodeInstruction(DecoderTableNEONData32,
MI, NEONDataInsn,
6477 Check(Result, AddThumbPredicate(
MI));
6481 uint32_t NEONCryptoInsn = Insn32;
6482 NEONCryptoInsn &= 0xF0FFFFFF;
6483 NEONCryptoInsn |= (NEONCryptoInsn & 0x10000000) >> 4;
6484 NEONCryptoInsn |= 0x12000000;
6485 Result = decodeInstruction(DecoderTablev8Crypto32,
MI, NEONCryptoInsn,
6492 uint32_t NEONv8Insn = Insn32;
6493 NEONv8Insn &= 0xF3FFFFFF;
6494 Result = decodeInstruction(DecoderTablev8NEON32,
MI, NEONv8Insn,
Address,
6504 ? DecoderTableThumb2CDE32
6505 : DecoderTableThumb2CoProc32;
6507 decodeInstruction(DecoderTable,
MI, Insn32,
Address,
this, STI);
6510 Check(Result, AddThumbPredicate(
MI));
6516 if (ITBlock.instrInITBlock())
6517 ITBlock.advanceITState();
6525 return new ARMDisassembler(STI, Ctx,
T.createMCInstrInfo());
MCDisassembler::DecodeStatus DecodeStatus
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
AMDGPU Mark last scratch load
static bool isVectorPredicable(const MCInstrDesc &MCID)
static DecodeStatus DecodeDPairSpacedRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeCCOutOperand(MCInst &Inst, unsigned Val, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeAddrMode2IdxInstruction(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeT2AddrModeImm0_1020s4(MCInst &Inst, unsigned Val, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeT2AddrModeImm12(MCInst &Inst, unsigned Val, uint64_t Address, const MCDisassembler *Decoder)
static const uint16_t GPRPairDecoderTable[]
static DecodeStatus DecodeLDRPreReg(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeGPRPairnospRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeDoubleRegStore(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeT2SOImm(MCInst &Inst, unsigned Val, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeT2LoadT(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeAddrMode6Operand(MCInst &Inst, unsigned Val, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeMVEVPNOT(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeGPRRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeMVEVCMP(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeMVEVMOVDRegtoQ(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeShiftRight16Imm(MCInst &Inst, unsigned Val, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeAddrMode5FP16Operand(MCInst &Inst, unsigned Val, uint64_t Address, const MCDisassembler *Decoder)
static const MCPhysReg QQPRDecoderTable[]
static DecodeStatus DecodeT2LoadLabel(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeQPRRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeShiftRight64Imm(MCInst &Inst, unsigned Val, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeVLD4LN(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeDPRRegListOperand(MCInst &Inst, unsigned Val, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecoderForMRRC2AndMCRR2(MCInst &Inst, unsigned Val, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeThumbAddrModePC(MCInst &Inst, unsigned Val, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeMVEPairVectorIndexOperand(MCInst &Inst, unsigned Val, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeGPRnopcRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeArmMOVTWInstruction(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeT2AddrModeImm8(MCInst &Inst, unsigned Val, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecoderGPRRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeTAddrModeImm7(MCInst &Inst, unsigned Val, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeBranchImmInstruction(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeT2AddrModeImm7s4(MCInst &Inst, unsigned Val, uint64_t Address, const MCDisassembler *Decoder)
static void tryAddingPcLoadReferenceComment(uint64_t Address, int Value, const MCDisassembler *Decoder)
tryAddingPcLoadReferenceComment - trys to add a comment as to what is being referenced by a load inst...
static DecodeStatus DecodeGPRwithAPSRRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeSORegImmOperand(MCInst &Inst, unsigned Val, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeShiftRight32Imm(MCInst &Inst, unsigned Val, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeVLD1DupInstruction(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
LLVM_ABI LLVM_EXTERNAL_VISIBILITY void LLVMInitializeARMDisassembler()
static DecodeStatus DecodeT2MOVTWInstruction(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeT2LdStPre(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static const MCPhysReg DPairDecoderTable[]
static DecodeStatus DecodeTSBInstruction(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeMVE_MEM_1_pre(MCInst &Inst, unsigned Val, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeDoubleRegLoad(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeThumbAddrModeIS(MCInst &Inst, unsigned Val, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodePowerTwoOperand(MCInst &Inst, unsigned Val, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeT2Imm7S4(MCInst &Inst, unsigned Val, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeQADDInstruction(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static const MCPhysReg DPairSpacedDecoderTable[]
static DecodeStatus DecodeThumbBROperand(MCInst &Inst, unsigned Val, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeRestrictedIPredicateOperand(MCInst &Inst, unsigned Val, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeSTRPreReg(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeSPRRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeSETPANInstruction(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeThumbAddSPReg(MCInst &Inst, uint16_t Insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeMQQQQPRRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeVLD2LN(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeT2AddSubSPImm(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static MCDisassembler * createARMDisassembler(const Target &T, const MCSubtargetInfo &STI, MCContext &Ctx)
static DecodeStatus DecodeT2LoadImm12(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static unsigned FixedRegForVSTRVLDR_SYSREG(unsigned Opcode)
static DecodeStatus DecodeVST1LN(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeLDR(MCInst &Inst, unsigned Val, uint64_t Address, const MCDisassembler *Decoder)
static const MCPhysReg QPRDecoderTable[]
static DecodeStatus DecodeVST3LN(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static const MCPhysReg SPRDecoderTable[]
static DecodeStatus DecodeBFAfterTargetOperand(MCInst &Inst, unsigned Val, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeRestrictedUPredicateOperand(MCInst &Inst, unsigned Val, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeSORegMemOperand(MCInst &Inst, unsigned Val, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodetGPRRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeCLRMGPRRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeAddrMode5Operand(MCInst &Inst, unsigned Val, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeMQQPRRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeVMOVRRS(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeGPRwithAPSR_NZCVnospRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const MCDisassembler *Decoder)
DecodeStatus OperandDecoder(MCInst &Inst, unsigned Val, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeThumbBLTargetOperand(MCInst &Inst, unsigned Val, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeCoprocessor(MCInst &Inst, unsigned Val, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeAddrMode3Instruction(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeSMLAInstruction(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeSwap(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeGPRwithZRRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeVCVTD(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeVSTInstruction(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeCopMemInstruction(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeDPR_VFP2RegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeT2CPSInstruction(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeThumbBCCTargetOperand(MCInst &Inst, unsigned Val, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeMVE_MEM_3_pre(MCInst &Inst, unsigned Val, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeAddrMode7Operand(MCInst &Inst, unsigned Val, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeThumbAddrModeSP(MCInst &Inst, unsigned Val, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeT2STRDPreInstruction(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeVLD1LN(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static bool PermitsD32(const MCInst &Inst, const MCDisassembler *Decoder)
static DecodeStatus DecodeT2Imm8(MCInst &Inst, unsigned Val, uint64_t Address, const MCDisassembler *Decoder)
static const uint16_t CLRMGPRDecoderTable[]
static const MCPhysReg DPRDecoderTable[]
static DecodeStatus DecodePostIdxReg(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeVLD3LN(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeT2LDRDPreInstruction(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeT2ShifterImmOperand(MCInst &Inst, uint32_t Val, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeT2Imm8S4(MCInst &Inst, unsigned Val, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeVpredROperand(MCInst &Inst, unsigned RegNo, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeThumbCPS(MCInst &Inst, uint16_t Insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeCPSInstruction(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeThumbAddSpecialReg(MCInst &Inst, uint16_t Insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeRestrictedSPredicateOperand(MCInst &Inst, unsigned Val, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeVCVTQ(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeSPRRegListOperand(MCInst &Inst, unsigned Val, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeGPRPairRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeMSRMask(MCInst &Inst, unsigned Val, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeVSHLMaxInstruction(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeMQPRRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const MCDisassembler *Decoder)
static bool tryAddingSymbolicOperand(uint64_t Address, int32_t Value, bool isBranch, uint64_t InstSize, MCInst &MI, const MCDisassembler *Decoder)
tryAddingSymbolicOperand - trys to add a symbolic operand in place of the immediate Value in the MCIn...
static DecodeStatus DecodeT2LoadImm8(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeVLDST3Instruction(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeGPRwithZRnospRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const MCDisassembler *Decoder)
static const uint16_t GPRDecoderTable[]
static DecodeStatus DecodeMveAddrModeQ(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeT2Imm7(MCInst &Inst, unsigned Val, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeDPRRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeThumbCmpBROperand(MCInst &Inst, unsigned Val, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeVpredNOperand(MCInst &Inst, unsigned RegNo, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeMVE_MEM_2_pre(MCInst &Inst, unsigned Val, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeMVEVCVTt1fp(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeVCVTImmOperand(MCInst &Inst, unsigned Val, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeMVEVMOVQtoDReg(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static const MCPhysReg QQQQPRDecoderTable[]
static DecodeStatus DecodeLongShiftOperand(MCInst &Inst, unsigned Val, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeMveAddrModeRQ(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeMVEModImmInstruction(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeIT(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeGPRspRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeSORegRegOperand(MCInst &Inst, unsigned Val, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeVLDST4Instruction(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeMVE_MEM_pre(MCInst &Inst, unsigned Val, uint64_t Address, const MCDisassembler *Decoder, unsigned Rn, OperandDecoder RnDecoder, OperandDecoder AddrDecoder)
static DecodeStatus DecodeBitfieldMaskOperand(MCInst &Inst, unsigned Val, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeVLD4DupInstruction(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeT2AddrModeImm8s4(MCInst &Inst, unsigned Val, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeThumbTableBranch(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeMveVCTP(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus checkDecodedInstruction(MCInst &MI, uint64_t &Size, uint64_t Address, raw_ostream &CS, uint32_t Insn, DecodeStatus Result)
static DecodeStatus DecodeVSTRVLDR_SYSREG(MCInst &Inst, unsigned Val, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeVST4LN(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeMemBarrierOption(MCInst &Inst, unsigned Val, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeVLD2DupInstruction(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeNEONComplexLane64Instruction(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeSTRPreImm(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodetcGPRRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodePredNoALOperand(MCInst &Inst, unsigned Val, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeVST2LN(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeVPTMaskOperand(MCInst &Inst, unsigned Val, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeRegListOperand(MCInst &Inst, unsigned Val, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeMVEOverlappingLongShift(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeVLDInstruction(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodePredicateOperand(MCInst &Inst, unsigned Val, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeT2AddrModeSOReg(MCInst &Inst, unsigned Val, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeShiftRight8Imm(MCInst &Inst, unsigned Val, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeT2AddrModeImm7(MCInst &Inst, unsigned Val, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeVLDST2Instruction(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeTSTInstruction(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeAddrModeImm12Operand(MCInst &Inst, unsigned Val, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeTBLInstruction(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeLDRPreImm(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeT2HintSpaceInstruction(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeThumbAddSPImm(MCInst &Inst, uint16_t Insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeBFLabelOperand(MCInst &Inst, unsigned Val, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeHPRRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeDPairRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeVMOVModImmInstruction(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeRestrictedFPPredicateOperand(MCInst &Inst, unsigned Val, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeHINTInstruction(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeVSCCLRM(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeT2BROperand(MCInst &Inst, unsigned Val, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeMVEVADCInstruction(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeRFEInstruction(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeVLD3DupInstruction(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeT2BInstruction(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeThumb2BCCInstruction(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeT2Adr(MCInst &Inst, uint32_t Insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeDPR_8RegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodetGPREvenRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeThumbAddrModeRR(MCInst &Inst, unsigned Val, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeBankedReg(MCInst &Inst, unsigned Val, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodetGPROddRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeMemMultipleWritebackInstruction(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeThumbBLXOffset(MCInst &Inst, unsigned Val, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeGPRnospRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeVLDST1Instruction(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeSPR_8RegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeVMOVSRR(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeLazyLoadStoreMul(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeT2LoadShift(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeForVMRSandVMSR(MCInst &Inst, unsigned Val, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeInstSyncBarrierOption(MCInst &Inst, unsigned Val, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeLOLoop(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
#define LLVM_EXTERNAL_VISIBILITY
static bool isNeg(Value *V)
Returns true if the operation is a negation of V, and it works for both integers and floats.
static bool isSigned(unsigned int Opcode)
amode Optimize addressing mode
const size_t AbstractManglingParser< Derived, Alloc >::NumOps
static bool isBranch(unsigned Opcode)
const SmallVectorImpl< MachineOperand > & Cond
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
size_t size() const
size - Get the array size.
Container class for subtarget features.
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
void tryAddingPcLoadReferenceComment(int64_t Value, uint64_t Address) const
DecodeStatus
Ternary decode status.
Instances of this class represent a single low-level machine instruction.
unsigned getNumOperands() const
SmallVectorImpl< MCOperand >::iterator iterator
unsigned getOpcode() const
void addOperand(const MCOperand Op)
void setOpcode(unsigned Op)
const MCOperand & getOperand(unsigned i) const
unsigned getNumOperands() const
Return the number of declared MachineOperands for this MachineInstruction.
ArrayRef< MCOperandInfo > operands() const
unsigned short NumOperands
int getOperandConstraint(unsigned OpNum, MCOI::OperandConstraint Constraint) const
Returns the value of the specified operand constraint if it is present.
bool isPredicable() const
Return true if this instruction has a predicate operand that controls execution.
bool isVariadic() const
Return true if this instruction can have a variable number of operands.
Interface to description of machine instruction set.
const MCInstrDesc & get(unsigned Opcode) const
Return the machine instruction descriptor that corresponds to the specified instruction opcode.
static MCOperand createReg(MCRegister Reg)
static MCOperand createImm(int64_t Val)
MCRegister getReg() const
Returns the register number.
Wrapper class representing physical registers. Should be passed by value.
Generic base class for all target subtargets.
bool hasFeature(unsigned Feature) const
const FeatureBitset & getFeatureBits() const
Wrapper class representing virtual and physical registers.
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
Target - Wrapper for Target specific information.
LLVM Value Representation.
This class implements an extremely fast bulk output stream that can only output to a stream.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
unsigned getAM2Opc(AddrOpc Opc, unsigned Imm12, ShiftOpc SO, unsigned IdxMode=0)
unsigned getAM5Opc(AddrOpc Opc, unsigned char Offset)
getAM5Opc - This function encodes the addrmode5 opc field.
unsigned getAM5FP16Opc(AddrOpc Opc, unsigned char Offset)
getAM5FP16Opc - This function encodes the addrmode5fp16 opc field.
bool isVpred(OperandType op)
bool isCDECoproc(size_t Coproc, const MCSubtargetInfo &STI)
@ D16
Only 16 D registers.
constexpr std::underlying_type_t< E > Mask()
Get a bitmask with 1s in all places up to the high-order bit of E's largest value.
std::enable_if_t< std::is_integral_v< IntType >, IntType > fieldFromInstruction(const IntType &Insn, unsigned StartBit, unsigned NumBits)
value_type read(const void *memory, endianness endian)
Read a value of a particular endianness from memory.
This is an optimization pass for GlobalISel generic memory operations.
constexpr T rotr(T V, int R)
auto size(R &&Range, std::enable_if_t< std::is_base_of< std::random_access_iterator_tag, typename std::iterator_traits< decltype(Range.begin())>::iterator_category >::value, void > *=nullptr)
Get the size of a range.
Target & getTheThumbBETarget()
static bool isVPTOpcode(int Opc)
LLVM_ABI void reportFatalInternalError(Error Err)
Report a fatal error that indicates a bug in LLVM.
int countr_zero(T Val)
Count number of 0's from the least significant bit to the most stopping at the first 1.
constexpr bool isPowerOf2_32(uint32_t Value)
Return true if the argument is a power of two > 0.
static bool isValidCoprocessorNumber(unsigned Num, const FeatureBitset &featureBits)
isValidCoprocessorNumber - decide whether an explicit coprocessor number is legal in generic instruct...
uint16_t MCPhysReg
An unsigned integer type large enough to represent all physical registers, but not necessarily virtua...
DWARFExpression::Operation Op
ArrayRef(const T &OneElt) -> ArrayRef< T >
constexpr int32_t SignExtend32(uint32_t X)
Sign-extend the number in the bottom B bits of X to a 32-bit integer.
Target & getTheARMLETarget()
Target & getTheARMBETarget()
Target & getTheThumbLETarget()
static void RegisterMCDisassembler(Target &T, Target::MCDisassemblerCtorTy Fn)
RegisterMCDisassembler - Register a MCDisassembler implementation for the given target.