trunk/src/emu/cpu/arcompact/arcompactdasm_ops.c
| r242438 | r242439 | |
| 839 | 839 | } |
| 840 | 840 | else if (p == 1) |
| 841 | 841 | { |
| 842 | | output += sprintf( output, "<04_2f illegal p=01>"); |
| 842 | int U = (op & 0x00000fc0) >> 6; op &= ~0x00000fc0; |
| 843 | |
| 844 | output += sprintf( output, "U(0x%02x) ", U); |
| 843 | 845 | } |
| 844 | 846 | else if (p == 2) |
| 845 | 847 | { |
| r242438 | r242439 | |
| 949 | 951 | int arcompact_handle05_29_dasm(DASM_OPS_32) { return arcompact_handle04_helper_dasm(DASM_PARAMS, "SUBSDW", 0,0); } |
| 950 | 952 | |
| 951 | 953 | |
| 952 | | //int arcompact_handle05_2f_dasm(DASM_OPS_32) { print("SOP (another table) (%08x)", op); return 4;} |
| 953 | 954 | |
| 954 | | int arcompact_handle05_2f_00_dasm(DASM_OPS_32) { print("SWAP (%08x)", op); return 4;} |
| 955 | | int arcompact_handle05_2f_01_dasm(DASM_OPS_32) { print("NORM (%08x)", op); return 4;} |
| 956 | | int arcompact_handle05_2f_02_dasm(DASM_OPS_32) { print("SAT16 (%08x)", op); return 4;} |
| 957 | | int arcompact_handle05_2f_03_dasm(DASM_OPS_32) { print("RND16 (%08x)", op); return 4;} |
| 958 | | int arcompact_handle05_2f_04_dasm(DASM_OPS_32) { print("ABSSW (%08x)", op); return 4;} |
| 959 | | int arcompact_handle05_2f_05_dasm(DASM_OPS_32) { print("ABSS (%08x)", op); return 4;} |
| 960 | | int arcompact_handle05_2f_06_dasm(DASM_OPS_32) { print("NEGSW (%08x)", op); return 4;} |
| 961 | | int arcompact_handle05_2f_07_dasm(DASM_OPS_32) { print("NEGS (%08x)", op); return 4;} |
| 962 | | int arcompact_handle05_2f_08_dasm(DASM_OPS_32) { print("NORMW (%08x)", op); return 4;} |
| 963 | | //int arcompact_handle05_2f_3f_dasm(DASM_OPS_32) { print("ZOPs (another table) (%08x)", op); return 4;} |
| 955 | int arcompact_handle05_2f_0x_helper_dasm(DASM_OPS_32, const char* optext) |
| 956 | { |
| 957 | // |
| 958 | // 0010 1bbb pp10 1111 FBBB CCCC CCII IIII when pp == 0x00 |
| 959 | // or |
| 960 | // 0010 1bbb pp10 1111 FBBB UUUU UUII IIII when pp == 0x01 |
| 961 | // otherwise invalid |
| 964 | 962 | |
| 963 | int size = 4; |
| 965 | 964 | |
| 965 | int p = (op & 0x00c00000) >> 22; op &= ~0x00c00000; |
| 966 | int b = (op & 0x07000000) >> 24; op &= ~0x07000000; |
| 967 | int B = (op & 0x00007000) >> 12; op &= ~0x00007000; |
| 968 | int breg = b | (B << 3); |
| 969 | int F = (op & 0x00008000) >> 15;op &= ~0x00008000; |
| 966 | 970 | |
| 971 | output += sprintf( output, "%s", optext); |
| 972 | output += sprintf( output, "%s", flagbit[F]); |
| 973 | // output += sprintf( output, " p(%d)", p); |
| 974 | |
| 975 | |
| 976 | output += sprintf(output, " %s, ", regnames[breg]); |
| 977 | |
| 978 | if (p == 0) |
| 979 | { |
| 980 | int C = (op & 0x00000fc0) >> 6; op &= ~0x00000fc0; |
| 981 | |
| 982 | if (C == LIMM_REG) |
| 983 | { |
| 984 | UINT32 limm; |
| 985 | GET_LIMM_32; |
| 986 | size = 8; |
| 987 | output += sprintf( output, "(%08x) ", limm ); |
| 988 | |
| 989 | } |
| 990 | else |
| 991 | { |
| 992 | output += sprintf( output, "C(%s) ", regnames[C]); |
| 993 | } |
| 994 | } |
| 995 | else if (p == 1) |
| 996 | { |
| 997 | int U = (op & 0x00000fc0) >> 6; op &= ~0x00000fc0; |
| 998 | |
| 999 | output += sprintf( output, "U(0x%02x) ", U); |
| 1000 | } |
| 1001 | else if (p == 2) |
| 1002 | { |
| 1003 | output += sprintf( output, "<05_2f illegal p=10>"); |
| 1004 | } |
| 1005 | else if (p == 3) |
| 1006 | { |
| 1007 | output += sprintf( output, "<05_2f illegal p=11>"); |
| 1008 | } |
| 1009 | |
| 1010 | return size; |
| 1011 | } |
| 1012 | |
| 1013 | |
| 1014 | int arcompact_handle05_2f_00_dasm(DASM_OPS_32) { return arcompact_handle05_2f_0x_helper_dasm(DASM_PARAMS, "SWAP"); } |
| 1015 | int arcompact_handle05_2f_01_dasm(DASM_OPS_32) { return arcompact_handle05_2f_0x_helper_dasm(DASM_PARAMS, "NORM"); } |
| 1016 | int arcompact_handle05_2f_02_dasm(DASM_OPS_32) { return arcompact_handle05_2f_0x_helper_dasm(DASM_PARAMS, "SAT16"); } |
| 1017 | int arcompact_handle05_2f_03_dasm(DASM_OPS_32) { return arcompact_handle05_2f_0x_helper_dasm(DASM_PARAMS, "RND16"); } |
| 1018 | int arcompact_handle05_2f_04_dasm(DASM_OPS_32) { return arcompact_handle05_2f_0x_helper_dasm(DASM_PARAMS, "ABSSW"); } |
| 1019 | int arcompact_handle05_2f_05_dasm(DASM_OPS_32) { return arcompact_handle05_2f_0x_helper_dasm(DASM_PARAMS, "ABSS"); } |
| 1020 | int arcompact_handle05_2f_06_dasm(DASM_OPS_32) { return arcompact_handle05_2f_0x_helper_dasm(DASM_PARAMS, "NEGSW"); } |
| 1021 | int arcompact_handle05_2f_07_dasm(DASM_OPS_32) { return arcompact_handle05_2f_0x_helper_dasm(DASM_PARAMS, "NEGS"); } |
| 1022 | int arcompact_handle05_2f_08_dasm(DASM_OPS_32) { return arcompact_handle05_2f_0x_helper_dasm(DASM_PARAMS, "NORMW"); } |
| 1023 | |
| 1024 | |
| 967 | 1025 | int arcompact_handle06_dasm(DASM_OPS_32) |
| 968 | 1026 | { |
| 969 | 1027 | print("op a,b,c (06 ARC ext) (%08x)", op ); |