87 "EQ",
"NE",
"CS",
"CC",
"MI",
"PL",
"VS",
"VC",
"HI",
"LS",
"GE",
"LT",
"GT",
"LE",
"",
"NV"
91 static uint32_t
ror(uint32_t value,
int places)
93 return (value >> places) | (value << (32 - places));
100 snprintf(instruction->
text, 128,
101 "0x%8.8" PRIx32
"\t0x%8.8" PRIx32
102 "\tUNDEFINED INSTRUCTION",
address, opcode);
110 if ((opcode & 0x0d30f000) == 0x0510f000) {
116 rn = (opcode & 0xf0000) >> 16;
117 u = (opcode & 0x00800000) >> 23;
121 snprintf(instruction->
text, 128,
122 "0x%8.8" PRIx32
"\t0x%8.8" PRIx32
"\tPLD %s%d",
127 i = (opcode & 0x02000000) >> 25;
128 r = (opcode & 0x00400000) >> 22;
132 offset = (opcode & 0x0F80) >> 7;
138 snprintf(instruction->
text, 128,
139 "0x%8.8" PRIx32
"\t0x%8.8" PRIx32
"\tPLD%s [r%d, %sr%d]",
140 address, opcode, r ?
"" :
"W", rn, u ?
"" :
"-", rm);
144 shift = (opcode & 0x60) >> 5;
148 snprintf(instruction->
text, 128,
149 "0x%8.8" PRIx32
"\t0x%8.8" PRIx32
"\tPLD%s [r%d, %sr%d, LSL #0x%x)",
150 address, opcode, r ?
"" :
"W", rn, u ?
"" :
"-", rm,
offset);
151 }
else if (shift == 0x1) {
153 snprintf(instruction->
text, 128,
154 "0x%8.8" PRIx32
"\t0x%8.8" PRIx32
"\tPLD%s [r%d, %sr%d, LSR #0x%x)",
155 address, opcode, r ?
"" :
"W", rn, u ?
"" :
"-", rm,
offset);
156 }
else if (shift == 0x2) {
158 snprintf(instruction->
text, 128,
159 "0x%8.8" PRIx32
"\t0x%8.8" PRIx32
"\tPLD%s [r%d, %sr%d, ASR #0x%x)",
160 address, opcode, r ?
"" :
"W", rn, u ?
"" :
"-", rm,
offset);
161 }
else if (shift == 0x3) {
163 snprintf(instruction->
text, 128,
164 "0x%8.8" PRIx32
"\t0x%8.8" PRIx32
"\tPLD%s [r%d, %sr%d, ROR #0x%x)",
165 address, opcode, r ?
"" :
"W", rn, u ?
"" :
"-", rm,
offset);
172 snprintf(instruction->
text, 128,
173 "0x%8.8" PRIx32
"\t0x%8.8" PRIx32
"\tPLD%s [r%d]",
174 address, opcode, r ?
"" :
"W", rn);
176 snprintf(instruction->
text, 128,
177 "0x%8.8" PRIx32
"\t0x%8.8" PRIx32
"\tPLD%s [r%d, #%s%d]",
185 if ((opcode & 0x07f000f0) == 0x05700040) {
189 switch (opcode & 0x0000000f) {
218 snprintf(instruction->
text,
220 "0x%8.8" PRIx32
"\t0x%8.8" PRIx32
"\tDSB %s",
226 if ((opcode & 0x07f000f0) == 0x05700060) {
229 snprintf(instruction->
text,
231 "0x%8.8" PRIx32
"\t0x%8.8" PRIx32
"\tISB %s",
233 ((opcode & 0x0000000f) == 0xf) ?
"SY" :
"UNK");
243 const char *wback = (opcode & (1 << 21)) ?
"!" :
"";
244 const char *
mode =
"";
246 switch ((opcode >> 23) & 0x3) {
261 switch (opcode & 0x0e500000) {
263 snprintf(instruction->
text, 128,
"0x%8.8" PRIx32
265 "\tSRS%s\tSP%s, #%" PRIu32,
271 snprintf(instruction->
text, 128,
"0x%8.8" PRIx32
273 "\tRFE%s\tr%" PRIu32
"%s",
276 (opcode >> 16) & 0xf, wback);
289 snprintf(instruction->
text, 128,
290 "0x%8.8" PRIx32
"\t0x%8.8" PRIx32
"\tSVC %#6.6" PRIx32,
291 address, opcode, (opcode & 0xffffff));
301 uint32_t target_address;
304 immediate = opcode & 0x00ffffff;
307 if (immediate & 0x00800000)
308 offset = 0xff000000 | immediate;
316 if (opcode & 0x01000000)
321 snprintf(instruction->
text,
323 "0x%8.8" PRIx32
"\t0x%8.8" PRIx32
"\tBLX 0x%8.8" PRIx32,
340 uint32_t target_address;
342 immediate = opcode & 0x00ffffff;
343 l = (opcode & 0x01000000) >> 24;
346 if (immediate & 0x00800000)
347 offset = 0xff000000 | immediate;
361 snprintf(instruction->
text,
363 "0x%8.8" PRIx32
"\t0x%8.8" PRIx32
"\tB%s%s 0x%8.8" PRIx32,
381 uint8_t cp_num = (opcode & 0xf00) >> 8;
384 if (((opcode & 0x0ff00000) == 0x0c400000) || ((opcode & 0x0ff00000) == 0x0c500000)) {
385 uint8_t cp_opcode, rd, rn, crm;
388 cp_opcode = (opcode & 0xf0) >> 4;
389 rd = (opcode & 0xf000) >> 12;
390 rn = (opcode & 0xf0000) >> 16;
391 crm = (opcode & 0xf);
394 if ((opcode & 0x0ff00000) == 0x0c400000) {
397 }
else if ((opcode & 0x0ff00000) == 0x0c500000) {
406 snprintf(instruction->
text, 128,
407 "0x%8.8" PRIx32
"\t0x%8.8" PRIx32
408 "\t%s%s%s p%i, %x, r%i, r%i, c%i",
410 ((opcode & 0xf0000000) == 0xf0000000)
411 ?
"2" :
COND(opcode),
412 COND(opcode), cp_num, cp_opcode, rd, rn, crm);
417 char addressing_mode[32];
419 crd = (opcode & 0xf000) >> 12;
420 rn = (opcode & 0xf0000) >> 16;
421 offset = (opcode & 0xff) << 2;
424 if (opcode & 0x00100000) {
432 u = (opcode & 0x00800000) >> 23;
435 if ((opcode & 0x01200000) == 0x01000000)
436 snprintf(addressing_mode, 32,
"[r%i, #%s%d]",
437 rn, u ?
"" :
"-",
offset);
438 else if ((opcode & 0x01200000) == 0x01200000)
439 snprintf(addressing_mode, 32,
"[r%i, #%s%d]!",
440 rn, u ?
"" :
"-",
offset);
441 else if ((opcode & 0x01200000) == 0x00200000)
442 snprintf(addressing_mode, 32,
"[r%i], #%s%d",
443 rn, u ?
"" :
"-",
offset);
444 else if ((opcode & 0x01200000) == 0x00000000)
445 snprintf(addressing_mode, 32,
"[r%i], {%d}",
448 snprintf(instruction->
text, 128,
"0x%8.8" PRIx32
450 "\t%s%s%s p%i, c%i, %s",
452 ((opcode & 0xf0000000) == 0xf0000000)
453 ?
"2" :
COND(opcode),
454 (opcode & (1 << 22)) ?
"L" :
"",
455 cp_num, crd, addressing_mode);
469 uint8_t cp_num, opcode_1, crd_rd, crn, crm, opcode_2;
471 cond = ((opcode & 0xf0000000) == 0xf0000000) ?
"2" :
COND(opcode);
472 cp_num = (opcode & 0xf00) >> 8;
473 crd_rd = (opcode & 0xf000) >> 12;
474 crn = (opcode & 0xf0000) >> 16;
475 crm = (opcode & 0xf);
476 opcode_2 = (opcode & 0xe0) >> 5;
479 if (opcode & 0x00000010) {
480 if (opcode & 0x00100000) {
488 opcode_1 = (opcode & 0x00e00000) >> 21;
490 snprintf(instruction->
text,
492 "0x%8.8" PRIx32
"\t0x%8.8" PRIx32
"\t%s%s p%i, 0x%2.2x, r%i, c%i, c%i, 0x%2.2x",
507 opcode_1 = (opcode & 0x00f00000) >> 20;
509 snprintf(instruction->
text,
511 "0x%8.8" PRIx32
"\t0x%8.8" PRIx32
"\t%s%s p%i, 0x%2.2x, c%i, c%i, c%i, 0x%2.2x",
531 uint8_t i, p, u, b, w, l;
538 i = (opcode & 0x02000000) >> 25;
539 p = (opcode & 0x01000000) >> 24;
540 u = (opcode & 0x00800000) >> 23;
541 b = (opcode & 0x00400000) >> 22;
542 w = (opcode & 0x00200000) >> 21;
543 l = (opcode & 0x00100000) >> 20;
546 rd = (opcode & 0xf000) >> 12;
549 rn = (opcode & 0xf0000) >> 16;
563 if ((p == 0) && (w == 1)) {
577 if ((p == 0) && (w == 1)) {
593 uint32_t offset_12 = (opcode & 0xfff);
595 snprintf(
offset, 32,
", #%s0x%" PRIx32, (u) ?
"" :
"-", offset_12);
597 snprintf(
offset, 32,
"%s",
"");
602 uint8_t shift_imm, shift;
605 shift_imm = (opcode & 0xf80) >> 7;
606 shift = (opcode & 0x60) >> 5;
610 if ((shift == 0x1) && (shift_imm == 0x0))
614 if ((shift == 0x2) && (shift_imm == 0x0))
618 if ((shift == 0x3) && (shift_imm == 0x0))
626 if ((shift_imm == 0x0) && (shift == 0x0))
627 snprintf(
offset, 32,
", %sr%i", (u) ?
"" :
"-", rm);
631 snprintf(
offset, 32,
", %sr%i, LSL #0x%x", (u) ?
"" :
"-", rm, shift_imm);
634 snprintf(
offset, 32,
", %sr%i, LSR #0x%x", (u) ?
"" :
"-", rm, shift_imm);
637 snprintf(
offset, 32,
", %sr%i, ASR #0x%x", (u) ?
"" :
"-", rm, shift_imm);
640 snprintf(
offset, 32,
", %sr%i, ROR #0x%x", (u) ?
"" :
"-", rm, shift_imm);
643 snprintf(
offset, 32,
", %sr%i, RRX", (u) ?
"" :
"-", rm);
651 snprintf(instruction->
text,
653 "0x%8.8" PRIx32
"\t0x%8.8" PRIx32
"\t%s%s%s r%i, [r%i%s]",
665 snprintf(instruction->
text,
667 "0x%8.8" PRIx32
"\t0x%8.8" PRIx32
"\t%s%s%s r%i, [r%i%s]!",
680 snprintf(instruction->
text,
682 "0x%8.8" PRIx32
"\t0x%8.8" PRIx32
"\t%s%s%s r%i, [r%i]%s",
700 unsigned int rm = (opcode >> 0) & 0xf;
701 unsigned int rd = (opcode >> 12) & 0xf;
702 unsigned int rn = (opcode >> 16) & 0xf;
705 switch ((opcode >> 24) & 0x3) {
710 sprintf(cp,
"UNDEFINED");
720 switch ((opcode >> 10) & 0x3) {
736 sprintf(cp,
"%cXT%s%s\tr%d, r%d%s",
737 (opcode & (1 << 22)) ?
'U' :
'S',
742 sprintf(cp,
"%cXTA%s%s\tr%d, r%d, r%d%s",
743 (opcode & (1 << 22)) ?
'U' :
'S',
756 switch ((opcode >> 20) & 0x7) {
779 switch ((opcode >> 5) & 0x7) {
808 sprintf(cp,
"%s%s%s\tr%d, r%d, r%d", prefix,
op,
COND(opcode),
809 (
int) (opcode >> 12) & 0xf,
810 (
int) (opcode >> 16) & 0xf,
811 (
int) (opcode >> 0) & 0xf);
816 sprintf(cp,
"UNDEFINED");
824 char *cp = instruction->
text;
825 char *mnemonic =
NULL;
828 "0x%8.8" PRIx32
"\t0x%8.8" PRIx32
"\t",
833 if ((opcode & 0x01800000) == 0x00000000) {
839 if ((opcode & 0x01f00020) == 0x00800000) {
841 unsigned int imm = (opcode >> 7) & 0x1f;
843 if (opcode & (1 << 6)) {
852 sprintf(cp,
"PKH%s%s\tr%d, r%d, r%d, %s #%d",
854 (
int) (opcode >> 12) & 0xf,
855 (
int) (opcode >> 16) & 0xf,
856 (
int) (opcode >> 0) & 0xf,
862 if ((opcode & 0x01a00020) == 0x00a00000) {
864 unsigned int imm = (opcode >> 7) & 0x1f;
866 if (opcode & (1 << 6)) {
873 sprintf(cp,
"%cSAT%s\tr%d, #%d, r%d, %s #%d",
874 (opcode & (1 << 22)) ?
'U' :
'S',
876 (
int) (opcode >> 12) & 0xf,
877 (
int) (opcode >> 16) & 0x1f,
878 (
int) (opcode >> 0) & 0xf,
884 if ((opcode & 0x018000f0) == 0x00800070) {
890 if ((opcode & 0x01f00080) == 0x01000000) {
891 unsigned int rn = (opcode >> 12) & 0xf;
894 sprintf(cp,
"SML%cD%s%s\tr%d, r%d, r%d, r%d",
895 (opcode & (1 << 6)) ?
'S' :
'A',
896 (opcode & (1 << 5)) ?
"X" :
"",
898 (
int) (opcode >> 16) & 0xf,
899 (
int) (opcode >> 0) & 0xf,
900 (
int) (opcode >> 8) & 0xf,
903 sprintf(cp,
"SMU%cD%s%s\tr%d, r%d, r%d",
904 (opcode & (1 << 6)) ?
'S' :
'A',
905 (opcode & (1 << 5)) ?
"X" :
"",
907 (
int) (opcode >> 16) & 0xf,
908 (
int) (opcode >> 0) & 0xf,
909 (
int) (opcode >> 8) & 0xf);
912 if ((opcode & 0x01f00000) == 0x01400000) {
913 sprintf(cp,
"SML%cLD%s%s\tr%d, r%d, r%d, r%d",
914 (opcode & (1 << 6)) ?
'S' :
'A',
915 (opcode & (1 << 5)) ?
"X" :
"",
917 (
int) (opcode >> 12) & 0xf,
918 (
int) (opcode >> 16) & 0xf,
919 (
int) (opcode >> 0) & 0xf,
920 (
int) (opcode >> 8) & 0xf);
923 if ((opcode & 0x01f00000) == 0x01500000) {
924 unsigned int rn = (opcode >> 12) & 0xf;
926 switch (opcode & 0xc0) {
938 sprintf(cp,
"SMML%c%s%s\tr%d, r%d, r%d, r%d",
939 (opcode & (1 << 6)) ?
'S' :
'A',
940 (opcode & (1 << 5)) ?
"R" :
"",
942 (
int) (opcode >> 16) & 0xf,
943 (
int) (opcode >> 0) & 0xf,
944 (
int) (opcode >> 8) & 0xf,
947 sprintf(cp,
"SMMUL%s%s\tr%d, r%d, r%d",
948 (opcode & (1 << 5)) ?
"R" :
"",
950 (
int) (opcode >> 16) & 0xf,
951 (
int) (opcode >> 0) & 0xf,
952 (
int) (opcode >> 8) & 0xf);
957 switch (opcode & 0x01f000f0) {
961 sprintf(cp,
"%cSAT16%s\tr%d, #%d, r%d",
962 (opcode & (1 << 22)) ?
'U' :
'S',
964 (
int)(opcode >> 12) & 0xf,
965 (
int)(opcode >> 16) & 0xf,
966 (
int)(opcode >> 0) & 0xf);
979 sprintf(cp,
"SEL%s\tr%d, r%d, r%d",
COND(opcode),
980 (
int)(opcode >> 12) & 0xf,
981 (
int)(opcode >> 16) & 0xf,
982 (
int)(opcode >> 0) & 0xf);
986 if (((opcode >> 12) & 0xf) == 0xf)
987 sprintf(cp,
"USAD8%s\tr%d, r%d, r%d",
COND(opcode),
988 (
int)(opcode >> 16) & 0xf,
989 (
int)(opcode >> 0) & 0xf,
990 (
int)(opcode >> 8) & 0xf);
992 sprintf(cp,
"USADA8%s\tr%d, r%d, r%d, r%d",
COND(opcode),
993 (
int)(opcode >> 16) & 0xf,
994 (
int)(opcode >> 0) & 0xf,
995 (
int)(opcode >> 8) & 0xf,
996 (
int)(opcode >> 12) & 0xf);
1000 unsigned int rm = (opcode >> 0) & 0xf;
1001 unsigned int rd = (opcode >> 12) & 0xf;
1003 sprintf(cp,
"%s%s\tr%d, r%d", mnemonic,
COND(opcode), rm, rd);
1009 sprintf(cp,
"UNDEFINED");
1017 uint8_t p, u, i, w, l, s, h;
1024 p = (opcode & 0x01000000) >> 24;
1025 u = (opcode & 0x00800000) >> 23;
1026 i = (opcode & 0x00400000) >> 22;
1027 w = (opcode & 0x00200000) >> 21;
1028 l = (opcode & 0x00100000) >> 20;
1029 s = (opcode & 0x00000040) >> 6;
1030 h = (opcode & 0x00000020) >> 5;
1033 rd = (opcode & 0xf000) >> 12;
1036 rn = (opcode & 0xf0000) >> 16;
1077 uint32_t offset_8 = ((opcode & 0xf00) >> 4) | (opcode & 0xf);
1078 snprintf(
offset, 32,
"#%s0x%" PRIx32, (u) ?
"" :
"-", offset_8);
1084 rm = (opcode & 0xf);
1085 snprintf(
offset, 32,
"%sr%i", (u) ?
"" :
"-", rm);
1095 snprintf(instruction->
text,
1097 "0x%8.8" PRIx32
"\t0x%8.8" PRIx32
"\t%s%s%s r%i, [r%i, %s]",
1109 snprintf(instruction->
text,
1111 "0x%8.8" PRIx32
"\t0x%8.8" PRIx32
"\t%s%s%s r%i, [r%i, %s]!",
1124 snprintf(instruction->
text,
1126 "0x%8.8" PRIx32
"\t0x%8.8" PRIx32
"\t%s%s%s r%i, [r%i], %s",
1146 uint8_t p, u, s, w, l, rn;
1147 uint32_t register_list;
1148 char *addressing_mode;
1155 p = (opcode & 0x01000000) >> 24;
1156 u = (opcode & 0x00800000) >> 23;
1157 s = (opcode & 0x00400000) >> 22;
1158 w = (opcode & 0x00200000) >> 21;
1159 l = (opcode & 0x00100000) >> 20;
1160 register_list = (opcode & 0xffff);
1161 rn = (opcode & 0xf0000) >> 16;
1179 addressing_mode =
"IB";
1182 addressing_mode =
"DB";
1188 addressing_mode =
"";
1191 addressing_mode =
"DA";
1195 reg_list_p = reg_list;
1196 for (i = 0; i <= 15; i++) {
1197 if ((register_list >> i) & 1) {
1200 reg_list_p += snprintf(reg_list_p,
1201 (reg_list + 69 - reg_list_p),
1205 reg_list_p += snprintf(reg_list_p,
1206 (reg_list + 69 - reg_list_p),
1212 snprintf(instruction->
text, 128,
1213 "0x%8.8" PRIx32
"\t0x%8.8" PRIx32
1214 "\t%s%s%s r%i%s, {%s}%s",
1216 mnemonic, addressing_mode,
COND(opcode),
1217 rn, (w) ?
"!" :
"", reg_list, (s) ?
"^" :
"");
1227 if ((opcode & 0x000000f0) == 0x00000090) {
1229 if ((opcode & 0x0f800000) == 0x00000000) {
1230 uint8_t rm,
rs, rn, rd, s;
1232 rs = (opcode & 0xf00) >> 8;
1233 rn = (opcode & 0xf000) >> 12;
1234 rd = (opcode & 0xf0000) >> 16;
1235 s = (opcode & 0x00100000) >> 20;
1238 if (opcode & 0x00200000) {
1240 snprintf(instruction->
text,
1242 "0x%8.8" PRIx32
"\t0x%8.8" PRIx32
"\tMLA%s%s r%i, r%i, r%i, r%i",
1253 snprintf(instruction->
text,
1255 "0x%8.8" PRIx32
"\t0x%8.8" PRIx32
"\tMUL%s%s r%i, r%i, r%i",
1269 if ((opcode & 0x0f800000) == 0x00800000) {
1270 char *mnemonic =
NULL;
1271 uint8_t rm,
rs, rd_hi, rd_low, s;
1273 rs = (opcode & 0xf00) >> 8;
1274 rd_hi = (opcode & 0xf000) >> 12;
1275 rd_low = (opcode & 0xf0000) >> 16;
1276 s = (opcode & 0x00100000) >> 20;
1278 switch ((opcode & 0x00600000) >> 21) {
1297 snprintf(instruction->
text,
1299 "0x%8.8" PRIx32
"\t0x%8.8" PRIx32
"\t%s%s%s r%i, r%i, r%i, r%i",
1314 if ((opcode & 0x0f800000) == 0x01000000) {
1317 rd = (opcode & 0xf000) >> 12;
1318 rn = (opcode & 0xf0000) >> 16;
1323 snprintf(instruction->
text,
1325 "0x%8.8" PRIx32
"\t0x%8.8" PRIx32
"\t%s%s r%i, r%i, [r%i]",
1328 (opcode & 0x00400000) ?
"SWPB" :
"SWP",
1344 int r = (opcode & 0x00400000) >> 22;
1345 char *PSR = (r) ?
"SPSR" :
"CPSR";
1348 if (opcode & 0x00200000) {
1352 if (opcode & 0x02000000) {
1353 uint8_t immediate = (opcode & 0xff);
1354 uint8_t rotate = (opcode & 0xf00);
1356 snprintf(instruction->
text,
1358 "0x%8.8" PRIx32
"\t0x%8.8" PRIx32
"\tMSR%s %s_%s%s%s%s, 0x%8.8" PRIx32,
1363 (opcode & 0x10000) ?
"c" :
"",
1364 (opcode & 0x20000) ?
"x" :
"",
1365 (opcode & 0x40000) ?
"s" :
"",
1366 (opcode & 0x80000) ?
"f" :
"",
1367 ror(immediate, (rotate * 2))
1370 uint8_t rm = opcode & 0xf;
1371 snprintf(instruction->
text,
1373 "0x%8.8" PRIx32
"\t0x%8.8" PRIx32
"\tMSR%s %s_%s%s%s%s, r%i",
1378 (opcode & 0x10000) ?
"c" :
"",
1379 (opcode & 0x20000) ?
"x" :
"",
1380 (opcode & 0x40000) ?
"s" :
"",
1381 (opcode & 0x80000) ?
"f" :
"",
1390 rd = (opcode & 0x0000f000) >> 12;
1392 snprintf(instruction->
text,
1394 "0x%8.8" PRIx32
"\t0x%8.8" PRIx32
"\tMRS%s r%i, %s",
1410 if ((opcode & 0x000000f0) == 0x00000000)
1414 if ((opcode & 0x006000f0) == 0x00200010) {
1419 snprintf(instruction->
text, 128,
"0x%8.8" PRIx32
"\t0x%8.8" PRIx32
"\tBX%s r%i",
1427 if ((opcode & 0x006000f0) == 0x00200020) {
1432 snprintf(instruction->
text, 128,
1433 "0x%8.8" PRIx32
"\t0x%8.8" PRIx32
"\tBXJ%s r%i",
1441 if ((opcode & 0x006000f0) == 0x00600010) {
1445 rd = (opcode & 0xf000) >> 12;
1447 snprintf(instruction->
text,
1449 "0x%8.8" PRIx32
"\t0x%8.8" PRIx32
"\tCLZ%s r%i, r%i",
1458 if ((opcode & 0x006000f0) == 0x00200030) {
1463 snprintf(instruction->
text, 128,
"0x%8.8" PRIx32
"\t0x%8.8" PRIx32
"\tBLX%s r%i",
1471 if ((opcode & 0x0000000f0) == 0x00000050) {
1473 char *mnemonic =
NULL;
1475 rd = (opcode & 0xf000) >> 12;
1476 rn = (opcode & 0xf0000) >> 16;
1478 switch ((opcode & 0x00600000) >> 21) {
1497 snprintf(instruction->
text,
1499 "0x%8.8" PRIx32
"\t0x%8.8" PRIx32
"\t%s%s r%i, r%i, r%i",
1510 if ((opcode & 0x0000000f0) == 0x00000060) {
1511 if (((opcode & 0x600000) >> 21) == 3)
1513 snprintf(instruction->
text,
1515 "0x%8.8" PRIx32
"\t0x%8.8" PRIx32
"\tERET",
1521 if ((opcode & 0x0000000f0) == 0x00000070) {
1522 uint32_t immediate = 0;
1523 char *mnemonic =
NULL;
1525 switch ((opcode & 0x600000) >> 21) {
1529 immediate = ((opcode & 0x000fff00) >> 4) | (opcode & 0xf);
1534 immediate = ((opcode & 0x000fff00) >> 4) | (opcode & 0xf);
1539 immediate = (opcode & 0xf);
1543 snprintf(instruction->
text,
1545 "0x%8.8" PRIx32
"\t0x%8.8" PRIx32
"\t%s 0x%4.4" PRIx32,
1553 if ((opcode & 0x000000090) == 0x00000080) {
1554 int x = (opcode & 0x20) >> 5;
1555 int y = (opcode & 0x40) >> 6;
1558 if ((opcode & 0x00600000) == 0x00000000) {
1559 uint8_t rd, rm,
rs, rn;
1561 rd = (opcode & 0xf0000) >> 16;
1562 rm = (opcode & 0xf);
1563 rs = (opcode & 0xf00) >> 8;
1564 rn = (opcode & 0xf000) >> 12;
1566 snprintf(instruction->
text,
1568 "0x%8.8" PRIx32
"\t0x%8.8" PRIx32
"\tSMLA%s%s%s r%i, r%i, r%i, r%i",
1581 if ((opcode & 0x00600000) == 0x00400000) {
1582 uint8_t rd_low, rd_hi, rm,
rs;
1584 rd_hi = (opcode & 0xf0000) >> 16;
1585 rd_low = (opcode & 0xf000) >> 12;
1586 rm = (opcode & 0xf);
1587 rs = (opcode & 0xf00) >> 8;
1589 snprintf(instruction->
text,
1591 "0x%8.8" PRIx32
"\t0x%8.8" PRIx32
"\tSMLA%s%s%s r%i, r%i, r%i, r%i",
1604 if (((opcode & 0x00600000) == 0x00200000) && (x == 0)) {
1605 uint8_t rd, rm,
rs, rn;
1607 rd = (opcode & 0xf0000) >> 16;
1608 rm = (opcode & 0xf);
1609 rs = (opcode & 0xf00) >> 8;
1610 rn = (opcode & 0xf000) >> 12;
1612 snprintf(instruction->
text,
1614 "0x%8.8" PRIx32
"\t0x%8.8" PRIx32
"\tSMLAW%s%s r%i, r%i, r%i, r%i",
1626 if ((opcode & 0x00600000) == 0x00600000) {
1629 rd = (opcode & 0xf0000) >> 16;
1630 rm = (opcode & 0xf);
1631 rs = (opcode & 0xf00) >> 8;
1633 snprintf(instruction->
text,
1635 "0x%8.8" PRIx32
"\t0x%8.8" PRIx32
"\tSMULW%s%s%s r%i, r%i, r%i",
1647 if (((opcode & 0x00600000) == 0x00200000) && (x == 1)) {
1650 rd = (opcode & 0xf0000) >> 16;
1651 rm = (opcode & 0xf);
1652 rs = (opcode & 0xf00) >> 8;
1654 snprintf(instruction->
text,
1656 "0x%8.8" PRIx32
"\t0x%8.8" PRIx32
"\tSMULW%s%s r%i, r%i, r%i",
1677 rd = (opcode & 0xf000) >> 12;
1678 t = opcode & 0x00400000;
1679 immediate = (opcode & 0xf0000) >> 4 | (opcode & 0xfff);
1684 snprintf(instruction->
text,
1686 "0x%8.8" PRIx32
"\t0x%8.8" PRIx32
"\tMOV%s%s r%i, #0x%" PRIx16,
1700 uint8_t i,
op, s, rn, rd;
1701 char *mnemonic =
NULL;
1702 char shifter_operand[32];
1704 i = (opcode & 0x02000000) >> 25;
1705 op = (opcode & 0x01e00000) >> 21;
1706 s = (opcode & 0x00100000) >> 20;
1708 rd = (opcode & 0xf000) >> 12;
1709 rn = (opcode & 0xf0000) >> 16;
1783 uint8_t immed_8 = opcode & 0xff;
1784 uint8_t rotate_imm = (opcode & 0xf00) >> 8;
1787 immediate =
ror(immed_8, rotate_imm * 2);
1789 snprintf(shifter_operand, 32,
"#0x%" PRIx32, immediate);
1795 shift = (opcode & 0x60) >> 5;
1796 rm = (opcode & 0xf);
1798 if ((opcode & 0x10) != 0x10) {
1801 shift_imm = (opcode & 0xf80) >> 7;
1810 if ((shift == 0x1) && (shift_imm == 0x0))
1814 if ((shift == 0x2) && (shift_imm == 0x0))
1818 if ((shift == 0x3) && (shift_imm == 0x0))
1821 if ((shift_imm == 0x0) && (shift == 0x0))
1822 snprintf(shifter_operand, 32,
"r%i", rm);
1825 snprintf(shifter_operand,
1830 else if (shift == 0x1)
1831 snprintf(shifter_operand,
1836 else if (shift == 0x2)
1837 snprintf(shifter_operand,
1842 else if (shift == 0x3)
1843 snprintf(shifter_operand,
1848 else if (shift == 0x4)
1849 snprintf(shifter_operand, 32,
"r%i, RRX", rm);
1852 uint8_t
rs = (opcode & 0xf00) >> 8;
1860 snprintf(shifter_operand, 32,
"r%i, LSL r%i", rm,
rs);
1861 else if (shift == 0x1)
1862 snprintf(shifter_operand, 32,
"r%i, LSR r%i", rm,
rs);
1863 else if (shift == 0x2)
1864 snprintf(shifter_operand, 32,
"r%i, ASR r%i", rm,
rs);
1865 else if (shift == 0x3)
1866 snprintf(shifter_operand, 32,
"r%i, ROR r%i", rm,
rs);
1870 if ((
op < 0x8) || (
op == 0xc) || (
op == 0xe)) {
1872 snprintf(instruction->
text,
1874 "0x%8.8" PRIx32
"\t0x%8.8" PRIx32
"\t%s%s%s r%i, r%i, %s",
1883 }
else if ((
op == 0xd) || (
op == 0xf)) {
1885 if (opcode == 0xe1a00000)
1886 snprintf(instruction->
text,
1888 "0x%8.8" PRIx32
"\t0x%8.8" PRIx32
"\tNOP",
1892 snprintf(instruction->
text,
1894 "0x%8.8" PRIx32
"\t0x%8.8" PRIx32
"\t%s%s%s r%i, %s",
1903 snprintf(instruction->
text, 128,
"0x%8.8" PRIx32
"\t0x%8.8" PRIx32
"\t%s%s r%i, %s",
1905 rn, shifter_operand);
1916 instruction->
opcode = opcode;
1920 if ((opcode & 0xf0000000) == 0xf0000000) {
1922 if ((opcode & 0x08000000) == 0x00000000)
1926 if ((opcode & 0x0e000000) == 0x08000000)
1930 if ((opcode & 0x0e000000) == 0x0a000000)
1935 if ((opcode & 0x0e000000) == 0x0c000000)
1939 if ((opcode & 0x0f000100) == 0x0c000000)
1943 if ((opcode & 0x0f000010) == 0x0c000010)
1947 if ((opcode & 0x0f000000) == 0x0f000000) {
1949 snprintf(instruction->
text,
1951 "0x%8.8" PRIx32
"\t0x%8.8" PRIx32
"\tUNDEFINED INSTRUCTION",
1959 if ((opcode & 0x0e000000) == 0x00000000) {
1961 if ((opcode & 0x00000090) == 0x00000090)
1965 if ((opcode & 0x0f900000) == 0x01000000)
1972 if ((opcode & 0x0e000000) == 0x02000000) {
1974 if ((opcode & 0x0fb00000) == 0x03000000)
1978 if ((opcode & 0x0fb00000) == 0x03200000)
1986 if ((opcode & 0x0e000000) == 0x04000000) {
1992 if ((opcode & 0x0e000000) == 0x06000000) {
1994 if ((opcode & 0x00000010) == 0x00000000)
2000 if ((opcode & 0x07f000f0) == 0x07f000f0) {
2002 snprintf(instruction->
text, 128,
2003 "0x%8.8" PRIx32
"\t0x%8.8" PRIx32
"\tUNDEF",
2013 if ((opcode & 0x0e000000) == 0x08000000) {
2019 if ((opcode & 0x0e000000) == 0x0a000000) {
2025 if ((opcode & 0x0e000000) == 0x0c000000) {
2031 if ((opcode & 0x0e000000) == 0x0e000000) {
2033 if ((opcode & 0x0f000000) == 0x0f000000)
2037 if ((opcode & 0x0f000010) == 0x0e000000)
2041 if ((opcode & 0x0f000010) == 0x0e000010)
2045 LOG_ERROR(
"ARM: should never reach this point (opcode=%08" PRIx32
")", opcode);
2052 uint32_t
offset = opcode & 0x7ff;
2053 uint32_t opc = (opcode >> 11) & 0x3;
2054 uint32_t target_address;
2055 char *mnemonic =
NULL;
2058 if (((opc == 0) || (opc == 2)) && (
offset & 0x00000400))
2073 target_address &= 0xfffffffc;
2078 mnemonic =
"prefix";
2079 target_address =
offset << 12;
2097 snprintf(instruction->
text, 128,
2098 "0x%8.8" PRIx32
" 0x%4.4x \t%s\t%#8.8" PRIx32,
2099 address, opcode, mnemonic, target_address);
2110 uint8_t rd = (opcode >> 0) & 0x7;
2111 uint8_t rn = (opcode >> 3) & 0x7;
2112 uint8_t rm_imm = (opcode >> 6) & 0x7;
2113 uint32_t opc = opcode & (1 << 9);
2114 uint32_t reg_imm = opcode & (1 << 10);
2133 snprintf(instruction->
text, 128,
2134 "0x%8.8" PRIx32
" 0x%4.4x \t%s\tr%i, r%i, #%d",
2135 address, opcode, mnemonic, rd, rn, rm_imm);
2139 snprintf(instruction->
text, 128,
2140 "0x%8.8" PRIx32
" 0x%4.4x \t%s\tr%i, r%i, r%i",
2141 address, opcode, mnemonic, rd, rn, rm_imm);
2150 uint8_t rd = (opcode >> 0) & 0x7;
2151 uint8_t rm = (opcode >> 3) & 0x7;
2152 uint8_t imm = (opcode >> 6) & 0x1f;
2153 uint8_t opc = (opcode >> 11) & 0x3;
2154 char *mnemonic =
NULL;
2174 if ((imm == 0) && (opc != 0))
2185 snprintf(instruction->
text, 128,
2186 "0x%8.8" PRIx32
" 0x%4.4x \t%s\tr%i, r%i, #%#2.2x",
2187 address, opcode, mnemonic, rd, rm, imm);
2195 uint8_t imm = opcode & 0xff;
2196 uint8_t rd = (opcode >> 8) & 0x7;
2197 uint32_t opc = (opcode >> 11) & 0x3;
2198 char *mnemonic =
NULL;
2227 snprintf(instruction->
text, 128,
2228 "0x%8.8" PRIx32
" 0x%4.4x \t%s\tr%i, #%#2.2x",
2229 address, opcode, mnemonic, rd, imm);
2237 uint8_t high_reg,
op, rm, rd, h1, h2;
2238 char *mnemonic =
NULL;
2241 high_reg = (opcode & 0x0400) >> 10;
2242 op = (opcode & 0x03C0) >> 6;
2244 rd = (opcode & 0x0007);
2245 rm = (opcode & 0x0038) >> 3;
2246 h1 = (opcode & 0x0080) >> 7;
2247 h2 = (opcode & 0x0040) >> 6;
2276 if ((opcode & 0x7) == 0x0) {
2280 snprintf(instruction->
text, 128,
2282 " 0x%4.4x \tBLX\tr%i",
2286 snprintf(instruction->
text, 128,
2288 " 0x%4.4x \tBX\tr%i",
2293 snprintf(instruction->
text, 128,
2296 "UNDEFINED INSTRUCTION",
2390 snprintf(instruction->
text, 128,
2391 "0x%8.8" PRIx32
" 0x%4.4x \tNOP\t\t\t"
2393 address, opcode, mnemonic, rd, rm);
2395 snprintf(instruction->
text, 128,
2396 "0x%8.8" PRIx32
" 0x%4.4x \t%s\tr%i, r%i",
2397 address, opcode, mnemonic, rd, rm);
2405 return (
addr + 4) & ~3;
2412 uint8_t rd = (opcode >> 8) & 0x7;
2415 immediate = opcode & 0x000000ff;
2424 snprintf(instruction->
text, 128,
2425 "0x%8.8" PRIx32
" 0x%4.4x \t"
2426 "LDR\tr%i, [pc, #%#" PRIx32
"]\t; %#8.8" PRIx32,
2427 address, opcode, rd, immediate,
2436 uint8_t rd = (opcode >> 0) & 0x7;
2437 uint8_t rn = (opcode >> 3) & 0x7;
2438 uint8_t rm = (opcode >> 6) & 0x7;
2439 uint8_t opc = (opcode >> 9) & 0x7;
2440 char *mnemonic =
NULL;
2477 snprintf(instruction->
text, 128,
2478 "0x%8.8" PRIx32
" 0x%4.4x \t%s\tr%i, [r%i, r%i]",
2479 address, opcode, mnemonic, rd, rn, rm);
2493 uint32_t
offset = (opcode >> 6) & 0x1f;
2494 uint8_t rd = (opcode >> 0) & 0x7;
2495 uint8_t rn = (opcode >> 3) & 0x7;
2496 uint32_t l = opcode & (1 << 11);
2497 uint32_t b = opcode & (1 << 12);
2510 if ((opcode&0xF000) == 0x8000) {
2518 snprintf(instruction->
text, 128,
2519 "0x%8.8" PRIx32
" 0x%4.4x \t%s%c\tr%i, [r%i, #%#" PRIx32
"]",
2520 address, opcode, mnemonic, suffix, rd, rn,
offset << shift);
2534 uint32_t
offset = opcode & 0xff;
2535 uint8_t rd = (opcode >> 8) & 0x7;
2536 uint32_t l = opcode & (1 << 11);
2547 snprintf(instruction->
text, 128,
2548 "0x%8.8" PRIx32
" 0x%4.4x \t%s\tr%i, [SP, #%#" PRIx32
"]",
2563 uint32_t imm = opcode & 0xff;
2564 uint8_t rd = (opcode >> 8) & 0x7;
2566 uint32_t
sp = opcode & (1 << 11);
2567 const char *reg_name;
2579 snprintf(instruction->
text, 128,
2580 "0x%8.8" PRIx32
" 0x%4.4x \tADD\tr%i, %s, #%#" PRIx32,
2581 address, opcode, rd, reg_name, imm * 4);
2594 uint32_t imm = opcode & 0x7f;
2595 uint8_t opc = opcode & (1 << 7);
2607 snprintf(instruction->
text, 128,
2608 "0x%8.8" PRIx32
" 0x%4.4x \t%s\tSP, #%#" PRIx32,
2609 address, opcode, mnemonic, imm*4);
2622 uint32_t imm = opcode & 0xff;
2626 snprintf(instruction->
text, 128,
2627 "0x%8.8" PRIx32
" 0x%4.4x \tBKPT\t%#2.2" PRIx32,
2636 uint32_t reg_list = opcode & 0xff;
2637 uint32_t l = opcode & (1 << 11);
2638 uint32_t r = opcode & (1 << 8);
2639 uint8_t rn = (opcode >> 8) & 7;
2640 uint8_t addr_mode = 0 ;
2644 char ptr_name[7] =
"";
2651 if ((opcode & 0xf000) == 0xc000) {
2657 if (opcode & (1 << rn))
2663 snprintf(ptr_name,
sizeof(ptr_name),
"r%i%s, ", rn, wback);
2670 reg_list |= (1 << 15) ;
2676 reg_list |= (1 << 14) ;
2680 reg_names_p = reg_names;
2681 for (i = 0; i <= 15; i++) {
2682 if (reg_list & (1 << i))
2683 reg_names_p += snprintf(reg_names_p,
2684 (reg_names + 40 - reg_names_p),
2688 if (reg_names_p > reg_names)
2689 reg_names_p[-2] =
'\0';
2691 reg_names[0] =
'\0';
2693 snprintf(instruction->
text, 128,
2694 "0x%8.8" PRIx32
" 0x%4.4x \t%s\t%s{%s}",
2695 address, opcode, mnemonic, ptr_name, reg_names);
2707 uint32_t
offset = opcode & 0xff;
2708 uint8_t cond = (opcode >> 8) & 0xf;
2709 uint32_t target_address;
2713 snprintf(instruction->
text, 128,
2714 "0x%8.8" PRIx32
" 0x%4.4x \tSVC\t%#2.2" PRIx32,
2717 }
else if (cond == 0xe) {
2719 snprintf(instruction->
text, 128,
2720 "0x%8.8" PRIx32
" 0x%4.4x \tUNDEFINED INSTRUCTION",
2731 snprintf(instruction->
text, 128,
2732 "0x%8.8" PRIx32
" 0x%4.4x \tB%s\t%#8.8" PRIx32,
2749 offset = (opcode >> 3) & 0x1f;
2750 offset |= (opcode & 0x0200) >> 4;
2752 snprintf(instruction->
text, 128,
2753 "0x%8.8" PRIx32
" 0x%4.4x \tCB%sZ\tr%d, %#8.8" PRIx32,
2755 (opcode & 0x0800) ?
"N" :
"",
2765 snprintf(instruction->
text, 128,
2766 "0x%8.8" PRIx32
" 0x%4.4x \t%cXT%c\tr%d, r%d",
2768 (opcode & 0x0080) ?
'U' :
'S',
2769 (opcode & 0x0040) ?
'B' :
'H',
2770 opcode & 0x7, (opcode >> 3) & 0x7);
2779 if ((opcode & 0x0ff0) == 0x0650)
2780 snprintf(instruction->
text, 128,
2781 "0x%8.8" PRIx32
" 0x%4.4x \tSETEND %s",
2783 (opcode & 0x80) ?
"BE" :
"LE");
2785 snprintf(instruction->
text, 128,
2786 "0x%8.8" PRIx32
" 0x%4.4x \tCPSI%c\t%s%s%s",
2788 (opcode & 0x0010) ?
'D' :
'E',
2789 (opcode & 0x0004) ?
"A" :
"",
2790 (opcode & 0x0002) ?
"I" :
"",
2791 (opcode & 0x0001) ?
"F" :
"");
2802 switch ((opcode >> 6) & 3) {
2813 snprintf(instruction->
text, 128,
2814 "0x%8.8" PRIx32
" 0x%4.4x \tREV%s\tr%d, r%d",
2816 opcode & 0x7, (opcode >> 3) & 0x7);
2826 switch ((opcode >> 4) & 0x0f) {
2843 hint =
"HINT (UNRECOGNIZED)";
2847 snprintf(instruction->
text, 128,
2848 "0x%8.8" PRIx32
" 0x%4.4x \t%s",
2857 unsigned int cond = (opcode >> 4) & 0x0f;
2858 char *x =
"", *y =
"", *z =
"";
2861 z = (opcode & 0x02) ?
"T" :
"E";
2863 y = (opcode & 0x04) ?
"T" :
"E";
2865 x = (opcode & 0x08) ?
"T" :
"E";
2867 snprintf(instruction->
text, 128,
2868 "0x%8.8" PRIx32
" 0x%4.4x \tIT%s%s%s\t%s",
2883 instruction->
opcode = opcode;
2886 if ((opcode & 0xe000) == 0x0000) {
2888 if ((opcode & 0x1800) == 0x1800)
2896 if ((opcode & 0xe000) == 0x2000)
2900 if ((opcode & 0xf800) == 0x4000)
2904 if ((opcode & 0xf800) == 0x4800)
2908 if ((opcode & 0xf000) == 0x5000)
2912 if (((opcode & 0xe000) == 0x6000)
2913 || ((opcode & 0xf000) == 0x8000))
2917 if ((opcode & 0xf000) == 0x9000)
2921 if ((opcode & 0xf000) == 0xa000)
2925 if ((opcode & 0xf000) == 0xb000) {
2926 switch ((opcode >> 8) & 0x0f) {
2945 if ((opcode & 0x00c0) == 0x0080)
2951 if (opcode & 0x000f)
2960 snprintf(instruction->
text, 128,
2961 "0x%8.8" PRIx32
" 0x%4.4x \tUNDEFINED INSTRUCTION",
2967 if ((opcode & 0xf000) == 0xc000)
2971 if ((opcode & 0xf000) == 0xd000)
2974 if ((opcode & 0xe000) == 0xe000) {
2976 if ((opcode & 0xf801) == 0xe801) {
2978 snprintf(instruction->
text, 128,
2979 "0x%8.8" PRIx32
" 0x%8.8x\t"
2980 "UNDEFINED INSTRUCTION",
2987 LOG_ERROR(
"Thumb: should never reach this point (opcode=%04x)", opcode);
3012 LOG_ERROR(
"BUG: instruction type %i isn't a load/store instruction",
static int evaluate_load_store_reg_thumb(uint16_t opcode, uint32_t address, struct arm_instruction *instruction)
static int evaluate_load_store(uint32_t opcode, uint32_t address, struct arm_instruction *instruction)
static int evaluate_b_bl(uint32_t opcode, uint32_t address, struct arm_instruction *instruction)
static int evaluate_media(uint32_t opcode, uint32_t address, struct arm_instruction *instruction)
static int evaluate_cb_thumb(uint16_t opcode, uint32_t address, struct arm_instruction *instruction)
static int evaluate_load_store_imm_thumb(uint16_t opcode, uint32_t address, struct arm_instruction *instruction)
static int evaluate_cdp_mcr_mrc(uint32_t opcode, uint32_t address, struct arm_instruction *instruction)
static uint32_t ror(uint32_t value, int places)
static int evaluate_cond_branch_thumb(uint16_t opcode, uint32_t address, struct arm_instruction *instruction)
static int evaluate_mov_imm(uint32_t opcode, uint32_t address, struct arm_instruction *instruction)
int arm_evaluate_opcode(uint32_t opcode, uint32_t address, struct arm_instruction *instruction)
static int evaluate_srs(uint32_t opcode, uint32_t address, struct arm_instruction *instruction)
static int evaluate_p_add_sub(uint32_t opcode, uint32_t address, char *cp)
static int evaluate_pld(uint32_t opcode, uint32_t address, struct arm_instruction *instruction)
int thumb_evaluate_opcode(uint16_t opcode, uint32_t address, struct arm_instruction *instruction)
static int evaluate_load_literal_thumb(uint16_t opcode, uint32_t address, struct arm_instruction *instruction)
static int evaluate_breakpoint_thumb(uint16_t opcode, uint32_t address, struct arm_instruction *instruction)
static int evaluate_extend_thumb(uint16_t opcode, uint32_t address, struct arm_instruction *instruction)
static int evaluate_data_proc(uint32_t opcode, uint32_t address, struct arm_instruction *instruction)
static int evaluate_misc_load_store(uint32_t opcode, uint32_t address, struct arm_instruction *instruction)
static int evaluate_load_store_multiple_thumb(uint16_t opcode, uint32_t address, struct arm_instruction *instruction)
static uint32_t thumb_alignpc4(uint32_t addr)
static int evaluate_ldm_stm(uint32_t opcode, uint32_t address, struct arm_instruction *instruction)
static int evaluate_ldc_stc_mcrr_mrrc(uint32_t opcode, uint32_t address, struct arm_instruction *instruction)
static const char * arm_condition_strings[]
static int evaluate_shift_imm_thumb(uint16_t opcode, uint32_t address, struct arm_instruction *instruction)
int arm_access_size(struct arm_instruction *instruction)
static int evaluate_swi(uint32_t opcode, uint32_t address, struct arm_instruction *instruction)
static int evaluate_cps_thumb(uint16_t opcode, uint32_t address, struct arm_instruction *instruction)
static int evaluate_blx_imm(uint32_t opcode, uint32_t address, struct arm_instruction *instruction)
static int evaluate_load_store_stack_thumb(uint16_t opcode, uint32_t address, struct arm_instruction *instruction)
static int evaluate_mul_and_extra_ld_st(uint32_t opcode, uint32_t address, struct arm_instruction *instruction)
static int evaluate_ifthen_thumb(uint16_t opcode, uint32_t address, struct arm_instruction *instruction)
static int evaluate_data_proc_thumb(uint16_t opcode, uint32_t address, struct arm_instruction *instruction)
static int evaluate_misc_instr(uint32_t opcode, uint32_t address, struct arm_instruction *instruction)
static int evaluate_data_proc_imm_thumb(uint16_t opcode, uint32_t address, struct arm_instruction *instruction)
static int evaluate_mrs_msr(uint32_t opcode, uint32_t address, struct arm_instruction *instruction)
static int evaluate_byterev_thumb(uint16_t opcode, uint32_t address, struct arm_instruction *instruction)
static int evaluate_b_bl_blx_thumb(uint16_t opcode, uint32_t address, struct arm_instruction *instruction)
static int evaluate_add_sub_thumb(uint16_t opcode, uint32_t address, struct arm_instruction *instruction)
static int evaluate_unknown(uint32_t opcode, uint32_t address, struct arm_instruction *instruction)
static int evaluate_adjust_stack_thumb(uint16_t opcode, uint32_t address, struct arm_instruction *instruction)
static int evaluate_add_sp_pc_thumb(uint16_t opcode, uint32_t address, struct arm_instruction *instruction)
static int evaluate_hint_thumb(uint16_t opcode, uint32_t address, struct arm_instruction *instruction)
static int evaluate_extend(uint32_t opcode, uint32_t address, char *cp)
@ ARM_UNKNOWN_INSTRUCTION
@ ARM_UNDEFINED_INSTRUCTION
uint32_t address
Starting address. Sector aligned.
#define LOG_ERROR(expr ...)
target_addr_t addr
Start address to search for the control block.
union arm_shifter_operand shifter_operand
union arm_instruction::@73 info
struct arm_load_store_multiple_instr load_store_multiple
unsigned int instruction_size
enum arm_instruction_type type
struct arm_b_bl_bx_blx_instr b_bl_bx_blx
struct arm_load_store_instr load_store
struct arm_data_proc_instr data_proc
struct arm_shifter_operand::@70 register_shift
struct arm_shifter_operand::@69 immediate_shift