trunk/src/emu/cpu/arcompact/arcompactdasm.c
| r242341 | r242342 | |
| 7 | 7 | #include "emu.h" |
| 8 | 8 | #include <stdarg.h> |
| 9 | 9 | |
| 10 | | #include "arcompactdasm_dispatch.h" |
| 11 | | #include "arcompactdasm_ops.h" |
| 10 | static char *output; |
| 12 | 11 | |
| 12 | static void ATTR_PRINTF(1,2) print(const char *fmt, ...) |
| 13 | { |
| 14 | va_list vl; |
| 13 | 15 | |
| 16 | va_start(vl, fmt); |
| 17 | vsprintf(output, fmt, vl); |
| 18 | va_end(vl); |
| 19 | } |
| 20 | |
| 14 | 21 | /*****************************************************************************/ |
| 15 | 22 | |
| 16 | 23 | |
| 17 | 24 | |
| 18 | 25 | /*****************************************************************************/ |
| 19 | 26 | |
| 27 | #define DASM_OPS_16 char *output, offs_t pc, UINT16 op, const UINT8* oprom |
| 28 | #define DASM_OPS_32 char *output, offs_t pc, UINT32 op, const UINT8* oprom |
| 29 | #define DASM_PARAMS output, pc, op, oprom |
| 20 | 30 | |
| 31 | #define LIMM_REG 62 |
| 32 | |
| 33 | #define GET_LIMM_32 \ |
| 34 | limm = oprom[6] | (oprom[7] << 8); \ |
| 35 | limm |= (oprom[4] << 16) | (oprom[5] << 24); \ |
| 36 | |
| 37 | int arcompact_handle04_00_dasm(DASM_OPS_32); |
| 38 | int arcompact_handle04_01_dasm(DASM_OPS_32); |
| 39 | int arcompact_handle04_02_dasm(DASM_OPS_32); |
| 40 | int arcompact_handle04_03_dasm(DASM_OPS_32); |
| 41 | int arcompact_handle04_04_dasm(DASM_OPS_32); |
| 42 | int arcompact_handle04_05_dasm(DASM_OPS_32); |
| 43 | int arcompact_handle04_06_dasm(DASM_OPS_32); |
| 44 | int arcompact_handle04_07_dasm(DASM_OPS_32); |
| 45 | int arcompact_handle04_08_dasm(DASM_OPS_32); |
| 46 | int arcompact_handle04_09_dasm(DASM_OPS_32); |
| 47 | int arcompact_handle04_0a_dasm(DASM_OPS_32); |
| 48 | int arcompact_handle04_0b_dasm(DASM_OPS_32); |
| 49 | int arcompact_handle04_0c_dasm(DASM_OPS_32); |
| 50 | int arcompact_handle04_0d_dasm(DASM_OPS_32); |
| 51 | int arcompact_handle04_0e_dasm(DASM_OPS_32); |
| 52 | int arcompact_handle04_0f_dasm(DASM_OPS_32); |
| 53 | int arcompact_handle04_10_dasm(DASM_OPS_32); |
| 54 | int arcompact_handle04_11_dasm(DASM_OPS_32); |
| 55 | int arcompact_handle04_12_dasm(DASM_OPS_32); |
| 56 | int arcompact_handle04_13_dasm(DASM_OPS_32); |
| 57 | int arcompact_handle04_14_dasm(DASM_OPS_32); |
| 58 | int arcompact_handle04_15_dasm(DASM_OPS_32); |
| 59 | int arcompact_handle04_16_dasm(DASM_OPS_32); |
| 60 | int arcompact_handle04_17_dasm(DASM_OPS_32); |
| 61 | int arcompact_handle04_18_dasm(DASM_OPS_32); |
| 62 | int arcompact_handle04_19_dasm(DASM_OPS_32); |
| 63 | int arcompact_handle04_1a_dasm(DASM_OPS_32); |
| 64 | int arcompact_handle04_1b_dasm(DASM_OPS_32); |
| 65 | int arcompact_handle04_1c_dasm(DASM_OPS_32); |
| 66 | int arcompact_handle04_1d_dasm(DASM_OPS_32); |
| 67 | int arcompact_handle04_1e_dasm(DASM_OPS_32); |
| 68 | int arcompact_handle04_1f_dasm(DASM_OPS_32); |
| 69 | int arcompact_handle04_20_dasm(DASM_OPS_32); |
| 70 | int arcompact_handle04_21_dasm(DASM_OPS_32); |
| 71 | int arcompact_handle04_22_dasm(DASM_OPS_32); |
| 72 | int arcompact_handle04_23_dasm(DASM_OPS_32); |
| 73 | int arcompact_handle04_24_dasm(DASM_OPS_32); |
| 74 | int arcompact_handle04_25_dasm(DASM_OPS_32); |
| 75 | int arcompact_handle04_26_dasm(DASM_OPS_32); |
| 76 | int arcompact_handle04_27_dasm(DASM_OPS_32); |
| 77 | int arcompact_handle04_28_dasm(DASM_OPS_32); |
| 78 | int arcompact_handle04_29_dasm(DASM_OPS_32); |
| 79 | int arcompact_handle04_2a_dasm(DASM_OPS_32); |
| 80 | int arcompact_handle04_2b_dasm(DASM_OPS_32); |
| 81 | int arcompact_handle04_2c_dasm(DASM_OPS_32); |
| 82 | int arcompact_handle04_2d_dasm(DASM_OPS_32); |
| 83 | int arcompact_handle04_2e_dasm(DASM_OPS_32); |
| 84 | int arcompact_handle04_2f_dasm(DASM_OPS_32); |
| 85 | int arcompact_handle04_30_dasm(DASM_OPS_32); |
| 86 | int arcompact_handle04_31_dasm(DASM_OPS_32); |
| 87 | int arcompact_handle04_32_dasm(DASM_OPS_32); |
| 88 | int arcompact_handle04_33_dasm(DASM_OPS_32); |
| 89 | int arcompact_handle04_34_dasm(DASM_OPS_32); |
| 90 | int arcompact_handle04_35_dasm(DASM_OPS_32); |
| 91 | int arcompact_handle04_36_dasm(DASM_OPS_32); |
| 92 | int arcompact_handle04_37_dasm(DASM_OPS_32); |
| 93 | int arcompact_handle04_38_dasm(DASM_OPS_32); |
| 94 | int arcompact_handle04_39_dasm(DASM_OPS_32); |
| 95 | int arcompact_handle04_3a_dasm(DASM_OPS_32); |
| 96 | int arcompact_handle04_3b_dasm(DASM_OPS_32); |
| 97 | int arcompact_handle04_3c_dasm(DASM_OPS_32); |
| 98 | int arcompact_handle04_3d_dasm(DASM_OPS_32); |
| 99 | int arcompact_handle04_3e_dasm(DASM_OPS_32); |
| 100 | int arcompact_handle04_3f_dasm(DASM_OPS_32); |
| 101 | |
| 102 | int arcompact_handle04_2f_00_dasm(DASM_OPS_32); |
| 103 | int arcompact_handle04_2f_01_dasm(DASM_OPS_32); |
| 104 | int arcompact_handle04_2f_02_dasm(DASM_OPS_32); |
| 105 | int arcompact_handle04_2f_03_dasm(DASM_OPS_32); |
| 106 | int arcompact_handle04_2f_04_dasm(DASM_OPS_32); |
| 107 | int arcompact_handle04_2f_05_dasm(DASM_OPS_32); |
| 108 | int arcompact_handle04_2f_06_dasm(DASM_OPS_32); |
| 109 | int arcompact_handle04_2f_07_dasm(DASM_OPS_32); |
| 110 | int arcompact_handle04_2f_08_dasm(DASM_OPS_32); |
| 111 | int arcompact_handle04_2f_09_dasm(DASM_OPS_32); |
| 112 | int arcompact_handle04_2f_0a_dasm(DASM_OPS_32); |
| 113 | int arcompact_handle04_2f_0b_dasm(DASM_OPS_32); |
| 114 | int arcompact_handle04_2f_0c_dasm(DASM_OPS_32); |
| 115 | int arcompact_handle04_2f_0d_dasm(DASM_OPS_32); |
| 116 | int arcompact_handle04_2f_0e_dasm(DASM_OPS_32); |
| 117 | int arcompact_handle04_2f_0f_dasm(DASM_OPS_32); |
| 118 | int arcompact_handle04_2f_10_dasm(DASM_OPS_32); |
| 119 | int arcompact_handle04_2f_11_dasm(DASM_OPS_32); |
| 120 | int arcompact_handle04_2f_12_dasm(DASM_OPS_32); |
| 121 | int arcompact_handle04_2f_13_dasm(DASM_OPS_32); |
| 122 | int arcompact_handle04_2f_14_dasm(DASM_OPS_32); |
| 123 | int arcompact_handle04_2f_15_dasm(DASM_OPS_32); |
| 124 | int arcompact_handle04_2f_16_dasm(DASM_OPS_32); |
| 125 | int arcompact_handle04_2f_17_dasm(DASM_OPS_32); |
| 126 | int arcompact_handle04_2f_18_dasm(DASM_OPS_32); |
| 127 | int arcompact_handle04_2f_19_dasm(DASM_OPS_32); |
| 128 | int arcompact_handle04_2f_1a_dasm(DASM_OPS_32); |
| 129 | int arcompact_handle04_2f_1b_dasm(DASM_OPS_32); |
| 130 | int arcompact_handle04_2f_1c_dasm(DASM_OPS_32); |
| 131 | int arcompact_handle04_2f_1d_dasm(DASM_OPS_32); |
| 132 | int arcompact_handle04_2f_1e_dasm(DASM_OPS_32); |
| 133 | int arcompact_handle04_2f_1f_dasm(DASM_OPS_32); |
| 134 | int arcompact_handle04_2f_20_dasm(DASM_OPS_32); |
| 135 | int arcompact_handle04_2f_21_dasm(DASM_OPS_32); |
| 136 | int arcompact_handle04_2f_22_dasm(DASM_OPS_32); |
| 137 | int arcompact_handle04_2f_23_dasm(DASM_OPS_32); |
| 138 | int arcompact_handle04_2f_24_dasm(DASM_OPS_32); |
| 139 | int arcompact_handle04_2f_25_dasm(DASM_OPS_32); |
| 140 | int arcompact_handle04_2f_26_dasm(DASM_OPS_32); |
| 141 | int arcompact_handle04_2f_27_dasm(DASM_OPS_32); |
| 142 | int arcompact_handle04_2f_28_dasm(DASM_OPS_32); |
| 143 | int arcompact_handle04_2f_29_dasm(DASM_OPS_32); |
| 144 | int arcompact_handle04_2f_2a_dasm(DASM_OPS_32); |
| 145 | int arcompact_handle04_2f_2b_dasm(DASM_OPS_32); |
| 146 | int arcompact_handle04_2f_2c_dasm(DASM_OPS_32); |
| 147 | int arcompact_handle04_2f_2d_dasm(DASM_OPS_32); |
| 148 | int arcompact_handle04_2f_2e_dasm(DASM_OPS_32); |
| 149 | int arcompact_handle04_2f_2f_dasm(DASM_OPS_32); |
| 150 | int arcompact_handle04_2f_30_dasm(DASM_OPS_32); |
| 151 | int arcompact_handle04_2f_31_dasm(DASM_OPS_32); |
| 152 | int arcompact_handle04_2f_32_dasm(DASM_OPS_32); |
| 153 | int arcompact_handle04_2f_33_dasm(DASM_OPS_32); |
| 154 | int arcompact_handle04_2f_34_dasm(DASM_OPS_32); |
| 155 | int arcompact_handle04_2f_35_dasm(DASM_OPS_32); |
| 156 | int arcompact_handle04_2f_36_dasm(DASM_OPS_32); |
| 157 | int arcompact_handle04_2f_37_dasm(DASM_OPS_32); |
| 158 | int arcompact_handle04_2f_38_dasm(DASM_OPS_32); |
| 159 | int arcompact_handle04_2f_39_dasm(DASM_OPS_32); |
| 160 | int arcompact_handle04_2f_3a_dasm(DASM_OPS_32); |
| 161 | int arcompact_handle04_2f_3b_dasm(DASM_OPS_32); |
| 162 | int arcompact_handle04_2f_3c_dasm(DASM_OPS_32); |
| 163 | int arcompact_handle04_2f_3d_dasm(DASM_OPS_32); |
| 164 | int arcompact_handle04_2f_3e_dasm(DASM_OPS_32); |
| 165 | int arcompact_handle04_2f_3f_dasm(DASM_OPS_32); |
| 166 | |
| 167 | int arcompact_handle04_2f_3f_00_dasm(DASM_OPS_32); |
| 168 | int arcompact_handle04_2f_3f_01_dasm(DASM_OPS_32); |
| 169 | int arcompact_handle04_2f_3f_02_dasm(DASM_OPS_32); |
| 170 | int arcompact_handle04_2f_3f_03_dasm(DASM_OPS_32); |
| 171 | int arcompact_handle04_2f_3f_04_dasm(DASM_OPS_32); |
| 172 | int arcompact_handle04_2f_3f_05_dasm(DASM_OPS_32); |
| 173 | int arcompact_handle04_2f_3f_06_dasm(DASM_OPS_32); |
| 174 | int arcompact_handle04_2f_3f_07_dasm(DASM_OPS_32); |
| 175 | int arcompact_handle04_2f_3f_08_dasm(DASM_OPS_32); |
| 176 | int arcompact_handle04_2f_3f_09_dasm(DASM_OPS_32); |
| 177 | int arcompact_handle04_2f_3f_0a_dasm(DASM_OPS_32); |
| 178 | int arcompact_handle04_2f_3f_0b_dasm(DASM_OPS_32); |
| 179 | int arcompact_handle04_2f_3f_0c_dasm(DASM_OPS_32); |
| 180 | int arcompact_handle04_2f_3f_0d_dasm(DASM_OPS_32); |
| 181 | int arcompact_handle04_2f_3f_0e_dasm(DASM_OPS_32); |
| 182 | int arcompact_handle04_2f_3f_0f_dasm(DASM_OPS_32); |
| 183 | int arcompact_handle04_2f_3f_10_dasm(DASM_OPS_32); |
| 184 | int arcompact_handle04_2f_3f_11_dasm(DASM_OPS_32); |
| 185 | int arcompact_handle04_2f_3f_12_dasm(DASM_OPS_32); |
| 186 | int arcompact_handle04_2f_3f_13_dasm(DASM_OPS_32); |
| 187 | int arcompact_handle04_2f_3f_14_dasm(DASM_OPS_32); |
| 188 | int arcompact_handle04_2f_3f_15_dasm(DASM_OPS_32); |
| 189 | int arcompact_handle04_2f_3f_16_dasm(DASM_OPS_32); |
| 190 | int arcompact_handle04_2f_3f_17_dasm(DASM_OPS_32); |
| 191 | int arcompact_handle04_2f_3f_18_dasm(DASM_OPS_32); |
| 192 | int arcompact_handle04_2f_3f_19_dasm(DASM_OPS_32); |
| 193 | int arcompact_handle04_2f_3f_1a_dasm(DASM_OPS_32); |
| 194 | int arcompact_handle04_2f_3f_1b_dasm(DASM_OPS_32); |
| 195 | int arcompact_handle04_2f_3f_1c_dasm(DASM_OPS_32); |
| 196 | int arcompact_handle04_2f_3f_1d_dasm(DASM_OPS_32); |
| 197 | int arcompact_handle04_2f_3f_1e_dasm(DASM_OPS_32); |
| 198 | int arcompact_handle04_2f_3f_1f_dasm(DASM_OPS_32); |
| 199 | int arcompact_handle04_2f_3f_20_dasm(DASM_OPS_32); |
| 200 | int arcompact_handle04_2f_3f_21_dasm(DASM_OPS_32); |
| 201 | int arcompact_handle04_2f_3f_22_dasm(DASM_OPS_32); |
| 202 | int arcompact_handle04_2f_3f_23_dasm(DASM_OPS_32); |
| 203 | int arcompact_handle04_2f_3f_24_dasm(DASM_OPS_32); |
| 204 | int arcompact_handle04_2f_3f_25_dasm(DASM_OPS_32); |
| 205 | int arcompact_handle04_2f_3f_26_dasm(DASM_OPS_32); |
| 206 | int arcompact_handle04_2f_3f_27_dasm(DASM_OPS_32); |
| 207 | int arcompact_handle04_2f_3f_28_dasm(DASM_OPS_32); |
| 208 | int arcompact_handle04_2f_3f_29_dasm(DASM_OPS_32); |
| 209 | int arcompact_handle04_2f_3f_2a_dasm(DASM_OPS_32); |
| 210 | int arcompact_handle04_2f_3f_2b_dasm(DASM_OPS_32); |
| 211 | int arcompact_handle04_2f_3f_2c_dasm(DASM_OPS_32); |
| 212 | int arcompact_handle04_2f_3f_2d_dasm(DASM_OPS_32); |
| 213 | int arcompact_handle04_2f_3f_2e_dasm(DASM_OPS_32); |
| 214 | int arcompact_handle04_2f_3f_2f_dasm(DASM_OPS_32); |
| 215 | int arcompact_handle04_2f_3f_30_dasm(DASM_OPS_32); |
| 216 | int arcompact_handle04_2f_3f_31_dasm(DASM_OPS_32); |
| 217 | int arcompact_handle04_2f_3f_32_dasm(DASM_OPS_32); |
| 218 | int arcompact_handle04_2f_3f_33_dasm(DASM_OPS_32); |
| 219 | int arcompact_handle04_2f_3f_34_dasm(DASM_OPS_32); |
| 220 | int arcompact_handle04_2f_3f_35_dasm(DASM_OPS_32); |
| 221 | int arcompact_handle04_2f_3f_36_dasm(DASM_OPS_32); |
| 222 | int arcompact_handle04_2f_3f_37_dasm(DASM_OPS_32); |
| 223 | int arcompact_handle04_2f_3f_38_dasm(DASM_OPS_32); |
| 224 | int arcompact_handle04_2f_3f_39_dasm(DASM_OPS_32); |
| 225 | int arcompact_handle04_2f_3f_3a_dasm(DASM_OPS_32); |
| 226 | int arcompact_handle04_2f_3f_3b_dasm(DASM_OPS_32); |
| 227 | int arcompact_handle04_2f_3f_3c_dasm(DASM_OPS_32); |
| 228 | int arcompact_handle04_2f_3f_3d_dasm(DASM_OPS_32); |
| 229 | int arcompact_handle04_2f_3f_3e_dasm(DASM_OPS_32); |
| 230 | int arcompact_handle04_2f_3f_3f_dasm(DASM_OPS_32); |
| 231 | |
| 232 | int arcompact_handle05_00_dasm(DASM_OPS_32); |
| 233 | int arcompact_handle05_01_dasm(DASM_OPS_32); |
| 234 | int arcompact_handle05_02_dasm(DASM_OPS_32); |
| 235 | int arcompact_handle05_03_dasm(DASM_OPS_32); |
| 236 | int arcompact_handle05_04_dasm(DASM_OPS_32); |
| 237 | int arcompact_handle05_05_dasm(DASM_OPS_32); |
| 238 | int arcompact_handle05_06_dasm(DASM_OPS_32); |
| 239 | int arcompact_handle05_07_dasm(DASM_OPS_32); |
| 240 | int arcompact_handle05_08_dasm(DASM_OPS_32); |
| 241 | int arcompact_handle05_09_dasm(DASM_OPS_32); |
| 242 | int arcompact_handle05_0a_dasm(DASM_OPS_32); |
| 243 | int arcompact_handle05_0b_dasm(DASM_OPS_32); |
| 244 | int arcompact_handle05_0c_dasm(DASM_OPS_32); |
| 245 | int arcompact_handle05_0d_dasm(DASM_OPS_32); |
| 246 | int arcompact_handle05_0e_dasm(DASM_OPS_32); |
| 247 | int arcompact_handle05_0f_dasm(DASM_OPS_32); |
| 248 | int arcompact_handle05_10_dasm(DASM_OPS_32); |
| 249 | int arcompact_handle05_11_dasm(DASM_OPS_32); |
| 250 | int arcompact_handle05_12_dasm(DASM_OPS_32); |
| 251 | int arcompact_handle05_13_dasm(DASM_OPS_32); |
| 252 | int arcompact_handle05_14_dasm(DASM_OPS_32); |
| 253 | int arcompact_handle05_15_dasm(DASM_OPS_32); |
| 254 | int arcompact_handle05_16_dasm(DASM_OPS_32); |
| 255 | int arcompact_handle05_17_dasm(DASM_OPS_32); |
| 256 | int arcompact_handle05_18_dasm(DASM_OPS_32); |
| 257 | int arcompact_handle05_19_dasm(DASM_OPS_32); |
| 258 | int arcompact_handle05_1a_dasm(DASM_OPS_32); |
| 259 | int arcompact_handle05_1b_dasm(DASM_OPS_32); |
| 260 | int arcompact_handle05_1c_dasm(DASM_OPS_32); |
| 261 | int arcompact_handle05_1d_dasm(DASM_OPS_32); |
| 262 | int arcompact_handle05_1e_dasm(DASM_OPS_32); |
| 263 | int arcompact_handle05_1f_dasm(DASM_OPS_32); |
| 264 | int arcompact_handle05_20_dasm(DASM_OPS_32); |
| 265 | int arcompact_handle05_21_dasm(DASM_OPS_32); |
| 266 | int arcompact_handle05_22_dasm(DASM_OPS_32); |
| 267 | int arcompact_handle05_23_dasm(DASM_OPS_32); |
| 268 | int arcompact_handle05_24_dasm(DASM_OPS_32); |
| 269 | int arcompact_handle05_25_dasm(DASM_OPS_32); |
| 270 | int arcompact_handle05_26_dasm(DASM_OPS_32); |
| 271 | int arcompact_handle05_27_dasm(DASM_OPS_32); |
| 272 | int arcompact_handle05_28_dasm(DASM_OPS_32); |
| 273 | int arcompact_handle05_29_dasm(DASM_OPS_32); |
| 274 | int arcompact_handle05_2a_dasm(DASM_OPS_32); |
| 275 | int arcompact_handle05_2b_dasm(DASM_OPS_32); |
| 276 | int arcompact_handle05_2c_dasm(DASM_OPS_32); |
| 277 | int arcompact_handle05_2d_dasm(DASM_OPS_32); |
| 278 | int arcompact_handle05_2e_dasm(DASM_OPS_32); |
| 279 | int arcompact_handle05_2f_dasm(DASM_OPS_32); |
| 280 | int arcompact_handle05_30_dasm(DASM_OPS_32); |
| 281 | int arcompact_handle05_31_dasm(DASM_OPS_32); |
| 282 | int arcompact_handle05_32_dasm(DASM_OPS_32); |
| 283 | int arcompact_handle05_33_dasm(DASM_OPS_32); |
| 284 | int arcompact_handle05_34_dasm(DASM_OPS_32); |
| 285 | int arcompact_handle05_35_dasm(DASM_OPS_32); |
| 286 | int arcompact_handle05_36_dasm(DASM_OPS_32); |
| 287 | int arcompact_handle05_37_dasm(DASM_OPS_32); |
| 288 | int arcompact_handle05_38_dasm(DASM_OPS_32); |
| 289 | int arcompact_handle05_39_dasm(DASM_OPS_32); |
| 290 | int arcompact_handle05_3a_dasm(DASM_OPS_32); |
| 291 | int arcompact_handle05_3b_dasm(DASM_OPS_32); |
| 292 | int arcompact_handle05_3c_dasm(DASM_OPS_32); |
| 293 | int arcompact_handle05_3d_dasm(DASM_OPS_32); |
| 294 | int arcompact_handle05_3e_dasm(DASM_OPS_32); |
| 295 | int arcompact_handle05_3f_dasm(DASM_OPS_32); |
| 296 | |
| 297 | |
| 298 | int arcompact_handle0c_00_dasm(DASM_OPS_16); |
| 299 | int arcompact_handle0c_01_dasm(DASM_OPS_16); |
| 300 | int arcompact_handle0c_02_dasm(DASM_OPS_16); |
| 301 | int arcompact_handle0c_03_dasm(DASM_OPS_16); |
| 302 | |
| 303 | int arcompact_handle0d_00_dasm(DASM_OPS_16); |
| 304 | int arcompact_handle0d_01_dasm(DASM_OPS_16); |
| 305 | int arcompact_handle0d_02_dasm(DASM_OPS_16); |
| 306 | int arcompact_handle0d_03_dasm(DASM_OPS_16); |
| 307 | |
| 308 | int arcompact_handle0e_00_dasm(DASM_OPS_16); |
| 309 | int arcompact_handle0e_01_dasm(DASM_OPS_16); |
| 310 | int arcompact_handle0e_02_dasm(DASM_OPS_16); |
| 311 | int arcompact_handle0e_03_dasm(DASM_OPS_16); |
| 312 | |
| 313 | int arcompact_handle17_00_dasm(DASM_OPS_16); |
| 314 | int arcompact_handle17_01_dasm(DASM_OPS_16); |
| 315 | int arcompact_handle17_02_dasm(DASM_OPS_16); |
| 316 | int arcompact_handle17_03_dasm(DASM_OPS_16); |
| 317 | int arcompact_handle17_04_dasm(DASM_OPS_16); |
| 318 | int arcompact_handle17_05_dasm(DASM_OPS_16); |
| 319 | int arcompact_handle17_06_dasm(DASM_OPS_16); |
| 320 | int arcompact_handle17_07_dasm(DASM_OPS_16); |
| 321 | |
| 322 | int arcompact_handle18_00_dasm(DASM_OPS_16); |
| 323 | int arcompact_handle18_01_dasm(DASM_OPS_16); |
| 324 | int arcompact_handle18_02_dasm(DASM_OPS_16); |
| 325 | int arcompact_handle18_03_dasm(DASM_OPS_16); |
| 326 | int arcompact_handle18_04_dasm(DASM_OPS_16); |
| 327 | |
| 328 | int arcompact_handle18_05_dasm(DASM_OPS_16); |
| 329 | int arcompact_handle18_05_00_dasm(DASM_OPS_16); |
| 330 | int arcompact_handle18_05_01_dasm(DASM_OPS_16); |
| 331 | int arcompact_handle18_05_02_dasm(DASM_OPS_16); |
| 332 | int arcompact_handle18_05_03_dasm(DASM_OPS_16); |
| 333 | int arcompact_handle18_05_04_dasm(DASM_OPS_16); |
| 334 | int arcompact_handle18_05_05_dasm(DASM_OPS_16); |
| 335 | int arcompact_handle18_05_06_dasm(DASM_OPS_16); |
| 336 | int arcompact_handle18_05_07_dasm(DASM_OPS_16); |
| 337 | |
| 338 | int arcompact_handle18_06_dasm(DASM_OPS_16); |
| 339 | int arcompact_handle18_06_00_dasm(DASM_OPS_16); |
| 340 | int arcompact_handle18_06_01_dasm(DASM_OPS_16); |
| 341 | int arcompact_handle18_06_02_dasm(DASM_OPS_16); |
| 342 | int arcompact_handle18_06_03_dasm(DASM_OPS_16); |
| 343 | int arcompact_handle18_06_04_dasm(DASM_OPS_16); |
| 344 | int arcompact_handle18_06_05_dasm(DASM_OPS_16); |
| 345 | int arcompact_handle18_06_06_dasm(DASM_OPS_16); |
| 346 | int arcompact_handle18_06_07_dasm(DASM_OPS_16); |
| 347 | int arcompact_handle18_06_08_dasm(DASM_OPS_16); |
| 348 | int arcompact_handle18_06_09_dasm(DASM_OPS_16); |
| 349 | int arcompact_handle18_06_0a_dasm(DASM_OPS_16); |
| 350 | int arcompact_handle18_06_0b_dasm(DASM_OPS_16); |
| 351 | int arcompact_handle18_06_0c_dasm(DASM_OPS_16); |
| 352 | int arcompact_handle18_06_0d_dasm(DASM_OPS_16); |
| 353 | int arcompact_handle18_06_0e_dasm(DASM_OPS_16); |
| 354 | int arcompact_handle18_06_0f_dasm(DASM_OPS_16); |
| 355 | int arcompact_handle18_06_10_dasm(DASM_OPS_16); |
| 356 | int arcompact_handle18_06_11_dasm(DASM_OPS_16); |
| 357 | int arcompact_handle18_06_12_dasm(DASM_OPS_16); |
| 358 | int arcompact_handle18_06_13_dasm(DASM_OPS_16); |
| 359 | int arcompact_handle18_06_14_dasm(DASM_OPS_16); |
| 360 | int arcompact_handle18_06_15_dasm(DASM_OPS_16); |
| 361 | int arcompact_handle18_06_16_dasm(DASM_OPS_16); |
| 362 | int arcompact_handle18_06_17_dasm(DASM_OPS_16); |
| 363 | int arcompact_handle18_06_18_dasm(DASM_OPS_16); |
| 364 | int arcompact_handle18_06_19_dasm(DASM_OPS_16); |
| 365 | int arcompact_handle18_06_1a_dasm(DASM_OPS_16); |
| 366 | int arcompact_handle18_06_1b_dasm(DASM_OPS_16); |
| 367 | int arcompact_handle18_06_1c_dasm(DASM_OPS_16); |
| 368 | int arcompact_handle18_06_1d_dasm(DASM_OPS_16); |
| 369 | int arcompact_handle18_06_1e_dasm(DASM_OPS_16); |
| 370 | int arcompact_handle18_06_1f_dasm(DASM_OPS_16); |
| 371 | |
| 372 | int arcompact_handle18_07_dasm(DASM_OPS_16); |
| 373 | int arcompact_handle18_07_00_dasm(DASM_OPS_16); |
| 374 | int arcompact_handle18_07_01_dasm(DASM_OPS_16); |
| 375 | int arcompact_handle18_07_02_dasm(DASM_OPS_16); |
| 376 | int arcompact_handle18_07_03_dasm(DASM_OPS_16); |
| 377 | int arcompact_handle18_07_04_dasm(DASM_OPS_16); |
| 378 | int arcompact_handle18_07_05_dasm(DASM_OPS_16); |
| 379 | int arcompact_handle18_07_06_dasm(DASM_OPS_16); |
| 380 | int arcompact_handle18_07_07_dasm(DASM_OPS_16); |
| 381 | int arcompact_handle18_07_08_dasm(DASM_OPS_16); |
| 382 | int arcompact_handle18_07_09_dasm(DASM_OPS_16); |
| 383 | int arcompact_handle18_07_0a_dasm(DASM_OPS_16); |
| 384 | int arcompact_handle18_07_0b_dasm(DASM_OPS_16); |
| 385 | int arcompact_handle18_07_0c_dasm(DASM_OPS_16); |
| 386 | int arcompact_handle18_07_0d_dasm(DASM_OPS_16); |
| 387 | int arcompact_handle18_07_0e_dasm(DASM_OPS_16); |
| 388 | int arcompact_handle18_07_0f_dasm(DASM_OPS_16); |
| 389 | int arcompact_handle18_07_10_dasm(DASM_OPS_16); |
| 390 | int arcompact_handle18_07_11_dasm(DASM_OPS_16); |
| 391 | int arcompact_handle18_07_12_dasm(DASM_OPS_16); |
| 392 | int arcompact_handle18_07_13_dasm(DASM_OPS_16); |
| 393 | int arcompact_handle18_07_14_dasm(DASM_OPS_16); |
| 394 | int arcompact_handle18_07_15_dasm(DASM_OPS_16); |
| 395 | int arcompact_handle18_07_16_dasm(DASM_OPS_16); |
| 396 | int arcompact_handle18_07_17_dasm(DASM_OPS_16); |
| 397 | int arcompact_handle18_07_18_dasm(DASM_OPS_16); |
| 398 | int arcompact_handle18_07_19_dasm(DASM_OPS_16); |
| 399 | int arcompact_handle18_07_1a_dasm(DASM_OPS_16); |
| 400 | int arcompact_handle18_07_1b_dasm(DASM_OPS_16); |
| 401 | int arcompact_handle18_07_1c_dasm(DASM_OPS_16); |
| 402 | int arcompact_handle18_07_1d_dasm(DASM_OPS_16); |
| 403 | int arcompact_handle18_07_1e_dasm(DASM_OPS_16); |
| 404 | int arcompact_handle18_07_1f_dasm(DASM_OPS_16); |
| 405 | |
| 406 | int arcompact_handle19_00_dasm(DASM_OPS_16); |
| 407 | int arcompact_handle19_01_dasm(DASM_OPS_16); |
| 408 | int arcompact_handle19_02_dasm(DASM_OPS_16); |
| 409 | int arcompact_handle19_03_dasm(DASM_OPS_16); |
| 410 | |
| 411 | int arcompact_handle1c_00_dasm(DASM_OPS_16); |
| 412 | int arcompact_handle1c_01_dasm(DASM_OPS_16); |
| 413 | |
| 414 | int arcompact_handle1d_00_dasm(DASM_OPS_16); |
| 415 | int arcompact_handle1d_01_dasm(DASM_OPS_16); |
| 416 | |
| 417 | int arcompact_handle1e_00_dasm(DASM_OPS_16); |
| 418 | int arcompact_handle1e_01_dasm(DASM_OPS_16); |
| 419 | int arcompact_handle1e_02_dasm(DASM_OPS_16); |
| 420 | int arcompact_handle1e_03_dasm(DASM_OPS_16); |
| 421 | |
| 422 | int arcompact_handle1e_03_00_dasm(DASM_OPS_16); |
| 423 | int arcompact_handle1e_03_01_dasm(DASM_OPS_16); |
| 424 | int arcompact_handle1e_03_02_dasm(DASM_OPS_16); |
| 425 | int arcompact_handle1e_03_03_dasm(DASM_OPS_16); |
| 426 | int arcompact_handle1e_03_04_dasm(DASM_OPS_16); |
| 427 | int arcompact_handle1e_03_05_dasm(DASM_OPS_16); |
| 428 | int arcompact_handle1e_03_06_dasm(DASM_OPS_16); |
| 429 | int arcompact_handle1e_03_07_dasm(DASM_OPS_16); |
| 430 | |
| 431 | |
| 432 | |
| 433 | // condition codes (basic ones are the same as arc |
| 434 | static const char *conditions[0x20] = |
| 435 | { |
| 436 | /* 00 */ "AL", // (aka RA - Always) |
| 437 | /* 01 */ "EQ", // (aka Z - Zero |
| 438 | /* 02 */ "NE", // (aka NZ - Non-Zero) |
| 439 | /* 03 */ "PL", // (aka P - Positive) |
| 440 | /* 04 */ "MI", // (aka N - Negative) |
| 441 | /* 05 */ "CS", // (aka C, LO - Carry set / Lower than) (unsigned) |
| 442 | /* 06 */ "CC", // (aka CC, NC, HS - Carry Clear / Higher or Same) (unsigned) |
| 443 | /* 07 */ "VS", // (aka V - Overflow set) |
| 444 | /* 08 */ "VC", // (aka NV - Overflow clear) |
| 445 | /* 09 */ "GT", // ( - Greater than) (signed) |
| 446 | /* 0a */ "GE", // ( - Greater than or Equal) (signed) |
| 447 | /* 0b */ "LT", // ( - Less than) (signed) |
| 448 | /* 0c */ "LE", // ( - Less than or Equal) (signed) |
| 449 | /* 0d */ "HI", // ( - Higher than) (unsigned) |
| 450 | /* 0e */ "LS", // ( - Lower or Same) (unsigned) |
| 451 | /* 0f */ "PNZ",// ( - Positive non-0 value) |
| 452 | /* 10 */ "0x10 Reserved", // possible CPU implementation specifics |
| 453 | /* 11 */ "0x11 Reserved", |
| 454 | /* 12 */ "0x12 Reserved", |
| 455 | /* 13 */ "0x13 Reserved", |
| 456 | /* 14 */ "0x14 Reserved", |
| 457 | /* 15 */ "0x15 Reserved", |
| 458 | /* 16 */ "0x16 Reserved", |
| 459 | /* 17 */ "0x17 Reserved", |
| 460 | /* 18 */ "0x18 Reserved", |
| 461 | /* 19 */ "0x19 Reserved", |
| 462 | /* 1a */ "0x1a Reserved", |
| 463 | /* 1b */ "0x1b Reserved", |
| 464 | /* 1c */ "0x1c Reserved", |
| 465 | /* 1d */ "0x1d Reserved", |
| 466 | /* 1e */ "0x1e Reserved", |
| 467 | /* 1f */ "0x1f Reserved" |
| 468 | }; |
| 469 | |
| 470 | static const char *table01_01_0x[0x10] = |
| 471 | { |
| 472 | /* 00 */ "BREQ", |
| 473 | /* 01 */ "BRNE", |
| 474 | /* 02 */ "BRLT", |
| 475 | /* 03 */ "BRGE", |
| 476 | /* 04 */ "BRLO", |
| 477 | /* 05 */ "BRHS", |
| 478 | /* 06 */ "<reserved>", |
| 479 | /* 07 */ "<reserved>", |
| 480 | /* 08 */ "<reserved>", |
| 481 | /* 09 */ "<reserved>", |
| 482 | /* 0a */ "<reserved>", |
| 483 | /* 0b */ "<reserved>", |
| 484 | /* 0c */ "<reserved>", |
| 485 | /* 0d */ "<reserved>", |
| 486 | /* 0e */ "<BBIT0>", |
| 487 | /* 0f */ "<BBIT1>" |
| 488 | }; |
| 489 | |
| 490 | |
| 491 | |
| 492 | |
| 493 | |
| 494 | static const char *table0f[0x20] = |
| 495 | { |
| 496 | /* 00 */ "SOPs", // Sub Operation (another table..) ( table0f_00 ) |
| 497 | /* 01 */ "0x01 <illegal>", |
| 498 | /* 02 */ "SUB_S", |
| 499 | /* 03 */ "0x03 <illegal>", |
| 500 | /* 04 */ "AND_S", |
| 501 | /* 05 */ "OR_S", |
| 502 | /* 06 */ "BIC_S", |
| 503 | /* 07 */ "XOR_S", |
| 504 | /* 08 */ "0x08 <illegal>", |
| 505 | /* 09 */ "0x09 <illegal>", |
| 506 | /* 0a */ "0x0a <illegal>", |
| 507 | /* 0b */ "TST_S", |
| 508 | /* 0c */ "MUL64_S", |
| 509 | /* 0d */ "SEXB_S", |
| 510 | /* 0e */ "SEXW_S", |
| 511 | /* 0f */ "EXTB_S", |
| 512 | /* 10 */ "EXTW_S", |
| 513 | /* 11 */ "ABS_S", |
| 514 | /* 12 */ "NOT_S", |
| 515 | /* 13 */ "NEG_S", |
| 516 | /* 14 */ "ADD1_S", |
| 517 | /* 15 */ "ADD2_S>", |
| 518 | /* 16 */ "ADD3_S", |
| 519 | /* 17 */ "0x17 <illegal>", |
| 520 | /* 18 */ "ASL_S (multiple)", |
| 521 | /* 19 */ "LSR_S (multiple)", |
| 522 | /* 1a */ "ASR_S (multiple)", |
| 523 | /* 1b */ "ASL_S (single)", |
| 524 | /* 1c */ "LSR_S (single)", |
| 525 | /* 1d */ "ASR_S (single)", |
| 526 | /* 1e */ "TRAP (not a5?)", |
| 527 | /* 1f */ "BRK_S" // 0x7fff only? |
| 528 | }; |
| 529 | |
| 530 | static const char *table0f_00[0x8] = |
| 531 | { |
| 532 | /* 00 */ "J_S", |
| 533 | /* 01 */ "J_S.D", |
| 534 | /* 02 */ "JL_S", |
| 535 | /* 03 */ "JL_S.D", |
| 536 | /* 04 */ "0x04 <illegal>", |
| 537 | /* 05 */ "0x05 <illegal>", |
| 538 | /* 06 */ "SUB_S.NE", |
| 539 | /* 07 */ "ZOPs", // Sub Operations (yet another table..) ( table0f_00_07 ) |
| 540 | }; |
| 541 | |
| 542 | static const char *table0f_00_07[0x8] = |
| 543 | { |
| 544 | /* 00 */ "NOP_S", |
| 545 | /* 01 */ "UNIMP_S", // unimplemented (not a5?) |
| 546 | /* 02 */ "0x02 <illegal>", |
| 547 | /* 03 */ "0x03 <illegal>", |
| 548 | /* 04 */ "JEQ_S [BLINK]", |
| 549 | /* 05 */ "JNE_S [BLINK]", |
| 550 | /* 06 */ "J_S [BLINK]", |
| 551 | /* 07 */ "J_S.D [BLINK]", |
| 552 | }; |
| 553 | |
| 21 | 554 | #define ARCOMPACT_OPERATION ((op & 0xf800) >> 11) |
| 22 | 555 | |
| 23 | | extern char *output;; |
| 24 | 556 | |
| 557 | int arcompact_handle00_dasm(DASM_OPS_32) |
| 558 | { |
| 559 | if (op & 0x00010000) |
| 560 | { // Branch Unconditionally Far |
| 561 | // 00000 ssssssssss 1 SSSSSSSSSS N R TTTT |
| 562 | INT32 address = (op & 0x07fe0000) >> 17; |
| 563 | address |= ((op & 0x0000ffc0) >> 6) << 10; |
| 564 | address |= ((op & 0x0000000f) >> 0) << 20; |
| 565 | if (address & 0x800000) address = -(address & 0x7fffff); |
| 566 | |
| 567 | print("B %08x (%08x)", pc + (address * 2) + 2, op & ~0xffffffcf); |
| 568 | } |
| 569 | else |
| 570 | { // Branch Conditionally |
| 571 | // 00000 ssssssssss 0 SSSSSSSSSS N QQQQQ |
| 572 | INT32 address = (op & 0x07fe0000) >> 17; |
| 573 | address |= ((op & 0x0000ffc0) >> 6) << 10; |
| 574 | if (address & 0x800000) address = -(address & 0x7fffff); |
| 575 | |
| 576 | UINT8 condition = op & 0x0000001f; |
| 577 | |
| 578 | print("B(%s) %08x (%08x)", conditions[condition], pc + (address * 2) + 2, op & ~0xffffffdf); |
| 579 | } |
| 580 | return 4; |
| 581 | } |
| 582 | |
| 583 | int arcompact_handle01_dasm(DASM_OPS_32) |
| 584 | { |
| 585 | int size = 4; |
| 586 | |
| 587 | if (op & 0x00010000) |
| 588 | { |
| 589 | if (op & 0x00000010) |
| 590 | { // Branch on Compare / Bit Test - Register-Immediate |
| 591 | // 00001 bbb sssssss 1 S BBB UUUUUU N 1 iiii |
| 592 | UINT8 subinstr = op & 0x0000000f; |
| 593 | INT32 address = (op & 0x00fe0000) >> 17; |
| 594 | address |= ((op & 0x00008000) >> 15) << 7; |
| 595 | if (address & 0x80) address = -(address & 0x7f); |
| 596 | |
| 597 | |
| 598 | print("%s (reg-imm) %08x (%08x)", table01_01_0x[subinstr], pc + (address * 2) + 4, op & ~0xf8fe800f); |
| 599 | |
| 600 | |
| 601 | } |
| 602 | else |
| 603 | { |
| 604 | // Branch on Compare / Bit Test - Register-Register |
| 605 | // 00001 bbb sssssss 1 S BBB CCCCCC N 0 iiii |
| 606 | UINT8 subinstr = op & 0x0000000f; |
| 607 | INT32 address = (op & 0x00fe0000) >> 17; |
| 608 | address |= ((op & 0x00008000) >> 15) << 7; |
| 609 | if (address & 0x80) address = -(address & 0x7f); |
| 610 | |
| 611 | int c = (op & 0x00000fc0)>> 6; |
| 612 | int b = (op & 0x07000000) >> 24; |
| 613 | b |= ((op & 0x00007000) >> 12) << 3; |
| 614 | |
| 615 | op &= ~0x07007fe0; |
| 616 | |
| 617 | if ((b != LIMM_REG) && (c != LIMM_REG)) |
| 618 | { |
| 619 | print("%s (reg-reg) (r%d) (r%d) %08x (%08x)", table01_01_0x[subinstr], b, c, pc + (address * 2) + 4, op & ~0xf8fe800f); |
| 620 | } |
| 621 | else |
| 622 | { |
| 623 | UINT32 limm; |
| 624 | GET_LIMM_32; |
| 625 | size = 8; |
| 626 | |
| 627 | if ((b == LIMM_REG) && (c != LIMM_REG)) |
| 628 | { |
| 629 | print("%s (reg-reg) (%08x) (r%d) %08x (%08x)", table01_01_0x[subinstr], limm, c, pc + (address * 2) + 4, op & ~0xf8fe800f); |
| 630 | } |
| 631 | else if ((c == LIMM_REG) && (b != LIMM_REG)) |
| 632 | { |
| 633 | print("%s (reg-reg) (r%d) (%08x) %08x (%08x)", table01_01_0x[subinstr], b, limm, pc + (address * 2) + 4, op & ~0xf8fe800f); |
| 634 | } |
| 635 | else |
| 636 | { |
| 637 | // b and c are LIMM? invalid?? |
| 638 | print("%s (reg-reg) (%08x) (%08x) (illegal?) %08x (%08x)", table01_01_0x[subinstr], limm, limm, pc + (address * 2) + 4, op & ~0xf8fe800f); |
| 639 | |
| 640 | } |
| 641 | } |
| 642 | |
| 643 | } |
| 644 | |
| 645 | } |
| 646 | else |
| 647 | { |
| 648 | if (op & 0x00020000) |
| 649 | { // Branch and Link Unconditionally Far |
| 650 | // 00001 sssssssss 10 SSSSSSSSSS N R TTTT |
| 651 | INT32 address = (op & 0x07fc0000) >> 17; |
| 652 | address |= ((op & 0x0000ffc0) >> 6) << 10; |
| 653 | address |= ((op & 0x0000000f) >> 0) << 20; |
| 654 | if (address & 0x800000) address = -(address&0x7fffff); |
| 655 | |
| 656 | print("BL %08x (%08x)", pc + (address *2) + 2, op & ~0xffffffcf ); |
| 657 | } |
| 658 | else |
| 659 | { // Branch and Link Conditionally |
| 660 | // 00001 sssssssss 00 SSSSSSSSSS N QQQQQ |
| 661 | INT32 address = (op & 0x07fc0000) >> 17; |
| 662 | address |= ((op & 0x0000ffc0) >> 6) << 10; |
| 663 | if (address & 0x800000) address = -(address&0x7fffff); |
| 664 | |
| 665 | UINT8 condition = op & 0x0000001f; |
| 666 | |
| 667 | print("BL(%s) %08x (%08x)", conditions[condition], pc + (address *2) + 2, op & ~0xffffffdf ); |
| 668 | |
| 669 | } |
| 670 | |
| 671 | } |
| 672 | return size; |
| 673 | } |
| 674 | |
| 675 | int arcompact_handle02_dasm(DASM_OPS_32) |
| 676 | { |
| 677 | // bitpos |
| 678 | // 11111 111 11111111 0 000 0 00 00 0 000000 |
| 679 | // fedcb a98 76543210 f edc b a9 87 6 543210 |
| 680 | // fields |
| 681 | // 00010 bbb ssssssss S BBB D aa ZZ X AAAAAA |
| 682 | #if 0 |
| 683 | int A = (op & 0x0000003f >> 0); op &= ~0x0000003f; |
| 684 | int X = (op & 0x00000040 >> 6); op &= ~0x00000040; |
| 685 | int Z = (op & 0x00000180 >> 7); op &= ~0x00000180; |
| 686 | int a = (op & 0x00000600 >> 9); op &= ~0x00000600; |
| 687 | int D = (op & 0x00000800 >> 11); op &= ~0x00000800; |
| 688 | int B = (op & 0x00007000 >> 12); op &= ~0x00007000; |
| 689 | int S = (op & 0x00008000 >> 15); op &= ~0x00008000; |
| 690 | int s = (op & 0x00ff0000 >> 16); op &= ~0x00ff0000; |
| 691 | int b = (op & 0x07000000 >> 24); op &= ~0x07000000; |
| 692 | #endif |
| 693 | |
| 694 | print("LD r+o (%08x)", op ); |
| 695 | return 4; |
| 696 | } |
| 697 | |
| 698 | int arcompact_handle03_dasm(DASM_OPS_32) |
| 699 | { |
| 700 | // bitpos |
| 701 | // 11111 111 11111111 0 000 000000 0 00 00 0 |
| 702 | // fedcb a98 76543210 f edc ba9876 5 43 21 0 |
| 703 | // fields |
| 704 | // 00011 bbb ssssssss S BBB CCCCCC D aa ZZ R |
| 705 | |
| 706 | print("ST r+o (%08x)", op ); |
| 707 | return 4; |
| 708 | } |
| 709 | |
| 710 | int arcompact_handle04_dasm(DASM_OPS_32) |
| 711 | { |
| 712 | int size = 4; |
| 713 | // General Operations |
| 714 | |
| 715 | // bitpos |
| 716 | // 11111 111 11 111111 0 000 000000 0 00000 |
| 717 | // fedcb a98 76 543210 f edc ba9876 5 43210 |
| 718 | // |
| 719 | // 00100 bbb 00 iiiiii F BBB CCCCCC A AAAAA General Operations *UN*Conditional Register to Register |
| 720 | // 00100 bbb 01 iiiiii F BBB UUUUUU A AAAAA General Operations *UN*Conditional Register (Unsigned 6-bit IMM) |
| 721 | // 00100 bbb 10 iiiiii F BBB ssssss S SSSSS General Operations *UN*Conditional Register (Signed 12-bit IMM) |
| 722 | |
| 723 | // 00100 bbb 11 iiiiii F BBB CCCCCC 0 QQQQQ General Operations Conditional Register |
| 724 | // 00100 bbb 11 iiiiii F BBB UUUUUU 1 QQQQQ General Operations Conditional Register (Unsigned 6-bit IMM) |
| 725 | UINT8 subinstr = (op & 0x003f0000) >> 16; |
| 726 | op &= ~0x003f0000; |
| 727 | |
| 728 | switch (subinstr) |
| 729 | { |
| 730 | case 0x00: size = arcompact_handle04_00_dasm(DASM_PARAMS); break; // ADD |
| 731 | case 0x01: size = arcompact_handle04_01_dasm(DASM_PARAMS); break; // ADC |
| 732 | case 0x02: size = arcompact_handle04_02_dasm(DASM_PARAMS); break; // SUB |
| 733 | case 0x03: size = arcompact_handle04_03_dasm(DASM_PARAMS); break; // SBC |
| 734 | case 0x04: size = arcompact_handle04_04_dasm(DASM_PARAMS); break; // AND |
| 735 | case 0x05: size = arcompact_handle04_05_dasm(DASM_PARAMS); break; // OR |
| 736 | case 0x06: size = arcompact_handle04_06_dasm(DASM_PARAMS); break; // BIC |
| 737 | case 0x07: size = arcompact_handle04_07_dasm(DASM_PARAMS); break; // XOR |
| 738 | case 0x08: size = arcompact_handle04_08_dasm(DASM_PARAMS); break; // MAX |
| 739 | case 0x09: size = arcompact_handle04_09_dasm(DASM_PARAMS); break; // MIN |
| 740 | case 0x0a: size = arcompact_handle04_0a_dasm(DASM_PARAMS); break; // MOV |
| 741 | case 0x0b: size = arcompact_handle04_0b_dasm(DASM_PARAMS); break; // TST |
| 742 | case 0x0c: size = arcompact_handle04_0c_dasm(DASM_PARAMS); break; // CMP |
| 743 | case 0x0d: size = arcompact_handle04_0d_dasm(DASM_PARAMS); break; // RCMP |
| 744 | case 0x0e: size = arcompact_handle04_0e_dasm(DASM_PARAMS); break; // RSUB |
| 745 | case 0x0f: size = arcompact_handle04_0f_dasm(DASM_PARAMS); break; // BSET |
| 746 | case 0x10: size = arcompact_handle04_10_dasm(DASM_PARAMS); break; // BCLR |
| 747 | case 0x11: size = arcompact_handle04_11_dasm(DASM_PARAMS); break; // BTST |
| 748 | case 0x12: size = arcompact_handle04_12_dasm(DASM_PARAMS); break; // BXOR |
| 749 | case 0x13: size = arcompact_handle04_13_dasm(DASM_PARAMS); break; // BMSK |
| 750 | case 0x14: size = arcompact_handle04_14_dasm(DASM_PARAMS); break; // ADD1 |
| 751 | case 0x15: size = arcompact_handle04_15_dasm(DASM_PARAMS); break; // ADD2 |
| 752 | case 0x16: size = arcompact_handle04_16_dasm(DASM_PARAMS); break; // ADD3 |
| 753 | case 0x17: size = arcompact_handle04_17_dasm(DASM_PARAMS); break; // SUB1 |
| 754 | case 0x18: size = arcompact_handle04_18_dasm(DASM_PARAMS); break; // SUB2 |
| 755 | case 0x19: size = arcompact_handle04_19_dasm(DASM_PARAMS); break; // SUB3 |
| 756 | case 0x1a: size = arcompact_handle04_1a_dasm(DASM_PARAMS); break; // MPY * |
| 757 | case 0x1b: size = arcompact_handle04_1b_dasm(DASM_PARAMS); break; // MPYH * |
| 758 | case 0x1c: size = arcompact_handle04_1c_dasm(DASM_PARAMS); break; // MPYHU * |
| 759 | case 0x1d: size = arcompact_handle04_1d_dasm(DASM_PARAMS); break; // MPYU * |
| 760 | case 0x1e: size = arcompact_handle04_1e_dasm(DASM_PARAMS); break; // illegal |
| 761 | case 0x1f: size = arcompact_handle04_1f_dasm(DASM_PARAMS); break; // illegal |
| 762 | case 0x20: size = arcompact_handle04_20_dasm(DASM_PARAMS); break; // Jcc |
| 763 | case 0x21: size = arcompact_handle04_21_dasm(DASM_PARAMS); break; // Jcc.D |
| 764 | case 0x22: size = arcompact_handle04_22_dasm(DASM_PARAMS); break; // JLcc |
| 765 | case 0x23: size = arcompact_handle04_23_dasm(DASM_PARAMS); break; // JLcc.D |
| 766 | case 0x24: size = arcompact_handle04_24_dasm(DASM_PARAMS); break; // illegal |
| 767 | case 0x25: size = arcompact_handle04_25_dasm(DASM_PARAMS); break; // illegal |
| 768 | case 0x26: size = arcompact_handle04_26_dasm(DASM_PARAMS); break; // illegal |
| 769 | case 0x27: size = arcompact_handle04_27_dasm(DASM_PARAMS); break; // illegal |
| 770 | case 0x28: size = arcompact_handle04_28_dasm(DASM_PARAMS); break; // LPcc |
| 771 | case 0x29: size = arcompact_handle04_29_dasm(DASM_PARAMS); break; // FLAG |
| 772 | case 0x2a: size = arcompact_handle04_2a_dasm(DASM_PARAMS); break; // LR |
| 773 | case 0x2b: size = arcompact_handle04_2b_dasm(DASM_PARAMS); break; // SR |
| 774 | case 0x2c: size = arcompact_handle04_2c_dasm(DASM_PARAMS); break; // illegal |
| 775 | case 0x2d: size = arcompact_handle04_2d_dasm(DASM_PARAMS); break; // illegal |
| 776 | case 0x2e: size = arcompact_handle04_2e_dasm(DASM_PARAMS); break; // illegal |
| 777 | case 0x2f: size = arcompact_handle04_2f_dasm(DASM_PARAMS); break; // Sub Opcode |
| 778 | case 0x30: size = arcompact_handle04_30_dasm(DASM_PARAMS); break; // LD r-r |
| 779 | case 0x31: size = arcompact_handle04_31_dasm(DASM_PARAMS); break; // LD r-r |
| 780 | case 0x32: size = arcompact_handle04_32_dasm(DASM_PARAMS); break; // LD r-r |
| 781 | case 0x33: size = arcompact_handle04_33_dasm(DASM_PARAMS); break; // LD r-r |
| 782 | case 0x34: size = arcompact_handle04_34_dasm(DASM_PARAMS); break; // LD r-r |
| 783 | case 0x35: size = arcompact_handle04_35_dasm(DASM_PARAMS); break; // LD r-r |
| 784 | case 0x36: size = arcompact_handle04_36_dasm(DASM_PARAMS); break; // LD r-r |
| 785 | case 0x37: size = arcompact_handle04_37_dasm(DASM_PARAMS); break; // LD r-r |
| 786 | case 0x38: size = arcompact_handle04_38_dasm(DASM_PARAMS); break; // illegal |
| 787 | case 0x39: size = arcompact_handle04_39_dasm(DASM_PARAMS); break; // illegal |
| 788 | case 0x3a: size = arcompact_handle04_3a_dasm(DASM_PARAMS); break; // illegal |
| 789 | case 0x3b: size = arcompact_handle04_3b_dasm(DASM_PARAMS); break; // illegal |
| 790 | case 0x3c: size = arcompact_handle04_3c_dasm(DASM_PARAMS); break; // illegal |
| 791 | case 0x3d: size = arcompact_handle04_3d_dasm(DASM_PARAMS); break; // illegal |
| 792 | case 0x3e: size = arcompact_handle04_3e_dasm(DASM_PARAMS); break; // illegal |
| 793 | case 0x3f: size = arcompact_handle04_3f_dasm(DASM_PARAMS); break; // illegal |
| 794 | } |
| 795 | |
| 796 | return size; |
| 797 | } |
| 798 | |
| 799 | int arcompact_handle04_00_dasm(DASM_OPS_32) { print("ADD (%08x)", op); return 4;} |
| 800 | int arcompact_handle04_01_dasm(DASM_OPS_32) { print("ADC (%08x)", op); return 4;} |
| 801 | int arcompact_handle04_02_dasm(DASM_OPS_32) { print("SUB (%08x)", op); return 4;} |
| 802 | int arcompact_handle04_03_dasm(DASM_OPS_32) { print("SBC (%08x)", op); return 4;} |
| 803 | int arcompact_handle04_04_dasm(DASM_OPS_32) { print("AND (%08x)", op); return 4;} |
| 804 | int arcompact_handle04_05_dasm(DASM_OPS_32) { print("OR (%08x)", op); return 4;} |
| 805 | int arcompact_handle04_06_dasm(DASM_OPS_32) { print("BIC (%08x)", op); return 4;} |
| 806 | int arcompact_handle04_07_dasm(DASM_OPS_32) { print("XOR (%08x)", op); return 4;} |
| 807 | int arcompact_handle04_08_dasm(DASM_OPS_32) { print("MAX (%08x)", op); return 4;} |
| 808 | int arcompact_handle04_09_dasm(DASM_OPS_32) { print("MIN (%08x)", op); return 4;} |
| 809 | int arcompact_handle04_0a_dasm(DASM_OPS_32) { print("MOV (%08x)", op); return 4;} |
| 810 | int arcompact_handle04_0b_dasm(DASM_OPS_32) { print("TST (%08x)", op); return 4;} |
| 811 | int arcompact_handle04_0c_dasm(DASM_OPS_32) { print("CMP (%08x)", op); return 4;} |
| 812 | int arcompact_handle04_0d_dasm(DASM_OPS_32) { print("RCMP (%08x)", op); return 4;} |
| 813 | int arcompact_handle04_0e_dasm(DASM_OPS_32) { print("RSUB (%08x)", op); return 4;} |
| 814 | int arcompact_handle04_0f_dasm(DASM_OPS_32) { print("BSET (%08x)", op); return 4;} |
| 815 | int arcompact_handle04_10_dasm(DASM_OPS_32) { print("BCLR (%08x)", op); return 4;} |
| 816 | int arcompact_handle04_11_dasm(DASM_OPS_32) { print("BTST (%08x)", op); return 4;} |
| 817 | int arcompact_handle04_12_dasm(DASM_OPS_32) { print("BXOR (%08x)", op); return 4;} |
| 818 | int arcompact_handle04_13_dasm(DASM_OPS_32) { print("BMSK (%08x)", op); return 4;} |
| 819 | int arcompact_handle04_14_dasm(DASM_OPS_32) { print("ADD1 (%08x)", op); return 4;} |
| 820 | int arcompact_handle04_15_dasm(DASM_OPS_32) { print("ADD2 (%08x)", op); return 4;} |
| 821 | int arcompact_handle04_16_dasm(DASM_OPS_32) { print("ADD3 (%08x)", op); return 4;} |
| 822 | int arcompact_handle04_17_dasm(DASM_OPS_32) { print("SUB1 (%08x)", op); return 4;} |
| 823 | int arcompact_handle04_18_dasm(DASM_OPS_32) { print("SUB2 (%08x)", op); return 4;} |
| 824 | int arcompact_handle04_19_dasm(DASM_OPS_32) { print("SUB3 (%08x)", op); return 4;} |
| 825 | int arcompact_handle04_1a_dasm(DASM_OPS_32) { print("MPY (%08x)", op); return 4;} // * |
| 826 | int arcompact_handle04_1b_dasm(DASM_OPS_32) { print("MPYH (%08x)", op); return 4;} // * |
| 827 | int arcompact_handle04_1c_dasm(DASM_OPS_32) { print("MPYHU (%08x)", op); return 4;} // * |
| 828 | int arcompact_handle04_1d_dasm(DASM_OPS_32) { print("MPYU (%08x)", op); return 4;} // * |
| 829 | int arcompact_handle04_1e_dasm(DASM_OPS_32) { print("<illegal 0x04_1e> (%08x)", op); return 4;} |
| 830 | int arcompact_handle04_1f_dasm(DASM_OPS_32) { print("<illegal 0x04_1f> (%08x)", op); return 4;} |
| 831 | |
| 832 | |
| 833 | |
| 834 | int arcompact_handle04_20_dasm(DASM_OPS_32) |
| 835 | { |
| 836 | // todo, other bits (in none long immediate mode at least) |
| 837 | |
| 838 | int size = 4; |
| 839 | int C = (op & 0x00000fc0) >> 6; |
| 840 | UINT8 condition = op & 0x0000001f; |
| 841 | |
| 842 | op &= ~0x00000fc0; |
| 843 | |
| 844 | if (C == LIMM_REG) |
| 845 | { |
| 846 | UINT32 limm; |
| 847 | GET_LIMM_32; |
| 848 | size = 8; |
| 849 | |
| 850 | print("J(%s) %08x (%08x)", conditions[condition], limm, op); |
| 851 | } |
| 852 | else |
| 853 | { |
| 854 | print("J(%s) (r%d) (%08x)", conditions[condition], C, op); |
| 855 | } |
| 856 | |
| 857 | return size; |
| 858 | } |
| 859 | |
| 860 | |
| 861 | |
| 862 | int arcompact_handle04_21_dasm(DASM_OPS_32) { print("Jcc.D (%08x)", op); return 4;} |
| 863 | int arcompact_handle04_22_dasm(DASM_OPS_32) { print("JLcc (%08x)", op); return 4;} |
| 864 | int arcompact_handle04_23_dasm(DASM_OPS_32) { print("JLcc.D (%08x)", op); return 4;} |
| 865 | int arcompact_handle04_24_dasm(DASM_OPS_32) { print("<illegal 0x04_24> (%08x)", op); return 4;} |
| 866 | int arcompact_handle04_25_dasm(DASM_OPS_32) { print("<illegal 0x04_25> (%08x)", op); return 4;} |
| 867 | int arcompact_handle04_26_dasm(DASM_OPS_32) { print("<illegal 0x04_26> (%08x)", op); return 4;} |
| 868 | int arcompact_handle04_27_dasm(DASM_OPS_32) { print("<illegal 0x04_27> (%08x)", op); return 4;} |
| 869 | int arcompact_handle04_28_dasm(DASM_OPS_32) { print("LPcc (%08x)", op); return 4;} |
| 870 | int arcompact_handle04_29_dasm(DASM_OPS_32) { print("FLAG (%08x)", op); return 4;} |
| 871 | int arcompact_handle04_2a_dasm(DASM_OPS_32) { print("LR (%08x)", op); return 4;} |
| 872 | int arcompact_handle04_2b_dasm(DASM_OPS_32) { print("SR (%08x)", op); return 4;} |
| 873 | int arcompact_handle04_2c_dasm(DASM_OPS_32) { print("<illegal 0x04_2c> (%08x)", op); return 4;} |
| 874 | int arcompact_handle04_2d_dasm(DASM_OPS_32) { print("<illegal 0x04_2d> (%08x)", op); return 4;} |
| 875 | int arcompact_handle04_2e_dasm(DASM_OPS_32) { print("<illegal 0x04_2e> (%08x)", op); return 4;} |
| 876 | |
| 877 | int arcompact_handle04_2f_dasm(DASM_OPS_32) |
| 878 | { |
| 879 | int size = 4; |
| 880 | UINT8 subinstr2 = (op & 0x0000003f) >> 0; |
| 881 | op &= ~0x0000003f; |
| 882 | |
| 883 | switch (subinstr2) |
| 884 | { |
| 885 | case 0x00: size = arcompact_handle04_2f_00_dasm(DASM_PARAMS); break; // ASL |
| 886 | case 0x01: size = arcompact_handle04_2f_01_dasm(DASM_PARAMS); break; // ASR |
| 887 | case 0x02: size = arcompact_handle04_2f_02_dasm(DASM_PARAMS); break; // LSR |
| 888 | case 0x03: size = arcompact_handle04_2f_03_dasm(DASM_PARAMS); break; // ROR |
| 889 | case 0x04: size = arcompact_handle04_2f_04_dasm(DASM_PARAMS); break; // RCC |
| 890 | case 0x05: size = arcompact_handle04_2f_05_dasm(DASM_PARAMS); break; // SEXB |
| 891 | case 0x06: size = arcompact_handle04_2f_06_dasm(DASM_PARAMS); break; // SEXW |
| 892 | case 0x07: size = arcompact_handle04_2f_07_dasm(DASM_PARAMS); break; // EXTB |
| 893 | case 0x08: size = arcompact_handle04_2f_08_dasm(DASM_PARAMS); break; // EXTW |
| 894 | case 0x09: size = arcompact_handle04_2f_09_dasm(DASM_PARAMS); break; // ABS |
| 895 | case 0x0a: size = arcompact_handle04_2f_0a_dasm(DASM_PARAMS); break; // NOT |
| 896 | case 0x0b: size = arcompact_handle04_2f_0b_dasm(DASM_PARAMS); break; // RLC |
| 897 | case 0x0c: size = arcompact_handle04_2f_0c_dasm(DASM_PARAMS); break; // EX |
| 898 | case 0x0d: size = arcompact_handle04_2f_0d_dasm(DASM_PARAMS); break; // illegal |
| 899 | case 0x0e: size = arcompact_handle04_2f_0e_dasm(DASM_PARAMS); break; // illegal |
| 900 | case 0x0f: size = arcompact_handle04_2f_0f_dasm(DASM_PARAMS); break; // illegal |
| 901 | case 0x10: size = arcompact_handle04_2f_10_dasm(DASM_PARAMS); break; // illegal |
| 902 | case 0x11: size = arcompact_handle04_2f_11_dasm(DASM_PARAMS); break; // illegal |
| 903 | case 0x12: size = arcompact_handle04_2f_12_dasm(DASM_PARAMS); break; // illegal |
| 904 | case 0x13: size = arcompact_handle04_2f_13_dasm(DASM_PARAMS); break; // illegal |
| 905 | case 0x14: size = arcompact_handle04_2f_14_dasm(DASM_PARAMS); break; // illegal |
| 906 | case 0x15: size = arcompact_handle04_2f_15_dasm(DASM_PARAMS); break; // illegal |
| 907 | case 0x16: size = arcompact_handle04_2f_16_dasm(DASM_PARAMS); break; // illegal |
| 908 | case 0x17: size = arcompact_handle04_2f_17_dasm(DASM_PARAMS); break; // illegal |
| 909 | case 0x18: size = arcompact_handle04_2f_18_dasm(DASM_PARAMS); break; // illegal |
| 910 | case 0x19: size = arcompact_handle04_2f_19_dasm(DASM_PARAMS); break; // illegal |
| 911 | case 0x1a: size = arcompact_handle04_2f_1a_dasm(DASM_PARAMS); break; // illegal |
| 912 | case 0x1b: size = arcompact_handle04_2f_1b_dasm(DASM_PARAMS); break; // illegal |
| 913 | case 0x1c: size = arcompact_handle04_2f_1c_dasm(DASM_PARAMS); break; // illegal |
| 914 | case 0x1d: size = arcompact_handle04_2f_1d_dasm(DASM_PARAMS); break; // illegal |
| 915 | case 0x1e: size = arcompact_handle04_2f_1e_dasm(DASM_PARAMS); break; // illegal |
| 916 | case 0x1f: size = arcompact_handle04_2f_1f_dasm(DASM_PARAMS); break; // illegal |
| 917 | case 0x20: size = arcompact_handle04_2f_20_dasm(DASM_PARAMS); break; // illegal |
| 918 | case 0x21: size = arcompact_handle04_2f_21_dasm(DASM_PARAMS); break; // illegal |
| 919 | case 0x22: size = arcompact_handle04_2f_22_dasm(DASM_PARAMS); break; // illegal |
| 920 | case 0x23: size = arcompact_handle04_2f_23_dasm(DASM_PARAMS); break; // illegal |
| 921 | case 0x24: size = arcompact_handle04_2f_24_dasm(DASM_PARAMS); break; // illegal |
| 922 | case 0x25: size = arcompact_handle04_2f_25_dasm(DASM_PARAMS); break; // illegal |
| 923 | case 0x26: size = arcompact_handle04_2f_26_dasm(DASM_PARAMS); break; // illegal |
| 924 | case 0x27: size = arcompact_handle04_2f_27_dasm(DASM_PARAMS); break; // illegal |
| 925 | case 0x28: size = arcompact_handle04_2f_28_dasm(DASM_PARAMS); break; // illegal |
| 926 | case 0x29: size = arcompact_handle04_2f_29_dasm(DASM_PARAMS); break; // illegal |
| 927 | case 0x2a: size = arcompact_handle04_2f_2a_dasm(DASM_PARAMS); break; // illegal |
| 928 | case 0x2b: size = arcompact_handle04_2f_2b_dasm(DASM_PARAMS); break; // illegal |
| 929 | case 0x2c: size = arcompact_handle04_2f_2c_dasm(DASM_PARAMS); break; // illegal |
| 930 | case 0x2d: size = arcompact_handle04_2f_2d_dasm(DASM_PARAMS); break; // illegal |
| 931 | case 0x2e: size = arcompact_handle04_2f_2e_dasm(DASM_PARAMS); break; // illegal |
| 932 | case 0x2f: size = arcompact_handle04_2f_2f_dasm(DASM_PARAMS); break; // illegal |
| 933 | case 0x30: size = arcompact_handle04_2f_30_dasm(DASM_PARAMS); break; // illegal |
| 934 | case 0x31: size = arcompact_handle04_2f_31_dasm(DASM_PARAMS); break; // illegal |
| 935 | case 0x32: size = arcompact_handle04_2f_32_dasm(DASM_PARAMS); break; // illegal |
| 936 | case 0x33: size = arcompact_handle04_2f_33_dasm(DASM_PARAMS); break; // illegal |
| 937 | case 0x34: size = arcompact_handle04_2f_34_dasm(DASM_PARAMS); break; // illegal |
| 938 | case 0x35: size = arcompact_handle04_2f_35_dasm(DASM_PARAMS); break; // illegal |
| 939 | case 0x36: size = arcompact_handle04_2f_36_dasm(DASM_PARAMS); break; // illegal |
| 940 | case 0x37: size = arcompact_handle04_2f_37_dasm(DASM_PARAMS); break; // illegal |
| 941 | case 0x38: size = arcompact_handle04_2f_38_dasm(DASM_PARAMS); break; // illegal |
| 942 | case 0x39: size = arcompact_handle04_2f_39_dasm(DASM_PARAMS); break; // illegal |
| 943 | case 0x3a: size = arcompact_handle04_2f_3a_dasm(DASM_PARAMS); break; // illegal |
| 944 | case 0x3b: size = arcompact_handle04_2f_3b_dasm(DASM_PARAMS); break; // illegal |
| 945 | case 0x3c: size = arcompact_handle04_2f_3c_dasm(DASM_PARAMS); break; // illegal |
| 946 | case 0x3d: size = arcompact_handle04_2f_3d_dasm(DASM_PARAMS); break; // illegal |
| 947 | case 0x3e: size = arcompact_handle04_2f_3e_dasm(DASM_PARAMS); break; // illegal |
| 948 | case 0x3f: size = arcompact_handle04_2f_3f_dasm(DASM_PARAMS); break; // ZOPs (Zero Operand Opcodes) |
| 949 | } |
| 950 | |
| 951 | return size; |
| 952 | } |
| 953 | |
| 954 | |
| 955 | int arcompact_handle04_2f_00_dasm(DASM_OPS_32) { print("ASL (%08x)", op); return 4;} // ASL |
| 956 | int arcompact_handle04_2f_01_dasm(DASM_OPS_32) { print("ASR (%08x)", op); return 4;} // ASR |
| 957 | int arcompact_handle04_2f_02_dasm(DASM_OPS_32) { print("LSR (%08x)", op); return 4;} // LSR |
| 958 | int arcompact_handle04_2f_03_dasm(DASM_OPS_32) { print("ROR (%08x)", op); return 4;} // ROR |
| 959 | int arcompact_handle04_2f_04_dasm(DASM_OPS_32) { print("RCC (%08x)", op); return 4;} // RCC |
| 960 | int arcompact_handle04_2f_05_dasm(DASM_OPS_32) { print("SEXB (%08x)", op); return 4;} // SEXB |
| 961 | int arcompact_handle04_2f_06_dasm(DASM_OPS_32) { print("SEXW (%08x)", op); return 4;} // SEXW |
| 962 | int arcompact_handle04_2f_07_dasm(DASM_OPS_32) { print("EXTB (%08x)", op); return 4;} // EXTB |
| 963 | int arcompact_handle04_2f_08_dasm(DASM_OPS_32) { print("EXTW (%08x)", op); return 4;} // EXTW |
| 964 | int arcompact_handle04_2f_09_dasm(DASM_OPS_32) { print("ABS (%08x)", op); return 4;} // ABS |
| 965 | int arcompact_handle04_2f_0a_dasm(DASM_OPS_32) { print("NOT (%08x)", op); return 4;} // NOT |
| 966 | int arcompact_handle04_2f_0b_dasm(DASM_OPS_32) { print("RLC (%08x)", op); return 4;} // RLC |
| 967 | int arcompact_handle04_2f_0c_dasm(DASM_OPS_32) { print("EX (%08x)", op); return 4;} // EX |
| 968 | int arcompact_handle04_2f_0d_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_0d> (%08x)", op); return 4;} |
| 969 | int arcompact_handle04_2f_0e_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_0e> (%08x)", op); return 4;} |
| 970 | int arcompact_handle04_2f_0f_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_0f> (%08x)", op); return 4;} |
| 971 | int arcompact_handle04_2f_10_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_10> (%08x)", op); return 4;} |
| 972 | int arcompact_handle04_2f_11_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_11> (%08x)", op); return 4;} |
| 973 | int arcompact_handle04_2f_12_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_12> (%08x)", op); return 4;} |
| 974 | int arcompact_handle04_2f_13_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_13> (%08x)", op); return 4;} |
| 975 | int arcompact_handle04_2f_14_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_14> (%08x)", op); return 4;} |
| 976 | int arcompact_handle04_2f_15_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_15> (%08x)", op); return 4;} |
| 977 | int arcompact_handle04_2f_16_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_16> (%08x)", op); return 4;} |
| 978 | int arcompact_handle04_2f_17_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_17> (%08x)", op); return 4;} |
| 979 | int arcompact_handle04_2f_18_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_18> (%08x)", op); return 4;} |
| 980 | int arcompact_handle04_2f_19_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_19> (%08x)", op); return 4;} |
| 981 | int arcompact_handle04_2f_1a_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_1a> (%08x)", op); return 4;} |
| 982 | int arcompact_handle04_2f_1b_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_1b> (%08x)", op); return 4;} |
| 983 | int arcompact_handle04_2f_1c_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_1c> (%08x)", op); return 4;} |
| 984 | int arcompact_handle04_2f_1d_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_1d> (%08x)", op); return 4;} |
| 985 | int arcompact_handle04_2f_1e_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_1e> (%08x)", op); return 4;} |
| 986 | int arcompact_handle04_2f_1f_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_1f> (%08x)", op); return 4;} |
| 987 | int arcompact_handle04_2f_20_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_20> (%08x)", op); return 4;} |
| 988 | int arcompact_handle04_2f_21_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_21> (%08x)", op); return 4;} |
| 989 | int arcompact_handle04_2f_22_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_22> (%08x)", op); return 4;} |
| 990 | int arcompact_handle04_2f_23_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_23> (%08x)", op); return 4;} |
| 991 | int arcompact_handle04_2f_24_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_24> (%08x)", op); return 4;} |
| 992 | int arcompact_handle04_2f_25_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_25> (%08x)", op); return 4;} |
| 993 | int arcompact_handle04_2f_26_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_26> (%08x)", op); return 4;} |
| 994 | int arcompact_handle04_2f_27_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_27> (%08x)", op); return 4;} |
| 995 | int arcompact_handle04_2f_28_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_28> (%08x)", op); return 4;} |
| 996 | int arcompact_handle04_2f_29_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_29> (%08x)", op); return 4;} |
| 997 | int arcompact_handle04_2f_2a_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_2a> (%08x)", op); return 4;} |
| 998 | int arcompact_handle04_2f_2b_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_2b> (%08x)", op); return 4;} |
| 999 | int arcompact_handle04_2f_2c_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_2c> (%08x)", op); return 4;} |
| 1000 | int arcompact_handle04_2f_2d_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_2d> (%08x)", op); return 4;} |
| 1001 | int arcompact_handle04_2f_2e_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_2e> (%08x)", op); return 4;} |
| 1002 | int arcompact_handle04_2f_2f_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_2f> (%08x)", op); return 4;} |
| 1003 | int arcompact_handle04_2f_30_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_30> (%08x)", op); return 4;} |
| 1004 | int arcompact_handle04_2f_31_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_31> (%08x)", op); return 4;} |
| 1005 | int arcompact_handle04_2f_32_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_32> (%08x)", op); return 4;} |
| 1006 | int arcompact_handle04_2f_33_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_33> (%08x)", op); return 4;} |
| 1007 | int arcompact_handle04_2f_34_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_34> (%08x)", op); return 4;} |
| 1008 | int arcompact_handle04_2f_35_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_35> (%08x)", op); return 4;} |
| 1009 | int arcompact_handle04_2f_36_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_36> (%08x)", op); return 4;} |
| 1010 | int arcompact_handle04_2f_37_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_37> (%08x)", op); return 4;} |
| 1011 | int arcompact_handle04_2f_38_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_38> (%08x)", op); return 4;} |
| 1012 | int arcompact_handle04_2f_39_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_39> (%08x)", op); return 4;} |
| 1013 | int arcompact_handle04_2f_3a_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3a> (%08x)", op); return 4;} |
| 1014 | int arcompact_handle04_2f_3b_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3b> (%08x)", op); return 4;} |
| 1015 | int arcompact_handle04_2f_3c_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3c> (%08x)", op); return 4;} |
| 1016 | int arcompact_handle04_2f_3d_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3d> (%08x)", op); return 4;} |
| 1017 | int arcompact_handle04_2f_3e_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3e> (%08x)", op); return 4;} |
| 1018 | |
| 1019 | int arcompact_handle04_2f_3f_dasm(DASM_OPS_32) |
| 1020 | { |
| 1021 | int size = 4; |
| 1022 | UINT8 subinstr3 = (op & 0x07000000) >> 24; |
| 1023 | subinstr3 |= ((op & 0x00007000) >> 12) << 3; |
| 1024 | |
| 1025 | op &= ~0x07007000; |
| 1026 | |
| 1027 | switch (subinstr3) |
| 1028 | { |
| 1029 | case 0x00: size = arcompact_handle04_2f_3f_00_dasm(DASM_PARAMS); break; // illegal |
| 1030 | case 0x01: size = arcompact_handle04_2f_3f_01_dasm(DASM_PARAMS); break; // SLEEP |
| 1031 | case 0x02: size = arcompact_handle04_2f_3f_02_dasm(DASM_PARAMS); break; // SWI / TRAP9 |
| 1032 | case 0x03: size = arcompact_handle04_2f_3f_03_dasm(DASM_PARAMS); break; // SYNC |
| 1033 | case 0x04: size = arcompact_handle04_2f_3f_04_dasm(DASM_PARAMS); break; // RTIE |
| 1034 | case 0x05: size = arcompact_handle04_2f_3f_05_dasm(DASM_PARAMS); break; // BRK |
| 1035 | case 0x06: size = arcompact_handle04_2f_3f_06_dasm(DASM_PARAMS); break; // illegal |
| 1036 | case 0x07: size = arcompact_handle04_2f_3f_07_dasm(DASM_PARAMS); break; // illegal |
| 1037 | case 0x08: size = arcompact_handle04_2f_3f_08_dasm(DASM_PARAMS); break; // illegal |
| 1038 | case 0x09: size = arcompact_handle04_2f_3f_09_dasm(DASM_PARAMS); break; // illegal |
| 1039 | case 0x0a: size = arcompact_handle04_2f_3f_0a_dasm(DASM_PARAMS); break; // illegal |
| 1040 | case 0x0b: size = arcompact_handle04_2f_3f_0b_dasm(DASM_PARAMS); break; // illegal |
| 1041 | case 0x0c: size = arcompact_handle04_2f_3f_0c_dasm(DASM_PARAMS); break; // illegal |
| 1042 | case 0x0d: size = arcompact_handle04_2f_3f_0d_dasm(DASM_PARAMS); break; // illegal |
| 1043 | case 0x0e: size = arcompact_handle04_2f_3f_0e_dasm(DASM_PARAMS); break; // illegal |
| 1044 | case 0x0f: size = arcompact_handle04_2f_3f_0f_dasm(DASM_PARAMS); break; // illegal |
| 1045 | case 0x10: size = arcompact_handle04_2f_3f_10_dasm(DASM_PARAMS); break; // illegal |
| 1046 | case 0x11: size = arcompact_handle04_2f_3f_11_dasm(DASM_PARAMS); break; // illegal |
| 1047 | case 0x12: size = arcompact_handle04_2f_3f_12_dasm(DASM_PARAMS); break; // illegal |
| 1048 | case 0x13: size = arcompact_handle04_2f_3f_13_dasm(DASM_PARAMS); break; // illegal |
| 1049 | case 0x14: size = arcompact_handle04_2f_3f_14_dasm(DASM_PARAMS); break; // illegal |
| 1050 | case 0x15: size = arcompact_handle04_2f_3f_15_dasm(DASM_PARAMS); break; // illegal |
| 1051 | case 0x16: size = arcompact_handle04_2f_3f_16_dasm(DASM_PARAMS); break; // illegal |
| 1052 | case 0x17: size = arcompact_handle04_2f_3f_17_dasm(DASM_PARAMS); break; // illegal |
| 1053 | case 0x18: size = arcompact_handle04_2f_3f_18_dasm(DASM_PARAMS); break; // illegal |
| 1054 | case 0x19: size = arcompact_handle04_2f_3f_19_dasm(DASM_PARAMS); break; // illegal |
| 1055 | case 0x1a: size = arcompact_handle04_2f_3f_1a_dasm(DASM_PARAMS); break; // illegal |
| 1056 | case 0x1b: size = arcompact_handle04_2f_3f_1b_dasm(DASM_PARAMS); break; // illegal |
| 1057 | case 0x1c: size = arcompact_handle04_2f_3f_1c_dasm(DASM_PARAMS); break; // illegal |
| 1058 | case 0x1d: size = arcompact_handle04_2f_3f_1d_dasm(DASM_PARAMS); break; // illegal |
| 1059 | case 0x1e: size = arcompact_handle04_2f_3f_1e_dasm(DASM_PARAMS); break; // illegal |
| 1060 | case 0x1f: size = arcompact_handle04_2f_3f_1f_dasm(DASM_PARAMS); break; // illegal |
| 1061 | case 0x20: size = arcompact_handle04_2f_3f_20_dasm(DASM_PARAMS); break; // illegal |
| 1062 | case 0x21: size = arcompact_handle04_2f_3f_21_dasm(DASM_PARAMS); break; // illegal |
| 1063 | case 0x22: size = arcompact_handle04_2f_3f_22_dasm(DASM_PARAMS); break; // illegal |
| 1064 | case 0x23: size = arcompact_handle04_2f_3f_23_dasm(DASM_PARAMS); break; // illegal |
| 1065 | case 0x24: size = arcompact_handle04_2f_3f_24_dasm(DASM_PARAMS); break; // illegal |
| 1066 | case 0x25: size = arcompact_handle04_2f_3f_25_dasm(DASM_PARAMS); break; // illegal |
| 1067 | case 0x26: size = arcompact_handle04_2f_3f_26_dasm(DASM_PARAMS); break; // illegal |
| 1068 | case 0x27: size = arcompact_handle04_2f_3f_27_dasm(DASM_PARAMS); break; // illegal |
| 1069 | case 0x28: size = arcompact_handle04_2f_3f_28_dasm(DASM_PARAMS); break; // illegal |
| 1070 | case 0x29: size = arcompact_handle04_2f_3f_29_dasm(DASM_PARAMS); break; // illegal |
| 1071 | case 0x2a: size = arcompact_handle04_2f_3f_2a_dasm(DASM_PARAMS); break; // illegal |
| 1072 | case 0x2b: size = arcompact_handle04_2f_3f_2b_dasm(DASM_PARAMS); break; // illegal |
| 1073 | case 0x2c: size = arcompact_handle04_2f_3f_2c_dasm(DASM_PARAMS); break; // illegal |
| 1074 | case 0x2d: size = arcompact_handle04_2f_3f_2d_dasm(DASM_PARAMS); break; // illegal |
| 1075 | case 0x2e: size = arcompact_handle04_2f_3f_2e_dasm(DASM_PARAMS); break; // illegal |
| 1076 | case 0x2f: size = arcompact_handle04_2f_3f_2f_dasm(DASM_PARAMS); break; // illegal |
| 1077 | case 0x30: size = arcompact_handle04_2f_3f_30_dasm(DASM_PARAMS); break; // illegal |
| 1078 | case 0x31: size = arcompact_handle04_2f_3f_31_dasm(DASM_PARAMS); break; // illegal |
| 1079 | case 0x32: size = arcompact_handle04_2f_3f_32_dasm(DASM_PARAMS); break; // illegal |
| 1080 | case 0x33: size = arcompact_handle04_2f_3f_33_dasm(DASM_PARAMS); break; // illegal |
| 1081 | case 0x34: size = arcompact_handle04_2f_3f_34_dasm(DASM_PARAMS); break; // illegal |
| 1082 | case 0x35: size = arcompact_handle04_2f_3f_35_dasm(DASM_PARAMS); break; // illegal |
| 1083 | case 0x36: size = arcompact_handle04_2f_3f_36_dasm(DASM_PARAMS); break; // illegal |
| 1084 | case 0x37: size = arcompact_handle04_2f_3f_37_dasm(DASM_PARAMS); break; // illegal |
| 1085 | case 0x38: size = arcompact_handle04_2f_3f_38_dasm(DASM_PARAMS); break; // illegal |
| 1086 | case 0x39: size = arcompact_handle04_2f_3f_39_dasm(DASM_PARAMS); break; // illegal |
| 1087 | case 0x3a: size = arcompact_handle04_2f_3f_3a_dasm(DASM_PARAMS); break; // illegal |
| 1088 | case 0x3b: size = arcompact_handle04_2f_3f_3b_dasm(DASM_PARAMS); break; // illegal |
| 1089 | case 0x3c: size = arcompact_handle04_2f_3f_3c_dasm(DASM_PARAMS); break; // illegal |
| 1090 | case 0x3d: size = arcompact_handle04_2f_3f_3d_dasm(DASM_PARAMS); break; // illegal |
| 1091 | case 0x3e: size = arcompact_handle04_2f_3f_3e_dasm(DASM_PARAMS); break; // illegal |
| 1092 | case 0x3f: size = arcompact_handle04_2f_3f_3f_dasm(DASM_PARAMS); break; // illegal |
| 1093 | } |
| 1094 | |
| 1095 | return size; |
| 1096 | } |
| 1097 | |
| 1098 | int arcompact_handle04_2f_3f_00_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_00> (%08x)", op); return 4;} |
| 1099 | int arcompact_handle04_2f_3f_01_dasm(DASM_OPS_32) { print("SLEEP (%08x)", op); return 4;} |
| 1100 | int arcompact_handle04_2f_3f_02_dasm(DASM_OPS_32) { print("SWI / TRAP0 (%08x)", op); return 4;} |
| 1101 | int arcompact_handle04_2f_3f_03_dasm(DASM_OPS_32) { print("SYNC (%08x)", op); return 4;} |
| 1102 | int arcompact_handle04_2f_3f_04_dasm(DASM_OPS_32) { print("RTIE (%08x)", op); return 4;} |
| 1103 | int arcompact_handle04_2f_3f_05_dasm(DASM_OPS_32) { print("BRK (%08x)", op); return 4;} |
| 1104 | int arcompact_handle04_2f_3f_06_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_06> (%08x)", op); return 4;} |
| 1105 | int arcompact_handle04_2f_3f_07_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_07> (%08x)", op); return 4;} |
| 1106 | int arcompact_handle04_2f_3f_08_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_08> (%08x)", op); return 4;} |
| 1107 | int arcompact_handle04_2f_3f_09_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_09> (%08x)", op); return 4;} |
| 1108 | int arcompact_handle04_2f_3f_0a_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_0a> (%08x)", op); return 4;} |
| 1109 | int arcompact_handle04_2f_3f_0b_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_0b> (%08x)", op); return 4;} |
| 1110 | int arcompact_handle04_2f_3f_0c_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_0c> (%08x)", op); return 4;} |
| 1111 | int arcompact_handle04_2f_3f_0d_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_0d> (%08x)", op); return 4;} |
| 1112 | int arcompact_handle04_2f_3f_0e_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_0e> (%08x)", op); return 4;} |
| 1113 | int arcompact_handle04_2f_3f_0f_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_0f> (%08x)", op); return 4;} |
| 1114 | int arcompact_handle04_2f_3f_10_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_10> (%08x)", op); return 4;} |
| 1115 | int arcompact_handle04_2f_3f_11_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_11> (%08x)", op); return 4;} |
| 1116 | int arcompact_handle04_2f_3f_12_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_12> (%08x)", op); return 4;} |
| 1117 | int arcompact_handle04_2f_3f_13_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_13> (%08x)", op); return 4;} |
| 1118 | int arcompact_handle04_2f_3f_14_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_14> (%08x)", op); return 4;} |
| 1119 | int arcompact_handle04_2f_3f_15_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_15> (%08x)", op); return 4;} |
| 1120 | int arcompact_handle04_2f_3f_16_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_16> (%08x)", op); return 4;} |
| 1121 | int arcompact_handle04_2f_3f_17_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_17> (%08x)", op); return 4;} |
| 1122 | int arcompact_handle04_2f_3f_18_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_18> (%08x)", op); return 4;} |
| 1123 | int arcompact_handle04_2f_3f_19_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_19> (%08x)", op); return 4;} |
| 1124 | int arcompact_handle04_2f_3f_1a_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_1a> (%08x)", op); return 4;} |
| 1125 | int arcompact_handle04_2f_3f_1b_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_1b> (%08x)", op); return 4;} |
| 1126 | int arcompact_handle04_2f_3f_1c_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_1c> (%08x)", op); return 4;} |
| 1127 | int arcompact_handle04_2f_3f_1d_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_1d> (%08x)", op); return 4;} |
| 1128 | int arcompact_handle04_2f_3f_1e_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_1e> (%08x)", op); return 4;} |
| 1129 | int arcompact_handle04_2f_3f_1f_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_1f> (%08x)", op); return 4;} |
| 1130 | int arcompact_handle04_2f_3f_20_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_20> (%08x)", op); return 4;} |
| 1131 | int arcompact_handle04_2f_3f_21_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_21> (%08x)", op); return 4;} |
| 1132 | int arcompact_handle04_2f_3f_22_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_22> (%08x)", op); return 4;} |
| 1133 | int arcompact_handle04_2f_3f_23_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_23> (%08x)", op); return 4;} |
| 1134 | int arcompact_handle04_2f_3f_24_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_24> (%08x)", op); return 4;} |
| 1135 | int arcompact_handle04_2f_3f_25_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_25> (%08x)", op); return 4;} |
| 1136 | int arcompact_handle04_2f_3f_26_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_26> (%08x)", op); return 4;} |
| 1137 | int arcompact_handle04_2f_3f_27_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_27> (%08x)", op); return 4;} |
| 1138 | int arcompact_handle04_2f_3f_28_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_28> (%08x)", op); return 4;} |
| 1139 | int arcompact_handle04_2f_3f_29_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_29> (%08x)", op); return 4;} |
| 1140 | int arcompact_handle04_2f_3f_2a_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_2a> (%08x)", op); return 4;} |
| 1141 | int arcompact_handle04_2f_3f_2b_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_2b> (%08x)", op); return 4;} |
| 1142 | int arcompact_handle04_2f_3f_2c_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_2c> (%08x)", op); return 4;} |
| 1143 | int arcompact_handle04_2f_3f_2d_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_2d> (%08x)", op); return 4;} |
| 1144 | int arcompact_handle04_2f_3f_2e_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_2e> (%08x)", op); return 4;} |
| 1145 | int arcompact_handle04_2f_3f_2f_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_2f> (%08x)", op); return 4;} |
| 1146 | int arcompact_handle04_2f_3f_30_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_30> (%08x)", op); return 4;} |
| 1147 | int arcompact_handle04_2f_3f_31_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_31> (%08x)", op); return 4;} |
| 1148 | int arcompact_handle04_2f_3f_32_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_32> (%08x)", op); return 4;} |
| 1149 | int arcompact_handle04_2f_3f_33_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_33> (%08x)", op); return 4;} |
| 1150 | int arcompact_handle04_2f_3f_34_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_34> (%08x)", op); return 4;} |
| 1151 | int arcompact_handle04_2f_3f_35_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_35> (%08x)", op); return 4;} |
| 1152 | int arcompact_handle04_2f_3f_36_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_36> (%08x)", op); return 4;} |
| 1153 | int arcompact_handle04_2f_3f_37_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_37> (%08x)", op); return 4;} |
| 1154 | int arcompact_handle04_2f_3f_38_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_38> (%08x)", op); return 4;} |
| 1155 | int arcompact_handle04_2f_3f_39_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_39> (%08x)", op); return 4;} |
| 1156 | int arcompact_handle04_2f_3f_3a_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_3a> (%08x)", op); return 4;} |
| 1157 | int arcompact_handle04_2f_3f_3b_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_3b> (%08x)", op); return 4;} |
| 1158 | int arcompact_handle04_2f_3f_3c_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_3c> (%08x)", op); return 4;} |
| 1159 | int arcompact_handle04_2f_3f_3d_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_3d> (%08x)", op); return 4;} |
| 1160 | int arcompact_handle04_2f_3f_3e_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_3e> (%08x)", op); return 4;} |
| 1161 | int arcompact_handle04_2f_3f_3f_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_3f> (%08x)", op); return 4;} |
| 1162 | |
| 1163 | |
| 1164 | |
| 1165 | |
| 1166 | |
| 1167 | |
| 1168 | |
| 1169 | |
| 1170 | int arcompact_handle04_30_dasm(DASM_OPS_32) { print("LD r-r (basecase 0x30) (%08x)", op); return 4;} |
| 1171 | int arcompact_handle04_31_dasm(DASM_OPS_32) { print("LD r-r (basecase 0x31) (%08x)", op); return 4;} |
| 1172 | int arcompact_handle04_32_dasm(DASM_OPS_32) { print("LD r-r (basecase 0x32) (%08x)", op); return 4;} |
| 1173 | int arcompact_handle04_33_dasm(DASM_OPS_32) { print("LD r-r (basecase 0x33) (%08x)", op); return 4;} |
| 1174 | int arcompact_handle04_34_dasm(DASM_OPS_32) { print("LD r-r (basecase 0x34) (%08x)", op); return 4;} |
| 1175 | int arcompact_handle04_35_dasm(DASM_OPS_32) { print("LD r-r (basecase 0x35) (%08x)", op); return 4;} |
| 1176 | int arcompact_handle04_36_dasm(DASM_OPS_32) { print("LD r-r (basecase 0x36) (%08x)", op); return 4;} |
| 1177 | int arcompact_handle04_37_dasm(DASM_OPS_32) { print("LD r-r (basecase 0x37) (%08x)", op); return 4;} |
| 1178 | int arcompact_handle04_38_dasm(DASM_OPS_32) { print("<illegal 0x04_38> (%08x)", op); return 4;} |
| 1179 | int arcompact_handle04_39_dasm(DASM_OPS_32) { print("<illegal 0x04_39> (%08x)", op); return 4;} |
| 1180 | int arcompact_handle04_3a_dasm(DASM_OPS_32) { print("<illegal 0x04_3a> (%08x)", op); return 4;} |
| 1181 | int arcompact_handle04_3b_dasm(DASM_OPS_32) { print("<illegal 0x04_3b> (%08x)", op); return 4;} |
| 1182 | int arcompact_handle04_3c_dasm(DASM_OPS_32) { print("<illegal 0x04_3c> (%08x)", op); return 4;} |
| 1183 | int arcompact_handle04_3d_dasm(DASM_OPS_32) { print("<illegal 0x04_3d> (%08x)", op); return 4;} |
| 1184 | int arcompact_handle04_3e_dasm(DASM_OPS_32) { print("<illegal 0x04_3e> (%08x)", op); return 4;} |
| 1185 | int arcompact_handle04_3f_dasm(DASM_OPS_32) { print("<illegal 0x04_3f> (%08x)", op); return 4;} |
| 1186 | |
| 1187 | |
| 1188 | |
| 1189 | |
| 1190 | |
| 1191 | // this is an Extension ALU group, maybe optional on some CPUs? |
| 1192 | int arcompact_handle05_dasm(DASM_OPS_32) |
| 1193 | { |
| 1194 | int size = 4; |
| 1195 | UINT8 subinstr = (op & 0x003f0000) >> 16; |
| 1196 | op &= ~0x003f0000; |
| 1197 | |
| 1198 | switch (subinstr) |
| 1199 | { |
| 1200 | case 0x00: size = arcompact_handle05_00_dasm(DASM_PARAMS); break; // ASL |
| 1201 | case 0x01: size = arcompact_handle05_01_dasm(DASM_PARAMS); break; // LSR |
| 1202 | case 0x02: size = arcompact_handle05_02_dasm(DASM_PARAMS); break; // ASR |
| 1203 | case 0x03: size = arcompact_handle05_03_dasm(DASM_PARAMS); break; // ROR |
| 1204 | case 0x04: size = arcompact_handle05_04_dasm(DASM_PARAMS); break; // MUL64 |
| 1205 | case 0x05: size = arcompact_handle05_05_dasm(DASM_PARAMS); break; // MULU64 |
| 1206 | case 0x06: size = arcompact_handle05_06_dasm(DASM_PARAMS); break; // ADDS |
| 1207 | case 0x07: size = arcompact_handle05_07_dasm(DASM_PARAMS); break; // SUBS |
| 1208 | case 0x08: size = arcompact_handle05_08_dasm(DASM_PARAMS); break; // DIVAW |
| 1209 | case 0x09: size = arcompact_handle05_09_dasm(DASM_PARAMS); break; // illegal |
| 1210 | case 0x0a: size = arcompact_handle05_0a_dasm(DASM_PARAMS); break; // ASLS |
| 1211 | case 0x0b: size = arcompact_handle05_0b_dasm(DASM_PARAMS); break; // ASRS |
| 1212 | case 0x0c: size = arcompact_handle05_0c_dasm(DASM_PARAMS); break; // illegal |
| 1213 | case 0x0d: size = arcompact_handle05_0d_dasm(DASM_PARAMS); break; // illegal |
| 1214 | case 0x0e: size = arcompact_handle05_0e_dasm(DASM_PARAMS); break; // illegal |
| 1215 | case 0x0f: size = arcompact_handle05_0f_dasm(DASM_PARAMS); break; // illegal |
| 1216 | case 0x10: size = arcompact_handle05_10_dasm(DASM_PARAMS); break; // illegal |
| 1217 | case 0x11: size = arcompact_handle05_11_dasm(DASM_PARAMS); break; // illegal |
| 1218 | case 0x12: size = arcompact_handle05_12_dasm(DASM_PARAMS); break; // illegal |
| 1219 | case 0x13: size = arcompact_handle05_13_dasm(DASM_PARAMS); break; // illegal |
| 1220 | case 0x14: size = arcompact_handle05_14_dasm(DASM_PARAMS); break; // illegal |
| 1221 | case 0x15: size = arcompact_handle05_15_dasm(DASM_PARAMS); break; // illegal |
| 1222 | case 0x16: size = arcompact_handle05_16_dasm(DASM_PARAMS); break; // illegal |
| 1223 | case 0x17: size = arcompact_handle05_17_dasm(DASM_PARAMS); break; // illegal |
| 1224 | case 0x18: size = arcompact_handle05_18_dasm(DASM_PARAMS); break; // illegal |
| 1225 | case 0x19: size = arcompact_handle05_19_dasm(DASM_PARAMS); break; // illegal |
| 1226 | case 0x1a: size = arcompact_handle05_1a_dasm(DASM_PARAMS); break; // illegal |
| 1227 | case 0x1b: size = arcompact_handle05_1b_dasm(DASM_PARAMS); break; // illegal |
| 1228 | case 0x1c: size = arcompact_handle05_1c_dasm(DASM_PARAMS); break; // illegal |
| 1229 | case 0x1d: size = arcompact_handle05_1d_dasm(DASM_PARAMS); break; // illegal |
| 1230 | case 0x1e: size = arcompact_handle05_1e_dasm(DASM_PARAMS); break; // illegal |
| 1231 | case 0x1f: size = arcompact_handle05_1f_dasm(DASM_PARAMS); break; // illegal |
| 1232 | case 0x20: size = arcompact_handle05_20_dasm(DASM_PARAMS); break; // illegal |
| 1233 | case 0x21: size = arcompact_handle05_21_dasm(DASM_PARAMS); break; // illegal |
| 1234 | case 0x22: size = arcompact_handle05_22_dasm(DASM_PARAMS); break; // illegal |
| 1235 | case 0x23: size = arcompact_handle05_23_dasm(DASM_PARAMS); break; // illegal |
| 1236 | case 0x24: size = arcompact_handle05_24_dasm(DASM_PARAMS); break; // illegal |
| 1237 | case 0x25: size = arcompact_handle05_25_dasm(DASM_PARAMS); break; // illegal |
| 1238 | case 0x26: size = arcompact_handle05_26_dasm(DASM_PARAMS); break; // illegal |
| 1239 | case 0x27: size = arcompact_handle05_27_dasm(DASM_PARAMS); break; // illegal |
| 1240 | case 0x28: size = arcompact_handle05_28_dasm(DASM_PARAMS); break; // ADDSDW |
| 1241 | case 0x29: size = arcompact_handle05_29_dasm(DASM_PARAMS); break; // SUBSDW |
| 1242 | case 0x2a: size = arcompact_handle05_2a_dasm(DASM_PARAMS); break; // illegal |
| 1243 | case 0x2b: size = arcompact_handle05_2b_dasm(DASM_PARAMS); break; // illegal |
| 1244 | case 0x2c: size = arcompact_handle05_2c_dasm(DASM_PARAMS); break; // illegal |
| 1245 | case 0x2d: size = arcompact_handle05_2d_dasm(DASM_PARAMS); break; // illegal |
| 1246 | case 0x2e: size = arcompact_handle05_2e_dasm(DASM_PARAMS); break; // illegal |
| 1247 | case 0x2f: size = arcompact_handle05_2f_dasm(DASM_PARAMS); break; // SOPs |
| 1248 | case 0x30: size = arcompact_handle05_30_dasm(DASM_PARAMS); break; // illegal |
| 1249 | case 0x31: size = arcompact_handle05_31_dasm(DASM_PARAMS); break; // illegal |
| 1250 | case 0x32: size = arcompact_handle05_32_dasm(DASM_PARAMS); break; // illegal |
| 1251 | case 0x33: size = arcompact_handle05_33_dasm(DASM_PARAMS); break; // illegal |
| 1252 | case 0x34: size = arcompact_handle05_34_dasm(DASM_PARAMS); break; // illegal |
| 1253 | case 0x35: size = arcompact_handle05_35_dasm(DASM_PARAMS); break; // illegal |
| 1254 | case 0x36: size = arcompact_handle05_36_dasm(DASM_PARAMS); break; // illegal |
| 1255 | case 0x37: size = arcompact_handle05_37_dasm(DASM_PARAMS); break; // illegal |
| 1256 | case 0x38: size = arcompact_handle05_38_dasm(DASM_PARAMS); break; // illegal |
| 1257 | case 0x39: size = arcompact_handle05_39_dasm(DASM_PARAMS); break; // illegal |
| 1258 | case 0x3a: size = arcompact_handle05_3a_dasm(DASM_PARAMS); break; // illegal |
| 1259 | case 0x3b: size = arcompact_handle05_3b_dasm(DASM_PARAMS); break; // illegal |
| 1260 | case 0x3c: size = arcompact_handle05_3c_dasm(DASM_PARAMS); break; // illegal |
| 1261 | case 0x3d: size = arcompact_handle05_3d_dasm(DASM_PARAMS); break; // illegal |
| 1262 | case 0x3e: size = arcompact_handle05_3e_dasm(DASM_PARAMS); break; // illegal |
| 1263 | case 0x3f: size = arcompact_handle05_3f_dasm(DASM_PARAMS); break; // illegal |
| 1264 | } |
| 1265 | |
| 1266 | return size; |
| 1267 | } |
| 1268 | |
| 1269 | int arcompact_handle05_00_dasm(DASM_OPS_32) { print("ASL a <- b asl c (%08x)", op); return 4;} |
| 1270 | int arcompact_handle05_01_dasm(DASM_OPS_32) { print("LSR a <- b lsr c (%08x)", op); return 4;} |
| 1271 | int arcompact_handle05_02_dasm(DASM_OPS_32) { print("ASR a <- b asr c (%08x)", op); return 4;} |
| 1272 | int arcompact_handle05_03_dasm(DASM_OPS_32) { print("ROR a <- b ror c (%08x)", op); return 4;} |
| 1273 | int arcompact_handle05_04_dasm(DASM_OPS_32) { print("MUL64 mulres <- b * c (%08x)", op); return 4;} |
| 1274 | int arcompact_handle05_05_dasm(DASM_OPS_32) { print("MULU64 mulres <- b * c (%08x)", op); return 4;} |
| 1275 | int arcompact_handle05_06_dasm(DASM_OPS_32) { print("ADDS a <- sat32 (b + c) (%08x)", op); return 4;} |
| 1276 | int arcompact_handle05_07_dasm(DASM_OPS_32) { print("SUBS a <- sat32 (b + c) (%08x)", op); return 4;} |
| 1277 | int arcompact_handle05_08_dasm(DASM_OPS_32) { print("DIVAW (%08x)", op); return 4;} |
| 1278 | int arcompact_handle05_09_dasm(DASM_OPS_32) { print("<illegal 0x05_09> (%08x)", op); return 4;} |
| 1279 | int arcompact_handle05_0a_dasm(DASM_OPS_32) { print("ASLS a <- sat32 (b << c) (%08x)", op); return 4;} |
| 1280 | int arcompact_handle05_0b_dasm(DASM_OPS_32) { print("ASRS a ,- sat32 (b >> c) (%08x)", op); return 4;} |
| 1281 | int arcompact_handle05_0c_dasm(DASM_OPS_32) { print("<illegal 0x05_0c> (%08x)", op); return 4;} |
| 1282 | int arcompact_handle05_0d_dasm(DASM_OPS_32) { print("<illegal 0x05_0d> (%08x)", op); return 4;} |
| 1283 | int arcompact_handle05_0e_dasm(DASM_OPS_32) { print("<illegal 0x05_0e> (%08x)", op); return 4;} |
| 1284 | int arcompact_handle05_0f_dasm(DASM_OPS_32) { print("<illegal 0x05_0f> (%08x)", op); return 4;} |
| 1285 | int arcompact_handle05_10_dasm(DASM_OPS_32) { print("<illegal 0x05_10> (%08x)", op); return 4;} |
| 1286 | int arcompact_handle05_11_dasm(DASM_OPS_32) { print("<illegal 0x05_11> (%08x)", op); return 4;} |
| 1287 | int arcompact_handle05_12_dasm(DASM_OPS_32) { print("<illegal 0x05_12> (%08x)", op); return 4;} |
| 1288 | int arcompact_handle05_13_dasm(DASM_OPS_32) { print("<illegal 0x05_13> (%08x)", op); return 4;} |
| 1289 | int arcompact_handle05_14_dasm(DASM_OPS_32) { print("<illegal 0x05_14> (%08x)", op); return 4;} |
| 1290 | int arcompact_handle05_15_dasm(DASM_OPS_32) { print("<illegal 0x05_15> (%08x)", op); return 4;} |
| 1291 | int arcompact_handle05_16_dasm(DASM_OPS_32) { print("<illegal 0x05_16> (%08x)", op); return 4;} |
| 1292 | int arcompact_handle05_17_dasm(DASM_OPS_32) { print("<illegal 0x05_17> (%08x)", op); return 4;} |
| 1293 | int arcompact_handle05_18_dasm(DASM_OPS_32) { print("<illegal 0x05_18> (%08x)", op); return 4;} |
| 1294 | int arcompact_handle05_19_dasm(DASM_OPS_32) { print("<illegal 0x05_19> (%08x)", op); return 4;} |
| 1295 | int arcompact_handle05_1a_dasm(DASM_OPS_32) { print("<illegal 0x05_1a> (%08x)", op); return 4;} |
| 1296 | int arcompact_handle05_1b_dasm(DASM_OPS_32) { print("<illegal 0x05_1b> (%08x)", op); return 4;} |
| 1297 | int arcompact_handle05_1c_dasm(DASM_OPS_32) { print("<illegal 0x05_1c> (%08x)", op); return 4;} |
| 1298 | int arcompact_handle05_1d_dasm(DASM_OPS_32) { print("<illegal 0x05_1d> (%08x)", op); return 4;} |
| 1299 | int arcompact_handle05_1e_dasm(DASM_OPS_32) { print("<illegal 0x05_1e> (%08x)", op); return 4;} |
| 1300 | int arcompact_handle05_1f_dasm(DASM_OPS_32) { print("<illegal 0x05_1f> (%08x)", op); return 4;} |
| 1301 | int arcompact_handle05_20_dasm(DASM_OPS_32) { print("<illegal 0x05_20> (%08x)", op); return 4;} |
| 1302 | int arcompact_handle05_21_dasm(DASM_OPS_32) { print("<illegal 0x05_21> (%08x)", op); return 4;} |
| 1303 | int arcompact_handle05_22_dasm(DASM_OPS_32) { print("<illegal 0x05_22> (%08x)", op); return 4;} |
| 1304 | int arcompact_handle05_23_dasm(DASM_OPS_32) { print("<illegal 0x05_23> (%08x)", op); return 4;} |
| 1305 | int arcompact_handle05_24_dasm(DASM_OPS_32) { print("<illegal 0x05_24> (%08x)", op); return 4;} |
| 1306 | int arcompact_handle05_25_dasm(DASM_OPS_32) { print("<illegal 0x05_25> (%08x)", op); return 4;} |
| 1307 | int arcompact_handle05_26_dasm(DASM_OPS_32) { print("<illegal 0x05_26> (%08x)", op); return 4;} |
| 1308 | int arcompact_handle05_27_dasm(DASM_OPS_32) { print("<illegal 0x05_27> (%08x)", op); return 4;} |
| 1309 | int arcompact_handle05_28_dasm(DASM_OPS_32) { print("ADDSDW (%08x)", op); return 4;} |
| 1310 | int arcompact_handle05_29_dasm(DASM_OPS_32) { print("SUBSDW (%08x)", op); return 4;} |
| 1311 | int arcompact_handle05_2a_dasm(DASM_OPS_32) { print("<illegal 0x05_2a> (%08x)", op); return 4;} |
| 1312 | int arcompact_handle05_2b_dasm(DASM_OPS_32) { print("<illegal 0x05_2b> (%08x)", op); return 4;} |
| 1313 | int arcompact_handle05_2c_dasm(DASM_OPS_32) { print("<illegal 0x05_2c> (%08x)", op); return 4;} |
| 1314 | int arcompact_handle05_2d_dasm(DASM_OPS_32) { print("<illegal 0x05_2d> (%08x)", op); return 4;} |
| 1315 | int arcompact_handle05_2e_dasm(DASM_OPS_32) { print("<illegal 0x05_2e> (%08x)", op); return 4;} |
| 1316 | int arcompact_handle05_2f_dasm(DASM_OPS_32) { print("SOP (another table) (%08x)", op); return 4;} |
| 1317 | int arcompact_handle05_30_dasm(DASM_OPS_32) { print("<illegal 0x05_30> (%08x)", op); return 4;} |
| 1318 | int arcompact_handle05_31_dasm(DASM_OPS_32) { print("<illegal 0x05_31> (%08x)", op); return 4;} |
| 1319 | int arcompact_handle05_32_dasm(DASM_OPS_32) { print("<illegal 0x05_32> (%08x)", op); return 4;} |
| 1320 | int arcompact_handle05_33_dasm(DASM_OPS_32) { print("<illegal 0x05_33> (%08x)", op); return 4;} |
| 1321 | int arcompact_handle05_34_dasm(DASM_OPS_32) { print("<illegal 0x05_34> (%08x)", op); return 4;} |
| 1322 | int arcompact_handle05_35_dasm(DASM_OPS_32) { print("<illegal 0x05_35> (%08x)", op); return 4;} |
| 1323 | int arcompact_handle05_36_dasm(DASM_OPS_32) { print("<illegal 0x05_36> (%08x)", op); return 4;} |
| 1324 | int arcompact_handle05_37_dasm(DASM_OPS_32) { print("<illegal 0x05_37> (%08x)", op); return 4;} |
| 1325 | int arcompact_handle05_38_dasm(DASM_OPS_32) { print("<illegal 0x05_38> (%08x)", op); return 4;} |
| 1326 | int arcompact_handle05_39_dasm(DASM_OPS_32) { print("<illegal 0x05_39> (%08x)", op); return 4;} |
| 1327 | int arcompact_handle05_3a_dasm(DASM_OPS_32) { print("<illegal 0x05_3a> (%08x)", op); return 4;} |
| 1328 | int arcompact_handle05_3b_dasm(DASM_OPS_32) { print("<illegal 0x05_3b> (%08x)", op); return 4;} |
| 1329 | int arcompact_handle05_3c_dasm(DASM_OPS_32) { print("<illegal 0x05_3c> (%08x)", op); return 4;} |
| 1330 | int arcompact_handle05_3d_dasm(DASM_OPS_32) { print("<illegal 0x05_3d> (%08x)", op); return 4;} |
| 1331 | int arcompact_handle05_3e_dasm(DASM_OPS_32) { print("<illegal 0x05_3e> (%08x)", op); return 4;} |
| 1332 | int arcompact_handle05_3f_dasm(DASM_OPS_32) { print("<illegal 0x05_3f> (%08x)", op); return 4;} |
| 1333 | |
| 1334 | |
| 1335 | |
| 1336 | int arcompact_handle06_dasm(DASM_OPS_32) |
| 1337 | { |
| 1338 | print("op a,b,c (06 ARC ext) (%08x)", op ); |
| 1339 | return 4; |
| 1340 | } |
| 1341 | |
| 1342 | int arcompact_handle07_dasm(DASM_OPS_32) |
| 1343 | { |
| 1344 | print("op a,b,c (07 User ext) (%08x)", op ); |
| 1345 | return 4; |
| 1346 | } |
| 1347 | |
| 1348 | int arcompact_handle08_dasm(DASM_OPS_32) |
| 1349 | { |
| 1350 | print("op a,b,c (08 User ext) (%08x)", op ); |
| 1351 | return 4; |
| 1352 | } |
| 1353 | |
| 1354 | int arcompact_handle09_dasm(DASM_OPS_32) |
| 1355 | { |
| 1356 | print("op a,b,c (09 Market ext) (%08x)", op ); |
| 1357 | return 4; |
| 1358 | } |
| 1359 | |
| 1360 | int arcompact_handle0a_dasm(DASM_OPS_32) |
| 1361 | { |
| 1362 | print("op a,b,c (0a Market ext) (%08x)", op ); |
| 1363 | return 4; |
| 1364 | } |
| 1365 | |
| 1366 | int arcompact_handle0b_dasm(DASM_OPS_32) |
| 1367 | { |
| 1368 | print("op a,b,c (0b Market ext) (%08x)", op ); |
| 1369 | return 4; |
| 1370 | } |
| 1371 | |
| 1372 | |
| 1373 | |
| 1374 | |
| 1375 | int arcompact_handle0c_dasm(DASM_OPS_16) |
| 1376 | { |
| 1377 | int size = 2; |
| 1378 | UINT8 subinstr = (op & 0x0018) >> 3; |
| 1379 | op &= ~0x0018; |
| 1380 | |
| 1381 | switch (subinstr) |
| 1382 | { |
| 1383 | case 0x00: size = arcompact_handle0c_00_dasm(DASM_PARAMS); break; // LD_S |
| 1384 | case 0x01: size = arcompact_handle0c_01_dasm(DASM_PARAMS); break; // LDB_S |
| 1385 | case 0x02: size = arcompact_handle0c_02_dasm(DASM_PARAMS); break; // LDW_S |
| 1386 | case 0x03: size = arcompact_handle0c_03_dasm(DASM_PARAMS); break; // ADD_S |
| 1387 | } |
| 1388 | return size; |
| 1389 | } |
| 1390 | |
| 1391 | |
| 1392 | int arcompact_handle0c_00_dasm(DASM_OPS_16) |
| 1393 | { |
| 1394 | int size = 2; |
| 1395 | print("LD_S a <- m[b + c].long (%04x)", op); |
| 1396 | return size; |
| 1397 | } |
| 1398 | |
| 1399 | int arcompact_handle0c_01_dasm(DASM_OPS_16) |
| 1400 | { |
| 1401 | int size = 2; |
| 1402 | print("LDB_S a <- m[b + c].byte (%04x)", op); |
| 1403 | return size; |
| 1404 | } |
| 1405 | |
| 1406 | int arcompact_handle0c_02_dasm(DASM_OPS_16) |
| 1407 | { |
| 1408 | int size = 2; |
| 1409 | print("LDW_S a <- m[b + c].word (%04x)", op); |
| 1410 | return size; |
| 1411 | } |
| 1412 | |
| 1413 | int arcompact_handle0c_03_dasm(DASM_OPS_16) |
| 1414 | { |
| 1415 | int size = 2; |
| 1416 | print("ADD_S a <- b + c (%04x)", op); |
| 1417 | return size; |
| 1418 | } |
| 1419 | |
| 1420 | |
| 1421 | int arcompact_handle0d_dasm(DASM_OPS_16) |
| 1422 | { |
| 1423 | int size = 2; |
| 1424 | UINT8 subinstr = (op & 0x0018) >> 3; |
| 1425 | op &= ~0x0018; |
| 1426 | |
| 1427 | switch (subinstr) |
| 1428 | { |
| 1429 | case 0x00: size = arcompact_handle0d_00_dasm(DASM_PARAMS); break; // ADD_S |
| 1430 | case 0x01: size = arcompact_handle0d_01_dasm(DASM_PARAMS); break; // SUB_S |
| 1431 | case 0x02: size = arcompact_handle0d_02_dasm(DASM_PARAMS); break; // ASL_S |
| 1432 | case 0x03: size = arcompact_handle0d_03_dasm(DASM_PARAMS); break; // ASR_S |
| 1433 | } |
| 1434 | return size; |
| 1435 | } |
| 1436 | |
| 1437 | int arcompact_handle0d_00_dasm(DASM_OPS_16) |
| 1438 | { |
| 1439 | int size = 2; |
| 1440 | print("ADD_S c <- b + u3 (%04x)", op); |
| 1441 | return size; |
| 1442 | } |
| 1443 | |
| 1444 | int arcompact_handle0d_01_dasm(DASM_OPS_16) |
| 1445 | { |
| 1446 | int size = 2; |
| 1447 | print("SUB_S c <- b - u3 (%04x)", op); |
| 1448 | return size; |
| 1449 | } |
| 1450 | |
| 1451 | int arcompact_handle0d_02_dasm(DASM_OPS_16) |
| 1452 | { |
| 1453 | int size = 2; |
| 1454 | print("ASL_S c <- b asl u3 (%04x)", op); |
| 1455 | return size; |
| 1456 | } |
| 1457 | |
| 1458 | int arcompact_handle0d_03_dasm(DASM_OPS_16) |
| 1459 | { |
| 1460 | int size = 2; |
| 1461 | print("ASL_S c <- b asr u3 (%04x)", op); |
| 1462 | return size; |
| 1463 | } |
| 1464 | |
| 1465 | |
| 1466 | int arcompact_handle0e_dasm(DASM_OPS_16) |
| 1467 | { |
| 1468 | int size = 2; |
| 1469 | UINT8 subinstr = (op & 0x0018) >> 3; |
| 1470 | op &= ~0x0018; |
| 1471 | |
| 1472 | switch (subinstr) |
| 1473 | { |
| 1474 | case 0x00: size = arcompact_handle0e_00_dasm(DASM_PARAMS); break; // ADD_S |
| 1475 | case 0x01: size = arcompact_handle0e_01_dasm(DASM_PARAMS); break; // MOV_S |
| 1476 | case 0x02: size = arcompact_handle0e_02_dasm(DASM_PARAMS); break; // CMP_S |
| 1477 | case 0x03: size = arcompact_handle0e_03_dasm(DASM_PARAMS); break; // MOV_S |
| 1478 | } |
| 1479 | return size; |
| 1480 | } |
| 1481 | |
| 1482 | |
| 1483 | |
| 1484 | |
| 1485 | #define GROUP_0e_GET_h \ |
| 1486 | h = ((op & 0x0007) << 3); \ |
| 1487 | h |= ((op & 0x00e0) >> 5); \ |
| 1488 | |
| 1489 | // this is as messed up as the rest of the 16-bit alignment in LE mode... |
| 1490 | |
| 1491 | #define GET_LIMM \ |
| 1492 | limm = oprom[4] | (oprom[5] << 8); \ |
| 1493 | limm |= (oprom[2] << 16) | (oprom[3] << 24); \ |
| 1494 | |
| 1495 | |
| 1496 | int arcompact_handle0e_00_dasm(DASM_OPS_16) |
| 1497 | { |
| 1498 | int h; |
| 1499 | int size = 2; |
| 1500 | |
| 1501 | GROUP_0e_GET_h; |
| 1502 | |
| 1503 | if (h == LIMM_REG) |
| 1504 | { |
| 1505 | UINT32 limm; |
| 1506 | GET_LIMM; |
| 1507 | size = 6; |
| 1508 | print("ADD_S b <- b + (%08x) (%04x)", limm, op); |
| 1509 | } |
| 1510 | else |
| 1511 | { |
| 1512 | |
| 1513 | print("ADD_S b <- b + (r%d) (%04x)", h, op); |
| 1514 | } |
| 1515 | |
| 1516 | return size; |
| 1517 | } |
| 1518 | |
| 1519 | int arcompact_handle0e_01_dasm(DASM_OPS_16) |
| 1520 | { |
| 1521 | int h; |
| 1522 | int size = 2; |
| 1523 | GROUP_0e_GET_h; |
| 1524 | |
| 1525 | if (h == LIMM_REG) |
| 1526 | { |
| 1527 | UINT32 limm; |
| 1528 | GET_LIMM; |
| 1529 | size = 6; |
| 1530 | print("MOV_S b <- (%08x) (%04x)", limm, op); |
| 1531 | } |
| 1532 | else |
| 1533 | { |
| 1534 | print("MOV_S b <- (r%d) (%04x)", h, op); |
| 1535 | } |
| 1536 | return size; |
| 1537 | } |
| 1538 | |
| 1539 | int arcompact_handle0e_02_dasm(DASM_OPS_16) |
| 1540 | { |
| 1541 | int h; |
| 1542 | int size = 2; |
| 1543 | GROUP_0e_GET_h; |
| 1544 | |
| 1545 | if (h == LIMM_REG) |
| 1546 | { |
| 1547 | UINT32 limm; |
| 1548 | GET_LIMM; |
| 1549 | size = 6; |
| 1550 | print("CMP_S b - (%08x) (%04x)", limm, op); |
| 1551 | } |
| 1552 | else |
| 1553 | { |
| 1554 | print("CMP_S b - (r%d) (%04x)", h, op); |
| 1555 | } |
| 1556 | return size; |
| 1557 | } |
| 1558 | |
| 1559 | int arcompact_handle0e_03_dasm(DASM_OPS_16) |
| 1560 | { |
| 1561 | int h; |
| 1562 | int size = 2; |
| 1563 | GROUP_0e_GET_h; |
| 1564 | |
| 1565 | if (h == LIMM_REG) |
| 1566 | { |
| 1567 | UINT32 limm; |
| 1568 | GET_LIMM; |
| 1569 | size = 6; |
| 1570 | print("MOV_S (%08x) <- b (%04x)", limm, op); |
| 1571 | } |
| 1572 | else |
| 1573 | { |
| 1574 | print("MOV_S (r%d) <- b (%04x)", h, op); |
| 1575 | } |
| 1576 | |
| 1577 | return size; |
| 1578 | } |
| 1579 | |
| 1580 | |
| 1581 | |
| 1582 | int arcompact_handle0f_dasm(DASM_OPS_16) |
| 1583 | { |
| 1584 | // General Register Instructions (16-bit) |
| 1585 | // 01111 bbb ccc iiiii |
| 1586 | UINT8 subinstr = (op & 0x01f) >> 0; |
| 1587 | //print("%s (%04x)", table0f[subinstr], op & ~0xf81f); |
| 1588 | |
| 1589 | switch (subinstr) |
| 1590 | { |
| 1591 | |
| 1592 | default: |
| 1593 | print("%s (%04x)", table0f[subinstr], op & ~0xf81f); |
| 1594 | break; |
| 1595 | |
| 1596 | case 0x00: |
| 1597 | { |
| 1598 | // General Operations w/ Register |
| 1599 | // 01111 bbb iii 00000 |
| 1600 | UINT8 subinstr2 = (op & 0x00e0) >> 5; |
| 1601 | |
| 1602 | switch (subinstr2) |
| 1603 | { |
| 1604 | default: |
| 1605 | print("%s (%04x)", table0f_00[subinstr2], op & ~0xf8ff); |
| 1606 | return 2; |
| 1607 | |
| 1608 | case 0x7: |
| 1609 | { |
| 1610 | // General Operations w/o Register |
| 1611 | // 01111 iii 111 00000 |
| 1612 | UINT8 subinstr3 = (op & 0x0700) >> 8; |
| 1613 | |
| 1614 | print("%s (%04x)", table0f_00_07[subinstr3], op & ~0xffff); |
| 1615 | |
| 1616 | return 2; |
| 1617 | } |
| 1618 | } |
| 1619 | } |
| 1620 | } |
| 1621 | |
| 1622 | return 2; |
| 1623 | } |
| 1624 | |
| 1625 | int arcompact_handle10_dasm(DASM_OPS_16) |
| 1626 | { |
| 1627 | print("LD_S (%04x)", op); |
| 1628 | return 2; |
| 1629 | } |
| 1630 | |
| 1631 | int arcompact_handle11_dasm(DASM_OPS_16) |
| 1632 | { |
| 1633 | print("LDB_S (%04x)", op); |
| 1634 | return 2; |
| 1635 | } |
| 1636 | |
| 1637 | int arcompact_handle12_dasm(DASM_OPS_16) |
| 1638 | { |
| 1639 | print("LDW_S (%04x)", op); |
| 1640 | return 2; |
| 1641 | } |
| 1642 | |
| 1643 | int arcompact_handle13_dasm(DASM_OPS_16) |
| 1644 | { |
| 1645 | print("LSW_S.X (%04x)", op); |
| 1646 | return 2; |
| 1647 | } |
| 1648 | |
| 1649 | int arcompact_handle14_dasm(DASM_OPS_16) |
| 1650 | { |
| 1651 | print("ST_S (%04x)", op); |
| 1652 | return 2; |
| 1653 | } |
| 1654 | |
| 1655 | int arcompact_handle15_dasm(DASM_OPS_16) |
| 1656 | { |
| 1657 | print("STB_S (%04x)", op); |
| 1658 | return 2; |
| 1659 | } |
| 1660 | |
| 1661 | int arcompact_handle16_dasm(DASM_OPS_16) |
| 1662 | { |
| 1663 | print("STW_S (%04x)", op); |
| 1664 | return 2; |
| 1665 | } |
| 1666 | |
| 1667 | int arcompact_handle17_dasm(DASM_OPS_16) |
| 1668 | { |
| 1669 | int size = 2; |
| 1670 | UINT8 subinstr = (op & 0x00e0) >> 5; |
| 1671 | op &= ~0x00e0; |
| 1672 | |
| 1673 | switch (subinstr) |
| 1674 | { |
| 1675 | case 0x00: size = arcompact_handle17_00_dasm(DASM_PARAMS); break; // ASL_S |
| 1676 | case 0x01: size = arcompact_handle17_01_dasm(DASM_PARAMS); break; // LSR_S |
| 1677 | case 0x02: size = arcompact_handle17_02_dasm(DASM_PARAMS); break; // ASR_S |
| 1678 | case 0x03: size = arcompact_handle17_03_dasm(DASM_PARAMS); break; // SUB_S |
| 1679 | case 0x04: size = arcompact_handle17_04_dasm(DASM_PARAMS); break; // BSET_S |
| 1680 | case 0x05: size = arcompact_handle17_05_dasm(DASM_PARAMS); break; // BCLR_S |
| 1681 | case 0x06: size = arcompact_handle17_06_dasm(DASM_PARAMS); break; // BMSK_S |
| 1682 | case 0x07: size = arcompact_handle17_07_dasm(DASM_PARAMS); break; // BTST_S |
| 1683 | } |
| 1684 | |
| 1685 | return size; |
| 1686 | } |
| 1687 | |
| 1688 | int arcompact_handle17_00_dasm(DASM_OPS_16) |
| 1689 | { |
| 1690 | int size = 2; |
| 1691 | print("ASL_S b <- b asl u5 (%04x)", op); |
| 1692 | return size; |
| 1693 | } |
| 1694 | |
| 1695 | int arcompact_handle17_01_dasm(DASM_OPS_16) |
| 1696 | { |
| 1697 | int size = 2; |
| 1698 | print("LSR_S b <- b lsr u5 (%04x)", op); |
| 1699 | return size; |
| 1700 | } |
| 1701 | |
| 1702 | int arcompact_handle17_02_dasm(DASM_OPS_16) |
| 1703 | { |
| 1704 | int size = 2; |
| 1705 | print("ASR_S b <- b asr u5 (%04x)", op); |
| 1706 | return size; |
| 1707 | } |
| 1708 | |
| 1709 | int arcompact_handle17_03_dasm(DASM_OPS_16) |
| 1710 | { |
| 1711 | int size = 2; |
| 1712 | print("SUB_S b <- b - u5 (%04x)", op); |
| 1713 | return size; |
| 1714 | } |
| 1715 | |
| 1716 | int arcompact_handle17_04_dasm(DASM_OPS_16) |
| 1717 | { |
| 1718 | int size = 2; |
| 1719 | print("BSET_S b <- b | (1 << u5) (%04x)", op); |
| 1720 | return size; |
| 1721 | } |
| 1722 | |
| 1723 | int arcompact_handle17_05_dasm(DASM_OPS_16) |
| 1724 | { |
| 1725 | int size = 2; |
| 1726 | print("BCLR_S b <- b & !(1 << u5) (%04x)", op); |
| 1727 | return size; |
| 1728 | } |
| 1729 | |
| 1730 | int arcompact_handle17_06_dasm(DASM_OPS_16) |
| 1731 | { |
| 1732 | int size = 2; |
| 1733 | print("BMSK_S (%04x)", op); |
| 1734 | return size; |
| 1735 | } |
| 1736 | |
| 1737 | int arcompact_handle17_07_dasm(DASM_OPS_16) |
| 1738 | { |
| 1739 | int size = 2; |
| 1740 | print("BTST_S (%04x)", op); |
| 1741 | return size; |
| 1742 | } |
| 1743 | |
| 1744 | int arcompact_handle18_dasm(DASM_OPS_16) |
| 1745 | { |
| 1746 | int size = 2; |
| 1747 | // Stack Pointer Based Instructions (16-bit) |
| 1748 | // 11000 bbb iii uuuuu |
| 1749 | UINT8 subinstr = (op & 0x00e0) >> 5; |
| 1750 | op &= ~0x00e0; |
| 1751 | |
| 1752 | switch (subinstr) |
| 1753 | { |
| 1754 | case 0x00: size = arcompact_handle18_00_dasm(DASM_PARAMS); break; // LD_S (SP) |
| 1755 | case 0x01: size = arcompact_handle18_01_dasm(DASM_PARAMS); break; // LDB_S (SP) |
| 1756 | case 0x02: size = arcompact_handle18_02_dasm(DASM_PARAMS); break; // ST_S (SP) |
| 1757 | case 0x03: size = arcompact_handle18_03_dasm(DASM_PARAMS); break; // STB_S (SP) |
| 1758 | case 0x04: size = arcompact_handle18_04_dasm(DASM_PARAMS); break; // ADD_S (SP) |
| 1759 | case 0x05: size = arcompact_handle18_05_dasm(DASM_PARAMS); break; // subtable 18_05 |
| 1760 | case 0x06: size = arcompact_handle18_06_dasm(DASM_PARAMS); break; // subtable 18_06 |
| 1761 | case 0x07: size = arcompact_handle18_07_dasm(DASM_PARAMS); break; // subtable 18_07 |
| 1762 | } |
| 1763 | |
| 1764 | return size; |
| 1765 | } |
| 1766 | |
| 1767 | // op bits remaining for 0x18_xx subgroups 0x071f |
| 1768 | |
| 1769 | int arcompact_handle18_00_dasm(DASM_OPS_16) |
| 1770 | { |
| 1771 | print("LD_S (SP) (%04x)", op); |
| 1772 | return 2; |
| 1773 | } |
| 1774 | |
| 1775 | int arcompact_handle18_01_dasm(DASM_OPS_16) |
| 1776 | { |
| 1777 | print("LDB_S (SP) (%04x)", op); |
| 1778 | return 2; |
| 1779 | } |
| 1780 | |
| 1781 | int arcompact_handle18_02_dasm(DASM_OPS_16) |
| 1782 | { |
| 1783 | print("ST_S (SP) (%04x)", op); |
| 1784 | return 2; |
| 1785 | } |
| 1786 | |
| 1787 | int arcompact_handle18_03_dasm(DASM_OPS_16) |
| 1788 | { |
| 1789 | print("STB_S (SP) (%04x)", op); |
| 1790 | return 2; |
| 1791 | } |
| 1792 | |
| 1793 | int arcompact_handle18_04_dasm(DASM_OPS_16) |
| 1794 | { |
| 1795 | print("ADD_S (SP) (%04x)", op); |
| 1796 | return 2; |
| 1797 | } |
| 1798 | |
| 1799 | |
| 1800 | |
| 1801 | |
| 1802 | |
| 1803 | int arcompact_handle18_05_dasm(DASM_OPS_16) |
| 1804 | { |
| 1805 | int size = 2; |
| 1806 | UINT8 subinstr2 = (op & 0x0700) >> 8; |
| 1807 | op &= ~0x001f; |
| 1808 | |
| 1809 | switch (subinstr2) |
| 1810 | { |
| 1811 | case 0x00: size = arcompact_handle18_05_00_dasm(DASM_PARAMS); break; // ADD_S (SP) |
| 1812 | case 0x01: size = arcompact_handle18_05_01_dasm(DASM_PARAMS); break; // SUB_S (SP) |
| 1813 | case 0x02: size = arcompact_handle18_05_02_dasm(DASM_PARAMS); break; // <illegal 0x18_05_02> |
| 1814 | case 0x03: size = arcompact_handle18_05_03_dasm(DASM_PARAMS); break; // <illegal 0x18_05_03> |
| 1815 | case 0x04: size = arcompact_handle18_05_04_dasm(DASM_PARAMS); break; // <illegal 0x18_05_04> |
| 1816 | case 0x05: size = arcompact_handle18_05_05_dasm(DASM_PARAMS); break; // <illegal 0x18_05_05> |
| 1817 | case 0x06: size = arcompact_handle18_05_06_dasm(DASM_PARAMS); break; // <illegal 0x18_05_06> |
| 1818 | case 0x07: size = arcompact_handle18_05_07_dasm(DASM_PARAMS); break; // <illegal 0x18_05_07> |
| 1819 | } |
| 1820 | |
| 1821 | return size; |
| 1822 | } |
| 1823 | // op bits remaining for 0x18_05_xx subgroups 0x001f |
| 1824 | int arcompact_handle18_05_00_dasm(DASM_OPS_16) |
| 1825 | { |
| 1826 | int u = op & 0x001f; |
| 1827 | op &= ~0x001f; // all bits now used |
| 1828 | |
| 1829 | print("ADD_S %02x (SP)", u); |
| 1830 | return 2; |
| 1831 | |
| 1832 | } |
| 1833 | |
| 1834 | int arcompact_handle18_05_01_dasm(DASM_OPS_16) |
| 1835 | { |
| 1836 | int u = op & 0x001f; |
| 1837 | op &= ~0x001f; // all bits now used |
| 1838 | |
| 1839 | print("SUB_S %02x (SP)", u); |
| 1840 | return 2; |
| 1841 | } |
| 1842 | |
| 1843 | |
| 1844 | int arcompact_handle18_05_02_dasm(DASM_OPS_16) { print("<illegal 0x18_05_02> (%04x)", op); return 2;} |
| 1845 | int arcompact_handle18_05_03_dasm(DASM_OPS_16) { print("<illegal 0x18_05_03> (%04x)", op); return 2;} |
| 1846 | int arcompact_handle18_05_04_dasm(DASM_OPS_16) { print("<illegal 0x18_05_04> (%04x)", op); return 2;} |
| 1847 | int arcompact_handle18_05_05_dasm(DASM_OPS_16) { print("<illegal 0x18_05_05> (%04x)", op); return 2;} |
| 1848 | int arcompact_handle18_05_06_dasm(DASM_OPS_16) { print("<illegal 0x18_05_06> (%04x)", op); return 2;} |
| 1849 | int arcompact_handle18_05_07_dasm(DASM_OPS_16) { print("<illegal 0x18_05_07> (%04x)", op); return 2;} |
| 1850 | |
| 1851 | |
| 1852 | int arcompact_handle18_06_dasm(DASM_OPS_16) |
| 1853 | { |
| 1854 | int size = 2; |
| 1855 | UINT8 subinstr2 = (op & 0x001f) >> 0; |
| 1856 | op &= ~0x001f; |
| 1857 | |
| 1858 | switch (subinstr2) |
| 1859 | { |
| 1860 | case 0x00: size = arcompact_handle18_06_00_dasm(DASM_PARAMS); break; // <illegal 0x18_06_00> |
| 1861 | case 0x01: size = arcompact_handle18_06_01_dasm(DASM_PARAMS); break; // POP_S b |
| 1862 | case 0x02: size = arcompact_handle18_06_02_dasm(DASM_PARAMS); break; // <illegal 0x18_06_02> |
| 1863 | case 0x03: size = arcompact_handle18_06_03_dasm(DASM_PARAMS); break; // <illegal 0x18_06_03> |
| 1864 | case 0x04: size = arcompact_handle18_06_04_dasm(DASM_PARAMS); break; // <illegal 0x18_06_04> |
| 1865 | case 0x05: size = arcompact_handle18_06_05_dasm(DASM_PARAMS); break; // <illegal 0x18_06_05> |
| 1866 | case 0x06: size = arcompact_handle18_06_06_dasm(DASM_PARAMS); break; // <illegal 0x18_06_06> |
| 1867 | case 0x07: size = arcompact_handle18_06_07_dasm(DASM_PARAMS); break; // <illegal 0x18_06_07> |
| 1868 | case 0x08: size = arcompact_handle18_06_08_dasm(DASM_PARAMS); break; // <illegal 0x18_06_08> |
| 1869 | case 0x09: size = arcompact_handle18_06_09_dasm(DASM_PARAMS); break; // <illegal 0x18_06_09> |
| 1870 | case 0x0a: size = arcompact_handle18_06_0a_dasm(DASM_PARAMS); break; // <illegal 0x18_06_0a> |
| 1871 | case 0x0b: size = arcompact_handle18_06_0b_dasm(DASM_PARAMS); break; // <illegal 0x18_06_0b> |
| 1872 | case 0x0c: size = arcompact_handle18_06_0c_dasm(DASM_PARAMS); break; // <illegal 0x18_06_0c> |
| 1873 | case 0x0d: size = arcompact_handle18_06_0d_dasm(DASM_PARAMS); break; // <illegal 0x18_06_0d> |
| 1874 | case 0x0e: size = arcompact_handle18_06_0e_dasm(DASM_PARAMS); break; // <illegal 0x18_06_0e> |
| 1875 | case 0x0f: size = arcompact_handle18_06_0f_dasm(DASM_PARAMS); break; // <illegal 0x18_06_0f> |
| 1876 | case 0x10: size = arcompact_handle18_06_10_dasm(DASM_PARAMS); break; // <illegal 0x18_06_10> |
| 1877 | case 0x11: size = arcompact_handle18_06_11_dasm(DASM_PARAMS); break; // POP_S blink |
| 1878 | case 0x12: size = arcompact_handle18_06_12_dasm(DASM_PARAMS); break; // <illegal 0x18_06_12> |
| 1879 | case 0x13: size = arcompact_handle18_06_13_dasm(DASM_PARAMS); break; // <illegal 0x18_06_13> |
| 1880 | case 0x14: size = arcompact_handle18_06_14_dasm(DASM_PARAMS); break; // <illegal 0x18_06_14> |
| 1881 | case 0x15: size = arcompact_handle18_06_15_dasm(DASM_PARAMS); break; // <illegal 0x18_06_15> |
| 1882 | case 0x16: size = arcompact_handle18_06_16_dasm(DASM_PARAMS); break; // <illegal 0x18_06_16> |
| 1883 | case 0x17: size = arcompact_handle18_06_17_dasm(DASM_PARAMS); break; // <illegal 0x18_06_17> |
| 1884 | case 0x18: size = arcompact_handle18_06_18_dasm(DASM_PARAMS); break; // <illegal 0x18_06_18> |
| 1885 | case 0x19: size = arcompact_handle18_06_19_dasm(DASM_PARAMS); break; // <illegal 0x18_06_19> |
| 1886 | case 0x1a: size = arcompact_handle18_06_1a_dasm(DASM_PARAMS); break; // <illegal 0x18_06_1a> |
| 1887 | case 0x1b: size = arcompact_handle18_06_1b_dasm(DASM_PARAMS); break; // <illegal 0x18_06_1b> |
| 1888 | case 0x1c: size = arcompact_handle18_06_1c_dasm(DASM_PARAMS); break; // <illegal 0x18_06_1c> |
| 1889 | case 0x1d: size = arcompact_handle18_06_1d_dasm(DASM_PARAMS); break; // <illegal 0x18_06_1d> |
| 1890 | case 0x1e: size = arcompact_handle18_06_1e_dasm(DASM_PARAMS); break; // <illegal 0x18_06_1e> |
| 1891 | case 0x1f: size = arcompact_handle18_06_1f_dasm(DASM_PARAMS); break; // <illegal 0x18_06_1f> |
| 1892 | } |
| 1893 | |
| 1894 | return size; |
| 1895 | } |
| 1896 | |
| 1897 | |
| 1898 | // op bits remaining for 0x18_06_xx subgroups 0x0700 |
| 1899 | int arcompact_handle18_06_00_dasm(DASM_OPS_16) { print("<illegal 0x18_06_00> (%04x)", op); return 2;} |
| 1900 | |
| 1901 | int arcompact_handle18_06_01_dasm(DASM_OPS_16) |
| 1902 | { |
| 1903 | int b = (op & 0x0700) >> 8; |
| 1904 | op &= ~0x0700; // all bits now used |
| 1905 | |
| 1906 | print("POP_S [%02x]", b); |
| 1907 | |
| 1908 | return 2; |
| 1909 | } |
| 1910 | |
| 1911 | int arcompact_handle18_06_02_dasm(DASM_OPS_16) { print("<illegal 0x18_06_02> (%04x)", op); return 2;} |
| 1912 | int arcompact_handle18_06_03_dasm(DASM_OPS_16) { print("<illegal 0x18_06_03> (%04x)", op); return 2;} |
| 1913 | int arcompact_handle18_06_04_dasm(DASM_OPS_16) { print("<illegal 0x18_06_04> (%04x)", op); return 2;} |
| 1914 | int arcompact_handle18_06_05_dasm(DASM_OPS_16) { print("<illegal 0x18_06_05> (%04x)", op); return 2;} |
| 1915 | int arcompact_handle18_06_06_dasm(DASM_OPS_16) { print("<illegal 0x18_06_06> (%04x)", op); return 2;} |
| 1916 | int arcompact_handle18_06_07_dasm(DASM_OPS_16) { print("<illegal 0x18_06_07> (%04x)", op); return 2;} |
| 1917 | int arcompact_handle18_06_08_dasm(DASM_OPS_16) { print("<illegal 0x18_06_08> (%04x)", op); return 2;} |
| 1918 | int arcompact_handle18_06_09_dasm(DASM_OPS_16) { print("<illegal 0x18_06_09> (%04x)", op); return 2;} |
| 1919 | int arcompact_handle18_06_0a_dasm(DASM_OPS_16) { print("<illegal 0x18_06_0a> (%04x)", op); return 2;} |
| 1920 | int arcompact_handle18_06_0b_dasm(DASM_OPS_16) { print("<illegal 0x18_06_0b> (%04x)", op); return 2;} |
| 1921 | int arcompact_handle18_06_0c_dasm(DASM_OPS_16) { print("<illegal 0x18_06_0c> (%04x)", op); return 2;} |
| 1922 | int arcompact_handle18_06_0d_dasm(DASM_OPS_16) { print("<illegal 0x18_06_0d> (%04x)", op); return 2;} |
| 1923 | int arcompact_handle18_06_0e_dasm(DASM_OPS_16) { print("<illegal 0x18_06_0e> (%04x)", op); return 2;} |
| 1924 | int arcompact_handle18_06_0f_dasm(DASM_OPS_16) { print("<illegal 0x18_06_0f> (%04x)", op); return 2;} |
| 1925 | int arcompact_handle18_06_10_dasm(DASM_OPS_16) { print("<illegal 0x18_06_10> (%04x)", op); return 2;} |
| 1926 | |
| 1927 | int arcompact_handle18_06_11_dasm(DASM_OPS_16) |
| 1928 | { |
| 1929 | int res = (op & 0x0700) >> 8; |
| 1930 | op &= ~0x0700; // all bits now used |
| 1931 | |
| 1932 | if (res) |
| 1933 | print("POP_S [BLINK] (Reserved Bits set %04x)", op); |
| 1934 | else |
| 1935 | print("POP_S [BLINK]"); |
| 1936 | |
| 1937 | return 2; |
| 1938 | } |
| 1939 | |
| 1940 | int arcompact_handle18_06_12_dasm(DASM_OPS_16) { print("<illegal 0x18_06_12> (%04x)", op); return 2;} |
| 1941 | int arcompact_handle18_06_13_dasm(DASM_OPS_16) { print("<illegal 0x18_06_13> (%04x)", op); return 2;} |
| 1942 | int arcompact_handle18_06_14_dasm(DASM_OPS_16) { print("<illegal 0x18_06_14> (%04x)", op); return 2;} |
| 1943 | int arcompact_handle18_06_15_dasm(DASM_OPS_16) { print("<illegal 0x18_06_15> (%04x)", op); return 2;} |
| 1944 | int arcompact_handle18_06_16_dasm(DASM_OPS_16) { print("<illegal 0x18_06_16> (%04x)", op); return 2;} |
| 1945 | int arcompact_handle18_06_17_dasm(DASM_OPS_16) { print("<illegal 0x18_06_17> (%04x)", op); return 2;} |
| 1946 | int arcompact_handle18_06_18_dasm(DASM_OPS_16) { print("<illegal 0x18_06_18> (%04x)", op); return 2;} |
| 1947 | int arcompact_handle18_06_19_dasm(DASM_OPS_16) { print("<illegal 0x18_06_19> (%04x)", op); return 2;} |
| 1948 | int arcompact_handle18_06_1a_dasm(DASM_OPS_16) { print("<illegal 0x18_06_1a> (%04x)", op); return 2;} |
| 1949 | int arcompact_handle18_06_1b_dasm(DASM_OPS_16) { print("<illegal 0x18_06_1b> (%04x)", op); return 2;} |
| 1950 | int arcompact_handle18_06_1c_dasm(DASM_OPS_16) { print("<illegal 0x18_06_1c> (%04x)", op); return 2;} |
| 1951 | int arcompact_handle18_06_1d_dasm(DASM_OPS_16) { print("<illegal 0x18_06_1d> (%04x)", op); return 2;} |
| 1952 | int arcompact_handle18_06_1e_dasm(DASM_OPS_16) { print("<illegal 0x18_06_1e> (%04x)", op); return 2;} |
| 1953 | int arcompact_handle18_06_1f_dasm(DASM_OPS_16) { print("<illegal 0x18_06_1f> (%04x)", op); return 2;} |
| 1954 | |
| 1955 | |
| 1956 | |
| 1957 | |
| 1958 | int arcompact_handle18_07_dasm(DASM_OPS_16) |
| 1959 | { |
| 1960 | int size = 2; |
| 1961 | UINT8 subinstr2 = (op & 0x001f) >> 0; |
| 1962 | op &= ~0x001f; |
| 1963 | |
| 1964 | switch (subinstr2) |
| 1965 | { |
| 1966 | case 0x00: size = arcompact_handle18_07_00_dasm(DASM_PARAMS); break; // <illegal 0x18_07_00> |
| 1967 | case 0x01: size = arcompact_handle18_07_01_dasm(DASM_PARAMS); break; // PUSH_S b |
| 1968 | case 0x02: size = arcompact_handle18_07_02_dasm(DASM_PARAMS); break; // <illegal 0x18_07_02> |
| 1969 | case 0x03: size = arcompact_handle18_07_03_dasm(DASM_PARAMS); break; // <illegal 0x18_07_03> |
| 1970 | case 0x04: size = arcompact_handle18_07_04_dasm(DASM_PARAMS); break; // <illegal 0x18_07_04> |
| 1971 | case 0x05: size = arcompact_handle18_07_05_dasm(DASM_PARAMS); break; // <illegal 0x18_07_05> |
| 1972 | case 0x06: size = arcompact_handle18_07_06_dasm(DASM_PARAMS); break; // <illegal 0x18_07_06> |
| 1973 | case 0x07: size = arcompact_handle18_07_07_dasm(DASM_PARAMS); break; // <illegal 0x18_07_07> |
| 1974 | case 0x08: size = arcompact_handle18_07_08_dasm(DASM_PARAMS); break; // <illegal 0x18_07_08> |
| 1975 | case 0x09: size = arcompact_handle18_07_09_dasm(DASM_PARAMS); break; // <illegal 0x18_07_09> |
| 1976 | case 0x0a: size = arcompact_handle18_07_0a_dasm(DASM_PARAMS); break; // <illegal 0x18_07_0a> |
| 1977 | case 0x0b: size = arcompact_handle18_07_0b_dasm(DASM_PARAMS); break; // <illegal 0x18_07_0b> |
| 1978 | case 0x0c: size = arcompact_handle18_07_0c_dasm(DASM_PARAMS); break; // <illegal 0x18_07_0c> |
| 1979 | case 0x0d: size = arcompact_handle18_07_0d_dasm(DASM_PARAMS); break; // <illegal 0x18_07_0d> |
| 1980 | case 0x0e: size = arcompact_handle18_07_0e_dasm(DASM_PARAMS); break; // <illegal 0x18_07_0e> |
| 1981 | case 0x0f: size = arcompact_handle18_07_0f_dasm(DASM_PARAMS); break; // <illegal 0x18_07_0f> |
| 1982 | case 0x10: size = arcompact_handle18_07_10_dasm(DASM_PARAMS); break; // <illegal 0x18_07_10> |
| 1983 | case 0x11: size = arcompact_handle18_07_11_dasm(DASM_PARAMS); break; // PUSH_S blink |
| 1984 | case 0x12: size = arcompact_handle18_07_12_dasm(DASM_PARAMS); break; // <illegal 0x18_07_12> |
| 1985 | case 0x13: size = arcompact_handle18_07_13_dasm(DASM_PARAMS); break; // <illegal 0x18_07_13> |
| 1986 | case 0x14: size = arcompact_handle18_07_14_dasm(DASM_PARAMS); break; // <illegal 0x18_07_14> |
| 1987 | case 0x15: size = arcompact_handle18_07_15_dasm(DASM_PARAMS); break; // <illegal 0x18_07_15> |
| 1988 | case 0x16: size = arcompact_handle18_07_16_dasm(DASM_PARAMS); break; // <illegal 0x18_07_16> |
| 1989 | case 0x17: size = arcompact_handle18_07_17_dasm(DASM_PARAMS); break; // <illegal 0x18_07_17> |
| 1990 | case 0x18: size = arcompact_handle18_07_18_dasm(DASM_PARAMS); break; // <illegal 0x18_07_18> |
| 1991 | case 0x19: size = arcompact_handle18_07_19_dasm(DASM_PARAMS); break; // <illegal 0x18_07_19> |
| 1992 | case 0x1a: size = arcompact_handle18_07_1a_dasm(DASM_PARAMS); break; // <illegal 0x18_07_1a> |
| 1993 | case 0x1b: size = arcompact_handle18_07_1b_dasm(DASM_PARAMS); break; // <illegal 0x18_07_1b> |
| 1994 | case 0x1c: size = arcompact_handle18_07_1c_dasm(DASM_PARAMS); break; // <illegal 0x18_07_1c> |
| 1995 | case 0x1d: size = arcompact_handle18_07_1d_dasm(DASM_PARAMS); break; // <illegal 0x18_07_1d> |
| 1996 | case 0x1e: size = arcompact_handle18_07_1e_dasm(DASM_PARAMS); break; // <illegal 0x18_07_1e> |
| 1997 | case 0x1f: size = arcompact_handle18_07_1f_dasm(DASM_PARAMS); break; // <illegal 0x18_07_1f> |
| 1998 | } |
| 1999 | |
| 2000 | return size; |
| 2001 | } |
| 2002 | |
| 2003 | |
| 2004 | // op bits remaining for 0x18_07_xx subgroups 0x0700 |
| 2005 | int arcompact_handle18_07_00_dasm(DASM_OPS_16) { print("<illegal 0x18_07_00> (%04x)", op); return 2;} |
| 2006 | |
| 2007 | int arcompact_handle18_07_01_dasm(DASM_OPS_16) |
| 2008 | { |
| 2009 | int b = (op & 0x0700) >> 8; |
| 2010 | op &= ~0x0700; // all bits now used |
| 2011 | |
| 2012 | print("PUSH_S [%02x]", b); |
| 2013 | |
| 2014 | return 2; |
| 2015 | } |
| 2016 | |
| 2017 | int arcompact_handle18_07_02_dasm(DASM_OPS_16) { print("<illegal 0x18_07_02> (%04x)", op); return 2;} |
| 2018 | int arcompact_handle18_07_03_dasm(DASM_OPS_16) { print("<illegal 0x18_07_03> (%04x)", op); return 2;} |
| 2019 | int arcompact_handle18_07_04_dasm(DASM_OPS_16) { print("<illegal 0x18_07_04> (%04x)", op); return 2;} |
| 2020 | int arcompact_handle18_07_05_dasm(DASM_OPS_16) { print("<illegal 0x18_07_05> (%04x)", op); return 2;} |
| 2021 | int arcompact_handle18_07_06_dasm(DASM_OPS_16) { print("<illegal 0x18_07_06> (%04x)", op); return 2;} |
| 2022 | int arcompact_handle18_07_07_dasm(DASM_OPS_16) { print("<illegal 0x18_07_07> (%04x)", op); return 2;} |
| 2023 | int arcompact_handle18_07_08_dasm(DASM_OPS_16) { print("<illegal 0x18_07_08> (%04x)", op); return 2;} |
| 2024 | int arcompact_handle18_07_09_dasm(DASM_OPS_16) { print("<illegal 0x18_07_09> (%04x)", op); return 2;} |
| 2025 | int arcompact_handle18_07_0a_dasm(DASM_OPS_16) { print("<illegal 0x18_07_0a> (%04x)", op); return 2;} |
| 2026 | int arcompact_handle18_07_0b_dasm(DASM_OPS_16) { print("<illegal 0x18_07_0b> (%04x)", op); return 2;} |
| 2027 | int arcompact_handle18_07_0c_dasm(DASM_OPS_16) { print("<illegal 0x18_07_0c> (%04x)", op); return 2;} |
| 2028 | int arcompact_handle18_07_0d_dasm(DASM_OPS_16) { print("<illegal 0x18_07_0d> (%04x)", op); return 2;} |
| 2029 | int arcompact_handle18_07_0e_dasm(DASM_OPS_16) { print("<illegal 0x18_07_0e> (%04x)", op); return 2;} |
| 2030 | int arcompact_handle18_07_0f_dasm(DASM_OPS_16) { print("<illegal 0x18_07_0f> (%04x)", op); return 2;} |
| 2031 | int arcompact_handle18_07_10_dasm(DASM_OPS_16) { print("<illegal 0x18_07_10> (%04x)", op); return 2;} |
| 2032 | |
| 2033 | int arcompact_handle18_07_11_dasm(DASM_OPS_16) |
| 2034 | { |
| 2035 | int res = (op & 0x0700) >> 8; |
| 2036 | op &= ~0x0700; // all bits now used |
| 2037 | |
| 2038 | if (res) |
| 2039 | print("PUSH_S [BLINK] (Reserved Bits set %04x)", op); |
| 2040 | else |
| 2041 | print("PUSH_S [BLINK]"); |
| 2042 | |
| 2043 | return 2; |
| 2044 | } |
| 2045 | |
| 2046 | int arcompact_handle18_07_12_dasm(DASM_OPS_16) { print("<illegal 0x18_07_12> (%04x)", op); return 2;} |
| 2047 | int arcompact_handle18_07_13_dasm(DASM_OPS_16) { print("<illegal 0x18_07_13> (%04x)", op); return 2;} |
| 2048 | int arcompact_handle18_07_14_dasm(DASM_OPS_16) { print("<illegal 0x18_07_14> (%04x)", op); return 2;} |
| 2049 | int arcompact_handle18_07_15_dasm(DASM_OPS_16) { print("<illegal 0x18_07_15> (%04x)", op); return 2;} |
| 2050 | int arcompact_handle18_07_16_dasm(DASM_OPS_16) { print("<illegal 0x18_07_16> (%04x)", op); return 2;} |
| 2051 | int arcompact_handle18_07_17_dasm(DASM_OPS_16) { print("<illegal 0x18_07_17> (%04x)", op); return 2;} |
| 2052 | int arcompact_handle18_07_18_dasm(DASM_OPS_16) { print("<illegal 0x18_07_18> (%04x)", op); return 2;} |
| 2053 | int arcompact_handle18_07_19_dasm(DASM_OPS_16) { print("<illegal 0x18_07_19> (%04x)", op); return 2;} |
| 2054 | int arcompact_handle18_07_1a_dasm(DASM_OPS_16) { print("<illegal 0x18_07_1a> (%04x)", op); return 2;} |
| 2055 | int arcompact_handle18_07_1b_dasm(DASM_OPS_16) { print("<illegal 0x18_07_1b> (%04x)", op); return 2;} |
| 2056 | int arcompact_handle18_07_1c_dasm(DASM_OPS_16) { print("<illegal 0x18_07_1c> (%04x)", op); return 2;} |
| 2057 | int arcompact_handle18_07_1d_dasm(DASM_OPS_16) { print("<illegal 0x18_07_1d> (%04x)", op); return 2;} |
| 2058 | int arcompact_handle18_07_1e_dasm(DASM_OPS_16) { print("<illegal 0x18_07_1e> (%04x)", op); return 2;} |
| 2059 | int arcompact_handle18_07_1f_dasm(DASM_OPS_16) { print("<illegal 0x18_07_1f> (%04x)", op); return 2;} |
| 2060 | |
| 2061 | |
| 2062 | int arcompact_handle19_dasm(DASM_OPS_16) |
| 2063 | { |
| 2064 | int size = 2; |
| 2065 | UINT8 subinstr = (op & 0x0600) >> 9; |
| 2066 | op &= ~0x0600; |
| 2067 | |
| 2068 | switch (subinstr) |
| 2069 | { |
| 2070 | case 0x00: size = arcompact_handle19_00_dasm(DASM_PARAMS); break; // LD_S (GP) |
| 2071 | case 0x01: size = arcompact_handle19_01_dasm(DASM_PARAMS); break; // LDB_S (GP) |
| 2072 | case 0x02: size = arcompact_handle19_02_dasm(DASM_PARAMS); break; // LDW_S (GP) |
| 2073 | case 0x03: size = arcompact_handle19_03_dasm(DASM_PARAMS); break; // ADD_S (GP) |
| 2074 | } |
| 2075 | return size; |
| 2076 | } |
| 2077 | |
| 2078 | int arcompact_handle19_00_dasm(DASM_OPS_16) { print("LD_S r0 <- m[GP + s11].long (%04x)", op); return 2;} |
| 2079 | int arcompact_handle19_01_dasm(DASM_OPS_16) { print("LDB_S r0 <- m[GP + s9].byte (%04x)", op); return 2;} |
| 2080 | int arcompact_handle19_02_dasm(DASM_OPS_16) { print("LDW_S r0 <- m[GP + s10].word (%04x)", op); return 2;} |
| 2081 | int arcompact_handle19_03_dasm(DASM_OPS_16) { print("ADD_S r0 <- GP + s11 (%04x)", op); return 2;} |
| 2082 | |
| 2083 | |
| 2084 | |
| 2085 | int arcompact_handle1a_dasm(DASM_OPS_16) |
| 2086 | { |
| 2087 | print("PCL Instr (%04x)", op); |
| 2088 | return 2; |
| 2089 | } |
| 2090 | |
| 2091 | int arcompact_handle1b_dasm(DASM_OPS_16) |
| 2092 | { |
| 2093 | print("MOV_S (%04x)", op); |
| 2094 | return 2; |
| 2095 | } |
| 2096 | |
| 2097 | int arcompact_handle1c_dasm(DASM_OPS_16) |
| 2098 | { |
| 2099 | int size = 2; |
| 2100 | UINT8 subinstr = (op & 0x0080) >> 7; |
| 2101 | op &= ~0x0080; |
| 2102 | |
| 2103 | switch (subinstr) |
| 2104 | { |
| 2105 | case 0x00: size = arcompact_handle1c_00_dasm(DASM_PARAMS); break; // ADD_S |
| 2106 | case 0x01: size = arcompact_handle1c_01_dasm(DASM_PARAMS); break; // CMP_S |
| 2107 | } |
| 2108 | return size; |
| 2109 | } |
| 2110 | |
| 2111 | int arcompact_handle1c_00_dasm(DASM_OPS_16) { print("ADD_S b <- b + u7 (%04x)", op); return 2;} |
| 2112 | int arcompact_handle1c_01_dasm(DASM_OPS_16) { print("CMP_S b - u7 (%04x)", op); return 2;} |
| 2113 | |
| 2114 | |
| 2115 | int arcompact_handle1d_dasm(DASM_OPS_16) |
| 2116 | { |
| 2117 | int size = 2; |
| 2118 | UINT8 subinstr = (op & 0x0080) >> 7; |
| 2119 | op &= ~0x0080; |
| 2120 | |
| 2121 | switch (subinstr) |
| 2122 | { |
| 2123 | case 0x00: size = arcompact_handle1d_00_dasm(DASM_PARAMS); break; // BREQ_S |
| 2124 | case 0x01: size = arcompact_handle1d_01_dasm(DASM_PARAMS); break; // BRNE_S |
| 2125 | } |
| 2126 | return size; |
| 2127 | } |
| 2128 | |
| 2129 | int arcompact_handle1d_00_dasm(DASM_OPS_16) { print("BREQ_S (%04x)", op); return 2;} |
| 2130 | int arcompact_handle1d_01_dasm(DASM_OPS_16) { print("BRNE_S (%04x)", op); return 2;} |
| 2131 | |
| 2132 | |
| 2133 | int arcompact_handle1e_dasm(DASM_OPS_16) |
| 2134 | { |
| 2135 | int size = 2; |
| 2136 | UINT8 subinstr = (op & 0x0600) >> 9; |
| 2137 | op &= ~0x0600; |
| 2138 | |
| 2139 | switch (subinstr) |
| 2140 | { |
| 2141 | case 0x00: size = arcompact_handle1e_00_dasm(DASM_PARAMS); break; // B_S |
| 2142 | case 0x01: size = arcompact_handle1e_01_dasm(DASM_PARAMS); break; // BEQ_S |
| 2143 | case 0x02: size = arcompact_handle1e_02_dasm(DASM_PARAMS); break; // BNE_S |
| 2144 | case 0x03: size = arcompact_handle1e_03_dasm(DASM_PARAMS); break; // Bcc_S |
| 2145 | } |
| 2146 | return size; |
| 2147 | } |
| 2148 | |
| 2149 | int arcompact_handle1e_00_dasm(DASM_OPS_16) { print("B_S (%04x)", op); return 2;} |
| 2150 | int arcompact_handle1e_01_dasm(DASM_OPS_16) { print("BEQ_S (%04x)", op); return 2;} |
| 2151 | int arcompact_handle1e_02_dasm(DASM_OPS_16) { print("BNE_S (%04x)", op); return 2;} |
| 2152 | |
| 2153 | |
| 2154 | int arcompact_handle1e_03_dasm(DASM_OPS_16) |
| 2155 | { |
| 2156 | |
| 2157 | int size = 2; |
| 2158 | UINT8 subinstr2 = (op & 0x01c0) >> 6; |
| 2159 | op &= ~0x01c0; |
| 2160 | |
| 2161 | switch (subinstr2) |
| 2162 | { |
| 2163 | case 0x00: size = arcompact_handle1e_03_00_dasm(DASM_PARAMS); break; // BGT_S |
| 2164 | case 0x01: size = arcompact_handle1e_03_01_dasm(DASM_PARAMS); break; // BGE_S |
| 2165 | case 0x02: size = arcompact_handle1e_03_02_dasm(DASM_PARAMS); break; // BLT_S |
| 2166 | case 0x03: size = arcompact_handle1e_03_03_dasm(DASM_PARAMS); break; // BLE_S |
| 2167 | case 0x04: size = arcompact_handle1e_03_04_dasm(DASM_PARAMS); break; // BHI_S |
| 2168 | case 0x05: size = arcompact_handle1e_03_05_dasm(DASM_PARAMS); break; // BHS_S |
| 2169 | case 0x06: size = arcompact_handle1e_03_06_dasm(DASM_PARAMS); break; // BLO_S |
| 2170 | case 0x07: size = arcompact_handle1e_03_07_dasm(DASM_PARAMS); break; // BLS_S |
| 2171 | } |
| 2172 | return size; |
| 2173 | |
| 2174 | } |
| 2175 | |
| 2176 | int arcompact_handle1e_03_00_dasm(DASM_OPS_16) { print("BGT_S (%04x)", op); return 2;} |
| 2177 | int arcompact_handle1e_03_01_dasm(DASM_OPS_16) { print("BGE_S (%04x)", op); return 2;} |
| 2178 | int arcompact_handle1e_03_02_dasm(DASM_OPS_16) { print("BLT_S (%04x)", op); return 2;} |
| 2179 | int arcompact_handle1e_03_03_dasm(DASM_OPS_16) { print("BLE_S (%04x)", op); return 2;} |
| 2180 | int arcompact_handle1e_03_04_dasm(DASM_OPS_16) { print("BHI_S (%04x)", op); return 2;} |
| 2181 | int arcompact_handle1e_03_05_dasm(DASM_OPS_16) { print("BHS_S (%04x)", op); return 2;} |
| 2182 | int arcompact_handle1e_03_06_dasm(DASM_OPS_16) { print("BLO_S (%04x)", op); return 2;} |
| 2183 | int arcompact_handle1e_03_07_dasm(DASM_OPS_16) { print("BLS_S (%04x)", op); return 2;} |
| 2184 | |
| 2185 | |
| 2186 | |
| 2187 | int arcompact_handle1f_dasm(DASM_OPS_16) |
| 2188 | { |
| 2189 | print("BL_S (%04x)", op); |
| 2190 | return 2; |
| 2191 | } |
| 2192 | |
| 25 | 2193 | CPU_DISASSEMBLE(arcompact) |
| 26 | 2194 | { |
| 27 | 2195 | int size = 2; |
trunk/src/emu/cpu/arcompact/arcompactdasm_dispatch.c
| r242341 | r242342 | |
| 1 | | /*********************************\ |
| 2 | | |
| 3 | | ARCompact disassembler |
| 4 | | |
| 5 | | \*********************************/ |
| 6 | | |
| 7 | | #include "emu.h" |
| 8 | | #include <stdarg.h> |
| 9 | | |
| 10 | | #include "arcompactdasm_dispatch.h" |
| 11 | | #include "arcompactdasm_ops.h" |
| 12 | | |
| 13 | | int arcompact_handle00_dasm(DASM_OPS_32) |
| 14 | | { |
| 15 | | int size = 4; |
| 16 | | UINT8 subinstr = (op & 0x00010000) >> 16; |
| 17 | | op &= ~0x00010000; |
| 18 | | |
| 19 | | switch (subinstr) |
| 20 | | { |
| 21 | | case 0x00: size = arcompact_handle00_00_dasm(DASM_PARAMS); break; // Branch Conditionally |
| 22 | | case 0x01: size = arcompact_handle00_01_dasm(DASM_PARAMS); break; // Branch Unconditionally Far |
| 23 | | } |
| 24 | | |
| 25 | | return size; |
| 26 | | } |
| 27 | | |
| 28 | | int arcompact_handle01_dasm(DASM_OPS_32) |
| 29 | | { |
| 30 | | int size = 4; |
| 31 | | UINT8 subinstr = (op & 0x00010000) >> 16; |
| 32 | | op &= ~0x00010000; |
| 33 | | |
| 34 | | switch (subinstr) |
| 35 | | { |
| 36 | | case 0x00: size = arcompact_handle01_00_dasm(DASM_PARAMS); break; // Branh & Link |
| 37 | | case 0x01: size = arcompact_handle01_01_dasm(DASM_PARAMS); break; // Branch on Compare |
| 38 | | } |
| 39 | | |
| 40 | | return size; |
| 41 | | } |
| 42 | | |
| 43 | | int arcompact_handle01_00_dasm(DASM_OPS_32) |
| 44 | | { |
| 45 | | int size = 4; |
| 46 | | UINT8 subinstr2 = (op & 0x00020000) >> 17; |
| 47 | | op &= ~0x00020000; |
| 48 | | |
| 49 | | switch (subinstr2) |
| 50 | | { |
| 51 | | case 0x00: size = arcompact_handle01_00_00dasm(DASM_PARAMS); break; // Branch and Link Conditionally |
| 52 | | case 0x01: size = arcompact_handle01_00_01dasm(DASM_PARAMS); break; // Branch and Link Unconditional Far |
| 53 | | } |
| 54 | | |
| 55 | | return size; |
| 56 | | } |
| 57 | | |
| 58 | | int arcompact_handle01_01_dasm(DASM_OPS_32) |
| 59 | | { |
| 60 | | int size = 4; |
| 61 | | |
| 62 | | UINT8 subinstr2 = (op & 0x00000010) >> 4; |
| 63 | | op &= ~0x00000010; |
| 64 | | |
| 65 | | switch (subinstr2) |
| 66 | | { |
| 67 | | case 0x00: size = arcompact_handle01_01_00_dasm(DASM_PARAMS); break; // Branch on Compare Register-Register |
| 68 | | case 0x01: size = arcompact_handle01_01_01_dasm(DASM_PARAMS); break; // Branch on Compare/Bit Test Register-Immediate |
| 69 | | } |
| 70 | | |
| 71 | | return size; |
| 72 | | } |
| 73 | | |
| 74 | | int arcompact_handle01_01_00_dasm(DASM_OPS_32) |
| 75 | | { |
| 76 | | int size = 4; |
| 77 | | UINT8 subinstr3 = (op & 0x0000000f) >> 0; |
| 78 | | op &= ~0x0000000f; |
| 79 | | |
| 80 | | switch (subinstr3) |
| 81 | | { |
| 82 | | case 0x00: size = arcompact_handle01_01_00_00_dasm(DASM_PARAMS); break; // BREQ (reg-reg) |
| 83 | | case 0x01: size = arcompact_handle01_01_00_01_dasm(DASM_PARAMS); break; // BRNE (reg-reg) |
| 84 | | case 0x02: size = arcompact_handle01_01_00_02_dasm(DASM_PARAMS); break; // BRLT (reg-reg) |
| 85 | | case 0x03: size = arcompact_handle01_01_00_03_dasm(DASM_PARAMS); break; // BRGE (reg-reg) |
| 86 | | case 0x04: size = arcompact_handle01_01_00_04_dasm(DASM_PARAMS); break; // BRLO (reg-reg) |
| 87 | | case 0x05: size = arcompact_handle01_01_00_05_dasm(DASM_PARAMS); break; // BRHS (reg-reg) |
| 88 | | case 0x06: size = arcompact_handle01_01_00_06_dasm(DASM_PARAMS); break; // reserved |
| 89 | | case 0x07: size = arcompact_handle01_01_00_07_dasm(DASM_PARAMS); break; // reserved |
| 90 | | case 0x08: size = arcompact_handle01_01_00_08_dasm(DASM_PARAMS); break; // reserved |
| 91 | | case 0x09: size = arcompact_handle01_01_00_09_dasm(DASM_PARAMS); break; // reserved |
| 92 | | case 0x0a: size = arcompact_handle01_01_00_0a_dasm(DASM_PARAMS); break; // reserved |
| 93 | | case 0x0b: size = arcompact_handle01_01_00_0b_dasm(DASM_PARAMS); break; // reserved |
| 94 | | case 0x0c: size = arcompact_handle01_01_00_0c_dasm(DASM_PARAMS); break; // reserved |
| 95 | | case 0x0d: size = arcompact_handle01_01_00_0d_dasm(DASM_PARAMS); break; // reserved |
| 96 | | case 0x0e: size = arcompact_handle01_01_00_0e_dasm(DASM_PARAMS); break; // BBIT0 (reg-reg) |
| 97 | | case 0x0f: size = arcompact_handle01_01_00_0f_dasm(DASM_PARAMS); break; // BBIT1 (reg-reg) |
| 98 | | } |
| 99 | | |
| 100 | | return size; |
| 101 | | } |
| 102 | | |
| 103 | | int arcompact_handle01_01_01_dasm(DASM_OPS_32) // Branch on Compare/Bit Test Register-Immediate |
| 104 | | { |
| 105 | | int size = 4; |
| 106 | | UINT8 subinstr3 = (op & 0x0000000f) >> 0; |
| 107 | | op &= ~0x0000000f; |
| 108 | | |
| 109 | | switch (subinstr3) |
| 110 | | { |
| 111 | | case 0x00: size = arcompact_handle01_01_01_00_dasm(DASM_PARAMS); break; // BREQ (reg-imm) |
| 112 | | case 0x01: size = arcompact_handle01_01_01_01_dasm(DASM_PARAMS); break; // BRNE (reg-imm) |
| 113 | | case 0x02: size = arcompact_handle01_01_01_02_dasm(DASM_PARAMS); break; // BRLT (reg-imm) |
| 114 | | case 0x03: size = arcompact_handle01_01_01_03_dasm(DASM_PARAMS); break; // BRGE (reg-imm) |
| 115 | | case 0x04: size = arcompact_handle01_01_01_04_dasm(DASM_PARAMS); break; // BRLO (reg-imm) |
| 116 | | case 0x05: size = arcompact_handle01_01_01_05_dasm(DASM_PARAMS); break; // BRHS (reg-imm) |
| 117 | | case 0x06: size = arcompact_handle01_01_01_06_dasm(DASM_PARAMS); break; // reserved |
| 118 | | case 0x07: size = arcompact_handle01_01_01_07_dasm(DASM_PARAMS); break; // reserved |
| 119 | | case 0x08: size = arcompact_handle01_01_01_08_dasm(DASM_PARAMS); break; // reserved |
| 120 | | case 0x09: size = arcompact_handle01_01_01_09_dasm(DASM_PARAMS); break; // reserved |
| 121 | | case 0x0a: size = arcompact_handle01_01_01_0a_dasm(DASM_PARAMS); break; // reserved |
| 122 | | case 0x0b: size = arcompact_handle01_01_01_0b_dasm(DASM_PARAMS); break; // reserved |
| 123 | | case 0x0c: size = arcompact_handle01_01_01_0c_dasm(DASM_PARAMS); break; // reserved |
| 124 | | case 0x0d: size = arcompact_handle01_01_01_0d_dasm(DASM_PARAMS); break; // reserved |
| 125 | | case 0x0e: size = arcompact_handle01_01_01_0e_dasm(DASM_PARAMS); break; // BBIT0 (reg-imm) |
| 126 | | case 0x0f: size = arcompact_handle01_01_01_0f_dasm(DASM_PARAMS); break; // BBIT1 (reg-imm) |
| 127 | | } |
| 128 | | |
| 129 | | return size; |
| 130 | | } |
| 131 | | |
| 132 | | int arcompact_handle04_dasm(DASM_OPS_32) |
| 133 | | { |
| 134 | | int size = 4; |
| 135 | | // General Operations |
| 136 | | |
| 137 | | // bitpos |
| 138 | | // 11111 111 11 111111 0 000 000000 0 00000 |
| 139 | | // fedcb a98 76 543210 f edc ba9876 5 43210 |
| 140 | | // |
| 141 | | // 00100 bbb 00 iiiiii F BBB CCCCCC A AAAAA General Operations *UN*Conditional Register to Register |
| 142 | | // 00100 bbb 01 iiiiii F BBB UUUUUU A AAAAA General Operations *UN*Conditional Register (Unsigned 6-bit IMM) |
| 143 | | // 00100 bbb 10 iiiiii F BBB ssssss S SSSSS General Operations *UN*Conditional Register (Signed 12-bit IMM) |
| 144 | | |
| 145 | | // 00100 bbb 11 iiiiii F BBB CCCCCC 0 QQQQQ General Operations Conditional Register |
| 146 | | // 00100 bbb 11 iiiiii F BBB UUUUUU 1 QQQQQ General Operations Conditional Register (Unsigned 6-bit IMM) |
| 147 | | UINT8 subinstr = (op & 0x003f0000) >> 16; |
| 148 | | op &= ~0x003f0000; |
| 149 | | |
| 150 | | switch (subinstr) |
| 151 | | { |
| 152 | | case 0x00: size = arcompact_handle04_00_dasm(DASM_PARAMS); break; // ADD |
| 153 | | case 0x01: size = arcompact_handle04_01_dasm(DASM_PARAMS); break; // ADC |
| 154 | | case 0x02: size = arcompact_handle04_02_dasm(DASM_PARAMS); break; // SUB |
| 155 | | case 0x03: size = arcompact_handle04_03_dasm(DASM_PARAMS); break; // SBC |
| 156 | | case 0x04: size = arcompact_handle04_04_dasm(DASM_PARAMS); break; // AND |
| 157 | | case 0x05: size = arcompact_handle04_05_dasm(DASM_PARAMS); break; // OR |
| 158 | | case 0x06: size = arcompact_handle04_06_dasm(DASM_PARAMS); break; // BIC |
| 159 | | case 0x07: size = arcompact_handle04_07_dasm(DASM_PARAMS); break; // XOR |
| 160 | | case 0x08: size = arcompact_handle04_08_dasm(DASM_PARAMS); break; // MAX |
| 161 | | case 0x09: size = arcompact_handle04_09_dasm(DASM_PARAMS); break; // MIN |
| 162 | | case 0x0a: size = arcompact_handle04_0a_dasm(DASM_PARAMS); break; // MOV |
| 163 | | case 0x0b: size = arcompact_handle04_0b_dasm(DASM_PARAMS); break; // TST |
| 164 | | case 0x0c: size = arcompact_handle04_0c_dasm(DASM_PARAMS); break; // CMP |
| 165 | | case 0x0d: size = arcompact_handle04_0d_dasm(DASM_PARAMS); break; // RCMP |
| 166 | | case 0x0e: size = arcompact_handle04_0e_dasm(DASM_PARAMS); break; // RSUB |
| 167 | | case 0x0f: size = arcompact_handle04_0f_dasm(DASM_PARAMS); break; // BSET |
| 168 | | case 0x10: size = arcompact_handle04_10_dasm(DASM_PARAMS); break; // BCLR |
| 169 | | case 0x11: size = arcompact_handle04_11_dasm(DASM_PARAMS); break; // BTST |
| 170 | | case 0x12: size = arcompact_handle04_12_dasm(DASM_PARAMS); break; // BXOR |
| 171 | | case 0x13: size = arcompact_handle04_13_dasm(DASM_PARAMS); break; // BMSK |
| 172 | | case 0x14: size = arcompact_handle04_14_dasm(DASM_PARAMS); break; // ADD1 |
| 173 | | case 0x15: size = arcompact_handle04_15_dasm(DASM_PARAMS); break; // ADD2 |
| 174 | | case 0x16: size = arcompact_handle04_16_dasm(DASM_PARAMS); break; // ADD3 |
| 175 | | case 0x17: size = arcompact_handle04_17_dasm(DASM_PARAMS); break; // SUB1 |
| 176 | | case 0x18: size = arcompact_handle04_18_dasm(DASM_PARAMS); break; // SUB2 |
| 177 | | case 0x19: size = arcompact_handle04_19_dasm(DASM_PARAMS); break; // SUB3 |
| 178 | | case 0x1a: size = arcompact_handle04_1a_dasm(DASM_PARAMS); break; // MPY * |
| 179 | | case 0x1b: size = arcompact_handle04_1b_dasm(DASM_PARAMS); break; // MPYH * |
| 180 | | case 0x1c: size = arcompact_handle04_1c_dasm(DASM_PARAMS); break; // MPYHU * |
| 181 | | case 0x1d: size = arcompact_handle04_1d_dasm(DASM_PARAMS); break; // MPYU * |
| 182 | | case 0x1e: size = arcompact_handle04_1e_dasm(DASM_PARAMS); break; // illegal |
| 183 | | case 0x1f: size = arcompact_handle04_1f_dasm(DASM_PARAMS); break; // illegal |
| 184 | | case 0x20: size = arcompact_handle04_20_dasm(DASM_PARAMS); break; // Jcc |
| 185 | | case 0x21: size = arcompact_handle04_21_dasm(DASM_PARAMS); break; // Jcc.D |
| 186 | | case 0x22: size = arcompact_handle04_22_dasm(DASM_PARAMS); break; // JLcc |
| 187 | | case 0x23: size = arcompact_handle04_23_dasm(DASM_PARAMS); break; // JLcc.D |
| 188 | | case 0x24: size = arcompact_handle04_24_dasm(DASM_PARAMS); break; // illegal |
| 189 | | case 0x25: size = arcompact_handle04_25_dasm(DASM_PARAMS); break; // illegal |
| 190 | | case 0x26: size = arcompact_handle04_26_dasm(DASM_PARAMS); break; // illegal |
| 191 | | case 0x27: size = arcompact_handle04_27_dasm(DASM_PARAMS); break; // illegal |
| 192 | | case 0x28: size = arcompact_handle04_28_dasm(DASM_PARAMS); break; // LPcc |
| 193 | | case 0x29: size = arcompact_handle04_29_dasm(DASM_PARAMS); break; // FLAG |
| 194 | | case 0x2a: size = arcompact_handle04_2a_dasm(DASM_PARAMS); break; // LR |
| 195 | | case 0x2b: size = arcompact_handle04_2b_dasm(DASM_PARAMS); break; // SR |
| 196 | | case 0x2c: size = arcompact_handle04_2c_dasm(DASM_PARAMS); break; // illegal |
| 197 | | case 0x2d: size = arcompact_handle04_2d_dasm(DASM_PARAMS); break; // illegal |
| 198 | | case 0x2e: size = arcompact_handle04_2e_dasm(DASM_PARAMS); break; // illegal |
| 199 | | case 0x2f: size = arcompact_handle04_2f_dasm(DASM_PARAMS); break; // Sub Opcode |
| 200 | | case 0x30: size = arcompact_handle04_30_dasm(DASM_PARAMS); break; // LD r-r |
| 201 | | case 0x31: size = arcompact_handle04_31_dasm(DASM_PARAMS); break; // LD r-r |
| 202 | | case 0x32: size = arcompact_handle04_32_dasm(DASM_PARAMS); break; // LD r-r |
| 203 | | case 0x33: size = arcompact_handle04_33_dasm(DASM_PARAMS); break; // LD r-r |
| 204 | | case 0x34: size = arcompact_handle04_34_dasm(DASM_PARAMS); break; // LD r-r |
| 205 | | case 0x35: size = arcompact_handle04_35_dasm(DASM_PARAMS); break; // LD r-r |
| 206 | | case 0x36: size = arcompact_handle04_36_dasm(DASM_PARAMS); break; // LD r-r |
| 207 | | case 0x37: size = arcompact_handle04_37_dasm(DASM_PARAMS); break; // LD r-r |
| 208 | | case 0x38: size = arcompact_handle04_38_dasm(DASM_PARAMS); break; // illegal |
| 209 | | case 0x39: size = arcompact_handle04_39_dasm(DASM_PARAMS); break; // illegal |
| 210 | | case 0x3a: size = arcompact_handle04_3a_dasm(DASM_PARAMS); break; // illegal |
| 211 | | case 0x3b: size = arcompact_handle04_3b_dasm(DASM_PARAMS); break; // illegal |
| 212 | | case 0x3c: size = arcompact_handle04_3c_dasm(DASM_PARAMS); break; // illegal |
| 213 | | case 0x3d: size = arcompact_handle04_3d_dasm(DASM_PARAMS); break; // illegal |
| 214 | | case 0x3e: size = arcompact_handle04_3e_dasm(DASM_PARAMS); break; // illegal |
| 215 | | case 0x3f: size = arcompact_handle04_3f_dasm(DASM_PARAMS); break; // illegal |
| 216 | | } |
| 217 | | |
| 218 | | return size; |
| 219 | | } |
| 220 | | |
| 221 | | int arcompact_handle04_2f_dasm(DASM_OPS_32) |
| 222 | | { |
| 223 | | int size = 4; |
| 224 | | UINT8 subinstr2 = (op & 0x0000003f) >> 0; |
| 225 | | op &= ~0x0000003f; |
| 226 | | |
| 227 | | switch (subinstr2) |
| 228 | | { |
| 229 | | case 0x00: size = arcompact_handle04_2f_00_dasm(DASM_PARAMS); break; // ASL |
| 230 | | case 0x01: size = arcompact_handle04_2f_01_dasm(DASM_PARAMS); break; // ASR |
| 231 | | case 0x02: size = arcompact_handle04_2f_02_dasm(DASM_PARAMS); break; // LSR |
| 232 | | case 0x03: size = arcompact_handle04_2f_03_dasm(DASM_PARAMS); break; // ROR |
| 233 | | case 0x04: size = arcompact_handle04_2f_04_dasm(DASM_PARAMS); break; // RCC |
| 234 | | case 0x05: size = arcompact_handle04_2f_05_dasm(DASM_PARAMS); break; // SEXB |
| 235 | | case 0x06: size = arcompact_handle04_2f_06_dasm(DASM_PARAMS); break; // SEXW |
| 236 | | case 0x07: size = arcompact_handle04_2f_07_dasm(DASM_PARAMS); break; // EXTB |
| 237 | | case 0x08: size = arcompact_handle04_2f_08_dasm(DASM_PARAMS); break; // EXTW |
| 238 | | case 0x09: size = arcompact_handle04_2f_09_dasm(DASM_PARAMS); break; // ABS |
| 239 | | case 0x0a: size = arcompact_handle04_2f_0a_dasm(DASM_PARAMS); break; // NOT |
| 240 | | case 0x0b: size = arcompact_handle04_2f_0b_dasm(DASM_PARAMS); break; // RLC |
| 241 | | case 0x0c: size = arcompact_handle04_2f_0c_dasm(DASM_PARAMS); break; // EX |
| 242 | | case 0x0d: size = arcompact_handle04_2f_0d_dasm(DASM_PARAMS); break; // illegal |
| 243 | | case 0x0e: size = arcompact_handle04_2f_0e_dasm(DASM_PARAMS); break; // illegal |
| 244 | | case 0x0f: size = arcompact_handle04_2f_0f_dasm(DASM_PARAMS); break; // illegal |
| 245 | | case 0x10: size = arcompact_handle04_2f_10_dasm(DASM_PARAMS); break; // illegal |
| 246 | | case 0x11: size = arcompact_handle04_2f_11_dasm(DASM_PARAMS); break; // illegal |
| 247 | | case 0x12: size = arcompact_handle04_2f_12_dasm(DASM_PARAMS); break; // illegal |
| 248 | | case 0x13: size = arcompact_handle04_2f_13_dasm(DASM_PARAMS); break; // illegal |
| 249 | | case 0x14: size = arcompact_handle04_2f_14_dasm(DASM_PARAMS); break; // illegal |
| 250 | | case 0x15: size = arcompact_handle04_2f_15_dasm(DASM_PARAMS); break; // illegal |
| 251 | | case 0x16: size = arcompact_handle04_2f_16_dasm(DASM_PARAMS); break; // illegal |
| 252 | | case 0x17: size = arcompact_handle04_2f_17_dasm(DASM_PARAMS); break; // illegal |
| 253 | | case 0x18: size = arcompact_handle04_2f_18_dasm(DASM_PARAMS); break; // illegal |
| 254 | | case 0x19: size = arcompact_handle04_2f_19_dasm(DASM_PARAMS); break; // illegal |
| 255 | | case 0x1a: size = arcompact_handle04_2f_1a_dasm(DASM_PARAMS); break; // illegal |
| 256 | | case 0x1b: size = arcompact_handle04_2f_1b_dasm(DASM_PARAMS); break; // illegal |
| 257 | | case 0x1c: size = arcompact_handle04_2f_1c_dasm(DASM_PARAMS); break; // illegal |
| 258 | | case 0x1d: size = arcompact_handle04_2f_1d_dasm(DASM_PARAMS); break; // illegal |
| 259 | | case 0x1e: size = arcompact_handle04_2f_1e_dasm(DASM_PARAMS); break; // illegal |
| 260 | | case 0x1f: size = arcompact_handle04_2f_1f_dasm(DASM_PARAMS); break; // illegal |
| 261 | | case 0x20: size = arcompact_handle04_2f_20_dasm(DASM_PARAMS); break; // illegal |
| 262 | | case 0x21: size = arcompact_handle04_2f_21_dasm(DASM_PARAMS); break; // illegal |
| 263 | | case 0x22: size = arcompact_handle04_2f_22_dasm(DASM_PARAMS); break; // illegal |
| 264 | | case 0x23: size = arcompact_handle04_2f_23_dasm(DASM_PARAMS); break; // illegal |
| 265 | | case 0x24: size = arcompact_handle04_2f_24_dasm(DASM_PARAMS); break; // illegal |
| 266 | | case 0x25: size = arcompact_handle04_2f_25_dasm(DASM_PARAMS); break; // illegal |
| 267 | | case 0x26: size = arcompact_handle04_2f_26_dasm(DASM_PARAMS); break; // illegal |
| 268 | | case 0x27: size = arcompact_handle04_2f_27_dasm(DASM_PARAMS); break; // illegal |
| 269 | | case 0x28: size = arcompact_handle04_2f_28_dasm(DASM_PARAMS); break; // illegal |
| 270 | | case 0x29: size = arcompact_handle04_2f_29_dasm(DASM_PARAMS); break; // illegal |
| 271 | | case 0x2a: size = arcompact_handle04_2f_2a_dasm(DASM_PARAMS); break; // illegal |
| 272 | | case 0x2b: size = arcompact_handle04_2f_2b_dasm(DASM_PARAMS); break; // illegal |
| 273 | | case 0x2c: size = arcompact_handle04_2f_2c_dasm(DASM_PARAMS); break; // illegal |
| 274 | | case 0x2d: size = arcompact_handle04_2f_2d_dasm(DASM_PARAMS); break; // illegal |
| 275 | | case 0x2e: size = arcompact_handle04_2f_2e_dasm(DASM_PARAMS); break; // illegal |
| 276 | | case 0x2f: size = arcompact_handle04_2f_2f_dasm(DASM_PARAMS); break; // illegal |
| 277 | | case 0x30: size = arcompact_handle04_2f_30_dasm(DASM_PARAMS); break; // illegal |
| 278 | | case 0x31: size = arcompact_handle04_2f_31_dasm(DASM_PARAMS); break; // illegal |
| 279 | | case 0x32: size = arcompact_handle04_2f_32_dasm(DASM_PARAMS); break; // illegal |
| 280 | | case 0x33: size = arcompact_handle04_2f_33_dasm(DASM_PARAMS); break; // illegal |
| 281 | | case 0x34: size = arcompact_handle04_2f_34_dasm(DASM_PARAMS); break; // illegal |
| 282 | | case 0x35: size = arcompact_handle04_2f_35_dasm(DASM_PARAMS); break; // illegal |
| 283 | | case 0x36: size = arcompact_handle04_2f_36_dasm(DASM_PARAMS); break; // illegal |
| 284 | | case 0x37: size = arcompact_handle04_2f_37_dasm(DASM_PARAMS); break; // illegal |
| 285 | | case 0x38: size = arcompact_handle04_2f_38_dasm(DASM_PARAMS); break; // illegal |
| 286 | | case 0x39: size = arcompact_handle04_2f_39_dasm(DASM_PARAMS); break; // illegal |
| 287 | | case 0x3a: size = arcompact_handle04_2f_3a_dasm(DASM_PARAMS); break; // illegal |
| 288 | | case 0x3b: size = arcompact_handle04_2f_3b_dasm(DASM_PARAMS); break; // illegal |
| 289 | | case 0x3c: size = arcompact_handle04_2f_3c_dasm(DASM_PARAMS); break; // illegal |
| 290 | | case 0x3d: size = arcompact_handle04_2f_3d_dasm(DASM_PARAMS); break; // illegal |
| 291 | | case 0x3e: size = arcompact_handle04_2f_3e_dasm(DASM_PARAMS); break; // illegal |
| 292 | | case 0x3f: size = arcompact_handle04_2f_3f_dasm(DASM_PARAMS); break; // ZOPs (Zero Operand Opcodes) |
| 293 | | } |
| 294 | | |
| 295 | | return size; |
| 296 | | } |
| 297 | | |
| 298 | | int arcompact_handle04_2f_3f_dasm(DASM_OPS_32) |
| 299 | | { |
| 300 | | int size = 4; |
| 301 | | UINT8 subinstr3 = (op & 0x07000000) >> 24; |
| 302 | | subinstr3 |= ((op & 0x00007000) >> 12) << 3; |
| 303 | | |
| 304 | | op &= ~0x07007000; |
| 305 | | |
| 306 | | switch (subinstr3) |
| 307 | | { |
| 308 | | case 0x00: size = arcompact_handle04_2f_3f_00_dasm(DASM_PARAMS); break; // illegal |
| 309 | | case 0x01: size = arcompact_handle04_2f_3f_01_dasm(DASM_PARAMS); break; // SLEEP |
| 310 | | case 0x02: size = arcompact_handle04_2f_3f_02_dasm(DASM_PARAMS); break; // SWI / TRAP9 |
| 311 | | case 0x03: size = arcompact_handle04_2f_3f_03_dasm(DASM_PARAMS); break; // SYNC |
| 312 | | case 0x04: size = arcompact_handle04_2f_3f_04_dasm(DASM_PARAMS); break; // RTIE |
| 313 | | case 0x05: size = arcompact_handle04_2f_3f_05_dasm(DASM_PARAMS); break; // BRK |
| 314 | | case 0x06: size = arcompact_handle04_2f_3f_06_dasm(DASM_PARAMS); break; // illegal |
| 315 | | case 0x07: size = arcompact_handle04_2f_3f_07_dasm(DASM_PARAMS); break; // illegal |
| 316 | | case 0x08: size = arcompact_handle04_2f_3f_08_dasm(DASM_PARAMS); break; // illegal |
| 317 | | case 0x09: size = arcompact_handle04_2f_3f_09_dasm(DASM_PARAMS); break; // illegal |
| 318 | | case 0x0a: size = arcompact_handle04_2f_3f_0a_dasm(DASM_PARAMS); break; // illegal |
| 319 | | case 0x0b: size = arcompact_handle04_2f_3f_0b_dasm(DASM_PARAMS); break; // illegal |
| 320 | | case 0x0c: size = arcompact_handle04_2f_3f_0c_dasm(DASM_PARAMS); break; // illegal |
| 321 | | case 0x0d: size = arcompact_handle04_2f_3f_0d_dasm(DASM_PARAMS); break; // illegal |
| 322 | | case 0x0e: size = arcompact_handle04_2f_3f_0e_dasm(DASM_PARAMS); break; // illegal |
| 323 | | case 0x0f: size = arcompact_handle04_2f_3f_0f_dasm(DASM_PARAMS); break; // illegal |
| 324 | | case 0x10: size = arcompact_handle04_2f_3f_10_dasm(DASM_PARAMS); break; // illegal |
| 325 | | case 0x11: size = arcompact_handle04_2f_3f_11_dasm(DASM_PARAMS); break; // illegal |
| 326 | | case 0x12: size = arcompact_handle04_2f_3f_12_dasm(DASM_PARAMS); break; // illegal |
| 327 | | case 0x13: size = arcompact_handle04_2f_3f_13_dasm(DASM_PARAMS); break; // illegal |
| 328 | | case 0x14: size = arcompact_handle04_2f_3f_14_dasm(DASM_PARAMS); break; // illegal |
| 329 | | case 0x15: size = arcompact_handle04_2f_3f_15_dasm(DASM_PARAMS); break; // illegal |
| 330 | | case 0x16: size = arcompact_handle04_2f_3f_16_dasm(DASM_PARAMS); break; // illegal |
| 331 | | case 0x17: size = arcompact_handle04_2f_3f_17_dasm(DASM_PARAMS); break; // illegal |
| 332 | | case 0x18: size = arcompact_handle04_2f_3f_18_dasm(DASM_PARAMS); break; // illegal |
| 333 | | case 0x19: size = arcompact_handle04_2f_3f_19_dasm(DASM_PARAMS); break; // illegal |
| 334 | | case 0x1a: size = arcompact_handle04_2f_3f_1a_dasm(DASM_PARAMS); break; // illegal |
| 335 | | case 0x1b: size = arcompact_handle04_2f_3f_1b_dasm(DASM_PARAMS); break; // illegal |
| 336 | | case 0x1c: size = arcompact_handle04_2f_3f_1c_dasm(DASM_PARAMS); break; // illegal |
| 337 | | case 0x1d: size = arcompact_handle04_2f_3f_1d_dasm(DASM_PARAMS); break; // illegal |
| 338 | | case 0x1e: size = arcompact_handle04_2f_3f_1e_dasm(DASM_PARAMS); break; // illegal |
| 339 | | case 0x1f: size = arcompact_handle04_2f_3f_1f_dasm(DASM_PARAMS); break; // illegal |
| 340 | | case 0x20: size = arcompact_handle04_2f_3f_20_dasm(DASM_PARAMS); break; // illegal |
| 341 | | case 0x21: size = arcompact_handle04_2f_3f_21_dasm(DASM_PARAMS); break; // illegal |
| 342 | | case 0x22: size = arcompact_handle04_2f_3f_22_dasm(DASM_PARAMS); break; // illegal |
| 343 | | case 0x23: size = arcompact_handle04_2f_3f_23_dasm(DASM_PARAMS); break; // illegal |
| 344 | | case 0x24: size = arcompact_handle04_2f_3f_24_dasm(DASM_PARAMS); break; // illegal |
| 345 | | case 0x25: size = arcompact_handle04_2f_3f_25_dasm(DASM_PARAMS); break; // illegal |
| 346 | | case 0x26: size = arcompact_handle04_2f_3f_26_dasm(DASM_PARAMS); break; // illegal |
| 347 | | case 0x27: size = arcompact_handle04_2f_3f_27_dasm(DASM_PARAMS); break; // illegal |
| 348 | | case 0x28: size = arcompact_handle04_2f_3f_28_dasm(DASM_PARAMS); break; // illegal |
| 349 | | case 0x29: size = arcompact_handle04_2f_3f_29_dasm(DASM_PARAMS); break; // illegal |
| 350 | | case 0x2a: size = arcompact_handle04_2f_3f_2a_dasm(DASM_PARAMS); break; // illegal |
| 351 | | case 0x2b: size = arcompact_handle04_2f_3f_2b_dasm(DASM_PARAMS); break; // illegal |
| 352 | | case 0x2c: size = arcompact_handle04_2f_3f_2c_dasm(DASM_PARAMS); break; // illegal |
| 353 | | case 0x2d: size = arcompact_handle04_2f_3f_2d_dasm(DASM_PARAMS); break; // illegal |
| 354 | | case 0x2e: size = arcompact_handle04_2f_3f_2e_dasm(DASM_PARAMS); break; // illegal |
| 355 | | case 0x2f: size = arcompact_handle04_2f_3f_2f_dasm(DASM_PARAMS); break; // illegal |
| 356 | | case 0x30: size = arcompact_handle04_2f_3f_30_dasm(DASM_PARAMS); break; // illegal |
| 357 | | case 0x31: size = arcompact_handle04_2f_3f_31_dasm(DASM_PARAMS); break; // illegal |
| 358 | | case 0x32: size = arcompact_handle04_2f_3f_32_dasm(DASM_PARAMS); break; // illegal |
| 359 | | case 0x33: size = arcompact_handle04_2f_3f_33_dasm(DASM_PARAMS); break; // illegal |
| 360 | | case 0x34: size = arcompact_handle04_2f_3f_34_dasm(DASM_PARAMS); break; // illegal |
| 361 | | case 0x35: size = arcompact_handle04_2f_3f_35_dasm(DASM_PARAMS); break; // illegal |
| 362 | | case 0x36: size = arcompact_handle04_2f_3f_36_dasm(DASM_PARAMS); break; // illegal |
| 363 | | case 0x37: size = arcompact_handle04_2f_3f_37_dasm(DASM_PARAMS); break; // illegal |
| 364 | | case 0x38: size = arcompact_handle04_2f_3f_38_dasm(DASM_PARAMS); break; // illegal |
| 365 | | case 0x39: size = arcompact_handle04_2f_3f_39_dasm(DASM_PARAMS); break; // illegal |
| 366 | | case 0x3a: size = arcompact_handle04_2f_3f_3a_dasm(DASM_PARAMS); break; // illegal |
| 367 | | case 0x3b: size = arcompact_handle04_2f_3f_3b_dasm(DASM_PARAMS); break; // illegal |
| 368 | | case 0x3c: size = arcompact_handle04_2f_3f_3c_dasm(DASM_PARAMS); break; // illegal |
| 369 | | case 0x3d: size = arcompact_handle04_2f_3f_3d_dasm(DASM_PARAMS); break; // illegal |
| 370 | | case 0x3e: size = arcompact_handle04_2f_3f_3e_dasm(DASM_PARAMS); break; // illegal |
| 371 | | case 0x3f: size = arcompact_handle04_2f_3f_3f_dasm(DASM_PARAMS); break; // illegal |
| 372 | | } |
| 373 | | |
| 374 | | return size; |
| 375 | | } |
| 376 | | |
| 377 | | // this is an Extension ALU group, maybe optional on some CPUs? |
| 378 | | int arcompact_handle05_dasm(DASM_OPS_32) |
| 379 | | { |
| 380 | | int size = 4; |
| 381 | | UINT8 subinstr = (op & 0x003f0000) >> 16; |
| 382 | | op &= ~0x003f0000; |
| 383 | | |
| 384 | | switch (subinstr) |
| 385 | | { |
| 386 | | case 0x00: size = arcompact_handle05_00_dasm(DASM_PARAMS); break; // ASL |
| 387 | | case 0x01: size = arcompact_handle05_01_dasm(DASM_PARAMS); break; // LSR |
| 388 | | case 0x02: size = arcompact_handle05_02_dasm(DASM_PARAMS); break; // ASR |
| 389 | | case 0x03: size = arcompact_handle05_03_dasm(DASM_PARAMS); break; // ROR |
| 390 | | case 0x04: size = arcompact_handle05_04_dasm(DASM_PARAMS); break; // MUL64 |
| 391 | | case 0x05: size = arcompact_handle05_05_dasm(DASM_PARAMS); break; // MULU64 |
| 392 | | case 0x06: size = arcompact_handle05_06_dasm(DASM_PARAMS); break; // ADDS |
| 393 | | case 0x07: size = arcompact_handle05_07_dasm(DASM_PARAMS); break; // SUBS |
| 394 | | case 0x08: size = arcompact_handle05_08_dasm(DASM_PARAMS); break; // DIVAW |
| 395 | | case 0x09: size = arcompact_handle05_09_dasm(DASM_PARAMS); break; // illegal |
| 396 | | case 0x0a: size = arcompact_handle05_0a_dasm(DASM_PARAMS); break; // ASLS |
| 397 | | case 0x0b: size = arcompact_handle05_0b_dasm(DASM_PARAMS); break; // ASRS |
| 398 | | case 0x0c: size = arcompact_handle05_0c_dasm(DASM_PARAMS); break; // illegal |
| 399 | | case 0x0d: size = arcompact_handle05_0d_dasm(DASM_PARAMS); break; // illegal |
| 400 | | case 0x0e: size = arcompact_handle05_0e_dasm(DASM_PARAMS); break; // illegal |
| 401 | | case 0x0f: size = arcompact_handle05_0f_dasm(DASM_PARAMS); break; // illegal |
| 402 | | case 0x10: size = arcompact_handle05_10_dasm(DASM_PARAMS); break; // illegal |
| 403 | | case 0x11: size = arcompact_handle05_11_dasm(DASM_PARAMS); break; // illegal |
| 404 | | case 0x12: size = arcompact_handle05_12_dasm(DASM_PARAMS); break; // illegal |
| 405 | | case 0x13: size = arcompact_handle05_13_dasm(DASM_PARAMS); break; // illegal |
| 406 | | case 0x14: size = arcompact_handle05_14_dasm(DASM_PARAMS); break; // illegal |
| 407 | | case 0x15: size = arcompact_handle05_15_dasm(DASM_PARAMS); break; // illegal |
| 408 | | case 0x16: size = arcompact_handle05_16_dasm(DASM_PARAMS); break; // illegal |
| 409 | | case 0x17: size = arcompact_handle05_17_dasm(DASM_PARAMS); break; // illegal |
| 410 | | case 0x18: size = arcompact_handle05_18_dasm(DASM_PARAMS); break; // illegal |
| 411 | | case 0x19: size = arcompact_handle05_19_dasm(DASM_PARAMS); break; // illegal |
| 412 | | case 0x1a: size = arcompact_handle05_1a_dasm(DASM_PARAMS); break; // illegal |
| 413 | | case 0x1b: size = arcompact_handle05_1b_dasm(DASM_PARAMS); break; // illegal |
| 414 | | case 0x1c: size = arcompact_handle05_1c_dasm(DASM_PARAMS); break; // illegal |
| 415 | | case 0x1d: size = arcompact_handle05_1d_dasm(DASM_PARAMS); break; // illegal |
| 416 | | case 0x1e: size = arcompact_handle05_1e_dasm(DASM_PARAMS); break; // illegal |
| 417 | | case 0x1f: size = arcompact_handle05_1f_dasm(DASM_PARAMS); break; // illegal |
| 418 | | case 0x20: size = arcompact_handle05_20_dasm(DASM_PARAMS); break; // illegal |
| 419 | | case 0x21: size = arcompact_handle05_21_dasm(DASM_PARAMS); break; // illegal |
| 420 | | case 0x22: size = arcompact_handle05_22_dasm(DASM_PARAMS); break; // illegal |
| 421 | | case 0x23: size = arcompact_handle05_23_dasm(DASM_PARAMS); break; // illegal |
| 422 | | case 0x24: size = arcompact_handle05_24_dasm(DASM_PARAMS); break; // illegal |
| 423 | | case 0x25: size = arcompact_handle05_25_dasm(DASM_PARAMS); break; // illegal |
| 424 | | case 0x26: size = arcompact_handle05_26_dasm(DASM_PARAMS); break; // illegal |
| 425 | | case 0x27: size = arcompact_handle05_27_dasm(DASM_PARAMS); break; // illegal |
| 426 | | case 0x28: size = arcompact_handle05_28_dasm(DASM_PARAMS); break; // ADDSDW |
| 427 | | case 0x29: size = arcompact_handle05_29_dasm(DASM_PARAMS); break; // SUBSDW |
| 428 | | case 0x2a: size = arcompact_handle05_2a_dasm(DASM_PARAMS); break; // illegal |
| 429 | | case 0x2b: size = arcompact_handle05_2b_dasm(DASM_PARAMS); break; // illegal |
| 430 | | case 0x2c: size = arcompact_handle05_2c_dasm(DASM_PARAMS); break; // illegal |
| 431 | | case 0x2d: size = arcompact_handle05_2d_dasm(DASM_PARAMS); break; // illegal |
| 432 | | case 0x2e: size = arcompact_handle05_2e_dasm(DASM_PARAMS); break; // illegal |
| 433 | | case 0x2f: size = arcompact_handle05_2f_dasm(DASM_PARAMS); break; // SOPs |
| 434 | | case 0x30: size = arcompact_handle05_30_dasm(DASM_PARAMS); break; // illegal |
| 435 | | case 0x31: size = arcompact_handle05_31_dasm(DASM_PARAMS); break; // illegal |
| 436 | | case 0x32: size = arcompact_handle05_32_dasm(DASM_PARAMS); break; // illegal |
| 437 | | case 0x33: size = arcompact_handle05_33_dasm(DASM_PARAMS); break; // illegal |
| 438 | | case 0x34: size = arcompact_handle05_34_dasm(DASM_PARAMS); break; // illegal |
| 439 | | case 0x35: size = arcompact_handle05_35_dasm(DASM_PARAMS); break; // illegal |
| 440 | | case 0x36: size = arcompact_handle05_36_dasm(DASM_PARAMS); break; // illegal |
| 441 | | case 0x37: size = arcompact_handle05_37_dasm(DASM_PARAMS); break; // illegal |
| 442 | | case 0x38: size = arcompact_handle05_38_dasm(DASM_PARAMS); break; // illegal |
| 443 | | case 0x39: size = arcompact_handle05_39_dasm(DASM_PARAMS); break; // illegal |
| 444 | | case 0x3a: size = arcompact_handle05_3a_dasm(DASM_PARAMS); break; // illegal |
| 445 | | case 0x3b: size = arcompact_handle05_3b_dasm(DASM_PARAMS); break; // illegal |
| 446 | | case 0x3c: size = arcompact_handle05_3c_dasm(DASM_PARAMS); break; // illegal |
| 447 | | case 0x3d: size = arcompact_handle05_3d_dasm(DASM_PARAMS); break; // illegal |
| 448 | | case 0x3e: size = arcompact_handle05_3e_dasm(DASM_PARAMS); break; // illegal |
| 449 | | case 0x3f: size = arcompact_handle05_3f_dasm(DASM_PARAMS); break; // illegal |
| 450 | | } |
| 451 | | |
| 452 | | return size; |
| 453 | | } |
| 454 | | |
| 455 | | int arcompact_handle0c_dasm(DASM_OPS_16) |
| 456 | | { |
| 457 | | int size = 2; |
| 458 | | UINT8 subinstr = (op & 0x0018) >> 3; |
| 459 | | op &= ~0x0018; |
| 460 | | |
| 461 | | switch (subinstr) |
| 462 | | { |
| 463 | | case 0x00: size = arcompact_handle0c_00_dasm(DASM_PARAMS); break; // LD_S |
| 464 | | case 0x01: size = arcompact_handle0c_01_dasm(DASM_PARAMS); break; // LDB_S |
| 465 | | case 0x02: size = arcompact_handle0c_02_dasm(DASM_PARAMS); break; // LDW_S |
| 466 | | case 0x03: size = arcompact_handle0c_03_dasm(DASM_PARAMS); break; // ADD_S |
| 467 | | } |
| 468 | | return size; |
| 469 | | } |
| 470 | | |
| 471 | | int arcompact_handle0d_dasm(DASM_OPS_16) |
| 472 | | { |
| 473 | | int size = 2; |
| 474 | | UINT8 subinstr = (op & 0x0018) >> 3; |
| 475 | | op &= ~0x0018; |
| 476 | | |
| 477 | | switch (subinstr) |
| 478 | | { |
| 479 | | case 0x00: size = arcompact_handle0d_00_dasm(DASM_PARAMS); break; // ADD_S |
| 480 | | case 0x01: size = arcompact_handle0d_01_dasm(DASM_PARAMS); break; // SUB_S |
| 481 | | case 0x02: size = arcompact_handle0d_02_dasm(DASM_PARAMS); break; // ASL_S |
| 482 | | case 0x03: size = arcompact_handle0d_03_dasm(DASM_PARAMS); break; // ASR_S |
| 483 | | } |
| 484 | | return size; |
| 485 | | } |
| 486 | | |
| 487 | | int arcompact_handle0e_dasm(DASM_OPS_16) |
| 488 | | { |
| 489 | | int size = 2; |
| 490 | | UINT8 subinstr = (op & 0x0018) >> 3; |
| 491 | | op &= ~0x0018; |
| 492 | | |
| 493 | | switch (subinstr) |
| 494 | | { |
| 495 | | case 0x00: size = arcompact_handle0e_00_dasm(DASM_PARAMS); break; // ADD_S |
| 496 | | case 0x01: size = arcompact_handle0e_01_dasm(DASM_PARAMS); break; // MOV_S |
| 497 | | case 0x02: size = arcompact_handle0e_02_dasm(DASM_PARAMS); break; // CMP_S |
| 498 | | case 0x03: size = arcompact_handle0e_03_dasm(DASM_PARAMS); break; // MOV_S |
| 499 | | } |
| 500 | | return size; |
| 501 | | } |
| 502 | | |
| 503 | | int arcompact_handle0f_dasm(DASM_OPS_16) |
| 504 | | { |
| 505 | | int size = 2; |
| 506 | | // General Register Instructions (16-bit) |
| 507 | | // 01111 bbb ccc iiiii |
| 508 | | UINT8 subinstr = (op & 0x01f) >> 0; |
| 509 | | op &= ~0x001f; |
| 510 | | |
| 511 | | switch (subinstr) |
| 512 | | { |
| 513 | | case 0x00: size = arcompact_handle0f_00_dasm(DASM_PARAMS); break; // SOPs |
| 514 | | case 0x01: size = arcompact_handle0f_01_dasm(DASM_PARAMS); break; // 0x01 <illegal> |
| 515 | | case 0x02: size = arcompact_handle0f_02_dasm(DASM_PARAMS); break; // SUB_S |
| 516 | | case 0x03: size = arcompact_handle0f_03_dasm(DASM_PARAMS); break; // 0x03 <illegal> |
| 517 | | case 0x04: size = arcompact_handle0f_04_dasm(DASM_PARAMS); break; // AND_S |
| 518 | | case 0x05: size = arcompact_handle0f_05_dasm(DASM_PARAMS); break; // OR_S |
| 519 | | case 0x06: size = arcompact_handle0f_06_dasm(DASM_PARAMS); break; // BIC_S |
| 520 | | case 0x07: size = arcompact_handle0f_07_dasm(DASM_PARAMS); break; // XOR_S |
| 521 | | case 0x08: size = arcompact_handle0f_08_dasm(DASM_PARAMS); break; // 0x08 <illegal> |
| 522 | | case 0x09: size = arcompact_handle0f_09_dasm(DASM_PARAMS); break; // 0x09 <illegal> |
| 523 | | case 0x0a: size = arcompact_handle0f_0a_dasm(DASM_PARAMS); break; // 0x0a <illegal> |
| 524 | | case 0x0b: size = arcompact_handle0f_0b_dasm(DASM_PARAMS); break; // TST_S |
| 525 | | case 0x0c: size = arcompact_handle0f_0c_dasm(DASM_PARAMS); break; // MUL64_S |
| 526 | | case 0x0d: size = arcompact_handle0f_0d_dasm(DASM_PARAMS); break; // SEXB_S |
| 527 | | case 0x0e: size = arcompact_handle0f_0e_dasm(DASM_PARAMS); break; // SEXW_S |
| 528 | | case 0x0f: size = arcompact_handle0f_0f_dasm(DASM_PARAMS); break; // EXTB_S |
| 529 | | case 0x10: size = arcompact_handle0f_10_dasm(DASM_PARAMS); break; // EXTW_S |
| 530 | | case 0x11: size = arcompact_handle0f_11_dasm(DASM_PARAMS); break; // ABS_S |
| 531 | | case 0x12: size = arcompact_handle0f_12_dasm(DASM_PARAMS); break; // NOT_S |
| 532 | | case 0x13: size = arcompact_handle0f_13_dasm(DASM_PARAMS); break; // NEG_S |
| 533 | | case 0x14: size = arcompact_handle0f_14_dasm(DASM_PARAMS); break; // ADD1_S |
| 534 | | case 0x15: size = arcompact_handle0f_15_dasm(DASM_PARAMS); break; // ADD2_S |
| 535 | | case 0x16: size = arcompact_handle0f_16_dasm(DASM_PARAMS); break; // ADD3_S |
| 536 | | case 0x17: size = arcompact_handle0f_17_dasm(DASM_PARAMS); break; // 0x17 <illegal> |
| 537 | | case 0x18: size = arcompact_handle0f_18_dasm(DASM_PARAMS); break; // ASL_S (multiple) |
| 538 | | case 0x19: size = arcompact_handle0f_19_dasm(DASM_PARAMS); break; // LSR_S (multiple) |
| 539 | | case 0x1a: size = arcompact_handle0f_1a_dasm(DASM_PARAMS); break; // ASR_S (multiple) |
| 540 | | case 0x1b: size = arcompact_handle0f_1b_dasm(DASM_PARAMS); break; // ASL_S (single) |
| 541 | | case 0x1c: size = arcompact_handle0f_1c_dasm(DASM_PARAMS); break; // LSR_S (single) |
| 542 | | case 0x1d: size = arcompact_handle0f_1d_dasm(DASM_PARAMS); break; // ASR_S (single) |
| 543 | | case 0x1e: size = arcompact_handle0f_1e_dasm(DASM_PARAMS); break; // TRAP (not a5?) |
| 544 | | case 0x1f: size = arcompact_handle0f_1f_dasm(DASM_PARAMS); break; // BRK_S ( 0x7fff only? ) |
| 545 | | |
| 546 | | } |
| 547 | | return size; |
| 548 | | } |
| 549 | | |
| 550 | | int arcompact_handle0f_00_dasm(DASM_OPS_16) |
| 551 | | { |
| 552 | | int size = 2; |
| 553 | | UINT8 subinstr = (op & 0x00e0) >> 5; |
| 554 | | op &= ~0x00e0; |
| 555 | | |
| 556 | | switch (subinstr) |
| 557 | | { |
| 558 | | case 0x00: size = arcompact_handle0f_00_00_dasm(DASM_PARAMS); break; // J_S |
| 559 | | case 0x01: size = arcompact_handle0f_00_01_dasm(DASM_PARAMS); break; // J_S.D |
| 560 | | case 0x02: size = arcompact_handle0f_00_02_dasm(DASM_PARAMS); break; // JL_S |
| 561 | | case 0x03: size = arcompact_handle0f_00_03_dasm(DASM_PARAMS); break; // JL_S.D |
| 562 | | case 0x04: size = arcompact_handle0f_00_04_dasm(DASM_PARAMS); break; // 0x04 <illegal> |
| 563 | | case 0x05: size = arcompact_handle0f_00_05_dasm(DASM_PARAMS); break; // 0x05 <illegal> |
| 564 | | case 0x06: size = arcompact_handle0f_00_06_dasm(DASM_PARAMS); break; // SUB_S.NE |
| 565 | | case 0x07: size = arcompact_handle0f_00_07_dasm(DASM_PARAMS); break; // ZOPs |
| 566 | | |
| 567 | | } |
| 568 | | |
| 569 | | return size; |
| 570 | | } |
| 571 | | |
| 572 | | int arcompact_handle0f_00_07_dasm(DASM_OPS_16) |
| 573 | | { |
| 574 | | int size = 2; |
| 575 | | // General Operations w/o Register |
| 576 | | // 01111 iii 111 00000 |
| 577 | | UINT8 subinstr3 = (op & 0x0700) >> 8; |
| 578 | | op &= ~0x0700; |
| 579 | | |
| 580 | | switch (subinstr3) |
| 581 | | { |
| 582 | | case 0x00: size = arcompact_handle0f_00_07_00_dasm(DASM_PARAMS); break; // NOP_S |
| 583 | | case 0x01: size = arcompact_handle0f_00_07_01_dasm(DASM_PARAMS); break; // UNIMP_S |
| 584 | | case 0x02: size = arcompact_handle0f_00_07_02_dasm(DASM_PARAMS); break; // 0x02 <illegal> |
| 585 | | case 0x03: size = arcompact_handle0f_00_07_03_dasm(DASM_PARAMS); break; // 0x03 <illegal> |
| 586 | | case 0x04: size = arcompact_handle0f_00_07_04_dasm(DASM_PARAMS); break; // JEQ_S [BLINK] |
| 587 | | case 0x05: size = arcompact_handle0f_00_07_05_dasm(DASM_PARAMS); break; // JNE_S [BLINK] |
| 588 | | case 0x06: size = arcompact_handle0f_00_07_06_dasm(DASM_PARAMS); break; // J_S [BLINK] |
| 589 | | case 0x07: size = arcompact_handle0f_00_07_07_dasm(DASM_PARAMS); break; // J_S.D [BLINK] |
| 590 | | |
| 591 | | } |
| 592 | | return size; |
| 593 | | } |
| 594 | | |
| 595 | | int arcompact_handle17_dasm(DASM_OPS_16) |
| 596 | | { |
| 597 | | int size = 2; |
| 598 | | UINT8 subinstr = (op & 0x00e0) >> 5; |
| 599 | | op &= ~0x00e0; |
| 600 | | |
| 601 | | switch (subinstr) |
| 602 | | { |
| 603 | | case 0x00: size = arcompact_handle17_00_dasm(DASM_PARAMS); break; // ASL_S |
| 604 | | case 0x01: size = arcompact_handle17_01_dasm(DASM_PARAMS); break; // LSR_S |
| 605 | | case 0x02: size = arcompact_handle17_02_dasm(DASM_PARAMS); break; // ASR_S |
| 606 | | case 0x03: size = arcompact_handle17_03_dasm(DASM_PARAMS); break; // SUB_S |
| 607 | | case 0x04: size = arcompact_handle17_04_dasm(DASM_PARAMS); break; // BSET_S |
| 608 | | case 0x05: size = arcompact_handle17_05_dasm(DASM_PARAMS); break; // BCLR_S |
| 609 | | case 0x06: size = arcompact_handle17_06_dasm(DASM_PARAMS); break; // BMSK_S |
| 610 | | case 0x07: size = arcompact_handle17_07_dasm(DASM_PARAMS); break; // BTST_S |
| 611 | | } |
| 612 | | |
| 613 | | return size; |
| 614 | | } |
| 615 | | |
| 616 | | int arcompact_handle18_dasm(DASM_OPS_16) |
| 617 | | { |
| 618 | | int size = 2; |
| 619 | | // Stack Pointer Based Instructions (16-bit) |
| 620 | | // 11000 bbb iii uuuuu |
| 621 | | UINT8 subinstr = (op & 0x00e0) >> 5; |
| 622 | | op &= ~0x00e0; |
| 623 | | |
| 624 | | switch (subinstr) |
| 625 | | { |
| 626 | | case 0x00: size = arcompact_handle18_00_dasm(DASM_PARAMS); break; // LD_S (SP) |
| 627 | | case 0x01: size = arcompact_handle18_01_dasm(DASM_PARAMS); break; // LDB_S (SP) |
| 628 | | case 0x02: size = arcompact_handle18_02_dasm(DASM_PARAMS); break; // ST_S (SP) |
| 629 | | case 0x03: size = arcompact_handle18_03_dasm(DASM_PARAMS); break; // STB_S (SP) |
| 630 | | case 0x04: size = arcompact_handle18_04_dasm(DASM_PARAMS); break; // ADD_S (SP) |
| 631 | | case 0x05: size = arcompact_handle18_05_dasm(DASM_PARAMS); break; // subtable 18_05 |
| 632 | | case 0x06: size = arcompact_handle18_06_dasm(DASM_PARAMS); break; // subtable 18_06 |
| 633 | | case 0x07: size = arcompact_handle18_07_dasm(DASM_PARAMS); break; // subtable 18_07 |
| 634 | | } |
| 635 | | |
| 636 | | return size; |
| 637 | | } |
| 638 | | |
| 639 | | int arcompact_handle18_05_dasm(DASM_OPS_16) |
| 640 | | { |
| 641 | | int size = 2; |
| 642 | | UINT8 subinstr2 = (op & 0x0700) >> 8; |
| 643 | | op &= ~0x001f; |
| 644 | | |
| 645 | | switch (subinstr2) |
| 646 | | { |
| 647 | | case 0x00: size = arcompact_handle18_05_00_dasm(DASM_PARAMS); break; // ADD_S (SP) |
| 648 | | case 0x01: size = arcompact_handle18_05_01_dasm(DASM_PARAMS); break; // SUB_S (SP) |
| 649 | | case 0x02: size = arcompact_handle18_05_02_dasm(DASM_PARAMS); break; // <illegal 0x18_05_02> |
| 650 | | case 0x03: size = arcompact_handle18_05_03_dasm(DASM_PARAMS); break; // <illegal 0x18_05_03> |
| 651 | | case 0x04: size = arcompact_handle18_05_04_dasm(DASM_PARAMS); break; // <illegal 0x18_05_04> |
| 652 | | case 0x05: size = arcompact_handle18_05_05_dasm(DASM_PARAMS); break; // <illegal 0x18_05_05> |
| 653 | | case 0x06: size = arcompact_handle18_05_06_dasm(DASM_PARAMS); break; // <illegal 0x18_05_06> |
| 654 | | case 0x07: size = arcompact_handle18_05_07_dasm(DASM_PARAMS); break; // <illegal 0x18_05_07> |
| 655 | | } |
| 656 | | |
| 657 | | return size; |
| 658 | | } |
| 659 | | |
| 660 | | int arcompact_handle18_06_dasm(DASM_OPS_16) |
| 661 | | { |
| 662 | | int size = 2; |
| 663 | | UINT8 subinstr2 = (op & 0x001f) >> 0; |
| 664 | | op &= ~0x001f; |
| 665 | | |
| 666 | | switch (subinstr2) |
| 667 | | { |
| 668 | | case 0x00: size = arcompact_handle18_06_00_dasm(DASM_PARAMS); break; // <illegal 0x18_06_00> |
| 669 | | case 0x01: size = arcompact_handle18_06_01_dasm(DASM_PARAMS); break; // POP_S b |
| 670 | | case 0x02: size = arcompact_handle18_06_02_dasm(DASM_PARAMS); break; // <illegal 0x18_06_02> |
| 671 | | case 0x03: size = arcompact_handle18_06_03_dasm(DASM_PARAMS); break; // <illegal 0x18_06_03> |
| 672 | | case 0x04: size = arcompact_handle18_06_04_dasm(DASM_PARAMS); break; // <illegal 0x18_06_04> |
| 673 | | case 0x05: size = arcompact_handle18_06_05_dasm(DASM_PARAMS); break; // <illegal 0x18_06_05> |
| 674 | | case 0x06: size = arcompact_handle18_06_06_dasm(DASM_PARAMS); break; // <illegal 0x18_06_06> |
| 675 | | case 0x07: size = arcompact_handle18_06_07_dasm(DASM_PARAMS); break; // <illegal 0x18_06_07> |
| 676 | | case 0x08: size = arcompact_handle18_06_08_dasm(DASM_PARAMS); break; // <illegal 0x18_06_08> |
| 677 | | case 0x09: size = arcompact_handle18_06_09_dasm(DASM_PARAMS); break; // <illegal 0x18_06_09> |
| 678 | | case 0x0a: size = arcompact_handle18_06_0a_dasm(DASM_PARAMS); break; // <illegal 0x18_06_0a> |
| 679 | | case 0x0b: size = arcompact_handle18_06_0b_dasm(DASM_PARAMS); break; // <illegal 0x18_06_0b> |
| 680 | | case 0x0c: size = arcompact_handle18_06_0c_dasm(DASM_PARAMS); break; // <illegal 0x18_06_0c> |
| 681 | | case 0x0d: size = arcompact_handle18_06_0d_dasm(DASM_PARAMS); break; // <illegal 0x18_06_0d> |
| 682 | | case 0x0e: size = arcompact_handle18_06_0e_dasm(DASM_PARAMS); break; // <illegal 0x18_06_0e> |
| 683 | | case 0x0f: size = arcompact_handle18_06_0f_dasm(DASM_PARAMS); break; // <illegal 0x18_06_0f> |
| 684 | | case 0x10: size = arcompact_handle18_06_10_dasm(DASM_PARAMS); break; // <illegal 0x18_06_10> |
| 685 | | case 0x11: size = arcompact_handle18_06_11_dasm(DASM_PARAMS); break; // POP_S blink |
| 686 | | case 0x12: size = arcompact_handle18_06_12_dasm(DASM_PARAMS); break; // <illegal 0x18_06_12> |
| 687 | | case 0x13: size = arcompact_handle18_06_13_dasm(DASM_PARAMS); break; // <illegal 0x18_06_13> |
| 688 | | case 0x14: size = arcompact_handle18_06_14_dasm(DASM_PARAMS); break; // <illegal 0x18_06_14> |
| 689 | | case 0x15: size = arcompact_handle18_06_15_dasm(DASM_PARAMS); break; // <illegal 0x18_06_15> |
| 690 | | case 0x16: size = arcompact_handle18_06_16_dasm(DASM_PARAMS); break; // <illegal 0x18_06_16> |
| 691 | | case 0x17: size = arcompact_handle18_06_17_dasm(DASM_PARAMS); break; // <illegal 0x18_06_17> |
| 692 | | case 0x18: size = arcompact_handle18_06_18_dasm(DASM_PARAMS); break; // <illegal 0x18_06_18> |
| 693 | | case 0x19: size = arcompact_handle18_06_19_dasm(DASM_PARAMS); break; // <illegal 0x18_06_19> |
| 694 | | case 0x1a: size = arcompact_handle18_06_1a_dasm(DASM_PARAMS); break; // <illegal 0x18_06_1a> |
| 695 | | case 0x1b: size = arcompact_handle18_06_1b_dasm(DASM_PARAMS); break; // <illegal 0x18_06_1b> |
| 696 | | case 0x1c: size = arcompact_handle18_06_1c_dasm(DASM_PARAMS); break; // <illegal 0x18_06_1c> |
| 697 | | case 0x1d: size = arcompact_handle18_06_1d_dasm(DASM_PARAMS); break; // <illegal 0x18_06_1d> |
| 698 | | case 0x1e: size = arcompact_handle18_06_1e_dasm(DASM_PARAMS); break; // <illegal 0x18_06_1e> |
| 699 | | case 0x1f: size = arcompact_handle18_06_1f_dasm(DASM_PARAMS); break; // <illegal 0x18_06_1f> |
| 700 | | } |
| 701 | | |
| 702 | | return size; |
| 703 | | } |
| 704 | | |
| 705 | | int arcompact_handle18_07_dasm(DASM_OPS_16) |
| 706 | | { |
| 707 | | int size = 2; |
| 708 | | UINT8 subinstr2 = (op & 0x001f) >> 0; |
| 709 | | op &= ~0x001f; |
| 710 | | |
| 711 | | switch (subinstr2) |
| 712 | | { |
| 713 | | case 0x00: size = arcompact_handle18_07_00_dasm(DASM_PARAMS); break; // <illegal 0x18_07_00> |
| 714 | | case 0x01: size = arcompact_handle18_07_01_dasm(DASM_PARAMS); break; // PUSH_S b |
| 715 | | case 0x02: size = arcompact_handle18_07_02_dasm(DASM_PARAMS); break; // <illegal 0x18_07_02> |
| 716 | | case 0x03: size = arcompact_handle18_07_03_dasm(DASM_PARAMS); break; // <illegal 0x18_07_03> |
| 717 | | case 0x04: size = arcompact_handle18_07_04_dasm(DASM_PARAMS); break; // <illegal 0x18_07_04> |
| 718 | | case 0x05: size = arcompact_handle18_07_05_dasm(DASM_PARAMS); break; // <illegal 0x18_07_05> |
| 719 | | case 0x06: size = arcompact_handle18_07_06_dasm(DASM_PARAMS); break; // <illegal 0x18_07_06> |
| 720 | | case 0x07: size = arcompact_handle18_07_07_dasm(DASM_PARAMS); break; // <illegal 0x18_07_07> |
| 721 | | case 0x08: size = arcompact_handle18_07_08_dasm(DASM_PARAMS); break; // <illegal 0x18_07_08> |
| 722 | | case 0x09: size = arcompact_handle18_07_09_dasm(DASM_PARAMS); break; // <illegal 0x18_07_09> |
| 723 | | case 0x0a: size = arcompact_handle18_07_0a_dasm(DASM_PARAMS); break; // <illegal 0x18_07_0a> |
| 724 | | case 0x0b: size = arcompact_handle18_07_0b_dasm(DASM_PARAMS); break; // <illegal 0x18_07_0b> |
| 725 | | case 0x0c: size = arcompact_handle18_07_0c_dasm(DASM_PARAMS); break; // <illegal 0x18_07_0c> |
| 726 | | case 0x0d: size = arcompact_handle18_07_0d_dasm(DASM_PARAMS); break; // <illegal 0x18_07_0d> |
| 727 | | case 0x0e: size = arcompact_handle18_07_0e_dasm(DASM_PARAMS); break; // <illegal 0x18_07_0e> |
| 728 | | case 0x0f: size = arcompact_handle18_07_0f_dasm(DASM_PARAMS); break; // <illegal 0x18_07_0f> |
| 729 | | case 0x10: size = arcompact_handle18_07_10_dasm(DASM_PARAMS); break; // <illegal 0x18_07_10> |
| 730 | | case 0x11: size = arcompact_handle18_07_11_dasm(DASM_PARAMS); break; // PUSH_S blink |
| 731 | | case 0x12: size = arcompact_handle18_07_12_dasm(DASM_PARAMS); break; // <illegal 0x18_07_12> |
| 732 | | case 0x13: size = arcompact_handle18_07_13_dasm(DASM_PARAMS); break; // <illegal 0x18_07_13> |
| 733 | | case 0x14: size = arcompact_handle18_07_14_dasm(DASM_PARAMS); break; // <illegal 0x18_07_14> |
| 734 | | case 0x15: size = arcompact_handle18_07_15_dasm(DASM_PARAMS); break; // <illegal 0x18_07_15> |
| 735 | | case 0x16: size = arcompact_handle18_07_16_dasm(DASM_PARAMS); break; // <illegal 0x18_07_16> |
| 736 | | case 0x17: size = arcompact_handle18_07_17_dasm(DASM_PARAMS); break; // <illegal 0x18_07_17> |
| 737 | | case 0x18: size = arcompact_handle18_07_18_dasm(DASM_PARAMS); break; // <illegal 0x18_07_18> |
| 738 | | case 0x19: size = arcompact_handle18_07_19_dasm(DASM_PARAMS); break; // <illegal 0x18_07_19> |
| 739 | | case 0x1a: size = arcompact_handle18_07_1a_dasm(DASM_PARAMS); break; // <illegal 0x18_07_1a> |
| 740 | | case 0x1b: size = arcompact_handle18_07_1b_dasm(DASM_PARAMS); break; // <illegal 0x18_07_1b> |
| 741 | | case 0x1c: size = arcompact_handle18_07_1c_dasm(DASM_PARAMS); break; // <illegal 0x18_07_1c> |
| 742 | | case 0x1d: size = arcompact_handle18_07_1d_dasm(DASM_PARAMS); break; // <illegal 0x18_07_1d> |
| 743 | | case 0x1e: size = arcompact_handle18_07_1e_dasm(DASM_PARAMS); break; // <illegal 0x18_07_1e> |
| 744 | | case 0x1f: size = arcompact_handle18_07_1f_dasm(DASM_PARAMS); break; // <illegal 0x18_07_1f> |
| 745 | | } |
| 746 | | |
| 747 | | return size; |
| 748 | | } |
| 749 | | |
| 750 | | int arcompact_handle19_dasm(DASM_OPS_16) |
| 751 | | { |
| 752 | | int size = 2; |
| 753 | | UINT8 subinstr = (op & 0x0600) >> 9; |
| 754 | | op &= ~0x0600; |
| 755 | | |
| 756 | | switch (subinstr) |
| 757 | | { |
| 758 | | case 0x00: size = arcompact_handle19_00_dasm(DASM_PARAMS); break; // LD_S (GP) |
| 759 | | case 0x01: size = arcompact_handle19_01_dasm(DASM_PARAMS); break; // LDB_S (GP) |
| 760 | | case 0x02: size = arcompact_handle19_02_dasm(DASM_PARAMS); break; // LDW_S (GP) |
| 761 | | case 0x03: size = arcompact_handle19_03_dasm(DASM_PARAMS); break; // ADD_S (GP) |
| 762 | | } |
| 763 | | return size; |
| 764 | | } |
| 765 | | |
| 766 | | int arcompact_handle1c_dasm(DASM_OPS_16) |
| 767 | | { |
| 768 | | int size = 2; |
| 769 | | UINT8 subinstr = (op & 0x0080) >> 7; |
| 770 | | op &= ~0x0080; |
| 771 | | |
| 772 | | switch (subinstr) |
| 773 | | { |
| 774 | | case 0x00: size = arcompact_handle1c_00_dasm(DASM_PARAMS); break; // ADD_S |
| 775 | | case 0x01: size = arcompact_handle1c_01_dasm(DASM_PARAMS); break; // CMP_S |
| 776 | | } |
| 777 | | return size; |
| 778 | | } |
| 779 | | |
| 780 | | int arcompact_handle1d_dasm(DASM_OPS_16) |
| 781 | | { |
| 782 | | int size = 2; |
| 783 | | UINT8 subinstr = (op & 0x0080) >> 7; |
| 784 | | op &= ~0x0080; |
| 785 | | |
| 786 | | switch (subinstr) |
| 787 | | { |
| 788 | | case 0x00: size = arcompact_handle1d_00_dasm(DASM_PARAMS); break; // BREQ_S |
| 789 | | case 0x01: size = arcompact_handle1d_01_dasm(DASM_PARAMS); break; // BRNE_S |
| 790 | | } |
| 791 | | return size; |
| 792 | | } |
| 793 | | |
| 794 | | int arcompact_handle1e_dasm(DASM_OPS_16) |
| 795 | | { |
| 796 | | int size = 2; |
| 797 | | UINT8 subinstr = (op & 0x0600) >> 9; |
| 798 | | op &= ~0x0600; |
| 799 | | |
| 800 | | switch (subinstr) |
| 801 | | { |
| 802 | | case 0x00: size = arcompact_handle1e_00_dasm(DASM_PARAMS); break; // B_S |
| 803 | | case 0x01: size = arcompact_handle1e_01_dasm(DASM_PARAMS); break; // BEQ_S |
| 804 | | case 0x02: size = arcompact_handle1e_02_dasm(DASM_PARAMS); break; // BNE_S |
| 805 | | case 0x03: size = arcompact_handle1e_03_dasm(DASM_PARAMS); break; // Bcc_S |
| 806 | | } |
| 807 | | return size; |
| 808 | | } |
| 809 | | |
| 810 | | int arcompact_handle1e_03_dasm(DASM_OPS_16) |
| 811 | | { |
| 812 | | |
| 813 | | int size = 2; |
| 814 | | UINT8 subinstr2 = (op & 0x01c0) >> 6; |
| 815 | | op &= ~0x01c0; |
| 816 | | |
| 817 | | switch (subinstr2) |
| 818 | | { |
| 819 | | case 0x00: size = arcompact_handle1e_03_00_dasm(DASM_PARAMS); break; // BGT_S |
| 820 | | case 0x01: size = arcompact_handle1e_03_01_dasm(DASM_PARAMS); break; // BGE_S |
| 821 | | case 0x02: size = arcompact_handle1e_03_02_dasm(DASM_PARAMS); break; // BLT_S |
| 822 | | case 0x03: size = arcompact_handle1e_03_03_dasm(DASM_PARAMS); break; // BLE_S |
| 823 | | case 0x04: size = arcompact_handle1e_03_04_dasm(DASM_PARAMS); break; // BHI_S |
| 824 | | case 0x05: size = arcompact_handle1e_03_05_dasm(DASM_PARAMS); break; // BHS_S |
| 825 | | case 0x06: size = arcompact_handle1e_03_06_dasm(DASM_PARAMS); break; // BLO_S |
| 826 | | case 0x07: size = arcompact_handle1e_03_07_dasm(DASM_PARAMS); break; // BLS_S |
| 827 | | } |
| 828 | | return size; |
| 829 | | |
| 830 | | } |
trunk/src/emu/cpu/arcompact/arcompactdasm_ops.c
| r242341 | r242342 | |
| 1 | | /*********************************\ |
| 2 | | |
| 3 | | ARCompact disassembler |
| 4 | | |
| 5 | | \*********************************/ |
| 6 | | |
| 7 | | #include "emu.h" |
| 8 | | #include <stdarg.h> |
| 9 | | |
| 10 | | #include "arcompactdasm_ops.h" |
| 11 | | |
| 12 | | char *output; |
| 13 | | |
| 14 | | static void ATTR_PRINTF(1,2) print(const char *fmt, ...) |
| 15 | | { |
| 16 | | va_list vl; |
| 17 | | |
| 18 | | va_start(vl, fmt); |
| 19 | | vsprintf(output, fmt, vl); |
| 20 | | va_end(vl); |
| 21 | | } |
| 22 | | |
| 23 | | |
| 24 | | // condition codes (basic ones are the same as arc |
| 25 | | static const char *conditions[0x20] = |
| 26 | | { |
| 27 | | /* 00 */ "AL", // (aka RA - Always) |
| 28 | | /* 01 */ "EQ", // (aka Z - Zero |
| 29 | | /* 02 */ "NE", // (aka NZ - Non-Zero) |
| 30 | | /* 03 */ "PL", // (aka P - Positive) |
| 31 | | /* 04 */ "MI", // (aka N - Negative) |
| 32 | | /* 05 */ "CS", // (aka C, LO - Carry set / Lower than) (unsigned) |
| 33 | | /* 06 */ "CC", // (aka CC, NC, HS - Carry Clear / Higher or Same) (unsigned) |
| 34 | | /* 07 */ "VS", // (aka V - Overflow set) |
| 35 | | /* 08 */ "VC", // (aka NV - Overflow clear) |
| 36 | | /* 09 */ "GT", // ( - Greater than) (signed) |
| 37 | | /* 0a */ "GE", // ( - Greater than or Equal) (signed) |
| 38 | | /* 0b */ "LT", // ( - Less than) (signed) |
| 39 | | /* 0c */ "LE", // ( - Less than or Equal) (signed) |
| 40 | | /* 0d */ "HI", // ( - Higher than) (unsigned) |
| 41 | | /* 0e */ "LS", // ( - Lower or Same) (unsigned) |
| 42 | | /* 0f */ "PNZ",// ( - Positive non-0 value) |
| 43 | | /* 10 */ "0x10 Reserved", // possible CPU implementation specifics |
| 44 | | /* 11 */ "0x11 Reserved", |
| 45 | | /* 12 */ "0x12 Reserved", |
| 46 | | /* 13 */ "0x13 Reserved", |
| 47 | | /* 14 */ "0x14 Reserved", |
| 48 | | /* 15 */ "0x15 Reserved", |
| 49 | | /* 16 */ "0x16 Reserved", |
| 50 | | /* 17 */ "0x17 Reserved", |
| 51 | | /* 18 */ "0x18 Reserved", |
| 52 | | /* 19 */ "0x19 Reserved", |
| 53 | | /* 1a */ "0x1a Reserved", |
| 54 | | /* 1b */ "0x1b Reserved", |
| 55 | | /* 1c */ "0x1c Reserved", |
| 56 | | /* 1d */ "0x1d Reserved", |
| 57 | | /* 1e */ "0x1e Reserved", |
| 58 | | /* 1f */ "0x1f Reserved" |
| 59 | | }; |
| 60 | | |
| 61 | | |
| 62 | | int arcompact_01_01_00_helper(char *output, offs_t pc, UINT32 op, const UINT8* oprom, const char* optext) |
| 63 | | { |
| 64 | | int size = 4; |
| 65 | | |
| 66 | | // Branch on Compare / Bit Test - Register-Register |
| 67 | | // 00001 bbb sssssss 1 S BBB CCCCCC N 0 iiii |
| 68 | | INT32 address = (op & 0x00fe0000) >> 17; |
| 69 | | address |= ((op & 0x00008000) >> 15) << 7; |
| 70 | | if (address & 0x80) address = -(address & 0x7f); |
| 71 | | |
| 72 | | int c = (op & 0x00000fc0) >> 6; |
| 73 | | int b = (op & 0x07000000) >> 24; |
| 74 | | b |= ((op & 0x00007000) >> 12) << 3; |
| 75 | | |
| 76 | | op &= ~0x07007fe0; |
| 77 | | |
| 78 | | if ((b != LIMM_REG) && (c != LIMM_REG)) |
| 79 | | { |
| 80 | | print("%s (r%d) (r%d) %08x (%08x)", optext, b, c, pc + (address * 2) + 4, op & ~0xf8fe800f); |
| 81 | | } |
| 82 | | else |
| 83 | | { |
| 84 | | UINT32 limm; |
| 85 | | GET_LIMM_32; |
| 86 | | size = 8; |
| 87 | | |
| 88 | | if ((b == LIMM_REG) && (c != LIMM_REG)) |
| 89 | | { |
| 90 | | print("%s (%08x) (r%d) %08x (%08x)", optext, limm, c, pc + (address * 2) + 4, op & ~0xf8fe800f); |
| 91 | | } |
| 92 | | else if ((c == LIMM_REG) && (b != LIMM_REG)) |
| 93 | | { |
| 94 | | print("%s (r%d) (%08x) %08x (%08x)", optext, b, limm, pc + (address * 2) + 4, op & ~0xf8fe800f); |
| 95 | | } |
| 96 | | else |
| 97 | | { |
| 98 | | // b and c are LIMM? invalid?? |
| 99 | | print("%s (%08x) (%08x) (illegal?) %08x (%08x)", optext, limm, limm, pc + (address * 2) + 4, op & ~0xf8fe800f); |
| 100 | | |
| 101 | | } |
| 102 | | } |
| 103 | | |
| 104 | | return size; |
| 105 | | } |
| 106 | | |
| 107 | | #define GET_01_01_01_BRANCH_ADDR \ |
| 108 | | INT32 address = (op & 0x00fe0000) >> 17; \ |
| 109 | | address |= ((op & 0x00008000) >> 15) << 7; \ |
| 110 | | if (address & 0x80) address = -(address & 0x7f); \ |
| 111 | | op &= ~ 0x00fe800f; |
| 112 | | |
| 113 | | |
| 114 | | #define GROUP_0e_GET_h \ |
| 115 | | h = ((op & 0x0007) << 3); \ |
| 116 | | h |= ((op & 0x00e0) >> 5); \ |
| 117 | | |
| 118 | | // this is as messed up as the rest of the 16-bit alignment in LE mode... |
| 119 | | |
| 120 | | #define GET_LIMM \ |
| 121 | | limm = oprom[4] | (oprom[5] << 8); \ |
| 122 | | limm |= (oprom[2] << 16) | (oprom[3] << 24); \ |
| 123 | | |
| 124 | | |
| 125 | | /************************************************************************************************************************************ |
| 126 | | * * |
| 127 | | * individual opcode handlers (disassembly) * |
| 128 | | * * |
| 129 | | ************************************************************************************************************************************/ |
| 130 | | |
| 131 | | int arcompact_handle00_00_dasm(DASM_OPS_32) |
| 132 | | { |
| 133 | | int size = 4; |
| 134 | | // Branch Conditionally |
| 135 | | // 00000 ssssssssss 0 SSSSSSSSSS N QQQQQ |
| 136 | | INT32 address = (op & 0x07fe0000) >> 17; |
| 137 | | address |= ((op & 0x0000ffc0) >> 6) << 10; |
| 138 | | if (address & 0x800000) address = -(address & 0x7fffff); |
| 139 | | |
| 140 | | UINT8 condition = op & 0x0000001f; |
| 141 | | |
| 142 | | print("B(%s) %08x (%08x)", conditions[condition], pc + (address * 2) + 2, op & ~0xffffffdf); |
| 143 | | return size; |
| 144 | | } |
| 145 | | |
| 146 | | int arcompact_handle00_01_dasm(DASM_OPS_32) |
| 147 | | { |
| 148 | | int size = 4; |
| 149 | | // Branch Unconditionally Far |
| 150 | | // 00000 ssssssssss 1 SSSSSSSSSS N R TTTT |
| 151 | | INT32 address = (op & 0x07fe0000) >> 17; |
| 152 | | address |= ((op & 0x0000ffc0) >> 6) << 10; |
| 153 | | address |= ((op & 0x0000000f) >> 0) << 20; |
| 154 | | if (address & 0x800000) address = -(address & 0x7fffff); |
| 155 | | |
| 156 | | print("B %08x (%08x)", pc + (address * 2) + 2, op & ~0xffffffcf); |
| 157 | | return size; |
| 158 | | } |
| 159 | | |
| 160 | | int arcompact_handle01_00_00dasm(DASM_OPS_32) |
| 161 | | { |
| 162 | | int size = 4; |
| 163 | | |
| 164 | | // Branch and Link Conditionally |
| 165 | | // 00001 sssssssss 00 SSSSSSSSSS N QQQQQ |
| 166 | | INT32 address = (op & 0x07fc0000) >> 17; |
| 167 | | address |= ((op & 0x0000ffc0) >> 6) << 10; |
| 168 | | if (address & 0x800000) address = -(address&0x7fffff); |
| 169 | | |
| 170 | | UINT8 condition = op & 0x0000001f; |
| 171 | | |
| 172 | | print("BL(%s) %08x (%08x)", conditions[condition], pc + (address *2) + 2, op & ~0xffffffdf ); |
| 173 | | return size; |
| 174 | | } |
| 175 | | |
| 176 | | int arcompact_handle01_00_01dasm(DASM_OPS_32) |
| 177 | | { |
| 178 | | int size = 4; |
| 179 | | // Branch and Link Unconditionally Far |
| 180 | | // 00001 sssssssss 10 SSSSSSSSSS N R TTTT |
| 181 | | INT32 address = (op & 0x07fc0000) >> 17; |
| 182 | | address |= ((op & 0x0000ffc0) >> 6) << 10; |
| 183 | | address |= ((op & 0x0000000f) >> 0) << 20; |
| 184 | | if (address & 0x800000) address = -(address&0x7fffff); |
| 185 | | |
| 186 | | print("BL %08x (%08x)", pc + (address *2) + 2, op & ~0xffffffcf ); |
| 187 | | return size; |
| 188 | | } |
| 189 | | |
| 190 | | int arcompact_handle01_01_00_00_dasm(DASM_OPS_32) { return arcompact_01_01_00_helper( output, pc, op, oprom, "BREQ b - c"); } |
| 191 | | int arcompact_handle01_01_00_01_dasm(DASM_OPS_32) { return arcompact_01_01_00_helper( output, pc, op, oprom, "BRNE b - c"); } |
| 192 | | int arcompact_handle01_01_00_02_dasm(DASM_OPS_32) { return arcompact_01_01_00_helper( output, pc, op, oprom, "BRLT b - c"); } |
| 193 | | int arcompact_handle01_01_00_03_dasm(DASM_OPS_32) { return arcompact_01_01_00_helper( output, pc, op, oprom, "BRGE b - c"); } |
| 194 | | int arcompact_handle01_01_00_04_dasm(DASM_OPS_32) { return arcompact_01_01_00_helper( output, pc, op, oprom, "BRLO b - c"); } |
| 195 | | int arcompact_handle01_01_00_05_dasm(DASM_OPS_32) { return arcompact_01_01_00_helper( output, pc, op, oprom, "BRHS b - c"); } |
| 196 | | int arcompact_handle01_01_00_0e_dasm(DASM_OPS_32) { return arcompact_01_01_00_helper( output, pc, op, oprom, "BBIT0 (b & 1<<c) == 0"); } |
| 197 | | int arcompact_handle01_01_00_0f_dasm(DASM_OPS_32) { return arcompact_01_01_00_helper( output, pc, op, oprom, "BBIT1 (b & 1<<c) != 0"); } |
| 198 | | |
| 199 | | |
| 200 | | int arcompact_handle01_01_01_00_dasm(DASM_OPS_32) { GET_01_01_01_BRANCH_ADDR; print("BREQ b - u6 (dst %08x) (%08x)", pc + (address * 2) + 4, op); return 4; } |
| 201 | | int arcompact_handle01_01_01_01_dasm(DASM_OPS_32) { GET_01_01_01_BRANCH_ADDR; print("BRNE b - u6 (dst %08x) (%08x)", pc + (address * 2) + 4, op); return 4; } |
| 202 | | int arcompact_handle01_01_01_02_dasm(DASM_OPS_32) { GET_01_01_01_BRANCH_ADDR; print("BRLT b - u6 (dst %08x) (%08x)", pc + (address * 2) + 4, op); return 4; } |
| 203 | | int arcompact_handle01_01_01_03_dasm(DASM_OPS_32) { GET_01_01_01_BRANCH_ADDR; print("BRGE b - u6 (dst %08x) (%08x)", pc + (address * 2) + 4, op); return 4; } |
| 204 | | int arcompact_handle01_01_01_04_dasm(DASM_OPS_32) { GET_01_01_01_BRANCH_ADDR; print("BRLO b - u6 (dst %08x) (%08x)", pc + (address * 2) + 4, op); return 4; } |
| 205 | | int arcompact_handle01_01_01_05_dasm(DASM_OPS_32) { GET_01_01_01_BRANCH_ADDR; print("BRHS b - u6 (dst %08x) (%08x)", pc + (address * 2) + 4, op); return 4; } |
| 206 | | |
| 207 | | |
| 208 | | int arcompact_handle01_01_01_0e_dasm(DASM_OPS_32) { GET_01_01_01_BRANCH_ADDR; print("BBIT0 (b & 1<<u6) == 0 (dst %08x) (%08x)", pc + (address * 2) + 4, op); return 4; } |
| 209 | | int arcompact_handle01_01_01_0f_dasm(DASM_OPS_32) { GET_01_01_01_BRANCH_ADDR; print("BBIT1 (b & 1<<u6) != 0 (dst %08x) (%08x)", pc + (address * 2) + 4, op); return 4; } |
| 210 | | |
| 211 | | #if 0 |
| 212 | | //#define EXPLICIT_EXTENSIONS |
| 213 | | |
| 214 | | static const char *datasize[0x4] = |
| 215 | | { |
| 216 | | #ifdef EXPLICIT_EXTENSIONS |
| 217 | | /* 00 */ ".L", // Dword (default) (can use no extension, using .L to be explicit) |
| 218 | | #else |
| 219 | | /* 00 */ " ",// Dword (default) |
| 220 | | #endif |
| 221 | | /* 01 */ ".B", // Byte |
| 222 | | /* 02 */ ".W", // Word |
| 223 | | /* 03 */ ".<illegal data size>" |
| 224 | | }; |
| 225 | | |
| 226 | | static const char *dataextend[0x2] = |
| 227 | | { |
| 228 | | #ifdef EXPLICIT_EXTENSIONS |
| 229 | | /* 00 */ ".ZX", // Zero Extend (can use no extension, using .ZX to be explicit) |
| 230 | | else |
| 231 | | /* 00 */ " ", // Zero Extend |
| 232 | | #endif |
| 233 | | /* 01 */ ".X" // Sign Extend |
| 234 | | }; |
| 235 | | |
| 236 | | static const char *addressmode[0x4] = |
| 237 | | { |
| 238 | | #ifdef EXPLICIT_EXTENSIONS |
| 239 | | /* 00 */ ".AN", // No Writeback (can use no extension, using .AN to be explicit) |
| 240 | | #else |
| 241 | | /* 00 */ " ", // No Writeback |
| 242 | | #endif |
| 243 | | /* 01 */ ".AW", // Writeback pre memory access |
| 244 | | /* 02 */ ".AB", // Writeback post memory access |
| 245 | | /* 03 */ ".AS" // scaled |
| 246 | | }; |
| 247 | | |
| 248 | | static const char *cachebit[0x2] = |
| 249 | | { |
| 250 | | #ifdef EXPLICIT_EXTENSIONS |
| 251 | | /* 00 */ ".EN", // Data Cache Enabled (can use no extension, using .EN to be explicit) |
| 252 | | #else |
| 253 | | /* 00 */ " ", // Data Cache Enabled |
| 254 | | #endif |
| 255 | | /* 01 */ ".DI" // Direct to Memory (Cache Bypass) |
| 256 | | }; |
| 257 | | |
| 258 | | static const char *regnames[0x40] = |
| 259 | | { |
| 260 | | /* 00 */ "r0", |
| 261 | | /* 01 */ "r1", |
| 262 | | /* 02 */ "r2", |
| 263 | | /* 03 */ "r3", |
| 264 | | /* 04 */ "r4", |
| 265 | | /* 05 */ "r5", |
| 266 | | /* 06 */ "r6", |
| 267 | | /* 07 */ "r7", |
| 268 | | /* 08 */ "r8", |
| 269 | | /* 09 */ "r9", |
| 270 | | /* 0a */ "r10", |
| 271 | | /* 0b */ "r11", |
| 272 | | /* 0c */ "r12", |
| 273 | | /* 0d */ "r13", |
| 274 | | /* 0e */ "r14", |
| 275 | | /* 0f */ "r15", |
| 276 | | |
| 277 | | /* 10 */ "r16", |
| 278 | | /* 11 */ "r17", |
| 279 | | /* 12 */ "r18", |
| 280 | | /* 13 */ "r19", |
| 281 | | /* 14 */ "r20", |
| 282 | | /* 15 */ "r21", |
| 283 | | /* 16 */ "r22", |
| 284 | | /* 17 */ "r23", |
| 285 | | /* 18 */ "r24", |
| 286 | | /* 19 */ "r25", |
| 287 | | /* 1a */ "r26(GP)", |
| 288 | | /* 1b */ "r27(FP)", |
| 289 | | /* 1c */ "r28(SP)", |
| 290 | | /* 1d */ "r29(ILINK1)", |
| 291 | | /* 1e */ "r30(ILINK2)", |
| 292 | | /* 1f */ "r31(BLINK)", |
| 293 | | |
| 294 | | /* 20 */ "r32(ext)", |
| 295 | | /* 21 */ "r33(ext)", |
| 296 | | /* 22 */ "r34(ext)", |
| 297 | | /* 23 */ "r35(ext)", |
| 298 | | /* 24 */ "r36(ext)", |
| 299 | | /* 25 */ "r37(ext)", |
| 300 | | /* 26 */ "r38(ext)", |
| 301 | | /* 27 */ "r39(ext)", |
| 302 | | /* 28 */ "r40(ext)", |
| 303 | | /* 29 */ "r41(ext)", |
| 304 | | /* 2a */ "r42(ext)", |
| 305 | | /* 2b */ "r43(ext)", |
| 306 | | /* 2c */ "r44(ext)", |
| 307 | | /* 2d */ "r45(ext)", |
| 308 | | /* 2e */ "r46(ext)", |
| 309 | | /* 2f */ "r47(ext)", |
| 310 | | |
| 311 | | /* 30 */ "r48(ext)", |
| 312 | | /* 31 */ "r49(ext)", |
| 313 | | /* 32 */ "r50(ext)", |
| 314 | | /* 33 */ "r51(ext)", |
| 315 | | /* 34 */ "r52(ext)", |
| 316 | | /* 35 */ "r53(ext)", |
| 317 | | /* 36 */ "r54(ext)", |
| 318 | | /* 37 */ "r55(ext)", |
| 319 | | /* 38 */ "r56(ext)", |
| 320 | | /* 39 */ "r57(ext)", // MLO (result registers for optional multply functions) |
| 321 | | /* 3a */ "r58(ext)", // MMID |
| 322 | | /* 3b */ "r59(ext)", // MHI |
| 323 | | /* 3c */ "r60(LP_COUNT)", |
| 324 | | /* 3d */ "r61(reserved)", |
| 325 | | /* 3e */ "r62(LIMM)", // use Long Immediate Data instead of register |
| 326 | | /* 3f */ "r63(PCL)" |
| 327 | | }; |
| 328 | | #endif |
| 329 | | |
| 330 | | int arcompact_handle02_dasm(DASM_OPS_32) |
| 331 | | { |
| 332 | | // bitpos |
| 333 | | // 1111 1111 1111 1111 0000 0000 0000 0000 |
| 334 | | // fedc ba98 7654 3210 fedc ba98 7654 3210 |
| 335 | | // fields |
| 336 | | // 0001 0bbb ssss ssss SBBB DaaZ ZXAA AAAA |
| 337 | | |
| 338 | | #if 0 |
| 339 | | int A = (op & 0x0000003f >> 0); //op &= ~0x0000003f; |
| 340 | | int X = (op & 0x00000040 >> 6); //op &= ~0x00000040; |
| 341 | | int Z = (op & 0x00000180 >> 7); //op &= ~0x00000180; |
| 342 | | int a = (op & 0x00000600 >> 9); //op &= ~0x00000600; |
| 343 | | int D = (op & 0x00000800 >> 11);// op &= ~0x00000800; |
| 344 | | int B = (op & 0x00007000 >> 12);// op &= ~0x00007000; |
| 345 | | int S = (op & 0x00008000 >> 15);// op &= ~0x00008000; |
| 346 | | int s = (op & 0x00ff0000 >> 16);// op &= ~0x00ff0000; |
| 347 | | int b = (op & 0x07000000 >> 24);// op &= ~0x07000000; |
| 348 | | |
| 349 | | int breg = b | (B << 3); |
| 350 | | int sdat = s | (S << 8); // todo - signed |
| 351 | | #endif |
| 352 | | |
| 353 | | |
| 354 | | output += sprintf( output, "LD"); |
| 355 | | // output += sprintf( output, "%s", datasize[Z]); |
| 356 | | // output += sprintf( output, "%s", dataextend[X]); |
| 357 | | // output += sprintf( output, "%s", addressmode[a]); |
| 358 | | // output += sprintf( output, "%s", cachebit[D]); |
| 359 | | // output += sprintf( output, " "); |
| 360 | | // output += sprintf( output, "%s, ", regnames[A]); |
| 361 | | // output += sprintf( output, "["); |
| 362 | | // output += sprintf( output, "%s(%d %d), ", regnames[breg], B, b); |
| 363 | | // output += sprintf( output, "%d", sdat); |
| 364 | | // output += sprintf( output, "]"); |
| 365 | | |
| 366 | | return 4; |
| 367 | | } |
| 368 | | |
| 369 | | int arcompact_handle03_dasm(DASM_OPS_32) |
| 370 | | { |
| 371 | | // bitpos |
| 372 | | // 11111 111 11111111 0 000 000000 0 00 00 0 |
| 373 | | // fedcb a98 76543210 f edc ba9876 5 43 21 0 |
| 374 | | // fields |
| 375 | | // 00011 bbb ssssssss S BBB CCCCCC D aa ZZ R |
| 376 | | |
| 377 | | print("ST r+o (%08x)", op ); |
| 378 | | return 4; |
| 379 | | } |
| 380 | | |
| 381 | | int arcompact_handle04_00_dasm(DASM_OPS_32) { print("ADD (%08x)", op); return 4;} |
| 382 | | int arcompact_handle04_01_dasm(DASM_OPS_32) { print("ADC (%08x)", op); return 4;} |
| 383 | | int arcompact_handle04_02_dasm(DASM_OPS_32) { print("SUB (%08x)", op); return 4;} |
| 384 | | int arcompact_handle04_03_dasm(DASM_OPS_32) { print("SBC (%08x)", op); return 4;} |
| 385 | | int arcompact_handle04_04_dasm(DASM_OPS_32) { print("AND (%08x)", op); return 4;} |
| 386 | | int arcompact_handle04_05_dasm(DASM_OPS_32) { print("OR (%08x)", op); return 4;} |
| 387 | | int arcompact_handle04_06_dasm(DASM_OPS_32) { print("BIC (%08x)", op); return 4;} |
| 388 | | int arcompact_handle04_07_dasm(DASM_OPS_32) { print("XOR (%08x)", op); return 4;} |
| 389 | | int arcompact_handle04_08_dasm(DASM_OPS_32) { print("MAX (%08x)", op); return 4;} |
| 390 | | int arcompact_handle04_09_dasm(DASM_OPS_32) { print("MIN (%08x)", op); return 4;} |
| 391 | | int arcompact_handle04_0a_dasm(DASM_OPS_32) { print("MOV (%08x)", op); return 4;} |
| 392 | | int arcompact_handle04_0b_dasm(DASM_OPS_32) { print("TST (%08x)", op); return 4;} |
| 393 | | int arcompact_handle04_0c_dasm(DASM_OPS_32) { print("CMP (%08x)", op); return 4;} |
| 394 | | int arcompact_handle04_0d_dasm(DASM_OPS_32) { print("RCMP (%08x)", op); return 4;} |
| 395 | | int arcompact_handle04_0e_dasm(DASM_OPS_32) { print("RSUB (%08x)", op); return 4;} |
| 396 | | int arcompact_handle04_0f_dasm(DASM_OPS_32) { print("BSET (%08x)", op); return 4;} |
| 397 | | int arcompact_handle04_10_dasm(DASM_OPS_32) { print("BCLR (%08x)", op); return 4;} |
| 398 | | int arcompact_handle04_11_dasm(DASM_OPS_32) { print("BTST (%08x)", op); return 4;} |
| 399 | | int arcompact_handle04_12_dasm(DASM_OPS_32) { print("BXOR (%08x)", op); return 4;} |
| 400 | | int arcompact_handle04_13_dasm(DASM_OPS_32) { print("BMSK (%08x)", op); return 4;} |
| 401 | | int arcompact_handle04_14_dasm(DASM_OPS_32) { print("ADD1 (%08x)", op); return 4;} |
| 402 | | int arcompact_handle04_15_dasm(DASM_OPS_32) { print("ADD2 (%08x)", op); return 4;} |
| 403 | | int arcompact_handle04_16_dasm(DASM_OPS_32) { print("ADD3 (%08x)", op); return 4;} |
| 404 | | int arcompact_handle04_17_dasm(DASM_OPS_32) { print("SUB1 (%08x)", op); return 4;} |
| 405 | | int arcompact_handle04_18_dasm(DASM_OPS_32) { print("SUB2 (%08x)", op); return 4;} |
| 406 | | int arcompact_handle04_19_dasm(DASM_OPS_32) { print("SUB3 (%08x)", op); return 4;} |
| 407 | | int arcompact_handle04_1a_dasm(DASM_OPS_32) { print("MPY (%08x)", op); return 4;} // * |
| 408 | | int arcompact_handle04_1b_dasm(DASM_OPS_32) { print("MPYH (%08x)", op); return 4;} // * |
| 409 | | int arcompact_handle04_1c_dasm(DASM_OPS_32) { print("MPYHU (%08x)", op); return 4;} // * |
| 410 | | int arcompact_handle04_1d_dasm(DASM_OPS_32) { print("MPYU (%08x)", op); return 4;} // * |
| 411 | | |
| 412 | | |
| 413 | | |
| 414 | | int arcompact_handle04_20_dasm(DASM_OPS_32) |
| 415 | | { |
| 416 | | // todo, other bits (in none long immediate mode at least) |
| 417 | | |
| 418 | | int size = 4; |
| 419 | | int C = (op & 0x00000fc0) >> 6; |
| 420 | | UINT8 condition = op & 0x0000001f; |
| 421 | | |
| 422 | | op &= ~0x00000fc0; |
| 423 | | |
| 424 | | if (C == LIMM_REG) |
| 425 | | { |
| 426 | | UINT32 limm; |
| 427 | | GET_LIMM_32; |
| 428 | | size = 8; |
| 429 | | |
| 430 | | print("J(%s) %08x (%08x)", conditions[condition], limm, op); |
| 431 | | } |
| 432 | | else |
| 433 | | { |
| 434 | | print("J(%s) (r%d) (%08x)", conditions[condition], C, op); |
| 435 | | } |
| 436 | | |
| 437 | | return size; |
| 438 | | } |
| 439 | | |
| 440 | | |
| 441 | | |
| 442 | | int arcompact_handle04_21_dasm(DASM_OPS_32) { print("Jcc.D (%08x)", op); return 4;} |
| 443 | | int arcompact_handle04_22_dasm(DASM_OPS_32) { print("JLcc (%08x)", op); return 4;} |
| 444 | | int arcompact_handle04_23_dasm(DASM_OPS_32) { print("JLcc.D (%08x)", op); return 4;} |
| 445 | | |
| 446 | | |
| 447 | | |
| 448 | | |
| 449 | | int arcompact_handle04_28_dasm(DASM_OPS_32) { print("LPcc (%08x)", op); return 4;} |
| 450 | | int arcompact_handle04_29_dasm(DASM_OPS_32) { print("FLAG (%08x)", op); return 4;} |
| 451 | | int arcompact_handle04_2a_dasm(DASM_OPS_32) { print("LR (%08x)", op); return 4;} |
| 452 | | int arcompact_handle04_2b_dasm(DASM_OPS_32) { print("SR (%08x)", op); return 4;} |
| 453 | | |
| 454 | | |
| 455 | | |
| 456 | | int arcompact_handle04_2f_00_dasm(DASM_OPS_32) { print("ASL (%08x)", op); return 4;} // ASL |
| 457 | | int arcompact_handle04_2f_01_dasm(DASM_OPS_32) { print("ASR (%08x)", op); return 4;} // ASR |
| 458 | | int arcompact_handle04_2f_02_dasm(DASM_OPS_32) { print("LSR (%08x)", op); return 4;} // LSR |
| 459 | | int arcompact_handle04_2f_03_dasm(DASM_OPS_32) { print("ROR (%08x)", op); return 4;} // ROR |
| 460 | | int arcompact_handle04_2f_04_dasm(DASM_OPS_32) { print("RCC (%08x)", op); return 4;} // RCC |
| 461 | | int arcompact_handle04_2f_05_dasm(DASM_OPS_32) { print("SEXB (%08x)", op); return 4;} // SEXB |
| 462 | | int arcompact_handle04_2f_06_dasm(DASM_OPS_32) { print("SEXW (%08x)", op); return 4;} // SEXW |
| 463 | | int arcompact_handle04_2f_07_dasm(DASM_OPS_32) { print("EXTB (%08x)", op); return 4;} // EXTB |
| 464 | | int arcompact_handle04_2f_08_dasm(DASM_OPS_32) { print("EXTW (%08x)", op); return 4;} // EXTW |
| 465 | | int arcompact_handle04_2f_09_dasm(DASM_OPS_32) { print("ABS (%08x)", op); return 4;} // ABS |
| 466 | | int arcompact_handle04_2f_0a_dasm(DASM_OPS_32) { print("NOT (%08x)", op); return 4;} // NOT |
| 467 | | int arcompact_handle04_2f_0b_dasm(DASM_OPS_32) { print("RLC (%08x)", op); return 4;} // RLC |
| 468 | | int arcompact_handle04_2f_0c_dasm(DASM_OPS_32) { print("EX (%08x)", op); return 4;} // EX |
| 469 | | |
| 470 | | |
| 471 | | int arcompact_handle04_2f_3f_01_dasm(DASM_OPS_32) { print("SLEEP (%08x)", op); return 4;} |
| 472 | | int arcompact_handle04_2f_3f_02_dasm(DASM_OPS_32) { print("SWI / TRAP0 (%08x)", op); return 4;} |
| 473 | | int arcompact_handle04_2f_3f_03_dasm(DASM_OPS_32) { print("SYNC (%08x)", op); return 4;} |
| 474 | | int arcompact_handle04_2f_3f_04_dasm(DASM_OPS_32) { print("RTIE (%08x)", op); return 4;} |
| 475 | | int arcompact_handle04_2f_3f_05_dasm(DASM_OPS_32) { print("BRK (%08x)", op); return 4;} |
| 476 | | |
| 477 | | |
| 478 | | |
| 479 | | |
| 480 | | |
| 481 | | |
| 482 | | |
| 483 | | int arcompact_handle04_30_dasm(DASM_OPS_32) { print("LD r-r (basecase 0x30) (%08x)", op); return 4;} |
| 484 | | int arcompact_handle04_31_dasm(DASM_OPS_32) { print("LD r-r (basecase 0x31) (%08x)", op); return 4;} |
| 485 | | int arcompact_handle04_32_dasm(DASM_OPS_32) { print("LD r-r (basecase 0x32) (%08x)", op); return 4;} |
| 486 | | int arcompact_handle04_33_dasm(DASM_OPS_32) { print("LD r-r (basecase 0x33) (%08x)", op); return 4;} |
| 487 | | int arcompact_handle04_34_dasm(DASM_OPS_32) { print("LD r-r (basecase 0x34) (%08x)", op); return 4;} |
| 488 | | int arcompact_handle04_35_dasm(DASM_OPS_32) { print("LD r-r (basecase 0x35) (%08x)", op); return 4;} |
| 489 | | int arcompact_handle04_36_dasm(DASM_OPS_32) { print("LD r-r (basecase 0x36) (%08x)", op); return 4;} |
| 490 | | int arcompact_handle04_37_dasm(DASM_OPS_32) { print("LD r-r (basecase 0x37) (%08x)", op); return 4;} |
| 491 | | |
| 492 | | |
| 493 | | |
| 494 | | |
| 495 | | |
| 496 | | |
| 497 | | int arcompact_handle05_00_dasm(DASM_OPS_32) { print("ASL a <- b asl c (%08x)", op); return 4;} |
| 498 | | int arcompact_handle05_01_dasm(DASM_OPS_32) { print("LSR a <- b lsr c (%08x)", op); return 4;} |
| 499 | | int arcompact_handle05_02_dasm(DASM_OPS_32) { print("ASR a <- b asr c (%08x)", op); return 4;} |
| 500 | | int arcompact_handle05_03_dasm(DASM_OPS_32) { print("ROR a <- b ror c (%08x)", op); return 4;} |
| 501 | | int arcompact_handle05_04_dasm(DASM_OPS_32) { print("MUL64 mulres <- b * c (%08x)", op); return 4;} |
| 502 | | int arcompact_handle05_05_dasm(DASM_OPS_32) { print("MULU64 mulres <- b * c (%08x)", op); return 4;} |
| 503 | | int arcompact_handle05_06_dasm(DASM_OPS_32) { print("ADDS a <- sat32 (b + c) (%08x)", op); return 4;} |
| 504 | | int arcompact_handle05_07_dasm(DASM_OPS_32) { print("SUBS a <- sat32 (b + c) (%08x)", op); return 4;} |
| 505 | | int arcompact_handle05_08_dasm(DASM_OPS_32) { print("DIVAW (%08x)", op); return 4;} |
| 506 | | |
| 507 | | |
| 508 | | |
| 509 | | int arcompact_handle05_0a_dasm(DASM_OPS_32) { print("ASLS a <- sat32 (b << c) (%08x)", op); return 4;} |
| 510 | | int arcompact_handle05_0b_dasm(DASM_OPS_32) { print("ASRS a ,- sat32 (b >> c) (%08x)", op); return 4;} |
| 511 | | |
| 512 | | int arcompact_handle05_28_dasm(DASM_OPS_32) { print("ADDSDW (%08x)", op); return 4;} |
| 513 | | int arcompact_handle05_29_dasm(DASM_OPS_32) { print("SUBSDW (%08x)", op); return 4;} |
| 514 | | |
| 515 | | |
| 516 | | int arcompact_handle05_2f_dasm(DASM_OPS_32) { print("SOP (another table) (%08x)", op); return 4;} |
| 517 | | |
| 518 | | |
| 519 | | |
| 520 | | |
| 521 | | int arcompact_handle06_dasm(DASM_OPS_32) |
| 522 | | { |
| 523 | | print("op a,b,c (06 ARC ext) (%08x)", op ); |
| 524 | | return 4; |
| 525 | | } |
| 526 | | |
| 527 | | int arcompact_handle07_dasm(DASM_OPS_32) |
| 528 | | { |
| 529 | | print("op a,b,c (07 User ext) (%08x)", op ); |
| 530 | | return 4; |
| 531 | | } |
| 532 | | |
| 533 | | int arcompact_handle08_dasm(DASM_OPS_32) |
| 534 | | { |
| 535 | | print("op a,b,c (08 User ext) (%08x)", op ); |
| 536 | | return 4; |
| 537 | | } |
| 538 | | |
| 539 | | int arcompact_handle09_dasm(DASM_OPS_32) |
| 540 | | { |
| 541 | | print("op a,b,c (09 Market ext) (%08x)", op ); |
| 542 | | return 4; |
| 543 | | } |
| 544 | | |
| 545 | | int arcompact_handle0a_dasm(DASM_OPS_32) |
| 546 | | { |
| 547 | | print("op a,b,c (0a Market ext) (%08x)", op ); |
| 548 | | return 4; |
| 549 | | } |
| 550 | | |
| 551 | | int arcompact_handle0b_dasm(DASM_OPS_32) |
| 552 | | { |
| 553 | | print("op a,b,c (0b Market ext) (%08x)", op ); |
| 554 | | return 4; |
| 555 | | } |
| 556 | | |
| 557 | | |
| 558 | | |
| 559 | | |
| 560 | | |
| 561 | | |
| 562 | | int arcompact_handle0c_00_dasm(DASM_OPS_16) |
| 563 | | { |
| 564 | | int size = 2; |
| 565 | | print("LD_S a <- m[b + c].long (%04x)", op); |
| 566 | | return size; |
| 567 | | } |
| 568 | | |
| 569 | | int arcompact_handle0c_01_dasm(DASM_OPS_16) |
| 570 | | { |
| 571 | | int size = 2; |
| 572 | | print("LDB_S a <- m[b + c].byte (%04x)", op); |
| 573 | | return size; |
| 574 | | } |
| 575 | | |
| 576 | | int arcompact_handle0c_02_dasm(DASM_OPS_16) |
| 577 | | { |
| 578 | | int size = 2; |
| 579 | | print("LDW_S a <- m[b + c].word (%04x)", op); |
| 580 | | return size; |
| 581 | | } |
| 582 | | |
| 583 | | int arcompact_handle0c_03_dasm(DASM_OPS_16) |
| 584 | | { |
| 585 | | int size = 2; |
| 586 | | print("ADD_S a <- b + c (%04x)", op); |
| 587 | | return size; |
| 588 | | } |
| 589 | | |
| 590 | | |
| 591 | | |
| 592 | | int arcompact_handle0d_00_dasm(DASM_OPS_16) |
| 593 | | { |
| 594 | | int size = 2; |
| 595 | | print("ADD_S c <- b + u3 (%04x)", op); |
| 596 | | return size; |
| 597 | | } |
| 598 | | |
| 599 | | int arcompact_handle0d_01_dasm(DASM_OPS_16) |
| 600 | | { |
| 601 | | int size = 2; |
| 602 | | print("SUB_S c <- b - u3 (%04x)", op); |
| 603 | | return size; |
| 604 | | } |
| 605 | | |
| 606 | | int arcompact_handle0d_02_dasm(DASM_OPS_16) |
| 607 | | { |
| 608 | | int size = 2; |
| 609 | | print("ASL_S c <- b asl u3 (%04x)", op); |
| 610 | | return size; |
| 611 | | } |
| 612 | | |
| 613 | | int arcompact_handle0d_03_dasm(DASM_OPS_16) |
| 614 | | { |
| 615 | | int size = 2; |
| 616 | | print("ASL_S c <- b asr u3 (%04x)", op); |
| 617 | | return size; |
| 618 | | } |
| 619 | | |
| 620 | | |
| 621 | | |
| 622 | | |
| 623 | | |
| 624 | | |
| 625 | | int arcompact_handle0e_00_dasm(DASM_OPS_16) |
| 626 | | { |
| 627 | | int h; |
| 628 | | int size = 2; |
| 629 | | |
| 630 | | GROUP_0e_GET_h; |
| 631 | | |
| 632 | | if (h == LIMM_REG) |
| 633 | | { |
| 634 | | UINT32 limm; |
| 635 | | GET_LIMM; |
| 636 | | size = 6; |
| 637 | | print("ADD_S b <- b + (%08x) (%04x)", limm, op); |
| 638 | | } |
| 639 | | else |
| 640 | | { |
| 641 | | |
| 642 | | print("ADD_S b <- b + (r%d) (%04x)", h, op); |
| 643 | | } |
| 644 | | |
| 645 | | return size; |
| 646 | | } |
| 647 | | |
| 648 | | int arcompact_handle0e_01_dasm(DASM_OPS_16) |
| 649 | | { |
| 650 | | int h; |
| 651 | | int size = 2; |
| 652 | | GROUP_0e_GET_h; |
| 653 | | |
| 654 | | if (h == LIMM_REG) |
| 655 | | { |
| 656 | | UINT32 limm; |
| 657 | | GET_LIMM; |
| 658 | | size = 6; |
| 659 | | print("MOV_S b <- (%08x) (%04x)", limm, op); |
| 660 | | } |
| 661 | | else |
| 662 | | { |
| 663 | | print("MOV_S b <- (r%d) (%04x)", h, op); |
| 664 | | } |
| 665 | | return size; |
| 666 | | } |
| 667 | | |
| 668 | | int arcompact_handle0e_02_dasm(DASM_OPS_16) |
| 669 | | { |
| 670 | | int h; |
| 671 | | int size = 2; |
| 672 | | GROUP_0e_GET_h; |
| 673 | | |
| 674 | | if (h == LIMM_REG) |
| 675 | | { |
| 676 | | UINT32 limm; |
| 677 | | GET_LIMM; |
| 678 | | size = 6; |
| 679 | | print("CMP_S b - (%08x) (%04x)", limm, op); |
| 680 | | } |
| 681 | | else |
| 682 | | { |
| 683 | | print("CMP_S b - (r%d) (%04x)", h, op); |
| 684 | | } |
| 685 | | return size; |
| 686 | | } |
| 687 | | |
| 688 | | int arcompact_handle0e_03_dasm(DASM_OPS_16) |
| 689 | | { |
| 690 | | int h; |
| 691 | | int size = 2; |
| 692 | | GROUP_0e_GET_h; |
| 693 | | |
| 694 | | if (h == LIMM_REG) |
| 695 | | { |
| 696 | | UINT32 limm; |
| 697 | | GET_LIMM; |
| 698 | | size = 6; |
| 699 | | print("MOV_S (%08x) <- b (%04x)", limm, op); |
| 700 | | } |
| 701 | | else |
| 702 | | { |
| 703 | | print("MOV_S (r%d) <- b (%04x)", h, op); |
| 704 | | } |
| 705 | | |
| 706 | | return size; |
| 707 | | } |
| 708 | | |
| 709 | | |
| 710 | | |
| 711 | | |
| 712 | | |
| 713 | | int arcompact_handle0f_00_00_dasm(DASM_OPS_16) { print("J_S pc <- b (%08x)", op); return 2;} |
| 714 | | int arcompact_handle0f_00_01_dasm(DASM_OPS_16) { print("J_S.D pc <- b (%08x)", op); return 2;} |
| 715 | | int arcompact_handle0f_00_02_dasm(DASM_OPS_16) { print("JL_S blink <- pc; pc <- b (%08x)", op); return 2;} |
| 716 | | int arcompact_handle0f_00_03_dasm(DASM_OPS_16) { print("L_S.D blink <- pc; pc <- b( %08x)", op); return 2;} |
| 717 | | int arcompact_handle0f_00_06_dasm(DASM_OPS_16) { print("SUB_S.NE if (f.Z==0) b <- b - b (%08x)", op); return 2;} |
| 718 | | |
| 719 | | |
| 720 | | |
| 721 | | |
| 722 | | |
| 723 | | int arcompact_handle0f_00_07_00_dasm(DASM_OPS_16) { print("NOP_S (%08x)", op); return 2;} |
| 724 | | int arcompact_handle0f_00_07_01_dasm(DASM_OPS_16) { print("UNIMP_S (%08x)", op); return 2;} // Unimplemented Instruction (how does this differ from illegal ops?) |
| 725 | | |
| 726 | | |
| 727 | | |
| 728 | | int arcompact_handle0f_00_07_04_dasm(DASM_OPS_16) { print("JEQ_S [blink] (%08x)", op); return 2;} |
| 729 | | int arcompact_handle0f_00_07_05_dasm(DASM_OPS_16) { print("JNE_S [blink] (%08x)", op); return 2;} |
| 730 | | int arcompact_handle0f_00_07_06_dasm(DASM_OPS_16) { print("J_S [blink] (%08x)", op); return 2;} |
| 731 | | int arcompact_handle0f_00_07_07_dasm(DASM_OPS_16) { print("J_S.D [blink] (%08x)", op); return 2;} |
| 732 | | |
| 733 | | |
| 734 | | int arcompact_handle0f_02_dasm(DASM_OPS_16) { print("SUB_S b <- b - c (%08x)", op); return 2;} |
| 735 | | |
| 736 | | |
| 737 | | int arcompact_handle0f_04_dasm(DASM_OPS_16) { print("AND_S b <- b and c (%08x)", op); return 2;} |
| 738 | | int arcompact_handle0f_05_dasm(DASM_OPS_16) { print("OR_S b <- b or c (%08x)", op); return 2;} |
| 739 | | int arcompact_handle0f_06_dasm(DASM_OPS_16) { print("BIC_S b <- b & !c (%08x)", op); return 2;} |
| 740 | | int arcompact_handle0f_07_dasm(DASM_OPS_16) { print("XOR_S b <- b ^ c (%08x)", op); return 2;} |
| 741 | | |
| 742 | | |
| 743 | | int arcompact_handle0f_0b_dasm(DASM_OPS_16) { print("TST_S b & c (%08x)", op); return 2;} |
| 744 | | int arcompact_handle0f_0c_dasm(DASM_OPS_16) { print("MUL64_S mulres <- b * c (%08x)", op); return 2;} |
| 745 | | int arcompact_handle0f_0d_dasm(DASM_OPS_16) { print("SEXB_S b <- sexb(c) (%08x)", op); return 2;} |
| 746 | | int arcompact_handle0f_0e_dasm(DASM_OPS_16) { print("SEXW_S b <- sexw(c) (%08x)", op); return 2;} |
| 747 | | int arcompact_handle0f_0f_dasm(DASM_OPS_16) { print("EXTB_S b <- extb(c) (%08x)", op); return 2;} |
| 748 | | int arcompact_handle0f_10_dasm(DASM_OPS_16) { print("EXTW_S b <- extw(c) (%08x)", op); return 2;} |
| 749 | | int arcompact_handle0f_11_dasm(DASM_OPS_16) { print("ABS_S b <- abs(c) (%08x)", op); return 2;} |
| 750 | | int arcompact_handle0f_12_dasm(DASM_OPS_16) { print("NOT_S b <- !(c) (%08x)", op); return 2;} |
| 751 | | int arcompact_handle0f_13_dasm(DASM_OPS_16) { print("NEG_S b <- neg(c) (%08x)", op); return 2;} |
| 752 | | int arcompact_handle0f_14_dasm(DASM_OPS_16) { print("ADD1_S b <- b + (c << 1) (%08x)", op); return 2;} |
| 753 | | int arcompact_handle0f_15_dasm(DASM_OPS_16) { print("ADD2_S b <- b + (c << 2) (%08x)", op); return 2;} |
| 754 | | int arcompact_handle0f_16_dasm(DASM_OPS_16) { print("ADD3_S b <- b + (c << 3) (%08x)", op); return 2;} |
| 755 | | |
| 756 | | |
| 757 | | int arcompact_handle0f_18_dasm(DASM_OPS_16) { print("ASL_S b <- b asl c (%08x)", op); return 2;} |
| 758 | | int arcompact_handle0f_19_dasm(DASM_OPS_16) { print("LSR_S b <- b lsr c (%08x)", op); return 2;} |
| 759 | | int arcompact_handle0f_1a_dasm(DASM_OPS_16) { print("ASR_S b <- b asr c (%08x)", op); return 2;} |
| 760 | | int arcompact_handle0f_1b_dasm(DASM_OPS_16) { print("ASL_S b <- c + c (%08x)", op); return 2;} |
| 761 | | int arcompact_handle0f_1c_dasm(DASM_OPS_16) { print("ASR_S b <- c asr 1 (%08x)", op); return 2;} |
| 762 | | int arcompact_handle0f_1d_dasm(DASM_OPS_16) { print("LSR_S b <- c lsr 1(%08x)", op); return 2;} |
| 763 | | int arcompact_handle0f_1e_dasm(DASM_OPS_16) { print("TRAP_S (%08x)", op); return 2;} |
| 764 | | int arcompact_handle0f_1f_dasm(DASM_OPS_16) { print("BRK_S (%08x)", op); return 2;} |
| 765 | | |
| 766 | | |
| 767 | | int arcompact_handle10_dasm(DASM_OPS_16) |
| 768 | | { |
| 769 | | print("LD_S (%04x)", op); |
| 770 | | return 2; |
| 771 | | } |
| 772 | | |
| 773 | | int arcompact_handle11_dasm(DASM_OPS_16) |
| 774 | | { |
| 775 | | print("LDB_S (%04x)", op); |
| 776 | | return 2; |
| 777 | | } |
| 778 | | |
| 779 | | int arcompact_handle12_dasm(DASM_OPS_16) |
| 780 | | { |
| 781 | | print("LDW_S (%04x)", op); |
| 782 | | return 2; |
| 783 | | } |
| 784 | | |
| 785 | | int arcompact_handle13_dasm(DASM_OPS_16) |
| 786 | | { |
| 787 | | print("LSW_S.X (%04x)", op); |
| 788 | | return 2; |
| 789 | | } |
| 790 | | |
| 791 | | int arcompact_handle14_dasm(DASM_OPS_16) |
| 792 | | { |
| 793 | | print("ST_S (%04x)", op); |
| 794 | | return 2; |
| 795 | | } |
| 796 | | |
| 797 | | int arcompact_handle15_dasm(DASM_OPS_16) |
| 798 | | { |
| 799 | | print("STB_S (%04x)", op); |
| 800 | | return 2; |
| 801 | | } |
| 802 | | |
| 803 | | int arcompact_handle16_dasm(DASM_OPS_16) |
| 804 | | { |
| 805 | | print("STW_S (%04x)", op); |
| 806 | | return 2; |
| 807 | | } |
| 808 | | |
| 809 | | |
| 810 | | int arcompact_handle17_00_dasm(DASM_OPS_16) |
| 811 | | { |
| 812 | | int size = 2; |
| 813 | | print("ASL_S b <- b asl u5 (%04x)", op); |
| 814 | | return size; |
| 815 | | } |
| 816 | | |
| 817 | | int arcompact_handle17_01_dasm(DASM_OPS_16) |
| 818 | | { |
| 819 | | int size = 2; |
| 820 | | print("LSR_S b <- b lsr u5 (%04x)", op); |
| 821 | | return size; |
| 822 | | } |
| 823 | | |
| 824 | | int arcompact_handle17_02_dasm(DASM_OPS_16) |
| 825 | | { |
| 826 | | int size = 2; |
| 827 | | print("ASR_S b <- b asr u5 (%04x)", op); |
| 828 | | return size; |
| 829 | | } |
| 830 | | |
| 831 | | int arcompact_handle17_03_dasm(DASM_OPS_16) |
| 832 | | { |
| 833 | | int size = 2; |
| 834 | | print("SUB_S b <- b - u5 (%04x)", op); |
| 835 | | return size; |
| 836 | | } |
| 837 | | |
| 838 | | int arcompact_handle17_04_dasm(DASM_OPS_16) |
| 839 | | { |
| 840 | | int size = 2; |
| 841 | | print("BSET_S b <- b | (1 << u5) (%04x)", op); |
| 842 | | return size; |
| 843 | | } |
| 844 | | |
| 845 | | int arcompact_handle17_05_dasm(DASM_OPS_16) |
| 846 | | { |
| 847 | | int size = 2; |
| 848 | | print("BCLR_S b <- b & !(1 << u5) (%04x)", op); |
| 849 | | return size; |
| 850 | | } |
| 851 | | |
| 852 | | int arcompact_handle17_06_dasm(DASM_OPS_16) |
| 853 | | { |
| 854 | | int size = 2; |
| 855 | | print("BMSK_S (%04x)", op); |
| 856 | | return size; |
| 857 | | } |
| 858 | | |
| 859 | | int arcompact_handle17_07_dasm(DASM_OPS_16) |
| 860 | | { |
| 861 | | int size = 2; |
| 862 | | print("BTST_S (%04x)", op); |
| 863 | | return size; |
| 864 | | } |
| 865 | | |
| 866 | | |
| 867 | | // op bits remaining for 0x18_xx subgroups 0x071f |
| 868 | | |
| 869 | | int arcompact_handle18_00_dasm(DASM_OPS_16) |
| 870 | | { |
| 871 | | print("LD_S (SP) (%04x)", op); |
| 872 | | return 2; |
| 873 | | } |
| 874 | | |
| 875 | | int arcompact_handle18_01_dasm(DASM_OPS_16) |
| 876 | | { |
| 877 | | print("LDB_S (SP) (%04x)", op); |
| 878 | | return 2; |
| 879 | | } |
| 880 | | |
| 881 | | int arcompact_handle18_02_dasm(DASM_OPS_16) |
| 882 | | { |
| 883 | | print("ST_S (SP) (%04x)", op); |
| 884 | | return 2; |
| 885 | | } |
| 886 | | |
| 887 | | int arcompact_handle18_03_dasm(DASM_OPS_16) |
| 888 | | { |
| 889 | | print("STB_S (SP) (%04x)", op); |
| 890 | | return 2; |
| 891 | | } |
| 892 | | |
| 893 | | int arcompact_handle18_04_dasm(DASM_OPS_16) |
| 894 | | { |
| 895 | | print("ADD_S (SP) (%04x)", op); |
| 896 | | return 2; |
| 897 | | } |
| 898 | | |
| 899 | | // op bits remaining for 0x18_05_xx subgroups 0x001f |
| 900 | | int arcompact_handle18_05_00_dasm(DASM_OPS_16) |
| 901 | | { |
| 902 | | int u = op & 0x001f; |
| 903 | | op &= ~0x001f; // all bits now used |
| 904 | | |
| 905 | | print("ADD_S %02x (SP)", u); |
| 906 | | return 2; |
| 907 | | |
| 908 | | } |
| 909 | | |
| 910 | | int arcompact_handle18_05_01_dasm(DASM_OPS_16) |
| 911 | | { |
| 912 | | int u = op & 0x001f; |
| 913 | | op &= ~0x001f; // all bits now used |
| 914 | | |
| 915 | | print("SUB_S %02x (SP)", u); |
| 916 | | return 2; |
| 917 | | } |
| 918 | | |
| 919 | | // op bits remaining for 0x18_06_xx subgroups 0x0700 |
| 920 | | int arcompact_handle18_06_01_dasm(DASM_OPS_16) |
| 921 | | { |
| 922 | | int b = (op & 0x0700) >> 8; |
| 923 | | op &= ~0x0700; // all bits now used |
| 924 | | |
| 925 | | print("POP_S [%02x]", b); |
| 926 | | |
| 927 | | return 2; |
| 928 | | } |
| 929 | | |
| 930 | | int arcompact_handle18_06_11_dasm(DASM_OPS_16) |
| 931 | | { |
| 932 | | int res = (op & 0x0700) >> 8; |
| 933 | | op &= ~0x0700; // all bits now used |
| 934 | | |
| 935 | | if (res) |
| 936 | | print("POP_S [BLINK] (Reserved Bits set %04x)", op); |
| 937 | | else |
| 938 | | print("POP_S [BLINK]"); |
| 939 | | |
| 940 | | return 2; |
| 941 | | } |
| 942 | | |
| 943 | | // op bits remaining for 0x18_07_xx subgroups 0x0700 |
| 944 | | int arcompact_handle18_07_01_dasm(DASM_OPS_16) |
| 945 | | { |
| 946 | | int b = (op & 0x0700) >> 8; |
| 947 | | op &= ~0x0700; // all bits now used |
| 948 | | |
| 949 | | print("PUSH_S [%02x]", b); |
| 950 | | |
| 951 | | return 2; |
| 952 | | } |
| 953 | | |
| 954 | | |
| 955 | | int arcompact_handle18_07_11_dasm(DASM_OPS_16) |
| 956 | | { |
| 957 | | int res = (op & 0x0700) >> 8; |
| 958 | | op &= ~0x0700; // all bits now used |
| 959 | | |
| 960 | | if (res) |
| 961 | | print("PUSH_S [BLINK] (Reserved Bits set %04x)", op); |
| 962 | | else |
| 963 | | print("PUSH_S [BLINK]"); |
| 964 | | |
| 965 | | return 2; |
| 966 | | } |
| 967 | | |
| 968 | | int arcompact_handle19_00_dasm(DASM_OPS_16) { print("LD_S r0 <- m[GP + s11].long (%04x)", op); return 2;} |
| 969 | | int arcompact_handle19_01_dasm(DASM_OPS_16) { print("LDB_S r0 <- m[GP + s9].byte (%04x)", op); return 2;} |
| 970 | | int arcompact_handle19_02_dasm(DASM_OPS_16) { print("LDW_S r0 <- m[GP + s10].word (%04x)", op); return 2;} |
| 971 | | int arcompact_handle19_03_dasm(DASM_OPS_16) { print("ADD_S r0 <- GP + s11 (%04x)", op); return 2;} |
| 972 | | |
| 973 | | int arcompact_handle1a_dasm(DASM_OPS_16) |
| 974 | | { |
| 975 | | print("PCL Instr (%04x)", op); |
| 976 | | return 2; |
| 977 | | } |
| 978 | | |
| 979 | | int arcompact_handle1b_dasm(DASM_OPS_16) |
| 980 | | { |
| 981 | | print("MOV_S (%04x)", op); |
| 982 | | return 2; |
| 983 | | } |
| 984 | | |
| 985 | | int arcompact_handle1c_00_dasm(DASM_OPS_16) { print("ADD_S b <- b + u7 (%04x)", op); return 2;} |
| 986 | | int arcompact_handle1c_01_dasm(DASM_OPS_16) { print("CMP_S b - u7 (%04x)", op); return 2;} |
| 987 | | |
| 988 | | |
| 989 | | int arcompact_handle1d_00_dasm(DASM_OPS_16) { print("BREQ_S (%04x)", op); return 2;} |
| 990 | | int arcompact_handle1d_01_dasm(DASM_OPS_16) { print("BRNE_S (%04x)", op); return 2;} |
| 991 | | |
| 992 | | |
| 993 | | int arcompact_handle1e_00_dasm(DASM_OPS_16) { print("B_S (%04x)", op); return 2;} |
| 994 | | int arcompact_handle1e_01_dasm(DASM_OPS_16) { print("BEQ_S (%04x)", op); return 2;} |
| 995 | | int arcompact_handle1e_02_dasm(DASM_OPS_16) { print("BNE_S (%04x)", op); return 2;} |
| 996 | | |
| 997 | | int arcompact_handle1e_03_00_dasm(DASM_OPS_16) { print("BGT_S (%04x)", op); return 2;} |
| 998 | | int arcompact_handle1e_03_01_dasm(DASM_OPS_16) { print("BGE_S (%04x)", op); return 2;} |
| 999 | | int arcompact_handle1e_03_02_dasm(DASM_OPS_16) { print("BLT_S (%04x)", op); return 2;} |
| 1000 | | int arcompact_handle1e_03_03_dasm(DASM_OPS_16) { print("BLE_S (%04x)", op); return 2;} |
| 1001 | | int arcompact_handle1e_03_04_dasm(DASM_OPS_16) { print("BHI_S (%04x)", op); return 2;} |
| 1002 | | int arcompact_handle1e_03_05_dasm(DASM_OPS_16) { print("BHS_S (%04x)", op); return 2;} |
| 1003 | | int arcompact_handle1e_03_06_dasm(DASM_OPS_16) { print("BLO_S (%04x)", op); return 2;} |
| 1004 | | int arcompact_handle1e_03_07_dasm(DASM_OPS_16) { print("BLS_S (%04x)", op); return 2;} |
| 1005 | | |
| 1006 | | int arcompact_handle1f_dasm(DASM_OPS_16) |
| 1007 | | { |
| 1008 | | print("BL_S (%04x)", op); |
| 1009 | | return 2; |
| 1010 | | } |
| 1011 | | |
| 1012 | | /************************************************************************************************************************************ |
| 1013 | | * * |
| 1014 | | * illegal opcode handlers (disassembly) * |
| 1015 | | * * |
| 1016 | | ************************************************************************************************************************************/ |
| 1017 | | |
| 1018 | | int arcompact_handle01_01_00_06_dasm(DASM_OPS_32) { print("<illegal 01_01_00_06> (%08x)", op); return 4; } |
| 1019 | | int arcompact_handle01_01_00_07_dasm(DASM_OPS_32) { print("<illegal 01_01_00_07> (%08x)", op); return 4; } |
| 1020 | | int arcompact_handle01_01_00_08_dasm(DASM_OPS_32) { print("<illegal 01_01_00_08> (%08x)", op); return 4; } |
| 1021 | | int arcompact_handle01_01_00_09_dasm(DASM_OPS_32) { print("<illegal 01_01_00_09> (%08x)", op); return 4; } |
| 1022 | | int arcompact_handle01_01_00_0a_dasm(DASM_OPS_32) { print("<illegal 01_01_00_0a> (%08x)", op); return 4; } |
| 1023 | | int arcompact_handle01_01_00_0b_dasm(DASM_OPS_32) { print("<illegal 01_01_00_0b> (%08x)", op); return 4; } |
| 1024 | | int arcompact_handle01_01_00_0c_dasm(DASM_OPS_32) { print("<illegal 01_01_00_0c> (%08x)", op); return 4; } |
| 1025 | | int arcompact_handle01_01_00_0d_dasm(DASM_OPS_32) { print("<illegal 01_01_00_0d> (%08x)", op); return 4; } |
| 1026 | | |
| 1027 | | int arcompact_handle01_01_01_06_dasm(DASM_OPS_32) { print("<illegal 01_01_01_06> (%08x)", op); return 4; } |
| 1028 | | int arcompact_handle01_01_01_07_dasm(DASM_OPS_32) { print("<illegal 01_01_01_07> (%08x)", op); return 4; } |
| 1029 | | int arcompact_handle01_01_01_08_dasm(DASM_OPS_32) { print("<illegal 01_01_01_08> (%08x)", op); return 4; } |
| 1030 | | int arcompact_handle01_01_01_09_dasm(DASM_OPS_32) { print("<illegal 01_01_01_09> (%08x)", op); return 4; } |
| 1031 | | int arcompact_handle01_01_01_0a_dasm(DASM_OPS_32) { print("<illegal 01_01_01_0a> (%08x)", op); return 4; } |
| 1032 | | int arcompact_handle01_01_01_0b_dasm(DASM_OPS_32) { print("<illegal 01_01_01_0b> (%08x)", op); return 4; } |
| 1033 | | int arcompact_handle01_01_01_0c_dasm(DASM_OPS_32) { print("<illegal 01_01_01_0c> (%08x)", op); return 4; } |
| 1034 | | int arcompact_handle01_01_01_0d_dasm(DASM_OPS_32) { print("<illegal 01_01_01_0d> (%08x)", op); return 4; } |
| 1035 | | |
| 1036 | | |
| 1037 | | int arcompact_handle04_1e_dasm(DASM_OPS_32) { print("<illegal 0x04_1e> (%08x)", op); return 4;} |
| 1038 | | int arcompact_handle04_1f_dasm(DASM_OPS_32) { print("<illegal 0x04_1f> (%08x)", op); return 4;} |
| 1039 | | |
| 1040 | | int arcompact_handle04_24_dasm(DASM_OPS_32) { print("<illegal 0x04_24> (%08x)", op); return 4;} |
| 1041 | | int arcompact_handle04_25_dasm(DASM_OPS_32) { print("<illegal 0x04_25> (%08x)", op); return 4;} |
| 1042 | | int arcompact_handle04_26_dasm(DASM_OPS_32) { print("<illegal 0x04_26> (%08x)", op); return 4;} |
| 1043 | | int arcompact_handle04_27_dasm(DASM_OPS_32) { print("<illegal 0x04_27> (%08x)", op); return 4;} |
| 1044 | | |
| 1045 | | int arcompact_handle04_2c_dasm(DASM_OPS_32) { print("<illegal 0x04_2c> (%08x)", op); return 4;} |
| 1046 | | int arcompact_handle04_2d_dasm(DASM_OPS_32) { print("<illegal 0x04_2d> (%08x)", op); return 4;} |
| 1047 | | int arcompact_handle04_2e_dasm(DASM_OPS_32) { print("<illegal 0x04_2e> (%08x)", op); return 4;} |
| 1048 | | |
| 1049 | | int arcompact_handle04_2f_0d_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_0d> (%08x)", op); return 4;} |
| 1050 | | int arcompact_handle04_2f_0e_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_0e> (%08x)", op); return 4;} |
| 1051 | | int arcompact_handle04_2f_0f_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_0f> (%08x)", op); return 4;} |
| 1052 | | int arcompact_handle04_2f_10_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_10> (%08x)", op); return 4;} |
| 1053 | | int arcompact_handle04_2f_11_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_11> (%08x)", op); return 4;} |
| 1054 | | int arcompact_handle04_2f_12_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_12> (%08x)", op); return 4;} |
| 1055 | | int arcompact_handle04_2f_13_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_13> (%08x)", op); return 4;} |
| 1056 | | int arcompact_handle04_2f_14_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_14> (%08x)", op); return 4;} |
| 1057 | | int arcompact_handle04_2f_15_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_15> (%08x)", op); return 4;} |
| 1058 | | int arcompact_handle04_2f_16_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_16> (%08x)", op); return 4;} |
| 1059 | | int arcompact_handle04_2f_17_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_17> (%08x)", op); return 4;} |
| 1060 | | int arcompact_handle04_2f_18_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_18> (%08x)", op); return 4;} |
| 1061 | | int arcompact_handle04_2f_19_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_19> (%08x)", op); return 4;} |
| 1062 | | int arcompact_handle04_2f_1a_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_1a> (%08x)", op); return 4;} |
| 1063 | | int arcompact_handle04_2f_1b_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_1b> (%08x)", op); return 4;} |
| 1064 | | int arcompact_handle04_2f_1c_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_1c> (%08x)", op); return 4;} |
| 1065 | | int arcompact_handle04_2f_1d_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_1d> (%08x)", op); return 4;} |
| 1066 | | int arcompact_handle04_2f_1e_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_1e> (%08x)", op); return 4;} |
| 1067 | | int arcompact_handle04_2f_1f_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_1f> (%08x)", op); return 4;} |
| 1068 | | int arcompact_handle04_2f_20_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_20> (%08x)", op); return 4;} |
| 1069 | | int arcompact_handle04_2f_21_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_21> (%08x)", op); return 4;} |
| 1070 | | int arcompact_handle04_2f_22_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_22> (%08x)", op); return 4;} |
| 1071 | | int arcompact_handle04_2f_23_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_23> (%08x)", op); return 4;} |
| 1072 | | int arcompact_handle04_2f_24_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_24> (%08x)", op); return 4;} |
| 1073 | | int arcompact_handle04_2f_25_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_25> (%08x)", op); return 4;} |
| 1074 | | int arcompact_handle04_2f_26_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_26> (%08x)", op); return 4;} |
| 1075 | | int arcompact_handle04_2f_27_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_27> (%08x)", op); return 4;} |
| 1076 | | int arcompact_handle04_2f_28_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_28> (%08x)", op); return 4;} |
| 1077 | | int arcompact_handle04_2f_29_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_29> (%08x)", op); return 4;} |
| 1078 | | int arcompact_handle04_2f_2a_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_2a> (%08x)", op); return 4;} |
| 1079 | | int arcompact_handle04_2f_2b_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_2b> (%08x)", op); return 4;} |
| 1080 | | int arcompact_handle04_2f_2c_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_2c> (%08x)", op); return 4;} |
| 1081 | | int arcompact_handle04_2f_2d_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_2d> (%08x)", op); return 4;} |
| 1082 | | int arcompact_handle04_2f_2e_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_2e> (%08x)", op); return 4;} |
| 1083 | | int arcompact_handle04_2f_2f_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_2f> (%08x)", op); return 4;} |
| 1084 | | int arcompact_handle04_2f_30_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_30> (%08x)", op); return 4;} |
| 1085 | | int arcompact_handle04_2f_31_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_31> (%08x)", op); return 4;} |
| 1086 | | int arcompact_handle04_2f_32_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_32> (%08x)", op); return 4;} |
| 1087 | | int arcompact_handle04_2f_33_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_33> (%08x)", op); return 4;} |
| 1088 | | int arcompact_handle04_2f_34_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_34> (%08x)", op); return 4;} |
| 1089 | | int arcompact_handle04_2f_35_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_35> (%08x)", op); return 4;} |
| 1090 | | int arcompact_handle04_2f_36_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_36> (%08x)", op); return 4;} |
| 1091 | | int arcompact_handle04_2f_37_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_37> (%08x)", op); return 4;} |
| 1092 | | int arcompact_handle04_2f_38_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_38> (%08x)", op); return 4;} |
| 1093 | | int arcompact_handle04_2f_39_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_39> (%08x)", op); return 4;} |
| 1094 | | int arcompact_handle04_2f_3a_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3a> (%08x)", op); return 4;} |
| 1095 | | int arcompact_handle04_2f_3b_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3b> (%08x)", op); return 4;} |
| 1096 | | int arcompact_handle04_2f_3c_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3c> (%08x)", op); return 4;} |
| 1097 | | int arcompact_handle04_2f_3d_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3d> (%08x)", op); return 4;} |
| 1098 | | int arcompact_handle04_2f_3e_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3e> (%08x)", op); return 4;} |
| 1099 | | |
| 1100 | | int arcompact_handle04_2f_3f_00_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_00> (%08x)", op); return 4;} |
| 1101 | | int arcompact_handle04_2f_3f_06_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_06> (%08x)", op); return 4;} |
| 1102 | | int arcompact_handle04_2f_3f_07_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_07> (%08x)", op); return 4;} |
| 1103 | | int arcompact_handle04_2f_3f_08_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_08> (%08x)", op); return 4;} |
| 1104 | | int arcompact_handle04_2f_3f_09_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_09> (%08x)", op); return 4;} |
| 1105 | | int arcompact_handle04_2f_3f_0a_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_0a> (%08x)", op); return 4;} |
| 1106 | | int arcompact_handle04_2f_3f_0b_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_0b> (%08x)", op); return 4;} |
| 1107 | | int arcompact_handle04_2f_3f_0c_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_0c> (%08x)", op); return 4;} |
| 1108 | | int arcompact_handle04_2f_3f_0d_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_0d> (%08x)", op); return 4;} |
| 1109 | | int arcompact_handle04_2f_3f_0e_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_0e> (%08x)", op); return 4;} |
| 1110 | | int arcompact_handle04_2f_3f_0f_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_0f> (%08x)", op); return 4;} |
| 1111 | | int arcompact_handle04_2f_3f_10_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_10> (%08x)", op); return 4;} |
| 1112 | | int arcompact_handle04_2f_3f_11_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_11> (%08x)", op); return 4;} |
| 1113 | | int arcompact_handle04_2f_3f_12_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_12> (%08x)", op); return 4;} |
| 1114 | | int arcompact_handle04_2f_3f_13_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_13> (%08x)", op); return 4;} |
| 1115 | | int arcompact_handle04_2f_3f_14_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_14> (%08x)", op); return 4;} |
| 1116 | | int arcompact_handle04_2f_3f_15_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_15> (%08x)", op); return 4;} |
| 1117 | | int arcompact_handle04_2f_3f_16_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_16> (%08x)", op); return 4;} |
| 1118 | | int arcompact_handle04_2f_3f_17_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_17> (%08x)", op); return 4;} |
| 1119 | | int arcompact_handle04_2f_3f_18_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_18> (%08x)", op); return 4;} |
| 1120 | | int arcompact_handle04_2f_3f_19_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_19> (%08x)", op); return 4;} |
| 1121 | | int arcompact_handle04_2f_3f_1a_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_1a> (%08x)", op); return 4;} |
| 1122 | | int arcompact_handle04_2f_3f_1b_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_1b> (%08x)", op); return 4;} |
| 1123 | | int arcompact_handle04_2f_3f_1c_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_1c> (%08x)", op); return 4;} |
| 1124 | | int arcompact_handle04_2f_3f_1d_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_1d> (%08x)", op); return 4;} |
| 1125 | | int arcompact_handle04_2f_3f_1e_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_1e> (%08x)", op); return 4;} |
| 1126 | | int arcompact_handle04_2f_3f_1f_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_1f> (%08x)", op); return 4;} |
| 1127 | | int arcompact_handle04_2f_3f_20_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_20> (%08x)", op); return 4;} |
| 1128 | | int arcompact_handle04_2f_3f_21_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_21> (%08x)", op); return 4;} |
| 1129 | | int arcompact_handle04_2f_3f_22_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_22> (%08x)", op); return 4;} |
| 1130 | | int arcompact_handle04_2f_3f_23_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_23> (%08x)", op); return 4;} |
| 1131 | | int arcompact_handle04_2f_3f_24_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_24> (%08x)", op); return 4;} |
| 1132 | | int arcompact_handle04_2f_3f_25_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_25> (%08x)", op); return 4;} |
| 1133 | | int arcompact_handle04_2f_3f_26_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_26> (%08x)", op); return 4;} |
| 1134 | | int arcompact_handle04_2f_3f_27_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_27> (%08x)", op); return 4;} |
| 1135 | | int arcompact_handle04_2f_3f_28_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_28> (%08x)", op); return 4;} |
| 1136 | | int arcompact_handle04_2f_3f_29_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_29> (%08x)", op); return 4;} |
| 1137 | | int arcompact_handle04_2f_3f_2a_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_2a> (%08x)", op); return 4;} |
| 1138 | | int arcompact_handle04_2f_3f_2b_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_2b> (%08x)", op); return 4;} |
| 1139 | | int arcompact_handle04_2f_3f_2c_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_2c> (%08x)", op); return 4;} |
| 1140 | | int arcompact_handle04_2f_3f_2d_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_2d> (%08x)", op); return 4;} |
| 1141 | | int arcompact_handle04_2f_3f_2e_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_2e> (%08x)", op); return 4;} |
| 1142 | | int arcompact_handle04_2f_3f_2f_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_2f> (%08x)", op); return 4;} |
| 1143 | | int arcompact_handle04_2f_3f_30_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_30> (%08x)", op); return 4;} |
| 1144 | | int arcompact_handle04_2f_3f_31_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_31> (%08x)", op); return 4;} |
| 1145 | | int arcompact_handle04_2f_3f_32_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_32> (%08x)", op); return 4;} |
| 1146 | | int arcompact_handle04_2f_3f_33_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_33> (%08x)", op); return 4;} |
| 1147 | | int arcompact_handle04_2f_3f_34_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_34> (%08x)", op); return 4;} |
| 1148 | | int arcompact_handle04_2f_3f_35_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_35> (%08x)", op); return 4;} |
| 1149 | | int arcompact_handle04_2f_3f_36_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_36> (%08x)", op); return 4;} |
| 1150 | | int arcompact_handle04_2f_3f_37_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_37> (%08x)", op); return 4;} |
| 1151 | | int arcompact_handle04_2f_3f_38_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_38> (%08x)", op); return 4;} |
| 1152 | | int arcompact_handle04_2f_3f_39_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_39> (%08x)", op); return 4;} |
| 1153 | | int arcompact_handle04_2f_3f_3a_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_3a> (%08x)", op); return 4;} |
| 1154 | | int arcompact_handle04_2f_3f_3b_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_3b> (%08x)", op); return 4;} |
| 1155 | | int arcompact_handle04_2f_3f_3c_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_3c> (%08x)", op); return 4;} |
| 1156 | | int arcompact_handle04_2f_3f_3d_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_3d> (%08x)", op); return 4;} |
| 1157 | | int arcompact_handle04_2f_3f_3e_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_3e> (%08x)", op); return 4;} |
| 1158 | | int arcompact_handle04_2f_3f_3f_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_3f> (%08x)", op); return 4;} |
| 1159 | | |
| 1160 | | |
| 1161 | | |
| 1162 | | |
| 1163 | | int arcompact_handle04_38_dasm(DASM_OPS_32) { print("<illegal 0x04_38> (%08x)", op); return 4;} |
| 1164 | | int arcompact_handle04_39_dasm(DASM_OPS_32) { print("<illegal 0x04_39> (%08x)", op); return 4;} |
| 1165 | | int arcompact_handle04_3a_dasm(DASM_OPS_32) { print("<illegal 0x04_3a> (%08x)", op); return 4;} |
| 1166 | | int arcompact_handle04_3b_dasm(DASM_OPS_32) { print("<illegal 0x04_3b> (%08x)", op); return 4;} |
| 1167 | | int arcompact_handle04_3c_dasm(DASM_OPS_32) { print("<illegal 0x04_3c> (%08x)", op); return 4;} |
| 1168 | | int arcompact_handle04_3d_dasm(DASM_OPS_32) { print("<illegal 0x04_3d> (%08x)", op); return 4;} |
| 1169 | | int arcompact_handle04_3e_dasm(DASM_OPS_32) { print("<illegal 0x04_3e> (%08x)", op); return 4;} |
| 1170 | | int arcompact_handle04_3f_dasm(DASM_OPS_32) { print("<illegal 0x04_3f> (%08x)", op); return 4;} |
| 1171 | | |
| 1172 | | |
| 1173 | | int arcompact_handle05_09_dasm(DASM_OPS_32) { print("<illegal 0x05_09> (%08x)", op); return 4;} |
| 1174 | | int arcompact_handle05_0c_dasm(DASM_OPS_32) { print("<illegal 0x05_0c> (%08x)", op); return 4;} |
| 1175 | | int arcompact_handle05_0d_dasm(DASM_OPS_32) { print("<illegal 0x05_0d> (%08x)", op); return 4;} |
| 1176 | | int arcompact_handle05_0e_dasm(DASM_OPS_32) { print("<illegal 0x05_0e> (%08x)", op); return 4;} |
| 1177 | | int arcompact_handle05_0f_dasm(DASM_OPS_32) { print("<illegal 0x05_0f> (%08x)", op); return 4;} |
| 1178 | | int arcompact_handle05_10_dasm(DASM_OPS_32) { print("<illegal 0x05_10> (%08x)", op); return 4;} |
| 1179 | | int arcompact_handle05_11_dasm(DASM_OPS_32) { print("<illegal 0x05_11> (%08x)", op); return 4;} |
| 1180 | | int arcompact_handle05_12_dasm(DASM_OPS_32) { print("<illegal 0x05_12> (%08x)", op); return 4;} |
| 1181 | | int arcompact_handle05_13_dasm(DASM_OPS_32) { print("<illegal 0x05_13> (%08x)", op); return 4;} |
| 1182 | | int arcompact_handle05_14_dasm(DASM_OPS_32) { print("<illegal 0x05_14> (%08x)", op); return 4;} |
| 1183 | | int arcompact_handle05_15_dasm(DASM_OPS_32) { print("<illegal 0x05_15> (%08x)", op); return 4;} |
| 1184 | | int arcompact_handle05_16_dasm(DASM_OPS_32) { print("<illegal 0x05_16> (%08x)", op); return 4;} |
| 1185 | | int arcompact_handle05_17_dasm(DASM_OPS_32) { print("<illegal 0x05_17> (%08x)", op); return 4;} |
| 1186 | | int arcompact_handle05_18_dasm(DASM_OPS_32) { print("<illegal 0x05_18> (%08x)", op); return 4;} |
| 1187 | | int arcompact_handle05_19_dasm(DASM_OPS_32) { print("<illegal 0x05_19> (%08x)", op); return 4;} |
| 1188 | | int arcompact_handle05_1a_dasm(DASM_OPS_32) { print("<illegal 0x05_1a> (%08x)", op); return 4;} |
| 1189 | | int arcompact_handle05_1b_dasm(DASM_OPS_32) { print("<illegal 0x05_1b> (%08x)", op); return 4;} |
| 1190 | | int arcompact_handle05_1c_dasm(DASM_OPS_32) { print("<illegal 0x05_1c> (%08x)", op); return 4;} |
| 1191 | | int arcompact_handle05_1d_dasm(DASM_OPS_32) { print("<illegal 0x05_1d> (%08x)", op); return 4;} |
| 1192 | | int arcompact_handle05_1e_dasm(DASM_OPS_32) { print("<illegal 0x05_1e> (%08x)", op); return 4;} |
| 1193 | | int arcompact_handle05_1f_dasm(DASM_OPS_32) { print("<illegal 0x05_1f> (%08x)", op); return 4;} |
| 1194 | | int arcompact_handle05_20_dasm(DASM_OPS_32) { print("<illegal 0x05_20> (%08x)", op); return 4;} |
| 1195 | | int arcompact_handle05_21_dasm(DASM_OPS_32) { print("<illegal 0x05_21> (%08x)", op); return 4;} |
| 1196 | | int arcompact_handle05_22_dasm(DASM_OPS_32) { print("<illegal 0x05_22> (%08x)", op); return 4;} |
| 1197 | | int arcompact_handle05_23_dasm(DASM_OPS_32) { print("<illegal 0x05_23> (%08x)", op); return 4;} |
| 1198 | | int arcompact_handle05_24_dasm(DASM_OPS_32) { print("<illegal 0x05_24> (%08x)", op); return 4;} |
| 1199 | | int arcompact_handle05_25_dasm(DASM_OPS_32) { print("<illegal 0x05_25> (%08x)", op); return 4;} |
| 1200 | | int arcompact_handle05_26_dasm(DASM_OPS_32) { print("<illegal 0x05_26> (%08x)", op); return 4;} |
| 1201 | | int arcompact_handle05_27_dasm(DASM_OPS_32) { print("<illegal 0x05_27> (%08x)", op); return 4;} |
| 1202 | | |
| 1203 | | int arcompact_handle05_2a_dasm(DASM_OPS_32) { print("<illegal 0x05_2a> (%08x)", op); return 4;} |
| 1204 | | int arcompact_handle05_2b_dasm(DASM_OPS_32) { print("<illegal 0x05_2b> (%08x)", op); return 4;} |
| 1205 | | int arcompact_handle05_2c_dasm(DASM_OPS_32) { print("<illegal 0x05_2c> (%08x)", op); return 4;} |
| 1206 | | int arcompact_handle05_2d_dasm(DASM_OPS_32) { print("<illegal 0x05_2d> (%08x)", op); return 4;} |
| 1207 | | int arcompact_handle05_2e_dasm(DASM_OPS_32) { print("<illegal 0x05_2e> (%08x)", op); return 4;} |
| 1208 | | |
| 1209 | | int arcompact_handle05_30_dasm(DASM_OPS_32) { print("<illegal 0x05_30> (%08x)", op); return 4;} |
| 1210 | | int arcompact_handle05_31_dasm(DASM_OPS_32) { print("<illegal 0x05_31> (%08x)", op); return 4;} |
| 1211 | | int arcompact_handle05_32_dasm(DASM_OPS_32) { print("<illegal 0x05_32> (%08x)", op); return 4;} |
| 1212 | | int arcompact_handle05_33_dasm(DASM_OPS_32) { print("<illegal 0x05_33> (%08x)", op); return 4;} |
| 1213 | | int arcompact_handle05_34_dasm(DASM_OPS_32) { print("<illegal 0x05_34> (%08x)", op); return 4;} |
| 1214 | | int arcompact_handle05_35_dasm(DASM_OPS_32) { print("<illegal 0x05_35> (%08x)", op); return 4;} |
| 1215 | | int arcompact_handle05_36_dasm(DASM_OPS_32) { print("<illegal 0x05_36> (%08x)", op); return 4;} |
| 1216 | | int arcompact_handle05_37_dasm(DASM_OPS_32) { print("<illegal 0x05_37> (%08x)", op); return 4;} |
| 1217 | | int arcompact_handle05_38_dasm(DASM_OPS_32) { print("<illegal 0x05_38> (%08x)", op); return 4;} |
| 1218 | | int arcompact_handle05_39_dasm(DASM_OPS_32) { print("<illegal 0x05_39> (%08x)", op); return 4;} |
| 1219 | | int arcompact_handle05_3a_dasm(DASM_OPS_32) { print("<illegal 0x05_3a> (%08x)", op); return 4;} |
| 1220 | | int arcompact_handle05_3b_dasm(DASM_OPS_32) { print("<illegal 0x05_3b> (%08x)", op); return 4;} |
| 1221 | | int arcompact_handle05_3c_dasm(DASM_OPS_32) { print("<illegal 0x05_3c> (%08x)", op); return 4;} |
| 1222 | | int arcompact_handle05_3d_dasm(DASM_OPS_32) { print("<illegal 0x05_3d> (%08x)", op); return 4;} |
| 1223 | | int arcompact_handle05_3e_dasm(DASM_OPS_32) { print("<illegal 0x05_3e> (%08x)", op); return 4;} |
| 1224 | | int arcompact_handle05_3f_dasm(DASM_OPS_32) { print("<illegal 0x05_3f> (%08x)", op); return 4;} |
| 1225 | | |
| 1226 | | int arcompact_handle0f_00_04_dasm(DASM_OPS_16) { print("<illegal 0x0f_00_00> (%08x)", op); return 2;} |
| 1227 | | int arcompact_handle0f_00_05_dasm(DASM_OPS_16) { print("<illegal 0x0f_00_00> (%08x)", op); return 2;} |
| 1228 | | int arcompact_handle0f_00_07_02_dasm(DASM_OPS_16) { print("<illegal 0x0f_00_07_02> (%08x)", op); return 2;} |
| 1229 | | int arcompact_handle0f_00_07_03_dasm(DASM_OPS_16) { print("<illegal 0x0f_00_07_03> (%08x)", op); return 2;} |
| 1230 | | int arcompact_handle0f_01_dasm(DASM_OPS_16) { print("<illegal 0x0f_01> (%08x)", op); return 2;} |
| 1231 | | int arcompact_handle0f_03_dasm(DASM_OPS_16) { print("<illegal 0x0f_03> (%08x)", op); return 2;} |
| 1232 | | int arcompact_handle0f_08_dasm(DASM_OPS_16) { print("<illegal 0x0f_08> (%08x)", op); return 2;} |
| 1233 | | int arcompact_handle0f_09_dasm(DASM_OPS_16) { print("<illegal 0x0f_09> (%08x)", op); return 2;} |
| 1234 | | int arcompact_handle0f_0a_dasm(DASM_OPS_16) { print("<illegal 0x0f_0a> (%08x)", op); return 2;} |
| 1235 | | int arcompact_handle0f_17_dasm(DASM_OPS_16) { print("<illegal 0x0f_17> (%08x)", op); return 2;} |
| 1236 | | |
| 1237 | | int arcompact_handle18_05_02_dasm(DASM_OPS_16) { print("<illegal 0x18_05_02> (%04x)", op); return 2;} |
| 1238 | | int arcompact_handle18_05_03_dasm(DASM_OPS_16) { print("<illegal 0x18_05_03> (%04x)", op); return 2;} |
| 1239 | | int arcompact_handle18_05_04_dasm(DASM_OPS_16) { print("<illegal 0x18_05_04> (%04x)", op); return 2;} |
| 1240 | | int arcompact_handle18_05_05_dasm(DASM_OPS_16) { print("<illegal 0x18_05_05> (%04x)", op); return 2;} |
| 1241 | | int arcompact_handle18_05_06_dasm(DASM_OPS_16) { print("<illegal 0x18_05_06> (%04x)", op); return 2;} |
| 1242 | | int arcompact_handle18_05_07_dasm(DASM_OPS_16) { print("<illegal 0x18_05_07> (%04x)", op); return 2;} |
| 1243 | | int arcompact_handle18_06_00_dasm(DASM_OPS_16) { print("<illegal 0x18_06_00> (%04x)", op); return 2;} |
| 1244 | | int arcompact_handle18_06_02_dasm(DASM_OPS_16) { print("<illegal 0x18_06_02> (%04x)", op); return 2;} |
| 1245 | | int arcompact_handle18_06_03_dasm(DASM_OPS_16) { print("<illegal 0x18_06_03> (%04x)", op); return 2;} |
| 1246 | | int arcompact_handle18_06_04_dasm(DASM_OPS_16) { print("<illegal 0x18_06_04> (%04x)", op); return 2;} |
| 1247 | | int arcompact_handle18_06_05_dasm(DASM_OPS_16) { print("<illegal 0x18_06_05> (%04x)", op); return 2;} |
| 1248 | | int arcompact_handle18_06_06_dasm(DASM_OPS_16) { print("<illegal 0x18_06_06> (%04x)", op); return 2;} |
| 1249 | | int arcompact_handle18_06_07_dasm(DASM_OPS_16) { print("<illegal 0x18_06_07> (%04x)", op); return 2;} |
| 1250 | | int arcompact_handle18_06_08_dasm(DASM_OPS_16) { print("<illegal 0x18_06_08> (%04x)", op); return 2;} |
| 1251 | | int arcompact_handle18_06_09_dasm(DASM_OPS_16) { print("<illegal 0x18_06_09> (%04x)", op); return 2;} |
| 1252 | | int arcompact_handle18_06_0a_dasm(DASM_OPS_16) { print("<illegal 0x18_06_0a> (%04x)", op); return 2;} |
| 1253 | | int arcompact_handle18_06_0b_dasm(DASM_OPS_16) { print("<illegal 0x18_06_0b> (%04x)", op); return 2;} |
| 1254 | | int arcompact_handle18_06_0c_dasm(DASM_OPS_16) { print("<illegal 0x18_06_0c> (%04x)", op); return 2;} |
| 1255 | | int arcompact_handle18_06_0d_dasm(DASM_OPS_16) { print("<illegal 0x18_06_0d> (%04x)", op); return 2;} |
| 1256 | | int arcompact_handle18_06_0e_dasm(DASM_OPS_16) { print("<illegal 0x18_06_0e> (%04x)", op); return 2;} |
| 1257 | | int arcompact_handle18_06_0f_dasm(DASM_OPS_16) { print("<illegal 0x18_06_0f> (%04x)", op); return 2;} |
| 1258 | | int arcompact_handle18_06_10_dasm(DASM_OPS_16) { print("<illegal 0x18_06_10> (%04x)", op); return 2;} |
| 1259 | | int arcompact_handle18_06_12_dasm(DASM_OPS_16) { print("<illegal 0x18_06_12> (%04x)", op); return 2;} |
| 1260 | | int arcompact_handle18_06_13_dasm(DASM_OPS_16) { print("<illegal 0x18_06_13> (%04x)", op); return 2;} |
| 1261 | | int arcompact_handle18_06_14_dasm(DASM_OPS_16) { print("<illegal 0x18_06_14> (%04x)", op); return 2;} |
| 1262 | | int arcompact_handle18_06_15_dasm(DASM_OPS_16) { print("<illegal 0x18_06_15> (%04x)", op); return 2;} |
| 1263 | | int arcompact_handle18_06_16_dasm(DASM_OPS_16) { print("<illegal 0x18_06_16> (%04x)", op); return 2;} |
| 1264 | | int arcompact_handle18_06_17_dasm(DASM_OPS_16) { print("<illegal 0x18_06_17> (%04x)", op); return 2;} |
| 1265 | | int arcompact_handle18_06_18_dasm(DASM_OPS_16) { print("<illegal 0x18_06_18> (%04x)", op); return 2;} |
| 1266 | | int arcompact_handle18_06_19_dasm(DASM_OPS_16) { print("<illegal 0x18_06_19> (%04x)", op); return 2;} |
| 1267 | | int arcompact_handle18_06_1a_dasm(DASM_OPS_16) { print("<illegal 0x18_06_1a> (%04x)", op); return 2;} |
| 1268 | | int arcompact_handle18_06_1b_dasm(DASM_OPS_16) { print("<illegal 0x18_06_1b> (%04x)", op); return 2;} |
| 1269 | | int arcompact_handle18_06_1c_dasm(DASM_OPS_16) { print("<illegal 0x18_06_1c> (%04x)", op); return 2;} |
| 1270 | | int arcompact_handle18_06_1d_dasm(DASM_OPS_16) { print("<illegal 0x18_06_1d> (%04x)", op); return 2;} |
| 1271 | | int arcompact_handle18_06_1e_dasm(DASM_OPS_16) { print("<illegal 0x18_06_1e> (%04x)", op); return 2;} |
| 1272 | | int arcompact_handle18_06_1f_dasm(DASM_OPS_16) { print("<illegal 0x18_06_1f> (%04x)", op); return 2;} |
| 1273 | | int arcompact_handle18_07_00_dasm(DASM_OPS_16) { print("<illegal 0x18_07_00> (%04x)", op); return 2;} |
| 1274 | | int arcompact_handle18_07_02_dasm(DASM_OPS_16) { print("<illegal 0x18_07_02> (%04x)", op); return 2;} |
| 1275 | | int arcompact_handle18_07_03_dasm(DASM_OPS_16) { print("<illegal 0x18_07_03> (%04x)", op); return 2;} |
| 1276 | | int arcompact_handle18_07_04_dasm(DASM_OPS_16) { print("<illegal 0x18_07_04> (%04x)", op); return 2;} |
| 1277 | | int arcompact_handle18_07_05_dasm(DASM_OPS_16) { print("<illegal 0x18_07_05> (%04x)", op); return 2;} |
| 1278 | | int arcompact_handle18_07_06_dasm(DASM_OPS_16) { print("<illegal 0x18_07_06> (%04x)", op); return 2;} |
| 1279 | | int arcompact_handle18_07_07_dasm(DASM_OPS_16) { print("<illegal 0x18_07_07> (%04x)", op); return 2;} |
| 1280 | | int arcompact_handle18_07_08_dasm(DASM_OPS_16) { print("<illegal 0x18_07_08> (%04x)", op); return 2;} |
| 1281 | | int arcompact_handle18_07_09_dasm(DASM_OPS_16) { print("<illegal 0x18_07_09> (%04x)", op); return 2;} |
| 1282 | | int arcompact_handle18_07_0a_dasm(DASM_OPS_16) { print("<illegal 0x18_07_0a> (%04x)", op); return 2;} |
| 1283 | | int arcompact_handle18_07_0b_dasm(DASM_OPS_16) { print("<illegal 0x18_07_0b> (%04x)", op); return 2;} |
| 1284 | | int arcompact_handle18_07_0c_dasm(DASM_OPS_16) { print("<illegal 0x18_07_0c> (%04x)", op); return 2;} |
| 1285 | | int arcompact_handle18_07_0d_dasm(DASM_OPS_16) { print("<illegal 0x18_07_0d> (%04x)", op); return 2;} |
| 1286 | | int arcompact_handle18_07_0e_dasm(DASM_OPS_16) { print("<illegal 0x18_07_0e> (%04x)", op); return 2;} |
| 1287 | | int arcompact_handle18_07_0f_dasm(DASM_OPS_16) { print("<illegal 0x18_07_0f> (%04x)", op); return 2;} |
| 1288 | | int arcompact_handle18_07_10_dasm(DASM_OPS_16) { print("<illegal 0x18_07_10> (%04x)", op); return 2;} |
| 1289 | | int arcompact_handle18_07_12_dasm(DASM_OPS_16) { print("<illegal 0x18_07_12> (%04x)", op); return 2;} |
| 1290 | | int arcompact_handle18_07_13_dasm(DASM_OPS_16) { print("<illegal 0x18_07_13> (%04x)", op); return 2;} |
| 1291 | | int arcompact_handle18_07_14_dasm(DASM_OPS_16) { print("<illegal 0x18_07_14> (%04x)", op); return 2;} |
| 1292 | | int arcompact_handle18_07_15_dasm(DASM_OPS_16) { print("<illegal 0x18_07_15> (%04x)", op); return 2;} |
| 1293 | | int arcompact_handle18_07_16_dasm(DASM_OPS_16) { print("<illegal 0x18_07_16> (%04x)", op); return 2;} |
| 1294 | | int arcompact_handle18_07_17_dasm(DASM_OPS_16) { print("<illegal 0x18_07_17> (%04x)", op); return 2;} |
| 1295 | | int arcompact_handle18_07_18_dasm(DASM_OPS_16) { print("<illegal 0x18_07_18> (%04x)", op); return 2;} |
| 1296 | | int arcompact_handle18_07_19_dasm(DASM_OPS_16) { print("<illegal 0x18_07_19> (%04x)", op); return 2;} |
| 1297 | | int arcompact_handle18_07_1a_dasm(DASM_OPS_16) { print("<illegal 0x18_07_1a> (%04x)", op); return 2;} |
| 1298 | | int arcompact_handle18_07_1b_dasm(DASM_OPS_16) { print("<illegal 0x18_07_1b> (%04x)", op); return 2;} |
| 1299 | | int arcompact_handle18_07_1c_dasm(DASM_OPS_16) { print("<illegal 0x18_07_1c> (%04x)", op); return 2;} |
| 1300 | | int arcompact_handle18_07_1d_dasm(DASM_OPS_16) { print("<illegal 0x18_07_1d> (%04x)", op); return 2;} |
| 1301 | | int arcompact_handle18_07_1e_dasm(DASM_OPS_16) { print("<illegal 0x18_07_1e> (%04x)", op); return 2;} |
| 1302 | | int arcompact_handle18_07_1f_dasm(DASM_OPS_16) { print("<illegal 0x18_07_1f> (%04x)", op); return 2;} |
| 1303 | | |
trunk/src/emu/cpu/arcompact/arcompactdasm_ops.h
| r242341 | r242342 | |
| 1 | | |
| 2 | | /************************************************************************************************************************************ |
| 3 | | * * |
| 4 | | * individual opcode handlers (disassembly) * |
| 5 | | * * |
| 6 | | ************************************************************************************************************************************/ |
| 7 | | |
| 8 | | #define DASM_OPS_16 char *output, offs_t pc, UINT16 op, const UINT8* oprom |
| 9 | | #define DASM_OPS_32 char *output, offs_t pc, UINT32 op, const UINT8* oprom |
| 10 | | #define DASM_PARAMS output, pc, op, oprom |
| 11 | | |
| 12 | | #define LIMM_REG 62 |
| 13 | | |
| 14 | | #define GET_LIMM_32 \ |
| 15 | | limm = oprom[6] | (oprom[7] << 8); \ |
| 16 | | limm |= (oprom[4] << 16) | (oprom[5] << 24); \ |
| 17 | | |
| 18 | | |
| 19 | | int arcompact_handle00_00_dasm(DASM_OPS_32); |
| 20 | | int arcompact_handle00_01_dasm(DASM_OPS_32); |
| 21 | | int arcompact_handle01_00_00dasm(DASM_OPS_32); |
| 22 | | int arcompact_handle01_00_01dasm(DASM_OPS_32); |
| 23 | | int arcompact_handle01_01_00_00_dasm(DASM_OPS_32); |
| 24 | | int arcompact_handle01_01_00_01_dasm(DASM_OPS_32); |
| 25 | | int arcompact_handle01_01_00_02_dasm(DASM_OPS_32); |
| 26 | | int arcompact_handle01_01_00_03_dasm(DASM_OPS_32); |
| 27 | | int arcompact_handle01_01_00_04_dasm(DASM_OPS_32); |
| 28 | | int arcompact_handle01_01_00_05_dasm(DASM_OPS_32); |
| 29 | | int arcompact_handle01_01_00_0e_dasm(DASM_OPS_32); |
| 30 | | int arcompact_handle01_01_00_0f_dasm(DASM_OPS_32); |
| 31 | | int arcompact_handle01_01_01_00_dasm(DASM_OPS_32); |
| 32 | | int arcompact_handle01_01_01_01_dasm(DASM_OPS_32); |
| 33 | | int arcompact_handle01_01_01_02_dasm(DASM_OPS_32); |
| 34 | | int arcompact_handle01_01_01_03_dasm(DASM_OPS_32); |
| 35 | | int arcompact_handle01_01_01_04_dasm(DASM_OPS_32); |
| 36 | | int arcompact_handle01_01_01_05_dasm(DASM_OPS_32); |
| 37 | | int arcompact_handle01_01_01_0e_dasm(DASM_OPS_32); |
| 38 | | int arcompact_handle01_01_01_0f_dasm(DASM_OPS_32); |
| 39 | | int arcompact_handle02_dasm(DASM_OPS_32); |
| 40 | | int arcompact_handle03_dasm(DASM_OPS_32); |
| 41 | | int arcompact_handle04_00_dasm(DASM_OPS_32); |
| 42 | | int arcompact_handle04_01_dasm(DASM_OPS_32); |
| 43 | | int arcompact_handle04_02_dasm(DASM_OPS_32); |
| 44 | | int arcompact_handle04_03_dasm(DASM_OPS_32); |
| 45 | | int arcompact_handle04_04_dasm(DASM_OPS_32); |
| 46 | | int arcompact_handle04_05_dasm(DASM_OPS_32); |
| 47 | | int arcompact_handle04_06_dasm(DASM_OPS_32); |
| 48 | | int arcompact_handle04_07_dasm(DASM_OPS_32); |
| 49 | | int arcompact_handle04_08_dasm(DASM_OPS_32); |
| 50 | | int arcompact_handle04_09_dasm(DASM_OPS_32); |
| 51 | | int arcompact_handle04_0a_dasm(DASM_OPS_32); |
| 52 | | int arcompact_handle04_0b_dasm(DASM_OPS_32); |
| 53 | | int arcompact_handle04_0c_dasm(DASM_OPS_32); |
| 54 | | int arcompact_handle04_0d_dasm(DASM_OPS_32); |
| 55 | | int arcompact_handle04_0e_dasm(DASM_OPS_32); |
| 56 | | int arcompact_handle04_0f_dasm(DASM_OPS_32); |
| 57 | | int arcompact_handle04_10_dasm(DASM_OPS_32); |
| 58 | | int arcompact_handle04_11_dasm(DASM_OPS_32); |
| 59 | | int arcompact_handle04_12_dasm(DASM_OPS_32); |
| 60 | | int arcompact_handle04_13_dasm(DASM_OPS_32); |
| 61 | | int arcompact_handle04_14_dasm(DASM_OPS_32); |
| 62 | | int arcompact_handle04_15_dasm(DASM_OPS_32); |
| 63 | | int arcompact_handle04_16_dasm(DASM_OPS_32); |
| 64 | | int arcompact_handle04_17_dasm(DASM_OPS_32); |
| 65 | | int arcompact_handle04_18_dasm(DASM_OPS_32); |
| 66 | | int arcompact_handle04_19_dasm(DASM_OPS_32); |
| 67 | | int arcompact_handle04_1a_dasm(DASM_OPS_32); |
| 68 | | int arcompact_handle04_1b_dasm(DASM_OPS_32); |
| 69 | | int arcompact_handle04_1c_dasm(DASM_OPS_32); |
| 70 | | int arcompact_handle04_1d_dasm(DASM_OPS_32); |
| 71 | | int arcompact_handle04_20_dasm(DASM_OPS_32); |
| 72 | | int arcompact_handle04_21_dasm(DASM_OPS_32); |
| 73 | | int arcompact_handle04_22_dasm(DASM_OPS_32); |
| 74 | | int arcompact_handle04_23_dasm(DASM_OPS_32); |
| 75 | | int arcompact_handle04_28_dasm(DASM_OPS_32); |
| 76 | | int arcompact_handle04_29_dasm(DASM_OPS_32); |
| 77 | | int arcompact_handle04_2a_dasm(DASM_OPS_32); |
| 78 | | int arcompact_handle04_2b_dasm(DASM_OPS_32); |
| 79 | | int arcompact_handle04_2f_00_dasm(DASM_OPS_32); |
| 80 | | int arcompact_handle04_2f_01_dasm(DASM_OPS_32); |
| 81 | | int arcompact_handle04_2f_02_dasm(DASM_OPS_32); |
| 82 | | int arcompact_handle04_2f_03_dasm(DASM_OPS_32); |
| 83 | | int arcompact_handle04_2f_04_dasm(DASM_OPS_32); |
| 84 | | int arcompact_handle04_2f_05_dasm(DASM_OPS_32); |
| 85 | | int arcompact_handle04_2f_06_dasm(DASM_OPS_32); |
| 86 | | int arcompact_handle04_2f_07_dasm(DASM_OPS_32); |
| 87 | | int arcompact_handle04_2f_08_dasm(DASM_OPS_32); |
| 88 | | int arcompact_handle04_2f_09_dasm(DASM_OPS_32); |
| 89 | | int arcompact_handle04_2f_0a_dasm(DASM_OPS_32); |
| 90 | | int arcompact_handle04_2f_0b_dasm(DASM_OPS_32); |
| 91 | | int arcompact_handle04_2f_0c_dasm(DASM_OPS_32); |
| 92 | | int arcompact_handle04_2f_3f_01_dasm(DASM_OPS_32); |
| 93 | | int arcompact_handle04_2f_3f_02_dasm(DASM_OPS_32); |
| 94 | | int arcompact_handle04_2f_3f_03_dasm(DASM_OPS_32); |
| 95 | | int arcompact_handle04_2f_3f_04_dasm(DASM_OPS_32); |
| 96 | | int arcompact_handle04_2f_3f_05_dasm(DASM_OPS_32); |
| 97 | | int arcompact_handle04_30_dasm(DASM_OPS_32); |
| 98 | | int arcompact_handle04_31_dasm(DASM_OPS_32); |
| 99 | | int arcompact_handle04_32_dasm(DASM_OPS_32); |
| 100 | | int arcompact_handle04_33_dasm(DASM_OPS_32); |
| 101 | | int arcompact_handle04_34_dasm(DASM_OPS_32); |
| 102 | | int arcompact_handle04_35_dasm(DASM_OPS_32); |
| 103 | | int arcompact_handle04_36_dasm(DASM_OPS_32); |
| 104 | | int arcompact_handle04_37_dasm(DASM_OPS_32); |
| 105 | | int arcompact_handle05_00_dasm(DASM_OPS_32); |
| 106 | | int arcompact_handle05_01_dasm(DASM_OPS_32); |
| 107 | | int arcompact_handle05_02_dasm(DASM_OPS_32); |
| 108 | | int arcompact_handle05_03_dasm(DASM_OPS_32); |
| 109 | | int arcompact_handle05_04_dasm(DASM_OPS_32); |
| 110 | | int arcompact_handle05_05_dasm(DASM_OPS_32); |
| 111 | | int arcompact_handle05_06_dasm(DASM_OPS_32); |
| 112 | | int arcompact_handle05_07_dasm(DASM_OPS_32); |
| 113 | | int arcompact_handle05_08_dasm(DASM_OPS_32); |
| 114 | | int arcompact_handle05_0a_dasm(DASM_OPS_32); |
| 115 | | int arcompact_handle05_0b_dasm(DASM_OPS_32); |
| 116 | | int arcompact_handle05_28_dasm(DASM_OPS_32); |
| 117 | | int arcompact_handle05_29_dasm(DASM_OPS_32); |
| 118 | | int arcompact_handle05_2f_dasm(DASM_OPS_32); |
| 119 | | int arcompact_handle06_dasm(DASM_OPS_32); |
| 120 | | int arcompact_handle07_dasm(DASM_OPS_32); |
| 121 | | int arcompact_handle08_dasm(DASM_OPS_32); |
| 122 | | int arcompact_handle09_dasm(DASM_OPS_32); |
| 123 | | int arcompact_handle0a_dasm(DASM_OPS_32); |
| 124 | | int arcompact_handle0b_dasm(DASM_OPS_32); |
| 125 | | |
| 126 | | int arcompact_handle0c_00_dasm(DASM_OPS_16); |
| 127 | | int arcompact_handle0c_01_dasm(DASM_OPS_16); |
| 128 | | int arcompact_handle0c_02_dasm(DASM_OPS_16); |
| 129 | | int arcompact_handle0c_03_dasm(DASM_OPS_16); |
| 130 | | int arcompact_handle0d_00_dasm(DASM_OPS_16); |
| 131 | | int arcompact_handle0d_01_dasm(DASM_OPS_16); |
| 132 | | int arcompact_handle0d_02_dasm(DASM_OPS_16); |
| 133 | | int arcompact_handle0d_03_dasm(DASM_OPS_16); |
| 134 | | int arcompact_handle0e_00_dasm(DASM_OPS_16); |
| 135 | | int arcompact_handle0e_01_dasm(DASM_OPS_16); |
| 136 | | int arcompact_handle0e_02_dasm(DASM_OPS_16); |
| 137 | | int arcompact_handle0e_03_dasm(DASM_OPS_16); |
| 138 | | int arcompact_handle0f_00_00_dasm(DASM_OPS_16); |
| 139 | | int arcompact_handle0f_00_01_dasm(DASM_OPS_16); |
| 140 | | int arcompact_handle0f_00_02_dasm(DASM_OPS_16); |
| 141 | | int arcompact_handle0f_00_03_dasm(DASM_OPS_16); |
| 142 | | int arcompact_handle0f_00_06_dasm(DASM_OPS_16); |
| 143 | | int arcompact_handle0f_00_07_00_dasm(DASM_OPS_16); |
| 144 | | int arcompact_handle0f_00_07_01_dasm(DASM_OPS_16); |
| 145 | | int arcompact_handle0f_00_07_04_dasm(DASM_OPS_16); |
| 146 | | int arcompact_handle0f_00_07_05_dasm(DASM_OPS_16); |
| 147 | | int arcompact_handle0f_00_07_06_dasm(DASM_OPS_16); |
| 148 | | int arcompact_handle0f_00_07_07_dasm(DASM_OPS_16); |
| 149 | | int arcompact_handle0f_02_dasm(DASM_OPS_16); |
| 150 | | int arcompact_handle0f_04_dasm(DASM_OPS_16); |
| 151 | | int arcompact_handle0f_05_dasm(DASM_OPS_16); |
| 152 | | int arcompact_handle0f_06_dasm(DASM_OPS_16); |
| 153 | | int arcompact_handle0f_07_dasm(DASM_OPS_16); |
| 154 | | int arcompact_handle0f_0b_dasm(DASM_OPS_16); |
| 155 | | int arcompact_handle0f_0c_dasm(DASM_OPS_16); |
| 156 | | int arcompact_handle0f_0d_dasm(DASM_OPS_16); |
| 157 | | int arcompact_handle0f_0e_dasm(DASM_OPS_16); |
| 158 | | int arcompact_handle0f_0f_dasm(DASM_OPS_16); |
| 159 | | int arcompact_handle0f_10_dasm(DASM_OPS_16); |
| 160 | | int arcompact_handle0f_11_dasm(DASM_OPS_16); |
| 161 | | int arcompact_handle0f_12_dasm(DASM_OPS_16); |
| 162 | | int arcompact_handle0f_13_dasm(DASM_OPS_16); |
| 163 | | int arcompact_handle0f_14_dasm(DASM_OPS_16); |
| 164 | | int arcompact_handle0f_15_dasm(DASM_OPS_16); |
| 165 | | int arcompact_handle0f_16_dasm(DASM_OPS_16); |
| 166 | | int arcompact_handle0f_18_dasm(DASM_OPS_16); |
| 167 | | int arcompact_handle0f_19_dasm(DASM_OPS_16); |
| 168 | | int arcompact_handle0f_1a_dasm(DASM_OPS_16); |
| 169 | | int arcompact_handle0f_1b_dasm(DASM_OPS_16); |
| 170 | | int arcompact_handle0f_1c_dasm(DASM_OPS_16); |
| 171 | | int arcompact_handle0f_1d_dasm(DASM_OPS_16); |
| 172 | | int arcompact_handle0f_1e_dasm(DASM_OPS_16); |
| 173 | | int arcompact_handle0f_1f_dasm(DASM_OPS_16); |
| 174 | | int arcompact_handle10_dasm(DASM_OPS_16); |
| 175 | | int arcompact_handle11_dasm(DASM_OPS_16); |
| 176 | | int arcompact_handle12_dasm(DASM_OPS_16); |
| 177 | | int arcompact_handle13_dasm(DASM_OPS_16); |
| 178 | | int arcompact_handle14_dasm(DASM_OPS_16); |
| 179 | | int arcompact_handle15_dasm(DASM_OPS_16); |
| 180 | | int arcompact_handle16_dasm(DASM_OPS_16); |
| 181 | | int arcompact_handle17_00_dasm(DASM_OPS_16); |
| 182 | | int arcompact_handle17_01_dasm(DASM_OPS_16); |
| 183 | | int arcompact_handle17_02_dasm(DASM_OPS_16); |
| 184 | | int arcompact_handle17_03_dasm(DASM_OPS_16); |
| 185 | | int arcompact_handle17_04_dasm(DASM_OPS_16); |
| 186 | | int arcompact_handle17_05_dasm(DASM_OPS_16); |
| 187 | | int arcompact_handle17_06_dasm(DASM_OPS_16); |
| 188 | | int arcompact_handle17_07_dasm(DASM_OPS_16); |
| 189 | | int arcompact_handle18_00_dasm(DASM_OPS_16); |
| 190 | | int arcompact_handle18_01_dasm(DASM_OPS_16); |
| 191 | | int arcompact_handle18_02_dasm(DASM_OPS_16); |
| 192 | | int arcompact_handle18_03_dasm(DASM_OPS_16); |
| 193 | | int arcompact_handle18_04_dasm(DASM_OPS_16); |
| 194 | | int arcompact_handle18_05_00_dasm(DASM_OPS_16); |
| 195 | | int arcompact_handle18_05_01_dasm(DASM_OPS_16); |
| 196 | | int arcompact_handle18_06_01_dasm(DASM_OPS_16); |
| 197 | | int arcompact_handle18_06_11_dasm(DASM_OPS_16); |
| 198 | | int arcompact_handle18_07_01_dasm(DASM_OPS_16); |
| 199 | | int arcompact_handle18_07_11_dasm(DASM_OPS_16); |
| 200 | | int arcompact_handle19_00_dasm(DASM_OPS_16); |
| 201 | | int arcompact_handle19_01_dasm(DASM_OPS_16); |
| 202 | | int arcompact_handle19_02_dasm(DASM_OPS_16); |
| 203 | | int arcompact_handle19_03_dasm(DASM_OPS_16); |
| 204 | | int arcompact_handle1a_dasm(DASM_OPS_16); |
| 205 | | int arcompact_handle1b_dasm(DASM_OPS_16); |
| 206 | | int arcompact_handle1c_00_dasm(DASM_OPS_16); |
| 207 | | int arcompact_handle1c_01_dasm(DASM_OPS_16); |
| 208 | | int arcompact_handle1d_00_dasm(DASM_OPS_16); |
| 209 | | int arcompact_handle1d_01_dasm(DASM_OPS_16); |
| 210 | | int arcompact_handle1e_00_dasm(DASM_OPS_16); |
| 211 | | int arcompact_handle1e_01_dasm(DASM_OPS_16); |
| 212 | | int arcompact_handle1e_02_dasm(DASM_OPS_16); |
| 213 | | int arcompact_handle1e_03_00_dasm(DASM_OPS_16); |
| 214 | | int arcompact_handle1e_03_01_dasm(DASM_OPS_16); |
| 215 | | int arcompact_handle1e_03_02_dasm(DASM_OPS_16); |
| 216 | | int arcompact_handle1e_03_03_dasm(DASM_OPS_16); |
| 217 | | int arcompact_handle1e_03_04_dasm(DASM_OPS_16); |
| 218 | | int arcompact_handle1e_03_05_dasm(DASM_OPS_16); |
| 219 | | int arcompact_handle1e_03_06_dasm(DASM_OPS_16); |
| 220 | | int arcompact_handle1e_03_07_dasm(DASM_OPS_16); |
| 221 | | int arcompact_handle1f_dasm(DASM_OPS_16); |
| 222 | | |
| 223 | | /************************************************************************************************************************************ |
| 224 | | * * |
| 225 | | * illegal opcode handlers (disassembly) * |
| 226 | | * * |
| 227 | | ************************************************************************************************************************************/ |
| 228 | | |
| 229 | | int arcompact_handle01_01_00_06_dasm(DASM_OPS_32); //("<illegal 01_01_00_06> (%08x)", op); return 4; } |
| 230 | | int arcompact_handle01_01_00_07_dasm(DASM_OPS_32); //("<illegal 01_01_00_07> (%08x)", op); return 4; } |
| 231 | | int arcompact_handle01_01_00_08_dasm(DASM_OPS_32); //("<illegal 01_01_00_08> (%08x)", op); return 4; } |
| 232 | | int arcompact_handle01_01_00_09_dasm(DASM_OPS_32); //("<illegal 01_01_00_09> (%08x)", op); return 4; } |
| 233 | | int arcompact_handle01_01_00_0a_dasm(DASM_OPS_32); //("<illegal 01_01_00_0a> (%08x)", op); return 4; } |
| 234 | | int arcompact_handle01_01_00_0b_dasm(DASM_OPS_32); //("<illegal 01_01_00_0b> (%08x)", op); return 4; } |
| 235 | | int arcompact_handle01_01_00_0c_dasm(DASM_OPS_32); //("<illegal 01_01_00_0c> (%08x)", op); return 4; } |
| 236 | | int arcompact_handle01_01_00_0d_dasm(DASM_OPS_32); //("<illegal 01_01_00_0d> (%08x)", op); return 4; } |
| 237 | | |
| 238 | | int arcompact_handle01_01_01_06_dasm(DASM_OPS_32); //("<illegal 01_01_01_06> (%08x)", op); return 4; } |
| 239 | | int arcompact_handle01_01_01_07_dasm(DASM_OPS_32); //("<illegal 01_01_01_07> (%08x)", op); return 4; } |
| 240 | | int arcompact_handle01_01_01_08_dasm(DASM_OPS_32); //("<illegal 01_01_01_08> (%08x)", op); return 4; } |
| 241 | | int arcompact_handle01_01_01_09_dasm(DASM_OPS_32); //("<illegal 01_01_01_09> (%08x)", op); return 4; } |
| 242 | | int arcompact_handle01_01_01_0a_dasm(DASM_OPS_32); //("<illegal 01_01_01_0a> (%08x)", op); return 4; } |
| 243 | | int arcompact_handle01_01_01_0b_dasm(DASM_OPS_32); //("<illegal 01_01_01_0b> (%08x)", op); return 4; } |
| 244 | | int arcompact_handle01_01_01_0c_dasm(DASM_OPS_32); //("<illegal 01_01_01_0c> (%08x)", op); return 4; } |
| 245 | | int arcompact_handle01_01_01_0d_dasm(DASM_OPS_32); //("<illegal 01_01_01_0d> (%08x)", op); return 4; } |
| 246 | | |
| 247 | | |
| 248 | | int arcompact_handle04_1e_dasm(DASM_OPS_32); //("<illegal 0x04_1e> (%08x)", op); return 4;} |
| 249 | | int arcompact_handle04_1f_dasm(DASM_OPS_32); //("<illegal 0x04_1f> (%08x)", op); return 4;} |
| 250 | | |
| 251 | | int arcompact_handle04_24_dasm(DASM_OPS_32); //("<illegal 0x04_24> (%08x)", op); return 4;} |
| 252 | | int arcompact_handle04_25_dasm(DASM_OPS_32); //("<illegal 0x04_25> (%08x)", op); return 4;} |
| 253 | | int arcompact_handle04_26_dasm(DASM_OPS_32); //("<illegal 0x04_26> (%08x)", op); return 4;} |
| 254 | | int arcompact_handle04_27_dasm(DASM_OPS_32); //("<illegal 0x04_27> (%08x)", op); return 4;} |
| 255 | | |
| 256 | | int arcompact_handle04_2c_dasm(DASM_OPS_32); //("<illegal 0x04_2c> (%08x)", op); return 4;} |
| 257 | | int arcompact_handle04_2d_dasm(DASM_OPS_32); //("<illegal 0x04_2d> (%08x)", op); return 4;} |
| 258 | | int arcompact_handle04_2e_dasm(DASM_OPS_32); //("<illegal 0x04_2e> (%08x)", op); return 4;} |
| 259 | | |
| 260 | | int arcompact_handle04_2f_0d_dasm(DASM_OPS_32); //("<illegal 0x04_2f_0d> (%08x)", op); return 4;} |
| 261 | | int arcompact_handle04_2f_0e_dasm(DASM_OPS_32); //("<illegal 0x04_2f_0e> (%08x)", op); return 4;} |
| 262 | | int arcompact_handle04_2f_0f_dasm(DASM_OPS_32); //("<illegal 0x04_2f_0f> (%08x)", op); return 4;} |
| 263 | | int arcompact_handle04_2f_10_dasm(DASM_OPS_32); //("<illegal 0x04_2f_10> (%08x)", op); return 4;} |
| 264 | | int arcompact_handle04_2f_11_dasm(DASM_OPS_32); //("<illegal 0x04_2f_11> (%08x)", op); return 4;} |
| 265 | | int arcompact_handle04_2f_12_dasm(DASM_OPS_32); //("<illegal 0x04_2f_12> (%08x)", op); return 4;} |
| 266 | | int arcompact_handle04_2f_13_dasm(DASM_OPS_32); //("<illegal 0x04_2f_13> (%08x)", op); return 4;} |
| 267 | | int arcompact_handle04_2f_14_dasm(DASM_OPS_32); //("<illegal 0x04_2f_14> (%08x)", op); return 4;} |
| 268 | | int arcompact_handle04_2f_15_dasm(DASM_OPS_32); //("<illegal 0x04_2f_15> (%08x)", op); return 4;} |
| 269 | | int arcompact_handle04_2f_16_dasm(DASM_OPS_32); //("<illegal 0x04_2f_16> (%08x)", op); return 4;} |
| 270 | | int arcompact_handle04_2f_17_dasm(DASM_OPS_32); //("<illegal 0x04_2f_17> (%08x)", op); return 4;} |
| 271 | | int arcompact_handle04_2f_18_dasm(DASM_OPS_32); //("<illegal 0x04_2f_18> (%08x)", op); return 4;} |
| 272 | | int arcompact_handle04_2f_19_dasm(DASM_OPS_32); //("<illegal 0x04_2f_19> (%08x)", op); return 4;} |
| 273 | | int arcompact_handle04_2f_1a_dasm(DASM_OPS_32); //("<illegal 0x04_2f_1a> (%08x)", op); return 4;} |
| 274 | | int arcompact_handle04_2f_1b_dasm(DASM_OPS_32); //("<illegal 0x04_2f_1b> (%08x)", op); return 4;} |
| 275 | | int arcompact_handle04_2f_1c_dasm(DASM_OPS_32); //("<illegal 0x04_2f_1c> (%08x)", op); return 4;} |
| 276 | | int arcompact_handle04_2f_1d_dasm(DASM_OPS_32); //("<illegal 0x04_2f_1d> (%08x)", op); return 4;} |
| 277 | | int arcompact_handle04_2f_1e_dasm(DASM_OPS_32); //("<illegal 0x04_2f_1e> (%08x)", op); return 4;} |
| 278 | | int arcompact_handle04_2f_1f_dasm(DASM_OPS_32); //("<illegal 0x04_2f_1f> (%08x)", op); return 4;} |
| 279 | | int arcompact_handle04_2f_20_dasm(DASM_OPS_32); //("<illegal 0x04_2f_20> (%08x)", op); return 4;} |
| 280 | | int arcompact_handle04_2f_21_dasm(DASM_OPS_32); //("<illegal 0x04_2f_21> (%08x)", op); return 4;} |
| 281 | | int arcompact_handle04_2f_22_dasm(DASM_OPS_32); //("<illegal 0x04_2f_22> (%08x)", op); return 4;} |
| 282 | | int arcompact_handle04_2f_23_dasm(DASM_OPS_32); //("<illegal 0x04_2f_23> (%08x)", op); return 4;} |
| 283 | | int arcompact_handle04_2f_24_dasm(DASM_OPS_32); //("<illegal 0x04_2f_24> (%08x)", op); return 4;} |
| 284 | | int arcompact_handle04_2f_25_dasm(DASM_OPS_32); //("<illegal 0x04_2f_25> (%08x)", op); return 4;} |
| 285 | | int arcompact_handle04_2f_26_dasm(DASM_OPS_32); //("<illegal 0x04_2f_26> (%08x)", op); return 4;} |
| 286 | | int arcompact_handle04_2f_27_dasm(DASM_OPS_32); //("<illegal 0x04_2f_27> (%08x)", op); return 4;} |
| 287 | | int arcompact_handle04_2f_28_dasm(DASM_OPS_32); //("<illegal 0x04_2f_28> (%08x)", op); return 4;} |
| 288 | | int arcompact_handle04_2f_29_dasm(DASM_OPS_32); //("<illegal 0x04_2f_29> (%08x)", op); return 4;} |
| 289 | | int arcompact_handle04_2f_2a_dasm(DASM_OPS_32); //("<illegal 0x04_2f_2a> (%08x)", op); return 4;} |
| 290 | | int arcompact_handle04_2f_2b_dasm(DASM_OPS_32); //("<illegal 0x04_2f_2b> (%08x)", op); return 4;} |
| 291 | | int arcompact_handle04_2f_2c_dasm(DASM_OPS_32); //("<illegal 0x04_2f_2c> (%08x)", op); return 4;} |
| 292 | | int arcompact_handle04_2f_2d_dasm(DASM_OPS_32); //("<illegal 0x04_2f_2d> (%08x)", op); return 4;} |
| 293 | | int arcompact_handle04_2f_2e_dasm(DASM_OPS_32); //("<illegal 0x04_2f_2e> (%08x)", op); return 4;} |
| 294 | | int arcompact_handle04_2f_2f_dasm(DASM_OPS_32); //("<illegal 0x04_2f_2f> (%08x)", op); return 4;} |
| 295 | | int arcompact_handle04_2f_30_dasm(DASM_OPS_32); //("<illegal 0x04_2f_30> (%08x)", op); return 4;} |
| 296 | | int arcompact_handle04_2f_31_dasm(DASM_OPS_32); //("<illegal 0x04_2f_31> (%08x)", op); return 4;} |
| 297 | | int arcompact_handle04_2f_32_dasm(DASM_OPS_32); //("<illegal 0x04_2f_32> (%08x)", op); return 4;} |
| 298 | | int arcompact_handle04_2f_33_dasm(DASM_OPS_32); //("<illegal 0x04_2f_33> (%08x)", op); return 4;} |
| 299 | | int arcompact_handle04_2f_34_dasm(DASM_OPS_32); //("<illegal 0x04_2f_34> (%08x)", op); return 4;} |
| 300 | | int arcompact_handle04_2f_35_dasm(DASM_OPS_32); //("<illegal 0x04_2f_35> (%08x)", op); return 4;} |
| 301 | | int arcompact_handle04_2f_36_dasm(DASM_OPS_32); //("<illegal 0x04_2f_36> (%08x)", op); return 4;} |
| 302 | | int arcompact_handle04_2f_37_dasm(DASM_OPS_32); //("<illegal 0x04_2f_37> (%08x)", op); return 4;} |
| 303 | | int arcompact_handle04_2f_38_dasm(DASM_OPS_32); //("<illegal 0x04_2f_38> (%08x)", op); return 4;} |
| 304 | | int arcompact_handle04_2f_39_dasm(DASM_OPS_32); //("<illegal 0x04_2f_39> (%08x)", op); return 4;} |
| 305 | | int arcompact_handle04_2f_3a_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3a> (%08x)", op); return 4;} |
| 306 | | int arcompact_handle04_2f_3b_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3b> (%08x)", op); return 4;} |
| 307 | | int arcompact_handle04_2f_3c_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3c> (%08x)", op); return 4;} |
| 308 | | int arcompact_handle04_2f_3d_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3d> (%08x)", op); return 4;} |
| 309 | | int arcompact_handle04_2f_3e_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3e> (%08x)", op); return 4;} |
| 310 | | |
| 311 | | int arcompact_handle04_2f_3f_00_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_00> (%08x)", op); return 4;} |
| 312 | | int arcompact_handle04_2f_3f_06_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_06> (%08x)", op); return 4;} |
| 313 | | int arcompact_handle04_2f_3f_07_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_07> (%08x)", op); return 4;} |
| 314 | | int arcompact_handle04_2f_3f_08_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_08> (%08x)", op); return 4;} |
| 315 | | int arcompact_handle04_2f_3f_09_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_09> (%08x)", op); return 4;} |
| 316 | | int arcompact_handle04_2f_3f_0a_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_0a> (%08x)", op); return 4;} |
| 317 | | int arcompact_handle04_2f_3f_0b_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_0b> (%08x)", op); return 4;} |
| 318 | | int arcompact_handle04_2f_3f_0c_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_0c> (%08x)", op); return 4;} |
| 319 | | int arcompact_handle04_2f_3f_0d_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_0d> (%08x)", op); return 4;} |
| 320 | | int arcompact_handle04_2f_3f_0e_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_0e> (%08x)", op); return 4;} |
| 321 | | int arcompact_handle04_2f_3f_0f_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_0f> (%08x)", op); return 4;} |
| 322 | | int arcompact_handle04_2f_3f_10_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_10> (%08x)", op); return 4;} |
| 323 | | int arcompact_handle04_2f_3f_11_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_11> (%08x)", op); return 4;} |
| 324 | | int arcompact_handle04_2f_3f_12_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_12> (%08x)", op); return 4;} |
| 325 | | int arcompact_handle04_2f_3f_13_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_13> (%08x)", op); return 4;} |
| 326 | | int arcompact_handle04_2f_3f_14_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_14> (%08x)", op); return 4;} |
| 327 | | int arcompact_handle04_2f_3f_15_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_15> (%08x)", op); return 4;} |
| 328 | | int arcompact_handle04_2f_3f_16_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_16> (%08x)", op); return 4;} |
| 329 | | int arcompact_handle04_2f_3f_17_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_17> (%08x)", op); return 4;} |
| 330 | | int arcompact_handle04_2f_3f_18_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_18> (%08x)", op); return 4;} |
| 331 | | int arcompact_handle04_2f_3f_19_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_19> (%08x)", op); return 4;} |
| 332 | | int arcompact_handle04_2f_3f_1a_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_1a> (%08x)", op); return 4;} |
| 333 | | int arcompact_handle04_2f_3f_1b_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_1b> (%08x)", op); return 4;} |
| 334 | | int arcompact_handle04_2f_3f_1c_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_1c> (%08x)", op); return 4;} |
| 335 | | int arcompact_handle04_2f_3f_1d_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_1d> (%08x)", op); return 4;} |
| 336 | | int arcompact_handle04_2f_3f_1e_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_1e> (%08x)", op); return 4;} |
| 337 | | int arcompact_handle04_2f_3f_1f_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_1f> (%08x)", op); return 4;} |
| 338 | | int arcompact_handle04_2f_3f_20_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_20> (%08x)", op); return 4;} |
| 339 | | int arcompact_handle04_2f_3f_21_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_21> (%08x)", op); return 4;} |
| 340 | | int arcompact_handle04_2f_3f_22_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_22> (%08x)", op); return 4;} |
| 341 | | int arcompact_handle04_2f_3f_23_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_23> (%08x)", op); return 4;} |
| 342 | | int arcompact_handle04_2f_3f_24_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_24> (%08x)", op); return 4;} |
| 343 | | int arcompact_handle04_2f_3f_25_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_25> (%08x)", op); return 4;} |
| 344 | | int arcompact_handle04_2f_3f_26_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_26> (%08x)", op); return 4;} |
| 345 | | int arcompact_handle04_2f_3f_27_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_27> (%08x)", op); return 4;} |
| 346 | | int arcompact_handle04_2f_3f_28_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_28> (%08x)", op); return 4;} |
| 347 | | int arcompact_handle04_2f_3f_29_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_29> (%08x)", op); return 4;} |
| 348 | | int arcompact_handle04_2f_3f_2a_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_2a> (%08x)", op); return 4;} |
| 349 | | int arcompact_handle04_2f_3f_2b_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_2b> (%08x)", op); return 4;} |
| 350 | | int arcompact_handle04_2f_3f_2c_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_2c> (%08x)", op); return 4;} |
| 351 | | int arcompact_handle04_2f_3f_2d_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_2d> (%08x)", op); return 4;} |
| 352 | | int arcompact_handle04_2f_3f_2e_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_2e> (%08x)", op); return 4;} |
| 353 | | int arcompact_handle04_2f_3f_2f_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_2f> (%08x)", op); return 4;} |
| 354 | | int arcompact_handle04_2f_3f_30_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_30> (%08x)", op); return 4;} |
| 355 | | int arcompact_handle04_2f_3f_31_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_31> (%08x)", op); return 4;} |
| 356 | | int arcompact_handle04_2f_3f_32_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_32> (%08x)", op); return 4;} |
| 357 | | int arcompact_handle04_2f_3f_33_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_33> (%08x)", op); return 4;} |
| 358 | | int arcompact_handle04_2f_3f_34_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_34> (%08x)", op); return 4;} |
| 359 | | int arcompact_handle04_2f_3f_35_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_35> (%08x)", op); return 4;} |
| 360 | | int arcompact_handle04_2f_3f_36_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_36> (%08x)", op); return 4;} |
| 361 | | int arcompact_handle04_2f_3f_37_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_37> (%08x)", op); return 4;} |
| 362 | | int arcompact_handle04_2f_3f_38_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_38> (%08x)", op); return 4;} |
| 363 | | int arcompact_handle04_2f_3f_39_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_39> (%08x)", op); return 4;} |
| 364 | | int arcompact_handle04_2f_3f_3a_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_3a> (%08x)", op); return 4;} |
| 365 | | int arcompact_handle04_2f_3f_3b_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_3b> (%08x)", op); return 4;} |
| 366 | | int arcompact_handle04_2f_3f_3c_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_3c> (%08x)", op); return 4;} |
| 367 | | int arcompact_handle04_2f_3f_3d_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_3d> (%08x)", op); return 4;} |
| 368 | | int arcompact_handle04_2f_3f_3e_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_3e> (%08x)", op); return 4;} |
| 369 | | int arcompact_handle04_2f_3f_3f_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_3f> (%08x)", op); return 4;} |
| 370 | | |
| 371 | | int arcompact_handle04_38_dasm(DASM_OPS_32); //("<illegal 0x04_38> (%08x)", op); return 4;} |
| 372 | | int arcompact_handle04_39_dasm(DASM_OPS_32); //("<illegal 0x04_39> (%08x)", op); return 4;} |
| 373 | | int arcompact_handle04_3a_dasm(DASM_OPS_32); //("<illegal 0x04_3a> (%08x)", op); return 4;} |
| 374 | | int arcompact_handle04_3b_dasm(DASM_OPS_32); //("<illegal 0x04_3b> (%08x)", op); return 4;} |
| 375 | | int arcompact_handle04_3c_dasm(DASM_OPS_32); //("<illegal 0x04_3c> (%08x)", op); return 4;} |
| 376 | | int arcompact_handle04_3d_dasm(DASM_OPS_32); //("<illegal 0x04_3d> (%08x)", op); return 4;} |
| 377 | | int arcompact_handle04_3e_dasm(DASM_OPS_32); //("<illegal 0x04_3e> (%08x)", op); return 4;} |
| 378 | | int arcompact_handle04_3f_dasm(DASM_OPS_32); //("<illegal 0x04_3f> (%08x)", op); return 4;} |
| 379 | | |
| 380 | | int arcompact_handle05_09_dasm(DASM_OPS_32); //("<illegal 0x05_09> (%08x)", op); return 4;} |
| 381 | | int arcompact_handle05_0c_dasm(DASM_OPS_32); //("<illegal 0x05_0c> (%08x)", op); return 4;} |
| 382 | | int arcompact_handle05_0d_dasm(DASM_OPS_32); //("<illegal 0x05_0d> (%08x)", op); return 4;} |
| 383 | | int arcompact_handle05_0e_dasm(DASM_OPS_32); //("<illegal 0x05_0e> (%08x)", op); return 4;} |
| 384 | | int arcompact_handle05_0f_dasm(DASM_OPS_32); //("<illegal 0x05_0f> (%08x)", op); return 4;} |
| 385 | | int arcompact_handle05_10_dasm(DASM_OPS_32); //("<illegal 0x05_10> (%08x)", op); return 4;} |
| 386 | | int arcompact_handle05_11_dasm(DASM_OPS_32); //("<illegal 0x05_11> (%08x)", op); return 4;} |
| 387 | | int arcompact_handle05_12_dasm(DASM_OPS_32); //("<illegal 0x05_12> (%08x)", op); return 4;} |
| 388 | | int arcompact_handle05_13_dasm(DASM_OPS_32); //("<illegal 0x05_13> (%08x)", op); return 4;} |
| 389 | | int arcompact_handle05_14_dasm(DASM_OPS_32); //("<illegal 0x05_14> (%08x)", op); return 4;} |
| 390 | | int arcompact_handle05_15_dasm(DASM_OPS_32); //("<illegal 0x05_15> (%08x)", op); return 4;} |
| 391 | | int arcompact_handle05_16_dasm(DASM_OPS_32); //("<illegal 0x05_16> (%08x)", op); return 4;} |
| 392 | | int arcompact_handle05_17_dasm(DASM_OPS_32); //("<illegal 0x05_17> (%08x)", op); return 4;} |
| 393 | | int arcompact_handle05_18_dasm(DASM_OPS_32); //("<illegal 0x05_18> (%08x)", op); return 4;} |
| 394 | | int arcompact_handle05_19_dasm(DASM_OPS_32); //("<illegal 0x05_19> (%08x)", op); return 4;} |
| 395 | | int arcompact_handle05_1a_dasm(DASM_OPS_32); //("<illegal 0x05_1a> (%08x)", op); return 4;} |
| 396 | | int arcompact_handle05_1b_dasm(DASM_OPS_32); //("<illegal 0x05_1b> (%08x)", op); return 4;} |
| 397 | | int arcompact_handle05_1c_dasm(DASM_OPS_32); //("<illegal 0x05_1c> (%08x)", op); return 4;} |
| 398 | | int arcompact_handle05_1d_dasm(DASM_OPS_32); //("<illegal 0x05_1d> (%08x)", op); return 4;} |
| 399 | | int arcompact_handle05_1e_dasm(DASM_OPS_32); //("<illegal 0x05_1e> (%08x)", op); return 4;} |
| 400 | | int arcompact_handle05_1f_dasm(DASM_OPS_32); //("<illegal 0x05_1f> (%08x)", op); return 4;} |
| 401 | | int arcompact_handle05_20_dasm(DASM_OPS_32); //("<illegal 0x05_20> (%08x)", op); return 4;} |
| 402 | | int arcompact_handle05_21_dasm(DASM_OPS_32); //("<illegal 0x05_21> (%08x)", op); return 4;} |
| 403 | | int arcompact_handle05_22_dasm(DASM_OPS_32); //("<illegal 0x05_22> (%08x)", op); return 4;} |
| 404 | | int arcompact_handle05_23_dasm(DASM_OPS_32); //("<illegal 0x05_23> (%08x)", op); return 4;} |
| 405 | | int arcompact_handle05_24_dasm(DASM_OPS_32); //("<illegal 0x05_24> (%08x)", op); return 4;} |
| 406 | | int arcompact_handle05_25_dasm(DASM_OPS_32); //("<illegal 0x05_25> (%08x)", op); return 4;} |
| 407 | | int arcompact_handle05_26_dasm(DASM_OPS_32); //("<illegal 0x05_26> (%08x)", op); return 4;} |
| 408 | | int arcompact_handle05_27_dasm(DASM_OPS_32); //("<illegal 0x05_27> (%08x)", op); return 4;} |
| 409 | | |
| 410 | | int arcompact_handle05_2a_dasm(DASM_OPS_32); //("<illegal 0x05_2a> (%08x)", op); return 4;} |
| 411 | | int arcompact_handle05_2b_dasm(DASM_OPS_32); //("<illegal 0x05_2b> (%08x)", op); return 4;} |
| 412 | | int arcompact_handle05_2c_dasm(DASM_OPS_32); //("<illegal 0x05_2c> (%08x)", op); return 4;} |
| 413 | | int arcompact_handle05_2d_dasm(DASM_OPS_32); //("<illegal 0x05_2d> (%08x)", op); return 4;} |
| 414 | | int arcompact_handle05_2e_dasm(DASM_OPS_32); //("<illegal 0x05_2e> (%08x)", op); return 4;} |
| 415 | | |
| 416 | | int arcompact_handle05_30_dasm(DASM_OPS_32); //("<illegal 0x05_30> (%08x)", op); return 4;} |
| 417 | | int arcompact_handle05_31_dasm(DASM_OPS_32); //("<illegal 0x05_31> (%08x)", op); return 4;} |
| 418 | | int arcompact_handle05_32_dasm(DASM_OPS_32); //("<illegal 0x05_32> (%08x)", op); return 4;} |
| 419 | | int arcompact_handle05_33_dasm(DASM_OPS_32); //("<illegal 0x05_33> (%08x)", op); return 4;} |
| 420 | | int arcompact_handle05_34_dasm(DASM_OPS_32); //("<illegal 0x05_34> (%08x)", op); return 4;} |
| 421 | | int arcompact_handle05_35_dasm(DASM_OPS_32); //("<illegal 0x05_35> (%08x)", op); return 4;} |
| 422 | | int arcompact_handle05_36_dasm(DASM_OPS_32); //("<illegal 0x05_36> (%08x)", op); return 4;} |
| 423 | | int arcompact_handle05_37_dasm(DASM_OPS_32); //("<illegal 0x05_37> (%08x)", op); return 4;} |
| 424 | | int arcompact_handle05_38_dasm(DASM_OPS_32); //("<illegal 0x05_38> (%08x)", op); return 4;} |
| 425 | | int arcompact_handle05_39_dasm(DASM_OPS_32); //("<illegal 0x05_39> (%08x)", op); return 4;} |
| 426 | | int arcompact_handle05_3a_dasm(DASM_OPS_32); //("<illegal 0x05_3a> (%08x)", op); return 4;} |
| 427 | | int arcompact_handle05_3b_dasm(DASM_OPS_32); //("<illegal 0x05_3b> (%08x)", op); return 4;} |
| 428 | | int arcompact_handle05_3c_dasm(DASM_OPS_32); //("<illegal 0x05_3c> (%08x)", op); return 4;} |
| 429 | | int arcompact_handle05_3d_dasm(DASM_OPS_32); //("<illegal 0x05_3d> (%08x)", op); return 4;} |
| 430 | | int arcompact_handle05_3e_dasm(DASM_OPS_32); //("<illegal 0x05_3e> (%08x)", op); return 4;} |
| 431 | | int arcompact_handle05_3f_dasm(DASM_OPS_32); //("<illegal 0x05_3f> (%08x)", op); return 4;} |
| 432 | | |
| 433 | | int arcompact_handle0f_00_04_dasm(DASM_OPS_16); //("<illegal 0x0f_00_00> (%08x)", op); return 2;} |
| 434 | | int arcompact_handle0f_00_05_dasm(DASM_OPS_16); //("<illegal 0x0f_00_00> (%08x)", op); return 2;} |
| 435 | | int arcompact_handle0f_00_07_02_dasm(DASM_OPS_16); //("<illegal 0x0f_00_07_02> (%08x)", op); return 2;} |
| 436 | | int arcompact_handle0f_00_07_03_dasm(DASM_OPS_16); //("<illegal 0x0f_00_07_03> (%08x)", op); return 2;} |
| 437 | | int arcompact_handle0f_01_dasm(DASM_OPS_16); //("<illegal 0x0f_01> (%08x)", op); return 2;} |
| 438 | | int arcompact_handle0f_03_dasm(DASM_OPS_16); //("<illegal 0x0f_03> (%08x)", op); return 2;} |
| 439 | | int arcompact_handle0f_08_dasm(DASM_OPS_16); //("<illegal 0x0f_08> (%08x)", op); return 2;} |
| 440 | | int arcompact_handle0f_09_dasm(DASM_OPS_16); //("<illegal 0x0f_09> (%08x)", op); return 2;} |
| 441 | | int arcompact_handle0f_0a_dasm(DASM_OPS_16); //("<illegal 0x0f_0a> (%08x)", op); return 2;} |
| 442 | | int arcompact_handle0f_17_dasm(DASM_OPS_16); //("<illegal 0x0f_17> (%08x)", op); return 2;} |
| 443 | | |
| 444 | | int arcompact_handle18_05_02_dasm(DASM_OPS_16); //("<illegal 0x18_05_02> (%04x)", op); return 2;} |
| 445 | | int arcompact_handle18_05_03_dasm(DASM_OPS_16); //("<illegal 0x18_05_03> (%04x)", op); return 2;} |
| 446 | | int arcompact_handle18_05_04_dasm(DASM_OPS_16); //("<illegal 0x18_05_04> (%04x)", op); return 2;} |
| 447 | | int arcompact_handle18_05_05_dasm(DASM_OPS_16); //("<illegal 0x18_05_05> (%04x)", op); return 2;} |
| 448 | | int arcompact_handle18_05_06_dasm(DASM_OPS_16); //("<illegal 0x18_05_06> (%04x)", op); return 2;} |
| 449 | | int arcompact_handle18_05_07_dasm(DASM_OPS_16); //("<illegal 0x18_05_07> (%04x)", op); return 2;} |
| 450 | | int arcompact_handle18_06_00_dasm(DASM_OPS_16); //("<illegal 0x18_06_00> (%04x)", op); return 2;} |
| 451 | | int arcompact_handle18_06_02_dasm(DASM_OPS_16); //("<illegal 0x18_06_02> (%04x)", op); return 2;} |
| 452 | | int arcompact_handle18_06_03_dasm(DASM_OPS_16); //("<illegal 0x18_06_03> (%04x)", op); return 2;} |
| 453 | | int arcompact_handle18_06_04_dasm(DASM_OPS_16); //("<illegal 0x18_06_04> (%04x)", op); return 2;} |
| 454 | | int arcompact_handle18_06_05_dasm(DASM_OPS_16); //("<illegal 0x18_06_05> (%04x)", op); return 2;} |
| 455 | | int arcompact_handle18_06_06_dasm(DASM_OPS_16); //("<illegal 0x18_06_06> (%04x)", op); return 2;} |
| 456 | | int arcompact_handle18_06_07_dasm(DASM_OPS_16); //("<illegal 0x18_06_07> (%04x)", op); return 2;} |
| 457 | | int arcompact_handle18_06_08_dasm(DASM_OPS_16); //("<illegal 0x18_06_08> (%04x)", op); return 2;} |
| 458 | | int arcompact_handle18_06_09_dasm(DASM_OPS_16); //("<illegal 0x18_06_09> (%04x)", op); return 2;} |
| 459 | | int arcompact_handle18_06_0a_dasm(DASM_OPS_16); //("<illegal 0x18_06_0a> (%04x)", op); return 2;} |
| 460 | | int arcompact_handle18_06_0b_dasm(DASM_OPS_16); //("<illegal 0x18_06_0b> (%04x)", op); return 2;} |
| 461 | | int arcompact_handle18_06_0c_dasm(DASM_OPS_16); //("<illegal 0x18_06_0c> (%04x)", op); return 2;} |
| 462 | | int arcompact_handle18_06_0d_dasm(DASM_OPS_16); //("<illegal 0x18_06_0d> (%04x)", op); return 2;} |
| 463 | | int arcompact_handle18_06_0e_dasm(DASM_OPS_16); //("<illegal 0x18_06_0e> (%04x)", op); return 2;} |
| 464 | | int arcompact_handle18_06_0f_dasm(DASM_OPS_16); //("<illegal 0x18_06_0f> (%04x)", op); return 2;} |
| 465 | | int arcompact_handle18_06_10_dasm(DASM_OPS_16); //("<illegal 0x18_06_10> (%04x)", op); return 2;} |
| 466 | | int arcompact_handle18_06_12_dasm(DASM_OPS_16); //("<illegal 0x18_06_12> (%04x)", op); return 2;} |
| 467 | | int arcompact_handle18_06_13_dasm(DASM_OPS_16); //("<illegal 0x18_06_13> (%04x)", op); return 2;} |
| 468 | | int arcompact_handle18_06_14_dasm(DASM_OPS_16); //("<illegal 0x18_06_14> (%04x)", op); return 2;} |
| 469 | | int arcompact_handle18_06_15_dasm(DASM_OPS_16); //("<illegal 0x18_06_15> (%04x)", op); return 2;} |
| 470 | | int arcompact_handle18_06_16_dasm(DASM_OPS_16); //("<illegal 0x18_06_16> (%04x)", op); return 2;} |
| 471 | | int arcompact_handle18_06_17_dasm(DASM_OPS_16); //("<illegal 0x18_06_17> (%04x)", op); return 2;} |
| 472 | | int arcompact_handle18_06_18_dasm(DASM_OPS_16); //("<illegal 0x18_06_18> (%04x)", op); return 2;} |
| 473 | | int arcompact_handle18_06_19_dasm(DASM_OPS_16); //("<illegal 0x18_06_19> (%04x)", op); return 2;} |
| 474 | | int arcompact_handle18_06_1a_dasm(DASM_OPS_16); //("<illegal 0x18_06_1a> (%04x)", op); return 2;} |
| 475 | | int arcompact_handle18_06_1b_dasm(DASM_OPS_16); //("<illegal 0x18_06_1b> (%04x)", op); return 2;} |
| 476 | | int arcompact_handle18_06_1c_dasm(DASM_OPS_16); //("<illegal 0x18_06_1c> (%04x)", op); return 2;} |
| 477 | | int arcompact_handle18_06_1d_dasm(DASM_OPS_16); //("<illegal 0x18_06_1d> (%04x)", op); return 2;} |
| 478 | | int arcompact_handle18_06_1e_dasm(DASM_OPS_16); //("<illegal 0x18_06_1e> (%04x)", op); return 2;} |
| 479 | | int arcompact_handle18_06_1f_dasm(DASM_OPS_16); //("<illegal 0x18_06_1f> (%04x)", op); return 2;} |
| 480 | | int arcompact_handle18_07_00_dasm(DASM_OPS_16); //("<illegal 0x18_07_00> (%04x)", op); return 2;} |
| 481 | | int arcompact_handle18_07_02_dasm(DASM_OPS_16); //("<illegal 0x18_07_02> (%04x)", op); return 2;} |
| 482 | | int arcompact_handle18_07_03_dasm(DASM_OPS_16); //("<illegal 0x18_07_03> (%04x)", op); return 2;} |
| 483 | | int arcompact_handle18_07_04_dasm(DASM_OPS_16); //("<illegal 0x18_07_04> (%04x)", op); return 2;} |
| 484 | | int arcompact_handle18_07_05_dasm(DASM_OPS_16); //("<illegal 0x18_07_05> (%04x)", op); return 2;} |
| 485 | | int arcompact_handle18_07_06_dasm(DASM_OPS_16); //("<illegal 0x18_07_06> (%04x)", op); return 2;} |
| 486 | | int arcompact_handle18_07_07_dasm(DASM_OPS_16); //("<illegal 0x18_07_07> (%04x)", op); return 2;} |
| 487 | | int arcompact_handle18_07_08_dasm(DASM_OPS_16); //("<illegal 0x18_07_08> (%04x)", op); return 2;} |
| 488 | | int arcompact_handle18_07_09_dasm(DASM_OPS_16); //("<illegal 0x18_07_09> (%04x)", op); return 2;} |
| 489 | | int arcompact_handle18_07_0a_dasm(DASM_OPS_16); //("<illegal 0x18_07_0a> (%04x)", op); return 2;} |
| 490 | | int arcompact_handle18_07_0b_dasm(DASM_OPS_16); //("<illegal 0x18_07_0b> (%04x)", op); return 2;} |
| 491 | | int arcompact_handle18_07_0c_dasm(DASM_OPS_16); //("<illegal 0x18_07_0c> (%04x)", op); return 2;} |
| 492 | | int arcompact_handle18_07_0d_dasm(DASM_OPS_16); //("<illegal 0x18_07_0d> (%04x)", op); return 2;} |
| 493 | | int arcompact_handle18_07_0e_dasm(DASM_OPS_16); //("<illegal 0x18_07_0e> (%04x)", op); return 2;} |
| 494 | | int arcompact_handle18_07_0f_dasm(DASM_OPS_16); //("<illegal 0x18_07_0f> (%04x)", op); return 2;} |
| 495 | | int arcompact_handle18_07_10_dasm(DASM_OPS_16); //("<illegal 0x18_07_10> (%04x)", op); return 2;} |
| 496 | | int arcompact_handle18_07_12_dasm(DASM_OPS_16); //("<illegal 0x18_07_12> (%04x)", op); return 2;} |
| 497 | | int arcompact_handle18_07_13_dasm(DASM_OPS_16); //("<illegal 0x18_07_13> (%04x)", op); return 2;} |
| 498 | | int arcompact_handle18_07_14_dasm(DASM_OPS_16); //("<illegal 0x18_07_14> (%04x)", op); return 2;} |
| 499 | | int arcompact_handle18_07_15_dasm(DASM_OPS_16); //("<illegal 0x18_07_15> (%04x)", op); return 2;} |
| 500 | | int arcompact_handle18_07_16_dasm(DASM_OPS_16); //("<illegal 0x18_07_16> (%04x)", op); return 2;} |
| 501 | | int arcompact_handle18_07_17_dasm(DASM_OPS_16); //("<illegal 0x18_07_17> (%04x)", op); return 2;} |
| 502 | | int arcompact_handle18_07_18_dasm(DASM_OPS_16); //("<illegal 0x18_07_18> (%04x)", op); return 2;} |
| 503 | | int arcompact_handle18_07_19_dasm(DASM_OPS_16); //("<illegal 0x18_07_19> (%04x)", op); return 2;} |
| 504 | | int arcompact_handle18_07_1a_dasm(DASM_OPS_16); //("<illegal 0x18_07_1a> (%04x)", op); return 2;} |
| 505 | | int arcompact_handle18_07_1b_dasm(DASM_OPS_16); //("<illegal 0x18_07_1b> (%04x)", op); return 2;} |
| 506 | | int arcompact_handle18_07_1c_dasm(DASM_OPS_16); //("<illegal 0x18_07_1c> (%04x)", op); return 2;} |
| 507 | | int arcompact_handle18_07_1d_dasm(DASM_OPS_16); //("<illegal 0x18_07_1d> (%04x)", op); return 2;} |
| 508 | | int arcompact_handle18_07_1e_dasm(DASM_OPS_16); //("<illegal 0x18_07_1e> (%04x)", op); return 2;} |
| 509 | | int arcompact_handle18_07_1f_dasm(DASM_OPS_16); //("<illegal 0x18_07_1f> (%04x)", op); return 2;} |
| 510 | | |
trunk/src/mess/drivers/pc9801.c
| r242341 | r242342 | |
| 416 | 416 | |
| 417 | 417 | #include "formats/pc98_dsk.h" |
| 418 | 418 | #include "formats/pc98fdi_dsk.h" |
| 419 | | #include "formats/fdd_dsk.h" |
| 420 | | #include "formats/dcp_dsk.h" |
| 421 | | #include "formats/dip_dsk.h" |
| 422 | | #include "formats/nfd_dsk.h" |
| 423 | 419 | |
| 424 | 420 | #include "machine/pc9801_26.h" |
| 425 | 421 | #include "machine/pc9801_86.h" |
| r242341 | r242342 | |
| 485 | 481 | optional_device<input_buffer_device> m_sasi_data_in; |
| 486 | 482 | optional_device<input_buffer_device> m_sasi_ctrl_in; |
| 487 | 483 | optional_device<ata_interface_device> m_ide; |
| 488 | | required_shared_ptr<UINT16> m_video_ram_1; |
| 489 | | required_shared_ptr<UINT16> m_video_ram_2; |
| 490 | | optional_shared_ptr<UINT16> m_ext_gvram; |
| 484 | required_shared_ptr<UINT8> m_video_ram_1; |
| 485 | required_shared_ptr<UINT8> m_video_ram_2; |
| 486 | optional_shared_ptr<UINT8> m_ext_gvram; |
| 491 | 487 | required_device<beep_device> m_beeper; |
| 492 | 488 | optional_device<ram_device> m_ram; |
| 493 | 489 | required_device<gfxdecode_device> m_gfxdecode; |
| r242341 | r242342 | |
| 509 | 505 | UINT8 m_txt_scroll_reg[8]; |
| 510 | 506 | UINT8 m_pal_clut[4]; |
| 511 | 507 | |
| 512 | | UINT16 *m_tvram; |
| 508 | UINT8 *m_tvram; |
| 513 | 509 | |
| 514 | 510 | UINT16 m_font_addr; |
| 515 | 511 | UINT8 m_font_line; |
| r242341 | r242342 | |
| 543 | 539 | UINT8 tile[4], tile_index; |
| 544 | 540 | }m_grcg; |
| 545 | 541 | |
| 546 | | struct { |
| 547 | | UINT16 regs[8]; |
| 548 | | UINT16 pat[4]; |
| 549 | | UINT16 src[4]; |
| 550 | | INT16 count; |
| 551 | | UINT16 leftover[4]; |
| 552 | | bool first; |
| 553 | | } m_egc; |
| 554 | | |
| 555 | 542 | /* PC9821 specific */ |
| 556 | 543 | UINT8 m_sdip[24], m_sdip_bank; |
| 557 | 544 | UINT8 m_pc9821_window_bank; |
| r242341 | r242342 | |
| 567 | 554 | DECLARE_WRITE8_MEMBER(txt_scrl_w); |
| 568 | 555 | DECLARE_READ8_MEMBER(grcg_r); |
| 569 | 556 | DECLARE_WRITE8_MEMBER(grcg_w); |
| 570 | | DECLARE_WRITE16_MEMBER(egc_w); |
| 571 | 557 | DECLARE_READ8_MEMBER(pc9801_a0_r); |
| 572 | 558 | DECLARE_WRITE8_MEMBER(pc9801_a0_w); |
| 573 | 559 | DECLARE_READ8_MEMBER(pc9801_fdc_2hd_r); |
| 574 | 560 | DECLARE_WRITE8_MEMBER(pc9801_fdc_2hd_w); |
| 575 | 561 | DECLARE_READ8_MEMBER(pc9801_fdc_2dd_r); |
| 576 | 562 | DECLARE_WRITE8_MEMBER(pc9801_fdc_2dd_w); |
| 577 | | DECLARE_READ16_MEMBER(tvram_r); |
| 578 | | DECLARE_WRITE16_MEMBER(tvram_w); |
| 563 | DECLARE_READ8_MEMBER(tvram_r); |
| 564 | DECLARE_WRITE8_MEMBER(tvram_w); |
| 579 | 565 | DECLARE_READ8_MEMBER(gvram_r); |
| 580 | 566 | DECLARE_WRITE8_MEMBER(gvram_w); |
| 581 | 567 | DECLARE_WRITE8_MEMBER(pc9801rs_mouse_freq_w); |
| 582 | 568 | DECLARE_CUSTOM_INPUT_MEMBER(system_type_r); |
| 583 | | DECLARE_READ16_MEMBER(grcg_gvram_r); |
| 584 | | DECLARE_WRITE16_MEMBER(grcg_gvram_w); |
| 585 | | DECLARE_READ16_MEMBER(grcg_gvram0_r); |
| 586 | | DECLARE_WRITE16_MEMBER(grcg_gvram0_w); |
| 587 | | DECLARE_READ16_MEMBER(upd7220_grcg_r); |
| 588 | | DECLARE_WRITE16_MEMBER(upd7220_grcg_w); |
| 589 | | void egc_blit_w(UINT32 offset, UINT16 data, UINT16 mem_mask); |
| 590 | | UINT16 egc_blit_r(UINT32 offset, UINT16 mem_mask); |
| 591 | | inline UINT16 egc_do_partial_op(int plane, UINT16 src, UINT16 pat, UINT16 dst); |
| 569 | DECLARE_READ8_MEMBER(grcg_gvram_r); |
| 570 | DECLARE_WRITE8_MEMBER(grcg_gvram_w); |
| 571 | DECLARE_READ8_MEMBER(grcg_gvram0_r); |
| 572 | DECLARE_WRITE8_MEMBER(grcg_gvram0_w); |
| 573 | DECLARE_READ8_MEMBER(upd7220_grcg_r); |
| 574 | DECLARE_WRITE8_MEMBER(upd7220_grcg_w); |
| 592 | 575 | UINT32 pc9801_286_a20(bool state); |
| 593 | 576 | |
| 594 | 577 | DECLARE_READ8_MEMBER(ide_hack_r); |
| r242341 | r242342 | |
| 731 | 714 | |
| 732 | 715 | void pc9801_state::video_start() |
| 733 | 716 | { |
| 734 | | m_tvram = auto_alloc_array(machine(), UINT16, 0x2000); |
| 717 | m_tvram = auto_alloc_array(machine(), UINT8, 0x4000); |
| 735 | 718 | |
| 736 | 719 | // find memory regions |
| 737 | 720 | m_char_rom = memregion("chargen")->base(); |
| r242341 | r242342 | |
| 767 | 750 | |
| 768 | 751 | if(m_ex_video_ff[ANALOG_256_MODE]) |
| 769 | 752 | { |
| 770 | | for(xi=0;xi<16;xi++) |
| 753 | for(xi=0;xi<8;xi++) |
| 771 | 754 | { |
| 772 | 755 | res_x = x + xi; |
| 773 | 756 | res_y = y; |
| r242341 | r242342 | |
| 775 | 758 | if(!m_screen->visible_area().contains(res_x, res_y*2+0)) |
| 776 | 759 | return; |
| 777 | 760 | |
| 778 | | pen = m_ext_gvram[((address*16+xi)+(m_vram_disp*0x40000)) >> 1]; |
| 761 | pen = m_ext_gvram[(address*8+xi)+(m_vram_disp*0x40000)]; |
| 779 | 762 | |
| 780 | 763 | bitmap.pix32(res_y*2+0, res_x) = palette[pen + 0x20]; |
| 781 | 764 | if(m_screen->visible_area().contains(res_x, res_y*2+1)) |
| r242341 | r242342 | |
| 784 | 767 | } |
| 785 | 768 | else |
| 786 | 769 | { |
| 787 | | for(xi=0;xi<16;xi++) |
| 770 | for(xi=0;xi<8;xi++) |
| 788 | 771 | { |
| 789 | 772 | res_x = x + xi; |
| 790 | 773 | res_y = y; |
| 791 | 774 | |
| 792 | | pen = ((m_video_ram_2[((address & 0x7fff) + (0x08000) + (m_vram_disp*0x20000)) >> 1] >> xi) & 1) ? 1 : 0; |
| 793 | | pen|= ((m_video_ram_2[((address & 0x7fff) + (0x10000) + (m_vram_disp*0x20000)) >> 1] >> xi) & 1) ? 2 : 0; |
| 794 | | pen|= ((m_video_ram_2[((address & 0x7fff) + (0x18000) + (m_vram_disp*0x20000)) >> 1] >> xi) & 1) ? 4 : 0; |
| 775 | pen = ((m_video_ram_2[(address & 0x7fff) + (0x08000) + (m_vram_disp*0x20000)] >> (7-xi)) & 1) ? 1 : 0; |
| 776 | pen|= ((m_video_ram_2[(address & 0x7fff) + (0x10000) + (m_vram_disp*0x20000)] >> (7-xi)) & 1) ? 2 : 0; |
| 777 | pen|= ((m_video_ram_2[(address & 0x7fff) + (0x18000) + (m_vram_disp*0x20000)] >> (7-xi)) & 1) ? 4 : 0; |
| 795 | 778 | if(m_ex_video_ff[ANALOG_16_MODE]) |
| 796 | | pen|= ((m_video_ram_2[((address & 0x7fff) + (0) + (m_vram_disp*0x20000)) >> 1] >> xi) & 1) ? 8 : 0; |
| 779 | pen|= ((m_video_ram_2[(address & 0x7fff) + (0) + (m_vram_disp*0x20000)] >> (7-xi)) & 1) ? 8 : 0; |
| 797 | 780 | |
| 798 | 781 | if(interlace_on) |
| 799 | 782 | { |
| r242341 | r242342 | |
| 843 | 826 | kanji_sel = 0; |
| 844 | 827 | kanji_lr = 0; |
| 845 | 828 | |
| 846 | | tile = m_video_ram_1[tile_addr & 0xfff] & 0xff; |
| 847 | | knj_tile = m_video_ram_1[tile_addr & 0xfff] >> 8; |
| 829 | tile = m_video_ram_1[(tile_addr*2) & 0x1fff] & 0xff; |
| 830 | knj_tile = m_video_ram_1[(tile_addr*2+1) & 0x1fff] & 0xff; |
| 848 | 831 | if(knj_tile) |
| 849 | 832 | { |
| 850 | 833 | /* Note: bit 7 doesn't really count, if a kanji is enabled then the successive tile is always the second part of it. |
| r242341 | r242342 | |
| 865 | 848 | else |
| 866 | 849 | x_step = 1; |
| 867 | 850 | |
| 868 | | attr = (m_video_ram_1[(tile_addr & 0xfff) | 0x1000] & 0xff); |
| 851 | attr = (m_video_ram_1[(tile_addr*2 & 0x1fff) | 0x2000] & 0xff); |
| 869 | 852 | |
| 870 | 853 | secret = (attr & 1) ^ 1; |
| 871 | 854 | blink = attr & 2; |
| r242341 | r242342 | |
| 1296 | 1279 | |
| 1297 | 1280 | |
| 1298 | 1281 | /* TODO: banking? */ |
| 1299 | | READ16_MEMBER(pc9801_state::tvram_r) |
| 1282 | READ8_MEMBER(pc9801_state::tvram_r) |
| 1300 | 1283 | { |
| 1301 | | UINT16 res; |
| 1284 | UINT8 res; |
| 1302 | 1285 | |
| 1303 | | if((offset & 0x1000) && (mem_mask == 0xff00)) |
| 1304 | | return 0xffff; |
| 1286 | if((offset & 0x2000) && offset & 1) |
| 1287 | return 0xff; |
| 1305 | 1288 | |
| 1306 | 1289 | res = m_tvram[offset]; |
| 1307 | 1290 | |
| 1308 | 1291 | return res; |
| 1309 | 1292 | } |
| 1310 | 1293 | |
| 1311 | | WRITE16_MEMBER(pc9801_state::tvram_w) |
| 1294 | WRITE8_MEMBER(pc9801_state::tvram_w) |
| 1312 | 1295 | { |
| 1313 | | if(offset < (0x3fe2>>1) || m_video_ff[MEMSW_REG]) |
| 1314 | | COMBINE_DATA(&m_tvram[offset]); |
| 1296 | if(offset < (0x3fe2) || m_video_ff[MEMSW_REG]) |
| 1297 | m_tvram[offset] = data; |
| 1315 | 1298 | |
| 1316 | | COMBINE_DATA(&m_video_ram_1[offset]); //TODO: check me |
| 1299 | m_video_ram_1[offset] = data; //TODO: check me |
| 1317 | 1300 | } |
| 1318 | 1301 | |
| 1319 | 1302 | /* +0x8000 is trusted (bank 0 is actually used by 16 colors mode) */ |
| 1320 | 1303 | READ8_MEMBER(pc9801_state::gvram_r) |
| 1321 | 1304 | { |
| 1322 | | return BITSWAP8(m_video_ram_2[(offset>>1)+0x04000+m_vram_bank*0x10000] >> ((offset & 1) << 3),0,1,2,3,4,5,6,7); |
| 1305 | return m_video_ram_2[offset+0x08000+m_vram_bank*0x20000]; |
| 1323 | 1306 | } |
| 1324 | 1307 | |
| 1325 | 1308 | WRITE8_MEMBER(pc9801_state::gvram_w) |
| 1326 | 1309 | { |
| 1327 | | UINT16 ram = m_video_ram_2[(offset>>1)+0x04000+m_vram_bank*0x10000]; |
| 1328 | | int mask = (offset & 1) << 3; |
| 1329 | | data = BITSWAP8(data,0,1,2,3,4,5,6,7); |
| 1330 | | m_video_ram_2[(offset>>1)+0x04000+m_vram_bank*0x10000] = (ram & (0xff00 >> mask)) | (data << mask); |
| 1310 | m_video_ram_2[offset+0x08000+m_vram_bank*0x20000] = data; |
| 1331 | 1311 | } |
| 1332 | 1312 | |
| 1333 | | inline UINT16 pc9801_state::egc_do_partial_op(int plane, UINT16 src, UINT16 pat, UINT16 dst) |
| 1313 | READ8_MEMBER(pc9801_state::upd7220_grcg_r) |
| 1334 | 1314 | { |
| 1335 | | UINT16 out = 0; |
| 1336 | | int src_off, dst_off; |
| 1337 | | UINT16 src_tmp = src; |
| 1315 | UINT8 res = 0; |
| 1338 | 1316 | |
| 1339 | | if(m_egc.regs[6] & 0x1000) |
| 1340 | | { |
| 1341 | | src_off = 15 - (m_egc.regs[6] & 0xf); |
| 1342 | | dst_off = 15 - ((m_egc.regs[6] >> 4) & 0xf); |
| 1343 | | } |
| 1344 | | else |
| 1345 | | { |
| 1346 | | src_off = m_egc.regs[6] & 0xf; |
| 1347 | | dst_off = (m_egc.regs[6] >> 4) & 0xf; |
| 1348 | | } |
| 1349 | | |
| 1350 | | if(src_off < dst_off) |
| 1351 | | { |
| 1352 | | src = src_tmp << (dst_off - src_off); |
| 1353 | | src |= m_egc.leftover[plane]; |
| 1354 | | m_egc.leftover[plane] = src_tmp >> (15 - (dst_off - src_off)); |
| 1355 | | } |
| 1356 | | else |
| 1357 | | { |
| 1358 | | src = src_tmp >> (src_off - dst_off); |
| 1359 | | src |= m_egc.leftover[plane]; |
| 1360 | | m_egc.leftover[plane] = src_tmp << (15 - (src_off - dst_off)); |
| 1361 | | } |
| 1362 | | |
| 1363 | | for(int i = 7; i >= 0; i--) |
| 1364 | | { |
| 1365 | | if(BIT(m_egc.regs[2], i)) |
| 1366 | | out |= src & pat & dst; |
| 1367 | | pat = ~pat; |
| 1368 | | dst = (!(i & 1)) ? ~dst : dst; |
| 1369 | | src = (i == 4) ? ~src : src; |
| 1370 | | } |
| 1371 | | return out; |
| 1372 | | } |
| 1373 | | |
| 1374 | | void pc9801_state::egc_blit_w(UINT32 offset, UINT16 data, UINT16 mem_mask) |
| 1375 | | { |
| 1376 | | UINT16 mask = m_egc.regs[4] & mem_mask, out = 0; |
| 1377 | | bool dir = !(m_egc.regs[6] & 0x1000); |
| 1378 | | int dst_off = (m_egc.regs[6] >> 4) & 0xf; |
| 1379 | | offset &= 0x3fff; |
| 1380 | | |
| 1381 | | if((((m_egc.regs[2] >> 11) & 3) == 1) || ((((m_egc.regs[2] >> 11) & 3) == 2) && !BIT(m_egc.regs[2], 10))) |
| 1382 | | { |
| 1383 | | // mask off the bits past the end of the blit |
| 1384 | | if(m_egc.count < 16) |
| 1385 | | mask &= dir ? ((1 << (m_egc.count + 1)) - 1) : ~((1 << (16 - m_egc.count)) - 1); |
| 1386 | | |
| 1387 | | // mask off the bits before the start |
| 1388 | | if(m_egc.first) |
| 1389 | | { |
| 1390 | | m_egc.leftover[0] = m_egc.leftover[1] = m_egc.leftover[2] = m_egc.leftover[3] = 0; |
| 1391 | | mask &= dir ? ~((1 << (16 - dst_off)) - 1) : ((1 << (dst_off + 1)) - 1); |
| 1392 | | } |
| 1393 | | } |
| 1394 | | |
| 1395 | | for(int i = 0; i < 4; i++) |
| 1396 | | { |
| 1397 | | if(!BIT(m_egc.regs[0], i)) |
| 1398 | | { |
| 1399 | | UINT16 src = m_egc.src[i] & mem_mask, pat = m_egc.pat[i]; |
| 1400 | | if(BIT(m_egc.regs[2], 10)) |
| 1401 | | src = data; |
| 1402 | | |
| 1403 | | if((m_egc.regs[2] & 0x300) == 0x200) |
| 1404 | | pat = m_video_ram_2[offset + (((i + 1) & 3) * 0x4000)]; |
| 1405 | | |
| 1406 | | switch((m_egc.regs[2] >> 11) & 3) |
| 1407 | | { |
| 1408 | | case 0: |
| 1409 | | out = data; |
| 1410 | | break; |
| 1411 | | case 1: |
| 1412 | | if(mem_mask == 0x00ff) |
| 1413 | | src = src | src << 8; |
| 1414 | | else if(mem_mask == 0xff00) |
| 1415 | | src = src | src >> 8; |
| 1416 | | |
| 1417 | | out = egc_do_partial_op(i, src, pat, m_video_ram_2[offset + (((i + 1) & 3) * 0x4000)]); |
| 1418 | | break; |
| 1419 | | case 2: |
| 1420 | | out = pat; |
| 1421 | | break; |
| 1422 | | case 3: |
| 1423 | | logerror("Invalid EGC blit operation\n"); |
| 1424 | | return; |
| 1425 | | } |
| 1426 | | |
| 1427 | | m_video_ram_2[offset + (((i + 1) & 3) * 0x4000)] &= ~mask; |
| 1428 | | m_video_ram_2[offset + (((i + 1) & 3) * 0x4000)] |= out & mask; |
| 1429 | | } |
| 1430 | | } |
| 1431 | | if(mem_mask != 0xffff) |
| 1432 | | { |
| 1433 | | dst_off &= 7; |
| 1434 | | if(m_egc.first) |
| 1435 | | m_egc.count -= dir ? 7 - dst_off : dst_off; |
| 1436 | | else |
| 1437 | | m_egc.count -= 8; |
| 1438 | | } |
| 1439 | | else |
| 1440 | | { |
| 1441 | | if(m_egc.first) |
| 1442 | | m_egc.count -= dir ? 15 - dst_off : dst_off; |
| 1443 | | else |
| 1444 | | m_egc.count -= 16; |
| 1445 | | } |
| 1446 | | |
| 1447 | | m_egc.first = false; |
| 1448 | | |
| 1449 | | if(m_egc.count <= 0) |
| 1450 | | { |
| 1451 | | m_egc.first = true; |
| 1452 | | m_egc.count = (m_egc.regs[7] & 0xfff) + 1; |
| 1453 | | } |
| 1454 | | } |
| 1455 | | |
| 1456 | | UINT16 pc9801_state::egc_blit_r(UINT32 offset, UINT16 mem_mask) |
| 1457 | | { |
| 1458 | | UINT16 plane_off = offset & 0x3fff; |
| 1459 | | if((m_egc.regs[2] & 0x300) == 0x100) |
| 1460 | | { |
| 1461 | | m_egc.pat[0] = m_video_ram_2[plane_off + 0x4000]; |
| 1462 | | m_egc.pat[1] = m_video_ram_2[plane_off + (0x4000 * 2)]; |
| 1463 | | m_egc.pat[2] = m_video_ram_2[plane_off + (0x4000 * 3)]; |
| 1464 | | m_egc.pat[3] = m_video_ram_2[plane_off]; |
| 1465 | | } |
| 1466 | | if(!BIT(m_egc.regs[2], 10)) |
| 1467 | | { |
| 1468 | | m_egc.src[0] = m_video_ram_2[plane_off + 0x4000]; |
| 1469 | | m_egc.src[1] = m_video_ram_2[plane_off + (0x4000 * 2)]; |
| 1470 | | m_egc.src[2] = m_video_ram_2[plane_off + (0x4000 * 3)]; |
| 1471 | | m_egc.src[3] = m_video_ram_2[plane_off]; |
| 1472 | | } |
| 1473 | | if(BIT(m_egc.regs[2], 13)) |
| 1474 | | return m_video_ram_2[offset]; |
| 1475 | | else |
| 1476 | | return m_video_ram_2[plane_off + (((m_egc.regs[1] >> 8) + 1) & 3) * 0x4000]; |
| 1477 | | } |
| 1478 | | |
| 1479 | | READ16_MEMBER(pc9801_state::upd7220_grcg_r) |
| 1480 | | { |
| 1481 | | UINT16 res = 0; |
| 1482 | | |
| 1483 | | if(!(m_grcg.mode & 0x80) || space.debugger_access()) |
| 1317 | if(!(m_grcg.mode & 0x80)) |
| 1484 | 1318 | res = m_video_ram_2[offset]; |
| 1485 | | else if(m_ex_video_ff[2]) |
| 1486 | | res = egc_blit_r(offset, mem_mask); |
| 1487 | 1319 | else if(!(m_grcg.mode & 0x40)) |
| 1488 | 1320 | { |
| 1489 | 1321 | int i; |
| 1490 | 1322 | |
| 1491 | | offset &= 0x3fff; |
| 1323 | offset &= ~(3 << 15); |
| 1492 | 1324 | res = 0; |
| 1493 | 1325 | for(i=0;i<4;i++) |
| 1494 | 1326 | { |
| 1495 | 1327 | if((m_grcg.mode & (1 << i)) == 0) |
| 1496 | | { |
| 1497 | | res |= m_video_ram_2[offset | (((i + 1) & 3) * 0x4000)] ^ (m_grcg.tile[i] | m_grcg.tile[i] << 8); |
| 1498 | | } |
| 1328 | res |= m_video_ram_2[offset | (((i + 1) & 3) * 0x8000)] ^ m_grcg.tile[i]; |
| 1499 | 1329 | } |
| 1500 | 1330 | |
| 1501 | | res ^= 0xffff; |
| 1331 | res ^= 0xff; |
| 1502 | 1332 | } |
| 1503 | 1333 | |
| 1504 | 1334 | return res; |
| 1505 | 1335 | } |
| 1506 | 1336 | |
| 1507 | | WRITE16_MEMBER(pc9801_state::upd7220_grcg_w) |
| 1337 | WRITE8_MEMBER(pc9801_state::upd7220_grcg_w) |
| 1508 | 1338 | { |
| 1509 | | if(!(m_grcg.mode & 0x80)) |
| 1510 | | COMBINE_DATA(&m_video_ram_2[offset]); |
| 1511 | | else if(m_ex_video_ff[2]) |
| 1512 | | egc_blit_w(offset, data, mem_mask); |
| 1339 | if((m_grcg.mode & 0x80) == 0) |
| 1340 | m_video_ram_2[offset] = data; |
| 1513 | 1341 | else |
| 1514 | 1342 | { |
| 1515 | 1343 | int i; |
| 1516 | | UINT8 *vram = (UINT8 *)m_video_ram_2.target(); |
| 1517 | | offset = (offset << 1) & 0x7fff; |
| 1344 | offset &= ~(3 << 15); |
| 1518 | 1345 | |
| 1519 | 1346 | if(m_grcg.mode & 0x40) // RMW |
| 1520 | 1347 | { |
| r242341 | r242342 | |
| 1522 | 1349 | { |
| 1523 | 1350 | if((m_grcg.mode & (1 << i)) == 0) |
| 1524 | 1351 | { |
| 1525 | | if(mem_mask & 0xff) |
| 1526 | | { |
| 1527 | | vram[offset | (((i + 1) & 3) * 0x8000)] &= ~data; |
| 1528 | | vram[offset | (((i + 1) & 3) * 0x8000)] |= m_grcg.tile[i] & data; |
| 1529 | | } |
| 1530 | | if(mem_mask & 0xff00) |
| 1531 | | { |
| 1532 | | vram[offset | (((i + 1) & 3) * 0x8000) | 1] &= ~(data >> 8); |
| 1533 | | vram[offset | (((i + 1) & 3) * 0x8000) | 1] |= m_grcg.tile[i] & (data >> 8); |
| 1534 | | } |
| 1352 | m_video_ram_2[offset | (((i + 1) & 3) * 0x8000)] &= ~data; |
| 1353 | m_video_ram_2[offset | (((i + 1) & 3) * 0x8000)] |= m_grcg.tile[i] & data; |
| 1535 | 1354 | } |
| 1536 | 1355 | } |
| 1537 | 1356 | } |
| r242341 | r242342 | |
| 1541 | 1360 | { |
| 1542 | 1361 | if((m_grcg.mode & (1 << i)) == 0) |
| 1543 | 1362 | { |
| 1544 | | if(mem_mask & 0xff) |
| 1545 | | vram[offset | (((i + 1) & 3) * 0x8000)] = m_grcg.tile[i]; |
| 1546 | | if(mem_mask & 0xff00) |
| 1547 | | vram[offset | (((i + 1) & 3) * 0x8000) | 1] = m_grcg.tile[i]; |
| 1363 | m_video_ram_2[offset | (((i + 1) & 3) * 0x8000)] = m_grcg.tile[i]; |
| 1548 | 1364 | } |
| 1549 | 1365 | } |
| 1550 | 1366 | } |
| r242341 | r242342 | |
| 1675 | 1491 | |
| 1676 | 1492 | static ADDRESS_MAP_START( pc9801_map, AS_PROGRAM, 16, pc9801_state ) |
| 1677 | 1493 | AM_RANGE(0x00000, 0x9ffff) AM_RAM //work RAM |
| 1678 | | AM_RANGE(0xa0000, 0xa3fff) AM_READWRITE(tvram_r,tvram_w) //TVRAM |
| 1494 | AM_RANGE(0xa0000, 0xa3fff) AM_READWRITE8(tvram_r,tvram_w,0xffff) //TVRAM |
| 1679 | 1495 | AM_RANGE(0xa8000, 0xbffff) AM_READWRITE8(gvram_r,gvram_w,0xffff) //bitmap VRAM |
| 1680 | 1496 | AM_RANGE(0xcc000, 0xcdfff) AM_ROM AM_REGION("sound_bios",0) //sound BIOS |
| 1681 | 1497 | AM_RANGE(0xd6000, 0xd6fff) AM_ROM AM_REGION("fdc_bios_2dd",0) //floppy BIOS 2dd |
| r242341 | r242342 | |
| 1858 | 1674 | txt_scrl_w(space,offset,data); |
| 1859 | 1675 | } |
| 1860 | 1676 | |
| 1861 | | WRITE16_MEMBER(pc9801_state::egc_w) |
| 1862 | | { |
| 1863 | | if(!m_ex_video_ff[2]) |
| 1864 | | return; |
| 1865 | | |
| 1866 | | COMBINE_DATA(&m_egc.regs[offset]); |
| 1867 | | switch(offset) |
| 1868 | | { |
| 1869 | | case 1: |
| 1870 | | case 3: |
| 1871 | | case 5: |
| 1872 | | { |
| 1873 | | UINT8 color = 0; |
| 1874 | | switch((m_egc.regs[1] >> 13) & 3) |
| 1875 | | { |
| 1876 | | case 1: |
| 1877 | | //back color |
| 1878 | | color = m_egc.regs[5]; |
| 1879 | | break; |
| 1880 | | case 2: |
| 1881 | | //fore color |
| 1882 | | color = m_egc.regs[3]; |
| 1883 | | break; |
| 1884 | | default: |
| 1885 | | return; |
| 1886 | | } |
| 1887 | | m_egc.pat[0] = (color & 1) ? 0xffff : 0; |
| 1888 | | m_egc.pat[1] = (color & 2) ? 0xffff : 0; |
| 1889 | | m_egc.pat[2] = (color & 4) ? 0xffff : 0; |
| 1890 | | m_egc.pat[3] = (color & 8) ? 0xffff : 0; |
| 1891 | | break; |
| 1892 | | } |
| 1893 | | case 6: |
| 1894 | | case 7: |
| 1895 | | m_egc.count = (m_egc.regs[7] & 0xfff) + 1; |
| 1896 | | m_egc.first = true; |
| 1897 | | break; |
| 1898 | | } |
| 1899 | | } |
| 1900 | | |
| 1901 | 1677 | READ8_MEMBER(pc9801_state::pc9810rs_fdc_ctrl_r) |
| 1902 | 1678 | { |
| 1903 | 1679 | return (m_fdc_ctrl & 3) | 0xf0 | 8 | 4; |
| r242341 | r242342 | |
| 2109 | 1885 | ((offset >= 4) ? m_pic2 : m_pic1)->write(space, offset & 3, data); |
| 2110 | 1886 | } |
| 2111 | 1887 | |
| 2112 | | READ16_MEMBER(pc9801_state::grcg_gvram_r) |
| 1888 | READ8_MEMBER(pc9801_state::grcg_gvram_r) |
| 2113 | 1889 | { |
| 2114 | | UINT16 ret = upd7220_grcg_r(space, (offset + 0x4000) | (m_vram_bank << 16), mem_mask); |
| 2115 | | return BITSWAP16(ret,8,9,10,11,12,13,14,15,0,1,2,3,4,5,6,7); |
| 1890 | return upd7220_grcg_r(space, (offset + 0x8000) | (m_vram_bank << 17), mem_mask); |
| 2116 | 1891 | } |
| 2117 | 1892 | |
| 2118 | | WRITE16_MEMBER(pc9801_state::grcg_gvram_w) |
| 1893 | WRITE8_MEMBER(pc9801_state::grcg_gvram_w) |
| 2119 | 1894 | { |
| 2120 | | data = BITSWAP16(data,8,9,10,11,12,13,14,15,0,1,2,3,4,5,6,7); |
| 2121 | | upd7220_grcg_w(space, (offset + 0x4000) | (m_vram_bank << 16), data, mem_mask); |
| 1895 | upd7220_grcg_w(space, (offset + 0x8000) | (m_vram_bank << 17), data, mem_mask); |
| 2122 | 1896 | } |
| 2123 | 1897 | |
| 2124 | | READ16_MEMBER(pc9801_state::grcg_gvram0_r) |
| 1898 | READ8_MEMBER(pc9801_state::grcg_gvram0_r) |
| 2125 | 1899 | { |
| 2126 | | UINT16 ret = upd7220_grcg_r(space, offset | (m_vram_bank << 16), mem_mask); |
| 2127 | | return BITSWAP16(ret,8,9,10,11,12,13,14,15,0,1,2,3,4,5,6,7); |
| 1900 | return upd7220_grcg_r(space, offset | (m_vram_bank << 17), mem_mask); |
| 2128 | 1901 | } |
| 2129 | 1902 | |
| 2130 | | WRITE16_MEMBER(pc9801_state::grcg_gvram0_w) |
| 1903 | WRITE8_MEMBER(pc9801_state::grcg_gvram0_w) |
| 2131 | 1904 | { |
| 2132 | | data = BITSWAP16(data,8,9,10,11,12,13,14,15,0,1,2,3,4,5,6,7); |
| 2133 | | upd7220_grcg_w(space, offset | (m_vram_bank << 16), data, mem_mask); |
| 1905 | upd7220_grcg_w(space, offset | (m_vram_bank << 17), data, mem_mask); |
| 2134 | 1906 | } |
| 2135 | 1907 | |
| 2136 | 1908 | static ADDRESS_MAP_START( pc9801ux_map, AS_PROGRAM, 16, pc9801_state ) |
| 2137 | 1909 | AM_RANGE(0x000000, 0x09ffff) AM_RAMBANK("wram") |
| 2138 | | AM_RANGE(0x0a0000, 0x0a3fff) AM_READWRITE(tvram_r, tvram_w) |
| 1910 | AM_RANGE(0x0a0000, 0x0a3fff) AM_READWRITE8(tvram_r, tvram_w, 0xffff) |
| 2139 | 1911 | AM_RANGE(0x0a4000, 0x0a4fff) AM_READWRITE8(pc9801rs_knjram_r, pc9801rs_knjram_w, 0xffff) |
| 2140 | | AM_RANGE(0x0a8000, 0x0bffff) AM_READWRITE(grcg_gvram_r, grcg_gvram_w) |
| 2141 | | AM_RANGE(0x0e0000, 0x0e7fff) AM_READWRITE(grcg_gvram0_r,grcg_gvram0_w) |
| 1912 | AM_RANGE(0x0a8000, 0x0bffff) AM_READWRITE8(grcg_gvram_r, grcg_gvram_w, 0xffff) |
| 1913 | AM_RANGE(0x0e0000, 0x0e7fff) AM_READWRITE8(grcg_gvram0_r,grcg_gvram0_w, 0xffff) |
| 2142 | 1914 | AM_RANGE(0x0e0000, 0x0fffff) AM_READ8(pc9801rs_ipl_r, 0xffff) |
| 2143 | 1915 | ADDRESS_MAP_END |
| 2144 | 1916 | |
| r242341 | r242342 | |
| 2155 | 1927 | AM_RANGE(0x00f0, 0x00ff) AM_READWRITE8(a20_ctrl_r, a20_ctrl_w, 0x00ff) |
| 2156 | 1928 | AM_RANGE(0x0438, 0x043b) AM_READWRITE8(pc9801rs_access_ctrl_r,pc9801rs_access_ctrl_w,0xffff) |
| 2157 | 1929 | AM_RANGE(0x043c, 0x043f) AM_WRITE8(pc9801rs_bank_w, 0xffff) //ROM/RAM bank |
| 2158 | | AM_RANGE(0x04a0, 0x04af) AM_WRITE(egc_w) |
| 2159 | 1930 | AM_RANGE(0x3fd8, 0x3fdf) AM_DEVREADWRITE8("pit8253", pit8253_device, read, write, 0xff00) |
| 2160 | 1931 | // AM_RANGE(0xa460, 0xa463) AM_READWRITE8(pc9801_ext_opna_r, pc9801_ext_opna_w, 0xffff) |
| 2161 | 1932 | AM_IMPORT_FROM(pc9801_io) |
| r242341 | r242342 | |
| 2364 | 2135 | static ADDRESS_MAP_START( pc9821_map, AS_PROGRAM, 32, pc9801_state ) |
| 2365 | 2136 | AM_RANGE(0x00000000, 0x0009ffff) AM_RAMBANK("wram") |
| 2366 | 2137 | //AM_RANGE(0x00080000, 0x0009ffff) AM_READWRITE8(winram_r, winram_w, 0xffffffff) |
| 2367 | | AM_RANGE(0x000a0000, 0x000a3fff) AM_READWRITE16(tvram_r, tvram_w, 0xffffffff) |
| 2138 | AM_RANGE(0x000a0000, 0x000a3fff) AM_READWRITE8(tvram_r, tvram_w, 0xffffffff) |
| 2368 | 2139 | AM_RANGE(0x000a4000, 0x000a4fff) AM_READWRITE8(pc9801rs_knjram_r, pc9801rs_knjram_w, 0xffffffff) |
| 2369 | | AM_RANGE(0x000a8000, 0x000bffff) AM_READWRITE16(grcg_gvram_r, grcg_gvram_w, 0xffffffff) |
| 2140 | AM_RANGE(0x000a8000, 0x000bffff) AM_READWRITE8(grcg_gvram_r, grcg_gvram_w, 0xffffffff) |
| 2370 | 2141 | AM_RANGE(0x000cc000, 0x000cdfff) AM_ROM AM_REGION("sound_bios",0) //sound BIOS |
| 2371 | 2142 | AM_RANGE(0x000d8000, 0x000d9fff) AM_ROM AM_REGION("ide",0) |
| 2372 | 2143 | AM_RANGE(0x000da000, 0x000dbfff) AM_RAM // ide ram |
| 2373 | | AM_RANGE(0x000e0000, 0x000e7fff) AM_READWRITE16(grcg_gvram0_r,grcg_gvram0_w, 0xffffffff) |
| 2144 | AM_RANGE(0x000e0000, 0x000e7fff) AM_READWRITE8(grcg_gvram0_r,grcg_gvram0_w, 0xffffffff) |
| 2374 | 2145 | AM_RANGE(0x000e0000, 0x000fffff) AM_READ8(pc9801rs_ipl_r, 0xffffffff) |
| 2375 | 2146 | AM_RANGE(0x00f00000, 0x00f9ffff) AM_RAM AM_SHARE("ext_gvram") |
| 2376 | 2147 | AM_RANGE(0xffee0000, 0xffefffff) AM_READ8(pc9801rs_ipl_r, 0xffffffff) |
| r242341 | r242342 | |
| 2458 | 2229 | // AM_RANGE(0xfcd0, 0xfcd3) MIDI port, option F / <undefined> |
| 2459 | 2230 | ADDRESS_MAP_END |
| 2460 | 2231 | |
| 2461 | | static ADDRESS_MAP_START( upd7220_1_map, AS_0, 16, pc9801_state ) |
| 2232 | static ADDRESS_MAP_START( upd7220_1_map, AS_0, 8, pc9801_state ) |
| 2462 | 2233 | AM_RANGE(0x00000, 0x3ffff) AM_RAM AM_SHARE("video_ram_1") |
| 2463 | 2234 | ADDRESS_MAP_END |
| 2464 | 2235 | |
| 2465 | | static ADDRESS_MAP_START( upd7220_2_map, AS_0, 16, pc9801_state ) |
| 2236 | static ADDRESS_MAP_START( upd7220_2_map, AS_0, 8, pc9801_state ) |
| 2466 | 2237 | AM_RANGE(0x00000, 0x3ffff) AM_RAM AM_SHARE("video_ram_2") |
| 2467 | 2238 | ADDRESS_MAP_END |
| 2468 | 2239 | |
| 2469 | | static ADDRESS_MAP_START( upd7220_grcg_2_map, AS_0, 16, pc9801_state ) |
| 2240 | static ADDRESS_MAP_START( upd7220_grcg_2_map, AS_0, 8, pc9801_state ) |
| 2470 | 2241 | AM_RANGE(0x00000, 0x3ffff) AM_READWRITE(upd7220_grcg_r, upd7220_grcg_w) AM_SHARE("video_ram_2") |
| 2471 | 2242 | ADDRESS_MAP_END |
| 2472 | 2243 | |
| r242341 | r242342 | |
| 3010 | 2781 | |
| 3011 | 2782 | MACHINE_RESET_MEMBER(pc9801_state,pc9801_common) |
| 3012 | 2783 | { |
| 3013 | | memset(m_tvram, 0, sizeof(UINT16) * 0x2000); |
| 2784 | memset(m_tvram, 0, sizeof(UINT8) * 0x4000); |
| 3014 | 2785 | /* this looks like to be some kind of backup ram, system will boot with green colors otherwise */ |
| 3015 | 2786 | { |
| 3016 | 2787 | int i; |
| r242341 | r242342 | |
| 3021 | 2792 | }; |
| 3022 | 2793 | |
| 3023 | 2794 | for(i=0;i<0x10;i++) |
| 3024 | | m_tvram[(0x3fe0>>1)+i] = default_memsw_data[i]; |
| 2795 | m_tvram[(0x3fe0)+i*2] = default_memsw_data[i]; |
| 3025 | 2796 | } |
| 3026 | 2797 | |
| 3027 | 2798 | m_beeper->set_frequency(2400); |
| r242341 | r242342 | |
| 3031 | 2802 | m_mouse.control = 0xff; |
| 3032 | 2803 | m_mouse.freq_reg = 0; |
| 3033 | 2804 | m_mouse.freq_index = 0; |
| 3034 | | memset(&m_egc, 0, sizeof(m_egc)); |
| 3035 | 2805 | } |
| 3036 | 2806 | |
| 3037 | 2807 | MACHINE_RESET_MEMBER(pc9801_state,pc9801f) |
| r242341 | r242342 | |
| 3099 | 2869 | |
| 3100 | 2870 | FLOPPY_FORMATS_MEMBER( pc9801_state::floppy_formats ) |
| 3101 | 2871 | FLOPPY_PC98_FORMAT, |
| 3102 | | FLOPPY_PC98FDI_FORMAT, |
| 3103 | | FLOPPY_FDD_FORMAT, |
| 3104 | | FLOPPY_DCP_FORMAT, |
| 3105 | | FLOPPY_DIP_FORMAT, |
| 3106 | | FLOPPY_NFD_FORMAT |
| 2872 | FLOPPY_PC98FDI_FORMAT |
| 3107 | 2873 | FLOPPY_FORMATS_END |
| 3108 | 2874 | |
| 3109 | 2875 | TIMER_DEVICE_CALLBACK_MEMBER( pc9801_state::mouse_irq_cb ) |
| r242341 | r242342 | |
| 3389 | 3155 | ROM_IGNORE( 0x2000 ) \ |
| 3390 | 3156 | ROM_IGNORE( 0x2000 ) \ |
| 3391 | 3157 | ROM_IGNORE( 0x2000 ) \ |
| 3392 | | // ROM_FILL( 0x0000, 0x2000, 0xcb ) |
| 3158 | ROM_FILL( 0x0000, 0x2000, 0xcb ) |
| 3393 | 3159 | |
| 3394 | 3160 | // all of these are half size :/ |
| 3395 | 3161 | #define LOAD_KANJI_ROMS \ |