35#define DEBUG_TYPE "arm-disassembler"
54 void advanceITState() {
59 bool instrInITBlock() {
60 return !ITStates.empty();
64 bool instrLastInITBlock() {
65 return ITStates.size() == 1;
72 void setITState(
char Firstcond,
char Mask) {
74 unsigned NumTZ = llvm::countr_zero<uint8_t>(Mask);
75 unsigned char CCBits =
static_cast<unsigned char>(Firstcond & 0xf);
76 assert(NumTZ <= 3 &&
"Invalid IT mask!");
78 for (
unsigned Pos = NumTZ+1; Pos <= 3; ++Pos) {
79 unsigned Else = (Mask >> Pos) & 1;
80 ITStates.push_back(CCBits ^ Else);
82 ITStates.push_back(CCBits);
86 std::vector<unsigned char> ITStates;
92 unsigned getVPTPred() {
94 if (instrInVPTBlock())
95 Pred = VPTStates.back();
99 void advanceVPTState() {
100 VPTStates.pop_back();
103 bool instrInVPTBlock() {
104 return !VPTStates.empty();
107 bool instrLastInVPTBlock() {
108 return VPTStates.size() == 1;
111 void setVPTState(
char Mask) {
113 unsigned NumTZ = llvm::countr_zero<uint8_t>(Mask);
114 assert(NumTZ <= 3 &&
"Invalid VPT mask!");
116 for (
unsigned Pos = NumTZ+1; Pos <= 3; ++Pos) {
117 bool T = ((Mask >> Pos) & 1) == 0;
133 std::unique_ptr<const MCInstrInfo> MCII;
138 InstructionEndianness = STI.
hasFeature(ARM::ModeBigEndianInstructions)
143 ~ARMDisassembler()
override =
default;
161 mutable ITStatus ITBlock;
162 mutable VPTStatus VPTBlock;
164 void AddThumb1SBit(
MCInst &
MI,
bool InITBlock)
const;
553template <
int shift,
int WriteBack>
615template <
bool isSigned,
bool isNeg,
bool zeroPermitted,
int size>
653template <
bool Writeback>
669template <
unsigned MinLog,
unsigned MaxLog>
673template <
unsigned start>
689template <
bool scalar, OperandDecoder predicate_decoder>
707#include "ARMGenDisassemblerTables.inc"
712 return new ARMDisassembler(STI, Ctx,
T.createMCInstrInfo());
720 switch (
MI.getOpcode()) {
739 if (
MI.getOperand(0).getReg() == ARM::SP &&
740 MI.getOperand(1).getReg() != ARM::SP)
743 default:
return Result;
752 if (!STI.hasFeature(ARM::ModeThumb))
767 if (Bytes.
size() < 2)
770 uint16_t Insn16 = llvm::support::endian::read<uint16_t>(
771 Bytes.
data(), InstructionEndianness);
772 return Insn16 < 0xE800 ? 2 : 4;
779 if (STI.hasFeature(ARM::ModeThumb))
780 return getThumbInstruction(
MI,
Size, Bytes, Address, CS);
781 return getARMInstruction(
MI,
Size, Bytes, Address, CS);
790 assert(!STI.hasFeature(ARM::ModeThumb) &&
791 "Asked to disassemble an ARM instruction but Subtarget is in Thumb "
795 if (Bytes.
size() < 4) {
802 InstructionEndianness);
806 decodeInstruction(DecoderTableARM32,
MI,
Insn, Address,
this, STI);
817 const DecodeTable Tables[] = {
818 {DecoderTableVFP32,
false}, {DecoderTableVFPV832,
false},
819 {DecoderTableNEONData32,
true}, {DecoderTableNEONLoadStore32,
true},
820 {DecoderTableNEONDup32,
true}, {DecoderTablev8NEON32,
false},
821 {DecoderTablev8Crypto32,
false},
824 for (
auto Table : Tables) {
825 Result = decodeInstruction(Table.P,
MI,
Insn, Address,
this, STI);
837 decodeInstruction(DecoderTableCoProc32,
MI,
Insn, Address,
this, STI);
888void ARMDisassembler::AddThumb1SBit(
MCInst &
MI,
bool InITBlock)
const {
892 if (
I ==
MI.end())
break;
893 if (MCID.
operands()[i].isOptionalDef() &&
894 MCID.
operands()[i].RegClass == ARM::CCRRegClassID) {
895 if (i > 0 && MCID.
operands()[i - 1].isPredicate())
905bool ARMDisassembler::isVectorPredicable(
const MCInst &
MI)
const {
919ARMDisassembler::AddThumbPredicate(
MCInst &
MI)
const {
922 const FeatureBitset &FeatureBits = getSubtargetInfo().getFeatureBits();
926 switch (
MI.getOpcode()) {
943 if (ITBlock.instrInITBlock())
949 if (
MI.getOperand(0).getImm() == 0x10 && (FeatureBits[ARM::FeatureRAS]) != 0)
958 if (ITBlock.instrInITBlock() && !ITBlock.instrLastInITBlock())
975 if (ITBlock.instrInITBlock()) {
976 CC = ITBlock.getITCC();
977 ITBlock.advanceITState();
978 }
else if (VPTBlock.instrInVPTBlock()) {
979 VCC = VPTBlock.getVPTPred();
980 VPTBlock.advanceVPTState();
986 for (
unsigned i = 0; i < MCID.
NumOperands; ++i, ++CCI) {
987 if (MCID.
operands()[i].isPredicate() || CCI ==
MI.end())
1004 for (VCCPos = 0; VCCPos < MCID.
NumOperands; ++VCCPos, ++VCCI) {
1022 "Inactive register in vpred_r is not tied to an output!");
1038void ARMDisassembler::UpdateThumbVFPPredicate(
1041 CC = ITBlock.getITCC();
1044 if (ITBlock.instrInITBlock())
1045 ITBlock.advanceITState();
1046 else if (VPTBlock.instrInVPTBlock()) {
1047 CC = VPTBlock.getVPTPred();
1048 VPTBlock.advanceVPTState();
1055 for (
unsigned i = 0; i < NumOps; ++i, ++
I) {
1056 if (OpInfo[i].isPredicate() ) {
1064 I->setReg(ARM::CPSR);
1074 CommentStream = &CS;
1076 assert(STI.hasFeature(ARM::ModeThumb) &&
1077 "Asked to disassemble in Thumb mode but Subtarget is in ARM mode!");
1080 if (Bytes.
size() < 2) {
1085 uint16_t Insn16 = llvm::support::endian::read<uint16_t>(
1086 Bytes.
data(), InstructionEndianness);
1088 decodeInstruction(DecoderTableThumb16,
MI, Insn16, Address,
this, STI);
1091 Check(Result, AddThumbPredicate(
MI));
1095 Result = decodeInstruction(DecoderTableThumbSBit16,
MI, Insn16, Address,
this,
1099 bool InITBlock = ITBlock.instrInITBlock();
1100 Check(Result, AddThumbPredicate(
MI));
1101 AddThumb1SBit(
MI, InITBlock);
1106 decodeInstruction(DecoderTableThumb216,
MI, Insn16, Address,
this, STI);
1112 if (
MI.getOpcode() == ARM::t2IT && ITBlock.instrInITBlock())
1115 Check(Result, AddThumbPredicate(
MI));
1120 if (
MI.getOpcode() == ARM::t2IT) {
1121 unsigned Firstcond =
MI.getOperand(0).getImm();
1122 unsigned Mask =
MI.getOperand(1).getImm();
1123 ITBlock.setITState(Firstcond, Mask);
1127 CS <<
"unpredictable IT predicate sequence";
1134 if (Bytes.
size() < 4) {
1140 (
uint32_t(Insn16) << 16) | llvm::support::endian::read<uint16_t>(
1141 Bytes.
data() + 2, InstructionEndianness);
1144 decodeInstruction(DecoderTableMVE32,
MI, Insn32, Address,
this, STI);
1150 if (
isVPTOpcode(
MI.getOpcode()) && VPTBlock.instrInVPTBlock())
1153 Check(Result, AddThumbPredicate(
MI));
1156 unsigned Mask =
MI.getOperand(0).getImm();
1157 VPTBlock.setVPTState(Mask);
1164 decodeInstruction(DecoderTableThumb32,
MI, Insn32, Address,
this, STI);
1167 bool InITBlock = ITBlock.instrInITBlock();
1168 Check(Result, AddThumbPredicate(
MI));
1169 AddThumb1SBit(
MI, InITBlock);
1174 decodeInstruction(DecoderTableThumb232,
MI, Insn32, Address,
this, STI);
1177 Check(Result, AddThumbPredicate(
MI));
1181 if (fieldFromInstruction(Insn32, 28, 4) == 0xE) {
1183 decodeInstruction(DecoderTableVFP32,
MI, Insn32, Address,
this, STI);
1186 UpdateThumbVFPPredicate(Result,
MI);
1192 decodeInstruction(DecoderTableVFPV832,
MI, Insn32, Address,
this, STI);
1198 if (fieldFromInstruction(Insn32, 28, 4) == 0xE) {
1199 Result = decodeInstruction(DecoderTableNEONDup32,
MI, Insn32, Address,
this,
1203 Check(Result, AddThumbPredicate(
MI));
1208 if (fieldFromInstruction(Insn32, 24, 8) == 0xF9) {
1210 NEONLdStInsn &= 0xF0FFFFFF;
1211 NEONLdStInsn |= 0x04000000;
1212 Result = decodeInstruction(DecoderTableNEONLoadStore32,
MI, NEONLdStInsn,
1213 Address,
this, STI);
1216 Check(Result, AddThumbPredicate(
MI));
1221 if (fieldFromInstruction(Insn32, 24, 4) == 0xF) {
1223 NEONDataInsn &= 0xF0FFFFFF;
1224 NEONDataInsn |= (NEONDataInsn & 0x10000000) >> 4;
1225 NEONDataInsn |= 0x12000000;
1226 Result = decodeInstruction(DecoderTableNEONData32,
MI, NEONDataInsn,
1227 Address,
this, STI);
1230 Check(Result, AddThumbPredicate(
MI));
1235 NEONCryptoInsn &= 0xF0FFFFFF;
1236 NEONCryptoInsn |= (NEONCryptoInsn & 0x10000000) >> 4;
1237 NEONCryptoInsn |= 0x12000000;
1238 Result = decodeInstruction(DecoderTablev8Crypto32,
MI, NEONCryptoInsn,
1239 Address,
this, STI);
1246 NEONv8Insn &= 0xF3FFFFFF;
1247 Result = decodeInstruction(DecoderTablev8NEON32,
MI, NEONv8Insn, Address,
1255 uint32_t Coproc = fieldFromInstruction(Insn32, 8, 4);
1257 ? DecoderTableThumb2CDE32
1258 : DecoderTableThumb2CoProc32;
1260 decodeInstruction(DecoderTable,
MI, Insn32, Address,
this, STI);
1263 Check(Result, AddThumbPredicate(
MI));
1283 ARM::R0, ARM::R1, ARM::R2, ARM::R3,
1284 ARM::R4, ARM::R5, ARM::R6, ARM::R7,
1285 ARM::R8, ARM::R9, ARM::R10, ARM::R11,
1286 ARM::R12, ARM::SP, ARM::LR, ARM::PC
1290 ARM::R0, ARM::R1, ARM::R2, ARM::R3,
1291 ARM::R4, ARM::R5, ARM::R6, ARM::R7,
1292 ARM::R8, ARM::R9, ARM::R10, ARM::R11,
1293 ARM::R12, 0, ARM::LR, ARM::APSR
1399 ARM::R0_R1, ARM::R2_R3, ARM::R4_R5, ARM::R6_R7,
1400 ARM::R8_R9, ARM::R10_R11, ARM::R12_SP
1430 if ((RegNo & 1) || RegNo > 10)
1483 ((
const MCDisassembler*)Decoder)->getSubtargetInfo().getFeatureBits();
1485 if ((RegNo == 13 && !featureBits[ARM::HasV8Ops]) || RegNo == 15)
1493 ARM::S0, ARM::S1, ARM::S2, ARM::S3,
1494 ARM::S4, ARM::S5, ARM::S6, ARM::S7,
1495 ARM::S8, ARM::S9, ARM::S10, ARM::S11,
1496 ARM::S12, ARM::S13, ARM::S14, ARM::S15,
1497 ARM::S16, ARM::S17, ARM::S18, ARM::S19,
1498 ARM::S20, ARM::S21, ARM::S22, ARM::S23,
1499 ARM::S24, ARM::S25, ARM::S26, ARM::S27,
1500 ARM::S28, ARM::S29, ARM::S30, ARM::S31
1521 ARM::D0, ARM::D1, ARM::D2, ARM::D3,
1522 ARM::D4, ARM::D5, ARM::D6, ARM::D7,
1523 ARM::D8, ARM::D9, ARM::D10, ARM::D11,
1524 ARM::D12, ARM::D13, ARM::D14, ARM::D15,
1525 ARM::D16, ARM::D17, ARM::D18, ARM::D19,
1526 ARM::D20, ARM::D21, ARM::D22, ARM::D23,
1527 ARM::D24, ARM::D25, ARM::D26, ARM::D27,
1528 ARM::D28, ARM::D29, ARM::D30, ARM::D31
1535 ((
const MCDisassembler*)Decoder)->getSubtargetInfo().getFeatureBits();
1537 bool hasD32 = featureBits[ARM::FeatureD32];
1539 if (RegNo > 31 || (!hasD32 && RegNo > 15))
1572 ARM::Q0, ARM::Q1, ARM::Q2, ARM::Q3,
1573 ARM::Q4, ARM::Q5, ARM::Q6, ARM::Q7,
1574 ARM::Q8, ARM::Q9, ARM::Q10, ARM::Q11,
1575 ARM::Q12, ARM::Q13, ARM::Q14, ARM::Q15
1581 if (RegNo > 31 || (RegNo & 1) != 0)
1591 ARM::Q0, ARM::D1_D2, ARM::Q1, ARM::D3_D4, ARM::Q2, ARM::D5_D6,
1592 ARM::Q3, ARM::D7_D8, ARM::Q4, ARM::D9_D10, ARM::Q5, ARM::D11_D12,
1593 ARM::Q6, ARM::D13_D14, ARM::Q7, ARM::D15_D16, ARM::Q8, ARM::D17_D18,
1594 ARM::Q9, ARM::D19_D20, ARM::Q10, ARM::D21_D22, ARM::Q11, ARM::D23_D24,
1595 ARM::Q12, ARM::D25_D26, ARM::Q13, ARM::D27_D28, ARM::Q14, ARM::D29_D30,
1611 ARM::D0_D2, ARM::D1_D3, ARM::D2_D4, ARM::D3_D5,
1612 ARM::D4_D6, ARM::D5_D7, ARM::D6_D8, ARM::D7_D9,
1613 ARM::D8_D10, ARM::D9_D11, ARM::D10_D12, ARM::D11_D13,
1614 ARM::D12_D14, ARM::D13_D15, ARM::D14_D16, ARM::D15_D17,
1615 ARM::D16_D18, ARM::D17_D19, ARM::D18_D20, ARM::D19_D21,
1616 ARM::D20_D22, ARM::D21_D23, ARM::D22_D24, ARM::D23_D25,
1617 ARM::D24_D26, ARM::D25_D27, ARM::D26_D28, ARM::D27_D29,
1618 ARM::D28_D30, ARM::D29_D31
1638 if (Inst.
getOpcode() == ARM::tBcc && Val == 0xE)
1641 static_cast<const ARMDisassembler *
>(Decoder)->MCII.
get();
1667 unsigned Rm = fieldFromInstruction(Val, 0, 4);
1668 unsigned type = fieldFromInstruction(Val, 5, 2);
1669 unsigned imm = fieldFromInstruction(Val, 7, 5);
1694 unsigned Op = Shift | (imm << 3);
1705 unsigned Rm = fieldFromInstruction(Val, 0, 4);
1706 unsigned type = fieldFromInstruction(Val, 5, 2);
1707 unsigned Rs = fieldFromInstruction(Val, 8, 4);
1741 bool NeedDisjointWriteback =
false;
1742 unsigned WritebackReg = 0;
1747 case ARM::LDMIA_UPD:
1748 case ARM::LDMDB_UPD:
1749 case ARM::LDMIB_UPD:
1750 case ARM::LDMDA_UPD:
1751 case ARM::t2LDMIA_UPD:
1752 case ARM::t2LDMDB_UPD:
1753 case ARM::t2STMIA_UPD:
1754 case ARM::t2STMDB_UPD:
1755 NeedDisjointWriteback =
true;
1765 for (
unsigned i = 0; i < 16; ++i) {
1766 if (Val & (1 << i)) {
1775 if (NeedDisjointWriteback && WritebackReg == Inst.
end()[-1].getReg())
1789 unsigned Vd = fieldFromInstruction(Val, 8, 5);
1790 unsigned regs = fieldFromInstruction(Val, 0, 8);
1793 if (regs == 0 || (Vd + regs) > 32) {
1794 regs = Vd + regs > 32 ? 32 - Vd : regs;
1795 regs = std::max( 1u, regs);
1801 for (
unsigned i = 0; i < (regs - 1); ++i) {
1814 unsigned Vd = fieldFromInstruction(Val, 8, 5);
1815 unsigned regs = fieldFromInstruction(Val, 1, 7);
1818 if (regs == 0 || regs > 16 || (Vd + regs) > 32) {
1819 regs = Vd + regs > 32 ? 32 - Vd : regs;
1820 regs = std::max( 1u, regs);
1821 regs = std::min(16u, regs);
1827 for (
unsigned i = 0; i < (regs - 1); ++i) {
1843 unsigned msb = fieldFromInstruction(Val, 5, 5);
1844 unsigned lsb = fieldFromInstruction(Val, 0, 5);
1856 if (msb != 31) msb_mask = (1U << (msb+1)) - 1;
1857 uint32_t lsb_mask = (1U << lsb) - 1;
1868 unsigned pred = fieldFromInstruction(
Insn, 28, 4);
1869 unsigned CRd = fieldFromInstruction(
Insn, 12, 4);
1870 unsigned coproc = fieldFromInstruction(
Insn, 8, 4);
1871 unsigned imm = fieldFromInstruction(
Insn, 0, 8);
1872 unsigned Rn = fieldFromInstruction(
Insn, 16, 4);
1873 unsigned U = fieldFromInstruction(
Insn, 23, 1);
1875 ((
const MCDisassembler*)Decoder)->getSubtargetInfo().getFeatureBits();
1878 case ARM::LDC_OFFSET:
1881 case ARM::LDC_OPTION:
1882 case ARM::LDCL_OFFSET:
1884 case ARM::LDCL_POST:
1885 case ARM::LDCL_OPTION:
1886 case ARM::STC_OFFSET:
1889 case ARM::STC_OPTION:
1890 case ARM::STCL_OFFSET:
1892 case ARM::STCL_POST:
1893 case ARM::STCL_OPTION:
1894 case ARM::t2LDC_OFFSET:
1895 case ARM::t2LDC_PRE:
1896 case ARM::t2LDC_POST:
1897 case ARM::t2LDC_OPTION:
1898 case ARM::t2LDCL_OFFSET:
1899 case ARM::t2LDCL_PRE:
1900 case ARM::t2LDCL_POST:
1901 case ARM::t2LDCL_OPTION:
1902 case ARM::t2STC_OFFSET:
1903 case ARM::t2STC_PRE:
1904 case ARM::t2STC_POST:
1905 case ARM::t2STC_OPTION:
1906 case ARM::t2STCL_OFFSET:
1907 case ARM::t2STCL_PRE:
1908 case ARM::t2STCL_POST:
1909 case ARM::t2STCL_OPTION:
1910 case ARM::t2LDC2_OFFSET:
1911 case ARM::t2LDC2L_OFFSET:
1912 case ARM::t2LDC2_PRE:
1913 case ARM::t2LDC2L_PRE:
1914 case ARM::t2STC2_OFFSET:
1915 case ARM::t2STC2L_OFFSET:
1916 case ARM::t2STC2_PRE:
1917 case ARM::t2STC2L_PRE:
1918 case ARM::LDC2_OFFSET:
1919 case ARM::LDC2L_OFFSET:
1921 case ARM::LDC2L_PRE:
1922 case ARM::STC2_OFFSET:
1923 case ARM::STC2L_OFFSET:
1925 case ARM::STC2L_PRE:
1926 case ARM::t2LDC2_OPTION:
1927 case ARM::t2STC2_OPTION:
1928 case ARM::t2LDC2_POST:
1929 case ARM::t2LDC2L_POST:
1930 case ARM::t2STC2_POST:
1931 case ARM::t2STC2L_POST:
1932 case ARM::LDC2_POST:
1933 case ARM::LDC2L_POST:
1934 case ARM::STC2_POST:
1935 case ARM::STC2L_POST:
1936 if (coproc == 0xA || coproc == 0xB ||
1937 (featureBits[ARM::HasV8_1MMainlineOps] &&
1938 (coproc == 0x8 || coproc == 0x9 || coproc == 0xA || coproc == 0xB ||
1939 coproc == 0xE || coproc == 0xF)))
1946 if (featureBits[ARM::HasV8Ops] && (coproc != 14))
1955 case ARM::t2LDC2_OFFSET:
1956 case ARM::t2LDC2L_OFFSET:
1957 case ARM::t2LDC2_PRE:
1958 case ARM::t2LDC2L_PRE:
1959 case ARM::t2STC2_OFFSET:
1960 case ARM::t2STC2L_OFFSET:
1961 case ARM::t2STC2_PRE:
1962 case ARM::t2STC2L_PRE:
1963 case ARM::LDC2_OFFSET:
1964 case ARM::LDC2L_OFFSET:
1966 case ARM::LDC2L_PRE:
1967 case ARM::STC2_OFFSET:
1968 case ARM::STC2L_OFFSET:
1970 case ARM::STC2L_PRE:
1971 case ARM::t2LDC_OFFSET:
1972 case ARM::t2LDCL_OFFSET:
1973 case ARM::t2LDC_PRE:
1974 case ARM::t2LDCL_PRE:
1975 case ARM::t2STC_OFFSET:
1976 case ARM::t2STCL_OFFSET:
1977 case ARM::t2STC_PRE:
1978 case ARM::t2STCL_PRE:
1979 case ARM::LDC_OFFSET:
1980 case ARM::LDCL_OFFSET:
1983 case ARM::STC_OFFSET:
1984 case ARM::STCL_OFFSET:
1990 case ARM::t2LDC2_POST:
1991 case ARM::t2LDC2L_POST:
1992 case ARM::t2STC2_POST:
1993 case ARM::t2STC2L_POST:
1994 case ARM::LDC2_POST:
1995 case ARM::LDC2L_POST:
1996 case ARM::STC2_POST:
1997 case ARM::STC2L_POST:
1998 case ARM::t2LDC_POST:
1999 case ARM::t2LDCL_POST:
2000 case ARM::t2STC_POST:
2001 case ARM::t2STCL_POST:
2003 case ARM::LDCL_POST:
2005 case ARM::STCL_POST:
2016 case ARM::LDC_OFFSET:
2019 case ARM::LDC_OPTION:
2020 case ARM::LDCL_OFFSET:
2022 case ARM::LDCL_POST:
2023 case ARM::LDCL_OPTION:
2024 case ARM::STC_OFFSET:
2027 case ARM::STC_OPTION:
2028 case ARM::STCL_OFFSET:
2030 case ARM::STCL_POST:
2031 case ARM::STCL_OPTION:
2047 unsigned Rn = fieldFromInstruction(
Insn, 16, 4);
2048 unsigned Rt = fieldFromInstruction(
Insn, 12, 4);
2049 unsigned Rm = fieldFromInstruction(
Insn, 0, 4);
2050 unsigned imm = fieldFromInstruction(
Insn, 0, 12);
2051 unsigned pred = fieldFromInstruction(
Insn, 28, 4);
2052 unsigned reg = fieldFromInstruction(
Insn, 25, 1);
2053 unsigned P = fieldFromInstruction(
Insn, 24, 1);
2054 unsigned W = fieldFromInstruction(
Insn, 21, 1);
2058 case ARM::STR_POST_IMM:
2059 case ARM::STR_POST_REG:
2060 case ARM::STRB_POST_IMM:
2061 case ARM::STRB_POST_REG:
2062 case ARM::STRT_POST_REG:
2063 case ARM::STRT_POST_IMM:
2064 case ARM::STRBT_POST_REG:
2065 case ARM::STRBT_POST_IMM:
2078 case ARM::LDR_POST_IMM:
2079 case ARM::LDR_POST_REG:
2080 case ARM::LDRB_POST_IMM:
2081 case ARM::LDRB_POST_REG:
2082 case ARM::LDRBT_POST_REG:
2083 case ARM::LDRBT_POST_IMM:
2084 case ARM::LDRT_POST_REG:
2085 case ARM::LDRT_POST_IMM:
2097 if (!fieldFromInstruction(
Insn, 23, 1))
2100 bool writeback = (
P == 0) || (W == 1);
2101 unsigned idx_mode = 0;
2104 else if (!
P && writeback)
2107 if (writeback && (Rn == 15 || Rn == Rt))
2114 switch( fieldFromInstruction(
Insn, 5, 2)) {
2130 unsigned amt = fieldFromInstruction(
Insn, 7, 5);
2153 unsigned Rn = fieldFromInstruction(Val, 13, 4);
2154 unsigned Rm = fieldFromInstruction(Val, 0, 4);
2155 unsigned type = fieldFromInstruction(Val, 5, 2);
2156 unsigned imm = fieldFromInstruction(Val, 7, 5);
2157 unsigned U = fieldFromInstruction(Val, 12, 1);
2210 unsigned Rt = fieldFromInstruction(
Insn, 12, 4);
2211 unsigned Rn = fieldFromInstruction(
Insn, 16, 4);
2212 unsigned Rm = fieldFromInstruction(
Insn, 0, 4);
2213 unsigned type = fieldFromInstruction(
Insn, 22, 1);
2214 unsigned imm = fieldFromInstruction(
Insn, 8, 4);
2215 unsigned U = ((~fieldFromInstruction(
Insn, 23, 1)) & 1) << 8;
2216 unsigned pred = fieldFromInstruction(
Insn, 28, 4);
2217 unsigned W = fieldFromInstruction(
Insn, 21, 1);
2218 unsigned P = fieldFromInstruction(
Insn, 24, 1);
2219 unsigned Rt2 = Rt + 1;
2221 bool writeback = (W == 1) | (
P == 0);
2227 case ARM::STRD_POST:
2230 case ARM::LDRD_POST:
2239 case ARM::STRD_POST:
2240 if (
P == 0 && W == 1)
2243 if (writeback && (Rn == 15 || Rn == Rt || Rn == Rt2))
2245 if (type && Rm == 15)
2249 if (!type && fieldFromInstruction(
Insn, 8, 4))
2254 case ARM::STRH_POST:
2257 if (writeback && (Rn == 15 || Rn == Rt))
2259 if (!type && Rm == 15)
2264 case ARM::LDRD_POST:
2265 if (type && Rn == 15) {
2270 if (
P == 0 && W == 1)
2272 if (!type && (Rt2 == 15 || Rm == 15 || Rm == Rt || Rm == Rt2))
2274 if (!type && writeback && Rn == 15)
2276 if (writeback && (Rn == Rt || Rn == Rt2))
2281 case ARM::LDRH_POST:
2282 if (type && Rn == 15) {
2289 if (!type && Rm == 15)
2291 if (!type && writeback && (Rn == 15 || Rn == Rt))
2295 case ARM::LDRSH_PRE:
2296 case ARM::LDRSH_POST:
2298 case ARM::LDRSB_PRE:
2299 case ARM::LDRSB_POST:
2300 if (type && Rn == 15) {
2305 if (type && (Rt == 15 || (writeback && Rn == Rt)))
2307 if (!type && (Rt == 15 || Rm == 15))
2309 if (!type && writeback && (Rn == 15 || Rn == Rt))
2326 case ARM::STRD_POST:
2329 case ARM::STRH_POST:
2343 case ARM::STRD_POST:
2346 case ARM::LDRD_POST:
2359 case ARM::LDRD_POST:
2362 case ARM::LDRH_POST:
2364 case ARM::LDRSH_PRE:
2365 case ARM::LDRSH_POST:
2367 case ARM::LDRSB_PRE:
2368 case ARM::LDRSB_POST:
2402 unsigned Rn = fieldFromInstruction(
Insn, 16, 4);
2403 unsigned mode = fieldFromInstruction(
Insn, 23, 2);
2432 unsigned Rd = fieldFromInstruction(
Insn, 12, 4);
2433 unsigned Rm = fieldFromInstruction(
Insn, 0, 4);
2434 unsigned Rn = fieldFromInstruction(
Insn, 16, 4);
2435 unsigned pred = fieldFromInstruction(
Insn, 28, 4);
2457 unsigned Rn = fieldFromInstruction(
Insn, 16, 4);
2458 unsigned pred = fieldFromInstruction(
Insn, 28, 4);
2459 unsigned reglist = fieldFromInstruction(
Insn, 0, 16);
2467 case ARM::LDMDA_UPD:
2473 case ARM::LDMDB_UPD:
2479 case ARM::LDMIA_UPD:
2485 case ARM::LDMIB_UPD:
2491 case ARM::STMDA_UPD:
2497 case ARM::STMDB_UPD:
2503 case ARM::STMIA_UPD:
2509 case ARM::STMIB_UPD:
2517 if (fieldFromInstruction(
Insn, 20, 1) == 0) {
2519 if (!(fieldFromInstruction(
Insn, 22, 1) == 1 &&
2520 fieldFromInstruction(
Insn, 20, 1) == 0))
2547 unsigned pred = fieldFromInstruction(
Insn, 28, 4);
2548 unsigned imm8 = fieldFromInstruction(
Insn, 0, 8);
2561 if (imm8 == 0x10 &&
pred != 0xe && ((FeatureBits[ARM::FeatureRAS]) != 0))
2570 unsigned imod = fieldFromInstruction(
Insn, 18, 2);
2571 unsigned M = fieldFromInstruction(
Insn, 17, 1);
2572 unsigned iflags = fieldFromInstruction(
Insn, 6, 3);
2573 unsigned mode = fieldFromInstruction(
Insn, 0, 5);
2579 if (fieldFromInstruction(
Insn, 5, 1) != 0 ||
2580 fieldFromInstruction(
Insn, 16, 1) != 0 ||
2581 fieldFromInstruction(
Insn, 20, 8) != 0x10)
2596 }
else if (imod && !M) {
2601 }
else if (!imod && M) {
2618 unsigned imod = fieldFromInstruction(
Insn, 9, 2);
2619 unsigned M = fieldFromInstruction(
Insn, 8, 1);
2620 unsigned iflags = fieldFromInstruction(
Insn, 5, 3);
2621 unsigned mode = fieldFromInstruction(
Insn, 0, 5);
2637 }
else if (imod && !M) {
2642 }
else if (!imod && M) {
2648 int imm = fieldFromInstruction(
Insn, 0, 8);
2661 unsigned imm = fieldFromInstruction(
Insn, 0, 8);
2663 unsigned Opcode = ARM::t2HINT;
2666 Opcode = ARM::t2PACBTI;
2667 }
else if (imm == 0x1D) {
2668 Opcode = ARM::t2PAC;
2669 }
else if (imm == 0x2D) {
2670 Opcode = ARM::t2AUT;
2671 }
else if (imm == 0x0F) {
2672 Opcode = ARM::t2BTI;
2676 if (Opcode == ARM::t2HINT) {
2688 unsigned Rd = fieldFromInstruction(
Insn, 8, 4);
2691 imm |= (fieldFromInstruction(
Insn, 0, 8) << 0);
2692 imm |= (fieldFromInstruction(
Insn, 12, 3) << 8);
2693 imm |= (fieldFromInstruction(
Insn, 16, 4) << 12);
2694 imm |= (fieldFromInstruction(
Insn, 26, 1) << 11);
2713 unsigned Rd = fieldFromInstruction(
Insn, 12, 4);
2714 unsigned pred = fieldFromInstruction(
Insn, 28, 4);
2717 imm |= (fieldFromInstruction(
Insn, 0, 12) << 0);
2718 imm |= (fieldFromInstruction(
Insn, 16, 4) << 12);
2741 unsigned Rd = fieldFromInstruction(
Insn, 16, 4);
2742 unsigned Rn = fieldFromInstruction(
Insn, 0, 4);
2743 unsigned Rm = fieldFromInstruction(
Insn, 8, 4);
2744 unsigned Ra = fieldFromInstruction(
Insn, 12, 4);
2745 unsigned pred = fieldFromInstruction(
Insn, 28, 4);
2770 unsigned Pred = fieldFromInstruction(
Insn, 28, 4);
2771 unsigned Rn = fieldFromInstruction(
Insn, 16, 4);
2772 unsigned Rm = fieldFromInstruction(
Insn, 0, 4);
2792 unsigned Imm = fieldFromInstruction(
Insn, 9, 1);
2797 if (!FeatureBits[ARM::HasV8_1aOps] ||
2798 !FeatureBits[ARM::HasV8Ops])
2803 if (fieldFromInstruction(
Insn, 20,12) != 0xf11 ||
2804 fieldFromInstruction(
Insn, 4,4) != 0)
2806 if (fieldFromInstruction(
Insn, 10,10) != 0 ||
2807 fieldFromInstruction(
Insn, 0,4) != 0)
2821 unsigned add = fieldFromInstruction(Val, 12, 1);
2822 unsigned imm = fieldFromInstruction(Val, 0, 12);
2823 unsigned Rn = fieldFromInstruction(Val, 13, 4);
2828 if (!add) imm *= -1;
2829 if (imm == 0 && !add) imm = INT32_MIN;
2842 unsigned Rn = fieldFromInstruction(Val, 9, 4);
2844 unsigned U = fieldFromInstruction(Val, 8, 1);
2845 unsigned imm = fieldFromInstruction(Val, 0, 8);
2863 unsigned Rn = fieldFromInstruction(Val, 9, 4);
2865 unsigned U = fieldFromInstruction(Val, 8, 1);
2866 unsigned imm = fieldFromInstruction(Val, 0, 8);
2896 unsigned S = fieldFromInstruction(
Insn, 26, 1);
2897 unsigned J1 = fieldFromInstruction(
Insn, 13, 1);
2898 unsigned J2 = fieldFromInstruction(
Insn, 11, 1);
2899 unsigned I1 = !(J1 ^ S);
2900 unsigned I2 = !(J2 ^ S);
2901 unsigned imm10 = fieldFromInstruction(
Insn, 16, 10);
2902 unsigned imm11 = fieldFromInstruction(
Insn, 0, 11);
2903 unsigned tmp = (S << 23) | (I1 << 22) | (I2 << 21) | (imm10 << 11) | imm11;
2904 int imm32 = SignExtend32<25>(tmp << 1);
2906 true, 4, Inst, Decoder))
2917 unsigned pred = fieldFromInstruction(
Insn, 28, 4);
2918 unsigned imm = fieldFromInstruction(
Insn, 0, 24) << 2;
2922 imm |= fieldFromInstruction(
Insn, 24, 1) << 1;
2924 true, 4, Inst, Decoder))
2930 true, 4, Inst, Decoder))
2947 unsigned Rm = fieldFromInstruction(Val, 0, 4);
2948 unsigned align = fieldFromInstruction(Val, 4, 2);
2965 unsigned Rd = fieldFromInstruction(
Insn, 12, 4);
2966 Rd |= fieldFromInstruction(
Insn, 22, 1) << 4;
2967 unsigned wb = fieldFromInstruction(
Insn, 16, 4);
2968 unsigned Rn = fieldFromInstruction(
Insn, 16, 4);
2969 Rn |= fieldFromInstruction(
Insn, 4, 2) << 4;
2970 unsigned Rm = fieldFromInstruction(
Insn, 0, 4);
2974 case ARM::VLD1q16:
case ARM::VLD1q32:
case ARM::VLD1q64:
case ARM::VLD1q8:
2975 case ARM::VLD1q16wb_fixed:
case ARM::VLD1q16wb_register:
2976 case ARM::VLD1q32wb_fixed:
case ARM::VLD1q32wb_register:
2977 case ARM::VLD1q64wb_fixed:
case ARM::VLD1q64wb_register:
2978 case ARM::VLD1q8wb_fixed:
case ARM::VLD1q8wb_register:
2979 case ARM::VLD2d16:
case ARM::VLD2d32:
case ARM::VLD2d8:
2980 case ARM::VLD2d16wb_fixed:
case ARM::VLD2d16wb_register:
2981 case ARM::VLD2d32wb_fixed:
case ARM::VLD2d32wb_register:
2982 case ARM::VLD2d8wb_fixed:
case ARM::VLD2d8wb_register:
2989 case ARM::VLD2b16wb_fixed:
2990 case ARM::VLD2b16wb_register:
2991 case ARM::VLD2b32wb_fixed:
2992 case ARM::VLD2b32wb_register:
2993 case ARM::VLD2b8wb_fixed:
2994 case ARM::VLD2b8wb_register:
3008 case ARM::VLD3d8_UPD:
3009 case ARM::VLD3d16_UPD:
3010 case ARM::VLD3d32_UPD:
3014 case ARM::VLD4d8_UPD:
3015 case ARM::VLD4d16_UPD:
3016 case ARM::VLD4d32_UPD:
3023 case ARM::VLD3q8_UPD:
3024 case ARM::VLD3q16_UPD:
3025 case ARM::VLD3q32_UPD:
3029 case ARM::VLD4q8_UPD:
3030 case ARM::VLD4q16_UPD:
3031 case ARM::VLD4q32_UPD:
3044 case ARM::VLD3d8_UPD:
3045 case ARM::VLD3d16_UPD:
3046 case ARM::VLD3d32_UPD:
3050 case ARM::VLD4d8_UPD:
3051 case ARM::VLD4d16_UPD:
3052 case ARM::VLD4d32_UPD:
3059 case ARM::VLD3q8_UPD:
3060 case ARM::VLD3q16_UPD:
3061 case ARM::VLD3q32_UPD:
3065 case ARM::VLD4q8_UPD:
3066 case ARM::VLD4q16_UPD:
3067 case ARM::VLD4q32_UPD:
3080 case ARM::VLD4d8_UPD:
3081 case ARM::VLD4d16_UPD:
3082 case ARM::VLD4d32_UPD:
3089 case ARM::VLD4q8_UPD:
3090 case ARM::VLD4q16_UPD:
3091 case ARM::VLD4q32_UPD:
3101 case ARM::VLD1d8wb_fixed:
3102 case ARM::VLD1d16wb_fixed:
3103 case ARM::VLD1d32wb_fixed:
3104 case ARM::VLD1d64wb_fixed:
3105 case ARM::VLD1d8wb_register:
3106 case ARM::VLD1d16wb_register:
3107 case ARM::VLD1d32wb_register:
3108 case ARM::VLD1d64wb_register:
3109 case ARM::VLD1q8wb_fixed:
3110 case ARM::VLD1q16wb_fixed:
3111 case ARM::VLD1q32wb_fixed:
3112 case ARM::VLD1q64wb_fixed:
3113 case ARM::VLD1q8wb_register:
3114 case ARM::VLD1q16wb_register:
3115 case ARM::VLD1q32wb_register:
3116 case ARM::VLD1q64wb_register:
3117 case ARM::VLD1d8Twb_fixed:
3118 case ARM::VLD1d8Twb_register:
3119 case ARM::VLD1d16Twb_fixed:
3120 case ARM::VLD1d16Twb_register:
3121 case ARM::VLD1d32Twb_fixed:
3122 case ARM::VLD1d32Twb_register:
3123 case ARM::VLD1d64Twb_fixed:
3124 case ARM::VLD1d64Twb_register:
3125 case ARM::VLD1d8Qwb_fixed:
3126 case ARM::VLD1d8Qwb_register:
3127 case ARM::VLD1d16Qwb_fixed:
3128 case ARM::VLD1d16Qwb_register:
3129 case ARM::VLD1d32Qwb_fixed:
3130 case ARM::VLD1d32Qwb_register:
3131 case ARM::VLD1d64Qwb_fixed:
3132 case ARM::VLD1d64Qwb_register:
3133 case ARM::VLD2d8wb_fixed:
3134 case ARM::VLD2d16wb_fixed:
3135 case ARM::VLD2d32wb_fixed:
3136 case ARM::VLD2q8wb_fixed:
3137 case ARM::VLD2q16wb_fixed:
3138 case ARM::VLD2q32wb_fixed:
3139 case ARM::VLD2d8wb_register:
3140 case ARM::VLD2d16wb_register:
3141 case ARM::VLD2d32wb_register:
3142 case ARM::VLD2q8wb_register:
3143 case ARM::VLD2q16wb_register:
3144 case ARM::VLD2q32wb_register:
3145 case ARM::VLD2b8wb_fixed:
3146 case ARM::VLD2b16wb_fixed:
3147 case ARM::VLD2b32wb_fixed:
3148 case ARM::VLD2b8wb_register:
3149 case ARM::VLD2b16wb_register:
3150 case ARM::VLD2b32wb_register:
3153 case ARM::VLD3d8_UPD:
3154 case ARM::VLD3d16_UPD:
3155 case ARM::VLD3d32_UPD:
3156 case ARM::VLD3q8_UPD:
3157 case ARM::VLD3q16_UPD:
3158 case ARM::VLD3q32_UPD:
3159 case ARM::VLD4d8_UPD:
3160 case ARM::VLD4d16_UPD:
3161 case ARM::VLD4d32_UPD:
3162 case ARM::VLD4q8_UPD:
3163 case ARM::VLD4q16_UPD:
3164 case ARM::VLD4q32_UPD:
3191 case ARM::VLD1d8wb_fixed:
3192 case ARM::VLD1d16wb_fixed:
3193 case ARM::VLD1d32wb_fixed:
3194 case ARM::VLD1d64wb_fixed:
3195 case ARM::VLD1d8Twb_fixed:
3196 case ARM::VLD1d16Twb_fixed:
3197 case ARM::VLD1d32Twb_fixed:
3198 case ARM::VLD1d64Twb_fixed:
3199 case ARM::VLD1d8Qwb_fixed:
3200 case ARM::VLD1d16Qwb_fixed:
3201 case ARM::VLD1d32Qwb_fixed:
3202 case ARM::VLD1d64Qwb_fixed:
3203 case ARM::VLD1d8wb_register:
3204 case ARM::VLD1d16wb_register:
3205 case ARM::VLD1d32wb_register:
3206 case ARM::VLD1d64wb_register:
3207 case ARM::VLD1q8wb_fixed:
3208 case ARM::VLD1q16wb_fixed:
3209 case ARM::VLD1q32wb_fixed:
3210 case ARM::VLD1q64wb_fixed:
3211 case ARM::VLD1q8wb_register:
3212 case ARM::VLD1q16wb_register:
3213 case ARM::VLD1q32wb_register:
3214 case ARM::VLD1q64wb_register:
3218 if (Rm != 0xD && Rm != 0xF &&
3222 case ARM::VLD2d8wb_fixed:
3223 case ARM::VLD2d16wb_fixed:
3224 case ARM::VLD2d32wb_fixed:
3225 case ARM::VLD2b8wb_fixed:
3226 case ARM::VLD2b16wb_fixed:
3227 case ARM::VLD2b32wb_fixed:
3228 case ARM::VLD2q8wb_fixed:
3229 case ARM::VLD2q16wb_fixed:
3230 case ARM::VLD2q32wb_fixed:
3240 unsigned type = fieldFromInstruction(
Insn, 8, 4);
3241 unsigned align = fieldFromInstruction(
Insn, 4, 2);
3246 unsigned load = fieldFromInstruction(
Insn, 21, 1);
3254 unsigned size = fieldFromInstruction(
Insn, 6, 2);
3257 unsigned type = fieldFromInstruction(
Insn, 8, 4);
3258 unsigned align = fieldFromInstruction(
Insn, 4, 2);
3262 unsigned load = fieldFromInstruction(
Insn, 21, 1);
3270 unsigned size = fieldFromInstruction(
Insn, 6, 2);
3273 unsigned align = fieldFromInstruction(
Insn, 4, 2);
3276 unsigned load = fieldFromInstruction(
Insn, 21, 1);
3284 unsigned size = fieldFromInstruction(
Insn, 6, 2);
3287 unsigned load = fieldFromInstruction(
Insn, 21, 1);
3297 unsigned Rd = fieldFromInstruction(
Insn, 12, 4);
3298 Rd |= fieldFromInstruction(
Insn, 22, 1) << 4;
3299 unsigned wb = fieldFromInstruction(
Insn, 16, 4);
3300 unsigned Rn = fieldFromInstruction(
Insn, 16, 4);
3301 Rn |= fieldFromInstruction(
Insn, 4, 2) << 4;
3302 unsigned Rm = fieldFromInstruction(
Insn, 0, 4);
3306 case ARM::VST1d8wb_fixed:
3307 case ARM::VST1d16wb_fixed:
3308 case ARM::VST1d32wb_fixed:
3309 case ARM::VST1d64wb_fixed:
3310 case ARM::VST1d8wb_register:
3311 case ARM::VST1d16wb_register:
3312 case ARM::VST1d32wb_register:
3313 case ARM::VST1d64wb_register:
3314 case ARM::VST1q8wb_fixed:
3315 case ARM::VST1q16wb_fixed:
3316 case ARM::VST1q32wb_fixed:
3317 case ARM::VST1q64wb_fixed:
3318 case ARM::VST1q8wb_register:
3319 case ARM::VST1q16wb_register:
3320 case ARM::VST1q32wb_register:
3321 case ARM::VST1q64wb_register:
3322 case ARM::VST1d8Twb_fixed:
3323 case ARM::VST1d16Twb_fixed:
3324 case ARM::VST1d32Twb_fixed:
3325 case ARM::VST1d64Twb_fixed:
3326 case ARM::VST1d8Twb_register:
3327 case ARM::VST1d16Twb_register:
3328 case ARM::VST1d32Twb_register:
3329 case ARM::VST1d64Twb_register:
3330 case ARM::VST1d8Qwb_fixed:
3331 case ARM::VST1d16Qwb_fixed:
3332 case ARM::VST1d32Qwb_fixed:
3333 case ARM::VST1d64Qwb_fixed:
3334 case ARM::VST1d8Qwb_register:
3335 case ARM::VST1d16Qwb_register:
3336 case ARM::VST1d32Qwb_register:
3337 case ARM::VST1d64Qwb_register:
3338 case ARM::VST2d8wb_fixed:
3339 case ARM::VST2d16wb_fixed:
3340 case ARM::VST2d32wb_fixed:
3341 case ARM::VST2d8wb_register:
3342 case ARM::VST2d16wb_register:
3343 case ARM::VST2d32wb_register:
3344 case ARM::VST2q8wb_fixed:
3345 case ARM::VST2q16wb_fixed:
3346 case ARM::VST2q32wb_fixed:
3347 case ARM::VST2q8wb_register:
3348 case ARM::VST2q16wb_register:
3349 case ARM::VST2q32wb_register:
3350 case ARM::VST2b8wb_fixed:
3351 case ARM::VST2b16wb_fixed:
3352 case ARM::VST2b32wb_fixed:
3353 case ARM::VST2b8wb_register:
3354 case ARM::VST2b16wb_register:
3355 case ARM::VST2b32wb_register:
3360 case ARM::VST3d8_UPD:
3361 case ARM::VST3d16_UPD:
3362 case ARM::VST3d32_UPD:
3363 case ARM::VST3q8_UPD:
3364 case ARM::VST3q16_UPD:
3365 case ARM::VST3q32_UPD:
3366 case ARM::VST4d8_UPD:
3367 case ARM::VST4d16_UPD:
3368 case ARM::VST4d32_UPD:
3369 case ARM::VST4q8_UPD:
3370 case ARM::VST4q16_UPD:
3371 case ARM::VST4q32_UPD:
3388 else if (Rm != 0xF) {
3393 case ARM::VST1d8wb_fixed:
3394 case ARM::VST1d16wb_fixed:
3395 case ARM::VST1d32wb_fixed:
3396 case ARM::VST1d64wb_fixed:
3397 case ARM::VST1q8wb_fixed:
3398 case ARM::VST1q16wb_fixed:
3399 case ARM::VST1q32wb_fixed:
3400 case ARM::VST1q64wb_fixed:
3401 case ARM::VST1d8Twb_fixed:
3402 case ARM::VST1d16Twb_fixed:
3403 case ARM::VST1d32Twb_fixed:
3404 case ARM::VST1d64Twb_fixed:
3405 case ARM::VST1d8Qwb_fixed:
3406 case ARM::VST1d16Qwb_fixed:
3407 case ARM::VST1d32Qwb_fixed:
3408 case ARM::VST1d64Qwb_fixed:
3409 case ARM::VST2d8wb_fixed:
3410 case ARM::VST2d16wb_fixed:
3411 case ARM::VST2d32wb_fixed:
3412 case ARM::VST2q8wb_fixed:
3413 case ARM::VST2q16wb_fixed:
3414 case ARM::VST2q32wb_fixed:
3415 case ARM::VST2b8wb_fixed:
3416 case ARM::VST2b16wb_fixed:
3417 case ARM::VST2b32wb_fixed:
3427 case ARM::VST1q16wb_fixed:
3428 case ARM::VST1q16wb_register:
3429 case ARM::VST1q32wb_fixed:
3430 case ARM::VST1q32wb_register:
3431 case ARM::VST1q64wb_fixed:
3432 case ARM::VST1q64wb_register:
3433 case ARM::VST1q8wb_fixed:
3434 case ARM::VST1q8wb_register:
3438 case ARM::VST2d16wb_fixed:
3439 case ARM::VST2d16wb_register:
3440 case ARM::VST2d32wb_fixed:
3441 case ARM::VST2d32wb_register:
3442 case ARM::VST2d8wb_fixed:
3443 case ARM::VST2d8wb_register:
3450 case ARM::VST2b16wb_fixed:
3451 case ARM::VST2b16wb_register:
3452 case ARM::VST2b32wb_fixed:
3453 case ARM::VST2b32wb_register:
3454 case ARM::VST2b8wb_fixed:
3455 case ARM::VST2b8wb_register:
3469 case ARM::VST3d8_UPD:
3470 case ARM::VST3d16_UPD:
3471 case ARM::VST3d32_UPD:
3475 case ARM::VST4d8_UPD:
3476 case ARM::VST4d16_UPD:
3477 case ARM::VST4d32_UPD:
3484 case ARM::VST3q8_UPD:
3485 case ARM::VST3q16_UPD:
3486 case ARM::VST3q32_UPD:
3490 case ARM::VST4q8_UPD:
3491 case ARM::VST4q16_UPD:
3492 case ARM::VST4q32_UPD:
3505 case ARM::VST3d8_UPD:
3506 case ARM::VST3d16_UPD:
3507 case ARM::VST3d32_UPD:
3511 case ARM::VST4d8_UPD:
3512 case ARM::VST4d16_UPD:
3513 case ARM::VST4d32_UPD:
3520 case ARM::VST3q8_UPD:
3521 case ARM::VST3q16_UPD:
3522 case ARM::VST3q32_UPD:
3526 case ARM::VST4q8_UPD:
3527 case ARM::VST4q16_UPD:
3528 case ARM::VST4q32_UPD:
3541 case ARM::VST4d8_UPD:
3542 case ARM::VST4d16_UPD:
3543 case ARM::VST4d32_UPD:
3550 case ARM::VST4q8_UPD:
3551 case ARM::VST4q16_UPD:
3552 case ARM::VST4q32_UPD:
3568 unsigned Rd = fieldFromInstruction(
Insn, 12, 4);
3569 Rd |= fieldFromInstruction(
Insn, 22, 1) << 4;
3570 unsigned Rn = fieldFromInstruction(
Insn, 16, 4);
3571 unsigned Rm = fieldFromInstruction(
Insn, 0, 4);
3572 unsigned align = fieldFromInstruction(
Insn, 4, 1);
3573 unsigned size = fieldFromInstruction(
Insn, 6, 2);
3575 if (
size == 0 && align == 1)
3577 align *= (1 <<
size);
3580 case ARM::VLD1DUPq16:
case ARM::VLD1DUPq32:
case ARM::VLD1DUPq8:
3581 case ARM::VLD1DUPq16wb_fixed:
case ARM::VLD1DUPq16wb_register:
3582 case ARM::VLD1DUPq32wb_fixed:
case ARM::VLD1DUPq32wb_register:
3583 case ARM::VLD1DUPq8wb_fixed:
case ARM::VLD1DUPq8wb_register:
3604 if (Rm != 0xD && Rm != 0xF &&
3616 unsigned Rd = fieldFromInstruction(
Insn, 12, 4);
3617 Rd |= fieldFromInstruction(
Insn, 22, 1) << 4;
3618 unsigned Rn = fieldFromInstruction(
Insn, 16, 4);
3619 unsigned Rm = fieldFromInstruction(
Insn, 0, 4);
3620 unsigned align = fieldFromInstruction(
Insn, 4, 1);
3621 unsigned size = 1 << fieldFromInstruction(
Insn, 6, 2);
3625 case ARM::VLD2DUPd16:
case ARM::VLD2DUPd32:
case ARM::VLD2DUPd8:
3626 case ARM::VLD2DUPd16wb_fixed:
case ARM::VLD2DUPd16wb_register:
3627 case ARM::VLD2DUPd32wb_fixed:
case ARM::VLD2DUPd32wb_register:
3628 case ARM::VLD2DUPd8wb_fixed:
case ARM::VLD2DUPd8wb_register:
3632 case ARM::VLD2DUPd16x2:
case ARM::VLD2DUPd32x2:
case ARM::VLD2DUPd8x2:
3633 case ARM::VLD2DUPd16x2wb_fixed:
case ARM::VLD2DUPd16x2wb_register:
3634 case ARM::VLD2DUPd32x2wb_fixed:
case ARM::VLD2DUPd32x2wb_register:
3635 case ARM::VLD2DUPd8x2wb_fixed:
case ARM::VLD2DUPd8x2wb_register:
3652 if (Rm != 0xD && Rm != 0xF) {
3665 unsigned Rd = fieldFromInstruction(
Insn, 12, 4);
3666 Rd |= fieldFromInstruction(
Insn, 22, 1) << 4;
3667 unsigned Rn = fieldFromInstruction(
Insn, 16, 4);
3668 unsigned Rm = fieldFromInstruction(
Insn, 0, 4);
3669 unsigned inc = fieldFromInstruction(
Insn, 5, 1) + 1;
3688 else if (Rm != 0xF) {
3701 unsigned Rd = fieldFromInstruction(
Insn, 12, 4);
3702 Rd |= fieldFromInstruction(
Insn, 22, 1) << 4;
3703 unsigned Rn = fieldFromInstruction(
Insn, 16, 4);
3704 unsigned Rm = fieldFromInstruction(
Insn, 0, 4);
3705 unsigned size = fieldFromInstruction(
Insn, 6, 2);
3706 unsigned inc = fieldFromInstruction(
Insn, 5, 1) + 1;
3707 unsigned align = fieldFromInstruction(
Insn, 4, 1);
3741 else if (Rm != 0xF) {
3754 unsigned Rd = fieldFromInstruction(
Insn, 12, 4);
3755 Rd |= fieldFromInstruction(
Insn, 22, 1) << 4;
3756 unsigned imm = fieldFromInstruction(
Insn, 0, 4);
3757 imm |= fieldFromInstruction(
Insn, 16, 3) << 4;
3758 imm |= fieldFromInstruction(
Insn, 24, 1) << 7;
3759 imm |= fieldFromInstruction(
Insn, 8, 4) << 8;
3760 imm |= fieldFromInstruction(
Insn, 5, 1) << 12;
3761 unsigned Q = fieldFromInstruction(
Insn, 6, 1);
3774 case ARM::VORRiv4i16:
3775 case ARM::VORRiv2i32:
3776 case ARM::VBICiv4i16:
3777 case ARM::VBICiv2i32:
3781 case ARM::VORRiv8i16:
3782 case ARM::VORRiv4i32:
3783 case ARM::VBICiv8i16:
3784 case ARM::VBICiv4i32:
3800 unsigned Qd = ((fieldFromInstruction(
Insn, 22, 1) << 3) |
3801 fieldFromInstruction(
Insn, 13, 3));
3802 unsigned cmode = fieldFromInstruction(
Insn, 8, 4);
3803 unsigned imm = fieldFromInstruction(
Insn, 0, 4);
3804 imm |= fieldFromInstruction(
Insn, 16, 3) << 4;
3805 imm |= fieldFromInstruction(
Insn, 28, 1) << 7;
3807 imm |= fieldFromInstruction(
Insn, 5, 1) << 12;
3809 if (cmode == 0xF && Inst.
getOpcode() == ARM::MVE_VMVNimmi32)
3829 unsigned Qd = fieldFromInstruction(
Insn, 13, 3);
3830 Qd |= fieldFromInstruction(
Insn, 22, 1) << 3;
3835 unsigned Qn = fieldFromInstruction(
Insn, 17, 3);
3836 Qn |= fieldFromInstruction(
Insn, 7, 1) << 3;
3839 unsigned Qm = fieldFromInstruction(
Insn, 1, 3);
3840 Qm |= fieldFromInstruction(
Insn, 5, 1) << 3;
3843 if (!fieldFromInstruction(
Insn, 12, 1))
3855 unsigned Rd = fieldFromInstruction(
Insn, 12, 4);
3856 Rd |= fieldFromInstruction(
Insn, 22, 1) << 4;
3857 unsigned Rm = fieldFromInstruction(
Insn, 0, 4);
3858 Rm |= fieldFromInstruction(
Insn, 5, 1) << 4;
3859 unsigned size = fieldFromInstruction(
Insn, 18, 2);
3903 unsigned Rd = fieldFromInstruction(
Insn, 12, 4);
3904 Rd |= fieldFromInstruction(
Insn, 22, 1) << 4;
3905 unsigned Rn = fieldFromInstruction(
Insn, 16, 4);
3906 Rn |= fieldFromInstruction(
Insn, 7, 1) << 4;
3907 unsigned Rm = fieldFromInstruction(
Insn, 0, 4);
3908 Rm |= fieldFromInstruction(
Insn, 5, 1) << 4;
3909 unsigned op = fieldFromInstruction(
Insn, 6, 1);
3940 unsigned dst = fieldFromInstruction(
Insn, 8, 3);
3941 unsigned imm = fieldFromInstruction(
Insn, 0, 8);
3964 true, 2, Inst, Decoder))
3973 true, 4, Inst, Decoder))
3982 true, 2, Inst, Decoder))
3992 unsigned Rn = fieldFromInstruction(Val, 0, 3);
3993 unsigned Rm = fieldFromInstruction(Val, 3, 3);
4008 unsigned Rn = fieldFromInstruction(Val, 0, 3);
4009 unsigned imm = fieldFromInstruction(Val, 3, 5);
4021 unsigned imm = Val << 2;
4043 unsigned Rn = fieldFromInstruction(Val, 6, 4);
4044 unsigned Rm = fieldFromInstruction(Val, 2, 4);
4045 unsigned imm = fieldFromInstruction(Val, 0, 2);
4073 unsigned Rt = fieldFromInstruction(
Insn, 12, 4);
4074 unsigned Rn = fieldFromInstruction(
Insn, 16, 4);
4077 ((
const MCDisassembler*)Decoder)->getSubtargetInfo().getFeatureBits();
4079 bool hasMP = featureBits[ARM::FeatureMP];
4080 bool hasV7Ops = featureBits[ARM::HasV7Ops];
4135 if (!hasV7Ops || !hasMP)
4143 unsigned addrmode = fieldFromInstruction(
Insn, 4, 2);
4144 addrmode |= fieldFromInstruction(
Insn, 0, 4) << 2;
4145 addrmode |= fieldFromInstruction(
Insn, 16, 4) << 6;
4157 unsigned Rn = fieldFromInstruction(
Insn, 16, 4);
4158 unsigned Rt = fieldFromInstruction(
Insn, 12, 4);
4159 unsigned U = fieldFromInstruction(
Insn, 9, 1);
4160 unsigned imm = fieldFromInstruction(
Insn, 0, 8);
4163 unsigned add = fieldFromInstruction(
Insn, 9, 1);
4166 ((
const MCDisassembler*)Decoder)->getSubtargetInfo().getFeatureBits();
4168 bool hasMP = featureBits[ARM::FeatureMP];
4169 bool hasV7Ops = featureBits[ARM::HasV7Ops];
4179 case ARM::t2LDRSBi8:
4185 case ARM::t2LDRSHi8:
4202 case ARM::t2LDRSHi8:
4208 case ARM::t2LDRSBi8:
4224 if (!hasV7Ops || !hasMP)
4242 unsigned Rn = fieldFromInstruction(
Insn, 16, 4);
4243 unsigned Rt = fieldFromInstruction(
Insn, 12, 4);
4244 unsigned imm = fieldFromInstruction(
Insn, 0, 12);
4248 ((
const MCDisassembler*)Decoder)->getSubtargetInfo().getFeatureBits();
4250 bool hasMP = featureBits[ARM::FeatureMP];
4251 bool hasV7Ops = featureBits[ARM::HasV7Ops];
4258 case ARM::t2LDRHi12:
4261 case ARM::t2LDRSHi12:
4264 case ARM::t2LDRBi12:
4267 case ARM::t2LDRSBi12:
4284 case ARM::t2LDRSHi12:
4286 case ARM::t2LDRHi12:
4289 case ARM::t2LDRSBi12:
4304 case ARM::t2PLDWi12:
4305 if (!hasV7Ops || !hasMP)
4322 unsigned Rn = fieldFromInstruction(
Insn, 16, 4);
4323 unsigned Rt = fieldFromInstruction(
Insn, 12, 4);
4324 unsigned imm = fieldFromInstruction(
Insn, 0, 8);
4362 unsigned Rt = fieldFromInstruction(
Insn, 12, 4);
4363 unsigned U = fieldFromInstruction(
Insn, 23, 1);
4364 int imm = fieldFromInstruction(
Insn, 0, 12);
4367 ((
const MCDisassembler*)Decoder)->getSubtargetInfo().getFeatureBits();
4369 bool hasV7Ops = featureBits[ARM::HasV7Ops];
4373 case ARM::t2LDRBpci:
4374 case ARM::t2LDRHpci:
4377 case ARM::t2LDRSBpci:
4380 case ARM::t2LDRSHpci:
4416 int imm = Val & 0xFF;
4418 if (!(Val & 0x100)) imm *= -1;
4430 int imm = Val & 0x7F;
4445 unsigned Rn = fieldFromInstruction(Val, 9, 4);
4446 unsigned imm = fieldFromInstruction(Val, 0, 9);
4461 unsigned Rn = fieldFromInstruction(Val, 8, 4);
4462 unsigned imm = fieldFromInstruction(Val, 0, 8);
4477 unsigned Rn = fieldFromInstruction(Val, 8, 4);
4478 unsigned imm = fieldFromInstruction(Val, 0, 8);
4490 int imm = Val & 0xFF;
4493 else if (!(Val & 0x100))
4503 int imm = Val & 0x7F;
4506 else if (!(Val & 0x80))
4508 if (imm != INT32_MIN)
4509 imm *= (1U << shift);
4520 unsigned Rn = fieldFromInstruction(Val, 9, 4);
4521 unsigned imm = fieldFromInstruction(Val, 0, 9);
4568 unsigned Rn = fieldFromInstruction(Val, 8, 3);
4569 unsigned imm = fieldFromInstruction(Val, 0, 8);
4573 if (!
Check(S, DecodeT2Imm7<shift>(Inst, imm, Address, Decoder)))
4579template <
int shift,
int WriteBack>
4585 unsigned Rn = fieldFromInstruction(Val, 8, 4);
4586 unsigned imm = fieldFromInstruction(Val, 0, 8);
4592 if (!
Check(S, DecodeT2Imm7<shift>(Inst, imm, Address, Decoder)))
4603 unsigned Rt = fieldFromInstruction(
Insn, 12, 4);
4604 unsigned Rn = fieldFromInstruction(
Insn, 16, 4);
4605 unsigned addr = fieldFromInstruction(
Insn, 0, 8);
4606 addr |= fieldFromInstruction(
Insn, 9, 1) << 8;
4608 unsigned load = fieldFromInstruction(
Insn, 20, 1);
4612 case ARM::t2LDR_PRE:
4613 case ARM::t2LDR_POST:
4616 case ARM::t2LDRB_PRE:
4617 case ARM::t2LDRB_POST:
4620 case ARM::t2LDRH_PRE:
4621 case ARM::t2LDRH_POST:
4624 case ARM::t2LDRSB_PRE:
4625 case ARM::t2LDRSB_POST:
4631 case ARM::t2LDRSH_PRE:
4632 case ARM::t2LDRSH_POST:
4665 unsigned Rn = fieldFromInstruction(Val, 13, 4);
4666 unsigned imm = fieldFromInstruction(Val, 0, 12);
4671 case ARM::t2STRBi12:
4672 case ARM::t2STRHi12:
4690 unsigned imm = fieldFromInstruction(
Insn, 0, 7);
4705 unsigned Rdm = fieldFromInstruction(
Insn, 0, 3);
4706 Rdm |= fieldFromInstruction(
Insn, 7, 1) << 3;
4713 }
else if (Inst.
getOpcode() == ARM::tADDspr) {
4714 unsigned Rm = fieldFromInstruction(
Insn, 3, 4);
4728 unsigned imod = fieldFromInstruction(
Insn, 4, 1) | 0x2;
4729 unsigned flags = fieldFromInstruction(
Insn, 0, 3);
4741 unsigned Rm = fieldFromInstruction(
Insn, 0, 4);
4742 unsigned add = fieldFromInstruction(
Insn, 4, 1);
4755 unsigned Rn = fieldFromInstruction(
Insn, 3, 4);
4756 unsigned Qm = fieldFromInstruction(
Insn, 0, 3);
4771 unsigned Qm = fieldFromInstruction(
Insn, 8, 3);
4772 int imm = fieldFromInstruction(
Insn, 0, 7);
4777 if(!fieldFromInstruction(
Insn, 7, 1)) {
4783 if (imm != INT32_MIN)
4784 imm *= (1U << shift);
4800 unsigned S = (Val >> 23) & 1;
4801 unsigned J1 = (Val >> 22) & 1;
4802 unsigned J2 = (Val >> 21) & 1;
4803 unsigned I1 = !(J1 ^ S);
4804 unsigned I2 = !(J2 ^ S);
4805 unsigned tmp = (Val & ~0x600000) | (I1 << 22) | (I2 << 21);
4806 int imm32 = SignExtend32<25>(tmp << 1);
4809 (Address & ~2u) + imm32 + 4,
4810 true, 4, Inst, Decoder))
4818 if (Val == 0xA || Val == 0xB)
4822 ((
const MCDisassembler*)Decoder)->getSubtargetInfo().getFeatureBits();
4835 ((
const MCDisassembler*)Decoder)->getSubtargetInfo().getFeatureBits();
4838 unsigned Rn = fieldFromInstruction(
Insn, 16, 4);
4839 unsigned Rm = fieldFromInstruction(
Insn, 0, 4);
4854 unsigned pred = fieldFromInstruction(
Insn, 22, 4);
4856 unsigned opc = fieldFromInstruction(
Insn, 4, 28);
4871 unsigned imm = fieldFromInstruction(
Insn, 0, 4);
4875 unsigned brtarget = fieldFromInstruction(
Insn, 0, 11) << 1;
4876 brtarget |= fieldFromInstruction(
Insn, 11, 1) << 19;
4877 brtarget |= fieldFromInstruction(
Insn, 13, 1) << 18;
4878 brtarget |= fieldFromInstruction(
Insn, 16, 6) << 12;
4879 brtarget |= fieldFromInstruction(
Insn, 26, 1) << 20;
4894 unsigned ctrl = fieldFromInstruction(Val, 10, 2);
4896 unsigned byte = fieldFromInstruction(Val, 8, 2);
4897 unsigned imm = fieldFromInstruction(Val, 0, 8);
4914 unsigned unrot = fieldFromInstruction(Val, 0, 7) | 0x80;
4915 unsigned rot = fieldFromInstruction(Val, 7, 5);
4916 unsigned imm = llvm::rotr<uint32_t>(unrot, rot);
4927 true, 2, Inst, Decoder))
4942 unsigned S = (Val >> 23) & 1;
4943 unsigned J1 = (Val >> 22) & 1;
4944 unsigned J2 = (Val >> 21) & 1;
4945 unsigned I1 = !(J1 ^ S);
4946 unsigned I2 = !(J2 ^ S);
4947 unsigned tmp = (Val & ~0x600000) | (I1 << 22) | (I2 << 21);
4948 int imm32 = SignExtend32<25>(tmp << 1);
4951 true, 4, Inst, Decoder))
4980 ((
const MCDisassembler*)Decoder)->getSubtargetInfo().getFeatureBits();
4982 if (FeatureBits[ARM::FeatureMClass]) {
4983 unsigned ValLow = Val & 0xff;
5002 if (!(FeatureBits[ARM::HasV7Ops]))
5010 if (!(FeatureBits[ARM::HasV8MMainlineOps]))
5020 if (!(FeatureBits[ARM::Feature8MSecExt]))
5039 if (!(FeatureBits[ARM::FeaturePACBTI]))
5049 unsigned Mask = fieldFromInstruction(Val, 10, 2);
5050 if (!(FeatureBits[ARM::HasV7Ops])) {
5063 if (Mask == 0 || (Mask != 2 && ValLow > 3) ||
5064 (!(FeatureBits[ARM::FeatureDSP]) && (Mask & 1)))
5080 unsigned R = fieldFromInstruction(Val, 5, 1);
5081 unsigned SysM = fieldFromInstruction(Val, 0, 5);
5086 if (!ARMBankedReg::lookupBankedRegByEncoding((R << 5) | SysM))
5098 unsigned Rt = fieldFromInstruction(
Insn, 12, 4);
5099 unsigned Rn = fieldFromInstruction(
Insn, 16, 4);
5100 unsigned pred = fieldFromInstruction(
Insn, 28, 4);
5120 unsigned Rd = fieldFromInstruction(
Insn, 12, 4);
5121 unsigned Rt = fieldFromInstruction(
Insn, 0, 4);
5122 unsigned Rn = fieldFromInstruction(
Insn, 16, 4);
5123 unsigned pred = fieldFromInstruction(
Insn, 28, 4);
5128 if (Rn == 0xF || Rd == Rn || Rd == Rt || Rd == Rt+1)
5146 unsigned Rn = fieldFromInstruction(
Insn, 16, 4);
5147 unsigned Rt = fieldFromInstruction(
Insn, 12, 4);
5148 unsigned imm = fieldFromInstruction(
Insn, 0, 12);
5149 imm |= fieldFromInstruction(
Insn, 16, 4) << 13;
5150 imm |= fieldFromInstruction(
Insn, 23, 1) << 12;
5151 unsigned pred = fieldFromInstruction(
Insn, 28, 4);
5172 unsigned Rn = fieldFromInstruction(
Insn, 16, 4);
5173 unsigned Rt = fieldFromInstruction(
Insn, 12, 4);
5174 unsigned imm = fieldFromInstruction(
Insn, 0, 12);
5175 imm |= fieldFromInstruction(
Insn, 16, 4) << 13;
5176 imm |= fieldFromInstruction(
Insn, 23, 1) << 12;
5177 unsigned pred = fieldFromInstruction(
Insn, 28, 4);
5178 unsigned Rm = fieldFromInstruction(
Insn, 0, 4);
5200 unsigned Rn = fieldFromInstruction(
Insn, 16, 4);
5201 unsigned Rt = fieldFromInstruction(
Insn, 12, 4);
5202 unsigned imm = fieldFromInstruction(
Insn, 0, 12);
5203 imm |= fieldFromInstruction(
Insn, 16, 4) << 13;
5204 imm |= fieldFromInstruction(
Insn, 23, 1) << 12;
5205 unsigned pred = fieldFromInstruction(
Insn, 28, 4);
5226 unsigned Rn = fieldFromInstruction(
Insn, 16, 4);
5227 unsigned Rt = fieldFromInstruction(
Insn, 12, 4);
5228 unsigned imm = fieldFromInstruction(
Insn, 0, 12);
5229 imm |= fieldFromInstruction(
Insn, 16, 4) << 13;
5230 imm |= fieldFromInstruction(
Insn, 23, 1) << 12;
5231 unsigned pred = fieldFromInstruction(
Insn, 28, 4);
5251 unsigned Rn = fieldFromInstruction(
Insn, 16, 4);
5252 unsigned Rm = fieldFromInstruction(
Insn, 0, 4);
5253 unsigned Rd = fieldFromInstruction(
Insn, 12, 4);
5254 Rd |= fieldFromInstruction(
Insn, 22, 1) << 4;
5255 unsigned size = fieldFromInstruction(
Insn, 10, 2);
5263 if (fieldFromInstruction(
Insn, 4, 1))
5265 index = fieldFromInstruction(
Insn, 5, 3);
5268 if (fieldFromInstruction(
Insn, 5, 1))
5270 index = fieldFromInstruction(
Insn, 6, 2);
5271 if (fieldFromInstruction(
Insn, 4, 1))
5275 if (fieldFromInstruction(
Insn, 6, 1))
5277 index = fieldFromInstruction(
Insn, 7, 1);
5279 switch (fieldFromInstruction(
Insn, 4, 2)) {
5318 unsigned Rn = fieldFromInstruction(
Insn, 16, 4);
5319 unsigned Rm = fieldFromInstruction(
Insn, 0, 4);
5320 unsigned Rd = fieldFromInstruction(
Insn, 12, 4);
5321 Rd |= fieldFromInstruction(
Insn, 22, 1) << 4;
5322 unsigned size = fieldFromInstruction(
Insn, 10, 2);
5330 if (fieldFromInstruction(
Insn, 4, 1))
5332 index = fieldFromInstruction(
Insn, 5, 3);
5335 if (fieldFromInstruction(
Insn, 5, 1))
5337 index = fieldFromInstruction(
Insn, 6, 2);
5338 if (fieldFromInstruction(
Insn, 4, 1))
5342 if (fieldFromInstruction(
Insn, 6, 1))
5344 index = fieldFromInstruction(
Insn, 7, 1);
5346 switch (fieldFromInstruction(
Insn, 4, 2)) {
5383 unsigned Rn = fieldFromInstruction(
Insn, 16, 4);
5384 unsigned Rm = fieldFromInstruction(
Insn, 0, 4);
5385 unsigned Rd = fieldFromInstruction(
Insn, 12, 4);
5386 Rd |= fieldFromInstruction(
Insn, 22, 1) << 4;
5387 unsigned size = fieldFromInstruction(
Insn, 10, 2);
5396 index = fieldFromInstruction(
Insn, 5, 3);
5397 if (fieldFromInstruction(
Insn, 4, 1))
5401 index = fieldFromInstruction(
Insn, 6, 2);
5402 if (fieldFromInstruction(
Insn, 4, 1))
5404 if (fieldFromInstruction(
Insn, 5, 1))
5408 if (fieldFromInstruction(
Insn, 5, 1))
5410 index = fieldFromInstruction(
Insn, 7, 1);
5411 if (fieldFromInstruction(
Insn, 4, 1) != 0)
5413 if (fieldFromInstruction(
Insn, 6, 1))
5450 unsigned Rn = fieldFromInstruction(
Insn, 16, 4);
5451 unsigned Rm = fieldFromInstruction(
Insn, 0, 4);
5452 unsigned Rd = fieldFromInstruction(
Insn, 12, 4);
5453 Rd |= fieldFromInstruction(
Insn, 22, 1) << 4;
5454 unsigned size = fieldFromInstruction(
Insn, 10, 2);
5463 index = fieldFromInstruction(
Insn, 5, 3);
5464 if (fieldFromInstruction(
Insn, 4, 1))
5468 index = fieldFromInstruction(
Insn, 6, 2);
5469 if (fieldFromInstruction(
Insn, 4, 1))
5471 if (fieldFromInstruction(
Insn, 5, 1))
5475 if (fieldFromInstruction(
Insn, 5, 1))
5477 index = fieldFromInstruction(
Insn, 7, 1);
5478 if (fieldFromInstruction(
Insn, 4, 1) != 0)
5480 if (fieldFromInstruction(
Insn, 6, 1))
5513 unsigned Rn = fieldFromInstruction(
Insn, 16, 4);
5514 unsigned Rm = fieldFromInstruction(
Insn, 0, 4);
5515 unsigned Rd = fieldFromInstruction(
Insn, 12, 4);
5516 Rd |= fieldFromInstruction(
Insn, 22, 1) << 4;
5517 unsigned size = fieldFromInstruction(
Insn, 10, 2);
5526 if (fieldFromInstruction(
Insn, 4, 1))
5528 index = fieldFromInstruction(
Insn, 5, 3);
5531 if (fieldFromInstruction(
Insn, 4, 1))
5533 index = fieldFromInstruction(
Insn, 6, 2);
5534 if (fieldFromInstruction(
Insn, 5, 1))
5538 if (fieldFromInstruction(
Insn, 4, 2))
5540 index = fieldFromInstruction(
Insn, 7, 1);
5541 if (fieldFromInstruction(
Insn, 6, 1))
5583 unsigned Rn = fieldFromInstruction(
Insn, 16, 4);
5584 unsigned Rm = fieldFromInstruction(
Insn, 0, 4);
5585 unsigned Rd = fieldFromInstruction(
Insn, 12, 4);
5586 Rd |= fieldFromInstruction(
Insn, 22, 1) << 4;
5587 unsigned size = fieldFromInstruction(
Insn, 10, 2);
5596 if (fieldFromInstruction(
Insn, 4, 1))
5598 index = fieldFromInstruction(
Insn, 5, 3);
5601 if (fieldFromInstruction(
Insn, 4, 1))
5603 index = fieldFromInstruction(
Insn, 6, 2);
5604 if (fieldFromInstruction(
Insn, 5, 1))
5608 if (fieldFromInstruction(
Insn, 4, 2))
5610 index = fieldFromInstruction(
Insn, 7, 1);
5611 if (fieldFromInstruction(
Insn, 6, 1))
5646 unsigned Rn = fieldFromInstruction(
Insn, 16, 4);
5647 unsigned Rm = fieldFromInstruction(
Insn, 0, 4);
5648 unsigned Rd = fieldFromInstruction(
Insn, 12, 4);
5649 Rd |= fieldFromInstruction(
Insn, 22, 1) << 4;
5650 unsigned size = fieldFromInstruction(
Insn, 10, 2);
5659 if (fieldFromInstruction(
Insn, 4, 1))
5661 index = fieldFromInstruction(
Insn, 5, 3);
5664 if (fieldFromInstruction(
Insn, 4, 1))
5666 index = fieldFromInstruction(
Insn, 6, 2);
5667 if (fieldFromInstruction(
Insn, 5, 1))
5671 switch (fieldFromInstruction(
Insn, 4, 2)) {
5677 align = 4 << fieldFromInstruction(
Insn, 4, 2);
break;
5680 index = fieldFromInstruction(
Insn, 7, 1);
5681 if (fieldFromInstruction(
Insn, 6, 1))
5727 unsigned Rn = fieldFromInstruction(
Insn, 16, 4);
5728 unsigned Rm = fieldFromInstruction(
Insn, 0, 4);
5729 unsigned Rd = fieldFromInstruction(
Insn, 12, 4);
5730 Rd |= fieldFromInstruction(
Insn, 22, 1) << 4;
5731 unsigned size = fieldFromInstruction(
Insn, 10, 2);
5740 if (fieldFromInstruction(
Insn, 4, 1))
5742 index = fieldFromInstruction(
Insn, 5, 3);
5745 if (fieldFromInstruction(
Insn, 4, 1))
5747 index = fieldFromInstruction(
Insn, 6, 2);
5748 if (fieldFromInstruction(
Insn, 5, 1))
5752 switch (fieldFromInstruction(
Insn, 4, 2)) {
5758 align = 4 << fieldFromInstruction(
Insn, 4, 2);
break;
5761 index = fieldFromInstruction(
Insn, 7, 1);
5762 if (fieldFromInstruction(
Insn, 6, 1))
5798 unsigned Rt = fieldFromInstruction(
Insn, 12, 4);
5799 unsigned Rt2 = fieldFromInstruction(
Insn, 16, 4);
5800 unsigned Rm = fieldFromInstruction(
Insn, 5, 1);
5801 unsigned pred = fieldFromInstruction(
Insn, 28, 4);
5802 Rm |= fieldFromInstruction(
Insn, 0, 4) << 1;
5804 if (Rt == 0xF || Rt2 == 0xF || Rm == 0x1F)
5824 unsigned Rt = fieldFromInstruction(
Insn, 12, 4);
5825 unsigned Rt2 = fieldFromInstruction(
Insn, 16, 4);
5826 unsigned Rm = fieldFromInstruction(
Insn, 5, 1);
5827 unsigned pred = fieldFromInstruction(
Insn, 28, 4);
5828 Rm |= fieldFromInstruction(
Insn, 0, 4) << 1;
5830 if (Rt == 0xF || Rt2 == 0xF || Rm == 0x1F)
5850 unsigned pred = fieldFromInstruction(
Insn, 4, 4);
5851 unsigned mask = fieldFromInstruction(
Insn, 0, 4);
5866 unsigned LowBit = mask & -mask;
5867 unsigned BitsAboveLowBit = 0xF & (-LowBit << 1);
5868 mask ^= BitsAboveLowBit;
5881 unsigned Rt = fieldFromInstruction(
Insn, 12, 4);
5882 unsigned Rt2 = fieldFromInstruction(
Insn, 8, 4);
5883 unsigned Rn = fieldFromInstruction(
Insn, 16, 4);
5884 unsigned addr = fieldFromInstruction(
Insn, 0, 8);
5885 unsigned W = fieldFromInstruction(
Insn, 21, 1);
5886 unsigned U = fieldFromInstruction(
Insn, 23, 1);
5887 unsigned P = fieldFromInstruction(
Insn, 24, 1);
5888 bool writeback = (W == 1) | (
P == 0);
5890 addr |= (U << 8) | (Rn << 9);
5892 if (writeback && (Rn == Rt || Rn == Rt2))
5918 unsigned Rt = fieldFromInstruction(
Insn, 12, 4);
5919 unsigned Rt2 = fieldFromInstruction(
Insn, 8, 4);
5920 unsigned Rn = fieldFromInstruction(
Insn, 16, 4);
5921 unsigned addr = fieldFromInstruction(
Insn, 0, 8);
5922 unsigned W = fieldFromInstruction(
Insn, 21, 1);
5923 unsigned U = fieldFromInstruction(
Insn, 23, 1);
5924 unsigned P = fieldFromInstruction(
Insn, 24, 1);
5925 bool writeback = (W == 1) | (
P == 0);
5927 addr |= (U << 8) | (Rn << 9);
5929 if (writeback && (Rn == Rt || Rn == Rt2))
5950 unsigned sign1 = fieldFromInstruction(
Insn, 21, 1);
5951 unsigned sign2 = fieldFromInstruction(
Insn, 23, 1);
5953 const unsigned Rd = fieldFromInstruction(
Insn, 8, 4);
5957 unsigned Val = fieldFromInstruction(
Insn, 0, 8);
5958 Val |= fieldFromInstruction(
Insn, 12, 3) << 8;
5959 Val |= fieldFromInstruction(
Insn, 26, 1) << 11;
5987 unsigned Rt = fieldFromInstruction(
Insn, 12, 4);
5988 unsigned Rt2 = fieldFromInstruction(
Insn, 0, 4);
5989 unsigned Rn = fieldFromInstruction(
Insn, 16, 4);
5990 unsigned pred = fieldFromInstruction(
Insn, 28, 4);
5997 if (Rt == Rn || Rn == Rt2)
6015 ((
const MCDisassembler *)Decoder)->getSubtargetInfo().getFeatureBits();
6016 bool hasFullFP16 = featureBits[ARM::FeatureFullFP16];
6018 unsigned Vd = (fieldFromInstruction(
Insn, 12, 4) << 0);
6019 Vd |= (fieldFromInstruction(
Insn, 22, 1) << 4);
6020 unsigned Vm = (fieldFromInstruction(
Insn, 0, 4) << 0);
6021 Vm |= (fieldFromInstruction(
Insn, 5, 1) << 4);
6022 unsigned imm = fieldFromInstruction(
Insn, 16, 6);
6023 unsigned cmode = fieldFromInstruction(
Insn, 8, 4);
6024 unsigned op = fieldFromInstruction(
Insn, 5, 1);
6029 if (!(imm & 0x38)) {
6074 ((
const MCDisassembler *)Decoder)->getSubtargetInfo().getFeatureBits();
6075 bool hasFullFP16 = featureBits[ARM::FeatureFullFP16];
6077 unsigned Vd = (fieldFromInstruction(
Insn, 12, 4) << 0);
6078 Vd |= (fieldFromInstruction(
Insn, 22, 1) << 4);
6079 unsigned Vm = (fieldFromInstruction(
Insn, 0, 4) << 0);
6080 Vm |= (fieldFromInstruction(
Insn, 5, 1) << 4);
6081 unsigned imm = fieldFromInstruction(
Insn, 16, 6);
6082 unsigned cmode = fieldFromInstruction(
Insn, 8, 4);
6083 unsigned op = fieldFromInstruction(
Insn, 5, 1);
6088 if (!(imm & 0x38)) {
6134 unsigned Vd = (fieldFromInstruction(
Insn, 12, 4) << 0);
6135 Vd |= (fieldFromInstruction(
Insn, 22, 1) << 4);
6136 unsigned Vn = (fieldFromInstruction(
Insn, 16, 4) << 0);
6137 Vn |= (fieldFromInstruction(
Insn, 7, 1) << 4);
6138 unsigned Vm = (fieldFromInstruction(
Insn, 0, 4) << 0);
6139 Vm |= (fieldFromInstruction(
Insn, 5, 1) << 4);
6140 unsigned q = (fieldFromInstruction(
Insn, 6, 1) << 0);
6141 unsigned rotate = (fieldFromInstruction(
Insn, 20, 2) << 0);
6147 if (!
Check(S, DestRegDecoder(Inst, Vd, Address, Decoder)))
6149 if (!
Check(S, DestRegDecoder(Inst, Vd, Address, Decoder)))
6151 if (!
Check(S, DestRegDecoder(Inst, Vn, Address, Decoder)))
6167 unsigned Rn = fieldFromInstruction(Val, 16, 4);
6168 unsigned Rt = fieldFromInstruction(Val, 12, 4);
6169 unsigned Rm = fieldFromInstruction(Val, 0, 4);
6170 Rm |= (fieldFromInstruction(Val, 23, 1) << 4);
6171 unsigned Cond = fieldFromInstruction(Val, 28, 4);
6173 if (fieldFromInstruction(Val, 8, 4) != 0 || Rn == Rt)
6195 unsigned CRm = fieldFromInstruction(Val, 0, 4);
6196 unsigned opc1 = fieldFromInstruction(Val, 4, 4);
6197 unsigned cop = fieldFromInstruction(Val, 8, 4);
6198 unsigned Rt = fieldFromInstruction(Val, 12, 4);
6199 unsigned Rt2 = fieldFromInstruction(Val, 16, 4);
6201 if ((cop & ~0x1) == 0xa)
6240 ((
const MCDisassembler *)Decoder)->getSubtargetInfo().getFeatureBits();
6246 case ARM::VMSR_FPSCR_NZCVQC:
6255 unsigned Rt = fieldFromInstruction(Val, 12, 4);
6257 if (featureBits[ARM::ModeThumb] && !featureBits[ARM::HasV8Ops]) {
6258 if (Rt == 13 || Rt == 15)
6267 case ARM::VMRS_FPSCR_NZCVQC:
6275 if (featureBits[ARM::ModeThumb]) {
6279 unsigned pred = fieldFromInstruction(Val, 28, 4);
6287template <
bool isSigned,
bool isNeg,
bool zeroPermitted,
int size>
6292 if (Val == 0 && !zeroPermitted)
6297 DecVal = SignExtend32<size + 1>(Val << 1);
6299 DecVal = (Val << 1);
6312 Val = LocImm + (2 << Val);
6335 unsigned Imm = fieldFromInstruction(
Insn, 11, 1) |
6336 fieldFromInstruction(
Insn, 1, 10) << 1;
6338 case ARM::t2LEUpdate:
6344 if (!
Check(S, DecodeBFLabelOperand<false, true, true, 11>(
6345 Inst, Imm, Address, Decoder)))
6349 case ARM::MVE_WLSTP_8:
6350 case ARM::MVE_WLSTP_16:
6351 case ARM::MVE_WLSTP_32:
6352 case ARM::MVE_WLSTP_64:
6356 Address, Decoder)) ||
6357 !
Check(S, DecodeBFLabelOperand<false, false, true, 11>(
6358 Inst, Imm, Address, Decoder)))
6362 case ARM::MVE_DLSTP_8:
6363 case ARM::MVE_DLSTP_16:
6364 case ARM::MVE_DLSTP_32:
6365 case ARM::MVE_DLSTP_64:
6366 unsigned Rn = fieldFromInstruction(
Insn, 16, 4);
6371 uint32_t CanonicalLCTP = 0xF00FE001, SBZMask = 0x00300FFE;
6372 if ((
Insn & ~SBZMask) != CanonicalLCTP)
6374 if (
Insn != CanonicalLCTP)
6381 fieldFromInstruction(
Insn, 16, 4),
6406 if ((RegNo) + 1 > 11)
6449 if (Inst.
getOpcode() == ARM::VSCCLRMD) {
6450 unsigned reglist = (fieldFromInstruction(
Insn, 1, 7) << 1) |
6451 (fieldFromInstruction(
Insn, 12, 4) << 8) |
6452 (fieldFromInstruction(
Insn, 22, 1) << 12);
6457 unsigned reglist = fieldFromInstruction(
Insn, 0, 8) |
6458 (fieldFromInstruction(
Insn, 22, 1) << 8) |
6459 (fieldFromInstruction(
Insn, 12, 4) << 9);
6481 ARM::Q0_Q1, ARM::Q1_Q2, ARM::Q2_Q3, ARM::Q3_Q4,
6482 ARM::Q4_Q5, ARM::Q5_Q6, ARM::Q6_Q7
6497 ARM::Q0_Q1_Q2_Q3, ARM::Q1_Q2_Q3_Q4, ARM::Q2_Q3_Q4_Q5,
6498 ARM::Q3_Q4_Q5_Q6, ARM::Q4_Q5_Q6_Q7
6522 unsigned CurBit = 0;
6523 for (
int i = 3; i >= 0; --i) {
6526 CurBit ^= (Val >> i) & 1U;
6529 Imm |= (CurBit << i);
6532 if ((Val & ~(~0U << i)) == 0) {
6578 switch (Val & 0x3) {
6639 unsigned DecodedVal = 64 - Val;
6642 case ARM::MVE_VCVTf16s16_fix:
6643 case ARM::MVE_VCVTs16f16_fix:
6644 case ARM::MVE_VCVTf16u16_fix:
6645 case ARM::MVE_VCVTu16f16_fix:
6646 if (DecodedVal > 16)
6649 case ARM::MVE_VCVTf32s32_fix:
6650 case ARM::MVE_VCVTs32f32_fix:
6651 case ARM::MVE_VCVTf32u32_fix:
6652 case ARM::MVE_VCVTu32f32_fix:
6653 if (DecodedVal > 32)
6665 case ARM::VSTR_P0_off:
6666 case ARM::VSTR_P0_pre:
6667 case ARM::VSTR_P0_post:
6668 case ARM::VLDR_P0_off:
6669 case ARM::VLDR_P0_pre:
6670 case ARM::VLDR_P0_post:
6677template <
bool Writeback>
6682 case ARM::VSTR_FPSCR_pre:
6683 case ARM::VSTR_FPSCR_NZCVQC_pre:
6684 case ARM::VLDR_FPSCR_pre:
6685 case ARM::VLDR_FPSCR_NZCVQC_pre:
6686 case ARM::VSTR_FPSCR_off:
6687 case ARM::VSTR_FPSCR_NZCVQC_off:
6688 case ARM::VLDR_FPSCR_off:
6689 case ARM::VLDR_FPSCR_NZCVQC_off:
6690 case ARM::VSTR_FPSCR_post:
6691 case ARM::VSTR_FPSCR_NZCVQC_post:
6692 case ARM::VLDR_FPSCR_post:
6693 case ARM::VLDR_FPSCR_NZCVQC_post:
6695 ((
const MCDisassembler *)Decoder)->getSubtargetInfo().getFeatureBits();
6697 if (!featureBits[ARM::HasMVEIntegerOps] && !featureBits[ARM::FeatureVFP2])
6704 unsigned Rn = fieldFromInstruction(Val, 16, 4);
6705 unsigned addr = fieldFromInstruction(Val, 0, 7) |
6706 (fieldFromInstruction(Val, 23, 1) << 7) | (Rn << 8);
6727 unsigned Qd = fieldFromInstruction(Val, 13, 3);
6728 unsigned addr = fieldFromInstruction(Val, 0, 7) |
6729 (fieldFromInstruction(Val, 23, 1) << 7) | (Rn << 8);
6731 if (!
Check(S, RnDecoder(Inst, Rn, Address, Decoder)))
6735 if (!
Check(S, AddrDecoder(Inst, addr, Address, Decoder)))
6746 fieldFromInstruction(Val, 16, 3),
6748 DecodeTAddrModeImm7<shift>);
6756 fieldFromInstruction(Val, 16, 4),
6758 DecodeT2AddrModeImm7<shift,1>);
6766 fieldFromInstruction(Val, 17, 3),
6768 DecodeMveAddrModeQ<shift>);
6771template <
unsigned MinLog,
unsigned MaxLog>
6777 if (Val < MinLog || Val > MaxLog)
6784template <
unsigned start>
6799 unsigned Rt = fieldFromInstruction(
Insn, 0, 4);
6800 unsigned Rt2 = fieldFromInstruction(
Insn, 16, 4);
6801 unsigned Qd = ((fieldFromInstruction(
Insn, 22, 1) << 3) |
6802 fieldFromInstruction(
Insn, 13, 3));
6803 unsigned index = fieldFromInstruction(
Insn, 4, 1);
6811 if (!
Check(S, DecodeMVEPairVectorIndexOperand<2>(Inst, index, Address, Decoder)))
6813 if (!
Check(S, DecodeMVEPairVectorIndexOperand<0>(Inst, index, Address, Decoder)))
6823 unsigned Rt = fieldFromInstruction(
Insn, 0, 4);
6824 unsigned Rt2 = fieldFromInstruction(
Insn, 16, 4);
6825 unsigned Qd = ((fieldFromInstruction(
Insn, 22, 1) << 3) |
6826 fieldFromInstruction(
Insn, 13, 3));
6827 unsigned index = fieldFromInstruction(
Insn, 4, 1);
6837 if (!
Check(S, DecodeMVEPairVectorIndexOperand<2>(Inst, index, Address, Decoder)))
6839 if (!
Check(S, DecodeMVEPairVectorIndexOperand<0>(Inst, index, Address, Decoder)))
6850 unsigned RdaLo = fieldFromInstruction(
Insn, 17, 3) << 1;
6851 unsigned RdaHi = fieldFromInstruction(
Insn, 9, 3) << 1;
6852 unsigned Rm = fieldFromInstruction(
Insn, 12, 4);
6860 unsigned Rda = fieldFromInstruction(
Insn, 16, 4);
6863 case ARM::MVE_ASRLr:
6864 case ARM::MVE_SQRSHRL:
6867 case ARM::MVE_LSLLr:
6868 case ARM::MVE_UQRSHLL:
6887 if (fieldFromInstruction (
Insn, 6, 3) != 4)
6915 if (Inst.
getOpcode() == ARM::MVE_SQRSHRL ||
6917 unsigned Saturate = fieldFromInstruction(
Insn, 7, 1);
6929 unsigned Qd = ((fieldFromInstruction(
Insn, 22, 1) << 3) |
6930 fieldFromInstruction(
Insn, 13, 3));
6931 unsigned Qm = ((fieldFromInstruction(
Insn, 5, 1) << 3) |
6932 fieldFromInstruction(
Insn, 1, 3));
6933 unsigned imm6 = fieldFromInstruction(
Insn, 16, 6);
6945template <
bool scalar, OperandDecoder predicate_decoder>
6950 unsigned Qn = fieldFromInstruction(
Insn, 17, 3);
6957 fc = fieldFromInstruction(
Insn, 12, 1) << 2 |
6958 fieldFromInstruction(
Insn, 7, 1) |
6959 fieldFromInstruction(
Insn, 5, 1) << 1;
6960 unsigned Rm = fieldFromInstruction(
Insn, 0, 4);
6964 fc = fieldFromInstruction(
Insn, 12, 1) << 2 |
6965 fieldFromInstruction(
Insn, 7, 1) |
6966 fieldFromInstruction(
Insn, 0, 1) << 1;
6967 unsigned Qm = fieldFromInstruction(
Insn, 5, 1) << 4 |
6968 fieldFromInstruction(
Insn, 1, 3);
6973 if (!
Check(S, predicate_decoder(Inst, fc, Address, Decoder)))
6987 unsigned Rn = fieldFromInstruction(
Insn, 16, 4);
7005 const unsigned Rd = fieldFromInstruction(
Insn, 8, 4);
7006 const unsigned Rn = fieldFromInstruction(
Insn, 16, 4);
7007 const unsigned Imm12 = fieldFromInstruction(
Insn, 26, 1) << 11 |
7008 fieldFromInstruction(
Insn, 12, 3) << 8 |
7009 fieldFromInstruction(
Insn, 0, 8);
7010 const unsigned TypeT3 = fieldFromInstruction(
Insn, 25, 1);
7011 unsigned sign1 = fieldFromInstruction(
Insn, 21, 1);
7012 unsigned sign2 = fieldFromInstruction(
Insn, 23, 1);
7013 unsigned S = fieldFromInstruction(
Insn, 20, 1);
7024 Inst.
setOpcode(sign1 ? ARM::t2SUBspImm12 : ARM::t2ADDspImm12);
7027 Inst.
setOpcode(sign1 ? ARM::t2SUBspImm : ARM::t2ADDspImm);
7042 const unsigned Rn = fieldFromInstruction(
Insn, 16, 4);
SmallVector< AArch64_IMM::ImmInsnModel, 4 > Insn
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 DecodeNEONComplexLane64Instruction(MCInst &Inst, unsigned Val, uint64_t Address, const MCDisassembler *Decoder)
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 DecodeVSHLMaxInstruction(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 DecodeStatus DecodeSORegImmOperand(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
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 DecodeSORegMemOperand(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static const uint16_t DPairSpacedDecoderTable[]
static DecodeStatus DecodeShiftRight64Imm(MCInst &Inst, unsigned Val, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeThumbTableBranch(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 DecodeBitfieldMaskOperand(MCInst &Inst, unsigned Insn, 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 DecodeThumb2BCCInstruction(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 DecodeShiftRight32Imm(MCInst &Inst, unsigned Val, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeT2MOVTWInstruction(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
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 DecodeVMOVModImmInstruction(MCInst &Inst, unsigned Val, 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 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 DecodeVLD1DupInstruction(MCInst &Inst, unsigned Val, 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 DecodeVLD4DupInstruction(MCInst &Inst, unsigned Val, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeT2ShifterImmOperand(MCInst &Inst, unsigned Val, 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 DecodeStatus DecodeVST3LN(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeRestrictedUPredicateOperand(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)
static const uint16_t DPairDecoderTable[]
static DecodeStatus DecodeVLDST3Instruction(MCInst &Inst, unsigned Val, uint64_t Address, const MCDisassembler *Decoder)
DecodeStatus OperandDecoder(MCInst &Inst, unsigned Val, uint64_t Address, const MCDisassembler *Decoder)
static const uint16_t QQQQPRDecoderTable[]
static DecodeStatus DecodeThumbBLTargetOperand(MCInst &Inst, unsigned Val, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeVLDST2Instruction(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 DecodeCopMemInstruction(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeVLD3DupInstruction(MCInst &Inst, unsigned Val, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeMemBarrierOption(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeVpredNOperand(MCInst &Inst, unsigned Val, 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 DecodeIT(MCInst &Inst, unsigned Val, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeVSTInstruction(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 DecodeStatus DecodeVSTRVLDR_SYSREG(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeT2Imm8(MCInst &Inst, unsigned Val, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeThumbAddSPImm(MCInst &Inst, uint16_t Val, uint64_t Address, const MCDisassembler *Decoder)
static const uint16_t CLRMGPRDecoderTable[]
static DecodeStatus DecodePostIdxReg(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeCoprocessor(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 DecodeT2Imm8S4(MCInst &Inst, unsigned Val, 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 DecodeVLDST4Instruction(MCInst &Inst, unsigned Val, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeT2LdStPre(MCInst &Inst, unsigned Val, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeGPRPairRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const MCDisassembler *Decoder)
LLVM_EXTERNAL_VISIBILITY void LLVMInitializeARMDisassembler()
static DecodeStatus DecodeMQPRRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeVLDInstruction(MCInst &Inst, unsigned Val, 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 DecodeMVEModImmInstruction(MCInst &Inst, unsigned Val, 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 DecodeVCVTImmOperand(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeMveAddrModeQ(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeT2LoadShift(MCInst &Inst, unsigned Val, 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 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 DecodeMSRMask(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeMVEVMOVQtoDReg(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static const uint16_t QQPRDecoderTable[]
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 DecodeBFAfterTargetOperand(MCInst &Inst, unsigned val, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeGPRspRegisterClass(MCInst &Inst, unsigned RegNo, 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 DecodeT2AddrModeImm8s4(MCInst &Inst, unsigned Val, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeVpredROperand(MCInst &Inst, unsigned Val, 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 DecodeVST4LN(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static const uint16_t QPRDecoderTable[]
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 DecodeVLDST1Instruction(MCInst &Inst, unsigned Val, 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 DecodeInstSyncBarrierOption(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 DecodeVLD2DupInstruction(MCInst &Inst, unsigned Val, 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 DecodeBFLabelOperand(MCInst &Inst, unsigned val, uint64_t Address, const MCDisassembler *Decoder)
static const uint16_t SPRDecoderTable[]
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 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 DecodeBankedReg(MCInst &Inst, unsigned Insn, 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 DecodeMemMultipleWritebackInstruction(MCInst &Inst, unsigned Insn, uint64_t Adddress, const MCDisassembler *Decoder)
static DecodeStatus DecodeT2BInstruction(MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
static DecodeStatus DecodeThumbBLXOffset(MCInst &Inst, unsigned 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 DecodetGPROddRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const MCDisassembler *Decoder)
static const uint16_t DPRDecoderTable[]
static DecodeStatus DecodeT2Adr(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 DecodeSORegRegOperand(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 DecodeForVMRSandVMSR(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
static bool isBranch(unsigned Opcode)
const SmallVectorImpl< MachineOperand > & Cond
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
size_t size() const
size - Get the array size.
This class represents an Operation in the Expression.
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
virtual uint64_t suggestBytesToSkip(ArrayRef< uint8_t > Bytes, uint64_t Address) const
Suggest a distance to skip in a buffer of data to find the next place to look for the start of an ins...
DecodeStatus
Ternary decode status.
virtual DecodeStatus getInstruction(MCInst &Instr, uint64_t &Size, ArrayRef< uint8_t > Bytes, uint64_t Address, raw_ostream &CStream) const =0
Returns the disassembly of a single instruction.
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
Describe properties that are true of each instruction in the target description file.
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.
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.
Instances of this class represent operands of the MCInst class.
static MCOperand createReg(unsigned Reg)
static MCOperand createImm(int64_t Val)
unsigned getReg() const
Returns the register number.
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.
This is an optimization pass for GlobalISel generic memory operations.
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)
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...
Target & getTheARMLETarget()
Target & getTheARMBETarget()
Target & getTheThumbLETarget()
static void RegisterMCDisassembler(Target &T, Target::MCDisassemblerCtorTy Fn)
RegisterMCDisassembler - Register a MCDisassembler implementation for the given target.