32 #define DEBUG_TYPE "arm-disassembler"
51 void advanceITState() {
56 bool instrInITBlock() {
57 return !ITStates.empty();
61 bool instrLastInITBlock() {
62 return ITStates.size() == 1;
68 void setITState(
char Firstcond,
char Mask) {
70 unsigned CondBit0 = Firstcond & 1;
71 unsigned NumTZ = countTrailingZeros<uint8_t>(
Mask);
72 unsigned char CCBits =
static_cast<unsigned char>(Firstcond & 0xf);
73 assert(NumTZ <= 3 &&
"Invalid IT mask!");
75 for (
unsigned Pos = NumTZ+1; Pos <= 3; ++Pos) {
76 bool T = ((Mask >> Pos) & 1) == CondBit0;
78 ITStates.push_back(CCBits);
80 ITStates.push_back(CCBits ^ 1);
82 ITStates.push_back(CCBits);
86 std::vector<unsigned char> ITStates;
96 ~ARMDisassembler()
override =
default;
111 ~ThumbDisassembler()
override =
default;
119 mutable ITStatus ITBlock;
121 void UpdateThumbVFPPredicate(
MCInst&)
const;
144 uint64_t
Address,
const void *Decoder);
146 unsigned RegNo, uint64_t
Address,
147 const void *Decoder);
149 unsigned RegNo, uint64_t
Address,
150 const void *Decoder);
152 uint64_t
Address,
const void *Decoder);
154 uint64_t
Address,
const void *Decoder);
156 uint64_t
Address,
const void *Decoder);
158 uint64_t
Address,
const void *Decoder);
160 uint64_t
Address,
const void *Decoder);
162 uint64_t
Address,
const void *Decoder);
164 uint64_t
Address,
const void *Decoder);
168 const void *Decoder);
170 uint64_t
Address,
const void *Decoder);
172 uint64_t
Address,
const void *Decoder);
174 unsigned RegNo, uint64_t
Address,
175 const void *Decoder);
178 uint64_t
Address,
const void *Decoder);
180 uint64_t
Address,
const void *Decoder);
182 uint64_t
Address,
const void *Decoder);
184 uint64_t
Address,
const void *Decoder);
186 uint64_t
Address,
const void *Decoder);
189 uint64_t
Address,
const void *Decoder);
191 uint64_t
Address,
const void *Decoder);
195 const void *Decoder);
197 uint64_t
Address,
const void *Decoder);
199 uint64_t
Address,
const void *Decoder);
201 uint64_t
Address,
const void *Decoder);
203 uint64_t
Address,
const void *Decoder);
208 const void *Decoder);
210 uint64_t
Address,
const void *Decoder);
212 uint64_t
Address,
const void *Decoder);
214 uint64_t
Address,
const void *Decoder);
216 uint64_t
Address,
const void *Decoder);
218 uint64_t
Address,
const void *Decoder);
220 uint64_t
Address,
const void *Decoder);
222 uint64_t
Address,
const void *Decoder);
224 uint64_t
Address,
const void *Decoder);
226 uint64_t
Address,
const void *Decoder);
228 uint64_t
Address,
const void *Decoder);
230 uint64_t
Address,
const void *Decoder);
232 uint64_t
Address,
const void *Decoder);
234 uint64_t
Address,
const void *Decoder);
236 uint64_t
Address,
const void *Decoder);
238 uint64_t
Address,
const void *Decoder);
240 uint64_t
Address,
const void *Decoder);
242 uint64_t
Address,
const void *Decoder);
244 uint64_t
Address,
const void *Decoder);
246 uint64_t
Address,
const void *Decoder);
248 uint64_t
Address,
const void *Decoder);
250 uint64_t
Address,
const void *Decoder);
252 uint64_t
Address,
const void *Decoder);
254 uint64_t
Address,
const void *Decoder);
256 uint64_t
Address,
const void *Decoder);
258 uint64_t
Address,
const void *Decoder);
260 uint64_t
Address,
const void *Decoder);
262 uint64_t
Address,
const void *Decoder);
264 uint64_t
Address,
const void *Decoder);
266 uint64_t
Address,
const void *Decoder);
268 uint64_t
Address,
const void *Decoder);
270 uint64_t
Address,
const void *Decoder);
272 uint64_t
Address,
const void *Decoder);
274 uint64_t
Address,
const void *Decoder);
276 uint64_t
Address,
const void *Decoder);
278 uint64_t
Address,
const void *Decoder);
280 uint64_t
Address,
const void *Decoder);
282 uint64_t
Address,
const void *Decoder);
284 uint64_t
Address,
const void *Decoder);
286 uint64_t
Address,
const void *Decoder);
288 uint64_t
Address,
const void *Decoder);
290 uint64_t
Address,
const void *Decoder);
292 uint64_t
Address,
const void *Decoder);
294 uint64_t
Address,
const void *Decoder);
296 uint64_t
Address,
const void *Decoder);
298 uint64_t
Address,
const void *Decoder);
300 uint64_t
Address,
const void *Decoder);
302 uint64_t
Address,
const void *Decoder);
304 uint64_t
Address,
const void *Decoder);
306 uint64_t
Address,
const void *Decoder);
308 uint64_t
Address,
const void *Decoder);
310 uint64_t
Address,
const void *Decoder);
312 uint64_t
Address,
const void *Decoder);
314 uint64_t
Address,
const void *Decoder);
316 uint64_t
Address,
const void *Decoder);
318 uint64_t
Address,
const void *Decoder);
320 uint64_t
Address,
const void *Decoder);
322 uint64_t
Address,
const void *Decoder);
325 uint64_t
Address,
const void *Decoder);
327 uint64_t
Address,
const void *Decoder);
329 uint64_t
Address,
const void *Decoder);
331 uint64_t
Address,
const void *Decoder);
333 uint64_t
Address,
const void *Decoder);
335 uint64_t
Address,
const void *Decoder);
337 uint64_t
Address,
const void *Decoder);
339 uint64_t
Address,
const void *Decoder);
341 uint64_t
Address,
const void *Decoder);
343 uint64_t
Address,
const void *Decoder);
345 uint64_t
Address,
const void* Decoder);
347 uint64_t
Address,
const void* Decoder);
349 uint64_t
Address,
const void* Decoder);
351 uint64_t
Address,
const void* Decoder);
353 uint64_t
Address,
const void *Decoder);
355 uint64_t
Address,
const void *Decoder);
357 uint64_t
Address,
const void *Decoder);
359 uint64_t
Address,
const void *Decoder);
361 uint64_t
Address,
const void *Decoder);
363 uint64_t
Address,
const void *Decoder);
365 uint64_t
Address,
const void *Decoder);
367 uint64_t
Address,
const void *Decoder);
369 uint64_t
Address,
const void *Decoder);
371 uint64_t
Address,
const void *Decoder);
373 uint64_t
Address,
const void *Decoder);
375 uint64_t
Address,
const void *Decoder);
377 uint64_t
Address,
const void *Decoder);
379 uint64_t
Address,
const void *Decoder);
381 uint64_t
Address,
const void *Decoder);
383 uint64_t
Address,
const void *Decoder);
385 uint64_t
Address,
const void *Decoder);
387 uint64_t
Address,
const void *Decoder);
389 uint64_t
Address,
const void *Decoder);
391 uint64_t
Address,
const void *Decoder);
393 uint64_t
Address,
const void *Decoder);
395 uint64_t
Address,
const void *Decoder);
398 uint64_t
Address,
const void *Decoder);
400 uint64_t
Address,
const void *Decoder);
402 #include "ARMGenDisassemblerTables.inc"
407 return new ARMDisassembler(STI, Ctx);
413 return new ThumbDisassembler(STI, Ctx);
433 default:
return Result;
443 assert(!STI.getFeatureBits()[ARM::ModeThumb] &&
444 "Asked to disassemble an ARM instruction but Subtarget is in Thumb "
448 if (Bytes.
size() < 4) {
455 (Bytes[3] << 24) | (Bytes[2] << 16) | (Bytes[1] << 8) | (Bytes[0] << 0);
470 const DecodeTable Tables[] = {
471 {DecoderTableVFP32,
false}, {DecoderTableVFPV832,
false},
472 {DecoderTableNEONData32,
true}, {DecoderTableNEONLoadStore32,
true},
473 {DecoderTableNEONDup32,
true}, {DecoderTablev8NEON32,
false},
474 {DecoderTablev8Crypto32,
false},
477 for (
auto Table : Tables) {
513 MCInst &MI,
const void *Decoder) {
530 const void *Decoder) {
543 for (
unsigned i = 0; i < NumOps; ++i, ++
I) {
544 if (I == MI.
end())
break;
545 if (OpInfo[i].isOptionalDef() && OpInfo[i].
RegClass == ARM::CCRRegClassID) {
546 if (i > 0 && OpInfo[i-1].isPredicate())
continue;
560 ThumbDisassembler::AddThumbPredicate(
MCInst &MI)
const {
563 const FeatureBitset &FeatureBits = getSubtargetInfo().getFeatureBits();
580 if (ITBlock.instrInITBlock())
586 if (MI.
getOperand(0).
getImm() == 0x10 && (FeatureBits[ARM::FeatureRAS]) != 0)
595 if (ITBlock.instrInITBlock() && !ITBlock.instrLastInITBlock())
605 CC = ITBlock.getITCC();
608 if (ITBlock.instrInITBlock())
609 ITBlock.advanceITState();
614 for (
unsigned i = 0; i < NumOps; ++i, ++
I) {
615 if (I == MI.
end())
break;
616 if (OpInfo[i].isPredicate()) {
642 void ThumbDisassembler::UpdateThumbVFPPredicate(
MCInst &MI)
const {
644 CC = ITBlock.getITCC();
645 if (ITBlock.instrInITBlock())
646 ITBlock.advanceITState();
651 for (
unsigned i = 0; i < NumOps; ++i, ++
I) {
652 if (OpInfo[i].isPredicate() ) {
658 I->setReg(ARM::CPSR);
671 assert(STI.getFeatureBits()[ARM::ModeThumb] &&
672 "Asked to disassemble in Thumb mode but Subtarget is in ARM mode!");
675 if (Bytes.
size() < 2) {
680 uint16_t Insn16 = (Bytes[1] << 8) | Bytes[0];
685 Check(Result, AddThumbPredicate(MI));
693 bool InITBlock = ITBlock.instrInITBlock();
694 Check(Result, AddThumbPredicate(MI));
706 if (MI.
getOpcode() == ARM::t2IT && ITBlock.instrInITBlock())
709 Check(Result, AddThumbPredicate(MI));
718 ITBlock.setITState(Firstcond, Mask);
725 if (Bytes.
size() < 4) {
731 (Bytes[3] << 8) | (Bytes[2] << 0) | (Bytes[1] << 24) | (Bytes[0] << 16);
736 bool InITBlock = ITBlock.instrInITBlock();
737 Check(Result, AddThumbPredicate(MI));
746 Check(Result, AddThumbPredicate(MI));
750 if (fieldFromInstruction(Insn32, 28, 4) == 0xE) {
755 UpdateThumbVFPPredicate(MI);
767 if (fieldFromInstruction(Insn32, 28, 4) == 0xE) {
772 Check(Result, AddThumbPredicate(MI));
777 if (fieldFromInstruction(Insn32, 24, 8) == 0xF9) {
779 NEONLdStInsn &= 0xF0FFFFFF;
780 NEONLdStInsn |= 0x04000000;
785 Check(Result, AddThumbPredicate(MI));
790 if (fieldFromInstruction(Insn32, 24, 4) == 0xF) {
792 NEONDataInsn &= 0xF0FFFFFF;
793 NEONDataInsn |= (NEONDataInsn & 0x10000000) >> 4;
794 NEONDataInsn |= 0x12000000;
799 Check(Result, AddThumbPredicate(MI));
804 NEONCryptoInsn &= 0xF0FFFFFF;
805 NEONCryptoInsn |= (NEONCryptoInsn & 0x10000000) >> 4;
806 NEONCryptoInsn |= 0x12000000;
815 NEONv8Insn &= 0xF3FFFFFF;
840 ARM::R0, ARM::R1,
ARM::R2, ARM::R3,
842 ARM::R8, ARM::R9, ARM::R10, ARM::R11,
843 ARM::R12, ARM::SP, ARM::LR, ARM::PC
847 uint64_t Address,
const void *Decoder) {
858 uint64_t Address,
const void *Decoder) {
871 uint64_t Address,
const void *Decoder) {
885 uint64_t Address,
const void *Decoder) {
892 ARM::R0_R1, ARM::R2_R3, ARM::R4_R5, ARM::R6_R7,
893 ARM::R8_R9, ARM::R10_R11, ARM::R12_SP
897 uint64_t Address,
const void *Decoder) {
903 if ((RegNo & 1) || RegNo == 0xe)
912 uint64_t Address,
const void *Decoder) {
942 uint64_t Address,
const void *Decoder) {
946 ((
const MCDisassembler*)Decoder)->getSubtargetInfo().getFeatureBits();
948 if ((RegNo == 13 && !featureBits[ARM::HasV8Ops]) || RegNo == 15)
956 ARM::S0, ARM::S1, ARM::S2, ARM::S3,
957 ARM::S4, ARM::S5, ARM::S6, ARM::S7,
958 ARM::S8, ARM::S9, ARM::S10, ARM::S11,
959 ARM::S12, ARM::S13, ARM::S14, ARM::S15,
960 ARM::S16, ARM::S17, ARM::S18, ARM::S19,
961 ARM::S20, ARM::S21, ARM::S22, ARM::S23,
962 ARM::S24, ARM::S25, ARM::S26, ARM::S27,
963 ARM::S28, ARM::S29, ARM::S30, ARM::S31
967 uint64_t Address,
const void *Decoder) {
977 ARM::D0, ARM::D1, ARM::D2, ARM::D3,
978 ARM::D4, ARM::D5, ARM::D6, ARM::D7,
979 ARM::D8, ARM::D9, ARM::D10, ARM::D11,
980 ARM::D12, ARM::D13, ARM::D14, ARM::D15,
981 ARM::D16, ARM::D17, ARM::D18, ARM::D19,
982 ARM::D20, ARM::D21, ARM::D22, ARM::D23,
983 ARM::D24, ARM::D25, ARM::D26, ARM::D27,
984 ARM::D28, ARM::D29, ARM::D30, ARM::D31
988 uint64_t Address,
const void *Decoder) {
990 ((
const MCDisassembler*)Decoder)->getSubtargetInfo().getFeatureBits();
992 bool hasD16 = featureBits[ARM::FeatureD16];
994 if (RegNo > 31 || (hasD16 && RegNo > 15))
1003 uint64_t Address,
const void *Decoder) {
1011 uint64_t Address,
const void *Decoder) {
1018 ARM::Q0, ARM::Q1, ARM::Q2, ARM::Q3,
1019 ARM::Q4, ARM::Q5, ARM::Q6, ARM::Q7,
1020 ARM::Q8, ARM::Q9, ARM::Q10, ARM::Q11,
1021 ARM::Q12, ARM::Q13, ARM::Q14, ARM::Q15
1025 uint64_t Address,
const void *Decoder) {
1026 if (RegNo > 31 || (RegNo & 1) != 0)
1036 ARM::Q0, ARM::D1_D2, ARM::Q1, ARM::D3_D4, ARM::Q2, ARM::D5_D6,
1037 ARM::Q3, ARM::D7_D8, ARM::Q4, ARM::D9_D10, ARM::Q5, ARM::D11_D12,
1038 ARM::Q6, ARM::D13_D14, ARM::Q7, ARM::D15_D16, ARM::Q8, ARM::D17_D18,
1039 ARM::Q9, ARM::D19_D20, ARM::Q10, ARM::D21_D22, ARM::Q11, ARM::D23_D24,
1040 ARM::Q12, ARM::D25_D26, ARM::Q13, ARM::D27_D28, ARM::Q14, ARM::D29_D30,
1045 uint64_t Address,
const void *Decoder) {
1055 ARM::D0_D2, ARM::D1_D3, ARM::D2_D4, ARM::D3_D5,
1056 ARM::D4_D6, ARM::D5_D7, ARM::D6_D8, ARM::D7_D9,
1057 ARM::D8_D10, ARM::D9_D11, ARM::D10_D12, ARM::D11_D13,
1058 ARM::D12_D14, ARM::D13_D15, ARM::D14_D16, ARM::D15_D17,
1059 ARM::D16_D18, ARM::D17_D19, ARM::D18_D20, ARM::D19_D21,
1060 ARM::D20_D22, ARM::D21_D23, ARM::D22_D24, ARM::D23_D25,
1061 ARM::D24_D26, ARM::D25_D27, ARM::D26_D28, ARM::D27_D29,
1062 ARM::D28_D30, ARM::D29_D31
1068 const void *Decoder) {
1078 uint64_t Address,
const void *Decoder) {
1081 if (Inst.
getOpcode() == ARM::tBcc && Val == 0xE)
1092 uint64_t Address,
const void *Decoder) {
1101 uint64_t Address,
const void *Decoder) {
1104 unsigned Rm = fieldFromInstruction(Val, 0, 4);
1105 unsigned type = fieldFromInstruction(Val, 5, 2);
1106 unsigned imm = fieldFromInstruction(Val, 7, 5);
1131 unsigned Op = Shift | (imm << 3);
1138 uint64_t Address,
const void *Decoder) {
1141 unsigned Rm = fieldFromInstruction(Val, 0, 4);
1142 unsigned type = fieldFromInstruction(Val, 5, 2);
1143 unsigned Rs = fieldFromInstruction(Val, 8, 4);
1173 uint64_t Address,
const void *Decoder) {
1176 bool NeedDisjointWriteback =
false;
1177 unsigned WritebackReg = 0;
1181 case ARM::LDMIA_UPD:
1182 case ARM::LDMDB_UPD:
1183 case ARM::LDMIB_UPD:
1184 case ARM::LDMDA_UPD:
1185 case ARM::t2LDMIA_UPD:
1186 case ARM::t2LDMDB_UPD:
1187 case ARM::t2STMIA_UPD:
1188 case ARM::t2STMDB_UPD:
1189 NeedDisjointWriteback =
true;
1196 for (
unsigned i = 0; i < 16; ++i) {
1197 if (Val & (1 << i)) {
1201 if (NeedDisjointWriteback && WritebackReg == Inst.
end()[-1].getReg())
1210 uint64_t Address,
const void *Decoder) {
1213 unsigned Vd = fieldFromInstruction(Val, 8, 5);
1214 unsigned regs = fieldFromInstruction(Val, 0, 8);
1217 if (regs == 0 || (Vd + regs) > 32) {
1218 regs = Vd + regs > 32 ? 32 - Vd : regs;
1225 for (
unsigned i = 0; i < (regs - 1); ++i) {
1234 uint64_t Address,
const void *Decoder) {
1237 unsigned Vd = fieldFromInstruction(Val, 8, 5);
1238 unsigned regs = fieldFromInstruction(Val, 1, 7);
1241 if (regs == 0 || regs > 16 || (Vd + regs) > 32) {
1242 regs = Vd + regs > 32 ? 32 - Vd : regs;
1250 for (
unsigned i = 0; i < (regs - 1); ++i) {
1259 uint64_t Address,
const void *Decoder) {
1265 unsigned msb = fieldFromInstruction(Val, 5, 5);
1266 unsigned lsb = fieldFromInstruction(Val, 0, 5);
1278 if (msb != 31) msb_mask = (1U << (msb+1)) - 1;
1279 uint32_t lsb_mask = (1U << lsb) - 1;
1286 uint64_t Address,
const void *Decoder) {
1289 unsigned pred = fieldFromInstruction(Insn, 28, 4);
1290 unsigned CRd = fieldFromInstruction(Insn, 12, 4);
1291 unsigned coproc = fieldFromInstruction(Insn, 8, 4);
1292 unsigned imm = fieldFromInstruction(Insn, 0, 8);
1293 unsigned Rn = fieldFromInstruction(Insn, 16, 4);
1294 unsigned U = fieldFromInstruction(Insn, 23, 1);
1297 case ARM::LDC_OFFSET:
1300 case ARM::LDC_OPTION:
1301 case ARM::LDCL_OFFSET:
1303 case ARM::LDCL_POST:
1304 case ARM::LDCL_OPTION:
1305 case ARM::STC_OFFSET:
1308 case ARM::STC_OPTION:
1309 case ARM::STCL_OFFSET:
1311 case ARM::STCL_POST:
1312 case ARM::STCL_OPTION:
1313 case ARM::t2LDC_OFFSET:
1314 case ARM::t2LDC_PRE:
1315 case ARM::t2LDC_POST:
1316 case ARM::t2LDC_OPTION:
1317 case ARM::t2LDCL_OFFSET:
1318 case ARM::t2LDCL_PRE:
1319 case ARM::t2LDCL_POST:
1320 case ARM::t2LDCL_OPTION:
1321 case ARM::t2STC_OFFSET:
1322 case ARM::t2STC_PRE:
1323 case ARM::t2STC_POST:
1324 case ARM::t2STC_OPTION:
1325 case ARM::t2STCL_OFFSET:
1326 case ARM::t2STCL_PRE:
1327 case ARM::t2STCL_POST:
1328 case ARM::t2STCL_OPTION:
1329 if (coproc == 0xA || coproc == 0xB)
1337 ((
const MCDisassembler*)Decoder)->getSubtargetInfo().getFeatureBits();
1338 if (featureBits[ARM::HasV8Ops] && (coproc != 14))
1347 case ARM::t2LDC2_OFFSET:
1348 case ARM::t2LDC2L_OFFSET:
1349 case ARM::t2LDC2_PRE:
1350 case ARM::t2LDC2L_PRE:
1351 case ARM::t2STC2_OFFSET:
1352 case ARM::t2STC2L_OFFSET:
1353 case ARM::t2STC2_PRE:
1354 case ARM::t2STC2L_PRE:
1355 case ARM::LDC2_OFFSET:
1356 case ARM::LDC2L_OFFSET:
1358 case ARM::LDC2L_PRE:
1359 case ARM::STC2_OFFSET:
1360 case ARM::STC2L_OFFSET:
1362 case ARM::STC2L_PRE:
1363 case ARM::t2LDC_OFFSET:
1364 case ARM::t2LDCL_OFFSET:
1365 case ARM::t2LDC_PRE:
1366 case ARM::t2LDCL_PRE:
1367 case ARM::t2STC_OFFSET:
1368 case ARM::t2STCL_OFFSET:
1369 case ARM::t2STC_PRE:
1370 case ARM::t2STCL_PRE:
1371 case ARM::LDC_OFFSET:
1372 case ARM::LDCL_OFFSET:
1375 case ARM::STC_OFFSET:
1376 case ARM::STCL_OFFSET:
1382 case ARM::t2LDC2_POST:
1383 case ARM::t2LDC2L_POST:
1384 case ARM::t2STC2_POST:
1385 case ARM::t2STC2L_POST:
1386 case ARM::LDC2_POST:
1387 case ARM::LDC2L_POST:
1388 case ARM::STC2_POST:
1389 case ARM::STC2L_POST:
1390 case ARM::t2LDC_POST:
1391 case ARM::t2LDCL_POST:
1392 case ARM::t2STC_POST:
1393 case ARM::t2STCL_POST:
1395 case ARM::LDCL_POST:
1397 case ARM::STCL_POST:
1408 case ARM::LDC_OFFSET:
1411 case ARM::LDC_OPTION:
1412 case ARM::LDCL_OFFSET:
1414 case ARM::LDCL_POST:
1415 case ARM::LDCL_OPTION:
1416 case ARM::STC_OFFSET:
1419 case ARM::STC_OPTION:
1420 case ARM::STCL_OFFSET:
1422 case ARM::STCL_POST:
1423 case ARM::STCL_OPTION:
1436 uint64_t Address,
const void *Decoder) {
1439 unsigned Rn = fieldFromInstruction(Insn, 16, 4);
1440 unsigned Rt = fieldFromInstruction(Insn, 12, 4);
1441 unsigned Rm = fieldFromInstruction(Insn, 0, 4);
1442 unsigned imm = fieldFromInstruction(Insn, 0, 12);
1443 unsigned pred = fieldFromInstruction(Insn, 28, 4);
1444 unsigned reg = fieldFromInstruction(Insn, 25, 1);
1445 unsigned P = fieldFromInstruction(Insn, 24, 1);
1446 unsigned W = fieldFromInstruction(Insn, 21, 1);
1450 case ARM::STR_POST_IMM:
1451 case ARM::STR_POST_REG:
1452 case ARM::STRB_POST_IMM:
1453 case ARM::STRB_POST_REG:
1454 case ARM::STRT_POST_REG:
1455 case ARM::STRT_POST_IMM:
1456 case ARM::STRBT_POST_REG:
1457 case ARM::STRBT_POST_IMM:
1470 case ARM::LDR_POST_IMM:
1471 case ARM::LDR_POST_REG:
1472 case ARM::LDRB_POST_IMM:
1473 case ARM::LDRB_POST_REG:
1474 case ARM::LDRBT_POST_REG:
1475 case ARM::LDRBT_POST_IMM:
1476 case ARM::LDRT_POST_REG:
1477 case ARM::LDRT_POST_IMM:
1489 if (!fieldFromInstruction(Insn, 23, 1))
1492 bool writeback = (P == 0) || (W == 1);
1493 unsigned idx_mode = 0;
1496 else if (!P && writeback)
1499 if (writeback && (Rn == 15 || Rn == Rt))
1506 switch( fieldFromInstruction(Insn, 5, 2)) {
1522 unsigned amt = fieldFromInstruction(Insn, 7, 5);
1541 uint64_t Address,
const void *Decoder) {
1544 unsigned Rn = fieldFromInstruction(Val, 13, 4);
1545 unsigned Rm = fieldFromInstruction(Val, 0, 4);
1546 unsigned type = fieldFromInstruction(Val, 5, 2);
1547 unsigned imm = fieldFromInstruction(Val, 7, 5);
1548 unsigned U = fieldFromInstruction(Val, 12, 1);
1585 uint64_t Address,
const void *Decoder) {
1588 unsigned Rt = fieldFromInstruction(Insn, 12, 4);
1589 unsigned Rn = fieldFromInstruction(Insn, 16, 4);
1590 unsigned Rm = fieldFromInstruction(Insn, 0, 4);
1591 unsigned type = fieldFromInstruction(Insn, 22, 1);
1592 unsigned imm = fieldFromInstruction(Insn, 8, 4);
1593 unsigned U = ((~fieldFromInstruction(Insn, 23, 1)) & 1) << 8;
1594 unsigned pred = fieldFromInstruction(Insn, 28, 4);
1595 unsigned W = fieldFromInstruction(Insn, 21, 1);
1596 unsigned P = fieldFromInstruction(Insn, 24, 1);
1597 unsigned Rt2 = Rt + 1;
1599 bool writeback = (W == 1) | (P == 0);
1605 case ARM::STRD_POST:
1608 case ARM::LDRD_POST:
1617 case ARM::STRD_POST:
1618 if (P == 0 && W == 1)
1621 if (writeback && (Rn == 15 || Rn == Rt || Rn == Rt2))
1623 if (type && Rm == 15)
1627 if (!type && fieldFromInstruction(Insn, 8, 4))
1632 case ARM::STRH_POST:
1635 if (writeback && (Rn == 15 || Rn == Rt))
1637 if (!type && Rm == 15)
1642 case ARM::LDRD_POST:
1643 if (type && Rn == 15) {
1648 if (P == 0 && W == 1)
1650 if (!type && (Rt2 == 15 || Rm == 15 || Rm == Rt || Rm == Rt2))
1652 if (!type && writeback && Rn == 15)
1654 if (writeback && (Rn == Rt || Rn == Rt2))
1659 case ARM::LDRH_POST:
1660 if (type && Rn == 15) {
1667 if (!type && Rm == 15)
1669 if (!type && writeback && (Rn == 15 || Rn == Rt))
1673 case ARM::LDRSH_PRE:
1674 case ARM::LDRSH_POST:
1676 case ARM::LDRSB_PRE:
1677 case ARM::LDRSB_POST:
1678 if (type && Rn == 15) {
1683 if (type && (Rt == 15 || (writeback && Rn == Rt)))
1685 if (!type && (Rt == 15 || Rm == 15))
1687 if (!type && writeback && (Rn == 15 || Rn == Rt))
1704 case ARM::STRD_POST:
1707 case ARM::STRH_POST:
1721 case ARM::STRD_POST:
1724 case ARM::LDRD_POST:
1737 case ARM::LDRD_POST:
1740 case ARM::LDRH_POST:
1742 case ARM::LDRSH_PRE:
1743 case ARM::LDRSH_POST:
1745 case ARM::LDRSB_PRE:
1746 case ARM::LDRSB_POST:
1776 uint64_t Address,
const void *Decoder) {
1779 unsigned Rn = fieldFromInstruction(Insn, 16, 4);
1780 unsigned mode = fieldFromInstruction(Insn, 23, 2);
1805 uint64_t Address,
const void *Decoder) {
1808 unsigned Rd = fieldFromInstruction(Insn, 12, 4);
1809 unsigned Rm = fieldFromInstruction(Insn, 0, 4);
1810 unsigned Rn = fieldFromInstruction(Insn, 16, 4);
1811 unsigned pred = fieldFromInstruction(Insn, 28, 4);
1829 uint64_t Address,
const void *Decoder) {
1832 unsigned Rn = fieldFromInstruction(Insn, 16, 4);
1833 unsigned pred = fieldFromInstruction(Insn, 28, 4);
1834 unsigned reglist = fieldFromInstruction(Insn, 0, 16);
1842 case ARM::LDMDA_UPD:
1848 case ARM::LDMDB_UPD:
1854 case ARM::LDMIA_UPD:
1860 case ARM::LDMIB_UPD:
1866 case ARM::STMDA_UPD:
1872 case ARM::STMDB_UPD:
1878 case ARM::STMIA_UPD:
1884 case ARM::STMIB_UPD:
1892 if (fieldFromInstruction(Insn, 20, 1) == 0) {
1894 if (!(fieldFromInstruction(Insn, 22, 1) == 1 &&
1895 fieldFromInstruction(Insn, 20, 1) == 0))
1920 uint64_t Address,
const void *Decoder) {
1921 unsigned pred = fieldFromInstruction(Insn, 28, 4);
1922 unsigned imm8 = fieldFromInstruction(Insn, 0, 8);
1935 if (imm8 == 0x10 && pred != 0xe && ((FeatureBits[ARM::FeatureRAS]) != 0))
1942 uint64_t Address,
const void *Decoder) {
1943 unsigned imod = fieldFromInstruction(Insn, 18, 2);
1944 unsigned M = fieldFromInstruction(Insn, 17, 1);
1945 unsigned iflags = fieldFromInstruction(Insn, 6, 3);
1946 unsigned mode = fieldFromInstruction(Insn, 0, 5);
1952 if (fieldFromInstruction(Insn, 5, 1) != 0 ||
1953 fieldFromInstruction(Insn, 16, 1) != 0 ||
1954 fieldFromInstruction(Insn, 20, 8) != 0x10)
1969 }
else if (imod && !M) {
1974 }
else if (!imod && M) {
1989 uint64_t Address,
const void *Decoder) {
1990 unsigned imod = fieldFromInstruction(Insn, 9, 2);
1991 unsigned M = fieldFromInstruction(Insn, 8, 1);
1992 unsigned iflags = fieldFromInstruction(Insn, 5, 3);
1993 unsigned mode = fieldFromInstruction(Insn, 0, 5);
2009 }
else if (imod && !M) {
2014 }
else if (!imod && M) {
2020 int imm = fieldFromInstruction(Insn, 0, 8);
2031 uint64_t Address,
const void *Decoder) {
2034 unsigned Rd = fieldFromInstruction(Insn, 8, 4);
2037 imm |= (fieldFromInstruction(Insn, 0, 8) << 0);
2038 imm |= (fieldFromInstruction(Insn, 12, 3) << 8);
2039 imm |= (fieldFromInstruction(Insn, 16, 4) << 12);
2040 imm |= (fieldFromInstruction(Insn, 26, 1) << 11);
2055 uint64_t Address,
const void *Decoder) {
2058 unsigned Rd = fieldFromInstruction(Insn, 12, 4);
2059 unsigned pred = fieldFromInstruction(Insn, 28, 4);
2062 imm |= (fieldFromInstruction(Insn, 0, 12) << 0);
2063 imm |= (fieldFromInstruction(Insn, 16, 4) << 12);
2082 uint64_t Address,
const void *Decoder) {
2085 unsigned Rd = fieldFromInstruction(Insn, 16, 4);
2086 unsigned Rn = fieldFromInstruction(Insn, 0, 4);
2087 unsigned Rm = fieldFromInstruction(Insn, 8, 4);
2088 unsigned Ra = fieldFromInstruction(Insn, 12, 4);
2089 unsigned pred = fieldFromInstruction(Insn, 28, 4);
2110 uint64_t Address,
const void *Decoder) {
2113 unsigned Pred = fieldFromInstruction(Insn, 28, 4);
2114 unsigned Rn = fieldFromInstruction(Insn, 16, 4);
2115 unsigned Rm = fieldFromInstruction(Insn, 0, 4);
2131 uint64_t Address,
const void *Decoder) {
2134 unsigned Imm = fieldFromInstruction(Insn, 9, 1);
2139 if (!FeatureBits[ARM::HasV8_1aOps] ||
2140 !FeatureBits[ARM::HasV8Ops])
2145 if (fieldFromInstruction(Insn, 20,12) != 0xf11 ||
2146 fieldFromInstruction(Insn, 4,4) != 0)
2148 if (fieldFromInstruction(Insn, 10,10) != 0 ||
2149 fieldFromInstruction(Insn, 0,4) != 0)
2159 uint64_t Address,
const void *Decoder) {
2162 unsigned add = fieldFromInstruction(Val, 12, 1);
2163 unsigned imm = fieldFromInstruction(Val, 0, 12);
2164 unsigned Rn = fieldFromInstruction(Val, 13, 4);
2169 if (!add) imm *= -1;
2170 if (imm == 0 && !add) imm = INT32_MIN;
2179 uint64_t Address,
const void *Decoder) {
2182 unsigned Rn = fieldFromInstruction(Val, 9, 4);
2184 unsigned U = fieldFromInstruction(Val, 8, 1);
2185 unsigned imm = fieldFromInstruction(Val, 0, 8);
2199 uint64_t Address,
const void *Decoder) {
2202 unsigned Rn = fieldFromInstruction(Val, 9, 4);
2204 unsigned U = fieldFromInstruction(Val, 8, 1);
2205 unsigned imm = fieldFromInstruction(Val, 0, 8);
2219 uint64_t Address,
const void *Decoder) {
2225 uint64_t Address,
const void *Decoder) {
2234 unsigned S = fieldFromInstruction(Insn, 26, 1);
2235 unsigned J1 = fieldFromInstruction(Insn, 13, 1);
2236 unsigned J2 = fieldFromInstruction(Insn, 11, 1);
2237 unsigned I1 = !(J1 ^ S);
2238 unsigned I2 = !(J2 ^ S);
2239 unsigned imm10 = fieldFromInstruction(Insn, 16, 10);
2240 unsigned imm11 = fieldFromInstruction(Insn, 0, 11);
2241 unsigned tmp = (S << 23) | (I1 << 22) | (I2 << 21) | (imm10 << 11) | imm11;
2242 int imm32 = SignExtend32<25>(tmp << 1);
2244 true, 4, Inst, Decoder))
2252 uint64_t Address,
const void *Decoder) {
2255 unsigned pred = fieldFromInstruction(Insn, 28, 4);
2256 unsigned imm = fieldFromInstruction(Insn, 0, 24) << 2;
2260 imm |= fieldFromInstruction(Insn, 24, 1) << 1;
2262 true, 4, Inst, Decoder))
2268 true, 4, Inst, Decoder))
2277 uint64_t Address,
const void *Decoder) {
2280 unsigned Rm = fieldFromInstruction(Val, 0, 4);
2281 unsigned align = fieldFromInstruction(Val, 4, 2);
2294 uint64_t Address,
const void *Decoder) {
2297 unsigned Rd = fieldFromInstruction(Insn, 12, 4);
2298 Rd |= fieldFromInstruction(Insn, 22, 1) << 4;
2299 unsigned wb = fieldFromInstruction(Insn, 16, 4);
2300 unsigned Rn = fieldFromInstruction(Insn, 16, 4);
2301 Rn |= fieldFromInstruction(Insn, 4, 2) << 4;
2302 unsigned Rm = fieldFromInstruction(Insn, 0, 4);
2306 case ARM::VLD1q16:
case ARM::VLD1q32:
case ARM::VLD1q64:
case ARM::VLD1q8:
2307 case ARM::VLD1q16wb_fixed:
case ARM::VLD1q16wb_register:
2308 case ARM::VLD1q32wb_fixed:
case ARM::VLD1q32wb_register:
2309 case ARM::VLD1q64wb_fixed:
case ARM::VLD1q64wb_register:
2310 case ARM::VLD1q8wb_fixed:
case ARM::VLD1q8wb_register:
2311 case ARM::VLD2d16:
case ARM::VLD2d32:
case ARM::VLD2d8:
2312 case ARM::VLD2d16wb_fixed:
case ARM::VLD2d16wb_register:
2313 case ARM::VLD2d32wb_fixed:
case ARM::VLD2d32wb_register:
2314 case ARM::VLD2d8wb_fixed:
case ARM::VLD2d8wb_register:
2321 case ARM::VLD2b16wb_fixed:
2322 case ARM::VLD2b16wb_register:
2323 case ARM::VLD2b32wb_fixed:
2324 case ARM::VLD2b32wb_register:
2325 case ARM::VLD2b8wb_fixed:
2326 case ARM::VLD2b8wb_register:
2340 case ARM::VLD3d8_UPD:
2341 case ARM::VLD3d16_UPD:
2342 case ARM::VLD3d32_UPD:
2346 case ARM::VLD4d8_UPD:
2347 case ARM::VLD4d16_UPD:
2348 case ARM::VLD4d32_UPD:
2355 case ARM::VLD3q8_UPD:
2356 case ARM::VLD3q16_UPD:
2357 case ARM::VLD3q32_UPD:
2361 case ARM::VLD4q8_UPD:
2362 case ARM::VLD4q16_UPD:
2363 case ARM::VLD4q32_UPD:
2375 case ARM::VLD3d8_UPD:
2376 case ARM::VLD3d16_UPD:
2377 case ARM::VLD3d32_UPD:
2381 case ARM::VLD4d8_UPD:
2382 case ARM::VLD4d16_UPD:
2383 case ARM::VLD4d32_UPD:
2390 case ARM::VLD3q8_UPD:
2391 case ARM::VLD3q16_UPD:
2392 case ARM::VLD3q32_UPD:
2396 case ARM::VLD4q8_UPD:
2397 case ARM::VLD4q16_UPD:
2398 case ARM::VLD4q32_UPD:
2411 case ARM::VLD4d8_UPD:
2412 case ARM::VLD4d16_UPD:
2413 case ARM::VLD4d32_UPD:
2420 case ARM::VLD4q8_UPD:
2421 case ARM::VLD4q16_UPD:
2422 case ARM::VLD4q32_UPD:
2432 case ARM::VLD1d8wb_fixed:
2433 case ARM::VLD1d16wb_fixed:
2434 case ARM::VLD1d32wb_fixed:
2435 case ARM::VLD1d64wb_fixed:
2436 case ARM::VLD1d8wb_register:
2437 case ARM::VLD1d16wb_register:
2438 case ARM::VLD1d32wb_register:
2439 case ARM::VLD1d64wb_register:
2440 case ARM::VLD1q8wb_fixed:
2441 case ARM::VLD1q16wb_fixed:
2442 case ARM::VLD1q32wb_fixed:
2443 case ARM::VLD1q64wb_fixed:
2444 case ARM::VLD1q8wb_register:
2445 case ARM::VLD1q16wb_register:
2446 case ARM::VLD1q32wb_register:
2447 case ARM::VLD1q64wb_register:
2448 case ARM::VLD1d8Twb_fixed:
2449 case ARM::VLD1d8Twb_register:
2450 case ARM::VLD1d16Twb_fixed:
2451 case ARM::VLD1d16Twb_register:
2452 case ARM::VLD1d32Twb_fixed:
2453 case ARM::VLD1d32Twb_register:
2454 case ARM::VLD1d64Twb_fixed:
2455 case ARM::VLD1d64Twb_register:
2456 case ARM::VLD1d8Qwb_fixed:
2457 case ARM::VLD1d8Qwb_register:
2458 case ARM::VLD1d16Qwb_fixed:
2459 case ARM::VLD1d16Qwb_register:
2460 case ARM::VLD1d32Qwb_fixed:
2461 case ARM::VLD1d32Qwb_register:
2462 case ARM::VLD1d64Qwb_fixed:
2463 case ARM::VLD1d64Qwb_register:
2464 case ARM::VLD2d8wb_fixed:
2465 case ARM::VLD2d16wb_fixed:
2466 case ARM::VLD2d32wb_fixed:
2467 case ARM::VLD2q8wb_fixed:
2468 case ARM::VLD2q16wb_fixed:
2469 case ARM::VLD2q32wb_fixed:
2470 case ARM::VLD2d8wb_register:
2471 case ARM::VLD2d16wb_register:
2472 case ARM::VLD2d32wb_register:
2473 case ARM::VLD2q8wb_register:
2474 case ARM::VLD2q16wb_register:
2475 case ARM::VLD2q32wb_register:
2476 case ARM::VLD2b8wb_fixed:
2477 case ARM::VLD2b16wb_fixed:
2478 case ARM::VLD2b32wb_fixed:
2479 case ARM::VLD2b8wb_register:
2480 case ARM::VLD2b16wb_register:
2481 case ARM::VLD2b32wb_register:
2484 case ARM::VLD3d8_UPD:
2485 case ARM::VLD3d16_UPD:
2486 case ARM::VLD3d32_UPD:
2487 case ARM::VLD3q8_UPD:
2488 case ARM::VLD3q16_UPD:
2489 case ARM::VLD3q32_UPD:
2490 case ARM::VLD4d8_UPD:
2491 case ARM::VLD4d16_UPD:
2492 case ARM::VLD4d32_UPD:
2493 case ARM::VLD4q8_UPD:
2494 case ARM::VLD4q16_UPD:
2495 case ARM::VLD4q32_UPD:
2522 case ARM::VLD1d8wb_fixed:
2523 case ARM::VLD1d16wb_fixed:
2524 case ARM::VLD1d32wb_fixed:
2525 case ARM::VLD1d64wb_fixed:
2526 case ARM::VLD1d8Twb_fixed:
2527 case ARM::VLD1d16Twb_fixed:
2528 case ARM::VLD1d32Twb_fixed:
2529 case ARM::VLD1d64Twb_fixed:
2530 case ARM::VLD1d8Qwb_fixed:
2531 case ARM::VLD1d16Qwb_fixed:
2532 case ARM::VLD1d32Qwb_fixed:
2533 case ARM::VLD1d64Qwb_fixed:
2534 case ARM::VLD1d8wb_register:
2535 case ARM::VLD1d16wb_register:
2536 case ARM::VLD1d32wb_register:
2537 case ARM::VLD1d64wb_register:
2538 case ARM::VLD1q8wb_fixed:
2539 case ARM::VLD1q16wb_fixed:
2540 case ARM::VLD1q32wb_fixed:
2541 case ARM::VLD1q64wb_fixed:
2542 case ARM::VLD1q8wb_register:
2543 case ARM::VLD1q16wb_register:
2544 case ARM::VLD1q32wb_register:
2545 case ARM::VLD1q64wb_register:
2549 if (Rm != 0xD && Rm != 0xF &&
2553 case ARM::VLD2d8wb_fixed:
2554 case ARM::VLD2d16wb_fixed:
2555 case ARM::VLD2d32wb_fixed:
2556 case ARM::VLD2b8wb_fixed:
2557 case ARM::VLD2b16wb_fixed:
2558 case ARM::VLD2b32wb_fixed:
2559 case ARM::VLD2q8wb_fixed:
2560 case ARM::VLD2q16wb_fixed:
2561 case ARM::VLD2q32wb_fixed:
2569 uint64_t Address,
const void *Decoder) {
2570 unsigned type = fieldFromInstruction(Insn, 8, 4);
2571 unsigned align = fieldFromInstruction(Insn, 4, 2);
2576 unsigned load = fieldFromInstruction(Insn, 21, 1);
2582 uint64_t Address,
const void *Decoder) {
2583 unsigned size = fieldFromInstruction(Insn, 6, 2);
2586 unsigned type = fieldFromInstruction(Insn, 8, 4);
2587 unsigned align = fieldFromInstruction(Insn, 4, 2);
2591 unsigned load = fieldFromInstruction(Insn, 21, 1);
2597 uint64_t Address,
const void *Decoder) {
2598 unsigned size = fieldFromInstruction(Insn, 6, 2);
2601 unsigned align = fieldFromInstruction(Insn, 4, 2);
2604 unsigned load = fieldFromInstruction(Insn, 21, 1);
2610 uint64_t Address,
const void *Decoder) {
2611 unsigned size = fieldFromInstruction(Insn, 6, 2);
2614 unsigned load = fieldFromInstruction(Insn, 21, 1);
2620 uint64_t Address,
const void *Decoder) {
2623 unsigned Rd = fieldFromInstruction(Insn, 12, 4);
2624 Rd |= fieldFromInstruction(Insn, 22, 1) << 4;
2625 unsigned wb = fieldFromInstruction(Insn, 16, 4);
2626 unsigned Rn = fieldFromInstruction(Insn, 16, 4);
2627 Rn |= fieldFromInstruction(Insn, 4, 2) << 4;
2628 unsigned Rm = fieldFromInstruction(Insn, 0, 4);
2632 case ARM::VST1d8wb_fixed:
2633 case ARM::VST1d16wb_fixed:
2634 case ARM::VST1d32wb_fixed:
2635 case ARM::VST1d64wb_fixed:
2636 case ARM::VST1d8wb_register:
2637 case ARM::VST1d16wb_register:
2638 case ARM::VST1d32wb_register:
2639 case ARM::VST1d64wb_register:
2640 case ARM::VST1q8wb_fixed:
2641 case ARM::VST1q16wb_fixed:
2642 case ARM::VST1q32wb_fixed:
2643 case ARM::VST1q64wb_fixed:
2644 case ARM::VST1q8wb_register:
2645 case ARM::VST1q16wb_register:
2646 case ARM::VST1q32wb_register:
2647 case ARM::VST1q64wb_register:
2648 case ARM::VST1d8Twb_fixed:
2649 case ARM::VST1d16Twb_fixed:
2650 case ARM::VST1d32Twb_fixed:
2651 case ARM::VST1d64Twb_fixed:
2652 case ARM::VST1d8Twb_register:
2653 case ARM::VST1d16Twb_register:
2654 case ARM::VST1d32Twb_register:
2655 case ARM::VST1d64Twb_register:
2656 case ARM::VST1d8Qwb_fixed:
2657 case ARM::VST1d16Qwb_fixed:
2658 case ARM::VST1d32Qwb_fixed:
2659 case ARM::VST1d64Qwb_fixed:
2660 case ARM::VST1d8Qwb_register:
2661 case ARM::VST1d16Qwb_register:
2662 case ARM::VST1d32Qwb_register:
2663 case ARM::VST1d64Qwb_register:
2664 case ARM::VST2d8wb_fixed:
2665 case ARM::VST2d16wb_fixed:
2666 case ARM::VST2d32wb_fixed:
2667 case ARM::VST2d8wb_register:
2668 case ARM::VST2d16wb_register:
2669 case ARM::VST2d32wb_register:
2670 case ARM::VST2q8wb_fixed:
2671 case ARM::VST2q16wb_fixed:
2672 case ARM::VST2q32wb_fixed:
2673 case ARM::VST2q8wb_register:
2674 case ARM::VST2q16wb_register:
2675 case ARM::VST2q32wb_register:
2676 case ARM::VST2b8wb_fixed:
2677 case ARM::VST2b16wb_fixed:
2678 case ARM::VST2b32wb_fixed:
2679 case ARM::VST2b8wb_register:
2680 case ARM::VST2b16wb_register:
2681 case ARM::VST2b32wb_register:
2686 case ARM::VST3d8_UPD:
2687 case ARM::VST3d16_UPD:
2688 case ARM::VST3d32_UPD:
2689 case ARM::VST3q8_UPD:
2690 case ARM::VST3q16_UPD:
2691 case ARM::VST3q32_UPD:
2692 case ARM::VST4d8_UPD:
2693 case ARM::VST4d16_UPD:
2694 case ARM::VST4d32_UPD:
2695 case ARM::VST4q8_UPD:
2696 case ARM::VST4q16_UPD:
2697 case ARM::VST4q32_UPD:
2714 else if (Rm != 0xF) {
2719 case ARM::VST1d8wb_fixed:
2720 case ARM::VST1d16wb_fixed:
2721 case ARM::VST1d32wb_fixed:
2722 case ARM::VST1d64wb_fixed:
2723 case ARM::VST1q8wb_fixed:
2724 case ARM::VST1q16wb_fixed:
2725 case ARM::VST1q32wb_fixed:
2726 case ARM::VST1q64wb_fixed:
2727 case ARM::VST1d8Twb_fixed:
2728 case ARM::VST1d16Twb_fixed:
2729 case ARM::VST1d32Twb_fixed:
2730 case ARM::VST1d64Twb_fixed:
2731 case ARM::VST1d8Qwb_fixed:
2732 case ARM::VST1d16Qwb_fixed:
2733 case ARM::VST1d32Qwb_fixed:
2734 case ARM::VST1d64Qwb_fixed:
2735 case ARM::VST2d8wb_fixed:
2736 case ARM::VST2d16wb_fixed:
2737 case ARM::VST2d32wb_fixed:
2738 case ARM::VST2q8wb_fixed:
2739 case ARM::VST2q16wb_fixed:
2740 case ARM::VST2q32wb_fixed:
2741 case ARM::VST2b8wb_fixed:
2742 case ARM::VST2b16wb_fixed:
2743 case ARM::VST2b32wb_fixed:
2754 case ARM::VST1q16wb_fixed:
2755 case ARM::VST1q16wb_register:
2756 case ARM::VST1q32wb_fixed:
2757 case ARM::VST1q32wb_register:
2758 case ARM::VST1q64wb_fixed:
2759 case ARM::VST1q64wb_register:
2760 case ARM::VST1q8wb_fixed:
2761 case ARM::VST1q8wb_register:
2765 case ARM::VST2d16wb_fixed:
2766 case ARM::VST2d16wb_register:
2767 case ARM::VST2d32wb_fixed:
2768 case ARM::VST2d32wb_register:
2769 case ARM::VST2d8wb_fixed:
2770 case ARM::VST2d8wb_register:
2777 case ARM::VST2b16wb_fixed:
2778 case ARM::VST2b16wb_register:
2779 case ARM::VST2b32wb_fixed:
2780 case ARM::VST2b32wb_register:
2781 case ARM::VST2b8wb_fixed:
2782 case ARM::VST2b8wb_register:
2796 case ARM::VST3d8_UPD:
2797 case ARM::VST3d16_UPD:
2798 case ARM::VST3d32_UPD:
2802 case ARM::VST4d8_UPD:
2803 case ARM::VST4d16_UPD:
2804 case ARM::VST4d32_UPD:
2811 case ARM::VST3q8_UPD:
2812 case ARM::VST3q16_UPD:
2813 case ARM::VST3q32_UPD:
2817 case ARM::VST4q8_UPD:
2818 case ARM::VST4q16_UPD:
2819 case ARM::VST4q32_UPD:
2832 case ARM::VST3d8_UPD:
2833 case ARM::VST3d16_UPD:
2834 case ARM::VST3d32_UPD:
2838 case ARM::VST4d8_UPD:
2839 case ARM::VST4d16_UPD:
2840 case ARM::VST4d32_UPD:
2847 case ARM::VST3q8_UPD:
2848 case ARM::VST3q16_UPD:
2849 case ARM::VST3q32_UPD:
2853 case ARM::VST4q8_UPD:
2854 case ARM::VST4q16_UPD:
2855 case ARM::VST4q32_UPD:
2868 case ARM::VST4d8_UPD:
2869 case ARM::VST4d16_UPD:
2870 case ARM::VST4d32_UPD:
2877 case ARM::VST4q8_UPD:
2878 case ARM::VST4q16_UPD:
2879 case ARM::VST4q32_UPD:
2891 uint64_t Address,
const void *Decoder) {
2894 unsigned Rd = fieldFromInstruction(Insn, 12, 4);
2895 Rd |= fieldFromInstruction(Insn, 22, 1) << 4;
2896 unsigned Rn = fieldFromInstruction(Insn, 16, 4);
2897 unsigned Rm = fieldFromInstruction(Insn, 0, 4);
2898 unsigned align = fieldFromInstruction(Insn, 4, 1);
2899 unsigned size = fieldFromInstruction(Insn, 6, 2);
2901 if (size == 0 && align == 1)
2903 align *= (1 << size);
2906 case ARM::VLD1DUPq16:
case ARM::VLD1DUPq32:
case ARM::VLD1DUPq8:
2907 case ARM::VLD1DUPq16wb_fixed:
case ARM::VLD1DUPq16wb_register:
2908 case ARM::VLD1DUPq32wb_fixed:
case ARM::VLD1DUPq32wb_register:
2909 case ARM::VLD1DUPq8wb_fixed:
case ARM::VLD1DUPq8wb_register:
2930 if (Rm != 0xD && Rm != 0xF &&
2938 uint64_t Address,
const void *Decoder) {
2941 unsigned Rd = fieldFromInstruction(Insn, 12, 4);
2942 Rd |= fieldFromInstruction(Insn, 22, 1) << 4;
2943 unsigned Rn = fieldFromInstruction(Insn, 16, 4);
2944 unsigned Rm = fieldFromInstruction(Insn, 0, 4);
2945 unsigned align = fieldFromInstruction(Insn, 4, 1);
2946 unsigned size = 1 << fieldFromInstruction(Insn, 6, 2);
2950 case ARM::VLD2DUPd16:
case ARM::VLD2DUPd32:
case ARM::VLD2DUPd8:
2951 case ARM::VLD2DUPd16wb_fixed:
case ARM::VLD2DUPd16wb_register:
2952 case ARM::VLD2DUPd32wb_fixed:
case ARM::VLD2DUPd32wb_register:
2953 case ARM::VLD2DUPd8wb_fixed:
case ARM::VLD2DUPd8wb_register:
2957 case ARM::VLD2DUPd16x2:
case ARM::VLD2DUPd32x2:
case ARM::VLD2DUPd8x2:
2958 case ARM::VLD2DUPd16x2wb_fixed:
case ARM::VLD2DUPd16x2wb_register:
2959 case ARM::VLD2DUPd32x2wb_fixed:
case ARM::VLD2DUPd32x2wb_register:
2960 case ARM::VLD2DUPd8x2wb_fixed:
case ARM::VLD2DUPd8x2wb_register:
2977 if (Rm != 0xD && Rm != 0xF) {
2986 uint64_t Address,
const void *Decoder) {
2989 unsigned Rd = fieldFromInstruction(Insn, 12, 4);
2990 Rd |= fieldFromInstruction(Insn, 22, 1) << 4;
2991 unsigned Rn = fieldFromInstruction(Insn, 16, 4);
2992 unsigned Rm = fieldFromInstruction(Insn, 0, 4);
2993 unsigned inc = fieldFromInstruction(Insn, 5, 1) + 1;
3012 else if (Rm != 0xF) {
3021 uint64_t Address,
const void *Decoder) {
3024 unsigned Rd = fieldFromInstruction(Insn, 12, 4);
3025 Rd |= fieldFromInstruction(Insn, 22, 1) << 4;
3026 unsigned Rn = fieldFromInstruction(Insn, 16, 4);
3027 unsigned Rm = fieldFromInstruction(Insn, 0, 4);
3028 unsigned size = fieldFromInstruction(Insn, 6, 2);
3029 unsigned inc = fieldFromInstruction(Insn, 5, 1) + 1;
3030 unsigned align = fieldFromInstruction(Insn, 4, 1);
3064 else if (Rm != 0xF) {
3074 uint64_t Address,
const void *Decoder) {
3077 unsigned Rd = fieldFromInstruction(Insn, 12, 4);
3078 Rd |= fieldFromInstruction(Insn, 22, 1) << 4;
3079 unsigned imm = fieldFromInstruction(Insn, 0, 4);
3080 imm |= fieldFromInstruction(Insn, 16, 3) << 4;
3081 imm |= fieldFromInstruction(Insn, 24, 1) << 7;
3082 imm |= fieldFromInstruction(Insn, 8, 4) << 8;
3083 imm |= fieldFromInstruction(Insn, 5, 1) << 12;
3084 unsigned Q = fieldFromInstruction(Insn, 6, 1);
3097 case ARM::VORRiv4i16:
3098 case ARM::VORRiv2i32:
3099 case ARM::VBICiv4i16:
3100 case ARM::VBICiv2i32:
3104 case ARM::VORRiv8i16:
3105 case ARM::VORRiv4i32:
3106 case ARM::VBICiv8i16:
3107 case ARM::VBICiv4i32:
3119 uint64_t Address,
const void *Decoder) {
3122 unsigned Rd = fieldFromInstruction(Insn, 12, 4);
3123 Rd |= fieldFromInstruction(Insn, 22, 1) << 4;
3124 unsigned Rm = fieldFromInstruction(Insn, 0, 4);
3125 Rm |= fieldFromInstruction(Insn, 5, 1) << 4;
3126 unsigned size = fieldFromInstruction(Insn, 18, 2);
3138 uint64_t Address,
const void *Decoder) {
3144 uint64_t Address,
const void *Decoder) {
3150 uint64_t Address,
const void *Decoder) {
3156 uint64_t Address,
const void *Decoder) {
3162 uint64_t Address,
const void *Decoder) {
3165 unsigned Rd = fieldFromInstruction(Insn, 12, 4);
3166 Rd |= fieldFromInstruction(Insn, 22, 1) << 4;
3167 unsigned Rn = fieldFromInstruction(Insn, 16, 4);
3168 Rn |= fieldFromInstruction(Insn, 7, 1) << 4;
3169 unsigned Rm = fieldFromInstruction(Insn, 0, 4);
3170 Rm |= fieldFromInstruction(Insn, 5, 1) << 4;
3171 unsigned op = fieldFromInstruction(Insn, 6, 1);
3198 uint64_t Address,
const void *Decoder) {
3201 unsigned dst = fieldFromInstruction(Insn, 8, 3);
3202 unsigned imm = fieldFromInstruction(Insn, 0, 8);
3222 uint64_t Address,
const void *Decoder) {
3224 true, 2, Inst, Decoder))
3230 uint64_t Address,
const void *Decoder) {
3232 true, 4, Inst, Decoder))
3238 uint64_t Address,
const void *Decoder) {
3240 true, 2, Inst, Decoder))
3246 uint64_t Address,
const void *Decoder) {
3249 unsigned Rn = fieldFromInstruction(Val, 0, 3);
3250 unsigned Rm = fieldFromInstruction(Val, 3, 3);
3261 uint64_t Address,
const void *Decoder) {
3264 unsigned Rn = fieldFromInstruction(Val, 0, 3);
3265 unsigned imm = fieldFromInstruction(Val, 3, 5);
3275 uint64_t Address,
const void *Decoder) {
3276 unsigned imm = Val << 2;
3285 uint64_t Address,
const void *Decoder) {
3293 uint64_t Address,
const void *Decoder) {
3296 unsigned Rn = fieldFromInstruction(Val, 6, 4);
3297 unsigned Rm = fieldFromInstruction(Val, 2, 4);
3298 unsigned imm = fieldFromInstruction(Val, 0, 2);
3321 uint64_t Address,
const void *Decoder) {
3324 unsigned Rt = fieldFromInstruction(Insn, 12, 4);
3325 unsigned Rn = fieldFromInstruction(Insn, 16, 4);
3328 ((
const MCDisassembler*)Decoder)->getSubtargetInfo().getFeatureBits();
3330 bool hasMP = featureBits[ARM::FeatureMP];
3331 bool hasV7Ops = featureBits[ARM::HasV7Ops];
3385 if (!hasV7Ops || !hasMP)
3393 unsigned addrmode = fieldFromInstruction(Insn, 4, 2);
3394 addrmode |= fieldFromInstruction(Insn, 0, 4) << 2;
3395 addrmode |= fieldFromInstruction(Insn, 16, 4) << 6;
3403 uint64_t Address,
const void* Decoder) {
3406 unsigned Rn = fieldFromInstruction(Insn, 16, 4);
3407 unsigned Rt = fieldFromInstruction(Insn, 12, 4);
3408 unsigned U = fieldFromInstruction(Insn, 9, 1);
3409 unsigned imm = fieldFromInstruction(Insn, 0, 8);
3412 unsigned add = fieldFromInstruction(Insn, 9, 1);
3415 ((
const MCDisassembler*)Decoder)->getSubtargetInfo().getFeatureBits();
3417 bool hasMP = featureBits[ARM::FeatureMP];
3418 bool hasV7Ops = featureBits[ARM::HasV7Ops];
3428 case ARM::t2LDRSBi8:
3434 case ARM::t2LDRSHi8:
3451 case ARM::t2LDRSHi8:
3457 case ARM::t2LDRSBi8:
3473 if (!hasV7Ops || !hasMP)
3487 uint64_t Address,
const void* Decoder) {
3490 unsigned Rn = fieldFromInstruction(Insn, 16, 4);
3491 unsigned Rt = fieldFromInstruction(Insn, 12, 4);
3492 unsigned imm = fieldFromInstruction(Insn, 0, 12);
3496 ((
const MCDisassembler*)Decoder)->getSubtargetInfo().getFeatureBits();
3498 bool hasMP = featureBits[ARM::FeatureMP];
3499 bool hasV7Ops = featureBits[ARM::HasV7Ops];
3506 case ARM::t2LDRHi12:
3509 case ARM::t2LDRSHi12:
3512 case ARM::t2LDRBi12:
3515 case ARM::t2LDRSBi12:
3532 case ARM::t2LDRSHi12:
3534 case ARM::t2LDRHi12:
3537 case ARM::t2LDRSBi12:
3552 case ARM::t2PLDWi12:
3553 if (!hasV7Ops || !hasMP)
3567 uint64_t Address,
const void* Decoder) {
3570 unsigned Rn = fieldFromInstruction(Insn, 16, 4);
3571 unsigned Rt = fieldFromInstruction(Insn, 12, 4);
3572 unsigned imm = fieldFromInstruction(Insn, 0, 8);
3606 uint64_t Address,
const void* Decoder) {
3609 unsigned Rt = fieldFromInstruction(Insn, 12, 4);
3610 unsigned U = fieldFromInstruction(Insn, 23, 1);
3611 int imm = fieldFromInstruction(Insn, 0, 12);
3614 ((
const MCDisassembler*)Decoder)->getSubtargetInfo().getFeatureBits();
3616 bool hasV7Ops = featureBits[ARM::HasV7Ops];
3620 case ARM::t2LDRBpci:
3621 case ARM::t2LDRHpci:
3624 case ARM::t2LDRSBpci:
3627 case ARM::t2LDRSHpci:
3659 uint64_t Address,
const void *Decoder) {
3663 int imm = Val & 0xFF;
3665 if (!(Val & 0x100)) imm *= -1;
3673 uint64_t Address,
const void *Decoder) {
3676 unsigned Rn = fieldFromInstruction(Val, 9, 4);
3677 unsigned imm = fieldFromInstruction(Val, 0, 9);
3688 uint64_t Address,
const void *Decoder) {
3691 unsigned Rn = fieldFromInstruction(Val, 8, 4);
3692 unsigned imm = fieldFromInstruction(Val, 0, 8);
3703 uint64_t Address,
const void *Decoder) {
3704 int imm = Val & 0xFF;
3707 else if (!(Val & 0x100))
3715 uint64_t Address,
const void *Decoder) {
3718 unsigned Rn = fieldFromInstruction(Val, 9, 4);
3719 unsigned imm = fieldFromInstruction(Val, 0, 9);
3761 uint64_t Address,
const void *Decoder) {
3764 unsigned Rt = fieldFromInstruction(Insn, 12, 4);
3765 unsigned Rn = fieldFromInstruction(Insn, 16, 4);
3766 unsigned addr = fieldFromInstruction(Insn, 0, 8);
3767 addr |= fieldFromInstruction(Insn, 9, 1) << 8;
3769 unsigned load = fieldFromInstruction(Insn, 20, 1);
3773 case ARM::t2LDR_PRE:
3774 case ARM::t2LDR_POST:
3777 case ARM::t2LDRB_PRE:
3778 case ARM::t2LDRB_POST:
3781 case ARM::t2LDRH_PRE:
3782 case ARM::t2LDRH_POST:
3785 case ARM::t2LDRSB_PRE:
3786 case ARM::t2LDRSB_POST:
3792 case ARM::t2LDRSH_PRE:
3793 case ARM::t2LDRSH_POST:
3822 uint64_t Address,
const void *Decoder) {
3825 unsigned Rn = fieldFromInstruction(Val, 13, 4);
3826 unsigned imm = fieldFromInstruction(Val, 0, 12);
3831 case ARM::t2STRBi12:
3832 case ARM::t2STRHi12:
3848 uint64_t Address,
const void *Decoder) {
3849 unsigned imm = fieldFromInstruction(Insn, 0, 7);
3859 uint64_t Address,
const void *Decoder) {
3863 unsigned Rdm = fieldFromInstruction(Insn, 0, 3);
3864 Rdm |= fieldFromInstruction(Insn, 7, 1) << 3;
3871 }
else if (Inst.
getOpcode() == ARM::tADDspr) {
3872 unsigned Rm = fieldFromInstruction(Insn, 3, 4);
3884 uint64_t Address,
const void *Decoder) {
3885 unsigned imod = fieldFromInstruction(Insn, 4, 1) | 0x2;
3886 unsigned flags = fieldFromInstruction(Insn, 0, 3);
3895 uint64_t Address,
const void *Decoder) {
3897 unsigned Rm = fieldFromInstruction(Insn, 0, 4);
3898 unsigned add = fieldFromInstruction(Insn, 4, 1);
3908 uint64_t Address,
const void *Decoder) {
3916 unsigned S = (Val >> 23) & 1;
3917 unsigned J1 = (Val >> 22) & 1;
3918 unsigned J2 = (Val >> 21) & 1;
3919 unsigned I1 = !(J1 ^ S);
3920 unsigned I2 = !(J2 ^ S);
3921 unsigned tmp = (Val & ~0x600000) | (I1 << 22) | (I2 << 21);
3922 int imm32 = SignExtend32<25>(tmp << 1);
3925 (Address & ~2u) + imm32 + 4,
3926 true, 4, Inst, Decoder))
3932 uint64_t Address,
const void *Decoder) {
3933 if (Val == 0xA || Val == 0xB)
3937 ((
const MCDisassembler*)Decoder)->getSubtargetInfo().getFeatureBits();
3939 if (featureBits[ARM::HasV8Ops] && !(Val == 14 || Val == 15))
3948 uint64_t Address,
const void *Decoder) {
3951 unsigned Rn = fieldFromInstruction(Insn, 16, 4);
3952 unsigned Rm = fieldFromInstruction(Insn, 0, 4);
3964 uint64_t Address,
const void *Decoder) {
3967 unsigned pred = fieldFromInstruction(Insn, 22, 4);
3968 if (pred == 0xE || pred == 0xF) {
3969 unsigned opc = fieldFromInstruction(Insn, 4, 28);
3984 unsigned imm = fieldFromInstruction(Insn, 0, 4);
3988 unsigned brtarget = fieldFromInstruction(Insn, 0, 11) << 1;
3989 brtarget |= fieldFromInstruction(Insn, 11, 1) << 19;
3990 brtarget |= fieldFromInstruction(Insn, 13, 1) << 18;
3991 brtarget |= fieldFromInstruction(Insn, 16, 6) << 12;
3992 brtarget |= fieldFromInstruction(Insn, 26, 1) << 20;
4006 uint64_t Address,
const void *Decoder) {
4007 unsigned ctrl = fieldFromInstruction(Val, 10, 2);
4009 unsigned byte = fieldFromInstruction(Val, 8, 2);
4010 unsigned imm = fieldFromInstruction(Val, 0, 8);
4027 unsigned unrot = fieldFromInstruction(Val, 0, 7) | 0x80;
4028 unsigned rot = fieldFromInstruction(Val, 7, 5);
4029 unsigned imm = (unrot >> rot) | (unrot << ((32-rot)&31));
4038 uint64_t Address,
const void *Decoder) {
4040 true, 2, Inst, Decoder))
4047 const void *Decoder) {
4055 unsigned S = (Val >> 23) & 1;
4056 unsigned J1 = (Val >> 22) & 1;
4057 unsigned J2 = (Val >> 21) & 1;
4058 unsigned I1 = !(J1 ^ S);
4059 unsigned I2 = !(J2 ^ S);
4060 unsigned tmp = (Val & ~0x600000) | (I1 << 22) | (I2 << 21);
4061 int imm32 = SignExtend32<25>(tmp << 1);
4064 true, 4, Inst, Decoder))
4070 uint64_t Address,
const void *Decoder) {
4079 uint64_t Address,
const void *Decoder) {
4088 uint64_t Address,
const void *Decoder) {
4091 ((
const MCDisassembler*)Decoder)->getSubtargetInfo().getFeatureBits();
4093 if (FeatureBits[ARM::FeatureMClass]) {
4094 unsigned ValLow = Val & 0xff;
4113 if (!(FeatureBits[ARM::HasV7Ops]))
4122 if (!(FeatureBits[ARM::HasV8MMainlineOps]))
4132 if (!(FeatureBits[ARM::Feature8MSecExt]))
4140 unsigned Mask = fieldFromInstruction(Val, 10, 2);
4141 if (!(FeatureBits[ARM::HasV7Ops])) {
4154 if (Mask == 0 || (Mask != 2 && ValLow > 3) ||
4155 (!(FeatureBits[ARM::FeatureDSP]) && (Mask & 1)))
4169 uint64_t Address,
const void *Decoder) {
4171 unsigned R = fieldFromInstruction(Val, 5, 1);
4172 unsigned SysM = fieldFromInstruction(Val, 0, 5);
4178 if (SysM == 0x7 || SysM == 0xf || SysM == 0x18 || SysM == 0x19 ||
4179 SysM == 0x1a || SysM == 0x1b)
4182 if (SysM != 0xe && SysM != 0x10 && SysM != 0x12 && SysM != 0x14 &&
4183 SysM != 0x16 && SysM != 0x1c && SysM != 0x1e)
4192 uint64_t Address,
const void *Decoder) {
4195 unsigned Rt = fieldFromInstruction(Insn, 12, 4);
4196 unsigned Rn = fieldFromInstruction(Insn, 16, 4);
4197 unsigned pred = fieldFromInstruction(Insn, 28, 4);
4214 const void *Decoder) {
4217 unsigned Rd = fieldFromInstruction(Insn, 12, 4);
4218 unsigned Rt = fieldFromInstruction(Insn, 0, 4);
4219 unsigned Rn = fieldFromInstruction(Insn, 16, 4);
4220 unsigned pred = fieldFromInstruction(Insn, 28, 4);
4225 if (Rn == 0xF || Rd == Rn || Rd == Rt || Rd == Rt+1)
4239 uint64_t Address,
const void *Decoder) {
4242 unsigned Rn = fieldFromInstruction(Insn, 16, 4);
4243 unsigned Rt = fieldFromInstruction(Insn, 12, 4);
4244 unsigned imm = fieldFromInstruction(Insn, 0, 12);
4245 imm |= fieldFromInstruction(Insn, 16, 4) << 13;
4246 imm |= fieldFromInstruction(Insn, 23, 1) << 12;
4247 unsigned pred = fieldFromInstruction(Insn, 28, 4);
4264 uint64_t Address,
const void *Decoder) {
4267 unsigned Rn = fieldFromInstruction(Insn, 16, 4);
4268 unsigned Rt = fieldFromInstruction(Insn, 12, 4);
4269 unsigned imm = fieldFromInstruction(Insn, 0, 12);
4270 imm |= fieldFromInstruction(Insn, 16, 4) << 13;
4271 imm |= fieldFromInstruction(Insn, 23, 1) << 12;
4272 unsigned pred = fieldFromInstruction(Insn, 28, 4);
4273 unsigned Rm = fieldFromInstruction(Insn, 0, 4);
4291 uint64_t Address,
const void *Decoder) {
4294 unsigned Rn = fieldFromInstruction(Insn, 16, 4);
4295 unsigned Rt = fieldFromInstruction(Insn, 12, 4);
4296 unsigned imm = fieldFromInstruction(Insn, 0, 12);
4297 imm |= fieldFromInstruction(Insn, 16, 4) << 13;
4298 imm |= fieldFromInstruction(Insn, 23, 1) << 12;
4299 unsigned pred = fieldFromInstruction(Insn, 28, 4);
4316 uint64_t Address,
const void *Decoder) {
4319 unsigned Rn = fieldFromInstruction(Insn, 16, 4);
4320 unsigned Rt = fieldFromInstruction(Insn, 12, 4);
4321 unsigned imm = fieldFromInstruction(Insn, 0, 12);
4322 imm |= fieldFromInstruction(Insn, 16, 4) << 13;
4323 imm |= fieldFromInstruction(Insn, 23, 1) << 12;
4324 unsigned pred = fieldFromInstruction(Insn, 28, 4);
4341 uint64_t Address,
const void *Decoder) {
4344 unsigned Rn = fieldFromInstruction(Insn, 16, 4);
4345 unsigned Rm = fieldFromInstruction(Insn, 0, 4);
4346 unsigned Rd = fieldFromInstruction(Insn, 12, 4);
4347 Rd |= fieldFromInstruction(Insn, 22, 1) << 4;
4348 unsigned size = fieldFromInstruction(Insn, 10, 2);
4356 if (fieldFromInstruction(Insn, 4, 1))
4358 index = fieldFromInstruction(Insn, 5, 3);
4361 if (fieldFromInstruction(Insn, 5, 1))
4363 index = fieldFromInstruction(Insn, 6, 2);
4364 if (fieldFromInstruction(Insn, 4, 1))
4368 if (fieldFromInstruction(Insn, 6, 1))
4370 index = fieldFromInstruction(Insn, 7, 1);
4372 switch (fieldFromInstruction(Insn, 4, 2)) {
4408 uint64_t Address,
const void *Decoder) {
4411 unsigned Rn = fieldFromInstruction(Insn, 16, 4);
4412 unsigned Rm = fieldFromInstruction(Insn, 0, 4);
4413 unsigned Rd = fieldFromInstruction(Insn, 12, 4);
4414 Rd |= fieldFromInstruction(Insn, 22, 1) << 4;
4415 unsigned size = fieldFromInstruction(Insn, 10, 2);
4423 if (fieldFromInstruction(Insn, 4, 1))
4425 index = fieldFromInstruction(Insn, 5, 3);
4428 if (fieldFromInstruction(Insn, 5, 1))
4430 index = fieldFromInstruction(Insn, 6, 2);
4431 if (fieldFromInstruction(Insn, 4, 1))
4435 if (fieldFromInstruction(Insn, 6, 1))
4437 index = fieldFromInstruction(Insn, 7, 1);
4439 switch (fieldFromInstruction(Insn, 4, 2)) {
4473 uint64_t Address,
const void *Decoder) {
4476 unsigned Rn = fieldFromInstruction(Insn, 16, 4);
4477 unsigned Rm = fieldFromInstruction(Insn, 0, 4);
4478 unsigned Rd = fieldFromInstruction(Insn, 12, 4);
4479 Rd |= fieldFromInstruction(Insn, 22, 1) << 4;
4480 unsigned size = fieldFromInstruction(Insn, 10, 2);
4489 index = fieldFromInstruction(Insn, 5, 3);
4490 if (fieldFromInstruction(Insn, 4, 1))
4494 index = fieldFromInstruction(Insn, 6, 2);
4495 if (fieldFromInstruction(Insn, 4, 1))
4497 if (fieldFromInstruction(Insn, 5, 1))
4501 if (fieldFromInstruction(Insn, 5, 1))
4503 index = fieldFromInstruction(Insn, 7, 1);
4504 if (fieldFromInstruction(Insn, 4, 1) != 0)
4506 if (fieldFromInstruction(Insn, 6, 1))
4540 uint64_t Address,
const void *Decoder) {
4543 unsigned Rn = fieldFromInstruction(Insn, 16, 4);
4544 unsigned Rm = fieldFromInstruction(Insn, 0, 4);
4545 unsigned Rd = fieldFromInstruction(Insn, 12, 4);
4546 Rd |= fieldFromInstruction(Insn, 22, 1) << 4;
4547 unsigned size = fieldFromInstruction(Insn, 10, 2);
4556 index = fieldFromInstruction(Insn, 5, 3);
4557 if (fieldFromInstruction(Insn, 4, 1))
4561 index = fieldFromInstruction(Insn, 6, 2);
4562 if (fieldFromInstruction(Insn, 4, 1))
4564 if (fieldFromInstruction(Insn, 5, 1))
4568 if (fieldFromInstruction(Insn, 5, 1))
4570 index = fieldFromInstruction(Insn, 7, 1);
4571 if (fieldFromInstruction(Insn, 4, 1) != 0)
4573 if (fieldFromInstruction(Insn, 6, 1))
4603 uint64_t Address,
const void *Decoder) {
4606 unsigned Rn = fieldFromInstruction(Insn, 16, 4);
4607 unsigned Rm = fieldFromInstruction(Insn, 0, 4);
4608 unsigned Rd = fieldFromInstruction(Insn, 12, 4);
4609 Rd |= fieldFromInstruction(Insn, 22, 1) << 4;
4610 unsigned size = fieldFromInstruction(Insn, 10, 2);
4619 if (fieldFromInstruction(Insn, 4, 1))
4621 index = fieldFromInstruction(Insn, 5, 3);
4624 if (fieldFromInstruction(Insn, 4, 1))
4626 index = fieldFromInstruction(Insn, 6, 2);
4627 if (fieldFromInstruction(Insn, 5, 1))
4631 if (fieldFromInstruction(Insn, 4, 2))
4633 index = fieldFromInstruction(Insn, 7, 1);
4634 if (fieldFromInstruction(Insn, 6, 1))
4673 uint64_t Address,
const void *Decoder) {
4676 unsigned Rn = fieldFromInstruction(Insn, 16, 4);
4677 unsigned Rm = fieldFromInstruction(Insn, 0, 4);
4678 unsigned Rd = fieldFromInstruction(Insn, 12, 4);
4679 Rd |= fieldFromInstruction(Insn, 22, 1) << 4;
4680 unsigned size = fieldFromInstruction(Insn, 10, 2);
4689 if (fieldFromInstruction(Insn, 4, 1))
4691 index = fieldFromInstruction(Insn, 5, 3);
4694 if (fieldFromInstruction(Insn, 4, 1))
4696 index = fieldFromInstruction(Insn, 6, 2);
4697 if (fieldFromInstruction(Insn, 5, 1))
4701 if (fieldFromInstruction(Insn, 4, 2))
4703 index = fieldFromInstruction(Insn, 7, 1);
4704 if (fieldFromInstruction(Insn, 6, 1))
4736 uint64_t Address,
const void *Decoder) {
4739 unsigned Rn = fieldFromInstruction(Insn, 16, 4);
4740 unsigned Rm = fieldFromInstruction(Insn, 0, 4);
4741 unsigned Rd = fieldFromInstruction(Insn, 12, 4);
4742 Rd |= fieldFromInstruction(Insn, 22, 1) << 4;
4743 unsigned size = fieldFromInstruction(Insn, 10, 2);
4752 if (fieldFromInstruction(Insn, 4, 1))
4754 index = fieldFromInstruction(Insn, 5, 3);
4757 if (fieldFromInstruction(Insn, 4, 1))
4759 index = fieldFromInstruction(Insn, 6, 2);
4760 if (fieldFromInstruction(Insn, 5, 1))
4764 switch (fieldFromInstruction(Insn, 4, 2)) {
4770 align = 4 << fieldFromInstruction(Insn, 4, 2);
break;
4773 index = fieldFromInstruction(Insn, 7, 1);
4774 if (fieldFromInstruction(Insn, 6, 1))
4817 uint64_t Address,
const void *Decoder) {
4820 unsigned Rn = fieldFromInstruction(Insn, 16, 4);
4821 unsigned Rm = fieldFromInstruction(Insn, 0, 4);
4822 unsigned Rd = fieldFromInstruction(Insn, 12, 4);
4823 Rd |= fieldFromInstruction(Insn, 22, 1) << 4;
4824 unsigned size = fieldFromInstruction(Insn, 10, 2);
4833 if (fieldFromInstruction(Insn, 4, 1))
4835 index = fieldFromInstruction(Insn, 5, 3);
4838 if (fieldFromInstruction(Insn, 4, 1))
4840 index = fieldFromInstruction(Insn, 6, 2);
4841 if (fieldFromInstruction(Insn, 5, 1))
4845 switch (fieldFromInstruction(Insn, 4, 2)) {
4851 align = 4 << fieldFromInstruction(Insn, 4, 2);
break;
4854 index = fieldFromInstruction(Insn, 7, 1);
4855 if (fieldFromInstruction(Insn, 6, 1))
4889 uint64_t Address,
const void *Decoder) {
4891 unsigned Rt = fieldFromInstruction(Insn, 12, 4);
4892 unsigned Rt2 = fieldFromInstruction(Insn, 16, 4);
4893 unsigned Rm = fieldFromInstruction(Insn, 5, 1);
4894 unsigned pred = fieldFromInstruction(Insn, 28, 4);
4895 Rm |= fieldFromInstruction(Insn, 0, 4) << 1;
4897 if (Rt == 0xF || Rt2 == 0xF || Rm == 0x1F)
4915 uint64_t Address,
const void *Decoder) {
4917 unsigned Rt = fieldFromInstruction(Insn, 12, 4);
4918 unsigned Rt2 = fieldFromInstruction(Insn, 16, 4);
4919 unsigned Rm = fieldFromInstruction(Insn, 5, 1);
4920 unsigned pred = fieldFromInstruction(Insn, 28, 4);
4921 Rm |= fieldFromInstruction(Insn, 0, 4) << 1;
4923 if (Rt == 0xF || Rt2 == 0xF || Rm == 0x1F)
4941 uint64_t Address,
const void *Decoder) {
4943 unsigned pred = fieldFromInstruction(Insn, 4, 4);
4944 unsigned mask = fieldFromInstruction(Insn, 0, 4);
4961 uint64_t Address,
const void *Decoder) {
4964 unsigned Rt = fieldFromInstruction(Insn, 12, 4);
4965 unsigned Rt2 = fieldFromInstruction(Insn, 8, 4);
4966 unsigned Rn = fieldFromInstruction(Insn, 16, 4);
4967 unsigned addr = fieldFromInstruction(Insn, 0, 8);
4968 unsigned W = fieldFromInstruction(Insn, 21, 1);
4969 unsigned U = fieldFromInstruction(Insn, 23, 1);
4970 unsigned P = fieldFromInstruction(Insn, 24, 1);
4971 bool writeback = (W == 1) | (P == 0);
4973 addr |= (U << 8) | (Rn << 9);
4975 if (writeback && (Rn == Rt || Rn == Rt2))
4998 uint64_t Address,
const void *Decoder) {
5001 unsigned Rt = fieldFromInstruction(Insn, 12, 4);
5002 unsigned Rt2 = fieldFromInstruction(Insn, 8, 4);
5003 unsigned Rn = fieldFromInstruction(Insn, 16, 4);
5004 unsigned addr = fieldFromInstruction(Insn, 0, 8);
5005 unsigned W = fieldFromInstruction(Insn, 21, 1);
5006 unsigned U = fieldFromInstruction(Insn, 23, 1);
5007 unsigned P = fieldFromInstruction(Insn, 24, 1);
5008 bool writeback = (W == 1) | (P == 0);
5010 addr |= (U << 8) | (Rn << 9);
5012 if (writeback && (Rn == Rt || Rn == Rt2))
5032 uint64_t Address,
const void *Decoder) {
5033 unsigned sign1 = fieldFromInstruction(Insn, 21, 1);
5034 unsigned sign2 = fieldFromInstruction(Insn, 23, 1);
5037 unsigned Val = fieldFromInstruction(Insn, 0, 8);
5038 Val |= fieldFromInstruction(Insn, 12, 3) << 8;
5039 Val |= fieldFromInstruction(Insn, 26, 1) << 11;
5048 const void *Decoder) {
5058 uint64_t Address,
const void *Decoder) {
5059 unsigned Rt = fieldFromInstruction(Insn, 12, 4);
5060 unsigned Rt2 = fieldFromInstruction(Insn, 0, 4);
5061 unsigned Rn = fieldFromInstruction(Insn, 16, 4);
5062 unsigned pred = fieldFromInstruction(Insn, 28, 4);
5069 if (Rt == Rn || Rn == Rt2)
5085 uint64_t Address,
const void *Decoder) {
5087 ((
const MCDisassembler *)Decoder)->getSubtargetInfo().getFeatureBits();
5088 bool hasFullFP16 = featureBits[ARM::FeatureFullFP16];
5090 unsigned Vd = (fieldFromInstruction(Insn, 12, 4) << 0);
5091 Vd |= (fieldFromInstruction(Insn, 22, 1) << 4);
5092 unsigned Vm = (fieldFromInstruction(Insn, 0, 4) << 0);
5093 Vm |= (fieldFromInstruction(Insn, 5, 1) << 4);
5094 unsigned imm = fieldFromInstruction(Insn, 16, 6);
5095 unsigned cmode = fieldFromInstruction(Insn, 8, 4);
5096 unsigned op = fieldFromInstruction(Insn, 5, 1);
5101 if (!(imm & 0x38)) {
5144 uint64_t Address,
const void *Decoder) {
5146 ((
const MCDisassembler *)Decoder)->getSubtargetInfo().getFeatureBits();
5147 bool hasFullFP16 = featureBits[ARM::FeatureFullFP16];
5149 unsigned Vd = (fieldFromInstruction(Insn, 12, 4) << 0);
5150 Vd |= (fieldFromInstruction(Insn, 22, 1) << 4);
5151 unsigned Vm = (fieldFromInstruction(Insn, 0, 4) << 0);
5152 Vm |= (fieldFromInstruction(Insn, 5, 1) << 4);
5153 unsigned imm = fieldFromInstruction(Insn, 16, 6);
5154 unsigned cmode = fieldFromInstruction(Insn, 8, 4);
5155 unsigned op = fieldFromInstruction(Insn, 5, 1);
5160 if (!(imm & 0x38)) {
5203 uint64_t Address,
const void *Decoder) {
5206 unsigned Rn = fieldFromInstruction(Val, 16, 4);
5207 unsigned Rt = fieldFromInstruction(Val, 12, 4);
5208 unsigned Rm = fieldFromInstruction(Val, 0, 4);
5209 Rm |= (fieldFromInstruction(Val, 23, 1) << 4);
5210 unsigned Cond = fieldFromInstruction(Val, 28, 4);
5212 if (fieldFromInstruction(Val, 8, 4) != 0 || Rn == Rt)
5230 uint64_t Address,
const void *Decoder) {
5233 unsigned CRm = fieldFromInstruction(Val, 0, 4);
5234 unsigned opc1 = fieldFromInstruction(Val, 4, 4);
5235 unsigned cop = fieldFromInstruction(Val, 8, 4);
5236 unsigned Rt = fieldFromInstruction(Val, 12, 4);
5237 unsigned Rt2 = fieldFromInstruction(Val, 16, 4);
5239 if ((cop & ~0x1) == 0xa)
static DecodeStatus DecodeVSTInstruction(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static MCDisassembler * createARMDisassembler(const Target &T, const MCSubtargetInfo &STI, MCContext &Ctx)
static DecodeStatus DecodeT2LoadImm12(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeT2AddrModeSOReg(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeAddrMode3Instruction(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeThumbBROperand(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static const uint16_t GPRPairDecoderTable[]
static DecodeStatus DecodeNEONModImmInstruction(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
GCNRegPressure max(const GCNRegPressure &P1, const GCNRegPressure &P2)
static MCDisassembler * createThumbDisassembler(const Target &T, const MCSubtargetInfo &STI, MCContext &Ctx)
static DecodeStatus DecodeThumbAddrModePC(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeArmMOVTWInstruction(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeVLDST1Instruction(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeAddrModeImm12Operand(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeInstSyncBarrierOption(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
DecodeStatus
Ternary decode status.
static DecodeStatus DecodeVLD1DupInstruction(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
Maximum length of the test input libFuzzer tries to guess a good value based on the corpus and reports it always prefer smaller inputs during the corpus shuffle When libFuzzer itself reports a bug this exit code will be used If indicates the maximal total time in seconds to run the fuzzer minimizes the provided crash input Use with tries to cleanse the provided crash input to make it contain fewer original bytes Use with exact_artifact_path to specify the output Experimental Use value profile to guide fuzzing Number of jobs to run If min(jobs, NumberOfCpuCores()/2)\" is used.") FUZZER_FLAG_INT(reload
Superclass for all disassemblers.
static DecodeStatus DecodeSTRPreReg(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeThumb2BCCInstruction(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeSORegRegOperand(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
Describe properties that are true of each instruction in the target description file.
static DecodeStatus DecodeRegListOperand(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static unsigned getAM5Opc(AddrOpc Opc, unsigned char Offset)
getAM5Opc - This function encodes the addrmode5 opc field.
static DecodeStatus DecodeAddrMode7Operand(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeDPRRegListOperand(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeRFEInstruction(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeT2LDRDPreInstruction(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static const uint16_t GPRDecoderTable[]
static DecodeStatus DecodeVCVTQ(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static void RegisterMCDisassembler(Target &T, Target::MCDisassemblerCtorTy Fn)
RegisterMCDisassembler - Register a MCDisassembler implementation for the given target.
static DecodeStatus DecodeShiftRight64Imm(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeVLD2LN(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeDPR_8RegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
MCDisassembler::DecodeStatus DecodeStatus
Target & getTheThumbLETarget()
static DecodeStatus DecodeVMOVSRR(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeBranchImmInstruction(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeDPairRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
amode Optimize addressing mode
static DecodeStatus DecodeShiftRight8Imm(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static MCOperand createReg(unsigned Reg)
static DecodeStatus DecodeAddrMode5FP16Operand(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeVLD1LN(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeThumbBCCTargetOperand(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeT2ShifterImmOperand(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodetGPRRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeT2AddrModeImm0_1020s4(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeT2CPSInstruction(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static bool Check(DecodeStatus &Out, DecodeStatus In)
static const uint16_t DPairSpacedDecoderTable[]
const MCInstrDesc ARMInsts[]
static DecodeStatus DecodeCPSInstruction(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeTBLInstruction(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodePostIdxReg(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
Target & getTheARMBETarget()
Context object for machine code objects.
static DecodeStatus DecodeDPR_VFP2RegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
unsigned getReg() const
Returns the register number.
int decodeInstruction(InternalInstruction *insn, byteReader_t reader, const void *readerArg, dlog_t logger, void *loggerArg, const void *miiArg, uint64_t startLoc, DisassemblerMode mode)
Decode one instruction and store the decoding results in a buffer provided by the consumer...
Target & getTheThumbBETarget()
static DecodeStatus DecodeVLD4LN(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeT2LoadT(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeThumbAddrModeIS(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static const uint16_t SPRDecoderTable[]
static DecodeStatus DecodeBitfieldMaskOperand(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
size_t size() const
size - Get the array size.
iterator insert(iterator I, const MCOperand &Op)
static DecodeStatus DecodeSwap(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
Instances of this class represent a single low-level machine instruction.
static DecodeStatus DecodeThumbAddSpecialReg(MCInst &Inst, uint16_t Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeThumbTableBranch(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
unsigned short NumOperands
static DecodeStatus DecodeLDRPreReg(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeCoprocessor(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
const MCSubtargetInfo & getSubtargetInfo() const
static DecodeStatus DecodeLDRPreImm(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static const uint16_t DPRDecoderTable[]
static DecodeStatus DecodeT2MOVTWInstruction(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecoderGPRRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
static unsigned getAM2Opc(AddrOpc Opc, unsigned Imm12, ShiftOpc SO, unsigned IdxMode=0)
Container class for subtarget features.
static DecodeStatus DecodeT2LdStPre(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeCopMemInstruction(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static const uint16_t DPairDecoderTable[]
static DecodeStatus DecodeT2Imm8S4(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeVLD2DupInstruction(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeBankedReg(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeT2SOImm(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeSPRRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
static const uint16_t QPRDecoderTable[]
static DecodeStatus DecodeT2LoadLabel(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus checkDecodedInstruction(MCInst &MI, uint64_t &Size, uint64_t Address, raw_ostream &OS, raw_ostream &CS, uint32_t Insn, DecodeStatus Result)
static DecodeStatus DecodeSORegImmOperand(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeVSHLMaxInstruction(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeT2AddrModeImm8(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeT2BInstruction(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeThumbBLXOffset(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeHINTInstruction(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeThumbCmpBROperand(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
SmallVectorImpl< MCOperand >::iterator iterator
static DecodeStatus DecodeGPRRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeVLD3DupInstruction(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeVLDST3Instruction(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeThumbAddSPReg(MCInst &Inst, uint16_t Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeVST2LN(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodetcGPRRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
bool tryAddingSymbolicOperand(MCInst &Inst, int64_t Value, uint64_t Address, bool IsBranch, uint64_t Offset, uint64_t InstSize) const
void setOpcode(unsigned Op)
static DecodeStatus DecodeAddrMode6Operand(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeDoubleRegStore(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeThumbBLTargetOperand(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeT2LoadImm8(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecoderForMRRC2AndMCRR2(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeTSTInstruction(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeIT(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
Promote Memory to Register
static DecodeStatus DecodeT2BROperand(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeMemMultipleWritebackInstruction(MCInst &Inst, unsigned Insn, uint64_t Adddress, const void *Decoder)
static DecodeStatus DecodeQADDInstruction(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static void AddThumb1SBit(MCInst &MI, bool InITBlock)
const FeatureBitset & getFeatureBits() const
getFeatureBits - Return the feature bits.
void LLVMInitializeARMDisassembler()
static DecodeStatus DecodeDoubleRegLoad(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeAddrMode5Operand(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeSPRRegListOperand(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
unsigned getOpcode() const
Target - Wrapper for Target specific information.
static unsigned getAM5FP16Opc(AddrOpc Opc, unsigned char Offset)
getAM5FP16Opc - This function encodes the addrmode5fp16 opc field.
static DecodeStatus DecodeSTRPreImm(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodePredicateOperand(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
constexpr char Size[]
Key for Kernel::Arg::Metadata::mSize.
llvm_unreachable("Unknown RegBank!")
static DecodeStatus DecodeT2Imm8(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeLDR(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeVLDInstruction(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
int16_t RegClass
This specifies the register class enumeration of the operand if the operand is a register.
static DecodeStatus DecodeT2AddrModeImm8s4(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeVMOVRRS(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeDPairSpacedRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeThumbAddrModeRR(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeVST1LN(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeThumbAddrModeSP(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeVLDST4Instruction(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
MCSubtargetInfo - Generic base class for all target subtargets.
static DecodeStatus DecodeCCOutOperand(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeGPRwithAPSRRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeMSRMask(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeVCVTD(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeGPRnopcRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeVLD4DupInstruction(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
static bool isBranch(unsigned Opcode)
static DecodeStatus DecodeVST4LN(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeThumbAddSPImm(MCInst &Inst, uint16_t Val, uint64_t Address, const void *Decoder)
LLVM Value Representation.
static DecodeStatus DecodeT2LoadShift(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
#define LLVM_FALLTHROUGH
LLVM_FALLTHROUGH - Mark fallthrough cases in switch statements.
const MCOperandInfo * OpInfo
std::underlying_type< E >::type Mask()
Get a bitmask with 1s in all places up to the high-order bit of E's largest value.
static DecodeStatus DecodeSETPANInstruction(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeSORegMemOperand(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
This class implements an extremely fast bulk output stream that can only output to a stream...
static DecodeStatus DecodeT2STRDPreInstruction(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeQPRRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeDPRRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
void addOperand(const MCOperand &Op)
static void tryAddingPcLoadReferenceComment(uint64_t Address, int Value, const void *Decoder)
tryAddingPcLoadReferenceComment - trys to add a comment as to what is being referenced by a load inst...
static DecodeStatus DecodeVST3LN(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeT2Adr(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeShiftRight32Imm(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
Target & getTheARMLETarget()
This holds information about one operand of a machine instruction, indicating the register class for ...
static DecodeStatus DecodeGPRPairRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeThumbCPS(MCInst &Inst, uint16_t Insn, uint64_t Address, const void *Decoder)
void tryAddingPcLoadReferenceComment(int64_t Value, uint64_t Address) const
static DecodeStatus DecodeMemBarrierOption(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeShiftRight16Imm(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static MCOperand createImm(int64_t Val)
static DecodeStatus DecodeVLD3LN(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeAddrMode2IdxInstruction(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeT2AddrModeImm12(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeSMLAInstruction(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
const MCOperand & getOperand(unsigned i) const
static bool tryAddingSymbolicOperand(uint64_t Address, int32_t Value, bool isBranch, uint64_t InstSize, MCInst &MI, const void *Decoder)
tryAddingSymbolicOperand - trys to add a symbolic operand in place of the immediate Value in the MCIn...
static DecodeStatus DecodeVLDST2Instruction(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)