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())
906bool ARMDisassembler::isVectorPredicable(
const MCInst &
MI)
const {
920ARMDisassembler::AddThumbPredicate(
MCInst &
MI)
const {
923 const FeatureBitset &FeatureBits = getSubtargetInfo().getFeatureBits();
927 switch (
MI.getOpcode()) {
944 if (ITBlock.instrInITBlock())
950 if (
MI.getOperand(0).getImm() == 0x10 && (FeatureBits[ARM::FeatureRAS]) != 0)
959 if (ITBlock.instrInITBlock() && !ITBlock.instrLastInITBlock())
976 if (ITBlock.instrInITBlock()) {
977 CC = ITBlock.getITCC();
978 ITBlock.advanceITState();
979 }
else if (VPTBlock.instrInVPTBlock()) {
980 VCC = VPTBlock.getVPTPred();
981 VPTBlock.advanceVPTState();
987 for (
unsigned i = 0; i < MCID.
NumOperands; ++i, ++CCI) {
988 if (MCID.
operands()[i].isPredicate() || CCI ==
MI.end())
1005 for (VCCPos = 0; VCCPos < MCID.
NumOperands; ++VCCPos, ++VCCI) {
1023 "Inactive register in vpred_r is not tied to an output!");
1039void ARMDisassembler::UpdateThumbVFPPredicate(
1042 CC = ITBlock.getITCC();
1045 if (ITBlock.instrInITBlock())
1046 ITBlock.advanceITState();
1047 else if (VPTBlock.instrInVPTBlock()) {
1048 CC = VPTBlock.getVPTPred();
1049 VPTBlock.advanceVPTState();
1056 for (
unsigned i = 0; i < NumOps; ++i, ++
I) {
1057 if (OpInfo[i].isPredicate() ) {
1063 I->setReg(ARM::NoRegister);
1065 I->setReg(ARM::CPSR);
1075 CommentStream = &CS;
1077 assert(STI.hasFeature(ARM::ModeThumb) &&
1078 "Asked to disassemble in Thumb mode but Subtarget is in ARM mode!");
1081 if (Bytes.
size() < 2) {
1086 uint16_t Insn16 = llvm::support::endian::read<uint16_t>(
1087 Bytes.
data(), InstructionEndianness);
1089 decodeInstruction(DecoderTableThumb16,
MI, Insn16, Address,
this, STI);
1092 Check(Result, AddThumbPredicate(
MI));
1096 Result = decodeInstruction(DecoderTableThumbSBit16,
MI, Insn16, Address,
this,
1100 bool InITBlock = ITBlock.instrInITBlock();
1101 Check(Result, AddThumbPredicate(
MI));
1102 AddThumb1SBit(
MI, InITBlock);
1107 decodeInstruction(DecoderTableThumb216,
MI, Insn16, Address,
this, STI);
1113 if (
MI.getOpcode() == ARM::t2IT && ITBlock.instrInITBlock())
1116 Check(Result, AddThumbPredicate(
MI));
1121 if (
MI.getOpcode() == ARM::t2IT) {
1122 unsigned Firstcond =
MI.getOperand(0).getImm();
1123 unsigned Mask =
MI.getOperand(1).getImm();
1124 ITBlock.setITState(Firstcond, Mask);
1128 CS <<
"unpredictable IT predicate sequence";
1135 if (Bytes.
size() < 4) {
1141 (
uint32_t(Insn16) << 16) | llvm::support::endian::read<uint16_t>(
1142 Bytes.
data() + 2, InstructionEndianness);
1145 decodeInstruction(DecoderTableMVE32,
MI, Insn32, Address,
this, STI);
1151 if (
isVPTOpcode(
MI.getOpcode()) && VPTBlock.instrInVPTBlock())
1154 Check(Result, AddThumbPredicate(
MI));
1157 unsigned Mask =
MI.getOperand(0).getImm();
1158 VPTBlock.setVPTState(Mask);
1165 decodeInstruction(DecoderTableThumb32,
MI, Insn32, Address,
this, STI);
1168 bool InITBlock = ITBlock.instrInITBlock();
1169 Check(Result, AddThumbPredicate(
MI));
1170 AddThumb1SBit(
MI, InITBlock);
1175 decodeInstruction(DecoderTableThumb232,
MI, Insn32, Address,
this, STI);
1178 Check(Result, AddThumbPredicate(
MI));
1182 if (fieldFromInstruction(Insn32, 28, 4) == 0xE) {
1184 decodeInstruction(DecoderTableVFP32,
MI, Insn32, Address,
this, STI);
1187 UpdateThumbVFPPredicate(Result,
MI);
1193 decodeInstruction(DecoderTableVFPV832,
MI, Insn32, Address,
this, STI);
1199 if (fieldFromInstruction(Insn32, 28, 4) == 0xE) {
1200 Result = decodeInstruction(DecoderTableNEONDup32,
MI, Insn32, Address,
this,
1204 Check(Result, AddThumbPredicate(
MI));
1209 if (fieldFromInstruction(Insn32, 24, 8) == 0xF9) {
1211 NEONLdStInsn &= 0xF0FFFFFF;
1212 NEONLdStInsn |= 0x04000000;
1213 Result = decodeInstruction(DecoderTableNEONLoadStore32,
MI, NEONLdStInsn,
1214 Address,
this, STI);
1217 Check(Result, AddThumbPredicate(
MI));
1222 if (fieldFromInstruction(Insn32, 24, 4) == 0xF) {
1224 NEONDataInsn &= 0xF0FFFFFF;
1225 NEONDataInsn |= (NEONDataInsn & 0x10000000) >> 4;
1226 NEONDataInsn |= 0x12000000;
1227 Result = decodeInstruction(DecoderTableNEONData32,
MI, NEONDataInsn,
1228 Address,
this, STI);
1231 Check(Result, AddThumbPredicate(
MI));
1236 NEONCryptoInsn &= 0xF0FFFFFF;
1237 NEONCryptoInsn |= (NEONCryptoInsn & 0x10000000) >> 4;
1238 NEONCryptoInsn |= 0x12000000;
1239 Result = decodeInstruction(DecoderTablev8Crypto32,
MI, NEONCryptoInsn,
1240 Address,
this, STI);
1247 NEONv8Insn &= 0xF3FFFFFF;
1248 Result = decodeInstruction(DecoderTablev8NEON32,
MI, NEONv8Insn, Address,
1256 uint32_t Coproc = fieldFromInstruction(Insn32, 8, 4);
1258 ? DecoderTableThumb2CDE32
1259 : DecoderTableThumb2CoProc32;
1261 decodeInstruction(DecoderTable,
MI, Insn32, Address,
this, STI);
1264 Check(Result, AddThumbPredicate(
MI));
1284 ARM::R0, ARM::R1, ARM::R2, ARM::R3,
1285 ARM::R4, ARM::R5, ARM::R6, ARM::R7,
1286 ARM::R8, ARM::R9, ARM::R10, ARM::R11,
1287 ARM::R12, ARM::SP, ARM::LR, ARM::PC
1291 ARM::R0, ARM::R1, ARM::R2, ARM::R3,
1292 ARM::R4, ARM::R5, ARM::R6, ARM::R7,
1293 ARM::R8, ARM::R9, ARM::R10, ARM::R11,
1294 ARM::R12, 0, ARM::LR, ARM::APSR
1400 ARM::R0_R1, ARM::R2_R3, ARM::R4_R5, ARM::R6_R7,
1401 ARM::R8_R9, ARM::R10_R11, ARM::R12_SP
1431 if ((RegNo & 1) || RegNo > 10)
1484 ((
const MCDisassembler*)Decoder)->getSubtargetInfo().getFeatureBits();
1486 if ((RegNo == 13 && !featureBits[ARM::HasV8Ops]) || RegNo == 15)
1494 ARM::S0, ARM::S1, ARM::S2, ARM::S3,
1495 ARM::S4, ARM::S5, ARM::S6, ARM::S7,
1496 ARM::S8, ARM::S9, ARM::S10, ARM::S11,
1497 ARM::S12, ARM::S13, ARM::S14, ARM::S15,
1498 ARM::S16, ARM::S17, ARM::S18, ARM::S19,
1499 ARM::S20, ARM::S21, ARM::S22, ARM::S23,
1500 ARM::S24, ARM::S25, ARM::S26, ARM::S27,
1501 ARM::S28, ARM::S29, ARM::S30, ARM::S31
1522 ARM::D0, ARM::D1, ARM::D2, ARM::D3,
1523 ARM::D4, ARM::D5, ARM::D6, ARM::D7,
1524 ARM::D8, ARM::D9, ARM::D10, ARM::D11,
1525 ARM::D12, ARM::D13, ARM::D14, ARM::D15,
1526 ARM::D16, ARM::D17, ARM::D18, ARM::D19,
1527 ARM::D20, ARM::D21, ARM::D22, ARM::D23,
1528 ARM::D24, ARM::D25, ARM::D26, ARM::D27,
1529 ARM::D28, ARM::D29, ARM::D30, ARM::D31
1537 ((
const MCDisassembler*)Decoder)->getSubtargetInfo().getFeatureBits();
1538 return featureBits[ARM::FeatureD32];
1544 if (RegNo > (
PermitsD32(Inst, Decoder) ? 31u : 15u))
1577 ARM::Q0, ARM::Q1, ARM::Q2, ARM::Q3,
1578 ARM::Q4, ARM::Q5, ARM::Q6, ARM::Q7,
1579 ARM::Q8, ARM::Q9, ARM::Q10, ARM::Q11,
1580 ARM::Q12, ARM::Q13, ARM::Q14, ARM::Q15
1586 if (RegNo > 31 || (RegNo & 1) != 0)
1596 ARM::Q0, ARM::D1_D2, ARM::Q1, ARM::D3_D4, ARM::Q2, ARM::D5_D6,
1597 ARM::Q3, ARM::D7_D8, ARM::Q4, ARM::D9_D10, ARM::Q5, ARM::D11_D12,
1598 ARM::Q6, ARM::D13_D14, ARM::Q7, ARM::D15_D16, ARM::Q8, ARM::D17_D18,
1599 ARM::Q9, ARM::D19_D20, ARM::Q10, ARM::D21_D22, ARM::Q11, ARM::D23_D24,
1600 ARM::Q12, ARM::D25_D26, ARM::Q13, ARM::D27_D28, ARM::Q14, ARM::D29_D30,
1616 ARM::D0_D2, ARM::D1_D3, ARM::D2_D4, ARM::D3_D5,
1617 ARM::D4_D6, ARM::D5_D7, ARM::D6_D8, ARM::D7_D9,
1618 ARM::D8_D10, ARM::D9_D11, ARM::D10_D12, ARM::D11_D13,
1619 ARM::D12_D14, ARM::D13_D15, ARM::D14_D16, ARM::D15_D17,
1620 ARM::D16_D18, ARM::D17_D19, ARM::D18_D20, ARM::D19_D21,
1621 ARM::D20_D22, ARM::D21_D23, ARM::D22_D24, ARM::D23_D25,
1622 ARM::D24_D26, ARM::D25_D27, ARM::D26_D28, ARM::D27_D29,
1623 ARM::D28_D30, ARM::D29_D31
1643 if (Inst.
getOpcode() == ARM::tBcc && Val == 0xE)
1646 static_cast<const ARMDisassembler *
>(Decoder)->MCII.
get();
1672 unsigned Rm = fieldFromInstruction(Val, 0, 4);
1673 unsigned type = fieldFromInstruction(Val, 5, 2);
1674 unsigned imm = fieldFromInstruction(Val, 7, 5);
1699 unsigned Op = Shift | (imm << 3);
1710 unsigned Rm = fieldFromInstruction(Val, 0, 4);
1711 unsigned type = fieldFromInstruction(Val, 5, 2);
1712 unsigned Rs = fieldFromInstruction(Val, 8, 4);
1746 bool NeedDisjointWriteback =
false;
1752 case ARM::LDMIA_UPD:
1753 case ARM::LDMDB_UPD:
1754 case ARM::LDMIB_UPD:
1755 case ARM::LDMDA_UPD:
1756 case ARM::t2LDMIA_UPD:
1757 case ARM::t2LDMDB_UPD:
1758 case ARM::t2STMIA_UPD:
1759 case ARM::t2STMDB_UPD:
1760 NeedDisjointWriteback =
true;
1770 for (
unsigned i = 0; i < 16; ++i) {
1771 if (Val & (1 << i)) {
1780 if (NeedDisjointWriteback && WritebackReg == Inst.
end()[-1].getReg())
1794 unsigned Vd = fieldFromInstruction(Val, 8, 5);
1795 unsigned regs = fieldFromInstruction(Val, 0, 8);
1798 if (regs == 0 || (Vd + regs) > 32) {
1799 regs = Vd + regs > 32 ? 32 - Vd : regs;
1800 regs = std::max( 1u, regs);
1806 for (
unsigned i = 0; i < (regs - 1); ++i) {
1819 unsigned Vd = fieldFromInstruction(Val, 8, 5);
1820 unsigned regs = fieldFromInstruction(Val, 1, 7);
1823 unsigned MaxReg =
PermitsD32(Inst, Decoder) ? 32 : 16;
1824 if (regs == 0 || (Vd + regs) > MaxReg) {
1825 regs = Vd + regs > MaxReg ? MaxReg - Vd : regs;
1826 regs = std::max( 1u, regs);
1827 regs = std::min(MaxReg, regs);
1833 for (
unsigned i = 0; i < (regs - 1); ++i) {
1849 unsigned msb = fieldFromInstruction(Val, 5, 5);
1850 unsigned lsb = fieldFromInstruction(Val, 0, 5);
1862 if (msb != 31) msb_mask = (1U << (msb+1)) - 1;
1863 uint32_t lsb_mask = (1U << lsb) - 1;
1874 unsigned pred = fieldFromInstruction(
Insn, 28, 4);
1875 unsigned CRd = fieldFromInstruction(
Insn, 12, 4);
1876 unsigned coproc = fieldFromInstruction(
Insn, 8, 4);
1877 unsigned imm = fieldFromInstruction(
Insn, 0, 8);
1878 unsigned Rn = fieldFromInstruction(
Insn, 16, 4);
1879 unsigned U = fieldFromInstruction(
Insn, 23, 1);
1881 ((
const MCDisassembler*)Decoder)->getSubtargetInfo().getFeatureBits();
1884 case ARM::LDC_OFFSET:
1887 case ARM::LDC_OPTION:
1888 case ARM::LDCL_OFFSET:
1890 case ARM::LDCL_POST:
1891 case ARM::LDCL_OPTION:
1892 case ARM::STC_OFFSET:
1895 case ARM::STC_OPTION:
1896 case ARM::STCL_OFFSET:
1898 case ARM::STCL_POST:
1899 case ARM::STCL_OPTION:
1900 case ARM::t2LDC_OFFSET:
1901 case ARM::t2LDC_PRE:
1902 case ARM::t2LDC_POST:
1903 case ARM::t2LDC_OPTION:
1904 case ARM::t2LDCL_OFFSET:
1905 case ARM::t2LDCL_PRE:
1906 case ARM::t2LDCL_POST:
1907 case ARM::t2LDCL_OPTION:
1908 case ARM::t2STC_OFFSET:
1909 case ARM::t2STC_PRE:
1910 case ARM::t2STC_POST:
1911 case ARM::t2STC_OPTION:
1912 case ARM::t2STCL_OFFSET:
1913 case ARM::t2STCL_PRE:
1914 case ARM::t2STCL_POST:
1915 case ARM::t2STCL_OPTION:
1916 case ARM::t2LDC2_OFFSET:
1917 case ARM::t2LDC2L_OFFSET:
1918 case ARM::t2LDC2_PRE:
1919 case ARM::t2LDC2L_PRE:
1920 case ARM::t2STC2_OFFSET:
1921 case ARM::t2STC2L_OFFSET:
1922 case ARM::t2STC2_PRE:
1923 case ARM::t2STC2L_PRE:
1924 case ARM::LDC2_OFFSET:
1925 case ARM::LDC2L_OFFSET:
1927 case ARM::LDC2L_PRE:
1928 case ARM::STC2_OFFSET:
1929 case ARM::STC2L_OFFSET:
1931 case ARM::STC2L_PRE:
1932 case ARM::t2LDC2_OPTION:
1933 case ARM::t2STC2_OPTION:
1934 case ARM::t2LDC2_POST:
1935 case ARM::t2LDC2L_POST:
1936 case ARM::t2STC2_POST:
1937 case ARM::t2STC2L_POST:
1938 case ARM::LDC2_POST:
1939 case ARM::LDC2L_POST:
1940 case ARM::STC2_POST:
1941 case ARM::STC2L_POST:
1942 if (coproc == 0xA || coproc == 0xB ||
1943 (featureBits[ARM::HasV8_1MMainlineOps] &&
1944 (coproc == 0x8 || coproc == 0x9 || coproc == 0xA || coproc == 0xB ||
1945 coproc == 0xE || coproc == 0xF)))
1952 if (featureBits[ARM::HasV8Ops] && (coproc != 14))
1961 case ARM::t2LDC2_OFFSET:
1962 case ARM::t2LDC2L_OFFSET:
1963 case ARM::t2LDC2_PRE:
1964 case ARM::t2LDC2L_PRE:
1965 case ARM::t2STC2_OFFSET:
1966 case ARM::t2STC2L_OFFSET:
1967 case ARM::t2STC2_PRE:
1968 case ARM::t2STC2L_PRE:
1969 case ARM::LDC2_OFFSET:
1970 case ARM::LDC2L_OFFSET:
1972 case ARM::LDC2L_PRE:
1973 case ARM::STC2_OFFSET:
1974 case ARM::STC2L_OFFSET:
1976 case ARM::STC2L_PRE:
1977 case ARM::t2LDC_OFFSET:
1978 case ARM::t2LDCL_OFFSET:
1979 case ARM::t2LDC_PRE:
1980 case ARM::t2LDCL_PRE:
1981 case ARM::t2STC_OFFSET:
1982 case ARM::t2STCL_OFFSET:
1983 case ARM::t2STC_PRE:
1984 case ARM::t2STCL_PRE:
1985 case ARM::LDC_OFFSET:
1986 case ARM::LDCL_OFFSET:
1989 case ARM::STC_OFFSET:
1990 case ARM::STCL_OFFSET:
1996 case ARM::t2LDC2_POST:
1997 case ARM::t2LDC2L_POST:
1998 case ARM::t2STC2_POST:
1999 case ARM::t2STC2L_POST:
2000 case ARM::LDC2_POST:
2001 case ARM::LDC2L_POST:
2002 case ARM::STC2_POST:
2003 case ARM::STC2L_POST:
2004 case ARM::t2LDC_POST:
2005 case ARM::t2LDCL_POST:
2006 case ARM::t2STC_POST:
2007 case ARM::t2STCL_POST:
2009 case ARM::LDCL_POST:
2011 case ARM::STCL_POST:
2022 case ARM::LDC_OFFSET:
2025 case ARM::LDC_OPTION:
2026 case ARM::LDCL_OFFSET:
2028 case ARM::LDCL_POST:
2029 case ARM::LDCL_OPTION:
2030 case ARM::STC_OFFSET:
2033 case ARM::STC_OPTION:
2034 case ARM::STCL_OFFSET:
2036 case ARM::STCL_POST:
2037 case ARM::STCL_OPTION:
2053 unsigned Rn = fieldFromInstruction(
Insn, 16, 4);
2054 unsigned Rt = fieldFromInstruction(
Insn, 12, 4);
2055 unsigned Rm = fieldFromInstruction(
Insn, 0, 4);
2056 unsigned imm = fieldFromInstruction(
Insn, 0, 12);
2057 unsigned pred = fieldFromInstruction(
Insn, 28, 4);
2058 unsigned reg = fieldFromInstruction(
Insn, 25, 1);
2059 unsigned P = fieldFromInstruction(
Insn, 24, 1);
2060 unsigned W = fieldFromInstruction(
Insn, 21, 1);
2064 case ARM::STR_POST_IMM:
2065 case ARM::STR_POST_REG:
2066 case ARM::STRB_POST_IMM:
2067 case ARM::STRB_POST_REG:
2068 case ARM::STRT_POST_REG:
2069 case ARM::STRT_POST_IMM:
2070 case ARM::STRBT_POST_REG:
2071 case ARM::STRBT_POST_IMM:
2084 case ARM::LDR_POST_IMM:
2085 case ARM::LDR_POST_REG:
2086 case ARM::LDRB_POST_IMM:
2087 case ARM::LDRB_POST_REG:
2088 case ARM::LDRBT_POST_REG:
2089 case ARM::LDRBT_POST_IMM:
2090 case ARM::LDRT_POST_REG:
2091 case ARM::LDRT_POST_IMM:
2103 if (!fieldFromInstruction(
Insn, 23, 1))
2106 bool writeback = (
P == 0) || (W == 1);
2107 unsigned idx_mode = 0;
2110 else if (!
P && writeback)
2113 if (writeback && (Rn == 15 || Rn == Rt))
2120 switch( fieldFromInstruction(
Insn, 5, 2)) {
2136 unsigned amt = fieldFromInstruction(
Insn, 7, 5);
2159 unsigned Rn = fieldFromInstruction(Val, 13, 4);
2160 unsigned Rm = fieldFromInstruction(Val, 0, 4);
2161 unsigned type = fieldFromInstruction(Val, 5, 2);
2162 unsigned imm = fieldFromInstruction(Val, 7, 5);
2163 unsigned U = fieldFromInstruction(Val, 12, 1);
2216 unsigned Rt = fieldFromInstruction(
Insn, 12, 4);
2217 unsigned Rn = fieldFromInstruction(
Insn, 16, 4);
2218 unsigned Rm = fieldFromInstruction(
Insn, 0, 4);
2219 unsigned type = fieldFromInstruction(
Insn, 22, 1);
2220 unsigned imm = fieldFromInstruction(
Insn, 8, 4);
2221 unsigned U = ((~fieldFromInstruction(
Insn, 23, 1)) & 1) << 8;
2222 unsigned pred = fieldFromInstruction(
Insn, 28, 4);
2223 unsigned W = fieldFromInstruction(
Insn, 21, 1);
2224 unsigned P = fieldFromInstruction(
Insn, 24, 1);
2225 unsigned Rt2 = Rt + 1;
2227 bool writeback = (W == 1) | (
P == 0);
2233 case ARM::STRD_POST:
2236 case ARM::LDRD_POST:
2245 case ARM::STRD_POST:
2246 if (
P == 0 && W == 1)
2249 if (writeback && (Rn == 15 || Rn == Rt || Rn == Rt2))
2251 if (type && Rm == 15)
2255 if (!type && fieldFromInstruction(
Insn, 8, 4))
2260 case ARM::STRH_POST:
2263 if (writeback && (Rn == 15 || Rn == Rt))
2265 if (!type && Rm == 15)
2270 case ARM::LDRD_POST:
2271 if (type && Rn == 15) {
2276 if (
P == 0 && W == 1)
2278 if (!type && (Rt2 == 15 || Rm == 15 || Rm == Rt || Rm == Rt2))
2280 if (!type && writeback && Rn == 15)
2282 if (writeback && (Rn == Rt || Rn == Rt2))
2287 case ARM::LDRH_POST:
2288 if (type && Rn == 15) {
2295 if (!type && Rm == 15)
2297 if (!type && writeback && (Rn == 15 || Rn == Rt))
2301 case ARM::LDRSH_PRE:
2302 case ARM::LDRSH_POST:
2304 case ARM::LDRSB_PRE:
2305 case ARM::LDRSB_POST:
2306 if (type && Rn == 15) {
2311 if (type && (Rt == 15 || (writeback && Rn == Rt)))
2313 if (!type && (Rt == 15 || Rm == 15))
2315 if (!type && writeback && (Rn == 15 || Rn == Rt))
2332 case ARM::STRD_POST:
2335 case ARM::STRH_POST:
2349 case ARM::STRD_POST:
2352 case ARM::LDRD_POST:
2365 case ARM::LDRD_POST:
2368 case ARM::LDRH_POST:
2370 case ARM::LDRSH_PRE:
2371 case ARM::LDRSH_POST:
2373 case ARM::LDRSB_PRE:
2374 case ARM::LDRSB_POST:
2408 unsigned Rn = fieldFromInstruction(
Insn, 16, 4);
2409 unsigned mode = fieldFromInstruction(
Insn, 23, 2);
2438 unsigned Rd = fieldFromInstruction(
Insn, 12, 4);
2439 unsigned Rm = fieldFromInstruction(
Insn, 0, 4);
2440 unsigned Rn = fieldFromInstruction(
Insn, 16, 4);
2441 unsigned pred = fieldFromInstruction(
Insn, 28, 4);
2463 unsigned Rn = fieldFromInstruction(
Insn, 16, 4);
2464 unsigned pred = fieldFromInstruction(
Insn, 28, 4);
2465 unsigned reglist = fieldFromInstruction(
Insn, 0, 16);
2473 case ARM::LDMDA_UPD:
2479 case ARM::LDMDB_UPD:
2485 case ARM::LDMIA_UPD:
2491 case ARM::LDMIB_UPD:
2497 case ARM::STMDA_UPD:
2503 case ARM::STMDB_UPD:
2509 case ARM::STMIA_UPD:
2515 case ARM::STMIB_UPD:
2523 if (fieldFromInstruction(
Insn, 20, 1) == 0) {
2525 if (!(fieldFromInstruction(
Insn, 22, 1) == 1 &&
2526 fieldFromInstruction(
Insn, 20, 1) == 0))
2553 unsigned pred = fieldFromInstruction(
Insn, 28, 4);
2554 unsigned imm8 = fieldFromInstruction(
Insn, 0, 8);
2567 if (imm8 == 0x10 &&
pred != 0xe && ((FeatureBits[ARM::FeatureRAS]) != 0))
2576 unsigned imod = fieldFromInstruction(
Insn, 18, 2);
2577 unsigned M = fieldFromInstruction(
Insn, 17, 1);
2578 unsigned iflags = fieldFromInstruction(
Insn, 6, 3);
2579 unsigned mode = fieldFromInstruction(
Insn, 0, 5);
2585 if (fieldFromInstruction(
Insn, 5, 1) != 0 ||
2586 fieldFromInstruction(
Insn, 16, 1) != 0 ||
2587 fieldFromInstruction(
Insn, 20, 8) != 0x10)
2602 }
else if (imod && !M) {
2607 }
else if (!imod && M) {
2624 unsigned imod = fieldFromInstruction(
Insn, 9, 2);
2625 unsigned M = fieldFromInstruction(
Insn, 8, 1);
2626 unsigned iflags = fieldFromInstruction(
Insn, 5, 3);
2627 unsigned mode = fieldFromInstruction(
Insn, 0, 5);
2643 }
else if (imod && !M) {
2648 }
else if (!imod && M) {
2654 int imm = fieldFromInstruction(
Insn, 0, 8);
2667 unsigned imm = fieldFromInstruction(
Insn, 0, 8);
2669 unsigned Opcode = ARM::t2HINT;
2672 Opcode = ARM::t2PACBTI;
2673 }
else if (imm == 0x1D) {
2674 Opcode = ARM::t2PAC;
2675 }
else if (imm == 0x2D) {
2676 Opcode = ARM::t2AUT;
2677 }
else if (imm == 0x0F) {
2678 Opcode = ARM::t2BTI;
2682 if (Opcode == ARM::t2HINT) {
2694 unsigned Rd = fieldFromInstruction(
Insn, 8, 4);
2697 imm |= (fieldFromInstruction(
Insn, 0, 8) << 0);
2698 imm |= (fieldFromInstruction(
Insn, 12, 3) << 8);
2699 imm |= (fieldFromInstruction(
Insn, 16, 4) << 12);
2700 imm |= (fieldFromInstruction(
Insn, 26, 1) << 11);
2719 unsigned Rd = fieldFromInstruction(
Insn, 12, 4);
2720 unsigned pred = fieldFromInstruction(
Insn, 28, 4);
2723 imm |= (fieldFromInstruction(
Insn, 0, 12) << 0);
2724 imm |= (fieldFromInstruction(
Insn, 16, 4) << 12);
2747 unsigned Rd = fieldFromInstruction(
Insn, 16, 4);
2748 unsigned Rn = fieldFromInstruction(
Insn, 0, 4);
2749 unsigned Rm = fieldFromInstruction(
Insn, 8, 4);
2750 unsigned Ra = fieldFromInstruction(
Insn, 12, 4);
2751 unsigned pred = fieldFromInstruction(
Insn, 28, 4);
2776 unsigned Pred = fieldFromInstruction(
Insn, 28, 4);
2777 unsigned Rn = fieldFromInstruction(
Insn, 16, 4);
2778 unsigned Rm = fieldFromInstruction(
Insn, 0, 4);
2798 unsigned Imm = fieldFromInstruction(
Insn, 9, 1);
2803 if (!FeatureBits[ARM::HasV8_1aOps] ||
2804 !FeatureBits[ARM::HasV8Ops])
2809 if (fieldFromInstruction(
Insn, 20,12) != 0xf11 ||
2810 fieldFromInstruction(
Insn, 4,4) != 0)
2812 if (fieldFromInstruction(
Insn, 10,10) != 0 ||
2813 fieldFromInstruction(
Insn, 0,4) != 0)
2827 unsigned add = fieldFromInstruction(Val, 12, 1);
2828 unsigned imm = fieldFromInstruction(Val, 0, 12);
2829 unsigned Rn = fieldFromInstruction(Val, 13, 4);
2834 if (!add) imm *= -1;
2835 if (imm == 0 && !add) imm = INT32_MIN;
2848 unsigned Rn = fieldFromInstruction(Val, 9, 4);
2850 unsigned U = fieldFromInstruction(Val, 8, 1);
2851 unsigned imm = fieldFromInstruction(Val, 0, 8);
2869 unsigned Rn = fieldFromInstruction(Val, 9, 4);
2871 unsigned U = fieldFromInstruction(Val, 8, 1);
2872 unsigned imm = fieldFromInstruction(Val, 0, 8);
2902 unsigned S = fieldFromInstruction(
Insn, 26, 1);
2903 unsigned J1 = fieldFromInstruction(
Insn, 13, 1);
2904 unsigned J2 = fieldFromInstruction(
Insn, 11, 1);
2905 unsigned I1 = !(J1 ^ S);
2906 unsigned I2 = !(J2 ^ S);
2907 unsigned imm10 = fieldFromInstruction(
Insn, 16, 10);
2908 unsigned imm11 = fieldFromInstruction(
Insn, 0, 11);
2909 unsigned tmp = (S << 23) | (I1 << 22) | (I2 << 21) | (imm10 << 11) | imm11;
2910 int imm32 = SignExtend32<25>(tmp << 1);
2912 true, 4, Inst, Decoder))
2923 unsigned pred = fieldFromInstruction(
Insn, 28, 4);
2924 unsigned imm = fieldFromInstruction(
Insn, 0, 24) << 2;
2928 imm |= fieldFromInstruction(
Insn, 24, 1) << 1;
2930 true, 4, Inst, Decoder))
2936 true, 4, Inst, Decoder))
2953 unsigned Rm = fieldFromInstruction(Val, 0, 4);
2954 unsigned align = fieldFromInstruction(Val, 4, 2);
2971 unsigned Rd = fieldFromInstruction(
Insn, 12, 4);
2972 Rd |= fieldFromInstruction(
Insn, 22, 1) << 4;
2973 unsigned wb = fieldFromInstruction(
Insn, 16, 4);
2974 unsigned Rn = fieldFromInstruction(
Insn, 16, 4);
2975 Rn |= fieldFromInstruction(
Insn, 4, 2) << 4;
2976 unsigned Rm = fieldFromInstruction(
Insn, 0, 4);
2980 case ARM::VLD1q16:
case ARM::VLD1q32:
case ARM::VLD1q64:
case ARM::VLD1q8:
2981 case ARM::VLD1q16wb_fixed:
case ARM::VLD1q16wb_register:
2982 case ARM::VLD1q32wb_fixed:
case ARM::VLD1q32wb_register:
2983 case ARM::VLD1q64wb_fixed:
case ARM::VLD1q64wb_register:
2984 case ARM::VLD1q8wb_fixed:
case ARM::VLD1q8wb_register:
2985 case ARM::VLD2d16:
case ARM::VLD2d32:
case ARM::VLD2d8:
2986 case ARM::VLD2d16wb_fixed:
case ARM::VLD2d16wb_register:
2987 case ARM::VLD2d32wb_fixed:
case ARM::VLD2d32wb_register:
2988 case ARM::VLD2d8wb_fixed:
case ARM::VLD2d8wb_register:
2995 case ARM::VLD2b16wb_fixed:
2996 case ARM::VLD2b16wb_register:
2997 case ARM::VLD2b32wb_fixed:
2998 case ARM::VLD2b32wb_register:
2999 case ARM::VLD2b8wb_fixed:
3000 case ARM::VLD2b8wb_register:
3014 case ARM::VLD3d8_UPD:
3015 case ARM::VLD3d16_UPD:
3016 case ARM::VLD3d32_UPD:
3020 case ARM::VLD4d8_UPD:
3021 case ARM::VLD4d16_UPD:
3022 case ARM::VLD4d32_UPD:
3029 case ARM::VLD3q8_UPD:
3030 case ARM::VLD3q16_UPD:
3031 case ARM::VLD3q32_UPD:
3035 case ARM::VLD4q8_UPD:
3036 case ARM::VLD4q16_UPD:
3037 case ARM::VLD4q32_UPD:
3050 case ARM::VLD3d8_UPD:
3051 case ARM::VLD3d16_UPD:
3052 case ARM::VLD3d32_UPD:
3056 case ARM::VLD4d8_UPD:
3057 case ARM::VLD4d16_UPD:
3058 case ARM::VLD4d32_UPD:
3065 case ARM::VLD3q8_UPD:
3066 case ARM::VLD3q16_UPD:
3067 case ARM::VLD3q32_UPD:
3071 case ARM::VLD4q8_UPD:
3072 case ARM::VLD4q16_UPD:
3073 case ARM::VLD4q32_UPD:
3086 case ARM::VLD4d8_UPD:
3087 case ARM::VLD4d16_UPD:
3088 case ARM::VLD4d32_UPD:
3095 case ARM::VLD4q8_UPD:
3096 case ARM::VLD4q16_UPD:
3097 case ARM::VLD4q32_UPD:
3107 case ARM::VLD1d8wb_fixed:
3108 case ARM::VLD1d16wb_fixed:
3109 case ARM::VLD1d32wb_fixed:
3110 case ARM::VLD1d64wb_fixed:
3111 case ARM::VLD1d8wb_register:
3112 case ARM::VLD1d16wb_register:
3113 case ARM::VLD1d32wb_register:
3114 case ARM::VLD1d64wb_register:
3115 case ARM::VLD1q8wb_fixed:
3116 case ARM::VLD1q16wb_fixed:
3117 case ARM::VLD1q32wb_fixed:
3118 case ARM::VLD1q64wb_fixed:
3119 case ARM::VLD1q8wb_register:
3120 case ARM::VLD1q16wb_register:
3121 case ARM::VLD1q32wb_register:
3122 case ARM::VLD1q64wb_register:
3123 case ARM::VLD1d8Twb_fixed:
3124 case ARM::VLD1d8Twb_register:
3125 case ARM::VLD1d16Twb_fixed:
3126 case ARM::VLD1d16Twb_register:
3127 case ARM::VLD1d32Twb_fixed:
3128 case ARM::VLD1d32Twb_register:
3129 case ARM::VLD1d64Twb_fixed:
3130 case ARM::VLD1d64Twb_register:
3131 case ARM::VLD1d8Qwb_fixed:
3132 case ARM::VLD1d8Qwb_register:
3133 case ARM::VLD1d16Qwb_fixed:
3134 case ARM::VLD1d16Qwb_register:
3135 case ARM::VLD1d32Qwb_fixed:
3136 case ARM::VLD1d32Qwb_register:
3137 case ARM::VLD1d64Qwb_fixed:
3138 case ARM::VLD1d64Qwb_register:
3139 case ARM::VLD2d8wb_fixed:
3140 case ARM::VLD2d16wb_fixed:
3141 case ARM::VLD2d32wb_fixed:
3142 case ARM::VLD2q8wb_fixed:
3143 case ARM::VLD2q16wb_fixed:
3144 case ARM::VLD2q32wb_fixed:
3145 case ARM::VLD2d8wb_register:
3146 case ARM::VLD2d16wb_register:
3147 case ARM::VLD2d32wb_register:
3148 case ARM::VLD2q8wb_register:
3149 case ARM::VLD2q16wb_register:
3150 case ARM::VLD2q32wb_register:
3151 case ARM::VLD2b8wb_fixed:
3152 case ARM::VLD2b16wb_fixed:
3153 case ARM::VLD2b32wb_fixed:
3154 case ARM::VLD2b8wb_register:
3155 case ARM::VLD2b16wb_register:
3156 case ARM::VLD2b32wb_register:
3159 case ARM::VLD3d8_UPD:
3160 case ARM::VLD3d16_UPD:
3161 case ARM::VLD3d32_UPD:
3162 case ARM::VLD3q8_UPD:
3163 case ARM::VLD3q16_UPD:
3164 case ARM::VLD3q32_UPD:
3165 case ARM::VLD4d8_UPD:
3166 case ARM::VLD4d16_UPD:
3167 case ARM::VLD4d32_UPD:
3168 case ARM::VLD4q8_UPD:
3169 case ARM::VLD4q16_UPD:
3170 case ARM::VLD4q32_UPD:
3197 case ARM::VLD1d8wb_fixed:
3198 case ARM::VLD1d16wb_fixed:
3199 case ARM::VLD1d32wb_fixed:
3200 case ARM::VLD1d64wb_fixed:
3201 case ARM::VLD1d8Twb_fixed:
3202 case ARM::VLD1d16Twb_fixed:
3203 case ARM::VLD1d32Twb_fixed:
3204 case ARM::VLD1d64Twb_fixed:
3205 case ARM::VLD1d8Qwb_fixed:
3206 case ARM::VLD1d16Qwb_fixed:
3207 case ARM::VLD1d32Qwb_fixed:
3208 case ARM::VLD1d64Qwb_fixed:
3209 case ARM::VLD1d8wb_register:
3210 case ARM::VLD1d16wb_register:
3211 case ARM::VLD1d32wb_register:
3212 case ARM::VLD1d64wb_register:
3213 case ARM::VLD1q8wb_fixed:
3214 case ARM::VLD1q16wb_fixed:
3215 case ARM::VLD1q32wb_fixed:
3216 case ARM::VLD1q64wb_fixed:
3217 case ARM::VLD1q8wb_register:
3218 case ARM::VLD1q16wb_register:
3219 case ARM::VLD1q32wb_register:
3220 case ARM::VLD1q64wb_register:
3224 if (Rm != 0xD && Rm != 0xF &&
3228 case ARM::VLD2d8wb_fixed:
3229 case ARM::VLD2d16wb_fixed:
3230 case ARM::VLD2d32wb_fixed:
3231 case ARM::VLD2b8wb_fixed:
3232 case ARM::VLD2b16wb_fixed:
3233 case ARM::VLD2b32wb_fixed:
3234 case ARM::VLD2q8wb_fixed:
3235 case ARM::VLD2q16wb_fixed:
3236 case ARM::VLD2q32wb_fixed:
3246 unsigned type = fieldFromInstruction(
Insn, 8, 4);
3247 unsigned align = fieldFromInstruction(
Insn, 4, 2);
3252 unsigned load = fieldFromInstruction(
Insn, 21, 1);
3260 unsigned size = fieldFromInstruction(
Insn, 6, 2);
3263 unsigned type = fieldFromInstruction(
Insn, 8, 4);
3264 unsigned align = fieldFromInstruction(
Insn, 4, 2);
3268 unsigned load = fieldFromInstruction(
Insn, 21, 1);
3276 unsigned size = fieldFromInstruction(
Insn, 6, 2);
3279 unsigned align = fieldFromInstruction(
Insn, 4, 2);
3282 unsigned load = fieldFromInstruction(
Insn, 21, 1);
3290 unsigned size = fieldFromInstruction(
Insn, 6, 2);
3293 unsigned load = fieldFromInstruction(
Insn, 21, 1);
3303 unsigned Rd = fieldFromInstruction(
Insn, 12, 4);
3304 Rd |= fieldFromInstruction(
Insn, 22, 1) << 4;
3305 unsigned wb = fieldFromInstruction(
Insn, 16, 4);
3306 unsigned Rn = fieldFromInstruction(
Insn, 16, 4);
3307 Rn |= fieldFromInstruction(
Insn, 4, 2) << 4;
3308 unsigned Rm = fieldFromInstruction(
Insn, 0, 4);
3312 case ARM::VST1d8wb_fixed:
3313 case ARM::VST1d16wb_fixed:
3314 case ARM::VST1d32wb_fixed:
3315 case ARM::VST1d64wb_fixed:
3316 case ARM::VST1d8wb_register:
3317 case ARM::VST1d16wb_register:
3318 case ARM::VST1d32wb_register:
3319 case ARM::VST1d64wb_register:
3320 case ARM::VST1q8wb_fixed:
3321 case ARM::VST1q16wb_fixed:
3322 case ARM::VST1q32wb_fixed:
3323 case ARM::VST1q64wb_fixed:
3324 case ARM::VST1q8wb_register:
3325 case ARM::VST1q16wb_register:
3326 case ARM::VST1q32wb_register:
3327 case ARM::VST1q64wb_register:
3328 case ARM::VST1d8Twb_fixed:
3329 case ARM::VST1d16Twb_fixed:
3330 case ARM::VST1d32Twb_fixed:
3331 case ARM::VST1d64Twb_fixed:
3332 case ARM::VST1d8Twb_register:
3333 case ARM::VST1d16Twb_register:
3334 case ARM::VST1d32Twb_register:
3335 case ARM::VST1d64Twb_register:
3336 case ARM::VST1d8Qwb_fixed:
3337 case ARM::VST1d16Qwb_fixed:
3338 case ARM::VST1d32Qwb_fixed:
3339 case ARM::VST1d64Qwb_fixed:
3340 case ARM::VST1d8Qwb_register:
3341 case ARM::VST1d16Qwb_register:
3342 case ARM::VST1d32Qwb_register:
3343 case ARM::VST1d64Qwb_register:
3344 case ARM::VST2d8wb_fixed:
3345 case ARM::VST2d16wb_fixed:
3346 case ARM::VST2d32wb_fixed:
3347 case ARM::VST2d8wb_register:
3348 case ARM::VST2d16wb_register:
3349 case ARM::VST2d32wb_register:
3350 case ARM::VST2q8wb_fixed:
3351 case ARM::VST2q16wb_fixed:
3352 case ARM::VST2q32wb_fixed:
3353 case ARM::VST2q8wb_register:
3354 case ARM::VST2q16wb_register:
3355 case ARM::VST2q32wb_register:
3356 case ARM::VST2b8wb_fixed:
3357 case ARM::VST2b16wb_fixed:
3358 case ARM::VST2b32wb_fixed:
3359 case ARM::VST2b8wb_register:
3360 case ARM::VST2b16wb_register:
3361 case ARM::VST2b32wb_register:
3366 case ARM::VST3d8_UPD:
3367 case ARM::VST3d16_UPD:
3368 case ARM::VST3d32_UPD:
3369 case ARM::VST3q8_UPD:
3370 case ARM::VST3q16_UPD:
3371 case ARM::VST3q32_UPD:
3372 case ARM::VST4d8_UPD:
3373 case ARM::VST4d16_UPD:
3374 case ARM::VST4d32_UPD:
3375 case ARM::VST4q8_UPD:
3376 case ARM::VST4q16_UPD:
3377 case ARM::VST4q32_UPD:
3394 else if (Rm != 0xF) {
3399 case ARM::VST1d8wb_fixed:
3400 case ARM::VST1d16wb_fixed:
3401 case ARM::VST1d32wb_fixed:
3402 case ARM::VST1d64wb_fixed:
3403 case ARM::VST1q8wb_fixed:
3404 case ARM::VST1q16wb_fixed:
3405 case ARM::VST1q32wb_fixed:
3406 case ARM::VST1q64wb_fixed:
3407 case ARM::VST1d8Twb_fixed:
3408 case ARM::VST1d16Twb_fixed:
3409 case ARM::VST1d32Twb_fixed:
3410 case ARM::VST1d64Twb_fixed:
3411 case ARM::VST1d8Qwb_fixed:
3412 case ARM::VST1d16Qwb_fixed:
3413 case ARM::VST1d32Qwb_fixed:
3414 case ARM::VST1d64Qwb_fixed:
3415 case ARM::VST2d8wb_fixed:
3416 case ARM::VST2d16wb_fixed:
3417 case ARM::VST2d32wb_fixed:
3418 case ARM::VST2q8wb_fixed:
3419 case ARM::VST2q16wb_fixed:
3420 case ARM::VST2q32wb_fixed:
3421 case ARM::VST2b8wb_fixed:
3422 case ARM::VST2b16wb_fixed:
3423 case ARM::VST2b32wb_fixed:
3433 case ARM::VST1q16wb_fixed:
3434 case ARM::VST1q16wb_register:
3435 case ARM::VST1q32wb_fixed:
3436 case ARM::VST1q32wb_register:
3437 case ARM::VST1q64wb_fixed:
3438 case ARM::VST1q64wb_register:
3439 case ARM::VST1q8wb_fixed:
3440 case ARM::VST1q8wb_register:
3444 case ARM::VST2d16wb_fixed:
3445 case ARM::VST2d16wb_register:
3446 case ARM::VST2d32wb_fixed:
3447 case ARM::VST2d32wb_register:
3448 case ARM::VST2d8wb_fixed:
3449 case ARM::VST2d8wb_register:
3456 case ARM::VST2b16wb_fixed:
3457 case ARM::VST2b16wb_register:
3458 case ARM::VST2b32wb_fixed:
3459 case ARM::VST2b32wb_register:
3460 case ARM::VST2b8wb_fixed:
3461 case ARM::VST2b8wb_register:
3475 case ARM::VST3d8_UPD:
3476 case ARM::VST3d16_UPD:
3477 case ARM::VST3d32_UPD:
3481 case ARM::VST4d8_UPD:
3482 case ARM::VST4d16_UPD:
3483 case ARM::VST4d32_UPD:
3490 case ARM::VST3q8_UPD:
3491 case ARM::VST3q16_UPD:
3492 case ARM::VST3q32_UPD:
3496 case ARM::VST4q8_UPD:
3497 case ARM::VST4q16_UPD:
3498 case ARM::VST4q32_UPD:
3511 case ARM::VST3d8_UPD:
3512 case ARM::VST3d16_UPD:
3513 case ARM::VST3d32_UPD:
3517 case ARM::VST4d8_UPD:
3518 case ARM::VST4d16_UPD:
3519 case ARM::VST4d32_UPD:
3526 case ARM::VST3q8_UPD:
3527 case ARM::VST3q16_UPD:
3528 case ARM::VST3q32_UPD:
3532 case ARM::VST4q8_UPD:
3533 case ARM::VST4q16_UPD:
3534 case ARM::VST4q32_UPD:
3547 case ARM::VST4d8_UPD:
3548 case ARM::VST4d16_UPD:
3549 case ARM::VST4d32_UPD:
3556 case ARM::VST4q8_UPD:
3557 case ARM::VST4q16_UPD:
3558 case ARM::VST4q32_UPD:
3574 unsigned Rd = fieldFromInstruction(
Insn, 12, 4);
3575 Rd |= fieldFromInstruction(
Insn, 22, 1) << 4;
3576 unsigned Rn = fieldFromInstruction(
Insn, 16, 4);
3577 unsigned Rm = fieldFromInstruction(
Insn, 0, 4);
3578 unsigned align = fieldFromInstruction(
Insn, 4, 1);
3579 unsigned size = fieldFromInstruction(
Insn, 6, 2);
3581 if (
size == 0 && align == 1)
3583 align *= (1 <<
size);
3586 case ARM::VLD1DUPq16:
case ARM::VLD1DUPq32:
case ARM::VLD1DUPq8:
3587 case ARM::VLD1DUPq16wb_fixed:
case ARM::VLD1DUPq16wb_register:
3588 case ARM::VLD1DUPq32wb_fixed:
case ARM::VLD1DUPq32wb_register:
3589 case ARM::VLD1DUPq8wb_fixed:
case ARM::VLD1DUPq8wb_register:
3610 if (Rm != 0xD && Rm != 0xF &&
3622 unsigned Rd = fieldFromInstruction(
Insn, 12, 4);
3623 Rd |= fieldFromInstruction(
Insn, 22, 1) << 4;
3624 unsigned Rn = fieldFromInstruction(
Insn, 16, 4);
3625 unsigned Rm = fieldFromInstruction(
Insn, 0, 4);
3626 unsigned align = fieldFromInstruction(
Insn, 4, 1);
3627 unsigned size = 1 << fieldFromInstruction(
Insn, 6, 2);
3631 case ARM::VLD2DUPd16:
case ARM::VLD2DUPd32:
case ARM::VLD2DUPd8:
3632 case ARM::VLD2DUPd16wb_fixed:
case ARM::VLD2DUPd16wb_register:
3633 case ARM::VLD2DUPd32wb_fixed:
case ARM::VLD2DUPd32wb_register:
3634 case ARM::VLD2DUPd8wb_fixed:
case ARM::VLD2DUPd8wb_register:
3638 case ARM::VLD2DUPd16x2:
case ARM::VLD2DUPd32x2:
case ARM::VLD2DUPd8x2:
3639 case ARM::VLD2DUPd16x2wb_fixed:
case ARM::VLD2DUPd16x2wb_register:
3640 case ARM::VLD2DUPd32x2wb_fixed:
case ARM::VLD2DUPd32x2wb_register:
3641 case ARM::VLD2DUPd8x2wb_fixed:
case ARM::VLD2DUPd8x2wb_register:
3658 if (Rm != 0xD && Rm != 0xF) {
3671 unsigned Rd = fieldFromInstruction(
Insn, 12, 4);
3672 Rd |= fieldFromInstruction(
Insn, 22, 1) << 4;
3673 unsigned Rn = fieldFromInstruction(
Insn, 16, 4);
3674 unsigned Rm = fieldFromInstruction(
Insn, 0, 4);
3675 unsigned inc = fieldFromInstruction(
Insn, 5, 1) + 1;
3694 else if (Rm != 0xF) {
3707 unsigned Rd = fieldFromInstruction(
Insn, 12, 4);
3708 Rd |= fieldFromInstruction(
Insn, 22, 1) << 4;
3709 unsigned Rn = fieldFromInstruction(
Insn, 16, 4);
3710 unsigned Rm = fieldFromInstruction(
Insn, 0, 4);
3711 unsigned size = fieldFromInstruction(
Insn, 6, 2);
3712 unsigned inc = fieldFromInstruction(
Insn, 5, 1) + 1;
3713 unsigned align = fieldFromInstruction(
Insn, 4, 1);
3747 else if (Rm != 0xF) {
3760 unsigned Rd = fieldFromInstruction(
Insn, 12, 4);
3761 Rd |= fieldFromInstruction(
Insn, 22, 1) << 4;
3762 unsigned imm = fieldFromInstruction(
Insn, 0, 4);
3763 imm |= fieldFromInstruction(
Insn, 16, 3) << 4;
3764 imm |= fieldFromInstruction(
Insn, 24, 1) << 7;
3765 imm |= fieldFromInstruction(
Insn, 8, 4) << 8;
3766 imm |= fieldFromInstruction(
Insn, 5, 1) << 12;
3767 unsigned Q = fieldFromInstruction(
Insn, 6, 1);
3780 case ARM::VORRiv4i16:
3781 case ARM::VORRiv2i32:
3782 case ARM::VBICiv4i16:
3783 case ARM::VBICiv2i32:
3787 case ARM::VORRiv8i16:
3788 case ARM::VORRiv4i32:
3789 case ARM::VBICiv8i16:
3790 case ARM::VBICiv4i32:
3806 unsigned Qd = ((fieldFromInstruction(
Insn, 22, 1) << 3) |
3807 fieldFromInstruction(
Insn, 13, 3));
3808 unsigned cmode = fieldFromInstruction(
Insn, 8, 4);
3809 unsigned imm = fieldFromInstruction(
Insn, 0, 4);
3810 imm |= fieldFromInstruction(
Insn, 16, 3) << 4;
3811 imm |= fieldFromInstruction(
Insn, 28, 1) << 7;
3813 imm |= fieldFromInstruction(
Insn, 5, 1) << 12;
3815 if (cmode == 0xF && Inst.
getOpcode() == ARM::MVE_VMVNimmi32)
3835 unsigned Qd = fieldFromInstruction(
Insn, 13, 3);
3836 Qd |= fieldFromInstruction(
Insn, 22, 1) << 3;
3841 unsigned Qn = fieldFromInstruction(
Insn, 17, 3);
3842 Qn |= fieldFromInstruction(
Insn, 7, 1) << 3;
3845 unsigned Qm = fieldFromInstruction(
Insn, 1, 3);
3846 Qm |= fieldFromInstruction(
Insn, 5, 1) << 3;
3849 if (!fieldFromInstruction(
Insn, 12, 1))
3861 unsigned Rd = fieldFromInstruction(
Insn, 12, 4);
3862 Rd |= fieldFromInstruction(
Insn, 22, 1) << 4;
3863 unsigned Rm = fieldFromInstruction(
Insn, 0, 4);
3864 Rm |= fieldFromInstruction(
Insn, 5, 1) << 4;
3865 unsigned size = fieldFromInstruction(
Insn, 18, 2);
3909 unsigned Rd = fieldFromInstruction(
Insn, 12, 4);
3910 Rd |= fieldFromInstruction(
Insn, 22, 1) << 4;
3911 unsigned Rn = fieldFromInstruction(
Insn, 16, 4);
3912 Rn |= fieldFromInstruction(
Insn, 7, 1) << 4;
3913 unsigned Rm = fieldFromInstruction(
Insn, 0, 4);
3914 Rm |= fieldFromInstruction(
Insn, 5, 1) << 4;
3915 unsigned op = fieldFromInstruction(
Insn, 6, 1);
3946 unsigned dst = fieldFromInstruction(
Insn, 8, 3);
3947 unsigned imm = fieldFromInstruction(
Insn, 0, 8);
3970 true, 2, Inst, Decoder))
3979 true, 4, Inst, Decoder))
3988 true, 2, Inst, Decoder))
3998 unsigned Rn = fieldFromInstruction(Val, 0, 3);
3999 unsigned Rm = fieldFromInstruction(Val, 3, 3);
4014 unsigned Rn = fieldFromInstruction(Val, 0, 3);
4015 unsigned imm = fieldFromInstruction(Val, 3, 5);
4027 unsigned imm = Val << 2;
4049 unsigned Rn = fieldFromInstruction(Val, 6, 4);
4050 unsigned Rm = fieldFromInstruction(Val, 2, 4);
4051 unsigned imm = fieldFromInstruction(Val, 0, 2);
4079 unsigned Rt = fieldFromInstruction(
Insn, 12, 4);
4080 unsigned Rn = fieldFromInstruction(
Insn, 16, 4);
4083 ((
const MCDisassembler*)Decoder)->getSubtargetInfo().getFeatureBits();
4085 bool hasMP = featureBits[ARM::FeatureMP];
4086 bool hasV7Ops = featureBits[ARM::HasV7Ops];
4141 if (!hasV7Ops || !hasMP)
4149 unsigned addrmode = fieldFromInstruction(
Insn, 4, 2);
4150 addrmode |= fieldFromInstruction(
Insn, 0, 4) << 2;
4151 addrmode |= fieldFromInstruction(
Insn, 16, 4) << 6;
4163 unsigned Rn = fieldFromInstruction(
Insn, 16, 4);
4164 unsigned Rt = fieldFromInstruction(
Insn, 12, 4);
4165 unsigned U = fieldFromInstruction(
Insn, 9, 1);
4166 unsigned imm = fieldFromInstruction(
Insn, 0, 8);
4169 unsigned add = fieldFromInstruction(
Insn, 9, 1);
4172 ((
const MCDisassembler*)Decoder)->getSubtargetInfo().getFeatureBits();
4174 bool hasMP = featureBits[ARM::FeatureMP];
4175 bool hasV7Ops = featureBits[ARM::HasV7Ops];
4185 case ARM::t2LDRSBi8:
4191 case ARM::t2LDRSHi8:
4208 case ARM::t2LDRSHi8:
4214 case ARM::t2LDRSBi8:
4230 if (!hasV7Ops || !hasMP)
4248 unsigned Rn = fieldFromInstruction(
Insn, 16, 4);
4249 unsigned Rt = fieldFromInstruction(
Insn, 12, 4);
4250 unsigned imm = fieldFromInstruction(
Insn, 0, 12);
4254 ((
const MCDisassembler*)Decoder)->getSubtargetInfo().getFeatureBits();
4256 bool hasMP = featureBits[ARM::FeatureMP];
4257 bool hasV7Ops = featureBits[ARM::HasV7Ops];
4264 case ARM::t2LDRHi12:
4267 case ARM::t2LDRSHi12:
4270 case ARM::t2LDRBi12:
4273 case ARM::t2LDRSBi12:
4290 case ARM::t2LDRSHi12:
4292 case ARM::t2LDRHi12:
4295 case ARM::t2LDRSBi12:
4310 case ARM::t2PLDWi12:
4311 if (!hasV7Ops || !hasMP)
4328 unsigned Rn = fieldFromInstruction(
Insn, 16, 4);
4329 unsigned Rt = fieldFromInstruction(
Insn, 12, 4);
4330 unsigned imm = fieldFromInstruction(
Insn, 0, 8);
4368 unsigned Rt = fieldFromInstruction(
Insn, 12, 4);
4369 unsigned U = fieldFromInstruction(
Insn, 23, 1);
4370 int imm = fieldFromInstruction(
Insn, 0, 12);
4373 ((
const MCDisassembler*)Decoder)->getSubtargetInfo().getFeatureBits();
4375 bool hasV7Ops = featureBits[ARM::HasV7Ops];
4379 case ARM::t2LDRBpci:
4380 case ARM::t2LDRHpci:
4383 case ARM::t2LDRSBpci:
4386 case ARM::t2LDRSHpci:
4422 int imm = Val & 0xFF;
4424 if (!(Val & 0x100)) imm *= -1;
4436 int imm = Val & 0x7F;
4451 unsigned Rn = fieldFromInstruction(Val, 9, 4);
4452 unsigned imm = fieldFromInstruction(Val, 0, 9);
4467 unsigned Rn = fieldFromInstruction(Val, 8, 4);
4468 unsigned imm = fieldFromInstruction(Val, 0, 8);
4483 unsigned Rn = fieldFromInstruction(Val, 8, 4);
4484 unsigned imm = fieldFromInstruction(Val, 0, 8);
4496 int imm = Val & 0xFF;
4499 else if (!(Val & 0x100))
4509 int imm = Val & 0x7F;
4512 else if (!(Val & 0x80))
4514 if (imm != INT32_MIN)
4515 imm *= (1U << shift);
4526 unsigned Rn = fieldFromInstruction(Val, 9, 4);
4527 unsigned imm = fieldFromInstruction(Val, 0, 9);
4574 unsigned Rn = fieldFromInstruction(Val, 8, 3);
4575 unsigned imm = fieldFromInstruction(Val, 0, 8);
4579 if (!
Check(S, DecodeT2Imm7<shift>(Inst, imm,
Address, Decoder)))
4585template <
int shift,
int WriteBack>
4591 unsigned Rn = fieldFromInstruction(Val, 8, 4);
4592 unsigned imm = fieldFromInstruction(Val, 0, 8);
4598 if (!
Check(S, DecodeT2Imm7<shift>(Inst, imm,
Address, Decoder)))
4609 unsigned Rt = fieldFromInstruction(
Insn, 12, 4);
4610 unsigned Rn = fieldFromInstruction(
Insn, 16, 4);
4611 unsigned addr = fieldFromInstruction(
Insn, 0, 8);
4612 addr |= fieldFromInstruction(
Insn, 9, 1) << 8;
4614 unsigned load = fieldFromInstruction(
Insn, 20, 1);
4618 case ARM::t2LDR_PRE:
4619 case ARM::t2LDR_POST:
4622 case ARM::t2LDRB_PRE:
4623 case ARM::t2LDRB_POST:
4626 case ARM::t2LDRH_PRE:
4627 case ARM::t2LDRH_POST:
4630 case ARM::t2LDRSB_PRE:
4631 case ARM::t2LDRSB_POST:
4637 case ARM::t2LDRSH_PRE:
4638 case ARM::t2LDRSH_POST:
4671 unsigned Rn = fieldFromInstruction(Val, 13, 4);
4672 unsigned imm = fieldFromInstruction(Val, 0, 12);
4677 case ARM::t2STRBi12:
4678 case ARM::t2STRHi12:
4696 unsigned imm = fieldFromInstruction(
Insn, 0, 7);
4711 unsigned Rdm = fieldFromInstruction(
Insn, 0, 3);
4712 Rdm |= fieldFromInstruction(
Insn, 7, 1) << 3;
4719 }
else if (Inst.
getOpcode() == ARM::tADDspr) {
4720 unsigned Rm = fieldFromInstruction(
Insn, 3, 4);
4734 unsigned imod = fieldFromInstruction(
Insn, 4, 1) | 0x2;
4735 unsigned flags = fieldFromInstruction(
Insn, 0, 3);
4747 unsigned Rm = fieldFromInstruction(
Insn, 0, 4);
4748 unsigned add = fieldFromInstruction(
Insn, 4, 1);
4761 unsigned Rn = fieldFromInstruction(
Insn, 3, 4);
4762 unsigned Qm = fieldFromInstruction(
Insn, 0, 3);
4777 unsigned Qm = fieldFromInstruction(
Insn, 8, 3);
4778 int imm = fieldFromInstruction(
Insn, 0, 7);
4783 if(!fieldFromInstruction(
Insn, 7, 1)) {
4789 if (imm != INT32_MIN)
4790 imm *= (1U << shift);
4806 unsigned S = (Val >> 23) & 1;
4807 unsigned J1 = (Val >> 22) & 1;
4808 unsigned J2 = (Val >> 21) & 1;
4809 unsigned I1 = !(J1 ^ S);
4810 unsigned I2 = !(J2 ^ S);
4811 unsigned tmp = (Val & ~0x600000) | (I1 << 22) | (I2 << 21);
4812 int imm32 = SignExtend32<25>(tmp << 1);
4816 true, 4, Inst, Decoder))
4824 if (Val == 0xA || Val == 0xB)
4828 ((
const MCDisassembler*)Decoder)->getSubtargetInfo().getFeatureBits();
4841 ((
const MCDisassembler*)Decoder)->getSubtargetInfo().getFeatureBits();
4844 unsigned Rn = fieldFromInstruction(
Insn, 16, 4);
4845 unsigned Rm = fieldFromInstruction(
Insn, 0, 4);
4860 unsigned pred = fieldFromInstruction(
Insn, 22, 4);
4862 unsigned opc = fieldFromInstruction(
Insn, 4, 28);
4877 unsigned imm = fieldFromInstruction(
Insn, 0, 4);
4881 unsigned brtarget = fieldFromInstruction(
Insn, 0, 11) << 1;
4882 brtarget |= fieldFromInstruction(
Insn, 11, 1) << 19;
4883 brtarget |= fieldFromInstruction(
Insn, 13, 1) << 18;
4884 brtarget |= fieldFromInstruction(
Insn, 16, 6) << 12;
4885 brtarget |= fieldFromInstruction(
Insn, 26, 1) << 20;
4900 unsigned ctrl = fieldFromInstruction(Val, 10, 2);
4902 unsigned byte = fieldFromInstruction(Val, 8, 2);
4903 unsigned imm = fieldFromInstruction(Val, 0, 8);
4920 unsigned unrot = fieldFromInstruction(Val, 0, 7) | 0x80;
4921 unsigned rot = fieldFromInstruction(Val, 7, 5);
4922 unsigned imm = llvm::rotr<uint32_t>(unrot, rot);
4933 true, 2, Inst, Decoder))
4948 unsigned S = (Val >> 23) & 1;
4949 unsigned J1 = (Val >> 22) & 1;
4950 unsigned J2 = (Val >> 21) & 1;
4951 unsigned I1 = !(J1 ^ S);
4952 unsigned I2 = !(J2 ^ S);
4953 unsigned tmp = (Val & ~0x600000) | (I1 << 22) | (I2 << 21);
4954 int imm32 = SignExtend32<25>(tmp << 1);
4957 true, 4, Inst, Decoder))
4986 ((
const MCDisassembler*)Decoder)->getSubtargetInfo().getFeatureBits();
4988 if (FeatureBits[ARM::FeatureMClass]) {
4989 unsigned ValLow = Val & 0xff;
5008 if (!(FeatureBits[ARM::HasV7Ops]))
5016 if (!(FeatureBits[ARM::HasV8MMainlineOps]))
5026 if (!(FeatureBits[ARM::Feature8MSecExt]))
5045 if (!(FeatureBits[ARM::FeaturePACBTI]))
5055 unsigned Mask = fieldFromInstruction(Val, 10, 2);
5056 if (!(FeatureBits[ARM::HasV7Ops])) {
5069 if (Mask == 0 || (Mask != 2 && ValLow > 3) ||
5070 (!(FeatureBits[ARM::FeatureDSP]) && (Mask & 1)))
5086 unsigned R = fieldFromInstruction(Val, 5, 1);
5087 unsigned SysM = fieldFromInstruction(Val, 0, 5);
5092 if (!ARMBankedReg::lookupBankedRegByEncoding((R << 5) | SysM))
5104 unsigned Rt = fieldFromInstruction(
Insn, 12, 4);
5105 unsigned Rn = fieldFromInstruction(
Insn, 16, 4);
5106 unsigned pred = fieldFromInstruction(
Insn, 28, 4);
5126 unsigned Rd = fieldFromInstruction(
Insn, 12, 4);
5127 unsigned Rt = fieldFromInstruction(
Insn, 0, 4);
5128 unsigned Rn = fieldFromInstruction(
Insn, 16, 4);
5129 unsigned pred = fieldFromInstruction(
Insn, 28, 4);
5134 if (Rn == 0xF || Rd == Rn || Rd == Rt || Rd == Rt+1)
5152 unsigned Rn = fieldFromInstruction(
Insn, 16, 4);
5153 unsigned Rt = fieldFromInstruction(
Insn, 12, 4);
5154 unsigned imm = fieldFromInstruction(
Insn, 0, 12);
5155 imm |= fieldFromInstruction(
Insn, 16, 4) << 13;
5156 imm |= fieldFromInstruction(
Insn, 23, 1) << 12;
5157 unsigned pred = fieldFromInstruction(
Insn, 28, 4);
5178 unsigned Rn = fieldFromInstruction(
Insn, 16, 4);
5179 unsigned Rt = fieldFromInstruction(
Insn, 12, 4);
5180 unsigned imm = fieldFromInstruction(
Insn, 0, 12);
5181 imm |= fieldFromInstruction(
Insn, 16, 4) << 13;
5182 imm |= fieldFromInstruction(
Insn, 23, 1) << 12;
5183 unsigned pred = fieldFromInstruction(
Insn, 28, 4);
5184 unsigned Rm = fieldFromInstruction(
Insn, 0, 4);
5206 unsigned Rn = fieldFromInstruction(
Insn, 16, 4);
5207 unsigned Rt = fieldFromInstruction(
Insn, 12, 4);
5208 unsigned imm = fieldFromInstruction(
Insn, 0, 12);
5209 imm |= fieldFromInstruction(
Insn, 16, 4) << 13;
5210 imm |= fieldFromInstruction(
Insn, 23, 1) << 12;
5211 unsigned pred = fieldFromInstruction(
Insn, 28, 4);
5232 unsigned Rn = fieldFromInstruction(
Insn, 16, 4);
5233 unsigned Rt = fieldFromInstruction(
Insn, 12, 4);
5234 unsigned imm = fieldFromInstruction(
Insn, 0, 12);
5235 imm |= fieldFromInstruction(
Insn, 16, 4) << 13;
5236 imm |= fieldFromInstruction(
Insn, 23, 1) << 12;
5237 unsigned pred = fieldFromInstruction(
Insn, 28, 4);
5257 unsigned Rn = fieldFromInstruction(
Insn, 16, 4);
5258 unsigned Rm = fieldFromInstruction(
Insn, 0, 4);
5259 unsigned Rd = fieldFromInstruction(
Insn, 12, 4);
5260 Rd |= fieldFromInstruction(
Insn, 22, 1) << 4;
5261 unsigned size = fieldFromInstruction(
Insn, 10, 2);
5269 if (fieldFromInstruction(
Insn, 4, 1))
5271 index = fieldFromInstruction(
Insn, 5, 3);
5274 if (fieldFromInstruction(
Insn, 5, 1))
5276 index = fieldFromInstruction(
Insn, 6, 2);
5277 if (fieldFromInstruction(
Insn, 4, 1))
5281 if (fieldFromInstruction(
Insn, 6, 1))
5283 index = fieldFromInstruction(
Insn, 7, 1);
5285 switch (fieldFromInstruction(
Insn, 4, 2)) {
5324 unsigned Rn = fieldFromInstruction(
Insn, 16, 4);
5325 unsigned Rm = fieldFromInstruction(
Insn, 0, 4);
5326 unsigned Rd = fieldFromInstruction(
Insn, 12, 4);
5327 Rd |= fieldFromInstruction(
Insn, 22, 1) << 4;
5328 unsigned size = fieldFromInstruction(
Insn, 10, 2);
5336 if (fieldFromInstruction(
Insn, 4, 1))
5338 index = fieldFromInstruction(
Insn, 5, 3);
5341 if (fieldFromInstruction(
Insn, 5, 1))
5343 index = fieldFromInstruction(
Insn, 6, 2);
5344 if (fieldFromInstruction(
Insn, 4, 1))
5348 if (fieldFromInstruction(
Insn, 6, 1))
5350 index = fieldFromInstruction(
Insn, 7, 1);
5352 switch (fieldFromInstruction(
Insn, 4, 2)) {
5389 unsigned Rn = fieldFromInstruction(
Insn, 16, 4);
5390 unsigned Rm = fieldFromInstruction(
Insn, 0, 4);
5391 unsigned Rd = fieldFromInstruction(
Insn, 12, 4);
5392 Rd |= fieldFromInstruction(
Insn, 22, 1) << 4;
5393 unsigned size = fieldFromInstruction(
Insn, 10, 2);
5402 index = fieldFromInstruction(
Insn, 5, 3);
5403 if (fieldFromInstruction(
Insn, 4, 1))
5407 index = fieldFromInstruction(
Insn, 6, 2);
5408 if (fieldFromInstruction(
Insn, 4, 1))
5410 if (fieldFromInstruction(
Insn, 5, 1))
5414 if (fieldFromInstruction(
Insn, 5, 1))
5416 index = fieldFromInstruction(
Insn, 7, 1);
5417 if (fieldFromInstruction(
Insn, 4, 1) != 0)
5419 if (fieldFromInstruction(
Insn, 6, 1))
5456 unsigned Rn = fieldFromInstruction(
Insn, 16, 4);
5457 unsigned Rm = fieldFromInstruction(
Insn, 0, 4);
5458 unsigned Rd = fieldFromInstruction(
Insn, 12, 4);
5459 Rd |= fieldFromInstruction(
Insn, 22, 1) << 4;
5460 unsigned size = fieldFromInstruction(
Insn, 10, 2);
5469 index = fieldFromInstruction(
Insn, 5, 3);
5470 if (fieldFromInstruction(
Insn, 4, 1))
5474 index = fieldFromInstruction(
Insn, 6, 2);
5475 if (fieldFromInstruction(
Insn, 4, 1))
5477 if (fieldFromInstruction(
Insn, 5, 1))
5481 if (fieldFromInstruction(
Insn, 5, 1))
5483 index = fieldFromInstruction(
Insn, 7, 1);
5484 if (fieldFromInstruction(
Insn, 4, 1) != 0)
5486 if (fieldFromInstruction(
Insn, 6, 1))
5519 unsigned Rn = fieldFromInstruction(
Insn, 16, 4);
5520 unsigned Rm = fieldFromInstruction(
Insn, 0, 4);
5521 unsigned Rd = fieldFromInstruction(
Insn, 12, 4);
5522 Rd |= fieldFromInstruction(
Insn, 22, 1) << 4;
5523 unsigned size = fieldFromInstruction(
Insn, 10, 2);
5532 if (fieldFromInstruction(
Insn, 4, 1))
5534 index = fieldFromInstruction(
Insn, 5, 3);
5537 if (fieldFromInstruction(
Insn, 4, 1))
5539 index = fieldFromInstruction(
Insn, 6, 2);
5540 if (fieldFromInstruction(
Insn, 5, 1))
5544 if (fieldFromInstruction(
Insn, 4, 2))
5546 index = fieldFromInstruction(
Insn, 7, 1);
5547 if (fieldFromInstruction(
Insn, 6, 1))
5589 unsigned Rn = fieldFromInstruction(
Insn, 16, 4);
5590 unsigned Rm = fieldFromInstruction(
Insn, 0, 4);
5591 unsigned Rd = fieldFromInstruction(
Insn, 12, 4);
5592 Rd |= fieldFromInstruction(
Insn, 22, 1) << 4;
5593 unsigned size = fieldFromInstruction(
Insn, 10, 2);
5602 if (fieldFromInstruction(
Insn, 4, 1))
5604 index = fieldFromInstruction(
Insn, 5, 3);
5607 if (fieldFromInstruction(
Insn, 4, 1))
5609 index = fieldFromInstruction(
Insn, 6, 2);
5610 if (fieldFromInstruction(
Insn, 5, 1))
5614 if (fieldFromInstruction(
Insn, 4, 2))
5616 index = fieldFromInstruction(
Insn, 7, 1);
5617 if (fieldFromInstruction(
Insn, 6, 1))
5652 unsigned Rn = fieldFromInstruction(
Insn, 16, 4);
5653 unsigned Rm = fieldFromInstruction(
Insn, 0, 4);
5654 unsigned Rd = fieldFromInstruction(
Insn, 12, 4);
5655 Rd |= fieldFromInstruction(
Insn, 22, 1) << 4;
5656 unsigned size = fieldFromInstruction(
Insn, 10, 2);
5665 if (fieldFromInstruction(
Insn, 4, 1))
5667 index = fieldFromInstruction(
Insn, 5, 3);
5670 if (fieldFromInstruction(
Insn, 4, 1))
5672 index = fieldFromInstruction(
Insn, 6, 2);
5673 if (fieldFromInstruction(
Insn, 5, 1))
5677 switch (fieldFromInstruction(
Insn, 4, 2)) {
5683 align = 4 << fieldFromInstruction(
Insn, 4, 2);
break;
5686 index = fieldFromInstruction(
Insn, 7, 1);
5687 if (fieldFromInstruction(
Insn, 6, 1))
5733 unsigned Rn = fieldFromInstruction(
Insn, 16, 4);
5734 unsigned Rm = fieldFromInstruction(
Insn, 0, 4);
5735 unsigned Rd = fieldFromInstruction(
Insn, 12, 4);
5736 Rd |= fieldFromInstruction(
Insn, 22, 1) << 4;
5737 unsigned size = fieldFromInstruction(
Insn, 10, 2);
5746 if (fieldFromInstruction(
Insn, 4, 1))
5748 index = fieldFromInstruction(
Insn, 5, 3);
5751 if (fieldFromInstruction(
Insn, 4, 1))
5753 index = fieldFromInstruction(
Insn, 6, 2);
5754 if (fieldFromInstruction(
Insn, 5, 1))
5758 switch (fieldFromInstruction(
Insn, 4, 2)) {
5764 align = 4 << fieldFromInstruction(
Insn, 4, 2);
break;
5767 index = fieldFromInstruction(
Insn, 7, 1);
5768 if (fieldFromInstruction(
Insn, 6, 1))
5804 unsigned Rt = fieldFromInstruction(
Insn, 12, 4);
5805 unsigned Rt2 = fieldFromInstruction(
Insn, 16, 4);
5806 unsigned Rm = fieldFromInstruction(
Insn, 5, 1);
5807 unsigned pred = fieldFromInstruction(
Insn, 28, 4);
5808 Rm |= fieldFromInstruction(
Insn, 0, 4) << 1;
5810 if (Rt == 0xF || Rt2 == 0xF || Rm == 0x1F)
5830 unsigned Rt = fieldFromInstruction(
Insn, 12, 4);
5831 unsigned Rt2 = fieldFromInstruction(
Insn, 16, 4);
5832 unsigned Rm = fieldFromInstruction(
Insn, 5, 1);
5833 unsigned pred = fieldFromInstruction(
Insn, 28, 4);
5834 Rm |= fieldFromInstruction(
Insn, 0, 4) << 1;
5836 if (Rt == 0xF || Rt2 == 0xF || Rm == 0x1F)
5856 unsigned pred = fieldFromInstruction(
Insn, 4, 4);
5857 unsigned mask = fieldFromInstruction(
Insn, 0, 4);
5872 unsigned LowBit = mask & -mask;
5873 unsigned BitsAboveLowBit = 0xF & (-LowBit << 1);
5874 mask ^= BitsAboveLowBit;
5887 unsigned Rt = fieldFromInstruction(
Insn, 12, 4);
5888 unsigned Rt2 = fieldFromInstruction(
Insn, 8, 4);
5889 unsigned Rn = fieldFromInstruction(
Insn, 16, 4);
5890 unsigned addr = fieldFromInstruction(
Insn, 0, 8);
5891 unsigned W = fieldFromInstruction(
Insn, 21, 1);
5892 unsigned U = fieldFromInstruction(
Insn, 23, 1);
5893 unsigned P = fieldFromInstruction(
Insn, 24, 1);
5894 bool writeback = (W == 1) | (
P == 0);
5896 addr |= (U << 8) | (Rn << 9);
5898 if (writeback && (Rn == Rt || Rn == Rt2))
5924 unsigned Rt = fieldFromInstruction(
Insn, 12, 4);
5925 unsigned Rt2 = fieldFromInstruction(
Insn, 8, 4);
5926 unsigned Rn = fieldFromInstruction(
Insn, 16, 4);
5927 unsigned addr = fieldFromInstruction(
Insn, 0, 8);
5928 unsigned W = fieldFromInstruction(
Insn, 21, 1);
5929 unsigned U = fieldFromInstruction(
Insn, 23, 1);
5930 unsigned P = fieldFromInstruction(
Insn, 24, 1);
5931 bool writeback = (W == 1) | (
P == 0);
5933 addr |= (U << 8) | (Rn << 9);
5935 if (writeback && (Rn == Rt || Rn == Rt2))
5956 unsigned sign1 = fieldFromInstruction(
Insn, 21, 1);
5957 unsigned sign2 = fieldFromInstruction(
Insn, 23, 1);
5959 const unsigned Rd = fieldFromInstruction(
Insn, 8, 4);
5963 unsigned Val = fieldFromInstruction(
Insn, 0, 8);
5964 Val |= fieldFromInstruction(
Insn, 12, 3) << 8;
5965 Val |= fieldFromInstruction(
Insn, 26, 1) << 11;
5993 unsigned Rt = fieldFromInstruction(
Insn, 12, 4);
5994 unsigned Rt2 = fieldFromInstruction(
Insn, 0, 4);
5995 unsigned Rn = fieldFromInstruction(
Insn, 16, 4);
5996 unsigned pred = fieldFromInstruction(
Insn, 28, 4);
6003 if (Rt == Rn || Rn == Rt2)
6021 ((
const MCDisassembler *)Decoder)->getSubtargetInfo().getFeatureBits();
6022 bool hasFullFP16 = featureBits[ARM::FeatureFullFP16];
6024 unsigned Vd = (fieldFromInstruction(
Insn, 12, 4) << 0);
6025 Vd |= (fieldFromInstruction(
Insn, 22, 1) << 4);
6026 unsigned Vm = (fieldFromInstruction(
Insn, 0, 4) << 0);
6027 Vm |= (fieldFromInstruction(
Insn, 5, 1) << 4);
6028 unsigned imm = fieldFromInstruction(
Insn, 16, 6);
6029 unsigned cmode = fieldFromInstruction(
Insn, 8, 4);
6030 unsigned op = fieldFromInstruction(
Insn, 5, 1);
6035 if (!(imm & 0x38)) {
6080 ((
const MCDisassembler *)Decoder)->getSubtargetInfo().getFeatureBits();
6081 bool hasFullFP16 = featureBits[ARM::FeatureFullFP16];
6083 unsigned Vd = (fieldFromInstruction(
Insn, 12, 4) << 0);
6084 Vd |= (fieldFromInstruction(
Insn, 22, 1) << 4);
6085 unsigned Vm = (fieldFromInstruction(
Insn, 0, 4) << 0);
6086 Vm |= (fieldFromInstruction(
Insn, 5, 1) << 4);
6087 unsigned imm = fieldFromInstruction(
Insn, 16, 6);
6088 unsigned cmode = fieldFromInstruction(
Insn, 8, 4);
6089 unsigned op = fieldFromInstruction(
Insn, 5, 1);
6094 if (!(imm & 0x38)) {
6140 unsigned Vd = (fieldFromInstruction(
Insn, 12, 4) << 0);
6141 Vd |= (fieldFromInstruction(
Insn, 22, 1) << 4);
6142 unsigned Vn = (fieldFromInstruction(
Insn, 16, 4) << 0);
6143 Vn |= (fieldFromInstruction(
Insn, 7, 1) << 4);
6144 unsigned Vm = (fieldFromInstruction(
Insn, 0, 4) << 0);
6145 Vm |= (fieldFromInstruction(
Insn, 5, 1) << 4);
6146 unsigned q = (fieldFromInstruction(
Insn, 6, 1) << 0);
6147 unsigned rotate = (fieldFromInstruction(
Insn, 20, 2) << 0);
6153 if (!
Check(S, DestRegDecoder(Inst, Vd,
Address, Decoder)))
6155 if (!
Check(S, DestRegDecoder(Inst, Vd,
Address, Decoder)))
6157 if (!
Check(S, DestRegDecoder(Inst, Vn,
Address, Decoder)))
6173 unsigned Rn = fieldFromInstruction(Val, 16, 4);
6174 unsigned Rt = fieldFromInstruction(Val, 12, 4);
6175 unsigned Rm = fieldFromInstruction(Val, 0, 4);
6176 Rm |= (fieldFromInstruction(Val, 23, 1) << 4);
6177 unsigned Cond = fieldFromInstruction(Val, 28, 4);
6179 if (fieldFromInstruction(Val, 8, 4) != 0 || Rn == Rt)
6201 unsigned CRm = fieldFromInstruction(Val, 0, 4);
6202 unsigned opc1 = fieldFromInstruction(Val, 4, 4);
6203 unsigned cop = fieldFromInstruction(Val, 8, 4);
6204 unsigned Rt = fieldFromInstruction(Val, 12, 4);
6205 unsigned Rt2 = fieldFromInstruction(Val, 16, 4);
6207 if ((cop & ~0x1) == 0xa)
6246 ((
const MCDisassembler *)Decoder)->getSubtargetInfo().getFeatureBits();
6252 case ARM::VMSR_FPSCR_NZCVQC:
6261 unsigned Rt = fieldFromInstruction(Val, 12, 4);
6263 if (featureBits[ARM::ModeThumb] && !featureBits[ARM::HasV8Ops]) {
6264 if (Rt == 13 || Rt == 15)
6273 case ARM::VMRS_FPSCR_NZCVQC:
6281 if (featureBits[ARM::ModeThumb]) {
6285 unsigned pred = fieldFromInstruction(Val, 28, 4);
6293template <
bool isSigned,
bool isNeg,
bool zeroPermitted,
int size>
6298 if (Val == 0 && !zeroPermitted)
6303 DecVal = SignExtend32<size + 1>(Val << 1);
6305 DecVal = (Val << 1);
6318 Val = LocImm + (2 << Val);
6341 unsigned Imm = fieldFromInstruction(
Insn, 11, 1) |
6342 fieldFromInstruction(
Insn, 1, 10) << 1;
6344 case ARM::t2LEUpdate:
6350 if (!
Check(S, DecodeBFLabelOperand<false, true, true, 11>(
6351 Inst, Imm,
Address, Decoder)))
6355 case ARM::MVE_WLSTP_8:
6356 case ARM::MVE_WLSTP_16:
6357 case ARM::MVE_WLSTP_32:
6358 case ARM::MVE_WLSTP_64:
6363 !
Check(S, DecodeBFLabelOperand<false, false, true, 11>(
6364 Inst, Imm,
Address, Decoder)))
6368 case ARM::MVE_DLSTP_8:
6369 case ARM::MVE_DLSTP_16:
6370 case ARM::MVE_DLSTP_32:
6371 case ARM::MVE_DLSTP_64:
6372 unsigned Rn = fieldFromInstruction(
Insn, 16, 4);
6377 uint32_t CanonicalLCTP = 0xF00FE001, SBZMask = 0x00300FFE;
6378 if ((
Insn & ~SBZMask) != CanonicalLCTP)
6380 if (
Insn != CanonicalLCTP)
6387 fieldFromInstruction(
Insn, 16, 4),
6412 if ((RegNo) + 1 > 11)
6455 unsigned regs = fieldFromInstruction(
Insn, 0, 8);
6458 }
else if (Inst.
getOpcode() == ARM::VSCCLRMD) {
6459 unsigned reglist = regs | (fieldFromInstruction(
Insn, 12, 4) << 8) |
6460 (fieldFromInstruction(
Insn, 22, 1) << 12);
6465 unsigned Vd = (fieldFromInstruction(
Insn, 12, 4) << 1) |
6466 fieldFromInstruction(
Insn, 22, 1);
6469 unsigned max_reg = Vd + regs;
6470 if (max_reg > 64 || (max_reg > 32 && (max_reg & 1)))
6472 unsigned max_sreg = std::min(32u, max_reg);
6473 unsigned max_dreg = std::min(32u, max_reg / 2);
6474 for (
unsigned i = Vd; i < max_sreg; ++i)
6477 for (
unsigned i = 16; i < max_dreg; ++i)
6498 ARM::Q0_Q1, ARM::Q1_Q2, ARM::Q2_Q3, ARM::Q3_Q4,
6499 ARM::Q4_Q5, ARM::Q5_Q6, ARM::Q6_Q7
6514 ARM::Q0_Q1_Q2_Q3, ARM::Q1_Q2_Q3_Q4, ARM::Q2_Q3_Q4_Q5,
6515 ARM::Q3_Q4_Q5_Q6, ARM::Q4_Q5_Q6_Q7
6539 unsigned CurBit = 0;
6540 for (
int i = 3; i >= 0; --i) {
6543 CurBit ^= (Val >> i) & 1U;
6546 Imm |= (CurBit << i);
6549 if ((Val & ~(~0U << i)) == 0) {
6595 switch (Val & 0x3) {
6656 unsigned DecodedVal = 64 - Val;
6659 case ARM::MVE_VCVTf16s16_fix:
6660 case ARM::MVE_VCVTs16f16_fix:
6661 case ARM::MVE_VCVTf16u16_fix:
6662 case ARM::MVE_VCVTu16f16_fix:
6663 if (DecodedVal > 16)
6666 case ARM::MVE_VCVTf32s32_fix:
6667 case ARM::MVE_VCVTs32f32_fix:
6668 case ARM::MVE_VCVTf32u32_fix:
6669 case ARM::MVE_VCVTu32f32_fix:
6670 if (DecodedVal > 32)
6682 case ARM::VSTR_P0_off:
6683 case ARM::VSTR_P0_pre:
6684 case ARM::VSTR_P0_post:
6685 case ARM::VLDR_P0_off:
6686 case ARM::VLDR_P0_pre:
6687 case ARM::VLDR_P0_post:
6689 case ARM::VSTR_FPSCR_NZCVQC_off:
6690 case ARM::VSTR_FPSCR_NZCVQC_pre:
6691 case ARM::VSTR_FPSCR_NZCVQC_post:
6692 case ARM::VLDR_FPSCR_NZCVQC_off:
6693 case ARM::VLDR_FPSCR_NZCVQC_pre:
6694 case ARM::VLDR_FPSCR_NZCVQC_post:
6701template <
bool Writeback>
6706 case ARM::VSTR_FPSCR_pre:
6707 case ARM::VSTR_FPSCR_NZCVQC_pre:
6708 case ARM::VLDR_FPSCR_pre:
6709 case ARM::VLDR_FPSCR_NZCVQC_pre:
6710 case ARM::VSTR_FPSCR_off:
6711 case ARM::VSTR_FPSCR_NZCVQC_off:
6712 case ARM::VLDR_FPSCR_off:
6713 case ARM::VLDR_FPSCR_NZCVQC_off:
6714 case ARM::VSTR_FPSCR_post:
6715 case ARM::VSTR_FPSCR_NZCVQC_post:
6716 case ARM::VLDR_FPSCR_post:
6717 case ARM::VLDR_FPSCR_NZCVQC_post:
6719 ((
const MCDisassembler *)Decoder)->getSubtargetInfo().getFeatureBits();
6721 if (!featureBits[ARM::HasMVEIntegerOps] && !featureBits[ARM::FeatureVFP2])
6728 unsigned Rn = fieldFromInstruction(Val, 16, 4);
6729 unsigned addr = fieldFromInstruction(Val, 0, 7) |
6730 (fieldFromInstruction(Val, 23, 1) << 7) | (Rn << 8);
6751 unsigned Qd = fieldFromInstruction(Val, 13, 3);
6752 unsigned addr = fieldFromInstruction(Val, 0, 7) |
6753 (fieldFromInstruction(Val, 23, 1) << 7) | (Rn << 8);
6759 if (!
Check(S, AddrDecoder(Inst, addr,
Address, Decoder)))
6770 fieldFromInstruction(Val, 16, 3),
6772 DecodeTAddrModeImm7<shift>);
6780 fieldFromInstruction(Val, 16, 4),
6782 DecodeT2AddrModeImm7<shift,1>);
6790 fieldFromInstruction(Val, 17, 3),
6792 DecodeMveAddrModeQ<shift>);
6795template <
unsigned MinLog,
unsigned MaxLog>
6801 if (Val < MinLog || Val > MaxLog)
6808template <
unsigned start>
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);
6835 if (!
Check(S, DecodeMVEPairVectorIndexOperand<2>(Inst, index,
Address, Decoder)))
6837 if (!
Check(S, DecodeMVEPairVectorIndexOperand<0>(Inst, index,
Address, Decoder)))
6847 unsigned Rt = fieldFromInstruction(
Insn, 0, 4);
6848 unsigned Rt2 = fieldFromInstruction(
Insn, 16, 4);
6849 unsigned Qd = ((fieldFromInstruction(
Insn, 22, 1) << 3) |
6850 fieldFromInstruction(
Insn, 13, 3));
6851 unsigned index = fieldFromInstruction(
Insn, 4, 1);
6861 if (!
Check(S, DecodeMVEPairVectorIndexOperand<2>(Inst, index,
Address, Decoder)))
6863 if (!
Check(S, DecodeMVEPairVectorIndexOperand<0>(Inst, index,
Address, Decoder)))
6874 unsigned RdaLo = fieldFromInstruction(
Insn, 17, 3) << 1;
6875 unsigned RdaHi = fieldFromInstruction(
Insn, 9, 3) << 1;
6876 unsigned Rm = fieldFromInstruction(
Insn, 12, 4);
6884 unsigned Rda = fieldFromInstruction(
Insn, 16, 4);
6887 case ARM::MVE_ASRLr:
6888 case ARM::MVE_SQRSHRL:
6891 case ARM::MVE_LSLLr:
6892 case ARM::MVE_UQRSHLL:
6911 if (fieldFromInstruction (
Insn, 6, 3) != 4)
6939 if (Inst.
getOpcode() == ARM::MVE_SQRSHRL ||
6941 unsigned Saturate = fieldFromInstruction(
Insn, 7, 1);
6953 unsigned Qd = ((fieldFromInstruction(
Insn, 22, 1) << 3) |
6954 fieldFromInstruction(
Insn, 13, 3));
6955 unsigned Qm = ((fieldFromInstruction(
Insn, 5, 1) << 3) |
6956 fieldFromInstruction(
Insn, 1, 3));
6957 unsigned imm6 = fieldFromInstruction(
Insn, 16, 6);
6969template <
bool scalar, OperandDecoder predicate_decoder>
6974 unsigned Qn = fieldFromInstruction(
Insn, 17, 3);
6981 fc = fieldFromInstruction(
Insn, 12, 1) << 2 |
6982 fieldFromInstruction(
Insn, 7, 1) |
6983 fieldFromInstruction(
Insn, 5, 1) << 1;
6984 unsigned Rm = fieldFromInstruction(
Insn, 0, 4);
6988 fc = fieldFromInstruction(
Insn, 12, 1) << 2 |
6989 fieldFromInstruction(
Insn, 7, 1) |
6990 fieldFromInstruction(
Insn, 0, 1) << 1;
6991 unsigned Qm = fieldFromInstruction(
Insn, 5, 1) << 4 |
6992 fieldFromInstruction(
Insn, 1, 3);
6997 if (!
Check(S, predicate_decoder(Inst, fc,
Address, Decoder)))
7011 unsigned Rn = fieldFromInstruction(
Insn, 16, 4);
7029 const unsigned Rd = fieldFromInstruction(
Insn, 8, 4);
7030 const unsigned Rn = fieldFromInstruction(
Insn, 16, 4);
7031 const unsigned Imm12 = fieldFromInstruction(
Insn, 26, 1) << 11 |
7032 fieldFromInstruction(
Insn, 12, 3) << 8 |
7033 fieldFromInstruction(
Insn, 0, 8);
7034 const unsigned TypeT3 = fieldFromInstruction(
Insn, 25, 1);
7035 unsigned sign1 = fieldFromInstruction(
Insn, 21, 1);
7036 unsigned sign2 = fieldFromInstruction(
Insn, 23, 1);
7037 unsigned S = fieldFromInstruction(
Insn, 20, 1);
7048 Inst.
setOpcode(sign1 ? ARM::t2SUBspImm12 : ARM::t2ADDspImm12);
7051 Inst.
setOpcode(sign1 ? ARM::t2SUBspImm : ARM::t2ADDspImm);
7066 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 bool PermitsD32(const MCInst &Inst, 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(MCRegister Reg)
static MCOperand createImm(int64_t Val)
MCRegister getReg() const
Returns the register number.
Wrapper class representing physical registers. Should be passed by value.
Generic base class for all target subtargets.
bool hasFeature(unsigned Feature) const
const FeatureBitset & getFeatureBits() const
Wrapper class representing virtual and physical registers.
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
Target - Wrapper for Target specific information.
LLVM Value Representation.
This class implements an extremely fast bulk output stream that can only output to a stream.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
unsigned getAM2Opc(AddrOpc Opc, unsigned Imm12, ShiftOpc SO, unsigned IdxMode=0)
unsigned getAM5Opc(AddrOpc Opc, unsigned char Offset)
getAM5Opc - This function encodes the addrmode5 opc field.
unsigned getAM5FP16Opc(AddrOpc Opc, unsigned char Offset)
getAM5FP16Opc - This function encodes the addrmode5fp16 opc field.
bool isVpred(OperandType op)
bool isCDECoproc(size_t Coproc, const MCSubtargetInfo &STI)
@ D16
Only 16 D registers.
constexpr std::underlying_type_t< E > Mask()
Get a bitmask with 1s in all places up to the high-order bit of E's largest value.
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.