688 int condCodeIsPartOfName = 0;
690 const char *instrName;
691 int fieldAisReg = 1, fieldBisReg = 1, fieldCisReg = 1;
692 int fieldA = 0, fieldB = 0, fieldC = 0;
693 int flag = 0,
cond = 0, is_shimm = 0, is_limm = 0;
694 int signExtend = 0, addrWriteBack = 0, directMem = 0;
698 int usesSimdRegA = 0, usesSimdRegB = 0, usesSimdRegC = 0, simd_scale_u8 = -1;
700 char formatString[60];
705 state->_mem_load = 0;
706 state->_ea_present = 0;
707 state->_load_len = 0;
719 if (
state->instructionLen == 4) {
737 condCodeIsPartOfName = 0;
751 switch (
state->_opcode) {
756 condCodeIsPartOfName = 1;
770 condCodeIsPartOfName = 1;
774 case 0: instrName =
"breq";
break;
775 case 1: instrName =
"brne";
break;
776 case 2: instrName =
"brlt";
break;
777 case 3: instrName =
"brge";
break;
778 case 4: instrName =
"brlo";
break;
779 case 5: instrName =
"brhs";
break;
780 case 14: instrName =
"bbit0";
break;
781 case 15: instrName =
"bbit1";
break;
783 instrName =
"??? (0[3])";
789 instrName =
"??? (0[3])";
801 state->_load_len = 4;
805 state->_load_len = 1;
809 state->_load_len = 2;
812 instrName =
"??? (0[3])";
822 case 0: instrName =
"st";
break;
823 case 1: instrName =
"stb";
break;
824 case 2: instrName =
"stw";
break;
826 instrName =
"??? (2[3])";
835 subopcode =
BITS(
state->words[0], 16, 21);
837 case 0: instrName =
"add";
break;
838 case 1: instrName =
"adc";
break;
839 case 2: instrName =
"sub";
break;
840 case 3: instrName =
"sbc";
break;
841 case 4: instrName =
"and";
break;
842 case 5: instrName =
"or";
break;
843 case 6: instrName =
"bic";
break;
844 case 7: instrName =
"xor";
break;
845 case 8: instrName =
"max";
break;
846 case 9: instrName =
"min";
break;
848 if (
state->words[0] == 0x264a7000) {
869 case 14: instrName =
"rsub";
break;
870 case 15: instrName =
"bset";
break;
871 case 16: instrName =
"bclr";
break;
876 case 18: instrName =
"bxor";
break;
877 case 19: instrName =
"bmsk";
break;
878 case 20: instrName =
"add1";
break;
879 case 21: instrName =
"add2";
break;
880 case 22: instrName =
"add3";
break;
881 case 23: instrName =
"sub1";
break;
882 case 24: instrName =
"sub2";
break;
883 case 25: instrName =
"sub3";
break;
884 case 30: instrName =
"mpyw";
break;
885 case 31: instrName =
"mpyuw";
break;
896 condCodeIsPartOfName = 1;
902 condCodeIsPartOfName = 1;
921 case 0: instrName =
"asl";
break;
922 case 1: instrName =
"asr";
break;
923 case 2: instrName =
"lsr";
break;
924 case 3: instrName =
"ror";
break;
925 case 4: instrName =
"rrc";
break;
926 case 5: instrName =
"sexb";
break;
927 case 6: instrName =
"sexw";
break;
928 case 7: instrName =
"extb";
break;
929 case 8: instrName =
"extw";
break;
930 case 9: instrName =
"abs";
break;
931 case 10: instrName =
"not";
break;
932 case 11: instrName =
"rlc";
break;
966 if (
BITS(
state->words[0], 22, 23) == 1) {
971 case 4: instrName =
"rtie";
break;
972 case 5: instrName =
"brk";
break;
985 subopcode =
BITS(
state->words[0], 17, 21);
990 state->_load_len = 4;
994 state->_load_len = 1;
998 state->_load_len = 2;
1001 instrName =
"??? (0[3])";
1011 subopcode =
BITS(
state->words[0], 16, 21);
1012 switch (subopcode) {
1013 case 0: instrName =
"asl";
break;
1014 case 1: instrName =
"lsr";
break;
1015 case 2: instrName =
"asr";
break;
1016 case 3: instrName =
"ror";
break;
1018 instrName =
"mul64";
1023 instrName =
"mulu64";
1029 case 6: instrName =
"adds";
break;
1031 case 7: instrName =
"subs";
break;
1032 case 8: instrName =
"divaw";
break;
1033 case 0xA: instrName =
"asls";
break;
1034 case 0xB: instrName =
"asrs";
break;
1035 case 0x28: instrName =
"addsdw";
break;
1036 case 0x29: instrName =
"subsdw";
break;
1050 instrName =
"sat16";
1054 instrName =
"rnd16";
1058 instrName =
"abssw";
1066 instrName =
"negsw";
1075 instrName =
"normw";
1081 instrName =
"swape";
1093 instrName =
"??? (2[3])";
1102 subopcode =
BITS(
state->words[0], 0, 5);
1103 switch (subopcode) {
1104 case 26: instrName =
"rtsc";
break;
1106 instrName =
"??? (2[3])";
1118 subopcode =
BITS(
state->words[0], 17, 23);
1120 switch (subopcode) {
1123 instrName =
"vld32";
1132 instrName =
"vld64";
1141 instrName =
"vld64w";
1150 instrName =
"vld32wl";
1159 instrName =
"vld32wh";
1168 instrName =
"vld128";
1177 short sub_subopcode =
BITS(
state->words[0], 15, 16);
1178 switch (sub_subopcode) {
1180 instrName =
"vld128r";
1183 usesSimdRegB = usesSimdRegC = 0;
1191 instrName =
"vst16_0";
1200 instrName =
"vst16_1";
1209 instrName =
"vst16_2";
1218 instrName =
"vst16_3";
1227 instrName =
"vst16_4";
1236 instrName =
"vst16_5";
1245 instrName =
"vst16_6";
1254 instrName =
"vst16_7";
1263 instrName =
"vst32_0";
1272 instrName =
"vst32_2";
1281 instrName =
"vst32_4";
1290 instrName =
"vst32_6";
1299 instrName =
"vst64";
1308 instrName =
"vst128";
1317 short sub_subopcode =
BITS(
state->words[0], 15, 16);
1318 switch (sub_subopcode) {
1320 instrName =
"vst128r";
1323 usesSimdRegB = usesSimdRegC = 0;
1334 usesSimdRegA = usesSimdRegB = 1;
1340 instrName =
"vmvzw";
1342 usesSimdRegA = usesSimdRegB = 1;
1347 instrName =
"vmovw";
1350 usesSimdRegB = usesSimdRegC = 0;
1354 instrName =
"vmovzw";
1357 usesSimdRegB = usesSimdRegC = 0;
1361 instrName =
"vmvaw";
1363 usesSimdRegA = usesSimdRegB = 1;
1368 instrName =
"vmovaw";
1371 usesSimdRegB = usesSimdRegC = 0;
1375 short sub_subopcode =
BITS(
state->words[0], 15, 16);
1376 switch (sub_subopcode) {
1378 instrName =
"vaddw";
1380 usesSimdRegA = usesSimdRegB = usesSimdRegC = 1;
1384 instrName =
"vaddaw";
1386 usesSimdRegA = usesSimdRegB = usesSimdRegC = 1;
1390 instrName =
"vbaddw";
1392 usesSimdRegA = usesSimdRegB = 1;
1400 short sub_subopcode =
BITS(
state->words[0], 15, 16);
1401 switch (sub_subopcode) {
1403 instrName =
"vsubw";
1405 usesSimdRegA = usesSimdRegB = usesSimdRegC = 1;
1409 instrName =
"vsubaw";
1411 usesSimdRegA = usesSimdRegB = usesSimdRegC = 1;
1415 instrName =
"vbsubw";
1417 usesSimdRegA = usesSimdRegB = 1;
1424 short sub_subopcode =
BITS(
state->words[0], 15, 16);
1425 switch (sub_subopcode) {
1427 instrName =
"vmulw";
1429 usesSimdRegA = usesSimdRegB = usesSimdRegC = 1;
1433 instrName =
"vmulaw";
1435 usesSimdRegA = usesSimdRegB = usesSimdRegC = 1;
1439 instrName =
"vbmulw";
1441 usesSimdRegA = usesSimdRegB = 1;
1446 instrName =
"vbmulaw";
1448 usesSimdRegA = usesSimdRegB = 1;
1455 short sub_subopcode =
BITS(
state->words[0], 15, 16);
1456 switch (sub_subopcode) {
1458 instrName =
"vmulfw";
1460 usesSimdRegA = usesSimdRegB = usesSimdRegC = 1;
1464 instrName =
"vmulfaw";
1466 usesSimdRegA = usesSimdRegB = usesSimdRegC = 1;
1470 instrName =
"vbmulfw";
1472 usesSimdRegA = usesSimdRegB = 1;
1479 short sub_subopcode =
BITS(
state->words[0], 15, 16);
1480 switch (sub_subopcode) {
1482 instrName =
"vsummw";
1484 usesSimdRegA = usesSimdRegB = usesSimdRegC = 1;
1487 instrName =
"vbrsubw";
1489 usesSimdRegA = usesSimdRegB = 1;
1496 short sub_subopcode =
BITS(
state->words[0], 15, 16);
1497 switch (sub_subopcode) {
1499 instrName =
"vmr7w";
1501 usesSimdRegA = usesSimdRegB = usesSimdRegC = 1;
1505 instrName =
"vmr7aw";
1507 usesSimdRegA = usesSimdRegB = usesSimdRegC = 1;
1513 instrName =
"vaddsuw";
1515 usesSimdRegC = usesSimdRegB = 1;
1520 instrName =
"vabsw";
1522 usesSimdRegC = usesSimdRegB = 1;
1527 instrName =
"vsignw";
1529 usesSimdRegC = usesSimdRegB = 1;
1534 instrName =
"vupbw";
1536 usesSimdRegC = usesSimdRegB = 1;
1541 instrName =
"vexch1";
1543 usesSimdRegC = usesSimdRegB = 1;
1548 instrName =
"vexch2";
1550 usesSimdRegC = usesSimdRegB = 1;
1555 instrName =
"vexch4";
1557 usesSimdRegC = usesSimdRegB = 1;
1562 instrName =
"vupsbw";
1564 usesSimdRegC = usesSimdRegB = 1;
1569 instrName =
"vdirun";
1571 usesSimdRegC = usesSimdRegB = usesSimdRegA = 0;
1575 instrName =
"vdorun";
1577 usesSimdRegC = usesSimdRegB = usesSimdRegA = 0;
1581 instrName =
"vdiwr";
1584 usesSimdRegA = usesSimdRegC = 0;
1588 instrName =
"vdowr";
1591 usesSimdRegA = usesSimdRegC = 0;
1595 instrName =
"vdird";
1603 instrName =
"vdord";
1611 switch (
BITS(
state->words[0], 24, 25)) {
1616 usesSimdRegB = usesSimdRegA = 0;
1620 instrName =
"vrecrun";
1623 usesSimdRegA = usesSimdRegB = 0;
1630 usesSimdRegB = usesSimdRegA = 0;
1634 instrName =
"vendrec";
1637 usesSimdRegB = usesSimdRegA = 0;
1647 instrName =
"vabsaw";
1649 usesSimdRegC = usesSimdRegB = 1;
1653 instrName =
"vupbaw";
1655 usesSimdRegC = usesSimdRegB = 1;
1659 instrName =
"vupsbaw";
1661 usesSimdRegC = usesSimdRegB = 1;
1670 instrName =
"vasrw";
1672 usesSimdRegA = usesSimdRegB = 1;
1677 short sub_subopcode =
BITS(
state->words[0], 15, 16);
1678 switch (sub_subopcode) {
1680 instrName =
"vasrwi";
1682 usesSimdRegA = usesSimdRegB = 1;
1686 instrName =
"vasrrwi";
1688 usesSimdRegA = usesSimdRegB = 1;
1695 instrName =
"vasrsrwi";
1697 usesSimdRegA = usesSimdRegB = 1;
1702 short sub_subopcode =
BITS(
state->words[0], 15, 16);
1703 switch (sub_subopcode) {
1705 instrName =
"vmaxw";
1709 instrName =
"vmaxaw";
1713 instrName =
"vbmaxw";
1718 usesSimdRegA = usesSimdRegB = 1;
1723 short sub_subopcode =
BITS(
state->words[0], 15, 16);
1724 switch (sub_subopcode) {
1726 instrName =
"vminw";
1730 instrName =
"vminaw";
1734 instrName =
"vbminw";
1739 usesSimdRegA = usesSimdRegB = 1;
1744 short sub_subopcode =
BITS(
state->words[0], 15, 16);
1745 switch (sub_subopcode) {
1747 instrName =
"vdifw";
1750 instrName =
"vdifaw";
1757 usesSimdRegA = usesSimdRegB = usesSimdRegC = 1;
1762 short sub_subopcode =
BITS(
state->words[0], 15, 16);
1763 switch (sub_subopcode) {
1767 usesSimdRegA = usesSimdRegB = usesSimdRegC = 1;
1770 instrName =
"vandaw";
1772 usesSimdRegA = usesSimdRegB = usesSimdRegC = 1;
1779 short sub_subopcode =
BITS(
state->words[0], 15, 16);
1780 switch (sub_subopcode) {
1784 usesSimdRegA = usesSimdRegB = usesSimdRegC = 1;
1791 short sub_subopcode =
BITS(
state->words[0], 15, 16);
1792 switch (sub_subopcode) {
1797 instrName =
"vxoraw";
1801 usesSimdRegA = usesSimdRegB = usesSimdRegC = 1;
1806 short sub_subopcode =
BITS(
state->words[0], 15, 16);
1807 switch (sub_subopcode) {
1812 instrName =
"vbicaw";
1816 usesSimdRegA = usesSimdRegB = usesSimdRegC = 1;
1821 short sub_subopcode =
BITS(
state->words[0], 15, 16);
1822 switch (sub_subopcode) {
1827 instrName =
"vavrb";
1831 usesSimdRegA = usesSimdRegB = usesSimdRegC = 1;
1838 usesSimdRegA = usesSimdRegB = usesSimdRegC = 1;
1844 usesSimdRegA = usesSimdRegB = usesSimdRegC = 1;
1850 usesSimdRegA = usesSimdRegB = usesSimdRegC = 1;
1856 usesSimdRegA = usesSimdRegB = usesSimdRegC = 1;
1860 short sub_subopcode =
BITS(
state->words[0], 15, 16);
1861 switch (sub_subopcode) {
1863 instrName =
"vasrpwbi";
1865 usesSimdRegA = usesSimdRegB = 1;
1869 instrName =
"vasrrpwbi";
1871 usesSimdRegA = usesSimdRegB = 1;
1879 short sub_subopcode =
BITS(
state->words[0], 15, 16);
1880 switch (sub_subopcode) {
1884 usesSimdRegA = usesSimdRegB = 1;
1889 instrName =
"vsr8aw";
1891 usesSimdRegA = usesSimdRegB = 1;
1899 short sub_subopcode =
BITS(
state->words[0], 15, 16);
1900 switch (sub_subopcode) {
1902 instrName =
"vsr8i";
1904 usesSimdRegA = usesSimdRegB = 1;
1909 instrName =
"vsr8awi";
1911 usesSimdRegA = usesSimdRegB = 1;
1921 short subopcode2 =
BITS(
state->words[0], 15, 18);
1922 switch (subopcode2) {
1924 instrName =
"vmr1w";
1928 instrName =
"vmr2w";
1932 instrName =
"vmr3w";
1936 instrName =
"vmr4w";
1940 instrName =
"vmr5w";
1944 instrName =
"vmr6w";
1948 instrName =
"vmr1aw";
1952 instrName =
"vmr2aw";
1956 instrName =
"vmr3aw";
1960 instrName =
"vmr4aw";
1964 instrName =
"vmr5aw";
1968 instrName =
"vmr6aw";
1973 usesSimdRegA = usesSimdRegB = usesSimdRegC = 1;
1979 switch (
BITS(
state->words[0], 16, 19)) {
1981 instrName =
"vh264ft";
1984 instrName =
"vh264f";
1987 instrName =
"vvc1ft";
1990 instrName =
"vvc1f";
1994 usesSimdRegA = usesSimdRegB = usesSimdRegC = 1;
1999 instrName =
"vd6tapf";
2001 usesSimdRegA = usesSimdRegB = 1;
2006 instrName =
"vinti";
2008 usesSimdRegA = usesSimdRegB = usesSimdRegC = 0;
2017 instrName =
"???_SIMD";
2026 case 0: instrName =
"ld_s";
break;
2027 case 1: instrName =
"ldb_s";
break;
2028 case 2: instrName =
"ldw_s";
break;
2029 case 3: instrName =
"add_s";
break;
2031 instrName =
"??? (2[3])";
2041 case 0: instrName =
"add_s";
break;
2042 case 1: instrName =
"sub_s";
break;
2043 case 2: instrName =
"asl_s";
break;
2044 case 3: instrName =
"asr_s";
break;
2046 instrName =
"??? (2[3])";
2056 case 0: instrName =
"add_s";
break;
2059 instrName =
"mov_s";
2063 instrName =
"cmp_s";
2067 instrName =
"??? (2[3])";
2087 state->isBranch = 1;
2092 instrName =
"j_s.d";
2097 instrName =
"jl_s.d";
2099 state->isBranch = 1;
2103 instrName =
"sub_s.ne";
2110 instrName =
"nop_s";
2114 case 1: instrName =
"unimp_s";
break;
2117 instrName =
"jeq_s [blink]";
2121 instrName =
"jne_s [blink]";
2126 instrName =
"j_s [blink]";
2128 state->isBranch = 1;
2133 instrName =
"j_s.d [blink]";
2135 state->isBranch = 1;
2139 instrName =
"??? (2[3])";
2145 instrName =
"??? (2[3])";
2150 case 2: instrName =
"sub_s";
break;
2151 case 4: instrName =
"and_s";
break;
2152 case 5: instrName =
"or_s";
break;
2153 case 6: instrName =
"bic_s";
break;
2154 case 7: instrName =
"xor_s";
break;
2156 instrName =
"tst_s";
2160 instrName =
"mul64_s";
2165 instrName =
"sexb_s";
2169 instrName =
"sexw_s";
2173 instrName =
"extb_s";
2177 instrName =
"extw_s";
2181 instrName =
"abs_s";
2185 instrName =
"not_s";
2189 instrName =
"neg_s";
2192 case 20: instrName =
"add1_s";
break;
2193 case 21: instrName =
"add2_s";
break;
2194 case 22: instrName =
"add3_s";
break;
2195 case 24: instrName =
"asl_s";
break;
2196 case 25: instrName =
"lsr_s";
break;
2197 case 26: instrName =
"asr_s";
break;
2199 instrName =
"asl_s";
2203 instrName =
"asr_s";
2207 instrName =
"lsr_s";
2211 instrName =
"trap_s";
2215 instrName =
"brk_s";
2220 instrName =
"??? (2[3])";
2234 instrName =
"ldb_s";
2240 instrName =
"ldw_s";
2246 instrName =
"ldw_s.x";
2258 instrName =
"stb_s";
2264 instrName =
"stw_s";
2272 case 0: instrName =
"asl_s";
break;
2273 case 1: instrName =
"lsr_s";
break;
2274 case 2: instrName =
"asr_s";
break;
2275 case 3: instrName =
"sub_s";
break;
2276 case 4: instrName =
"bset_s";
break;
2277 case 5: instrName =
"bclr_s";
break;
2278 case 6: instrName =
"bmsk_s";
break;
2280 instrName =
"btst_s";
2290 case 0: instrName =
"ld_s";
break;
2291 case 1: instrName =
"ldb_s";
break;
2292 case 2: instrName =
"st_s";
break;
2293 case 3: instrName =
"stb_s";
break;
2294 case 4: instrName =
"add_s";
break;
2297 instrName =
"add_s";
2299 instrName =
"sub_s";
2303 instrName =
"pop_s";
2307 instrName =
"push_s";
2311 instrName =
"??? (2[3])";
2321 case 0: instrName =
"ld_s";
break;
2322 case 1: instrName =
"ldb_s";
break;
2323 case 2: instrName =
"ldw_s";
break;
2324 case 3: instrName =
"add_s";
break;
2336 instrName =
"mov_s";
2344 instrName =
"cmp_s";
2346 instrName =
"add_s";
2354 instrName =
"brne_s";
2356 instrName =
"breq_s";
2358 state->isBranch = 1;
2364 state->isBranch = 1;
2366 case 0: instrName =
"b_s";
break;
2367 case 1: instrName =
"beq_s";
break;
2368 case 2: instrName =
"bne_s";
break;
2371 case 0: instrName =
"bgt_s";
break;
2372 case 1: instrName =
"bge_s";
break;
2373 case 2: instrName =
"blt_s";
break;
2374 case 3: instrName =
"ble_s";
break;
2375 case 4: instrName =
"bhi_s";
break;
2376 case 5: instrName =
"bhs_s";
break;
2377 case 6: instrName =
"blo_s";
break;
2378 case 7: instrName =
"bls_s";
break;
2388 state->isBranch = 1;
2407 if (
state->instructionLen == 2) {
2451 fieldAisReg = fieldBisReg = fieldCisReg = 1;
2452 flag =
cond = is_shimm = is_limm = 0;
2454 signExtend = addrWriteBack = directMem = 0;
2458 switch (decodingClass) {
2463 subopcode =
BITS(
state->words[0], 22, 23);
2464 switch (subopcode) {
2497 state->_offset += fieldB,
state->_ea_present = 0;
2514 state->_offset += fieldB,
state->_ea_present = 0;
2516 fieldAisReg = fieldA = 0;
2534 fieldAisReg = fieldA = 0;
2538 }
else if (fieldC == 62) {
2572 if (
BITS(
state->words[0], 22, 23) == 1) {
2576 state->ea_reg1 = fieldC;
2580 state->_offset += fieldB,
state->_ea_present = 0;
2595 subopcode =
BITS(
state->words[0], 22, 23);
2596 if (subopcode == 0 || ((subopcode == 3) && (!
BIT(
state->words[0], 5)))) {
2606 }
else if (subopcode == 1 || ((subopcode == 3) && (
BIT(
state->words[0], 5)))) {
2610 }
else if (subopcode == 2) {
2619 state->ea_reg1 = fieldC;
2623 state->_offset += fieldB,
state->_ea_present = 0;
2646 subopcode =
BITS(
state->words[0], 22, 23);
2648 if (subopcode == 0 || ((subopcode == 3) && (!
BIT(
state->words[0], 5)))) {
2650 }
else if (subopcode == 1 || ((subopcode == 3) && (
BIT(
state->words[0], 5)))) {
2653 }
else if (subopcode == 2) {
2672 subopcode =
BITS(
state->words[0], 22, 23);
2673 if (subopcode == 0 || ((subopcode == 3) && (!
BIT(
state->words[0], 5)))) {
2676 if (fieldC == 29 || fieldC == 31)
2678 }
else if (subopcode == 1 || ((subopcode == 3) && (
BIT(
state->words[0], 5)))) {
2681 }
else if (subopcode == 2) {
2702 state->register_for_indirect_jump = fieldC;
2706 strcat(formatString,
2724 instrName =
"prefetch";
2736 state->_ea_present = 1;
2738 state->ea_reg1 = fieldB;
2740 state->_offset += fieldB;
2743 state->ea_reg2 = fieldC;
2745 state->_offset += fieldC;
2747 state->_mem_load = 1;
2749 directMem =
BIT(
state->words[0], 15);
2757 if (fieldBisReg && (fieldB != 62))
2759 addrWriteBack =
BITS(
state->words[0], 22, 23);
2760 signExtend =
BIT(
state->words[0], 16);
2768 strcat(formatString,
"%*");
2772 if (fieldBisReg || fieldB != 0) {
2790 instrName =
"prefetch";
2796 state->_ea_present = 1;
2797 state->_offset = fieldC;
2798 state->_mem_load = 1;
2800 state->ea_reg1 = fieldB;
2804 state->_offset += fieldB,
state->_ea_present = 0;
2807 directMem =
BIT(
state->words[0], 11);
2810 if (fieldBisReg && (fieldB != 62)) {
2811 addrWriteBack =
BITS(
state->words[0], 9, 10);
2813 signExtend =
BIT(
state->words[0], 6);
2819 strcat(formatString,
"%*");
2823 fieldB =
state->_offset;
2836 state->source_operand.registerNum = fieldC;
2841 state->_ea_present = 1;
2842 state->_offset = fieldA;
2844 state->ea_reg1 = fieldB;
2851 state->_offset += fieldB,
state->_ea_present = 0;
2854 directMem =
BIT(
state->words[0], 5);
2855 addrWriteBack =
BITS(
state->words[0], 3, 4);
2872 switch (
BITS(
state->words[0], 22, 23)) {
2906 if (is_limm ||
BIT(
state->words[0], 4)) {
2914 fieldA += (
addr & ~0x3);
2923 strcat(formatString,
",%s");
2931 switch (
BITS(
state->words[0], 22, 23)) {
2957 if (
BITS(
state->words[0], 22, 23) == 3) {
2964 fieldC = fieldC << 1;
2965 fieldC += (
addr & ~0x3);
2973 strcat(formatString,
"%s");
2980 subopcode =
BITS(
state->words[0], 22, 23);
2981 if (subopcode == 0 || ((subopcode == 3) && (!
BIT(
state->words[0], 5)))) {
2983 }
else if (subopcode == 1 || ((subopcode == 3) && (
BIT(
state->words[0], 5)))) {
2986 }
else if (subopcode == 2) {
2990 if (subopcode == 3) {
3010 fieldA = (
BITS(
state->words[0], 0, 4)) << 10;
3017 fieldA = fieldA << 9;
3018 fieldA |=
BITS(
state->words[0], 18, 26);
3019 fieldA = fieldA << 2;
3021 fieldA = fieldA << 10;
3022 fieldA |=
BITS(
state->words[0], 17, 26);
3023 fieldA = fieldA << 1;
3035 fieldA += (
addr & ~0x3);
3056 strcat(formatString,
"%s");
3069 fieldA = fieldAisReg = 0;
3145 }
else if (
BITS(
state->words[0], 3, 4) == 3) {
3210 fieldC = fieldC << 2;
3213 fieldC = fieldC << 1;
3220 if (
BITS(
state->words[0], 9, 10) != 3) {
3296 fieldA = (
BITS(
state->words[0], 0, 10)) << 2;
3298 }
else if (
BITS(
state->words[0], 9, 10) != 3) {
3299 fieldA = (
BITS(
state->words[0], 0, 8)) << 1;
3302 fieldA = (
BITS(
state->words[0], 0, 5)) << 1;
3305 fieldA += (
addr & ~0x3);
3316 strcat(formatString,
"%s");
3325 fieldC = (
BITS(
state->words[0], 0, 6)) << 1;
3328 fieldC += (
addr & ~0x3);
3329 fieldA = fieldAisReg = 0;
3338 strcat(formatString,
",%s");
3348 state->operandBuffer[0] =
'\0';
3357 strcat(formatString,
"[%r]");
3367 switch (
state->_opcode) {
3400 fieldA = (
BITS(
state->words[0], 0, 7)) << 2;
3434 }
else if (
BITS(
state->words[0], 0, 4) == 17) {
3459 state->operandBuffer[0] =
'\0';
3474 strcat(formatString,
"%d");
3491 directMem =
BIT(
state->words[0], 15);
3493 if (
BITS(
state->words[0], 22, 23) == 1) {
3497 state->ea_reg1 = fieldC;
3515 strcat(formatString,
"%r,%r,%r");
3535 fieldB = fieldBisReg = 0;
3563 if (decodingClass == 41) {
3568 if (simd_scale_u8 > 0) {
3569 fieldC = fieldC << simd_scale_u8;
3634 if (
BITS(
state->words[0], 17, 23) == 55) {
3645 mwerror(
state,
"Bad decoding class in ARC disassembler");
static int sign_extend(int value, int bits)
#define WRITE_FORMAT_COMMA_x(x)
#define write_instr_name()
#define CHECK_FLAG_COND()
#define WRITE_FORMAT_LB()
#define WRITE_FORMAT_x(x)
#define CHECK_COND_NULLIFY()
#define WRITE_FORMAT_COMMA_x_RB(x)
#define WRITE_FORMAT_RB()
static void mwerror(struct arcDisState *state, const char *msg)
#define WRITE_FORMAT_x_COMMA_LB(x)
static void my_sprintf(struct arcDisState *state, char *buf, const char *format,...)
#define WRITE_NOP_COMMENT()
static const char * post_address(struct arcDisState *state, int addr)
static const char * instruction_name(struct arcDisState *state, int op1, int op2, int *flags)
#define WRITE_FORMAT_x_COMMA(x)
static bfd_vma bfd_getm32(unsigned int)
#define CHECK_FIELD_H_AC()
#define WRITE_FORMAT_x_RB(x)
static RzILOpEffect * mul(cs_insn *insn, bool is_thumb)