16 #define DEBUG_TYPE "arm-disassembler"
49 ~AArch64Disassembler() {}
66 uint64_t Address,
const void *Decoder);
69 uint64_t Address,
const void *Decoder);
72 uint64_t Address,
const void *Decoder);
75 uint64_t Address,
const void *Decoder);
78 uint64_t Address,
const void *Decoder);
80 uint64_t Address,
const void *Decoder);
82 uint64_t Address,
const void *Decoder);
84 uint64_t Address,
const void *Decoder);
86 uint64_t Address,
const void *Decoder);
88 unsigned RegNo, uint64_t Address,
91 unsigned RegNo, uint64_t Address,
101 const void *Decoder);
104 const void *Decoder);
106 unsigned RegNo, uint64_t Address,
107 const void *Decoder);
109 unsigned RegNo, uint64_t Address,
110 const void *Decoder);
113 const void *Decoder);
116 const void *Decoder);
121 const void *Decoder);
127 const void *Decoder);
132 const void *Decoder);
137 const void *Decoder);
140 uint64_t Address,
const void *Decoder);
143 const void *Decoder);
146 const void *Decoder);
149 const void *Decoder);
152 uint64_t Address,
const void *Decoder);
155 const void *Decoder);
158 const void *Decoder);
161 const void *Decoder);
163 template<
int RegW
idth>
167 const void *Decoder);
169 template<
int RegW
idth>
173 const void *Decoder);
176 unsigned ShiftAmount,
178 const void *Decoder);
179 template <A64SE::ShiftExtSpecifiers Ext,
bool IsHalf>
182 uint64_t Address,
const void *Decoder);
185 unsigned ShiftAmount,
187 const void *Decoder);
190 const void *Decoder);
194 const void *Decoder);
199 const void *Decoder);
204 const void *Decoder);
206 template<
typename SomeNamedImmMapper>
210 const void *Decoder);
215 uint64_t Address,
const void *Decoder);
220 const void *Decoder);
225 const void *Decoder);
231 const void *Decoder);
235 const void *Decoder);
239 const void *Decoder);
243 #include "AArch64GenDisassemblerTables.inc"
244 #include "AArch64GenInstrInfo.inc"
271 if (Region.
readBytes(Address, 4, bytes) == -1) {
277 uint32_t insn = (bytes[3] << 24) |
295 static unsigned getReg(
const void *D,
unsigned RC,
unsigned RegNo) {
296 const AArch64Disassembler *Dis =
static_cast<const AArch64Disassembler*
>(D);
297 return Dis->getRegInfo()->getRegClass(RC).getRegister(RegNo);
301 uint64_t Address,
const void *Decoder) {
305 uint16_t
Register =
getReg(Decoder, AArch64::GPR64RegClassID, RegNo);
312 uint64_t Address,
const void *Decoder) {
316 uint16_t
Register =
getReg(Decoder, AArch64::GPR64xspRegClassID, RegNo);
323 const void *Decoder) {
327 uint16_t
Register =
getReg(Decoder, AArch64::GPR32RegClassID, RegNo);
334 uint64_t Address,
const void *Decoder) {
338 uint16_t
Register =
getReg(Decoder, AArch64::GPR32wspRegClassID, RegNo);
345 uint64_t Address,
const void *Decoder) {
349 uint16_t
Register =
getReg(Decoder, AArch64::FPR8RegClassID, RegNo);
356 uint64_t Address,
const void *Decoder) {
360 uint16_t
Register =
getReg(Decoder, AArch64::FPR16RegClassID, RegNo);
368 uint64_t Address,
const void *Decoder) {
372 uint16_t
Register =
getReg(Decoder, AArch64::FPR32RegClassID, RegNo);
379 uint64_t Address,
const void *Decoder) {
383 uint16_t
Register =
getReg(Decoder, AArch64::FPR64RegClassID, RegNo);
390 uint64_t Address,
const void *Decoder) {
399 uint64_t Address,
const void *Decoder) {
403 uint16_t
Register =
getReg(Decoder, AArch64::FPR128RegClassID, RegNo);
410 uint64_t Address,
const void *Decoder) {
420 const void *Decoder) {
424 uint16_t
Register =
getReg(Decoder, AArch64::GPR64noxzrRegClassID, RegNo);
431 const void *Decoder) {
442 const void *Decoder) {
449 const void *Decoder) {
455 unsigned RegNo, uint64_t Address,
456 const void *Decoder) {
462 unsigned RegNo, uint64_t Address,
463 const void *Decoder) {
470 const void *Decoder) {
477 const void *Decoder) {
485 const void *Decoder) {
488 if (!(OptionHiS & 2))
498 const void *Decoder) {
511 const void *Decoder) {
523 const void *Decoder) {
532 const void *Decoder) {
539 const void *Decoder) {
546 const void *Decoder) {
553 const void *Decoder) {
560 const void *Decoder) {
570 const void *Decoder) {
580 const void *Decoder) {
590 const void *Decoder) {
598 template<
int RegW
idth>
602 const void *Decoder) {
603 unsigned Imm16 = FullImm & 0xffff;
604 unsigned Shift = FullImm >> 16;
613 template<
int RegW
idth>
617 const void *Decoder) {
628 unsigned ShiftAmount,
630 const void *Decoder) {
640 unsigned ShiftAmount,
642 const void *Decoder) {
644 if (ShiftAmount > 31)
653 const void *Decoder) {
654 unsigned Rd = fieldFromInstruction(Insn, 0, 5);
655 unsigned Rn = fieldFromInstruction(Insn, 5, 5);
656 unsigned ImmS = fieldFromInstruction(Insn, 10, 6);
657 unsigned ImmR = fieldFromInstruction(Insn, 16, 6);
658 unsigned SF = fieldFromInstruction(Insn, 31, 1);
662 enum OpcTypes { SBFM = 0, BFM, UBFM,
Undef } Opc;
663 Opc = (OpcTypes)fieldFromInstruction(Insn, 29, 2);
667 if (ImmR > 31 || ImmS > 31)
684 assert(!(ImmS == 31 && !SF && Opc != BFM)
685 &&
"shift should have used auto decode");
686 assert(!(ImmS == 63 && SF && Opc != BFM)
687 &&
"shift should have used auto decode");
690 if (Opc == SBFM && ImmR == 0) {
691 assert((ImmS != 7 && ImmS != 15) &&
"extension got here");
692 assert((ImmS != 31 || SF == 0) &&
"extension got here");
693 }
else if (Opc == UBFM && ImmR == 0) {
694 assert((SF != 0 || (ImmS != 7 && ImmS != 15)) &&
"extension got here");
700 if (SF && (ImmS + 1) % 64 == ImmR) {
704 }
else if (!SF && (ImmS + 1) % 32 == ImmR) {
713 unsigned ExtractOp, InsertOp;
715 default:
llvm_unreachable(
"unexpected instruction trying to decode bitfield");
717 ExtractOp = SF ? AArch64::SBFXxxii : AArch64::SBFXwwii;
718 InsertOp = SF ? AArch64::SBFIZxxii : AArch64::SBFIZwwii;
721 ExtractOp = SF ? AArch64::BFXILxxii : AArch64::BFXILwwii;
722 InsertOp = SF ? AArch64::BFIxxii : AArch64::BFIwwii;
725 ExtractOp = SF ? AArch64::UBFXxxii : AArch64::UBFXwwii;
726 InsertOp = SF ? AArch64::UBFIZxxii : AArch64::UBFIZwwii;
745 const void *Decoder) {
748 unsigned Rd = fieldFromInstruction(Insn, 0, 5);
749 unsigned Rn = fieldFromInstruction(Insn, 5, 5);
750 unsigned IsToVec = fieldFromInstruction(Insn, 16, 1);
770 const void *Decoder) {
772 unsigned Rt = fieldFromInstruction(Insn, 0, 5);
773 unsigned Rn = fieldFromInstruction(Insn, 5, 5);
774 unsigned Rt2 = fieldFromInstruction(Insn, 10, 5);
775 unsigned SImm7 = fieldFromInstruction(Insn, 15, 7);
776 unsigned L = fieldFromInstruction(Insn, 22, 1);
777 unsigned V = fieldFromInstruction(Insn, 26, 1);
778 unsigned Opc = fieldFromInstruction(Insn, 30, 2);
782 unsigned Indexed = fieldFromInstruction(Insn, 23, 1);
784 if (Indexed && L == 0) {
796 if (Indexed && V == 0 && Rn != 31 && (Rt == Rn || Rt2 == Rn))
827 assert(L &&
"unexpected \"store signed\" attempt");
838 if (Indexed && L == 1) {
854 const void *Decoder) {
855 unsigned Rt = fieldFromInstruction(Val, 0, 5);
856 unsigned Rn = fieldFromInstruction(Val, 5, 5);
857 unsigned Rt2 = fieldFromInstruction(Val, 10, 5);
858 unsigned MemSize = fieldFromInstruction(Val, 30, 2);
886 template<
typename SomeNamedImmMapper>
890 const void *Decoder) {
891 SomeNamedImmMapper Mapper;
893 Mapper.toString(Val, ValidNamed);
894 if (ValidNamed || Mapper.validImm(Val)) {
906 const void *Decoder) {
918 const void *Decoder) {
926 const void *Decoder) {
934 const void *Decoder) {
935 unsigned Rt = fieldFromInstruction(Insn, 0, 5);
936 unsigned Rn = fieldFromInstruction(Insn, 5, 5);
937 unsigned Imm9 = fieldFromInstruction(Insn, 12, 9);
939 unsigned Opc = fieldFromInstruction(Insn, 22, 2);
940 unsigned V = fieldFromInstruction(Insn, 26, 1);
941 unsigned Size = fieldFromInstruction(Insn, 30, 2);
943 if (Opc == 0 || (V == 1 && Opc == 2)) {
948 if (V == 0 && (Opc == 2 || Size == 3)) {
952 }
else if (V == 1 && (Opc & 2)) {
971 if (Opc != 0 && (V != 1 || Opc != 2)) {
984 if (V == 0 && Rt == Rn && Rn != 31)
1000 template <A64SE::ShiftExtSpecifiers Ext,
bool IsHalf>
1003 uint64_t Address,
const void *Decoder) {
1011 if ((!IsLSL || (IsLSL && IsHalf)) && ShiftAmount != 0 && ShiftAmount != 1)
1015 if (IsLSL && ShiftAmount > 3)
1028 const void *Decoder) {
1029 unsigned Rt = fieldFromInstruction(Insn, 0, 5);
1030 unsigned Rn = fieldFromInstruction(Insn, 5, 5);
1031 unsigned Rm = fieldFromInstruction(Insn, 16, 5);
1032 unsigned Opcode = fieldFromInstruction(Insn, 12, 4);
1033 unsigned IsLoad = fieldFromInstruction(Insn, 22, 1);
1035 unsigned Is128BitVec = fieldFromInstruction(Insn, 30, 1);
1116 const void *Decoder) {
1117 bool Is64bitVec =
false;
1118 bool IsLoadDup =
false;
1119 bool IsLoad =
false;
1122 unsigned TransferBytes = 0;
1123 unsigned NumVecs = 0;
1126 case AArch64::LD1R_WB_8B_fixed:
case AArch64::LD1R_WB_8B_register:
1127 case AArch64::LD1R_WB_4H_fixed:
case AArch64::LD1R_WB_4H_register:
1128 case AArch64::LD1R_WB_2S_fixed:
case AArch64::LD1R_WB_2S_register:
1129 case AArch64::LD1R_WB_1D_fixed:
case AArch64::LD1R_WB_1D_register: {
1131 case AArch64::LD1R_WB_8B_fixed:
case AArch64::LD1R_WB_8B_register:
1132 TransferBytes = 1;
break;
1133 case AArch64::LD1R_WB_4H_fixed:
case AArch64::LD1R_WB_4H_register:
1134 TransferBytes = 2;
break;
1135 case AArch64::LD1R_WB_2S_fixed:
case AArch64::LD1R_WB_2S_register:
1136 TransferBytes = 4;
break;
1137 case AArch64::LD1R_WB_1D_fixed:
case AArch64::LD1R_WB_1D_register:
1138 TransferBytes = 8;
break;
1146 case AArch64::LD1R_WB_16B_fixed:
case AArch64::LD1R_WB_16B_register:
1147 case AArch64::LD1R_WB_8H_fixed:
case AArch64::LD1R_WB_8H_register:
1148 case AArch64::LD1R_WB_4S_fixed:
case AArch64::LD1R_WB_4S_register:
1149 case AArch64::LD1R_WB_2D_fixed:
case AArch64::LD1R_WB_2D_register: {
1151 case AArch64::LD1R_WB_16B_fixed:
case AArch64::LD1R_WB_16B_register:
1152 TransferBytes = 1;
break;
1153 case AArch64::LD1R_WB_8H_fixed:
case AArch64::LD1R_WB_8H_register:
1154 TransferBytes = 2;
break;
1155 case AArch64::LD1R_WB_4S_fixed:
case AArch64::LD1R_WB_4S_register:
1156 TransferBytes = 4;
break;
1157 case AArch64::LD1R_WB_2D_fixed:
case AArch64::LD1R_WB_2D_register:
1158 TransferBytes = 8;
break;
1165 case AArch64::LD2R_WB_8B_fixed:
case AArch64::LD2R_WB_8B_register:
1166 case AArch64::LD2R_WB_4H_fixed:
case AArch64::LD2R_WB_4H_register:
1167 case AArch64::LD2R_WB_2S_fixed:
case AArch64::LD2R_WB_2S_register:
1168 case AArch64::LD2R_WB_1D_fixed:
case AArch64::LD2R_WB_1D_register: {
1170 case AArch64::LD2R_WB_8B_fixed:
case AArch64::LD2R_WB_8B_register:
1171 TransferBytes = 2;
break;
1172 case AArch64::LD2R_WB_4H_fixed:
case AArch64::LD2R_WB_4H_register:
1173 TransferBytes = 4;
break;
1174 case AArch64::LD2R_WB_2S_fixed:
case AArch64::LD2R_WB_2S_register:
1175 TransferBytes = 8;
break;
1176 case AArch64::LD2R_WB_1D_fixed:
case AArch64::LD2R_WB_1D_register:
1177 TransferBytes = 16;
break;
1185 case AArch64::LD2R_WB_16B_fixed:
case AArch64::LD2R_WB_16B_register:
1186 case AArch64::LD2R_WB_8H_fixed:
case AArch64::LD2R_WB_8H_register:
1187 case AArch64::LD2R_WB_4S_fixed:
case AArch64::LD2R_WB_4S_register:
1188 case AArch64::LD2R_WB_2D_fixed:
case AArch64::LD2R_WB_2D_register: {
1190 case AArch64::LD2R_WB_16B_fixed:
case AArch64::LD2R_WB_16B_register:
1191 TransferBytes = 2;
break;
1192 case AArch64::LD2R_WB_8H_fixed:
case AArch64::LD2R_WB_8H_register:
1193 TransferBytes = 4;
break;
1194 case AArch64::LD2R_WB_4S_fixed:
case AArch64::LD2R_WB_4S_register:
1195 TransferBytes = 8;
break;
1196 case AArch64::LD2R_WB_2D_fixed:
case AArch64::LD2R_WB_2D_register:
1197 TransferBytes = 16;
break;
1204 case AArch64::LD3R_WB_8B_fixed:
case AArch64::LD3R_WB_8B_register:
1205 case AArch64::LD3R_WB_4H_fixed:
case AArch64::LD3R_WB_4H_register:
1206 case AArch64::LD3R_WB_2S_fixed:
case AArch64::LD3R_WB_2S_register:
1207 case AArch64::LD3R_WB_1D_fixed:
case AArch64::LD3R_WB_1D_register: {
1209 case AArch64::LD3R_WB_8B_fixed:
case AArch64::LD3R_WB_8B_register:
1210 TransferBytes = 3;
break;
1211 case AArch64::LD3R_WB_4H_fixed:
case AArch64::LD3R_WB_4H_register:
1212 TransferBytes = 6;
break;
1213 case AArch64::LD3R_WB_2S_fixed:
case AArch64::LD3R_WB_2S_register:
1214 TransferBytes = 12;
break;
1215 case AArch64::LD3R_WB_1D_fixed:
case AArch64::LD3R_WB_1D_register:
1216 TransferBytes = 24;
break;
1224 case AArch64::LD3R_WB_16B_fixed:
case AArch64::LD3R_WB_16B_register:
1225 case AArch64::LD3R_WB_4S_fixed:
case AArch64::LD3R_WB_8H_register:
1226 case AArch64::LD3R_WB_8H_fixed:
case AArch64::LD3R_WB_4S_register:
1227 case AArch64::LD3R_WB_2D_fixed:
case AArch64::LD3R_WB_2D_register: {
1229 case AArch64::LD3R_WB_16B_fixed:
case AArch64::LD3R_WB_16B_register:
1230 TransferBytes = 3;
break;
1231 case AArch64::LD3R_WB_8H_fixed:
case AArch64::LD3R_WB_8H_register:
1232 TransferBytes = 6;
break;
1233 case AArch64::LD3R_WB_4S_fixed:
case AArch64::LD3R_WB_4S_register:
1234 TransferBytes = 12;
break;
1235 case AArch64::LD3R_WB_2D_fixed:
case AArch64::LD3R_WB_2D_register:
1236 TransferBytes = 24;
break;
1243 case AArch64::LD4R_WB_8B_fixed:
case AArch64::LD4R_WB_8B_register:
1244 case AArch64::LD4R_WB_4H_fixed:
case AArch64::LD4R_WB_4H_register:
1245 case AArch64::LD4R_WB_2S_fixed:
case AArch64::LD4R_WB_2S_register:
1246 case AArch64::LD4R_WB_1D_fixed:
case AArch64::LD4R_WB_1D_register: {
1248 case AArch64::LD4R_WB_8B_fixed:
case AArch64::LD4R_WB_8B_register:
1249 TransferBytes = 4;
break;
1250 case AArch64::LD4R_WB_4H_fixed:
case AArch64::LD4R_WB_4H_register:
1251 TransferBytes = 8;
break;
1252 case AArch64::LD4R_WB_2S_fixed:
case AArch64::LD4R_WB_2S_register:
1253 TransferBytes = 16;
break;
1254 case AArch64::LD4R_WB_1D_fixed:
case AArch64::LD4R_WB_1D_register:
1255 TransferBytes = 32;
break;
1263 case AArch64::LD4R_WB_16B_fixed:
case AArch64::LD4R_WB_16B_register:
1264 case AArch64::LD4R_WB_4S_fixed:
case AArch64::LD4R_WB_8H_register:
1265 case AArch64::LD4R_WB_8H_fixed:
case AArch64::LD4R_WB_4S_register:
1266 case AArch64::LD4R_WB_2D_fixed:
case AArch64::LD4R_WB_2D_register: {
1268 case AArch64::LD4R_WB_16B_fixed:
case AArch64::LD4R_WB_16B_register:
1269 TransferBytes = 4;
break;
1270 case AArch64::LD4R_WB_8H_fixed:
case AArch64::LD4R_WB_8H_register:
1271 TransferBytes = 8;
break;
1272 case AArch64::LD4R_WB_4S_fixed:
case AArch64::LD4R_WB_4S_register:
1273 TransferBytes = 16;
break;
1274 case AArch64::LD4R_WB_2D_fixed:
case AArch64::LD4R_WB_2D_register:
1275 TransferBytes = 32;
break;
1282 case AArch64::LD1LN_WB_B_fixed:
case AArch64::LD1LN_WB_B_register:
1283 case AArch64::LD1LN_WB_H_fixed:
case AArch64::LD1LN_WB_H_register:
1284 case AArch64::LD1LN_WB_S_fixed:
case AArch64::LD1LN_WB_S_register:
1285 case AArch64::LD1LN_WB_D_fixed:
case AArch64::LD1LN_WB_D_register: {
1287 case AArch64::LD1LN_WB_B_fixed:
case AArch64::LD1LN_WB_B_register:
1288 TransferBytes = 1;
break;
1289 case AArch64::LD1LN_WB_H_fixed:
case AArch64::LD1LN_WB_H_register:
1290 TransferBytes = 2;
break;
1291 case AArch64::LD1LN_WB_S_fixed:
case AArch64::LD1LN_WB_S_register:
1292 TransferBytes = 4;
break;
1293 case AArch64::LD1LN_WB_D_fixed:
case AArch64::LD1LN_WB_D_register:
1294 TransferBytes = 8;
break;
1301 case AArch64::LD2LN_WB_B_fixed:
case AArch64::LD2LN_WB_B_register:
1302 case AArch64::LD2LN_WB_H_fixed:
case AArch64::LD2LN_WB_H_register:
1303 case AArch64::LD2LN_WB_S_fixed:
case AArch64::LD2LN_WB_S_register:
1304 case AArch64::LD2LN_WB_D_fixed:
case AArch64::LD2LN_WB_D_register: {
1306 case AArch64::LD2LN_WB_B_fixed:
case AArch64::LD2LN_WB_B_register:
1307 TransferBytes = 2;
break;
1308 case AArch64::LD2LN_WB_H_fixed:
case AArch64::LD2LN_WB_H_register:
1309 TransferBytes = 4;
break;
1310 case AArch64::LD2LN_WB_S_fixed:
case AArch64::LD2LN_WB_S_register:
1311 TransferBytes = 8;
break;
1312 case AArch64::LD2LN_WB_D_fixed:
case AArch64::LD2LN_WB_D_register:
1313 TransferBytes = 16;
break;
1320 case AArch64::LD3LN_WB_B_fixed:
case AArch64::LD3LN_WB_B_register:
1321 case AArch64::LD3LN_WB_H_fixed:
case AArch64::LD3LN_WB_H_register:
1322 case AArch64::LD3LN_WB_S_fixed:
case AArch64::LD3LN_WB_S_register:
1323 case AArch64::LD3LN_WB_D_fixed:
case AArch64::LD3LN_WB_D_register: {
1325 case AArch64::LD3LN_WB_B_fixed:
case AArch64::LD3LN_WB_B_register:
1326 TransferBytes = 3;
break;
1327 case AArch64::LD3LN_WB_H_fixed:
case AArch64::LD3LN_WB_H_register:
1328 TransferBytes = 6;
break;
1329 case AArch64::LD3LN_WB_S_fixed:
case AArch64::LD3LN_WB_S_register:
1330 TransferBytes = 12;
break;
1331 case AArch64::LD3LN_WB_D_fixed:
case AArch64::LD3LN_WB_D_register:
1332 TransferBytes = 24;
break;
1339 case AArch64::LD4LN_WB_B_fixed:
case AArch64::LD4LN_WB_B_register:
1340 case AArch64::LD4LN_WB_H_fixed:
case AArch64::LD4LN_WB_H_register:
1341 case AArch64::LD4LN_WB_S_fixed:
case AArch64::LD4LN_WB_S_register:
1342 case AArch64::LD4LN_WB_D_fixed:
case AArch64::LD4LN_WB_D_register: {
1344 case AArch64::LD4LN_WB_B_fixed:
case AArch64::LD4LN_WB_B_register:
1345 TransferBytes = 3;
break;
1346 case AArch64::LD4LN_WB_H_fixed:
case AArch64::LD4LN_WB_H_register:
1347 TransferBytes = 6;
break;
1348 case AArch64::LD4LN_WB_S_fixed:
case AArch64::LD4LN_WB_S_register:
1349 TransferBytes = 12;
break;
1350 case AArch64::LD4LN_WB_D_fixed:
case AArch64::LD4LN_WB_D_register:
1351 TransferBytes = 24;
break;
1358 case AArch64::ST1LN_WB_B_fixed:
case AArch64::ST1LN_WB_B_register:
1359 case AArch64::ST1LN_WB_H_fixed:
case AArch64::ST1LN_WB_H_register:
1360 case AArch64::ST1LN_WB_S_fixed:
case AArch64::ST1LN_WB_S_register:
1361 case AArch64::ST1LN_WB_D_fixed:
case AArch64::ST1LN_WB_D_register: {
1363 case AArch64::ST1LN_WB_B_fixed:
case AArch64::ST1LN_WB_B_register:
1364 TransferBytes = 1;
break;
1365 case AArch64::ST1LN_WB_H_fixed:
case AArch64::ST1LN_WB_H_register:
1366 TransferBytes = 2;
break;
1367 case AArch64::ST1LN_WB_S_fixed:
case AArch64::ST1LN_WB_S_register:
1368 TransferBytes = 4;
break;
1369 case AArch64::ST1LN_WB_D_fixed:
case AArch64::ST1LN_WB_D_register:
1370 TransferBytes = 8;
break;
1376 case AArch64::ST2LN_WB_B_fixed:
case AArch64::ST2LN_WB_B_register:
1377 case AArch64::ST2LN_WB_H_fixed:
case AArch64::ST2LN_WB_H_register:
1378 case AArch64::ST2LN_WB_S_fixed:
case AArch64::ST2LN_WB_S_register:
1379 case AArch64::ST2LN_WB_D_fixed:
case AArch64::ST2LN_WB_D_register: {
1381 case AArch64::ST2LN_WB_B_fixed:
case AArch64::ST2LN_WB_B_register:
1382 TransferBytes = 2;
break;
1383 case AArch64::ST2LN_WB_H_fixed:
case AArch64::ST2LN_WB_H_register:
1384 TransferBytes = 4;
break;
1385 case AArch64::ST2LN_WB_S_fixed:
case AArch64::ST2LN_WB_S_register:
1386 TransferBytes = 8;
break;
1387 case AArch64::ST2LN_WB_D_fixed:
case AArch64::ST2LN_WB_D_register:
1388 TransferBytes = 16;
break;
1394 case AArch64::ST3LN_WB_B_fixed:
case AArch64::ST3LN_WB_B_register:
1395 case AArch64::ST3LN_WB_H_fixed:
case AArch64::ST3LN_WB_H_register:
1396 case AArch64::ST3LN_WB_S_fixed:
case AArch64::ST3LN_WB_S_register:
1397 case AArch64::ST3LN_WB_D_fixed:
case AArch64::ST3LN_WB_D_register: {
1399 case AArch64::ST3LN_WB_B_fixed:
case AArch64::ST3LN_WB_B_register:
1400 TransferBytes = 3;
break;
1401 case AArch64::ST3LN_WB_H_fixed:
case AArch64::ST3LN_WB_H_register:
1402 TransferBytes = 6;
break;
1403 case AArch64::ST3LN_WB_S_fixed:
case AArch64::ST3LN_WB_S_register:
1404 TransferBytes = 12;
break;
1405 case AArch64::ST3LN_WB_D_fixed:
case AArch64::ST3LN_WB_D_register:
1406 TransferBytes = 24;
break;
1412 case AArch64::ST4LN_WB_B_fixed:
case AArch64::ST4LN_WB_B_register:
1413 case AArch64::ST4LN_WB_H_fixed:
case AArch64::ST4LN_WB_H_register:
1414 case AArch64::ST4LN_WB_S_fixed:
case AArch64::ST4LN_WB_S_register:
1415 case AArch64::ST4LN_WB_D_fixed:
case AArch64::ST4LN_WB_D_register: {
1417 case AArch64::ST4LN_WB_B_fixed:
case AArch64::ST4LN_WB_B_register:
1418 TransferBytes = 4;
break;
1419 case AArch64::ST4LN_WB_H_fixed:
case AArch64::ST4LN_WB_H_register:
1420 TransferBytes = 8;
break;
1421 case AArch64::ST4LN_WB_S_fixed:
case AArch64::ST4LN_WB_S_register:
1422 TransferBytes = 16;
break;
1423 case AArch64::ST4LN_WB_D_fixed:
case AArch64::ST4LN_WB_D_register:
1424 TransferBytes = 32;
break;
1434 unsigned Rt = fieldFromInstruction(Insn, 0, 5);
1435 unsigned Rn = fieldFromInstruction(Insn, 5, 5);
1436 unsigned Rm = fieldFromInstruction(Insn, 16, 5);
1513 unsigned Q = fieldFromInstruction(Insn, 30, 1);
1514 unsigned S = fieldFromInstruction(Insn, 10, 3);
1518 unsigned NumLanes = 16 / (TransferBytes / NumVecs);
1521 lane = (Q << 3) | S;
1524 lane = (Q << 2) | (S >> 1);
1527 lane = (Q << 1) | (S >> 2);
static DecodeStatus DecodeVLDSTPostInstruction(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static bool Check(DecodeStatus &Out, DecodeStatus In)
static DecodeStatus DecodeMRSOperand(llvm::MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeGPR32RegisterClass(llvm::MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeSingleIndexedInstruction(llvm::MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeGPR64xspRegisterClass(llvm::MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
const MCRegisterDesc & get(unsigned RegNo) const
Provide a get method, equivalent to [], but more useful with a pointer to this object.
static DecodeStatus DecodeShiftRightImm64(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeNeonMovImmShiftOperand(llvm::MCInst &Inst, unsigned ShiftAmount, uint64_t Address, const void *Decoder)
static MCOperand CreateReg(unsigned Reg)
static MCDisassembler * createAArch64Disassembler(const Target &T, const MCSubtargetInfo &STI)
static DecodeStatus DecodeQPairRegisterClass(llvm::MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeFPR32RegisterClass(llvm::MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
bool isLogicalImmBits(unsigned RegWidth, uint32_t Bits, uint64_t &Imm)
static DecodeStatus DecodeShiftLeftImm32(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeLogicalImmOperand(llvm::MCInst &Inst, unsigned Bits, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeLDSTPairInstruction(llvm::MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus Decode32BitShiftOperand(llvm::MCInst &Inst, unsigned ShiftAmount, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeBitfield32ImmOperand(llvm::MCInst &Inst, unsigned Imm6Bits, uint64_t Address, const void *Decoder)
static void RegisterMCDisassembler(Target &T, Target::MCDisassemblerCtorTy Fn)
static DecodeStatus DecodeQQuadRegisterClass(llvm::MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeFPR128RegisterClass(llvm::MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeShiftLeftImm8(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeGPR64noxzrRegisterClass(llvm::MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeFMOVLaneInstruction(llvm::MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeCVT32FixedPosOperand(llvm::MCInst &Inst, unsigned Imm6Bits, uint64_t Address, const void *Decoder)
virtual int readBytes(uint64_t address, uint64_t size, uint8_t *buf) const
#define llvm_unreachable(msg)
static DecodeStatus DecodeQTripleRegisterClass(llvm::MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeFPR64LoRegisterClass(llvm::MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeSysRegOperand(const A64SysReg::SysRegMapper &InstMapper, llvm::MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeBitfieldInstruction(llvm::MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeFPZeroOperand(llvm::MCInst &Inst, unsigned RmBits, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeShiftRightImm8(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeShiftRightImm16(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
void LLVMInitializeAArch64Disassembler()
static DecodeStatus DecodeLoadPairExclusiveInstruction(llvm::MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeGPR64RegisterClass(llvm::MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeFPR16RegisterClass(llvm::MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
A single entry single exit Region.
static DecodeStatus DecodeDQuadRegisterClass(llvm::MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeDPairRegisterClass(llvm::MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeShiftRightImm32(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeShiftLeftImm16(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeDTripleRegisterClass(llvm::MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
void setOpcode(unsigned Op)
static DecodeStatus DecodeVLDSTLanePostInstruction(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeRegisterClassByID(llvm::MCInst &Inst, unsigned RegNo, unsigned RegID, const void *Decoder)
static DecodeStatus DecodeShiftLeftImm64(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
Promote Memory to Register
static DecodeStatus DecodeGPR32wspRegisterClass(llvm::MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeFPR8RegisterClass(llvm::MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
unsigned getOpcode() const
std::string toString(uint32_t Bits, bool &Valid) const
static DecodeStatus DecodeAddrRegExtendOperand(llvm::MCInst &Inst, unsigned OptionHiS, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeMoveWideImmOperand(llvm::MCInst &Inst, unsigned FullImm, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeFPR64RegisterClass(llvm::MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeFPR128LoRegisterClass(llvm::MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeRegExtendOperand(llvm::MCInst &Inst, unsigned ShiftAmount, uint64_t Address, const void *Decoder)
static MCOperand CreateImm(int64_t Val)
MCRegisterInfo * createMCRegInfo(StringRef Triple) const
static unsigned getReg(const void *D, unsigned RC, unsigned RegNo)
void addOperand(const MCOperand &Op)
static DecodeStatus DecodeMSROperand(llvm::MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
MCDisassembler::DecodeStatus DecodeStatus
static DecodeStatus DecodeNamedImmOperand(llvm::MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
int decodeInstruction(struct InternalInstruction *insn, byteReader_t reader, const void *readerArg, dlog_t logger, void *loggerArg, const void *miiArg, uint64_t startLoc, DisassemblerMode mode)