]>
Commit | Line | Data |
---|---|---|
89a955e8 AM |
1 | /* |
2 | * Source file for nanoMIPS disassembler component of QEMU | |
3 | * | |
8bae1509 | 4 | * Copyright (C) 2018 Wave Computing, Inc. |
89a955e8 | 5 | * Copyright (C) 2018 Matthew Fortune <[email protected]> |
8bae1509 | 6 | * Copyright (C) 2018 Aleksandar Markovic <[email protected]> |
89a955e8 AM |
7 | * |
8 | * This program is free software: you can redistribute it and/or modify | |
9 | * it under the terms of the GNU General Public License as published by | |
8bae1509 | 10 | * the Free Software Foundation, either version 2 of the License, or |
89a955e8 AM |
11 | * (at your option) any later version. |
12 | * | |
13 | * This program is distributed in the hope that it will be useful, | |
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | * GNU General Public License for more details. | |
17 | * | |
18 | * You should have received a copy of the GNU General Public License | |
19 | * along with this program. If not, see <https://www.gnu.org/licenses/>. | |
8bae1509 | 20 | * |
89a955e8 AM |
21 | */ |
22 | ||
779bdf41 AM |
23 | /* |
24 | * Documentation used while implementing this component: | |
25 | * | |
26 | * [1] "MIPS® Architecture Base: nanoMIPS32(tm) Instruction Set Technical | |
27 | * Reference Manual", Revision 01.01, April 27, 2018 | |
28 | */ | |
29 | ||
89a955e8 | 30 | #include "qemu/osdep.h" |
3979fca4 | 31 | #include "disas/dis-asm.h" |
89a955e8 | 32 | |
7def8a4b | 33 | #include <string.h> |
89a955e8 AM |
34 | #include <stdio.h> |
35 | #include <stdarg.h> | |
36 | ||
f1cb3bdb ML |
37 | typedef int64_t int64; |
38 | typedef uint64_t uint64; | |
39 | typedef uint32_t uint32; | |
40 | typedef uint16_t uint16; | |
41 | typedef uint64_t img_address; | |
42 | ||
e8ba8ef8 | 43 | typedef enum { |
f1cb3bdb ML |
44 | instruction, |
45 | call_instruction, | |
46 | branch_instruction, | |
47 | return_instruction, | |
48 | reserved_block, | |
49 | pool, | |
e8ba8ef8 | 50 | } TABLE_ENTRY_TYPE; |
f1cb3bdb | 51 | |
e8ba8ef8 | 52 | typedef enum { |
f1cb3bdb ML |
53 | MIPS64_ = 0x00000001, |
54 | XNP_ = 0x00000002, | |
55 | XMMS_ = 0x00000004, | |
56 | EVA_ = 0x00000008, | |
57 | DSP_ = 0x00000010, | |
58 | MT_ = 0x00000020, | |
59 | EJTAG_ = 0x00000040, | |
60 | TLBINV_ = 0x00000080, | |
61 | CP0_ = 0x00000100, | |
62 | CP1_ = 0x00000200, | |
63 | CP2_ = 0x00000400, | |
64 | UDI_ = 0x00000800, | |
65 | MCU_ = 0x00001000, | |
66 | VZ_ = 0x00002000, | |
67 | TLB_ = 0x00004000, | |
68 | MVH_ = 0x00008000, | |
69 | ALL_ATTRIBUTES = 0xffffffffull, | |
e8ba8ef8 | 70 | } TABLE_ATTRIBUTE_TYPE; |
f1cb3bdb ML |
71 | |
72 | typedef struct Dis_info { | |
73 | img_address m_pc; | |
3f2aec07 ML |
74 | fprintf_function fprintf_func; |
75 | FILE *stream; | |
76 | sigjmp_buf buf; | |
f1cb3bdb ML |
77 | } Dis_info; |
78 | ||
79 | typedef bool (*conditional_function)(uint64 instruction); | |
7def8a4b | 80 | typedef char * (*disassembly_function)(uint64 instruction, |
f1cb3bdb ML |
81 | Dis_info *info); |
82 | ||
83 | typedef struct Pool { | |
84 | TABLE_ENTRY_TYPE type; | |
85 | const struct Pool *next_table; | |
86 | int next_table_size; | |
87 | int instructions_size; | |
88 | uint64 mask; | |
89 | uint64 value; | |
90 | disassembly_function disassembly; | |
91 | conditional_function condition; | |
92 | uint64 attributes; | |
93 | } Pool; | |
89a955e8 AM |
94 | |
95 | #define IMGASSERTONCE(test) | |
96 | ||
97 | ||
7def8a4b | 98 | static char *img_format(const char *format, ...) |
89a955e8 | 99 | { |
7def8a4b | 100 | char *buffer; |
c5231692 ML |
101 | va_list args; |
102 | va_start(args, format); | |
7def8a4b | 103 | buffer = g_strdup_vprintf(format, args); |
c5231692 ML |
104 | va_end(args); |
105 | return buffer; | |
106 | } | |
89a955e8 | 107 | |
89a955e8 | 108 | |
7def8a4b | 109 | static char *to_string(img_address a) |
c5231692 | 110 | { |
7def8a4b | 111 | return g_strdup_printf("0x%" PRIx64, a); |
89a955e8 AM |
112 | } |
113 | ||
114 | ||
2dc0c175 | 115 | static uint64 extract_bits(uint64 data, uint32 bit_offset, uint32 bit_size) |
89a955e8 AM |
116 | { |
117 | return (data << (64 - (bit_size + bit_offset))) >> (64 - bit_size); | |
118 | } | |
119 | ||
120 | ||
2dc0c175 | 121 | static int64 sign_extend(int64 data, int msb) |
89a955e8 AM |
122 | { |
123 | uint64 shift = 63 - msb; | |
124 | return (data << shift) >> shift; | |
125 | } | |
126 | ||
127 | ||
2dc0c175 | 128 | static uint64 renumber_registers(uint64 index, uint64 *register_list, |
3f2aec07 | 129 | size_t register_list_size, Dis_info *info) |
89a955e8 AM |
130 | { |
131 | if (index < register_list_size) { | |
132 | return register_list[index]; | |
133 | } | |
134 | ||
39399c38 ML |
135 | info->fprintf_func(info->stream, "Invalid register mapping index %" PRIu64 |
136 | ", size of list = %zu", index, register_list_size); | |
137 | siglongjmp(info->buf, 1); | |
89a955e8 AM |
138 | } |
139 | ||
140 | ||
eabf76a0 | 141 | /* |
2dc0c175 | 142 | * decode_gpr_gpr4() - decoder for 'gpr4' gpr encoding type |
eabf76a0 AM |
143 | * |
144 | * Map a 4-bit code to the 5-bit register space according to this pattern: | |
145 | * | |
146 | * 1 0 | |
147 | * 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 | |
148 | * | | | | | | | | | | | | | | | | | |
149 | * | | | | | | | | | | | | | | | | | |
150 | * | | | | | | | | | | | └---------------┐ | |
151 | * | | | | | | | | | | └---------------┐ | | |
152 | * | | | | | | | | | └---------------┐ | | | |
153 | * | | | | | | | | └---------------┐ | | | | |
154 | * | | | | | | | | | | | | | | | | | |
155 | * | | | | | | | | | | | | | | | | | |
156 | * 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 | |
157 | * 3 2 1 0 | |
158 | * | |
159 | * Used in handling following instructions: | |
160 | * | |
161 | * - ADDU[4X4] | |
162 | * - LW[4X4] | |
163 | * - MOVEP[REV] | |
164 | * - MUL[4X4] | |
165 | * - SW[4X4] | |
166 | */ | |
3f2aec07 | 167 | static uint64 decode_gpr_gpr4(uint64 d, Dis_info *info) |
eabf76a0 AM |
168 | { |
169 | static uint64 register_list[] = { 8, 9, 10, 11, 4, 5, 6, 7, | |
170 | 16, 17, 18, 19, 20, 21, 22, 23 }; | |
171 | return renumber_registers(d, register_list, | |
3f2aec07 | 172 | sizeof(register_list) / sizeof(register_list[0]), info); |
eabf76a0 AM |
173 | } |
174 | ||
175 | ||
176 | /* | |
2dc0c175 | 177 | * decode_gpr_gpr4_zero() - decoder for 'gpr4.zero' gpr encoding type |
eabf76a0 AM |
178 | * |
179 | * Map a 4-bit code to the 5-bit register space according to this pattern: | |
180 | * | |
181 | * 1 0 | |
182 | * 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 | |
183 | * | | | | | | | | | | | | | | | | | |
184 | * | | | | | | | | | | | | └---------------------┐ | |
185 | * | | | | | | | | | | | └---------------┐ | | |
186 | * | | | | | | | | | | └---------------┐ | | | |
187 | * | | | | | | | | | └---------------┐ | | | | |
188 | * | | | | | | | | └---------------┐ | | | | | |
189 | * | | | | | | | | | | | | | | | | | |
190 | * | | | | | | | | | | | | | | | | | |
191 | * 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 | |
192 | * 3 2 1 0 | |
193 | * | |
194 | * This pattern is the same one used for 'gpr4' gpr encoding type, except for | |
195 | * the input value 3, that is mapped to the output value 0 instead of 11. | |
196 | * | |
197 | * Used in handling following instructions: | |
198 | * | |
199 | * - MOVE.BALC | |
200 | * - MOVEP | |
201 | * - SW[4X4] | |
202 | */ | |
3f2aec07 | 203 | static uint64 decode_gpr_gpr4_zero(uint64 d, Dis_info *info) |
eabf76a0 AM |
204 | { |
205 | static uint64 register_list[] = { 8, 9, 10, 0, 4, 5, 6, 7, | |
206 | 16, 17, 18, 19, 20, 21, 22, 23 }; | |
207 | return renumber_registers(d, register_list, | |
3f2aec07 | 208 | sizeof(register_list) / sizeof(register_list[0]), info); |
eabf76a0 AM |
209 | } |
210 | ||
211 | ||
89a955e8 | 212 | /* |
2dc0c175 | 213 | * decode_gpr_gpr3() - decoder for 'gpr3' gpr encoding type |
01fc2557 AM |
214 | * |
215 | * Map a 3-bit code to the 5-bit register space according to this pattern: | |
216 | * | |
217 | * 7 6 5 4 3 2 1 0 | |
218 | * | | | | | | | | | |
219 | * | | | | | | | | | |
220 | * | | | └-----------------------┐ | |
221 | * | | └-----------------------┐ | | |
222 | * | └-----------------------┐ | | | |
223 | * └-----------------------┐ | | | | |
224 | * | | | | | | | | | |
225 | * ┌-------┘ | | | | | | | | |
226 | * | ┌-------┘ | | | | | | | |
227 | * | | ┌-------┘ | | | | | | |
228 | * | | | ┌-------┘ | | | | | |
229 | * | | | | | | | | | |
230 | * 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 | |
231 | * 3 2 1 0 | |
232 | * | |
233 | * Used in handling following instructions: | |
234 | * | |
235 | * - ADDIU[R1.SP] | |
236 | * - ADDIU[R2] | |
237 | * - ADDU[16] | |
238 | * - AND[16] | |
239 | * - ANDI[16] | |
240 | * - BEQC[16] | |
241 | * - BEQZC[16] | |
242 | * - BNEC[16] | |
243 | * - BNEZC[16] | |
244 | * - LB[16] | |
245 | * - LBU[16] | |
246 | * - LH[16] | |
247 | * - LHU[16] | |
248 | * - LI[16] | |
249 | * - LW[16] | |
250 | * - LW[GP16] | |
251 | * - LWXS[16] | |
252 | * - NOT[16] | |
253 | * - OR[16] | |
254 | * - SB[16] | |
255 | * - SH[16] | |
256 | * - SLL[16] | |
257 | * - SRL[16] | |
258 | * - SUBU[16] | |
259 | * - SW[16] | |
260 | * - XOR[16] | |
89a955e8 | 261 | */ |
3f2aec07 | 262 | static uint64 decode_gpr_gpr3(uint64 d, Dis_info *info) |
89a955e8 AM |
263 | { |
264 | static uint64 register_list[] = { 16, 17, 18, 19, 4, 5, 6, 7 }; | |
265 | return renumber_registers(d, register_list, | |
3f2aec07 | 266 | sizeof(register_list) / sizeof(register_list[0]), info); |
89a955e8 AM |
267 | } |
268 | ||
269 | ||
6ab8abfc | 270 | /* |
2dc0c175 | 271 | * decode_gpr_gpr3_src_store() - decoder for 'gpr3.src.store' gpr encoding |
6ab8abfc AM |
272 | * type |
273 | * | |
274 | * Map a 3-bit code to the 5-bit register space according to this pattern: | |
275 | * | |
276 | * 7 6 5 4 3 2 1 0 | |
277 | * | | | | | | | | | |
278 | * | | | | | | | └-----------------------┐ | |
279 | * | | | └-----------------------┐ | | |
280 | * | | └-----------------------┐ | | | |
281 | * | └-----------------------┐ | | | | |
282 | * └-----------------------┐ | | | | | |
283 | * | | | | | | | | | |
284 | * ┌-------┘ | | | | | | | | |
285 | * | ┌-------┘ | | | | | | | |
286 | * | | ┌-------┘ | | | | | | |
287 | * | | | | | | | | | |
288 | * | | | | | | | | | |
289 | * 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 | |
290 | * 3 2 1 0 | |
291 | * | |
292 | * This pattern is the same one used for 'gpr3' gpr encoding type, except for | |
293 | * the input value 0, that is mapped to the output value 0 instead of 16. | |
294 | * | |
295 | * Used in handling following instructions: | |
296 | * | |
297 | * - SB[16] | |
298 | * - SH[16] | |
299 | * - SW[16] | |
300 | * - SW[GP16] | |
301 | */ | |
3f2aec07 | 302 | static uint64 decode_gpr_gpr3_src_store(uint64 d, Dis_info *info) |
89a955e8 AM |
303 | { |
304 | static uint64 register_list[] = { 0, 17, 18, 19, 4, 5, 6, 7 }; | |
305 | return renumber_registers(d, register_list, | |
3f2aec07 | 306 | sizeof(register_list) / sizeof(register_list[0]), info); |
89a955e8 AM |
307 | } |
308 | ||
309 | ||
8e2919f6 | 310 | /* |
2dc0c175 | 311 | * decode_gpr_gpr2_reg1() - decoder for 'gpr2.reg1' gpr encoding type |
8e2919f6 AM |
312 | * |
313 | * Map a 2-bit code to the 5-bit register space according to this pattern: | |
314 | * | |
315 | * 3 2 1 0 | |
316 | * | | | | | |
317 | * | | | | | |
318 | * | | | └-------------------┐ | |
319 | * | | └-------------------┐ | | |
320 | * | └-------------------┐ | | | |
321 | * └-------------------┐ | | | | |
322 | * | | | | | |
323 | * | | | | | |
324 | * 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 | |
325 | * 3 2 1 0 | |
326 | * | |
327 | * Used in handling following instructions: | |
328 | * | |
329 | * - MOVEP | |
330 | * - MOVEP[REV] | |
331 | */ | |
3f2aec07 | 332 | static uint64 decode_gpr_gpr2_reg1(uint64 d, Dis_info *info) |
89a955e8 AM |
333 | { |
334 | static uint64 register_list[] = { 4, 5, 6, 7 }; | |
335 | return renumber_registers(d, register_list, | |
3f2aec07 | 336 | sizeof(register_list) / sizeof(register_list[0]), info); |
89a955e8 AM |
337 | } |
338 | ||
339 | ||
a21e0520 | 340 | /* |
2dc0c175 | 341 | * decode_gpr_gpr2_reg2() - decoder for 'gpr2.reg2' gpr encoding type |
a21e0520 AM |
342 | * |
343 | * Map a 2-bit code to the 5-bit register space according to this pattern: | |
344 | * | |
345 | * 3 2 1 0 | |
346 | * | | | | | |
347 | * | | | | | |
348 | * | | | └-----------------┐ | |
349 | * | | └-----------------┐ | | |
350 | * | └-----------------┐ | | | |
351 | * └-----------------┐ | | | | |
352 | * | | | | | |
353 | * | | | | | |
354 | * 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 | |
355 | * 3 2 1 0 | |
356 | * | |
357 | * Used in handling following instructions: | |
358 | * | |
359 | * - MOVEP | |
360 | * - MOVEP[REV] | |
361 | */ | |
3f2aec07 | 362 | static uint64 decode_gpr_gpr2_reg2(uint64 d, Dis_info *info) |
89a955e8 AM |
363 | { |
364 | static uint64 register_list[] = { 5, 6, 7, 8 }; | |
365 | return renumber_registers(d, register_list, | |
3f2aec07 | 366 | sizeof(register_list) / sizeof(register_list[0]), info); |
89a955e8 AM |
367 | } |
368 | ||
369 | ||
eabf76a0 | 370 | /* |
2dc0c175 | 371 | * decode_gpr_gpr1() - decoder for 'gpr1' gpr encoding type |
eabf76a0 AM |
372 | * |
373 | * Map a 1-bit code to the 5-bit register space according to this pattern: | |
374 | * | |
375 | * 1 0 | |
376 | * | | | |
377 | * | | | |
378 | * | └---------------------┐ | |
379 | * └---------------------┐ | | |
380 | * | | | |
381 | * | | | |
382 | * | | | |
383 | * | | | |
384 | * 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 | |
385 | * 3 2 1 0 | |
386 | * | |
387 | * Used in handling following instruction: | |
388 | * | |
389 | * - MOVE.BALC | |
390 | */ | |
3f2aec07 | 391 | static uint64 decode_gpr_gpr1(uint64 d, Dis_info *info) |
eabf76a0 AM |
392 | { |
393 | static uint64 register_list[] = { 4, 5 }; | |
394 | return renumber_registers(d, register_list, | |
3f2aec07 | 395 | sizeof(register_list) / sizeof(register_list[0]), info); |
eabf76a0 AM |
396 | } |
397 | ||
398 | ||
2dc0c175 | 399 | static int64 neg_copy(uint64 d) |
89a955e8 AM |
400 | { |
401 | return 0ll - d; | |
402 | } | |
403 | ||
404 | ||
2dc0c175 | 405 | static uint64 encode_count3_from_count(uint64 d) |
89a955e8 AM |
406 | { |
407 | IMGASSERTONCE(d < 8); | |
408 | return d == 0ull ? 8ull : d; | |
409 | } | |
410 | ||
411 | ||
2dc0c175 | 412 | static uint64 encode_shift3_from_shift(uint64 d) |
89a955e8 AM |
413 | { |
414 | IMGASSERTONCE(d < 8); | |
415 | return d == 0ull ? 8ull : d; | |
416 | } | |
417 | ||
418 | ||
419 | /* special value for load literal */ | |
2dc0c175 | 420 | static int64 encode_eu_from_s_li16(uint64 d) |
89a955e8 AM |
421 | { |
422 | IMGASSERTONCE(d < 128); | |
423 | return d == 127 ? -1 : (int64)d; | |
424 | } | |
425 | ||
426 | ||
2dc0c175 | 427 | static uint64 encode_msbd_from_size(uint64 d) |
89a955e8 AM |
428 | { |
429 | IMGASSERTONCE(d < 32); | |
430 | return d + 1; | |
431 | } | |
432 | ||
433 | ||
2dc0c175 | 434 | static uint64 encode_eu_from_u_andi16(uint64 d) |
89a955e8 AM |
435 | { |
436 | IMGASSERTONCE(d < 16); | |
437 | if (d == 12) { | |
438 | return 0x00ffull; | |
439 | } | |
440 | if (d == 13) { | |
441 | return 0xffffull; | |
442 | } | |
443 | return d; | |
444 | } | |
445 | ||
446 | ||
89a955e8 | 447 | /* save16 / restore16 ???? */ |
2dc0c175 | 448 | static uint64 encode_rt1_from_rt(uint64 d) |
89a955e8 AM |
449 | { |
450 | return d ? 31 : 30; | |
451 | } | |
452 | ||
453 | ||
3f2aec07 | 454 | static const char *GPR(uint64 reg, Dis_info *info) |
89a955e8 AM |
455 | { |
456 | static const char *gpr_reg[32] = { | |
457 | "zero", "at", "v0", "v1", "a0", "a1", "a2", "a3", | |
458 | "a4", "a5", "a6", "a7", "r12", "r13", "r14", "r15", | |
459 | "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", | |
460 | "r24", "r25", "k0", "k1", "gp", "sp", "fp", "ra" | |
461 | }; | |
462 | ||
463 | if (reg < 32) { | |
464 | return gpr_reg[reg]; | |
465 | } | |
466 | ||
39399c38 ML |
467 | info->fprintf_func(info->stream, "Invalid GPR register index %" PRIu64, |
468 | reg); | |
469 | siglongjmp(info->buf, 1); | |
89a955e8 AM |
470 | } |
471 | ||
472 | ||
3f2aec07 ML |
473 | static char *save_restore_list(uint64 rt, uint64 count, uint64 gp, |
474 | Dis_info *info) | |
2dc0c175 | 475 | { |
7def8a4b ML |
476 | char *reg_list[34]; |
477 | reg_list[0] = (char *)""; | |
2dc0c175 | 478 | |
7def8a4b | 479 | assert(count <= 32); |
2dc0c175 ML |
480 | for (uint64 counter = 0; counter != count; counter++) { |
481 | bool use_gp = gp && (counter == count - 1); | |
482 | uint64 this_rt = use_gp ? 28 : ((rt & 0x10) | (rt + counter)) & 0x1f; | |
7def8a4b | 483 | /* glib usage below requires casting away const */ |
3f2aec07 | 484 | reg_list[counter + 1] = (char *)GPR(this_rt, info); |
2dc0c175 | 485 | } |
7def8a4b | 486 | reg_list[count + 1] = NULL; |
2dc0c175 | 487 | |
7def8a4b | 488 | return g_strjoinv(",", reg_list); |
2dc0c175 ML |
489 | } |
490 | ||
491 | ||
3f2aec07 | 492 | static const char *FPR(uint64 reg, Dis_info *info) |
89a955e8 AM |
493 | { |
494 | static const char *fpr_reg[32] = { | |
495 | "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7", | |
496 | "f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15", | |
497 | "f16", "f17", "f18", "f19", "f20", "f21", "f22", "f23", | |
498 | "f24", "f25", "f26", "f27", "f28", "f29", "f30", "f31" | |
499 | }; | |
500 | ||
501 | if (reg < 32) { | |
502 | return fpr_reg[reg]; | |
503 | } | |
504 | ||
39399c38 ML |
505 | info->fprintf_func(info->stream, "Invalid FPR register index %" PRIu64, |
506 | reg); | |
507 | siglongjmp(info->buf, 1); | |
89a955e8 AM |
508 | } |
509 | ||
510 | ||
3f2aec07 | 511 | static const char *AC(uint64 reg, Dis_info *info) |
89a955e8 AM |
512 | { |
513 | static const char *ac_reg[4] = { | |
514 | "ac0", "ac1", "ac2", "ac3" | |
515 | }; | |
516 | ||
517 | if (reg < 4) { | |
518 | return ac_reg[reg]; | |
519 | } | |
520 | ||
39399c38 ML |
521 | info->fprintf_func(info->stream, "Invalid AC register index %" PRIu64, |
522 | reg); | |
523 | siglongjmp(info->buf, 1); | |
89a955e8 AM |
524 | } |
525 | ||
526 | ||
7def8a4b | 527 | static char *ADDRESS(uint64 value, int instruction_size, Dis_info *info) |
89a955e8 AM |
528 | { |
529 | /* token for string replace */ | |
9972c8fa | 530 | img_address address = info->m_pc + value + instruction_size; |
89a955e8 | 531 | /* symbol replacement */ |
89a955e8 AM |
532 | return to_string(address); |
533 | } | |
534 | ||
535 | ||
beebf65b | 536 | static uint64 extract_op_code_value(const uint16 *data, int size) |
89a955e8 AM |
537 | { |
538 | switch (size) { | |
539 | case 16: | |
540 | return data[0]; | |
541 | case 32: | |
542 | return ((uint64)data[0] << 16) | data[1]; | |
543 | case 48: | |
544 | return ((uint64)data[0] << 32) | ((uint64)data[1] << 16) | data[2]; | |
545 | default: | |
546 | return data[0]; | |
547 | } | |
548 | } | |
549 | ||
550 | ||
89a955e8 AM |
551 | /* |
552 | * Recurse through tables until the instruction is found then return | |
553 | * the string and size | |
554 | * | |
555 | * inputs: | |
556 | * pointer to a word stream, | |
557 | * disassember table and size | |
558 | * returns: | |
559 | * instruction size - negative is error | |
560 | * disassembly string - on error will constain error string | |
561 | */ | |
7def8a4b | 562 | static int Disassemble(const uint16 *data, char **dis, |
a0fee129 | 563 | TABLE_ENTRY_TYPE *type, const Pool *table, |
9972c8fa | 564 | int table_size, Dis_info *info) |
89a955e8 | 565 | { |
39399c38 ML |
566 | for (int i = 0; i < table_size; i++) { |
567 | uint64 op_code = extract_op_code_value(data, | |
568 | table[i].instructions_size); | |
569 | if ((op_code & table[i].mask) == table[i].value) { | |
570 | /* possible match */ | |
571 | conditional_function cond = table[i].condition; | |
572 | if ((cond == NULL) || cond(op_code)) { | |
573 | if (table[i].type == pool) { | |
574 | return Disassemble(data, dis, type, | |
575 | table[i].next_table, | |
576 | table[i].next_table_size, | |
577 | info); | |
578 | } else if ((table[i].type == instruction) || | |
579 | (table[i].type == call_instruction) || | |
580 | (table[i].type == branch_instruction) || | |
581 | (table[i].type == return_instruction)) { | |
582 | disassembly_function dis_fn = table[i].disassembly; | |
583 | if (dis_fn == 0) { | |
584 | *dis = g_strdup( | |
585 | "disassembler failure - bad table entry"); | |
586 | return -6; | |
89a955e8 | 587 | } |
a0fee129 | 588 | *type = table[i].type; |
39399c38 ML |
589 | *dis = dis_fn(op_code, info); |
590 | return table[i].instructions_size; | |
591 | } else { | |
592 | *dis = g_strdup("reserved instruction"); | |
593 | return -2; | |
89a955e8 AM |
594 | } |
595 | } | |
596 | } | |
597 | } | |
7def8a4b | 598 | *dis = g_strdup("failed to disassemble"); |
89a955e8 AM |
599 | return -1; /* failed to disassemble */ |
600 | } | |
601 | ||
602 | ||
2dc0c175 | 603 | static uint64 extract_code_18_to_0(uint64 instruction) |
89a955e8 AM |
604 | { |
605 | uint64 value = 0; | |
606 | value |= extract_bits(instruction, 0, 19); | |
607 | return value; | |
608 | } | |
609 | ||
610 | ||
2dc0c175 | 611 | static uint64 extract_shift3_2_1_0(uint64 instruction) |
89a955e8 AM |
612 | { |
613 | uint64 value = 0; | |
614 | value |= extract_bits(instruction, 0, 3); | |
615 | return value; | |
616 | } | |
617 | ||
618 | ||
2dc0c175 | 619 | static uint64 extract_u_11_10_9_8_7_6_5_4_3__s3(uint64 instruction) |
89a955e8 AM |
620 | { |
621 | uint64 value = 0; | |
622 | value |= extract_bits(instruction, 3, 9) << 3; | |
623 | return value; | |
624 | } | |
625 | ||
626 | ||
2dc0c175 | 627 | static uint64 extract_count_3_2_1_0(uint64 instruction) |
89a955e8 AM |
628 | { |
629 | uint64 value = 0; | |
630 | value |= extract_bits(instruction, 0, 4); | |
631 | return value; | |
632 | } | |
633 | ||
634 | ||
2dc0c175 | 635 | static uint64 extract_rtz3_9_8_7(uint64 instruction) |
89a955e8 AM |
636 | { |
637 | uint64 value = 0; | |
638 | value |= extract_bits(instruction, 7, 3); | |
639 | return value; | |
640 | } | |
641 | ||
642 | ||
2dc0c175 | 643 | static uint64 extract_u_17_to_1__s1(uint64 instruction) |
89a955e8 AM |
644 | { |
645 | uint64 value = 0; | |
646 | value |= extract_bits(instruction, 1, 17) << 1; | |
647 | return value; | |
648 | } | |
649 | ||
650 | ||
2dc0c175 | 651 | static int64 extract_s__se9_20_19_18_17_16_15_14_13_12_11(uint64 instruction) |
89a955e8 AM |
652 | { |
653 | int64 value = 0; | |
654 | value |= extract_bits(instruction, 11, 10); | |
655 | value = sign_extend(value, 9); | |
656 | return value; | |
657 | } | |
658 | ||
659 | ||
2dc0c175 | 660 | static int64 extract_s__se11_0_10_9_8_7_6_5_4_3_2_1_0_s1(uint64 instruction) |
89a955e8 AM |
661 | { |
662 | int64 value = 0; | |
663 | value |= extract_bits(instruction, 0, 1) << 11; | |
664 | value |= extract_bits(instruction, 1, 10) << 1; | |
665 | value = sign_extend(value, 11); | |
666 | return value; | |
667 | } | |
668 | ||
669 | ||
2dc0c175 | 670 | static uint64 extract_u_10(uint64 instruction) |
89a955e8 AM |
671 | { |
672 | uint64 value = 0; | |
673 | value |= extract_bits(instruction, 10, 1); | |
674 | return value; | |
675 | } | |
676 | ||
677 | ||
2dc0c175 | 678 | static uint64 extract_rtz4_27_26_25_23_22_21(uint64 instruction) |
89a955e8 AM |
679 | { |
680 | uint64 value = 0; | |
681 | value |= extract_bits(instruction, 21, 3); | |
682 | value |= extract_bits(instruction, 25, 1) << 3; | |
683 | return value; | |
684 | } | |
685 | ||
686 | ||
2dc0c175 | 687 | static uint64 extract_sa_15_14_13_12_11(uint64 instruction) |
89a955e8 AM |
688 | { |
689 | uint64 value = 0; | |
690 | value |= extract_bits(instruction, 11, 5); | |
691 | return value; | |
692 | } | |
693 | ||
694 | ||
2dc0c175 | 695 | static uint64 extract_shift_4_3_2_1_0(uint64 instruction) |
89a955e8 AM |
696 | { |
697 | uint64 value = 0; | |
698 | value |= extract_bits(instruction, 0, 5); | |
699 | return value; | |
700 | } | |
701 | ||
702 | ||
2dc0c175 | 703 | static uint64 extract_shiftx_10_9_8_7__s1(uint64 instruction) |
89a955e8 AM |
704 | { |
705 | uint64 value = 0; | |
706 | value |= extract_bits(instruction, 7, 4) << 1; | |
707 | return value; | |
708 | } | |
709 | ||
710 | ||
2dc0c175 | 711 | static uint64 extract_hint_25_24_23_22_21(uint64 instruction) |
89a955e8 AM |
712 | { |
713 | uint64 value = 0; | |
714 | value |= extract_bits(instruction, 21, 5); | |
715 | return value; | |
716 | } | |
717 | ||
718 | ||
2dc0c175 | 719 | static uint64 extract_count3_14_13_12(uint64 instruction) |
89a955e8 AM |
720 | { |
721 | uint64 value = 0; | |
722 | value |= extract_bits(instruction, 12, 3); | |
723 | return value; | |
724 | } | |
725 | ||
726 | ||
2dc0c175 | 727 | static int64 extract_s__se31_0_11_to_2_20_to_12_s12(uint64 instruction) |
89a955e8 AM |
728 | { |
729 | int64 value = 0; | |
730 | value |= extract_bits(instruction, 0, 1) << 31; | |
731 | value |= extract_bits(instruction, 2, 10) << 21; | |
732 | value |= extract_bits(instruction, 12, 9) << 12; | |
733 | value = sign_extend(value, 31); | |
734 | return value; | |
735 | } | |
736 | ||
737 | ||
2dc0c175 | 738 | static int64 extract_s__se7_0_6_5_4_3_2_1_s1(uint64 instruction) |
89a955e8 AM |
739 | { |
740 | int64 value = 0; | |
741 | value |= extract_bits(instruction, 0, 1) << 7; | |
742 | value |= extract_bits(instruction, 1, 6) << 1; | |
743 | value = sign_extend(value, 7); | |
744 | return value; | |
745 | } | |
746 | ||
747 | ||
2dc0c175 | 748 | static uint64 extract_u2_10_9(uint64 instruction) |
89a955e8 AM |
749 | { |
750 | uint64 value = 0; | |
751 | value |= extract_bits(instruction, 9, 2); | |
752 | return value; | |
753 | } | |
754 | ||
755 | ||
2dc0c175 | 756 | static uint64 extract_code_25_24_23_22_21_20_19_18_17_16(uint64 instruction) |
89a955e8 AM |
757 | { |
758 | uint64 value = 0; | |
759 | value |= extract_bits(instruction, 16, 10); | |
760 | return value; | |
761 | } | |
762 | ||
763 | ||
2dc0c175 | 764 | static uint64 extract_rs_20_19_18_17_16(uint64 instruction) |
89a955e8 AM |
765 | { |
766 | uint64 value = 0; | |
767 | value |= extract_bits(instruction, 16, 5); | |
768 | return value; | |
769 | } | |
770 | ||
771 | ||
2dc0c175 | 772 | static uint64 extract_u_2_1__s1(uint64 instruction) |
89a955e8 AM |
773 | { |
774 | uint64 value = 0; | |
775 | value |= extract_bits(instruction, 1, 2) << 1; | |
776 | return value; | |
777 | } | |
778 | ||
779 | ||
2dc0c175 | 780 | static uint64 extract_stripe_6(uint64 instruction) |
89a955e8 AM |
781 | { |
782 | uint64 value = 0; | |
783 | value |= extract_bits(instruction, 6, 1); | |
784 | return value; | |
785 | } | |
786 | ||
787 | ||
2dc0c175 | 788 | static uint64 extract_ac_15_14(uint64 instruction) |
89a955e8 AM |
789 | { |
790 | uint64 value = 0; | |
791 | value |= extract_bits(instruction, 14, 2); | |
792 | return value; | |
793 | } | |
794 | ||
795 | ||
2dc0c175 | 796 | static uint64 extract_shift_20_19_18_17_16(uint64 instruction) |
89a955e8 AM |
797 | { |
798 | uint64 value = 0; | |
799 | value |= extract_bits(instruction, 16, 5); | |
800 | return value; | |
801 | } | |
802 | ||
803 | ||
2dc0c175 | 804 | static uint64 extract_rdl_25_24(uint64 instruction) |
89a955e8 AM |
805 | { |
806 | uint64 value = 0; | |
807 | value |= extract_bits(instruction, 24, 1); | |
808 | return value; | |
809 | } | |
810 | ||
811 | ||
2dc0c175 | 812 | static int64 extract_s__se10_0_9_8_7_6_5_4_3_2_1_s1(uint64 instruction) |
89a955e8 AM |
813 | { |
814 | int64 value = 0; | |
815 | value |= extract_bits(instruction, 0, 1) << 10; | |
816 | value |= extract_bits(instruction, 1, 9) << 1; | |
817 | value = sign_extend(value, 10); | |
818 | return value; | |
819 | } | |
820 | ||
821 | ||
2dc0c175 | 822 | static uint64 extract_eu_6_5_4_3_2_1_0(uint64 instruction) |
89a955e8 AM |
823 | { |
824 | uint64 value = 0; | |
825 | value |= extract_bits(instruction, 0, 7); | |
826 | return value; | |
827 | } | |
828 | ||
829 | ||
2dc0c175 | 830 | static uint64 extract_shift_5_4_3_2_1_0(uint64 instruction) |
89a955e8 AM |
831 | { |
832 | uint64 value = 0; | |
833 | value |= extract_bits(instruction, 0, 6); | |
834 | return value; | |
835 | } | |
836 | ||
837 | ||
2dc0c175 | 838 | static uint64 extract_count_19_18_17_16(uint64 instruction) |
89a955e8 AM |
839 | { |
840 | uint64 value = 0; | |
841 | value |= extract_bits(instruction, 16, 4); | |
842 | return value; | |
843 | } | |
844 | ||
845 | ||
2dc0c175 | 846 | static uint64 extract_code_2_1_0(uint64 instruction) |
89a955e8 AM |
847 | { |
848 | uint64 value = 0; | |
849 | value |= extract_bits(instruction, 0, 3); | |
850 | return value; | |
851 | } | |
852 | ||
853 | ||
2dc0c175 | 854 | static uint64 extract_u_11_10_9_8_7_6_5_4_3_2_1_0(uint64 instruction) |
89a955e8 AM |
855 | { |
856 | uint64 value = 0; | |
857 | value |= extract_bits(instruction, 0, 12); | |
858 | return value; | |
859 | } | |
860 | ||
861 | ||
2dc0c175 | 862 | static uint64 extract_rs_4_3_2_1_0(uint64 instruction) |
89a955e8 AM |
863 | { |
864 | uint64 value = 0; | |
865 | value |= extract_bits(instruction, 0, 5); | |
866 | return value; | |
867 | } | |
868 | ||
869 | ||
2dc0c175 | 870 | static uint64 extract_u_20_to_3__s3(uint64 instruction) |
89a955e8 AM |
871 | { |
872 | uint64 value = 0; | |
873 | value |= extract_bits(instruction, 3, 18) << 3; | |
874 | return value; | |
875 | } | |
876 | ||
877 | ||
2dc0c175 | 878 | static uint64 extract_u_3_2_1_0__s2(uint64 instruction) |
89a955e8 AM |
879 | { |
880 | uint64 value = 0; | |
881 | value |= extract_bits(instruction, 0, 4) << 2; | |
882 | return value; | |
883 | } | |
884 | ||
885 | ||
2dc0c175 | 886 | static uint64 extract_cofun_25_24_23(uint64 instruction) |
89a955e8 AM |
887 | { |
888 | uint64 value = 0; | |
889 | value |= extract_bits(instruction, 3, 23); | |
890 | return value; | |
891 | } | |
892 | ||
893 | ||
2dc0c175 | 894 | static uint64 extract_u_2_1_0__s2(uint64 instruction) |
89a955e8 AM |
895 | { |
896 | uint64 value = 0; | |
897 | value |= extract_bits(instruction, 0, 3) << 2; | |
898 | return value; | |
899 | } | |
900 | ||
901 | ||
2dc0c175 | 902 | static uint64 extract_rd3_3_2_1(uint64 instruction) |
89a955e8 AM |
903 | { |
904 | uint64 value = 0; | |
905 | value |= extract_bits(instruction, 1, 3); | |
906 | return value; | |
907 | } | |
908 | ||
909 | ||
2dc0c175 | 910 | static uint64 extract_sa_15_14_13_12(uint64 instruction) |
89a955e8 AM |
911 | { |
912 | uint64 value = 0; | |
913 | value |= extract_bits(instruction, 12, 4); | |
914 | return value; | |
915 | } | |
916 | ||
917 | ||
2dc0c175 | 918 | static uint64 extract_rt_25_24_23_22_21(uint64 instruction) |
89a955e8 AM |
919 | { |
920 | uint64 value = 0; | |
921 | value |= extract_bits(instruction, 21, 5); | |
922 | return value; | |
923 | } | |
924 | ||
925 | ||
2dc0c175 | 926 | static uint64 extract_ru_7_6_5_4_3(uint64 instruction) |
89a955e8 AM |
927 | { |
928 | uint64 value = 0; | |
929 | value |= extract_bits(instruction, 3, 5); | |
930 | return value; | |
931 | } | |
932 | ||
933 | ||
2dc0c175 | 934 | static uint64 extract_u_17_to_0(uint64 instruction) |
89a955e8 AM |
935 | { |
936 | uint64 value = 0; | |
937 | value |= extract_bits(instruction, 0, 18); | |
938 | return value; | |
939 | } | |
940 | ||
941 | ||
2dc0c175 | 942 | static uint64 extract_rsz4_4_2_1_0(uint64 instruction) |
89a955e8 AM |
943 | { |
944 | uint64 value = 0; | |
945 | value |= extract_bits(instruction, 0, 3); | |
946 | value |= extract_bits(instruction, 4, 1) << 3; | |
947 | return value; | |
948 | } | |
949 | ||
950 | ||
2dc0c175 | 951 | static int64 extract_s__se21_0_20_to_1_s1(uint64 instruction) |
89a955e8 AM |
952 | { |
953 | int64 value = 0; | |
954 | value |= extract_bits(instruction, 0, 1) << 21; | |
955 | value |= extract_bits(instruction, 1, 20) << 1; | |
956 | value = sign_extend(value, 21); | |
957 | return value; | |
958 | } | |
959 | ||
960 | ||
2dc0c175 | 961 | static uint64 extract_op_25_to_3(uint64 instruction) |
89a955e8 AM |
962 | { |
963 | uint64 value = 0; | |
964 | value |= extract_bits(instruction, 3, 23); | |
965 | return value; | |
966 | } | |
967 | ||
968 | ||
2dc0c175 | 969 | static uint64 extract_rs4_4_2_1_0(uint64 instruction) |
89a955e8 AM |
970 | { |
971 | uint64 value = 0; | |
972 | value |= extract_bits(instruction, 0, 3); | |
973 | value |= extract_bits(instruction, 4, 1) << 3; | |
974 | return value; | |
975 | } | |
976 | ||
977 | ||
2dc0c175 | 978 | static uint64 extract_bit_23_22_21(uint64 instruction) |
89a955e8 AM |
979 | { |
980 | uint64 value = 0; | |
981 | value |= extract_bits(instruction, 21, 3); | |
982 | return value; | |
983 | } | |
984 | ||
985 | ||
2dc0c175 | 986 | static uint64 extract_rt_41_40_39_38_37(uint64 instruction) |
89a955e8 AM |
987 | { |
988 | uint64 value = 0; | |
989 | value |= extract_bits(instruction, 37, 5); | |
990 | return value; | |
991 | } | |
992 | ||
993 | ||
2dc0c175 | 994 | static int64 extract_shift__se5_21_20_19_18_17_16(uint64 instruction) |
89a955e8 AM |
995 | { |
996 | int64 value = 0; | |
997 | value |= extract_bits(instruction, 16, 6); | |
998 | value = sign_extend(value, 5); | |
999 | return value; | |
1000 | } | |
1001 | ||
1002 | ||
2dc0c175 | 1003 | static uint64 extract_rd2_3_8(uint64 instruction) |
89a955e8 AM |
1004 | { |
1005 | uint64 value = 0; | |
1006 | value |= extract_bits(instruction, 3, 1) << 1; | |
1007 | value |= extract_bits(instruction, 8, 1); | |
1008 | return value; | |
1009 | } | |
1010 | ||
1011 | ||
2dc0c175 | 1012 | static uint64 extract_code_17_to_0(uint64 instruction) |
89a955e8 AM |
1013 | { |
1014 | uint64 value = 0; | |
1015 | value |= extract_bits(instruction, 0, 18); | |
1016 | return value; | |
1017 | } | |
1018 | ||
1019 | ||
2dc0c175 | 1020 | static uint64 extract_size_20_19_18_17_16(uint64 instruction) |
89a955e8 AM |
1021 | { |
1022 | uint64 value = 0; | |
1023 | value |= extract_bits(instruction, 16, 5); | |
1024 | return value; | |
1025 | } | |
1026 | ||
1027 | ||
2dc0c175 | 1028 | static int64 extract_s__se8_15_7_6_5_4_3_2_s2(uint64 instruction) |
89a955e8 AM |
1029 | { |
1030 | int64 value = 0; | |
1031 | value |= extract_bits(instruction, 2, 6) << 2; | |
1032 | value |= extract_bits(instruction, 15, 1) << 8; | |
1033 | value = sign_extend(value, 8); | |
1034 | return value; | |
1035 | } | |
1036 | ||
1037 | ||
2dc0c175 | 1038 | static uint64 extract_u_15_to_0(uint64 instruction) |
89a955e8 AM |
1039 | { |
1040 | uint64 value = 0; | |
1041 | value |= extract_bits(instruction, 0, 16); | |
1042 | return value; | |
1043 | } | |
1044 | ||
1045 | ||
2dc0c175 | 1046 | static uint64 extract_fs_20_19_18_17_16(uint64 instruction) |
89a955e8 AM |
1047 | { |
1048 | uint64 value = 0; | |
1049 | value |= extract_bits(instruction, 16, 5); | |
1050 | return value; | |
1051 | } | |
1052 | ||
1053 | ||
2dc0c175 | 1054 | static int64 extract_s__se8_15_7_6_5_4_3_2_1_0(uint64 instruction) |
89a955e8 AM |
1055 | { |
1056 | int64 value = 0; | |
1057 | value |= extract_bits(instruction, 0, 8); | |
1058 | value |= extract_bits(instruction, 15, 1) << 8; | |
1059 | value = sign_extend(value, 8); | |
1060 | return value; | |
1061 | } | |
1062 | ||
1063 | ||
2dc0c175 | 1064 | static uint64 extract_stype_20_19_18_17_16(uint64 instruction) |
89a955e8 AM |
1065 | { |
1066 | uint64 value = 0; | |
1067 | value |= extract_bits(instruction, 16, 5); | |
1068 | return value; | |
1069 | } | |
1070 | ||
1071 | ||
2dc0c175 | 1072 | static uint64 extract_rtl_11(uint64 instruction) |
89a955e8 AM |
1073 | { |
1074 | uint64 value = 0; | |
1075 | value |= extract_bits(instruction, 9, 1); | |
1076 | return value; | |
1077 | } | |
1078 | ||
1079 | ||
2dc0c175 | 1080 | static uint64 extract_hs_20_19_18_17_16(uint64 instruction) |
89a955e8 AM |
1081 | { |
1082 | uint64 value = 0; | |
1083 | value |= extract_bits(instruction, 16, 5); | |
1084 | return value; | |
1085 | } | |
1086 | ||
1087 | ||
2dc0c175 | 1088 | static uint64 extract_sel_13_12_11(uint64 instruction) |
89a955e8 AM |
1089 | { |
1090 | uint64 value = 0; | |
1091 | value |= extract_bits(instruction, 11, 3); | |
1092 | return value; | |
1093 | } | |
1094 | ||
1095 | ||
2dc0c175 | 1096 | static uint64 extract_lsb_4_3_2_1_0(uint64 instruction) |
89a955e8 AM |
1097 | { |
1098 | uint64 value = 0; | |
1099 | value |= extract_bits(instruction, 0, 5); | |
1100 | return value; | |
1101 | } | |
1102 | ||
1103 | ||
2dc0c175 | 1104 | static uint64 extract_gp_2(uint64 instruction) |
89a955e8 AM |
1105 | { |
1106 | uint64 value = 0; | |
1107 | value |= extract_bits(instruction, 2, 1); | |
1108 | return value; | |
1109 | } | |
1110 | ||
1111 | ||
2dc0c175 | 1112 | static uint64 extract_rt3_9_8_7(uint64 instruction) |
89a955e8 AM |
1113 | { |
1114 | uint64 value = 0; | |
1115 | value |= extract_bits(instruction, 7, 3); | |
1116 | return value; | |
1117 | } | |
1118 | ||
1119 | ||
2dc0c175 | 1120 | static uint64 extract_ft_25_24_23_22_21(uint64 instruction) |
89a955e8 AM |
1121 | { |
1122 | uint64 value = 0; | |
1123 | value |= extract_bits(instruction, 21, 5); | |
1124 | return value; | |
1125 | } | |
1126 | ||
1127 | ||
2dc0c175 | 1128 | static uint64 extract_u_17_16_15_14_13_12_11(uint64 instruction) |
89a955e8 AM |
1129 | { |
1130 | uint64 value = 0; | |
1131 | value |= extract_bits(instruction, 11, 7); | |
1132 | return value; | |
1133 | } | |
1134 | ||
1135 | ||
2dc0c175 | 1136 | static uint64 extract_cs_20_19_18_17_16(uint64 instruction) |
89a955e8 AM |
1137 | { |
1138 | uint64 value = 0; | |
1139 | value |= extract_bits(instruction, 16, 5); | |
1140 | return value; | |
1141 | } | |
1142 | ||
1143 | ||
2dc0c175 | 1144 | static uint64 extract_rt4_9_7_6_5(uint64 instruction) |
89a955e8 AM |
1145 | { |
1146 | uint64 value = 0; | |
1147 | value |= extract_bits(instruction, 5, 3); | |
1148 | value |= extract_bits(instruction, 9, 1) << 3; | |
1149 | return value; | |
1150 | } | |
1151 | ||
1152 | ||
2dc0c175 | 1153 | static uint64 extract_msbt_10_9_8_7_6(uint64 instruction) |
89a955e8 AM |
1154 | { |
1155 | uint64 value = 0; | |
1156 | value |= extract_bits(instruction, 6, 5); | |
1157 | return value; | |
1158 | } | |
1159 | ||
1160 | ||
2dc0c175 | 1161 | static uint64 extract_u_5_4_3_2_1_0__s2(uint64 instruction) |
89a955e8 AM |
1162 | { |
1163 | uint64 value = 0; | |
1164 | value |= extract_bits(instruction, 0, 6) << 2; | |
1165 | return value; | |
1166 | } | |
1167 | ||
1168 | ||
2dc0c175 | 1169 | static uint64 extract_sa_15_14_13(uint64 instruction) |
89a955e8 AM |
1170 | { |
1171 | uint64 value = 0; | |
1172 | value |= extract_bits(instruction, 13, 3); | |
1173 | return value; | |
1174 | } | |
1175 | ||
1176 | ||
2dc0c175 | 1177 | static int64 extract_s__se14_0_13_to_1_s1(uint64 instruction) |
89a955e8 AM |
1178 | { |
1179 | int64 value = 0; | |
1180 | value |= extract_bits(instruction, 0, 1) << 14; | |
1181 | value |= extract_bits(instruction, 1, 13) << 1; | |
1182 | value = sign_extend(value, 14); | |
1183 | return value; | |
1184 | } | |
1185 | ||
1186 | ||
2dc0c175 | 1187 | static uint64 extract_rs3_6_5_4(uint64 instruction) |
89a955e8 AM |
1188 | { |
1189 | uint64 value = 0; | |
1190 | value |= extract_bits(instruction, 4, 3); | |
1191 | return value; | |
1192 | } | |
1193 | ||
1194 | ||
2dc0c175 | 1195 | static uint64 extract_u_31_to_0__s32(uint64 instruction) |
89a955e8 AM |
1196 | { |
1197 | uint64 value = 0; | |
1198 | value |= extract_bits(instruction, 0, 32) << 32; | |
1199 | return value; | |
1200 | } | |
1201 | ||
1202 | ||
2dc0c175 | 1203 | static uint64 extract_shift_10_9_8_7_6(uint64 instruction) |
89a955e8 AM |
1204 | { |
1205 | uint64 value = 0; | |
1206 | value |= extract_bits(instruction, 6, 5); | |
1207 | return value; | |
1208 | } | |
1209 | ||
1210 | ||
2dc0c175 | 1211 | static uint64 extract_cs_25_24_23_22_21(uint64 instruction) |
89a955e8 AM |
1212 | { |
1213 | uint64 value = 0; | |
1214 | value |= extract_bits(instruction, 21, 5); | |
1215 | return value; | |
1216 | } | |
1217 | ||
1218 | ||
2dc0c175 | 1219 | static uint64 extract_shiftx_11_10_9_8_7_6(uint64 instruction) |
89a955e8 AM |
1220 | { |
1221 | uint64 value = 0; | |
1222 | value |= extract_bits(instruction, 6, 6); | |
1223 | return value; | |
1224 | } | |
1225 | ||
1226 | ||
2dc0c175 | 1227 | static uint64 extract_rt_9_8_7_6_5(uint64 instruction) |
89a955e8 AM |
1228 | { |
1229 | uint64 value = 0; | |
1230 | value |= extract_bits(instruction, 5, 5); | |
1231 | return value; | |
1232 | } | |
1233 | ||
1234 | ||
2dc0c175 | 1235 | static uint64 extract_op_25_24_23_22_21(uint64 instruction) |
89a955e8 AM |
1236 | { |
1237 | uint64 value = 0; | |
1238 | value |= extract_bits(instruction, 21, 5); | |
1239 | return value; | |
1240 | } | |
1241 | ||
1242 | ||
2dc0c175 | 1243 | static uint64 extract_u_6_5_4_3_2_1_0__s2(uint64 instruction) |
89a955e8 AM |
1244 | { |
1245 | uint64 value = 0; | |
1246 | value |= extract_bits(instruction, 0, 7) << 2; | |
1247 | return value; | |
1248 | } | |
1249 | ||
1250 | ||
2dc0c175 | 1251 | static uint64 extract_bit_16_15_14_13_12_11(uint64 instruction) |
89a955e8 AM |
1252 | { |
1253 | uint64 value = 0; | |
1254 | value |= extract_bits(instruction, 11, 6); | |
1255 | return value; | |
1256 | } | |
1257 | ||
1258 | ||
2dc0c175 | 1259 | static uint64 extract_mask_20_19_18_17_16_15_14(uint64 instruction) |
89a955e8 AM |
1260 | { |
1261 | uint64 value = 0; | |
1262 | value |= extract_bits(instruction, 14, 7); | |
1263 | return value; | |
1264 | } | |
1265 | ||
1266 | ||
2dc0c175 | 1267 | static uint64 extract_eu_3_2_1_0(uint64 instruction) |
89a955e8 AM |
1268 | { |
1269 | uint64 value = 0; | |
1270 | value |= extract_bits(instruction, 0, 4); | |
1271 | return value; | |
1272 | } | |
1273 | ||
1274 | ||
2dc0c175 | 1275 | static uint64 extract_u_7_6_5_4__s4(uint64 instruction) |
89a955e8 AM |
1276 | { |
1277 | uint64 value = 0; | |
1278 | value |= extract_bits(instruction, 4, 4) << 4; | |
1279 | return value; | |
1280 | } | |
1281 | ||
1282 | ||
2dc0c175 | 1283 | static int64 extract_s__se8_15_7_6_5_4_3_s3(uint64 instruction) |
89a955e8 AM |
1284 | { |
1285 | int64 value = 0; | |
1286 | value |= extract_bits(instruction, 3, 5) << 3; | |
1287 | value |= extract_bits(instruction, 15, 1) << 8; | |
1288 | value = sign_extend(value, 8); | |
1289 | return value; | |
1290 | } | |
1291 | ||
1292 | ||
2dc0c175 | 1293 | static uint64 extract_ft_15_14_13_12_11(uint64 instruction) |
89a955e8 AM |
1294 | { |
1295 | uint64 value = 0; | |
1296 | value |= extract_bits(instruction, 11, 5); | |
1297 | return value; | |
1298 | } | |
1299 | ||
1300 | ||
2dc0c175 | 1301 | static int64 extract_s__se31_15_to_0_31_to_16(uint64 instruction) |
89a955e8 AM |
1302 | { |
1303 | int64 value = 0; | |
1304 | value |= extract_bits(instruction, 0, 16) << 16; | |
1305 | value |= extract_bits(instruction, 16, 16); | |
1306 | value = sign_extend(value, 31); | |
1307 | return value; | |
1308 | } | |
1309 | ||
1310 | ||
2dc0c175 | 1311 | static uint64 extract_u_20_19_18_17_16_15_14_13(uint64 instruction) |
89a955e8 AM |
1312 | { |
1313 | uint64 value = 0; | |
1314 | value |= extract_bits(instruction, 13, 8); | |
1315 | return value; | |
1316 | } | |
1317 | ||
1318 | ||
2dc0c175 | 1319 | static uint64 extract_u_17_to_2__s2(uint64 instruction) |
89a955e8 AM |
1320 | { |
1321 | uint64 value = 0; | |
1322 | value |= extract_bits(instruction, 2, 16) << 2; | |
1323 | return value; | |
1324 | } | |
1325 | ||
1326 | ||
2dc0c175 | 1327 | static uint64 extract_rd_15_14_13_12_11(uint64 instruction) |
89a955e8 AM |
1328 | { |
1329 | uint64 value = 0; | |
1330 | value |= extract_bits(instruction, 11, 5); | |
1331 | return value; | |
1332 | } | |
1333 | ||
1334 | ||
2dc0c175 | 1335 | static uint64 extract_c0s_20_19_18_17_16(uint64 instruction) |
89a955e8 AM |
1336 | { |
1337 | uint64 value = 0; | |
1338 | value |= extract_bits(instruction, 16, 5); | |
1339 | return value; | |
1340 | } | |
1341 | ||
1342 | ||
2dc0c175 | 1343 | static uint64 extract_code_1_0(uint64 instruction) |
89a955e8 AM |
1344 | { |
1345 | uint64 value = 0; | |
1346 | value |= extract_bits(instruction, 0, 2); | |
1347 | return value; | |
1348 | } | |
1349 | ||
1350 | ||
2dc0c175 | 1351 | static int64 extract_s__se25_0_24_to_1_s1(uint64 instruction) |
89a955e8 AM |
1352 | { |
1353 | int64 value = 0; | |
1354 | value |= extract_bits(instruction, 0, 1) << 25; | |
1355 | value |= extract_bits(instruction, 1, 24) << 1; | |
1356 | value = sign_extend(value, 25); | |
1357 | return value; | |
1358 | } | |
1359 | ||
1360 | ||
2dc0c175 | 1361 | static uint64 extract_u_1_0(uint64 instruction) |
89a955e8 AM |
1362 | { |
1363 | uint64 value = 0; | |
1364 | value |= extract_bits(instruction, 0, 2); | |
1365 | return value; | |
1366 | } | |
1367 | ||
1368 | ||
2dc0c175 | 1369 | static uint64 extract_u_3_8__s2(uint64 instruction) |
89a955e8 AM |
1370 | { |
1371 | uint64 value = 0; | |
1372 | value |= extract_bits(instruction, 3, 1) << 3; | |
1373 | value |= extract_bits(instruction, 8, 1) << 2; | |
1374 | return value; | |
1375 | } | |
1376 | ||
1377 | ||
2dc0c175 | 1378 | static uint64 extract_fd_15_14_13_12_11(uint64 instruction) |
89a955e8 AM |
1379 | { |
1380 | uint64 value = 0; | |
1381 | value |= extract_bits(instruction, 11, 5); | |
1382 | return value; | |
1383 | } | |
1384 | ||
1385 | ||
2dc0c175 | 1386 | static uint64 extract_u_4_3_2_1_0__s2(uint64 instruction) |
89a955e8 AM |
1387 | { |
1388 | uint64 value = 0; | |
1389 | value |= extract_bits(instruction, 0, 5) << 2; | |
1390 | return value; | |
1391 | } | |
1392 | ||
1393 | ||
2dc0c175 | 1394 | static uint64 extract_rtz4_9_7_6_5(uint64 instruction) |
89a955e8 AM |
1395 | { |
1396 | uint64 value = 0; | |
1397 | value |= extract_bits(instruction, 5, 3); | |
1398 | value |= extract_bits(instruction, 9, 1) << 3; | |
1399 | return value; | |
1400 | } | |
1401 | ||
1402 | ||
2dc0c175 | 1403 | static uint64 extract_sel_15_14_13_12_11(uint64 instruction) |
89a955e8 AM |
1404 | { |
1405 | uint64 value = 0; | |
1406 | value |= extract_bits(instruction, 11, 5); | |
1407 | return value; | |
1408 | } | |
1409 | ||
1410 | ||
2dc0c175 | 1411 | static uint64 extract_ct_25_24_23_22_21(uint64 instruction) |
89a955e8 AM |
1412 | { |
1413 | uint64 value = 0; | |
1414 | value |= extract_bits(instruction, 21, 5); | |
1415 | return value; | |
1416 | } | |
1417 | ||
1418 | ||
2dc0c175 | 1419 | static uint64 extract_u_20_to_2__s2(uint64 instruction) |
89a955e8 AM |
1420 | { |
1421 | uint64 value = 0; | |
1422 | value |= extract_bits(instruction, 2, 19) << 2; | |
1423 | return value; | |
1424 | } | |
1425 | ||
1426 | ||
2dc0c175 | 1427 | static int64 extract_s__se3_4_2_1_0(uint64 instruction) |
89a955e8 AM |
1428 | { |
1429 | int64 value = 0; | |
1430 | value |= extract_bits(instruction, 0, 3); | |
1431 | value |= extract_bits(instruction, 4, 1) << 3; | |
1432 | value = sign_extend(value, 3); | |
1433 | return value; | |
1434 | } | |
1435 | ||
1436 | ||
2dc0c175 | 1437 | static uint64 extract_u_3_2_1_0__s1(uint64 instruction) |
89a955e8 AM |
1438 | { |
1439 | uint64 value = 0; | |
1440 | value |= extract_bits(instruction, 0, 4) << 1; | |
1441 | return value; | |
1442 | } | |
1443 | ||
1444 | ||
89a955e8 | 1445 | |
655fc22f | 1446 | static bool ADDIU_32__cond(uint64 instruction) |
89a955e8 AM |
1447 | { |
1448 | uint64 rt = extract_rt_25_24_23_22_21(instruction); | |
1449 | return rt != 0; | |
1450 | } | |
1451 | ||
1452 | ||
655fc22f | 1453 | static bool ADDIU_RS5__cond(uint64 instruction) |
89a955e8 AM |
1454 | { |
1455 | uint64 rt = extract_rt_9_8_7_6_5(instruction); | |
1456 | return rt != 0; | |
1457 | } | |
1458 | ||
1459 | ||
655fc22f | 1460 | static bool BALRSC_cond(uint64 instruction) |
89a955e8 AM |
1461 | { |
1462 | uint64 rt = extract_rt_25_24_23_22_21(instruction); | |
1463 | return rt != 0; | |
1464 | } | |
1465 | ||
1466 | ||
655fc22f | 1467 | static bool BEQC_16__cond(uint64 instruction) |
89a955e8 AM |
1468 | { |
1469 | uint64 rs3 = extract_rs3_6_5_4(instruction); | |
1470 | uint64 rt3 = extract_rt3_9_8_7(instruction); | |
11b9732a | 1471 | uint64 u = extract_u_3_2_1_0__s1(instruction); |
89a955e8 AM |
1472 | return rs3 < rt3 && u != 0; |
1473 | } | |
1474 | ||
1475 | ||
655fc22f | 1476 | static bool BNEC_16__cond(uint64 instruction) |
89a955e8 AM |
1477 | { |
1478 | uint64 rs3 = extract_rs3_6_5_4(instruction); | |
1479 | uint64 rt3 = extract_rt3_9_8_7(instruction); | |
11b9732a | 1480 | uint64 u = extract_u_3_2_1_0__s1(instruction); |
89a955e8 AM |
1481 | return rs3 >= rt3 && u != 0; |
1482 | } | |
1483 | ||
1484 | ||
655fc22f | 1485 | static bool MOVE_cond(uint64 instruction) |
89a955e8 AM |
1486 | { |
1487 | uint64 rt = extract_rt_9_8_7_6_5(instruction); | |
1488 | return rt != 0; | |
1489 | } | |
1490 | ||
1491 | ||
655fc22f | 1492 | static bool P16_BR1_cond(uint64 instruction) |
89a955e8 | 1493 | { |
11b9732a | 1494 | uint64 u = extract_u_3_2_1_0__s1(instruction); |
89a955e8 AM |
1495 | return u != 0; |
1496 | } | |
1497 | ||
1498 | ||
655fc22f | 1499 | static bool PREF_S9__cond(uint64 instruction) |
89a955e8 AM |
1500 | { |
1501 | uint64 hint = extract_hint_25_24_23_22_21(instruction); | |
1502 | return hint != 31; | |
1503 | } | |
1504 | ||
1505 | ||
655fc22f | 1506 | static bool PREFE_cond(uint64 instruction) |
89a955e8 AM |
1507 | { |
1508 | uint64 hint = extract_hint_25_24_23_22_21(instruction); | |
1509 | return hint != 31; | |
1510 | } | |
1511 | ||
1512 | ||
655fc22f | 1513 | static bool SLTU_cond(uint64 instruction) |
89a955e8 | 1514 | { |
b4c5d21c | 1515 | uint64 rd = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
1516 | return rd != 0; |
1517 | } | |
1518 | ||
1519 | ||
1520 | ||
1521 | /* | |
1522 | * ABS.D fd, fs - Floating Point Absolute Value | |
1523 | * | |
1524 | * 3 2 1 | |
1525 | * 10987654321098765432109876543210 | |
1526 | * 010001 00000 000101 | |
1527 | * fmt ----- | |
1528 | * fs ----- | |
1529 | * fd ----- | |
1530 | */ | |
7def8a4b | 1531 | static char *ABS_D(uint64 instruction, Dis_info *info) |
89a955e8 | 1532 | { |
17ce2f00 | 1533 | uint64 fd_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 1534 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 | 1535 | |
3f2aec07 ML |
1536 | const char *fs = FPR(fs_value, info); |
1537 | const char *fd = FPR(fd_value, info); | |
89a955e8 | 1538 | |
c5231692 | 1539 | return img_format("ABS.D %s, %s", fd, fs); |
89a955e8 AM |
1540 | } |
1541 | ||
1542 | ||
1543 | /* | |
1544 | * ABS.S fd, fs - Floating Point Absolute Value | |
1545 | * | |
1546 | * 3 2 1 | |
1547 | * 10987654321098765432109876543210 | |
1548 | * 010001 00000 000101 | |
1549 | * fmt ----- | |
1550 | * fd ----- | |
1551 | * fs ----- | |
1552 | */ | |
7def8a4b | 1553 | static char *ABS_S(uint64 instruction, Dis_info *info) |
89a955e8 | 1554 | { |
17ce2f00 | 1555 | uint64 fd_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 1556 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 | 1557 | |
3f2aec07 ML |
1558 | const char *fs = FPR(fs_value, info); |
1559 | const char *fd = FPR(fd_value, info); | |
89a955e8 | 1560 | |
c5231692 | 1561 | return img_format("ABS.S %s, %s", fd, fs); |
89a955e8 AM |
1562 | } |
1563 | ||
1564 | ||
1565 | /* | |
fc95c241 AM |
1566 | * [DSP] ABSQ_S.PH rt, rs - Find absolute value of two fractional halfwords |
1567 | * with 16-bit saturation | |
89a955e8 AM |
1568 | * |
1569 | * 3 2 1 | |
1570 | * 10987654321098765432109876543210 | |
1571 | * 001000 0001000100111111 | |
1572 | * rt ----- | |
1573 | * rs ----- | |
1574 | */ | |
7def8a4b | 1575 | static char *ABSQ_S_PH(uint64 instruction, Dis_info *info) |
89a955e8 AM |
1576 | { |
1577 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
1578 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
1579 | ||
3f2aec07 ML |
1580 | const char *rt = GPR(rt_value, info); |
1581 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 1582 | |
c5231692 | 1583 | return img_format("ABSQ_S.PH %s, %s", rt, rs); |
89a955e8 AM |
1584 | } |
1585 | ||
1586 | ||
1587 | /* | |
fc95c241 AM |
1588 | * [DSP] ABSQ_S.QB rt, rs - Find absolute value of four fractional byte values |
1589 | * with 8-bit saturation | |
89a955e8 AM |
1590 | * |
1591 | * 3 2 1 | |
1592 | * 10987654321098765432109876543210 | |
1593 | * 001000 0000000100111111 | |
1594 | * rt ----- | |
1595 | * rs ----- | |
1596 | */ | |
7def8a4b | 1597 | static char *ABSQ_S_QB(uint64 instruction, Dis_info *info) |
89a955e8 AM |
1598 | { |
1599 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
1600 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
1601 | ||
3f2aec07 ML |
1602 | const char *rt = GPR(rt_value, info); |
1603 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 1604 | |
c5231692 | 1605 | return img_format("ABSQ_S.QB %s, %s", rt, rs); |
89a955e8 AM |
1606 | } |
1607 | ||
1608 | ||
1609 | /* | |
fc95c241 AM |
1610 | * [DSP] ABSQ_S.W rt, rs - Find absolute value of fractional word with 32-bit |
1611 | * saturation | |
89a955e8 AM |
1612 | * |
1613 | * 3 2 1 | |
1614 | * 10987654321098765432109876543210 | |
1615 | * 001000 0010000100111111 | |
1616 | * rt ----- | |
1617 | * rs ----- | |
1618 | */ | |
7def8a4b | 1619 | static char *ABSQ_S_W(uint64 instruction, Dis_info *info) |
89a955e8 AM |
1620 | { |
1621 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
1622 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
1623 | ||
3f2aec07 ML |
1624 | const char *rt = GPR(rt_value, info); |
1625 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 1626 | |
c5231692 | 1627 | return img_format("ABSQ_S.W %s, %s", rt, rs); |
89a955e8 AM |
1628 | } |
1629 | ||
1630 | ||
1631 | /* | |
1632 | * | |
1633 | * | |
1634 | * 3 2 1 | |
1635 | * 10987654321098765432109876543210 | |
1636 | * 001000 0010000100111111 | |
1637 | * rt ----- | |
1638 | * rs ----- | |
1639 | */ | |
7def8a4b | 1640 | static char *ACLR(uint64 instruction, Dis_info *info) |
89a955e8 AM |
1641 | { |
1642 | uint64 bit_value = extract_bit_23_22_21(instruction); | |
89a955e8 | 1643 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 1644 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
89a955e8 | 1645 | |
3f2aec07 | 1646 | const char *rs = GPR(rs_value, info); |
89a955e8 | 1647 | |
4066c152 ML |
1648 | return img_format("ACLR 0x%" PRIx64 ", %" PRId64 "(%s)", |
1649 | bit_value, s_value, rs); | |
89a955e8 AM |
1650 | } |
1651 | ||
1652 | ||
1653 | /* | |
1654 | * | |
1655 | * | |
1656 | * 3 2 1 | |
1657 | * 10987654321098765432109876543210 | |
1658 | * 001000 0010000100111111 | |
1659 | * rt ----- | |
1660 | * rs ----- | |
1661 | */ | |
7def8a4b | 1662 | static char *ADD(uint64 instruction, Dis_info *info) |
89a955e8 AM |
1663 | { |
1664 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 1665 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 1666 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 1667 | |
3f2aec07 ML |
1668 | const char *rd = GPR(rd_value, info); |
1669 | const char *rs = GPR(rs_value, info); | |
1670 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 1671 | |
c5231692 | 1672 | return img_format("ADD %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
1673 | } |
1674 | ||
1675 | ||
1676 | /* | |
1677 | * ADD.D fd, fs, ft - Floating Point Add | |
1678 | * | |
1679 | * 3 2 1 | |
1680 | * 10987654321098765432109876543210 | |
1681 | * 010001 000101 | |
1682 | * fmt ----- | |
1683 | * ft ----- | |
1684 | * fs ----- | |
1685 | * fd ----- | |
1686 | */ | |
7def8a4b | 1687 | static char *ADD_D(uint64 instruction, Dis_info *info) |
89a955e8 | 1688 | { |
17ce2f00 | 1689 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 1690 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 1691 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 | 1692 | |
3f2aec07 ML |
1693 | const char *ft = FPR(ft_value, info); |
1694 | const char *fs = FPR(fs_value, info); | |
1695 | const char *fd = FPR(fd_value, info); | |
89a955e8 | 1696 | |
c5231692 | 1697 | return img_format("ADD.D %s, %s, %s", fd, fs, ft); |
89a955e8 AM |
1698 | } |
1699 | ||
1700 | ||
1701 | /* | |
1702 | * ADD.S fd, fs, ft - Floating Point Add | |
1703 | * | |
1704 | * 3 2 1 | |
1705 | * 10987654321098765432109876543210 | |
1706 | * 010001 000101 | |
1707 | * fmt ----- | |
1708 | * ft ----- | |
1709 | * fs ----- | |
1710 | * fd ----- | |
1711 | */ | |
7def8a4b | 1712 | static char *ADD_S(uint64 instruction, Dis_info *info) |
89a955e8 | 1713 | { |
17ce2f00 | 1714 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 1715 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 1716 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 | 1717 | |
3f2aec07 ML |
1718 | const char *ft = FPR(ft_value, info); |
1719 | const char *fs = FPR(fs_value, info); | |
1720 | const char *fd = FPR(fd_value, info); | |
89a955e8 | 1721 | |
c5231692 | 1722 | return img_format("ADD.S %s, %s, %s", fd, fs, ft); |
89a955e8 AM |
1723 | } |
1724 | ||
1725 | ||
1726 | /* | |
1727 | * | |
1728 | * | |
1729 | * 3 2 1 | |
1730 | * 10987654321098765432109876543210 | |
1731 | * 001000 0010000100111111 | |
1732 | * rt ----- | |
1733 | * rs ----- | |
1734 | */ | |
7def8a4b | 1735 | static char *ADDIU_32_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
1736 | { |
1737 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 1738 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 1739 | uint64 u_value = extract_u_15_to_0(instruction); |
89a955e8 | 1740 | |
3f2aec07 ML |
1741 | const char *rt = GPR(rt_value, info); |
1742 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 1743 | |
4066c152 | 1744 | return img_format("ADDIU %s, %s, 0x%" PRIx64, rt, rs, u_value); |
89a955e8 AM |
1745 | } |
1746 | ||
1747 | ||
1748 | /* | |
1749 | * | |
1750 | * | |
1751 | * 3 2 1 | |
1752 | * 10987654321098765432109876543210 | |
1753 | * 001000 0010000100111111 | |
1754 | * rt ----- | |
1755 | * rs ----- | |
1756 | */ | |
7def8a4b | 1757 | static char *ADDIU_48_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
1758 | { |
1759 | uint64 rt_value = extract_rt_41_40_39_38_37(instruction); | |
d3605cc0 | 1760 | int64 s_value = extract_s__se31_15_to_0_31_to_16(instruction); |
89a955e8 | 1761 | |
3f2aec07 | 1762 | const char *rt = GPR(rt_value, info); |
89a955e8 | 1763 | |
4066c152 | 1764 | return img_format("ADDIU %s, %" PRId64, rt, s_value); |
89a955e8 AM |
1765 | } |
1766 | ||
1767 | ||
1768 | /* | |
1769 | * | |
1770 | * | |
1771 | * 3 2 1 | |
1772 | * 10987654321098765432109876543210 | |
1773 | * 001000 0010000100111111 | |
1774 | * rt ----- | |
1775 | * rs ----- | |
1776 | */ | |
7def8a4b | 1777 | static char *ADDIU_GP48_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
1778 | { |
1779 | uint64 rt_value = extract_rt_41_40_39_38_37(instruction); | |
d3605cc0 | 1780 | int64 s_value = extract_s__se31_15_to_0_31_to_16(instruction); |
89a955e8 | 1781 | |
3f2aec07 | 1782 | const char *rt = GPR(rt_value, info); |
89a955e8 | 1783 | |
4066c152 | 1784 | return img_format("ADDIU %s, $%d, %" PRId64, rt, 28, s_value); |
89a955e8 AM |
1785 | } |
1786 | ||
1787 | ||
1788 | /* | |
1789 | * | |
1790 | * | |
1791 | * 3 2 1 | |
1792 | * 10987654321098765432109876543210 | |
1793 | * 001000 0010000100111111 | |
1794 | * rt ----- | |
1795 | * rs ----- | |
1796 | */ | |
7def8a4b | 1797 | static char *ADDIU_GP_B_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
1798 | { |
1799 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
1800 | uint64 u_value = extract_u_17_to_0(instruction); | |
1801 | ||
3f2aec07 | 1802 | const char *rt = GPR(rt_value, info); |
89a955e8 | 1803 | |
4066c152 | 1804 | return img_format("ADDIU %s, $%d, 0x%" PRIx64, rt, 28, u_value); |
89a955e8 AM |
1805 | } |
1806 | ||
1807 | ||
1808 | /* | |
1809 | * | |
1810 | * | |
1811 | * 3 2 1 | |
1812 | * 10987654321098765432109876543210 | |
1813 | * 001000 0010000100111111 | |
1814 | * rt ----- | |
1815 | * rs ----- | |
1816 | */ | |
7def8a4b | 1817 | static char *ADDIU_GP_W_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
1818 | { |
1819 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
11b9732a | 1820 | uint64 u_value = extract_u_20_to_2__s2(instruction); |
89a955e8 | 1821 | |
3f2aec07 | 1822 | const char *rt = GPR(rt_value, info); |
89a955e8 | 1823 | |
4066c152 | 1824 | return img_format("ADDIU %s, $%d, 0x%" PRIx64, rt, 28, u_value); |
89a955e8 AM |
1825 | } |
1826 | ||
1827 | ||
1828 | /* | |
1829 | * | |
1830 | * | |
1831 | * 3 2 1 | |
1832 | * 10987654321098765432109876543210 | |
1833 | * 001000 0010000100111111 | |
1834 | * rt ----- | |
1835 | * rs ----- | |
1836 | */ | |
7def8a4b | 1837 | static char *ADDIU_NEG_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
1838 | { |
1839 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 1840 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 1841 | uint64 u_value = extract_u_11_10_9_8_7_6_5_4_3_2_1_0(instruction); |
89a955e8 | 1842 | |
3f2aec07 ML |
1843 | const char *rt = GPR(rt_value, info); |
1844 | const char *rs = GPR(rs_value, info); | |
4066c152 | 1845 | int64 u = neg_copy(u_value); |
89a955e8 | 1846 | |
4066c152 | 1847 | return img_format("ADDIU %s, %s, %" PRId64, rt, rs, u); |
89a955e8 AM |
1848 | } |
1849 | ||
1850 | ||
1851 | /* | |
1852 | * | |
1853 | * | |
1854 | * 3 2 1 | |
1855 | * 10987654321098765432109876543210 | |
1856 | * 001000 0010000100111111 | |
1857 | * rt ----- | |
1858 | * rs ----- | |
1859 | */ | |
7def8a4b | 1860 | static char *ADDIU_R1_SP_(uint64 instruction, Dis_info *info) |
89a955e8 | 1861 | { |
11b9732a | 1862 | uint64 u_value = extract_u_5_4_3_2_1_0__s2(instruction); |
89a955e8 AM |
1863 | uint64 rt3_value = extract_rt3_9_8_7(instruction); |
1864 | ||
3f2aec07 | 1865 | const char *rt3 = GPR(decode_gpr_gpr3(rt3_value, info), info); |
89a955e8 | 1866 | |
4066c152 | 1867 | return img_format("ADDIU %s, $%d, 0x%" PRIx64, rt3, 29, u_value); |
89a955e8 AM |
1868 | } |
1869 | ||
1870 | ||
1871 | /* | |
1872 | * | |
1873 | * | |
1874 | * 3 2 1 | |
1875 | * 10987654321098765432109876543210 | |
1876 | * 001000 0010000100111111 | |
1877 | * rt ----- | |
1878 | * rs ----- | |
1879 | */ | |
7def8a4b | 1880 | static char *ADDIU_R2_(uint64 instruction, Dis_info *info) |
89a955e8 | 1881 | { |
89a955e8 AM |
1882 | uint64 rt3_value = extract_rt3_9_8_7(instruction); |
1883 | uint64 rs3_value = extract_rs3_6_5_4(instruction); | |
75199b40 | 1884 | uint64 u_value = extract_u_2_1_0__s2(instruction); |
89a955e8 | 1885 | |
3f2aec07 ML |
1886 | const char *rt3 = GPR(decode_gpr_gpr3(rt3_value, info), info); |
1887 | const char *rs3 = GPR(decode_gpr_gpr3(rs3_value, info), info); | |
89a955e8 | 1888 | |
4066c152 | 1889 | return img_format("ADDIU %s, %s, 0x%" PRIx64, rt3, rs3, u_value); |
89a955e8 AM |
1890 | } |
1891 | ||
1892 | ||
1893 | /* | |
1894 | * ADDIU[RS5] rt, s5 - Add Signed Word and Set Carry Bit | |
1895 | * | |
1896 | * 5432109876543210 | |
1897 | * 100100 1 | |
1898 | * rt ----- | |
1899 | * s - --- | |
1900 | */ | |
7def8a4b | 1901 | static char *ADDIU_RS5_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
1902 | { |
1903 | uint64 rt_value = extract_rt_9_8_7_6_5(instruction); | |
d3605cc0 | 1904 | int64 s_value = extract_s__se3_4_2_1_0(instruction); |
89a955e8 | 1905 | |
3f2aec07 | 1906 | const char *rt = GPR(rt_value, info); |
89a955e8 | 1907 | |
4066c152 | 1908 | return img_format("ADDIU %s, %" PRId64, rt, s_value); |
89a955e8 AM |
1909 | } |
1910 | ||
1911 | ||
1912 | /* | |
1913 | * | |
1914 | * | |
1915 | * 3 2 1 | |
1916 | * 10987654321098765432109876543210 | |
1917 | * 001000 x1110000101 | |
1918 | * rt ----- | |
1919 | * rs ----- | |
1920 | * rd ----- | |
1921 | */ | |
7def8a4b | 1922 | static char *ADDIUPC_32_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
1923 | { |
1924 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
d3605cc0 | 1925 | int64 s_value = extract_s__se21_0_20_to_1_s1(instruction); |
89a955e8 | 1926 | |
3f2aec07 | 1927 | const char *rt = GPR(rt_value, info); |
22e7b52a | 1928 | g_autofree char *s = ADDRESS(s_value, 4, info); |
89a955e8 | 1929 | |
c5231692 | 1930 | return img_format("ADDIUPC %s, %s", rt, s); |
89a955e8 AM |
1931 | } |
1932 | ||
1933 | ||
1934 | /* | |
1935 | * | |
1936 | * | |
1937 | * 3 2 1 | |
1938 | * 10987654321098765432109876543210 | |
1939 | * 001000 x1110000101 | |
1940 | * rt ----- | |
1941 | * rs ----- | |
1942 | * rd ----- | |
1943 | */ | |
7def8a4b | 1944 | static char *ADDIUPC_48_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
1945 | { |
1946 | uint64 rt_value = extract_rt_41_40_39_38_37(instruction); | |
d3605cc0 | 1947 | int64 s_value = extract_s__se31_15_to_0_31_to_16(instruction); |
89a955e8 | 1948 | |
3f2aec07 | 1949 | const char *rt = GPR(rt_value, info); |
22e7b52a | 1950 | g_autofree char *s = ADDRESS(s_value, 6, info); |
89a955e8 | 1951 | |
c5231692 | 1952 | return img_format("ADDIUPC %s, %s", rt, s); |
89a955e8 AM |
1953 | } |
1954 | ||
1955 | ||
1956 | /* | |
fc95c241 | 1957 | * [DSP] ADDQ.PH rd, rt, rs - Add fractional halfword vectors |
89a955e8 AM |
1958 | * |
1959 | * 3 2 1 | |
1960 | * 10987654321098765432109876543210 | |
1961 | * 001000 00000001101 | |
1962 | * rt ----- | |
1963 | * rs ----- | |
1964 | * rd ----- | |
1965 | */ | |
7def8a4b | 1966 | static char *ADDQ_PH(uint64 instruction, Dis_info *info) |
89a955e8 AM |
1967 | { |
1968 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 1969 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 1970 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 1971 | |
3f2aec07 ML |
1972 | const char *rd = GPR(rd_value, info); |
1973 | const char *rs = GPR(rs_value, info); | |
1974 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 1975 | |
c5231692 | 1976 | return img_format("ADDQ.PH %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
1977 | } |
1978 | ||
1979 | ||
1980 | /* | |
fc95c241 AM |
1981 | * [DSP] ADDQ_S.PH rd, rt, rs - Add fractional halfword vectors with 16-bit |
1982 | * saturation | |
89a955e8 AM |
1983 | * |
1984 | * 3 2 1 | |
1985 | * 10987654321098765432109876543210 | |
1986 | * 001000 10000001101 | |
1987 | * rt ----- | |
1988 | * rs ----- | |
1989 | * rd ----- | |
1990 | */ | |
7def8a4b | 1991 | static char *ADDQ_S_PH(uint64 instruction, Dis_info *info) |
89a955e8 AM |
1992 | { |
1993 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 1994 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 1995 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 1996 | |
3f2aec07 ML |
1997 | const char *rd = GPR(rd_value, info); |
1998 | const char *rs = GPR(rs_value, info); | |
1999 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 2000 | |
c5231692 | 2001 | return img_format("ADDQ_S.PH %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
2002 | } |
2003 | ||
2004 | ||
2005 | /* | |
fc95c241 | 2006 | * [DSP] ADDQ_S.W rd, rt, rs - Add fractional words with 32-bit saturation |
89a955e8 AM |
2007 | * |
2008 | * 3 2 1 | |
2009 | * 10987654321098765432109876543210 | |
2010 | * 001000 x1100000101 | |
2011 | * rt ----- | |
2012 | * rs ----- | |
2013 | * rd ----- | |
2014 | */ | |
7def8a4b | 2015 | static char *ADDQ_S_W(uint64 instruction, Dis_info *info) |
89a955e8 AM |
2016 | { |
2017 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 2018 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 2019 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 2020 | |
3f2aec07 ML |
2021 | const char *rd = GPR(rd_value, info); |
2022 | const char *rs = GPR(rs_value, info); | |
2023 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 2024 | |
c5231692 | 2025 | return img_format("ADDQ_S.W %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
2026 | } |
2027 | ||
2028 | ||
2029 | /* | |
fc95c241 AM |
2030 | * [DSP] ADDQH.PH rd, rt, rs - Add fractional halfword vectors and shift |
2031 | * right to halve results | |
89a955e8 AM |
2032 | * |
2033 | * 3 2 1 | |
2034 | * 10987654321098765432109876543210 | |
2035 | * 001000 00001001101 | |
2036 | * rt ----- | |
2037 | * rs ----- | |
2038 | * rd ----- | |
2039 | */ | |
7def8a4b | 2040 | static char *ADDQH_PH(uint64 instruction, Dis_info *info) |
89a955e8 AM |
2041 | { |
2042 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 2043 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 2044 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 2045 | |
3f2aec07 ML |
2046 | const char *rd = GPR(rd_value, info); |
2047 | const char *rs = GPR(rs_value, info); | |
2048 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 2049 | |
c5231692 | 2050 | return img_format("ADDQH.PH %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
2051 | } |
2052 | ||
2053 | ||
2054 | /* | |
fc95c241 AM |
2055 | * [DSP] ADDQH_R.PH rd, rt, rs - Add fractional halfword vectors and shift |
2056 | * right to halve results with rounding | |
89a955e8 AM |
2057 | * |
2058 | * 3 2 1 | |
2059 | * 10987654321098765432109876543210 | |
2060 | * 001000 10001001101 | |
2061 | * rt ----- | |
2062 | * rs ----- | |
2063 | * rd ----- | |
2064 | */ | |
7def8a4b | 2065 | static char *ADDQH_R_PH(uint64 instruction, Dis_info *info) |
89a955e8 AM |
2066 | { |
2067 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 2068 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 2069 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 2070 | |
3f2aec07 ML |
2071 | const char *rd = GPR(rd_value, info); |
2072 | const char *rs = GPR(rs_value, info); | |
2073 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 2074 | |
c5231692 | 2075 | return img_format("ADDQH_R.PH %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
2076 | } |
2077 | ||
2078 | ||
2079 | /* | |
fc95c241 AM |
2080 | * [DSP] ADDQH_R.W rd, rt, rs - Add fractional words and shift right to halve |
2081 | * results with rounding | |
89a955e8 AM |
2082 | * |
2083 | * 3 2 1 | |
2084 | * 10987654321098765432109876543210 | |
2085 | * 001000 00010001101 | |
2086 | * rt ----- | |
2087 | * rs ----- | |
2088 | * rd ----- | |
2089 | */ | |
7def8a4b | 2090 | static char *ADDQH_R_W(uint64 instruction, Dis_info *info) |
89a955e8 AM |
2091 | { |
2092 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 2093 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 2094 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 2095 | |
3f2aec07 ML |
2096 | const char *rd = GPR(rd_value, info); |
2097 | const char *rs = GPR(rs_value, info); | |
2098 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 2099 | |
c5231692 | 2100 | return img_format("ADDQH_R.W %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
2101 | } |
2102 | ||
2103 | ||
2104 | /* | |
fc95c241 AM |
2105 | * [DSP] ADDQH.W rd, rt, rs - Add fractional words and shift right to halve |
2106 | * results | |
89a955e8 AM |
2107 | * |
2108 | * 3 2 1 | |
2109 | * 10987654321098765432109876543210 | |
2110 | * 001000 10010001101 | |
2111 | * rt ----- | |
2112 | * rs ----- | |
2113 | * rd ----- | |
2114 | */ | |
7def8a4b | 2115 | static char *ADDQH_W(uint64 instruction, Dis_info *info) |
89a955e8 AM |
2116 | { |
2117 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 2118 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 2119 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 2120 | |
3f2aec07 ML |
2121 | const char *rd = GPR(rd_value, info); |
2122 | const char *rs = GPR(rs_value, info); | |
2123 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 2124 | |
c5231692 | 2125 | return img_format("ADDQH.W %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
2126 | } |
2127 | ||
2128 | ||
2129 | /* | |
fc95c241 | 2130 | * [DSP] ADDSC rd, rt, rs - Add two signed words and set carry bit |
89a955e8 AM |
2131 | * |
2132 | * 3 2 1 | |
2133 | * 10987654321098765432109876543210 | |
2134 | * 001000 x1110000101 | |
2135 | * rt ----- | |
2136 | * rs ----- | |
2137 | * rd ----- | |
2138 | */ | |
7def8a4b | 2139 | static char *ADDSC(uint64 instruction, Dis_info *info) |
89a955e8 AM |
2140 | { |
2141 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 2142 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 2143 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 2144 | |
3f2aec07 ML |
2145 | const char *rd = GPR(rd_value, info); |
2146 | const char *rs = GPR(rs_value, info); | |
2147 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 2148 | |
c5231692 | 2149 | return img_format("ADDSC %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
2150 | } |
2151 | ||
2152 | ||
2153 | /* | |
2154 | * ADDU[16] rd3, rs3, rt3 - | |
2155 | * | |
2156 | * 5432109876543210 | |
2157 | * 101100 0 | |
2158 | * rt3 --- | |
2159 | * rs3 --- | |
2160 | * rd3 --- | |
2161 | */ | |
7def8a4b | 2162 | static char *ADDU_16_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
2163 | { |
2164 | uint64 rt3_value = extract_rt3_9_8_7(instruction); | |
2165 | uint64 rs3_value = extract_rs3_6_5_4(instruction); | |
2166 | uint64 rd3_value = extract_rd3_3_2_1(instruction); | |
2167 | ||
3f2aec07 ML |
2168 | const char *rt3 = GPR(decode_gpr_gpr3(rt3_value, info), info); |
2169 | const char *rs3 = GPR(decode_gpr_gpr3(rs3_value, info), info); | |
2170 | const char *rd3 = GPR(decode_gpr_gpr3(rd3_value, info), info); | |
89a955e8 | 2171 | |
c5231692 | 2172 | return img_format("ADDU %s, %s, %s", rd3, rs3, rt3); |
89a955e8 AM |
2173 | } |
2174 | ||
2175 | ||
2176 | /* | |
2177 | * | |
2178 | * | |
2179 | * 3 2 1 | |
2180 | * 10987654321098765432109876543210 | |
2181 | * 001000 x1110000101 | |
2182 | * rt ----- | |
2183 | * rs ----- | |
2184 | * rd ----- | |
2185 | */ | |
7def8a4b | 2186 | static char *ADDU_32_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
2187 | { |
2188 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 2189 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 2190 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 2191 | |
3f2aec07 ML |
2192 | const char *rd = GPR(rd_value, info); |
2193 | const char *rs = GPR(rs_value, info); | |
2194 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 2195 | |
c5231692 | 2196 | return img_format("ADDU %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
2197 | } |
2198 | ||
2199 | ||
2200 | /* | |
2201 | * | |
2202 | * | |
2203 | * 3 2 1 | |
2204 | * 10987654321098765432109876543210 | |
2205 | * 001000 x1110000101 | |
2206 | * rt ----- | |
2207 | * rs ----- | |
2208 | * rd ----- | |
2209 | */ | |
7def8a4b | 2210 | static char *ADDU_4X4_(uint64 instruction, Dis_info *info) |
89a955e8 | 2211 | { |
89a955e8 | 2212 | uint64 rt4_value = extract_rt4_9_7_6_5(instruction); |
86b5f803 | 2213 | uint64 rs4_value = extract_rs4_4_2_1_0(instruction); |
89a955e8 | 2214 | |
3f2aec07 ML |
2215 | const char *rs4 = GPR(decode_gpr_gpr4(rs4_value, info), info); |
2216 | const char *rt4 = GPR(decode_gpr_gpr4(rt4_value, info), info); | |
89a955e8 | 2217 | |
c5231692 | 2218 | return img_format("ADDU %s, %s", rs4, rt4); |
89a955e8 AM |
2219 | } |
2220 | ||
2221 | ||
2222 | /* | |
fc95c241 | 2223 | * [DSP] ADDU.PH rd, rt, rs - Add two pairs of unsigned halfwords |
89a955e8 AM |
2224 | * |
2225 | * 3 2 1 | |
2226 | * 10987654321098765432109876543210 | |
2227 | * 001000 00100001101 | |
2228 | * rt ----- | |
2229 | * rs ----- | |
2230 | * rd ----- | |
2231 | */ | |
7def8a4b | 2232 | static char *ADDU_PH(uint64 instruction, Dis_info *info) |
89a955e8 AM |
2233 | { |
2234 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 2235 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 2236 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 2237 | |
3f2aec07 ML |
2238 | const char *rd = GPR(rd_value, info); |
2239 | const char *rs = GPR(rs_value, info); | |
2240 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 2241 | |
c5231692 | 2242 | return img_format("ADDU.PH %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
2243 | } |
2244 | ||
2245 | ||
2246 | /* | |
2247 | * ADDU.QB rd, rt, rs - Unsigned Add Quad Byte Vectors | |
2248 | * | |
2249 | * 3 2 1 | |
2250 | * 10987654321098765432109876543210 | |
2251 | * 001000 00011001101 | |
2252 | * rt ----- | |
2253 | * rs ----- | |
2254 | * rd ----- | |
2255 | */ | |
7def8a4b | 2256 | static char *ADDU_QB(uint64 instruction, Dis_info *info) |
89a955e8 AM |
2257 | { |
2258 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 2259 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 2260 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 2261 | |
3f2aec07 ML |
2262 | const char *rd = GPR(rd_value, info); |
2263 | const char *rs = GPR(rs_value, info); | |
2264 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 2265 | |
c5231692 | 2266 | return img_format("ADDU.QB %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
2267 | } |
2268 | ||
2269 | ||
2270 | /* | |
fc95c241 AM |
2271 | * [DSP] ADDU_S.PH rd, rt, rs - Add two pairs of unsigned halfwords with 16-bit |
2272 | * saturation | |
89a955e8 AM |
2273 | * |
2274 | * 3 2 1 | |
2275 | * 10987654321098765432109876543210 | |
2276 | * 001000 10100001101 | |
2277 | * rt ----- | |
2278 | * rs ----- | |
2279 | * rd ----- | |
2280 | */ | |
7def8a4b | 2281 | static char *ADDU_S_PH(uint64 instruction, Dis_info *info) |
89a955e8 AM |
2282 | { |
2283 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 2284 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 2285 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 2286 | |
3f2aec07 ML |
2287 | const char *rd = GPR(rd_value, info); |
2288 | const char *rs = GPR(rs_value, info); | |
2289 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 2290 | |
c5231692 | 2291 | return img_format("ADDU_S.PH %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
2292 | } |
2293 | ||
2294 | ||
2295 | /* | |
2296 | * ADDU_S.QB rd, rt, rs - Unsigned Add Quad Byte Vectors | |
2297 | * | |
2298 | * 3 2 1 | |
2299 | * 10987654321098765432109876543210 | |
2300 | * 001000 10011001101 | |
2301 | * rt ----- | |
2302 | * rs ----- | |
2303 | * rd ----- | |
2304 | */ | |
7def8a4b | 2305 | static char *ADDU_S_QB(uint64 instruction, Dis_info *info) |
89a955e8 AM |
2306 | { |
2307 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 2308 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 2309 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 2310 | |
3f2aec07 ML |
2311 | const char *rd = GPR(rd_value, info); |
2312 | const char *rs = GPR(rs_value, info); | |
2313 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 2314 | |
c5231692 | 2315 | return img_format("ADDU_S.QB %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
2316 | } |
2317 | ||
2318 | ||
2319 | /* | |
2320 | * ADDUH.QB rd, rt, rs - Unsigned Add Vector Quad-Bytes And Right Shift | |
2321 | * to Halve Results | |
2322 | * | |
2323 | * 3 2 1 | |
2324 | * 10987654321098765432109876543210 | |
2325 | * 001000 00101001101 | |
2326 | * rt ----- | |
2327 | * rs ----- | |
2328 | * rd ----- | |
2329 | */ | |
7def8a4b | 2330 | static char *ADDUH_QB(uint64 instruction, Dis_info *info) |
89a955e8 AM |
2331 | { |
2332 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 2333 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 2334 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 2335 | |
3f2aec07 ML |
2336 | const char *rd = GPR(rd_value, info); |
2337 | const char *rs = GPR(rs_value, info); | |
2338 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 2339 | |
c5231692 | 2340 | return img_format("ADDUH.QB %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
2341 | } |
2342 | ||
2343 | ||
2344 | /* | |
2345 | * ADDUH_R.QB rd, rt, rs - Unsigned Add Vector Quad-Bytes And Right Shift | |
2346 | * to Halve Results | |
2347 | * | |
2348 | * 3 2 1 | |
2349 | * 10987654321098765432109876543210 | |
2350 | * 001000 10101001101 | |
2351 | * rt ----- | |
2352 | * rs ----- | |
2353 | * rd ----- | |
2354 | */ | |
7def8a4b | 2355 | static char *ADDUH_R_QB(uint64 instruction, Dis_info *info) |
89a955e8 AM |
2356 | { |
2357 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 2358 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 2359 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 2360 | |
3f2aec07 ML |
2361 | const char *rd = GPR(rd_value, info); |
2362 | const char *rs = GPR(rs_value, info); | |
2363 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 2364 | |
c5231692 | 2365 | return img_format("ADDUH_R.QB %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
2366 | } |
2367 | ||
2368 | /* | |
2369 | * ADDWC rd, rt, rs - Add Word with Carry Bit | |
2370 | * | |
2371 | * 3 2 1 | |
2372 | * 10987654321098765432109876543210 | |
2373 | * 001000 x1111000101 | |
2374 | * rt ----- | |
2375 | * rs ----- | |
2376 | * rd ----- | |
2377 | */ | |
7def8a4b | 2378 | static char *ADDWC(uint64 instruction, Dis_info *info) |
89a955e8 AM |
2379 | { |
2380 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 2381 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 2382 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 2383 | |
3f2aec07 ML |
2384 | const char *rd = GPR(rd_value, info); |
2385 | const char *rs = GPR(rs_value, info); | |
2386 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 2387 | |
c5231692 | 2388 | return img_format("ADDWC %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
2389 | } |
2390 | ||
2391 | ||
2392 | /* | |
2393 | * | |
2394 | * | |
2395 | * 3 2 1 | |
2396 | * 10987654321098765432109876543210 | |
2397 | * 001000 x1110000101 | |
2398 | * rt ----- | |
2399 | * rs ----- | |
2400 | * rd ----- | |
2401 | */ | |
7def8a4b | 2402 | static char *ALUIPC(uint64 instruction, Dis_info *info) |
89a955e8 AM |
2403 | { |
2404 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
d3605cc0 | 2405 | int64 s_value = extract_s__se31_0_11_to_2_20_to_12_s12(instruction); |
89a955e8 | 2406 | |
3f2aec07 | 2407 | const char *rt = GPR(rt_value, info); |
22e7b52a | 2408 | g_autofree char *s = ADDRESS(s_value, 4, info); |
89a955e8 | 2409 | |
c5231692 | 2410 | return img_format("ALUIPC %s, %%pcrel_hi(%s)", rt, s); |
89a955e8 AM |
2411 | } |
2412 | ||
2413 | ||
2414 | /* | |
2415 | * AND[16] rt3, rs3 - | |
2416 | * | |
2417 | * 5432109876543210 | |
2418 | * 101100 | |
2419 | * rt3 --- | |
2420 | * rs3 --- | |
2421 | * eu ---- | |
2422 | */ | |
7def8a4b | 2423 | static char *AND_16_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
2424 | { |
2425 | uint64 rt3_value = extract_rt3_9_8_7(instruction); | |
2426 | uint64 rs3_value = extract_rs3_6_5_4(instruction); | |
2427 | ||
3f2aec07 ML |
2428 | const char *rt3 = GPR(decode_gpr_gpr3(rt3_value, info), info); |
2429 | const char *rs3 = GPR(decode_gpr_gpr3(rs3_value, info), info); | |
89a955e8 | 2430 | |
c5231692 | 2431 | return img_format("AND %s, %s", rs3, rt3); |
89a955e8 AM |
2432 | } |
2433 | ||
2434 | ||
2435 | /* | |
2436 | * | |
2437 | * | |
2438 | * 3 2 1 | |
2439 | * 10987654321098765432109876543210 | |
2440 | * 001000 x1110000101 | |
2441 | * rt ----- | |
2442 | * rs ----- | |
2443 | * rd ----- | |
2444 | */ | |
7def8a4b | 2445 | static char *AND_32_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
2446 | { |
2447 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 2448 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 2449 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 2450 | |
3f2aec07 ML |
2451 | const char *rd = GPR(rd_value, info); |
2452 | const char *rs = GPR(rs_value, info); | |
2453 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 2454 | |
c5231692 | 2455 | return img_format("AND %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
2456 | } |
2457 | ||
2458 | ||
2459 | /* | |
2460 | * ANDI rt, rs, u - | |
2461 | * | |
2462 | * 5432109876543210 | |
2463 | * 101100 | |
2464 | * rt3 --- | |
2465 | * rs3 --- | |
2466 | * eu ---- | |
2467 | */ | |
7def8a4b | 2468 | static char *ANDI_16_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
2469 | { |
2470 | uint64 rt3_value = extract_rt3_9_8_7(instruction); | |
2471 | uint64 rs3_value = extract_rs3_6_5_4(instruction); | |
2472 | uint64 eu_value = extract_eu_3_2_1_0(instruction); | |
2473 | ||
3f2aec07 ML |
2474 | const char *rt3 = GPR(decode_gpr_gpr3(rt3_value, info), info); |
2475 | const char *rs3 = GPR(decode_gpr_gpr3(rs3_value, info), info); | |
4066c152 | 2476 | uint64 eu = encode_eu_from_u_andi16(eu_value); |
89a955e8 | 2477 | |
4066c152 | 2478 | return img_format("ANDI %s, %s, 0x%" PRIx64, rt3, rs3, eu); |
89a955e8 AM |
2479 | } |
2480 | ||
2481 | ||
2482 | /* | |
2483 | * | |
2484 | * | |
2485 | * 3 2 1 | |
2486 | * 10987654321098765432109876543210 | |
2487 | * 001000 x1110000101 | |
2488 | * rt ----- | |
2489 | * rs ----- | |
2490 | * rd ----- | |
2491 | */ | |
7def8a4b | 2492 | static char *ANDI_32_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
2493 | { |
2494 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 2495 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 2496 | uint64 u_value = extract_u_11_10_9_8_7_6_5_4_3_2_1_0(instruction); |
89a955e8 | 2497 | |
3f2aec07 ML |
2498 | const char *rt = GPR(rt_value, info); |
2499 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 2500 | |
4066c152 | 2501 | return img_format("ANDI %s, %s, 0x%" PRIx64, rt, rs, u_value); |
89a955e8 AM |
2502 | } |
2503 | ||
2504 | ||
2505 | /* | |
2506 | * | |
2507 | * | |
2508 | * 3 2 1 | |
2509 | * 10987654321098765432109876543210 | |
2510 | * 001000 x1110000101 | |
2511 | * rt ----- | |
2512 | * rs ----- | |
2513 | * rd ----- | |
2514 | */ | |
7def8a4b | 2515 | static char *APPEND(uint64 instruction, Dis_info *info) |
89a955e8 AM |
2516 | { |
2517 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 2518 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 2519 | uint64 sa_value = extract_sa_15_14_13_12_11(instruction); |
89a955e8 | 2520 | |
3f2aec07 ML |
2521 | const char *rt = GPR(rt_value, info); |
2522 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 2523 | |
4066c152 | 2524 | return img_format("APPEND %s, %s, 0x%" PRIx64, rt, rs, sa_value); |
89a955e8 AM |
2525 | } |
2526 | ||
2527 | ||
2528 | /* | |
2529 | * | |
2530 | * | |
2531 | * 3 2 1 | |
2532 | * 10987654321098765432109876543210 | |
2533 | * 001000 x1110000101 | |
2534 | * rt ----- | |
2535 | * rs ----- | |
2536 | * rd ----- | |
2537 | */ | |
7def8a4b | 2538 | static char *ASET(uint64 instruction, Dis_info *info) |
89a955e8 AM |
2539 | { |
2540 | uint64 bit_value = extract_bit_23_22_21(instruction); | |
89a955e8 | 2541 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 2542 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
89a955e8 | 2543 | |
3f2aec07 | 2544 | const char *rs = GPR(rs_value, info); |
89a955e8 | 2545 | |
4066c152 ML |
2546 | return img_format("ASET 0x%" PRIx64 ", %" PRId64 "(%s)", |
2547 | bit_value, s_value, rs); | |
89a955e8 AM |
2548 | } |
2549 | ||
2550 | ||
2551 | /* | |
2552 | * | |
2553 | * | |
2554 | * 3 2 1 | |
2555 | * 10987654321098765432109876543210 | |
2556 | * 001000 x1110000101 | |
2557 | * rt ----- | |
2558 | * rs ----- | |
2559 | * rd ----- | |
2560 | */ | |
7def8a4b | 2561 | static char *BALC_16_(uint64 instruction, Dis_info *info) |
89a955e8 | 2562 | { |
d3605cc0 | 2563 | int64 s_value = extract_s__se10_0_9_8_7_6_5_4_3_2_1_s1(instruction); |
89a955e8 | 2564 | |
22e7b52a | 2565 | g_autofree char *s = ADDRESS(s_value, 2, info); |
89a955e8 | 2566 | |
c5231692 | 2567 | return img_format("BALC %s", s); |
89a955e8 AM |
2568 | } |
2569 | ||
2570 | ||
2571 | /* | |
2572 | * | |
2573 | * | |
2574 | * 3 2 1 | |
2575 | * 10987654321098765432109876543210 | |
2576 | * 001000 x1110000101 | |
2577 | * rt ----- | |
2578 | * rs ----- | |
2579 | * rd ----- | |
2580 | */ | |
7def8a4b | 2581 | static char *BALC_32_(uint64 instruction, Dis_info *info) |
89a955e8 | 2582 | { |
d3605cc0 | 2583 | int64 s_value = extract_s__se25_0_24_to_1_s1(instruction); |
89a955e8 | 2584 | |
22e7b52a | 2585 | g_autofree char *s = ADDRESS(s_value, 4, info); |
89a955e8 | 2586 | |
c5231692 | 2587 | return img_format("BALC %s", s); |
89a955e8 AM |
2588 | } |
2589 | ||
2590 | ||
2591 | /* | |
2592 | * | |
2593 | * | |
2594 | * 3 2 1 | |
2595 | * 10987654321098765432109876543210 | |
2596 | * 001000 x1110000101 | |
2597 | * rt ----- | |
2598 | * rs ----- | |
2599 | * rd ----- | |
2600 | */ | |
7def8a4b | 2601 | static char *BALRSC(uint64 instruction, Dis_info *info) |
89a955e8 AM |
2602 | { |
2603 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
2604 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
2605 | ||
3f2aec07 ML |
2606 | const char *rt = GPR(rt_value, info); |
2607 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 2608 | |
c5231692 | 2609 | return img_format("BALRSC %s, %s", rt, rs); |
89a955e8 AM |
2610 | } |
2611 | ||
2612 | ||
2613 | /* | |
2614 | * | |
2615 | * | |
2616 | * 3 2 1 | |
2617 | * 10987654321098765432109876543210 | |
2618 | * 001000 x1110000101 | |
2619 | * rt ----- | |
2620 | * rs ----- | |
2621 | * rd ----- | |
2622 | */ | |
7def8a4b | 2623 | static char *BBEQZC(uint64 instruction, Dis_info *info) |
89a955e8 AM |
2624 | { |
2625 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
2626 | uint64 bit_value = extract_bit_16_15_14_13_12_11(instruction); | |
d3605cc0 | 2627 | int64 s_value = extract_s__se11_0_10_9_8_7_6_5_4_3_2_1_0_s1(instruction); |
89a955e8 | 2628 | |
3f2aec07 | 2629 | const char *rt = GPR(rt_value, info); |
22e7b52a | 2630 | g_autofree char *s = ADDRESS(s_value, 4, info); |
89a955e8 | 2631 | |
4066c152 | 2632 | return img_format("BBEQZC %s, 0x%" PRIx64 ", %s", rt, bit_value, s); |
89a955e8 AM |
2633 | } |
2634 | ||
2635 | ||
2636 | /* | |
2637 | * | |
2638 | * | |
2639 | * 3 2 1 | |
2640 | * 10987654321098765432109876543210 | |
2641 | * 001000 x1110000101 | |
2642 | * rt ----- | |
2643 | * rs ----- | |
2644 | * rd ----- | |
2645 | */ | |
7def8a4b | 2646 | static char *BBNEZC(uint64 instruction, Dis_info *info) |
89a955e8 AM |
2647 | { |
2648 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
2649 | uint64 bit_value = extract_bit_16_15_14_13_12_11(instruction); | |
d3605cc0 | 2650 | int64 s_value = extract_s__se11_0_10_9_8_7_6_5_4_3_2_1_0_s1(instruction); |
89a955e8 | 2651 | |
3f2aec07 | 2652 | const char *rt = GPR(rt_value, info); |
22e7b52a | 2653 | g_autofree char *s = ADDRESS(s_value, 4, info); |
89a955e8 | 2654 | |
4066c152 | 2655 | return img_format("BBNEZC %s, 0x%" PRIx64 ", %s", rt, bit_value, s); |
89a955e8 AM |
2656 | } |
2657 | ||
2658 | ||
2659 | /* | |
2660 | * | |
2661 | * | |
2662 | * 3 2 1 | |
2663 | * 10987654321098765432109876543210 | |
2664 | * 001000 x1110000101 | |
2665 | * rt ----- | |
2666 | * rs ----- | |
2667 | * rd ----- | |
2668 | */ | |
7def8a4b | 2669 | static char *BC_16_(uint64 instruction, Dis_info *info) |
89a955e8 | 2670 | { |
d3605cc0 | 2671 | int64 s_value = extract_s__se10_0_9_8_7_6_5_4_3_2_1_s1(instruction); |
89a955e8 | 2672 | |
22e7b52a | 2673 | g_autofree char *s = ADDRESS(s_value, 2, info); |
89a955e8 | 2674 | |
c5231692 | 2675 | return img_format("BC %s", s); |
89a955e8 AM |
2676 | } |
2677 | ||
2678 | ||
2679 | /* | |
2680 | * | |
2681 | * | |
2682 | * 3 2 1 | |
2683 | * 10987654321098765432109876543210 | |
2684 | * 001000 x1110000101 | |
2685 | * rt ----- | |
2686 | * rs ----- | |
2687 | * rd ----- | |
2688 | */ | |
7def8a4b | 2689 | static char *BC_32_(uint64 instruction, Dis_info *info) |
89a955e8 | 2690 | { |
d3605cc0 | 2691 | int64 s_value = extract_s__se25_0_24_to_1_s1(instruction); |
89a955e8 | 2692 | |
22e7b52a | 2693 | g_autofree char *s = ADDRESS(s_value, 4, info); |
89a955e8 | 2694 | |
c5231692 | 2695 | return img_format("BC %s", s); |
89a955e8 AM |
2696 | } |
2697 | ||
2698 | ||
2699 | /* | |
2700 | * | |
2701 | * | |
2702 | * 3 2 1 | |
2703 | * 10987654321098765432109876543210 | |
2704 | * 001000 x1110000101 | |
2705 | * rt ----- | |
2706 | * rs ----- | |
2707 | * rd ----- | |
2708 | */ | |
7def8a4b | 2709 | static char *BC1EQZC(uint64 instruction, Dis_info *info) |
89a955e8 | 2710 | { |
17ce2f00 | 2711 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
75199b40 | 2712 | int64 s_value = extract_s__se14_0_13_to_1_s1(instruction); |
89a955e8 | 2713 | |
3f2aec07 | 2714 | const char *ft = FPR(ft_value, info); |
22e7b52a | 2715 | g_autofree char *s = ADDRESS(s_value, 4, info); |
89a955e8 | 2716 | |
c5231692 | 2717 | return img_format("BC1EQZC %s, %s", ft, s); |
89a955e8 AM |
2718 | } |
2719 | ||
2720 | ||
2721 | /* | |
2722 | * | |
2723 | * | |
2724 | * 3 2 1 | |
2725 | * 10987654321098765432109876543210 | |
2726 | * 001000 x1110000101 | |
2727 | * rt ----- | |
2728 | * rs ----- | |
2729 | * rd ----- | |
2730 | */ | |
7def8a4b | 2731 | static char *BC1NEZC(uint64 instruction, Dis_info *info) |
89a955e8 | 2732 | { |
17ce2f00 | 2733 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
75199b40 | 2734 | int64 s_value = extract_s__se14_0_13_to_1_s1(instruction); |
89a955e8 | 2735 | |
3f2aec07 | 2736 | const char *ft = FPR(ft_value, info); |
22e7b52a | 2737 | g_autofree char *s = ADDRESS(s_value, 4, info); |
89a955e8 | 2738 | |
c5231692 | 2739 | return img_format("BC1NEZC %s, %s", ft, s); |
89a955e8 AM |
2740 | } |
2741 | ||
2742 | ||
2743 | /* | |
2744 | * | |
2745 | * | |
2746 | * 3 2 1 | |
2747 | * 10987654321098765432109876543210 | |
2748 | * 001000 x1110000101 | |
2749 | * rt ----- | |
2750 | * rs ----- | |
2751 | * rd ----- | |
2752 | */ | |
7def8a4b | 2753 | static char *BC2EQZC(uint64 instruction, Dis_info *info) |
89a955e8 | 2754 | { |
89a955e8 | 2755 | uint64 ct_value = extract_ct_25_24_23_22_21(instruction); |
75199b40 | 2756 | int64 s_value = extract_s__se14_0_13_to_1_s1(instruction); |
89a955e8 | 2757 | |
22e7b52a | 2758 | g_autofree char *s = ADDRESS(s_value, 4, info); |
89a955e8 | 2759 | |
043dc73c | 2760 | return img_format("BC2EQZC CP%" PRIu64 ", %s", ct_value, s); |
89a955e8 AM |
2761 | } |
2762 | ||
2763 | ||
2764 | /* | |
2765 | * | |
2766 | * | |
2767 | * 3 2 1 | |
2768 | * 10987654321098765432109876543210 | |
2769 | * 001000 x1110000101 | |
2770 | * rt ----- | |
2771 | * rs ----- | |
2772 | * rd ----- | |
2773 | */ | |
7def8a4b | 2774 | static char *BC2NEZC(uint64 instruction, Dis_info *info) |
89a955e8 | 2775 | { |
89a955e8 | 2776 | uint64 ct_value = extract_ct_25_24_23_22_21(instruction); |
75199b40 | 2777 | int64 s_value = extract_s__se14_0_13_to_1_s1(instruction); |
89a955e8 | 2778 | |
22e7b52a | 2779 | g_autofree char *s = ADDRESS(s_value, 4, info); |
89a955e8 | 2780 | |
043dc73c | 2781 | return img_format("BC2NEZC CP%" PRIu64 ", %s", ct_value, s); |
89a955e8 AM |
2782 | } |
2783 | ||
2784 | ||
2785 | /* | |
2786 | * | |
2787 | * | |
2788 | * 3 2 1 | |
2789 | * 10987654321098765432109876543210 | |
2790 | * 001000 x1110000101 | |
2791 | * rt ----- | |
2792 | * rs ----- | |
2793 | * rd ----- | |
2794 | */ | |
7def8a4b | 2795 | static char *BEQC_16_(uint64 instruction, Dis_info *info) |
89a955e8 | 2796 | { |
89a955e8 AM |
2797 | uint64 rt3_value = extract_rt3_9_8_7(instruction); |
2798 | uint64 rs3_value = extract_rs3_6_5_4(instruction); | |
75199b40 | 2799 | uint64 u_value = extract_u_3_2_1_0__s1(instruction); |
89a955e8 | 2800 | |
3f2aec07 ML |
2801 | const char *rs3 = GPR(decode_gpr_gpr3(rs3_value, info), info); |
2802 | const char *rt3 = GPR(decode_gpr_gpr3(rt3_value, info), info); | |
22e7b52a | 2803 | g_autofree char *u = ADDRESS(u_value, 2, info); |
89a955e8 | 2804 | |
c5231692 | 2805 | return img_format("BEQC %s, %s, %s", rs3, rt3, u); |
89a955e8 AM |
2806 | } |
2807 | ||
2808 | ||
2809 | /* | |
2810 | * | |
2811 | * | |
2812 | * 3 2 1 | |
2813 | * 10987654321098765432109876543210 | |
2814 | * 001000 x1110000101 | |
2815 | * rt ----- | |
2816 | * rs ----- | |
2817 | * rd ----- | |
2818 | */ | |
7def8a4b | 2819 | static char *BEQC_32_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
2820 | { |
2821 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 2822 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 2823 | int64 s_value = extract_s__se14_0_13_to_1_s1(instruction); |
89a955e8 | 2824 | |
3f2aec07 ML |
2825 | const char *rs = GPR(rs_value, info); |
2826 | const char *rt = GPR(rt_value, info); | |
22e7b52a | 2827 | g_autofree char *s = ADDRESS(s_value, 4, info); |
89a955e8 | 2828 | |
c5231692 | 2829 | return img_format("BEQC %s, %s, %s", rs, rt, s); |
89a955e8 AM |
2830 | } |
2831 | ||
2832 | ||
2833 | /* | |
2834 | * | |
2835 | * | |
2836 | * 3 2 1 | |
2837 | * 10987654321098765432109876543210 | |
2838 | * 001000 x1110000101 | |
2839 | * rt ----- | |
2840 | * rs ----- | |
2841 | * rd ----- | |
2842 | */ | |
7def8a4b | 2843 | static char *BEQIC(uint64 instruction, Dis_info *info) |
89a955e8 AM |
2844 | { |
2845 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 2846 | uint64 u_value = extract_u_17_16_15_14_13_12_11(instruction); |
75199b40 | 2847 | int64 s_value = extract_s__se11_0_10_9_8_7_6_5_4_3_2_1_0_s1(instruction); |
89a955e8 | 2848 | |
3f2aec07 | 2849 | const char *rt = GPR(rt_value, info); |
22e7b52a | 2850 | g_autofree char *s = ADDRESS(s_value, 4, info); |
89a955e8 | 2851 | |
4066c152 | 2852 | return img_format("BEQIC %s, 0x%" PRIx64 ", %s", rt, u_value, s); |
89a955e8 AM |
2853 | } |
2854 | ||
2855 | ||
2856 | /* | |
2857 | * | |
2858 | * | |
2859 | * 3 2 1 | |
2860 | * 10987654321098765432109876543210 | |
2861 | * 001000 x1110000101 | |
2862 | * rt ----- | |
2863 | * rs ----- | |
2864 | * rd ----- | |
2865 | */ | |
7def8a4b | 2866 | static char *BEQZC_16_(uint64 instruction, Dis_info *info) |
89a955e8 | 2867 | { |
89a955e8 | 2868 | uint64 rt3_value = extract_rt3_9_8_7(instruction); |
75199b40 | 2869 | int64 s_value = extract_s__se7_0_6_5_4_3_2_1_s1(instruction); |
89a955e8 | 2870 | |
3f2aec07 | 2871 | const char *rt3 = GPR(decode_gpr_gpr3(rt3_value, info), info); |
22e7b52a | 2872 | g_autofree char *s = ADDRESS(s_value, 2, info); |
89a955e8 | 2873 | |
c5231692 | 2874 | return img_format("BEQZC %s, %s", rt3, s); |
89a955e8 AM |
2875 | } |
2876 | ||
2877 | ||
2878 | /* | |
2879 | * | |
2880 | * | |
2881 | * 3 2 1 | |
2882 | * 10987654321098765432109876543210 | |
2883 | * 001000 x1110000101 | |
2884 | * rt ----- | |
2885 | * rs ----- | |
2886 | * rd ----- | |
2887 | */ | |
7def8a4b | 2888 | static char *BGEC(uint64 instruction, Dis_info *info) |
89a955e8 AM |
2889 | { |
2890 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 2891 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 2892 | int64 s_value = extract_s__se14_0_13_to_1_s1(instruction); |
89a955e8 | 2893 | |
3f2aec07 ML |
2894 | const char *rs = GPR(rs_value, info); |
2895 | const char *rt = GPR(rt_value, info); | |
22e7b52a | 2896 | g_autofree char *s = ADDRESS(s_value, 4, info); |
89a955e8 | 2897 | |
c5231692 | 2898 | return img_format("BGEC %s, %s, %s", rs, rt, s); |
89a955e8 AM |
2899 | } |
2900 | ||
2901 | ||
2902 | /* | |
2903 | * | |
2904 | * | |
2905 | * 3 2 1 | |
2906 | * 10987654321098765432109876543210 | |
2907 | * 001000 x1110000101 | |
2908 | * rt ----- | |
2909 | * rs ----- | |
2910 | * rd ----- | |
2911 | */ | |
7def8a4b | 2912 | static char *BGEIC(uint64 instruction, Dis_info *info) |
89a955e8 AM |
2913 | { |
2914 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 2915 | uint64 u_value = extract_u_17_16_15_14_13_12_11(instruction); |
75199b40 | 2916 | int64 s_value = extract_s__se11_0_10_9_8_7_6_5_4_3_2_1_0_s1(instruction); |
89a955e8 | 2917 | |
3f2aec07 | 2918 | const char *rt = GPR(rt_value, info); |
22e7b52a | 2919 | g_autofree char *s = ADDRESS(s_value, 4, info); |
89a955e8 | 2920 | |
4066c152 | 2921 | return img_format("BGEIC %s, 0x%" PRIx64 ", %s", rt, u_value, s); |
89a955e8 AM |
2922 | } |
2923 | ||
2924 | ||
2925 | /* | |
2926 | * | |
2927 | * | |
2928 | * 3 2 1 | |
2929 | * 10987654321098765432109876543210 | |
2930 | * 001000 x1110000101 | |
2931 | * rt ----- | |
2932 | * rs ----- | |
2933 | * rd ----- | |
2934 | */ | |
7def8a4b | 2935 | static char *BGEIUC(uint64 instruction, Dis_info *info) |
89a955e8 AM |
2936 | { |
2937 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 2938 | uint64 u_value = extract_u_17_16_15_14_13_12_11(instruction); |
75199b40 | 2939 | int64 s_value = extract_s__se11_0_10_9_8_7_6_5_4_3_2_1_0_s1(instruction); |
89a955e8 | 2940 | |
3f2aec07 | 2941 | const char *rt = GPR(rt_value, info); |
22e7b52a | 2942 | g_autofree char *s = ADDRESS(s_value, 4, info); |
89a955e8 | 2943 | |
4066c152 | 2944 | return img_format("BGEIUC %s, 0x%" PRIx64 ", %s", rt, u_value, s); |
89a955e8 AM |
2945 | } |
2946 | ||
2947 | ||
2948 | /* | |
2949 | * | |
2950 | * | |
2951 | * 3 2 1 | |
2952 | * 10987654321098765432109876543210 | |
2953 | * 001000 x1110000101 | |
2954 | * rt ----- | |
2955 | * rs ----- | |
2956 | * rd ----- | |
2957 | */ | |
7def8a4b | 2958 | static char *BGEUC(uint64 instruction, Dis_info *info) |
89a955e8 AM |
2959 | { |
2960 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 2961 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 2962 | int64 s_value = extract_s__se14_0_13_to_1_s1(instruction); |
89a955e8 | 2963 | |
3f2aec07 ML |
2964 | const char *rs = GPR(rs_value, info); |
2965 | const char *rt = GPR(rt_value, info); | |
22e7b52a | 2966 | g_autofree char *s = ADDRESS(s_value, 4, info); |
89a955e8 | 2967 | |
c5231692 | 2968 | return img_format("BGEUC %s, %s, %s", rs, rt, s); |
89a955e8 AM |
2969 | } |
2970 | ||
2971 | ||
2972 | /* | |
2973 | * | |
2974 | * | |
2975 | * 3 2 1 | |
2976 | * 10987654321098765432109876543210 | |
2977 | * 001000 x1110000101 | |
2978 | * rt ----- | |
2979 | * rs ----- | |
2980 | * rd ----- | |
2981 | */ | |
7def8a4b | 2982 | static char *BLTC(uint64 instruction, Dis_info *info) |
89a955e8 AM |
2983 | { |
2984 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 2985 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 2986 | int64 s_value = extract_s__se14_0_13_to_1_s1(instruction); |
89a955e8 | 2987 | |
3f2aec07 ML |
2988 | const char *rs = GPR(rs_value, info); |
2989 | const char *rt = GPR(rt_value, info); | |
22e7b52a | 2990 | g_autofree char *s = ADDRESS(s_value, 4, info); |
89a955e8 | 2991 | |
c5231692 | 2992 | return img_format("BLTC %s, %s, %s", rs, rt, s); |
89a955e8 AM |
2993 | } |
2994 | ||
2995 | ||
2996 | /* | |
2997 | * | |
2998 | * | |
2999 | * 3 2 1 | |
3000 | * 10987654321098765432109876543210 | |
3001 | * 001000 x1110000101 | |
3002 | * rt ----- | |
3003 | * rs ----- | |
3004 | * rd ----- | |
3005 | */ | |
7def8a4b | 3006 | static char *BLTIC(uint64 instruction, Dis_info *info) |
89a955e8 AM |
3007 | { |
3008 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 3009 | uint64 u_value = extract_u_17_16_15_14_13_12_11(instruction); |
75199b40 | 3010 | int64 s_value = extract_s__se11_0_10_9_8_7_6_5_4_3_2_1_0_s1(instruction); |
89a955e8 | 3011 | |
3f2aec07 | 3012 | const char *rt = GPR(rt_value, info); |
22e7b52a | 3013 | g_autofree char *s = ADDRESS(s_value, 4, info); |
89a955e8 | 3014 | |
4066c152 | 3015 | return img_format("BLTIC %s, 0x%" PRIx64 ", %s", rt, u_value, s); |
89a955e8 AM |
3016 | } |
3017 | ||
3018 | ||
3019 | /* | |
3020 | * | |
3021 | * | |
3022 | * 3 2 1 | |
3023 | * 10987654321098765432109876543210 | |
3024 | * 001000 x1110000101 | |
3025 | * rt ----- | |
3026 | * rs ----- | |
3027 | * rd ----- | |
3028 | */ | |
7def8a4b | 3029 | static char *BLTIUC(uint64 instruction, Dis_info *info) |
89a955e8 AM |
3030 | { |
3031 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 3032 | uint64 u_value = extract_u_17_16_15_14_13_12_11(instruction); |
75199b40 | 3033 | int64 s_value = extract_s__se11_0_10_9_8_7_6_5_4_3_2_1_0_s1(instruction); |
89a955e8 | 3034 | |
3f2aec07 | 3035 | const char *rt = GPR(rt_value, info); |
22e7b52a | 3036 | g_autofree char *s = ADDRESS(s_value, 4, info); |
89a955e8 | 3037 | |
4066c152 | 3038 | return img_format("BLTIUC %s, 0x%" PRIx64 ", %s", rt, u_value, s); |
89a955e8 AM |
3039 | } |
3040 | ||
3041 | ||
3042 | /* | |
3043 | * | |
3044 | * | |
3045 | * 3 2 1 | |
3046 | * 10987654321098765432109876543210 | |
3047 | * 001000 x1110000101 | |
3048 | * rt ----- | |
3049 | * rs ----- | |
3050 | * rd ----- | |
3051 | */ | |
7def8a4b | 3052 | static char *BLTUC(uint64 instruction, Dis_info *info) |
89a955e8 AM |
3053 | { |
3054 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 3055 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 3056 | int64 s_value = extract_s__se14_0_13_to_1_s1(instruction); |
89a955e8 | 3057 | |
3f2aec07 ML |
3058 | const char *rs = GPR(rs_value, info); |
3059 | const char *rt = GPR(rt_value, info); | |
22e7b52a | 3060 | g_autofree char *s = ADDRESS(s_value, 4, info); |
89a955e8 | 3061 | |
c5231692 | 3062 | return img_format("BLTUC %s, %s, %s", rs, rt, s); |
89a955e8 AM |
3063 | } |
3064 | ||
3065 | ||
3066 | /* | |
3067 | * | |
3068 | * | |
3069 | * 3 2 1 | |
3070 | * 10987654321098765432109876543210 | |
3071 | * 001000 x1110000101 | |
3072 | * rt ----- | |
3073 | * rs ----- | |
3074 | * rd ----- | |
3075 | */ | |
7def8a4b | 3076 | static char *BNEC_16_(uint64 instruction, Dis_info *info) |
89a955e8 | 3077 | { |
89a955e8 AM |
3078 | uint64 rt3_value = extract_rt3_9_8_7(instruction); |
3079 | uint64 rs3_value = extract_rs3_6_5_4(instruction); | |
75199b40 | 3080 | uint64 u_value = extract_u_3_2_1_0__s1(instruction); |
89a955e8 | 3081 | |
3f2aec07 ML |
3082 | const char *rs3 = GPR(decode_gpr_gpr3(rs3_value, info), info); |
3083 | const char *rt3 = GPR(decode_gpr_gpr3(rt3_value, info), info); | |
22e7b52a | 3084 | g_autofree char *u = ADDRESS(u_value, 2, info); |
89a955e8 | 3085 | |
c5231692 | 3086 | return img_format("BNEC %s, %s, %s", rs3, rt3, u); |
89a955e8 AM |
3087 | } |
3088 | ||
3089 | ||
3090 | /* | |
3091 | * | |
3092 | * | |
3093 | * 3 2 1 | |
3094 | * 10987654321098765432109876543210 | |
3095 | * 001000 x1110000101 | |
3096 | * rt ----- | |
3097 | * rs ----- | |
3098 | * rd ----- | |
3099 | */ | |
7def8a4b | 3100 | static char *BNEC_32_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
3101 | { |
3102 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 3103 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 3104 | int64 s_value = extract_s__se14_0_13_to_1_s1(instruction); |
89a955e8 | 3105 | |
3f2aec07 ML |
3106 | const char *rs = GPR(rs_value, info); |
3107 | const char *rt = GPR(rt_value, info); | |
22e7b52a | 3108 | g_autofree char *s = ADDRESS(s_value, 4, info); |
89a955e8 | 3109 | |
c5231692 | 3110 | return img_format("BNEC %s, %s, %s", rs, rt, s); |
89a955e8 AM |
3111 | } |
3112 | ||
3113 | ||
3114 | /* | |
3115 | * | |
3116 | * | |
3117 | * 3 2 1 | |
3118 | * 10987654321098765432109876543210 | |
3119 | * 001000 x1110000101 | |
3120 | * rt ----- | |
3121 | * rs ----- | |
3122 | * rd ----- | |
3123 | */ | |
7def8a4b | 3124 | static char *BNEIC(uint64 instruction, Dis_info *info) |
89a955e8 AM |
3125 | { |
3126 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 3127 | uint64 u_value = extract_u_17_16_15_14_13_12_11(instruction); |
75199b40 | 3128 | int64 s_value = extract_s__se11_0_10_9_8_7_6_5_4_3_2_1_0_s1(instruction); |
89a955e8 | 3129 | |
3f2aec07 | 3130 | const char *rt = GPR(rt_value, info); |
22e7b52a | 3131 | g_autofree char *s = ADDRESS(s_value, 4, info); |
89a955e8 | 3132 | |
4066c152 | 3133 | return img_format("BNEIC %s, 0x%" PRIx64 ", %s", rt, u_value, s); |
89a955e8 AM |
3134 | } |
3135 | ||
3136 | ||
3137 | /* | |
3138 | * | |
3139 | * | |
3140 | * 3 2 1 | |
3141 | * 10987654321098765432109876543210 | |
3142 | * 001000 x1110000101 | |
3143 | * rt ----- | |
3144 | * rs ----- | |
3145 | * rd ----- | |
3146 | */ | |
7def8a4b | 3147 | static char *BNEZC_16_(uint64 instruction, Dis_info *info) |
89a955e8 | 3148 | { |
89a955e8 | 3149 | uint64 rt3_value = extract_rt3_9_8_7(instruction); |
75199b40 | 3150 | int64 s_value = extract_s__se7_0_6_5_4_3_2_1_s1(instruction); |
89a955e8 | 3151 | |
3f2aec07 | 3152 | const char *rt3 = GPR(decode_gpr_gpr3(rt3_value, info), info); |
22e7b52a | 3153 | g_autofree char *s = ADDRESS(s_value, 2, info); |
89a955e8 | 3154 | |
c5231692 | 3155 | return img_format("BNEZC %s, %s", rt3, s); |
89a955e8 AM |
3156 | } |
3157 | ||
3158 | ||
3159 | /* | |
5c65eed6 AM |
3160 | * [DSP] BPOSGE32C offset - Branch on greater than or equal to value 32 in |
3161 | * DSPControl Pos field | |
89a955e8 AM |
3162 | * |
3163 | * 3 2 1 | |
3164 | * 10987654321098765432109876543210 | |
5c65eed6 AM |
3165 | * 100010xxxxx0010001 |
3166 | * s[13:1] ------------- | |
3167 | * s[14] - | |
89a955e8 | 3168 | */ |
7def8a4b | 3169 | static char *BPOSGE32C(uint64 instruction, Dis_info *info) |
89a955e8 | 3170 | { |
d3605cc0 | 3171 | int64 s_value = extract_s__se14_0_13_to_1_s1(instruction); |
89a955e8 | 3172 | |
22e7b52a | 3173 | g_autofree char *s = ADDRESS(s_value, 4, info); |
89a955e8 | 3174 | |
c5231692 | 3175 | return img_format("BPOSGE32C %s", s); |
89a955e8 AM |
3176 | } |
3177 | ||
3178 | ||
3179 | /* | |
3180 | * | |
3181 | * | |
3182 | * 3 2 1 | |
3183 | * 10987654321098765432109876543210 | |
3184 | * 001000 x1110000101 | |
3185 | * rt ----- | |
3186 | * rs ----- | |
3187 | * rd ----- | |
3188 | */ | |
7def8a4b | 3189 | static char *BREAK_16_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
3190 | { |
3191 | uint64 code_value = extract_code_2_1_0(instruction); | |
3192 | ||
89a955e8 | 3193 | |
4066c152 | 3194 | return img_format("BREAK 0x%" PRIx64, code_value); |
89a955e8 AM |
3195 | } |
3196 | ||
3197 | ||
3198 | /* | |
3199 | * BREAK code - Break. Cause a Breakpoint exception | |
3200 | * | |
3201 | * 3 2 1 | |
3202 | * 10987654321098765432109876543210 | |
3203 | * 001000 x1110000101 | |
3204 | * rt ----- | |
3205 | * rs ----- | |
3206 | * rd ----- | |
3207 | */ | |
7def8a4b | 3208 | static char *BREAK_32_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
3209 | { |
3210 | uint64 code_value = extract_code_18_to_0(instruction); | |
3211 | ||
89a955e8 | 3212 | |
4066c152 | 3213 | return img_format("BREAK 0x%" PRIx64, code_value); |
89a955e8 AM |
3214 | } |
3215 | ||
3216 | ||
3217 | /* | |
3218 | * | |
3219 | * | |
3220 | * 3 2 1 | |
3221 | * 10987654321098765432109876543210 | |
3222 | * 001000 x1110000101 | |
3223 | * rt ----- | |
3224 | * rs ----- | |
3225 | * rd ----- | |
3226 | */ | |
7def8a4b | 3227 | static char *BRSC(uint64 instruction, Dis_info *info) |
89a955e8 AM |
3228 | { |
3229 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
3230 | ||
3f2aec07 | 3231 | const char *rs = GPR(rs_value, info); |
89a955e8 | 3232 | |
c5231692 | 3233 | return img_format("BRSC %s", rs); |
89a955e8 AM |
3234 | } |
3235 | ||
3236 | ||
3237 | /* | |
3238 | * | |
3239 | * | |
3240 | * 3 2 1 | |
3241 | * 10987654321098765432109876543210 | |
3242 | * 001000 x1110000101 | |
3243 | * rt ----- | |
3244 | * rs ----- | |
3245 | * rd ----- | |
3246 | */ | |
7def8a4b | 3247 | static char *CACHE(uint64 instruction, Dis_info *info) |
89a955e8 | 3248 | { |
89a955e8 AM |
3249 | uint64 op_value = extract_op_25_24_23_22_21(instruction); |
3250 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
75199b40 | 3251 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
89a955e8 | 3252 | |
3f2aec07 | 3253 | const char *rs = GPR(rs_value, info); |
89a955e8 | 3254 | |
04849c94 PMD |
3255 | return img_format("CACHE 0x%" PRIx64 ", %" PRId64 "(%s)", |
3256 | op_value, s_value, rs); | |
89a955e8 AM |
3257 | } |
3258 | ||
3259 | ||
3260 | /* | |
3261 | * | |
3262 | * | |
3263 | * 3 2 1 | |
3264 | * 10987654321098765432109876543210 | |
3265 | * 001000 x1110000101 | |
3266 | * rt ----- | |
3267 | * rs ----- | |
3268 | * rd ----- | |
3269 | */ | |
7def8a4b | 3270 | static char *CACHEE(uint64 instruction, Dis_info *info) |
89a955e8 | 3271 | { |
89a955e8 AM |
3272 | uint64 op_value = extract_op_25_24_23_22_21(instruction); |
3273 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
75199b40 | 3274 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
89a955e8 | 3275 | |
3f2aec07 | 3276 | const char *rs = GPR(rs_value, info); |
89a955e8 | 3277 | |
04849c94 PMD |
3278 | return img_format("CACHEE 0x%" PRIx64 ", %" PRId64 "(%s)", |
3279 | op_value, s_value, rs); | |
89a955e8 AM |
3280 | } |
3281 | ||
3282 | ||
3283 | /* | |
3284 | * | |
3285 | * | |
3286 | * 3 2 1 | |
3287 | * 10987654321098765432109876543210 | |
3288 | * 001000 x1110000101 | |
3289 | * rt ----- | |
3290 | * rs ----- | |
3291 | * rd ----- | |
3292 | */ | |
7def8a4b | 3293 | static char *CEIL_L_D(uint64 instruction, Dis_info *info) |
89a955e8 | 3294 | { |
17ce2f00 | 3295 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 3296 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 | 3297 | |
3f2aec07 ML |
3298 | const char *ft = FPR(ft_value, info); |
3299 | const char *fs = FPR(fs_value, info); | |
89a955e8 | 3300 | |
c5231692 | 3301 | return img_format("CEIL.L.D %s, %s", ft, fs); |
89a955e8 AM |
3302 | } |
3303 | ||
3304 | ||
3305 | /* | |
3306 | * | |
3307 | * | |
3308 | * 3 2 1 | |
3309 | * 10987654321098765432109876543210 | |
3310 | * 001000 x1110000101 | |
3311 | * rt ----- | |
3312 | * rs ----- | |
3313 | * rd ----- | |
3314 | */ | |
7def8a4b | 3315 | static char *CEIL_L_S(uint64 instruction, Dis_info *info) |
89a955e8 | 3316 | { |
17ce2f00 | 3317 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 3318 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 | 3319 | |
3f2aec07 ML |
3320 | const char *ft = FPR(ft_value, info); |
3321 | const char *fs = FPR(fs_value, info); | |
89a955e8 | 3322 | |
c5231692 | 3323 | return img_format("CEIL.L.S %s, %s", ft, fs); |
89a955e8 AM |
3324 | } |
3325 | ||
3326 | ||
3327 | /* | |
3328 | * | |
3329 | * | |
3330 | * 3 2 1 | |
3331 | * 10987654321098765432109876543210 | |
3332 | * 001000 x1110000101 | |
3333 | * rt ----- | |
3334 | * rs ----- | |
3335 | * rd ----- | |
3336 | */ | |
7def8a4b | 3337 | static char *CEIL_W_D(uint64 instruction, Dis_info *info) |
89a955e8 | 3338 | { |
17ce2f00 | 3339 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 3340 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 | 3341 | |
3f2aec07 ML |
3342 | const char *ft = FPR(ft_value, info); |
3343 | const char *fs = FPR(fs_value, info); | |
89a955e8 | 3344 | |
c5231692 | 3345 | return img_format("CEIL.W.D %s, %s", ft, fs); |
89a955e8 AM |
3346 | } |
3347 | ||
3348 | ||
3349 | /* | |
3350 | * | |
3351 | * | |
3352 | * 3 2 1 | |
3353 | * 10987654321098765432109876543210 | |
3354 | * 001000 x1110000101 | |
3355 | * rt ----- | |
3356 | * rs ----- | |
3357 | * rd ----- | |
3358 | */ | |
7def8a4b | 3359 | static char *CEIL_W_S(uint64 instruction, Dis_info *info) |
89a955e8 | 3360 | { |
17ce2f00 | 3361 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 3362 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 | 3363 | |
3f2aec07 ML |
3364 | const char *ft = FPR(ft_value, info); |
3365 | const char *fs = FPR(fs_value, info); | |
89a955e8 | 3366 | |
c5231692 | 3367 | return img_format("CEIL.W.S %s, %s", ft, fs); |
89a955e8 AM |
3368 | } |
3369 | ||
3370 | ||
3371 | /* | |
3372 | * | |
3373 | * | |
3374 | * 3 2 1 | |
3375 | * 10987654321098765432109876543210 | |
3376 | * 001000 x1110000101 | |
3377 | * rt ----- | |
3378 | * rs ----- | |
3379 | * rd ----- | |
3380 | */ | |
7def8a4b | 3381 | static char *CFC1(uint64 instruction, Dis_info *info) |
89a955e8 | 3382 | { |
89a955e8 | 3383 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); |
86b5f803 | 3384 | uint64 cs_value = extract_cs_20_19_18_17_16(instruction); |
89a955e8 | 3385 | |
3f2aec07 | 3386 | const char *rt = GPR(rt_value, info); |
89a955e8 | 3387 | |
043dc73c | 3388 | return img_format("CFC1 %s, CP%" PRIu64, rt, cs_value); |
89a955e8 AM |
3389 | } |
3390 | ||
3391 | ||
3392 | /* | |
3393 | * | |
3394 | * | |
3395 | * 3 2 1 | |
3396 | * 10987654321098765432109876543210 | |
3397 | * 001000 x1110000101 | |
3398 | * rt ----- | |
3399 | * rs ----- | |
3400 | * rd ----- | |
3401 | */ | |
7def8a4b | 3402 | static char *CFC2(uint64 instruction, Dis_info *info) |
89a955e8 | 3403 | { |
89a955e8 | 3404 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); |
86b5f803 | 3405 | uint64 cs_value = extract_cs_20_19_18_17_16(instruction); |
89a955e8 | 3406 | |
3f2aec07 | 3407 | const char *rt = GPR(rt_value, info); |
89a955e8 | 3408 | |
043dc73c | 3409 | return img_format("CFC2 %s, CP%" PRIu64, rt, cs_value); |
89a955e8 AM |
3410 | } |
3411 | ||
3412 | ||
3413 | /* | |
3414 | * | |
3415 | * | |
3416 | * 3 2 1 | |
3417 | * 10987654321098765432109876543210 | |
3418 | * 001000 x1110000101 | |
3419 | * rt ----- | |
3420 | * rs ----- | |
3421 | * rd ----- | |
3422 | */ | |
7def8a4b | 3423 | static char *CLASS_D(uint64 instruction, Dis_info *info) |
89a955e8 | 3424 | { |
17ce2f00 | 3425 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 3426 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 | 3427 | |
3f2aec07 ML |
3428 | const char *ft = FPR(ft_value, info); |
3429 | const char *fs = FPR(fs_value, info); | |
89a955e8 | 3430 | |
c5231692 | 3431 | return img_format("CLASS.D %s, %s", ft, fs); |
89a955e8 AM |
3432 | } |
3433 | ||
3434 | ||
3435 | /* | |
3436 | * | |
3437 | * | |
3438 | * 3 2 1 | |
3439 | * 10987654321098765432109876543210 | |
3440 | * 001000 x1110000101 | |
3441 | * rt ----- | |
3442 | * rs ----- | |
3443 | * rd ----- | |
3444 | */ | |
7def8a4b | 3445 | static char *CLASS_S(uint64 instruction, Dis_info *info) |
89a955e8 | 3446 | { |
17ce2f00 | 3447 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 3448 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 | 3449 | |
3f2aec07 ML |
3450 | const char *ft = FPR(ft_value, info); |
3451 | const char *fs = FPR(fs_value, info); | |
89a955e8 | 3452 | |
c5231692 | 3453 | return img_format("CLASS.S %s, %s", ft, fs); |
89a955e8 AM |
3454 | } |
3455 | ||
3456 | ||
3457 | /* | |
3458 | * | |
3459 | * | |
3460 | * 3 2 1 | |
3461 | * 10987654321098765432109876543210 | |
3462 | * 001000 x1110000101 | |
3463 | * rt ----- | |
3464 | * rs ----- | |
3465 | * rd ----- | |
3466 | */ | |
7def8a4b | 3467 | static char *CLO(uint64 instruction, Dis_info *info) |
89a955e8 AM |
3468 | { |
3469 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
3470 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
3471 | ||
3f2aec07 ML |
3472 | const char *rt = GPR(rt_value, info); |
3473 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 3474 | |
c5231692 | 3475 | return img_format("CLO %s, %s", rt, rs); |
89a955e8 AM |
3476 | } |
3477 | ||
3478 | ||
3479 | /* | |
3480 | * | |
3481 | * | |
3482 | * 3 2 1 | |
3483 | * 10987654321098765432109876543210 | |
3484 | * 001000 x1110000101 | |
3485 | * rt ----- | |
3486 | * rs ----- | |
3487 | * rd ----- | |
3488 | */ | |
7def8a4b | 3489 | static char *CLZ(uint64 instruction, Dis_info *info) |
89a955e8 AM |
3490 | { |
3491 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
3492 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
3493 | ||
3f2aec07 ML |
3494 | const char *rt = GPR(rt_value, info); |
3495 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 3496 | |
c5231692 | 3497 | return img_format("CLZ %s, %s", rt, rs); |
89a955e8 AM |
3498 | } |
3499 | ||
3500 | ||
3501 | /* | |
3502 | * | |
3503 | * | |
3504 | * 3 2 1 | |
3505 | * 10987654321098765432109876543210 | |
3506 | * 001000 x1110000101 | |
3507 | * rt ----- | |
3508 | * rs ----- | |
3509 | * rd ----- | |
3510 | */ | |
7def8a4b | 3511 | static char *CMP_AF_D(uint64 instruction, Dis_info *info) |
89a955e8 | 3512 | { |
17ce2f00 | 3513 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 3514 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 3515 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 | 3516 | |
3f2aec07 ML |
3517 | const char *fd = FPR(fd_value, info); |
3518 | const char *fs = FPR(fs_value, info); | |
3519 | const char *ft = FPR(ft_value, info); | |
89a955e8 | 3520 | |
c5231692 | 3521 | return img_format("CMP.AF.D %s, %s, %s", fd, fs, ft); |
89a955e8 AM |
3522 | } |
3523 | ||
3524 | ||
3525 | /* | |
3526 | * | |
3527 | * | |
3528 | * 3 2 1 | |
3529 | * 10987654321098765432109876543210 | |
3530 | * 001000 x1110000101 | |
3531 | * rt ----- | |
3532 | * rs ----- | |
3533 | * rd ----- | |
3534 | */ | |
7def8a4b | 3535 | static char *CMP_AF_S(uint64 instruction, Dis_info *info) |
89a955e8 | 3536 | { |
17ce2f00 | 3537 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 3538 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 3539 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 | 3540 | |
3f2aec07 ML |
3541 | const char *fd = FPR(fd_value, info); |
3542 | const char *fs = FPR(fs_value, info); | |
3543 | const char *ft = FPR(ft_value, info); | |
89a955e8 | 3544 | |
c5231692 | 3545 | return img_format("CMP.AF.S %s, %s, %s", fd, fs, ft); |
89a955e8 AM |
3546 | } |
3547 | ||
3548 | ||
3549 | /* | |
3550 | * | |
3551 | * | |
3552 | * 3 2 1 | |
3553 | * 10987654321098765432109876543210 | |
3554 | * 001000 x1110000101 | |
3555 | * rt ----- | |
3556 | * rs ----- | |
3557 | * rd ----- | |
3558 | */ | |
7def8a4b | 3559 | static char *CMP_EQ_D(uint64 instruction, Dis_info *info) |
89a955e8 | 3560 | { |
17ce2f00 | 3561 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 3562 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 3563 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 | 3564 | |
3f2aec07 ML |
3565 | const char *fd = FPR(fd_value, info); |
3566 | const char *fs = FPR(fs_value, info); | |
3567 | const char *ft = FPR(ft_value, info); | |
89a955e8 | 3568 | |
c5231692 | 3569 | return img_format("CMP.EQ.D %s, %s, %s", fd, fs, ft); |
89a955e8 AM |
3570 | } |
3571 | ||
3572 | ||
3573 | /* | |
5c65eed6 | 3574 | * [DSP] CMP.EQ.PH rs, rt - Compare vectors of signed integer halfword values |
89a955e8 AM |
3575 | * |
3576 | * 3 2 1 | |
3577 | * 10987654321098765432109876543210 | |
5c65eed6 | 3578 | * 001000 xxxxxx0000000101 |
89a955e8 AM |
3579 | * rt ----- |
3580 | * rs ----- | |
89a955e8 | 3581 | */ |
7def8a4b | 3582 | static char *CMP_EQ_PH(uint64 instruction, Dis_info *info) |
89a955e8 AM |
3583 | { |
3584 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
3585 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
3586 | ||
3f2aec07 ML |
3587 | const char *rs = GPR(rs_value, info); |
3588 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 3589 | |
c5231692 | 3590 | return img_format("CMP.EQ.PH %s, %s", rs, rt); |
89a955e8 AM |
3591 | } |
3592 | ||
3593 | ||
3594 | /* | |
3595 | * | |
3596 | * | |
3597 | * 3 2 1 | |
3598 | * 10987654321098765432109876543210 | |
3599 | * 001000 x1110000101 | |
3600 | * rt ----- | |
3601 | * rs ----- | |
3602 | * rd ----- | |
3603 | */ | |
7def8a4b | 3604 | static char *CMP_EQ_S(uint64 instruction, Dis_info *info) |
89a955e8 | 3605 | { |
17ce2f00 | 3606 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 3607 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 3608 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 | 3609 | |
3f2aec07 ML |
3610 | const char *fd = FPR(fd_value, info); |
3611 | const char *fs = FPR(fs_value, info); | |
3612 | const char *ft = FPR(ft_value, info); | |
89a955e8 | 3613 | |
c5231692 | 3614 | return img_format("CMP.EQ.S %s, %s, %s", fd, fs, ft); |
89a955e8 AM |
3615 | } |
3616 | ||
3617 | ||
3618 | /* | |
3619 | * | |
3620 | * | |
3621 | * 3 2 1 | |
3622 | * 10987654321098765432109876543210 | |
3623 | * 001000 x1110000101 | |
3624 | * rt ----- | |
3625 | * rs ----- | |
3626 | * rd ----- | |
3627 | */ | |
7def8a4b | 3628 | static char *CMP_LE_D(uint64 instruction, Dis_info *info) |
89a955e8 | 3629 | { |
17ce2f00 | 3630 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 3631 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 3632 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 | 3633 | |
3f2aec07 ML |
3634 | const char *fd = FPR(fd_value, info); |
3635 | const char *fs = FPR(fs_value, info); | |
3636 | const char *ft = FPR(ft_value, info); | |
89a955e8 | 3637 | |
c5231692 | 3638 | return img_format("CMP.LE.D %s, %s, %s", fd, fs, ft); |
89a955e8 AM |
3639 | } |
3640 | ||
3641 | ||
3642 | /* | |
5c65eed6 | 3643 | * [DSP] CMP.LE.PH rs, rt - Compare vectors of signed integer halfword values |
89a955e8 AM |
3644 | * |
3645 | * 3 2 1 | |
3646 | * 10987654321098765432109876543210 | |
5c65eed6 | 3647 | * 001000 xxxxxx0010000101 |
89a955e8 AM |
3648 | * rt ----- |
3649 | * rs ----- | |
89a955e8 | 3650 | */ |
7def8a4b | 3651 | static char *CMP_LE_PH(uint64 instruction, Dis_info *info) |
89a955e8 AM |
3652 | { |
3653 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
3654 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
3655 | ||
3f2aec07 ML |
3656 | const char *rs = GPR(rs_value, info); |
3657 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 3658 | |
c5231692 | 3659 | return img_format("CMP.LE.PH %s, %s", rs, rt); |
89a955e8 AM |
3660 | } |
3661 | ||
3662 | ||
3663 | /* | |
3664 | * | |
3665 | * | |
3666 | * 3 2 1 | |
3667 | * 10987654321098765432109876543210 | |
3668 | * 001000 x1110000101 | |
3669 | * rt ----- | |
3670 | * rs ----- | |
3671 | * rd ----- | |
3672 | */ | |
7def8a4b | 3673 | static char *CMP_LE_S(uint64 instruction, Dis_info *info) |
89a955e8 | 3674 | { |
17ce2f00 | 3675 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 3676 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 3677 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 | 3678 | |
3f2aec07 ML |
3679 | const char *fd = FPR(fd_value, info); |
3680 | const char *fs = FPR(fs_value, info); | |
3681 | const char *ft = FPR(ft_value, info); | |
89a955e8 | 3682 | |
c5231692 | 3683 | return img_format("CMP.LE.S %s, %s, %s", fd, fs, ft); |
89a955e8 AM |
3684 | } |
3685 | ||
3686 | ||
3687 | /* | |
3688 | * | |
3689 | * | |
3690 | * 3 2 1 | |
3691 | * 10987654321098765432109876543210 | |
3692 | * 001000 x1110000101 | |
3693 | * rt ----- | |
3694 | * rs ----- | |
3695 | * rd ----- | |
3696 | */ | |
7def8a4b | 3697 | static char *CMP_LT_D(uint64 instruction, Dis_info *info) |
89a955e8 | 3698 | { |
17ce2f00 | 3699 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 3700 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 3701 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 | 3702 | |
3f2aec07 ML |
3703 | const char *fd = FPR(fd_value, info); |
3704 | const char *fs = FPR(fs_value, info); | |
3705 | const char *ft = FPR(ft_value, info); | |
89a955e8 | 3706 | |
c5231692 | 3707 | return img_format("CMP.LT.D %s, %s, %s", fd, fs, ft); |
89a955e8 AM |
3708 | } |
3709 | ||
3710 | ||
3711 | /* | |
5c65eed6 | 3712 | * [DSP] CMP.LT.PH rs, rt - Compare vectors of signed integer halfword values |
89a955e8 AM |
3713 | * |
3714 | * 3 2 1 | |
3715 | * 10987654321098765432109876543210 | |
5c65eed6 | 3716 | * 001000 xxxxxx0001000101 |
89a955e8 AM |
3717 | * rt ----- |
3718 | * rs ----- | |
89a955e8 | 3719 | */ |
7def8a4b | 3720 | static char *CMP_LT_PH(uint64 instruction, Dis_info *info) |
89a955e8 AM |
3721 | { |
3722 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
3723 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
3724 | ||
3f2aec07 ML |
3725 | const char *rs = GPR(rs_value, info); |
3726 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 3727 | |
c5231692 | 3728 | return img_format("CMP.LT.PH %s, %s", rs, rt); |
89a955e8 AM |
3729 | } |
3730 | ||
3731 | ||
3732 | /* | |
3733 | * | |
3734 | * | |
3735 | * 3 2 1 | |
3736 | * 10987654321098765432109876543210 | |
3737 | * 001000 x1110000101 | |
3738 | * rt ----- | |
3739 | * rs ----- | |
3740 | * rd ----- | |
3741 | */ | |
7def8a4b | 3742 | static char *CMP_LT_S(uint64 instruction, Dis_info *info) |
89a955e8 | 3743 | { |
17ce2f00 | 3744 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 3745 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 3746 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 | 3747 | |
3f2aec07 ML |
3748 | const char *fd = FPR(fd_value, info); |
3749 | const char *fs = FPR(fs_value, info); | |
3750 | const char *ft = FPR(ft_value, info); | |
89a955e8 | 3751 | |
c5231692 | 3752 | return img_format("CMP.LT.S %s, %s, %s", fd, fs, ft); |
89a955e8 AM |
3753 | } |
3754 | ||
3755 | ||
3756 | /* | |
3757 | * | |
3758 | * | |
3759 | * 3 2 1 | |
3760 | * 10987654321098765432109876543210 | |
3761 | * 001000 x1110000101 | |
3762 | * rt ----- | |
3763 | * rs ----- | |
3764 | * rd ----- | |
3765 | */ | |
7def8a4b | 3766 | static char *CMP_NE_D(uint64 instruction, Dis_info *info) |
89a955e8 | 3767 | { |
17ce2f00 | 3768 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 3769 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 3770 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 | 3771 | |
3f2aec07 ML |
3772 | const char *fd = FPR(fd_value, info); |
3773 | const char *fs = FPR(fs_value, info); | |
3774 | const char *ft = FPR(ft_value, info); | |
89a955e8 | 3775 | |
c5231692 | 3776 | return img_format("CMP.NE.D %s, %s, %s", fd, fs, ft); |
89a955e8 AM |
3777 | } |
3778 | ||
3779 | ||
3780 | /* | |
3781 | * | |
3782 | * | |
3783 | * 3 2 1 | |
3784 | * 10987654321098765432109876543210 | |
3785 | * 001000 x1110000101 | |
3786 | * rt ----- | |
3787 | * rs ----- | |
3788 | * rd ----- | |
3789 | */ | |
7def8a4b | 3790 | static char *CMP_NE_S(uint64 instruction, Dis_info *info) |
89a955e8 | 3791 | { |
17ce2f00 | 3792 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 3793 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 3794 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 | 3795 | |
3f2aec07 ML |
3796 | const char *fd = FPR(fd_value, info); |
3797 | const char *fs = FPR(fs_value, info); | |
3798 | const char *ft = FPR(ft_value, info); | |
89a955e8 | 3799 | |
c5231692 | 3800 | return img_format("CMP.NE.S %s, %s, %s", fd, fs, ft); |
89a955e8 AM |
3801 | } |
3802 | ||
3803 | ||
3804 | /* | |
3805 | * | |
3806 | * | |
3807 | * 3 2 1 | |
3808 | * 10987654321098765432109876543210 | |
3809 | * 001000 x1110000101 | |
3810 | * rt ----- | |
3811 | * rs ----- | |
3812 | * rd ----- | |
3813 | */ | |
7def8a4b | 3814 | static char *CMP_OR_D(uint64 instruction, Dis_info *info) |
89a955e8 | 3815 | { |
17ce2f00 | 3816 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 3817 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 3818 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 | 3819 | |
3f2aec07 ML |
3820 | const char *fd = FPR(fd_value, info); |
3821 | const char *fs = FPR(fs_value, info); | |
3822 | const char *ft = FPR(ft_value, info); | |
89a955e8 | 3823 | |
c5231692 | 3824 | return img_format("CMP.OR.D %s, %s, %s", fd, fs, ft); |
89a955e8 AM |
3825 | } |
3826 | ||
3827 | ||
3828 | /* | |
3829 | * | |
3830 | * | |
3831 | * 3 2 1 | |
3832 | * 10987654321098765432109876543210 | |
3833 | * 001000 x1110000101 | |
3834 | * rt ----- | |
3835 | * rs ----- | |
3836 | * rd ----- | |
3837 | */ | |
7def8a4b | 3838 | static char *CMP_OR_S(uint64 instruction, Dis_info *info) |
89a955e8 | 3839 | { |
17ce2f00 | 3840 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 3841 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 3842 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 | 3843 | |
3f2aec07 ML |
3844 | const char *fd = FPR(fd_value, info); |
3845 | const char *fs = FPR(fs_value, info); | |
3846 | const char *ft = FPR(ft_value, info); | |
89a955e8 | 3847 | |
c5231692 | 3848 | return img_format("CMP.OR.S %s, %s, %s", fd, fs, ft); |
89a955e8 AM |
3849 | } |
3850 | ||
3851 | ||
3852 | /* | |
3853 | * | |
3854 | * | |
3855 | * 3 2 1 | |
3856 | * 10987654321098765432109876543210 | |
3857 | * 001000 x1110000101 | |
3858 | * rt ----- | |
3859 | * rs ----- | |
3860 | * rd ----- | |
3861 | */ | |
7def8a4b | 3862 | static char *CMP_SAF_D(uint64 instruction, Dis_info *info) |
89a955e8 | 3863 | { |
17ce2f00 | 3864 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 3865 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 3866 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 | 3867 | |
3f2aec07 ML |
3868 | const char *fd = FPR(fd_value, info); |
3869 | const char *fs = FPR(fs_value, info); | |
3870 | const char *ft = FPR(ft_value, info); | |
89a955e8 | 3871 | |
c5231692 | 3872 | return img_format("CMP.SAF.D %s, %s, %s", fd, fs, ft); |
89a955e8 AM |
3873 | } |
3874 | ||
3875 | ||
3876 | /* | |
3877 | * | |
3878 | * | |
3879 | * 3 2 1 | |
3880 | * 10987654321098765432109876543210 | |
3881 | * 001000 x1110000101 | |
3882 | * rt ----- | |
3883 | * rs ----- | |
3884 | * rd ----- | |
3885 | */ | |
7def8a4b | 3886 | static char *CMP_SAF_S(uint64 instruction, Dis_info *info) |
89a955e8 | 3887 | { |
17ce2f00 | 3888 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 3889 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 3890 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 | 3891 | |
3f2aec07 ML |
3892 | const char *fd = FPR(fd_value, info); |
3893 | const char *fs = FPR(fs_value, info); | |
3894 | const char *ft = FPR(ft_value, info); | |
89a955e8 | 3895 | |
c5231692 | 3896 | return img_format("CMP.SAF.S %s, %s, %s", fd, fs, ft); |
89a955e8 AM |
3897 | } |
3898 | ||
3899 | ||
3900 | /* | |
3901 | * | |
3902 | * | |
3903 | * 3 2 1 | |
3904 | * 10987654321098765432109876543210 | |
3905 | * 001000 x1110000101 | |
3906 | * rt ----- | |
3907 | * rs ----- | |
3908 | * rd ----- | |
3909 | */ | |
7def8a4b | 3910 | static char *CMP_SEQ_D(uint64 instruction, Dis_info *info) |
89a955e8 | 3911 | { |
17ce2f00 | 3912 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 3913 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 3914 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 | 3915 | |
3f2aec07 ML |
3916 | const char *fd = FPR(fd_value, info); |
3917 | const char *fs = FPR(fs_value, info); | |
3918 | const char *ft = FPR(ft_value, info); | |
89a955e8 | 3919 | |
c5231692 | 3920 | return img_format("CMP.SEQ.D %s, %s, %s", fd, fs, ft); |
89a955e8 AM |
3921 | } |
3922 | ||
3923 | ||
3924 | /* | |
3925 | * | |
3926 | * | |
3927 | * 3 2 1 | |
3928 | * 10987654321098765432109876543210 | |
3929 | * 001000 x1110000101 | |
3930 | * rt ----- | |
3931 | * rs ----- | |
3932 | * rd ----- | |
3933 | */ | |
7def8a4b | 3934 | static char *CMP_SEQ_S(uint64 instruction, Dis_info *info) |
89a955e8 | 3935 | { |
17ce2f00 | 3936 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 3937 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 3938 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 | 3939 | |
3f2aec07 ML |
3940 | const char *fd = FPR(fd_value, info); |
3941 | const char *fs = FPR(fs_value, info); | |
3942 | const char *ft = FPR(ft_value, info); | |
89a955e8 | 3943 | |
c5231692 | 3944 | return img_format("CMP.SEQ.S %s, %s, %s", fd, fs, ft); |
89a955e8 AM |
3945 | } |
3946 | ||
3947 | ||
3948 | /* | |
3949 | * | |
3950 | * | |
3951 | * 3 2 1 | |
3952 | * 10987654321098765432109876543210 | |
3953 | * 001000 x1110000101 | |
3954 | * rt ----- | |
3955 | * rs ----- | |
3956 | * rd ----- | |
3957 | */ | |
7def8a4b | 3958 | static char *CMP_SLE_D(uint64 instruction, Dis_info *info) |
89a955e8 | 3959 | { |
17ce2f00 | 3960 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 3961 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 3962 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 | 3963 | |
3f2aec07 ML |
3964 | const char *fd = FPR(fd_value, info); |
3965 | const char *fs = FPR(fs_value, info); | |
3966 | const char *ft = FPR(ft_value, info); | |
89a955e8 | 3967 | |
c5231692 | 3968 | return img_format("CMP.SLE.D %s, %s, %s", fd, fs, ft); |
89a955e8 AM |
3969 | } |
3970 | ||
3971 | ||
3972 | /* | |
3973 | * | |
3974 | * | |
3975 | * 3 2 1 | |
3976 | * 10987654321098765432109876543210 | |
3977 | * 001000 x1110000101 | |
3978 | * rt ----- | |
3979 | * rs ----- | |
3980 | * rd ----- | |
3981 | */ | |
7def8a4b | 3982 | static char *CMP_SLE_S(uint64 instruction, Dis_info *info) |
89a955e8 | 3983 | { |
17ce2f00 | 3984 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 3985 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 3986 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 | 3987 | |
3f2aec07 ML |
3988 | const char *fd = FPR(fd_value, info); |
3989 | const char *fs = FPR(fs_value, info); | |
3990 | const char *ft = FPR(ft_value, info); | |
89a955e8 | 3991 | |
c5231692 | 3992 | return img_format("CMP.SLE.S %s, %s, %s", fd, fs, ft); |
89a955e8 AM |
3993 | } |
3994 | ||
3995 | ||
3996 | /* | |
3997 | * | |
3998 | * | |
3999 | * 3 2 1 | |
4000 | * 10987654321098765432109876543210 | |
4001 | * 001000 x1110000101 | |
4002 | * rt ----- | |
4003 | * rs ----- | |
4004 | * rd ----- | |
4005 | */ | |
7def8a4b | 4006 | static char *CMP_SLT_D(uint64 instruction, Dis_info *info) |
89a955e8 | 4007 | { |
17ce2f00 | 4008 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 4009 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 4010 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 | 4011 | |
3f2aec07 ML |
4012 | const char *fd = FPR(fd_value, info); |
4013 | const char *fs = FPR(fs_value, info); | |
4014 | const char *ft = FPR(ft_value, info); | |
89a955e8 | 4015 | |
c5231692 | 4016 | return img_format("CMP.SLT.D %s, %s, %s", fd, fs, ft); |
89a955e8 AM |
4017 | } |
4018 | ||
4019 | ||
4020 | /* | |
4021 | * | |
4022 | * | |
4023 | * 3 2 1 | |
4024 | * 10987654321098765432109876543210 | |
4025 | * 001000 x1110000101 | |
4026 | * rt ----- | |
4027 | * rs ----- | |
4028 | * rd ----- | |
4029 | */ | |
7def8a4b | 4030 | static char *CMP_SLT_S(uint64 instruction, Dis_info *info) |
89a955e8 | 4031 | { |
17ce2f00 | 4032 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 4033 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 4034 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 | 4035 | |
3f2aec07 ML |
4036 | const char *fd = FPR(fd_value, info); |
4037 | const char *fs = FPR(fs_value, info); | |
4038 | const char *ft = FPR(ft_value, info); | |
89a955e8 | 4039 | |
c5231692 | 4040 | return img_format("CMP.SLT.S %s, %s, %s", fd, fs, ft); |
89a955e8 AM |
4041 | } |
4042 | ||
4043 | ||
4044 | /* | |
4045 | * | |
4046 | * | |
4047 | * 3 2 1 | |
4048 | * 10987654321098765432109876543210 | |
4049 | * 001000 x1110000101 | |
4050 | * rt ----- | |
4051 | * rs ----- | |
4052 | * rd ----- | |
4053 | */ | |
7def8a4b | 4054 | static char *CMP_SNE_D(uint64 instruction, Dis_info *info) |
89a955e8 | 4055 | { |
17ce2f00 | 4056 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 4057 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 4058 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 | 4059 | |
3f2aec07 ML |
4060 | const char *fd = FPR(fd_value, info); |
4061 | const char *fs = FPR(fs_value, info); | |
4062 | const char *ft = FPR(ft_value, info); | |
89a955e8 | 4063 | |
c5231692 | 4064 | return img_format("CMP.SNE.D %s, %s, %s", fd, fs, ft); |
89a955e8 AM |
4065 | } |
4066 | ||
4067 | ||
4068 | /* | |
4069 | * | |
4070 | * | |
4071 | * 3 2 1 | |
4072 | * 10987654321098765432109876543210 | |
4073 | * 001000 x1110000101 | |
4074 | * rt ----- | |
4075 | * rs ----- | |
4076 | * rd ----- | |
4077 | */ | |
7def8a4b | 4078 | static char *CMP_SNE_S(uint64 instruction, Dis_info *info) |
89a955e8 | 4079 | { |
17ce2f00 | 4080 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 4081 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 4082 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 | 4083 | |
3f2aec07 ML |
4084 | const char *fd = FPR(fd_value, info); |
4085 | const char *fs = FPR(fs_value, info); | |
4086 | const char *ft = FPR(ft_value, info); | |
89a955e8 | 4087 | |
c5231692 | 4088 | return img_format("CMP.SNE.S %s, %s, %s", fd, fs, ft); |
89a955e8 AM |
4089 | } |
4090 | ||
4091 | ||
4092 | /* | |
4093 | * | |
4094 | * | |
4095 | * 3 2 1 | |
4096 | * 10987654321098765432109876543210 | |
4097 | * 001000 x1110000101 | |
4098 | * rt ----- | |
4099 | * rs ----- | |
4100 | * rd ----- | |
4101 | */ | |
7def8a4b | 4102 | static char *CMP_SOR_D(uint64 instruction, Dis_info *info) |
89a955e8 | 4103 | { |
17ce2f00 | 4104 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 4105 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 4106 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 | 4107 | |
3f2aec07 ML |
4108 | const char *fd = FPR(fd_value, info); |
4109 | const char *fs = FPR(fs_value, info); | |
4110 | const char *ft = FPR(ft_value, info); | |
89a955e8 | 4111 | |
c5231692 | 4112 | return img_format("CMP.SOR.D %s, %s, %s", fd, fs, ft); |
89a955e8 AM |
4113 | } |
4114 | ||
4115 | ||
4116 | /* | |
4117 | * | |
4118 | * | |
4119 | * 3 2 1 | |
4120 | * 10987654321098765432109876543210 | |
4121 | * 001000 x1110000101 | |
4122 | * rt ----- | |
4123 | * rs ----- | |
4124 | * rd ----- | |
4125 | */ | |
7def8a4b | 4126 | static char *CMP_SOR_S(uint64 instruction, Dis_info *info) |
89a955e8 | 4127 | { |
17ce2f00 | 4128 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 4129 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 4130 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 | 4131 | |
3f2aec07 ML |
4132 | const char *fd = FPR(fd_value, info); |
4133 | const char *fs = FPR(fs_value, info); | |
4134 | const char *ft = FPR(ft_value, info); | |
89a955e8 | 4135 | |
c5231692 | 4136 | return img_format("CMP.SOR.S %s, %s, %s", fd, fs, ft); |
89a955e8 AM |
4137 | } |
4138 | ||
4139 | ||
4140 | /* | |
4141 | * | |
4142 | * | |
4143 | * 3 2 1 | |
4144 | * 10987654321098765432109876543210 | |
4145 | * 001000 x1110000101 | |
4146 | * rt ----- | |
4147 | * rs ----- | |
4148 | * rd ----- | |
4149 | */ | |
7def8a4b | 4150 | static char *CMP_SUEQ_D(uint64 instruction, Dis_info *info) |
89a955e8 | 4151 | { |
17ce2f00 | 4152 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 4153 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 4154 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 | 4155 | |
3f2aec07 ML |
4156 | const char *fd = FPR(fd_value, info); |
4157 | const char *fs = FPR(fs_value, info); | |
4158 | const char *ft = FPR(ft_value, info); | |
89a955e8 | 4159 | |
c5231692 | 4160 | return img_format("CMP.SUEQ.D %s, %s, %s", fd, fs, ft); |
89a955e8 AM |
4161 | } |
4162 | ||
4163 | ||
4164 | /* | |
4165 | * | |
4166 | * | |
4167 | * 3 2 1 | |
4168 | * 10987654321098765432109876543210 | |
4169 | * 001000 x1110000101 | |
4170 | * rt ----- | |
4171 | * rs ----- | |
4172 | * rd ----- | |
4173 | */ | |
7def8a4b | 4174 | static char *CMP_SUEQ_S(uint64 instruction, Dis_info *info) |
89a955e8 | 4175 | { |
17ce2f00 | 4176 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 4177 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 4178 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 | 4179 | |
3f2aec07 ML |
4180 | const char *fd = FPR(fd_value, info); |
4181 | const char *fs = FPR(fs_value, info); | |
4182 | const char *ft = FPR(ft_value, info); | |
89a955e8 | 4183 | |
c5231692 | 4184 | return img_format("CMP.SUEQ.S %s, %s, %s", fd, fs, ft); |
89a955e8 AM |
4185 | } |
4186 | ||
4187 | ||
4188 | /* | |
4189 | * | |
4190 | * | |
4191 | * 3 2 1 | |
4192 | * 10987654321098765432109876543210 | |
4193 | * 001000 x1110000101 | |
4194 | * rt ----- | |
4195 | * rs ----- | |
4196 | * rd ----- | |
4197 | */ | |
7def8a4b | 4198 | static char *CMP_SULE_D(uint64 instruction, Dis_info *info) |
89a955e8 | 4199 | { |
17ce2f00 | 4200 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 4201 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 4202 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 | 4203 | |
3f2aec07 ML |
4204 | const char *fd = FPR(fd_value, info); |
4205 | const char *fs = FPR(fs_value, info); | |
4206 | const char *ft = FPR(ft_value, info); | |
89a955e8 | 4207 | |
c5231692 | 4208 | return img_format("CMP.SULE.D %s, %s, %s", fd, fs, ft); |
89a955e8 AM |
4209 | } |
4210 | ||
4211 | ||
4212 | /* | |
4213 | * | |
4214 | * | |
4215 | * 3 2 1 | |
4216 | * 10987654321098765432109876543210 | |
4217 | * 001000 x1110000101 | |
4218 | * rt ----- | |
4219 | * rs ----- | |
4220 | * rd ----- | |
4221 | */ | |
7def8a4b | 4222 | static char *CMP_SULE_S(uint64 instruction, Dis_info *info) |
89a955e8 | 4223 | { |
17ce2f00 | 4224 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 4225 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 4226 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 | 4227 | |
3f2aec07 ML |
4228 | const char *fd = FPR(fd_value, info); |
4229 | const char *fs = FPR(fs_value, info); | |
4230 | const char *ft = FPR(ft_value, info); | |
89a955e8 | 4231 | |
c5231692 | 4232 | return img_format("CMP.SULE.S %s, %s, %s", fd, fs, ft); |
89a955e8 AM |
4233 | } |
4234 | ||
4235 | ||
4236 | /* | |
4237 | * | |
4238 | * | |
4239 | * 3 2 1 | |
4240 | * 10987654321098765432109876543210 | |
4241 | * 001000 x1110000101 | |
4242 | * rt ----- | |
4243 | * rs ----- | |
4244 | * rd ----- | |
4245 | */ | |
7def8a4b | 4246 | static char *CMP_SULT_D(uint64 instruction, Dis_info *info) |
89a955e8 | 4247 | { |
17ce2f00 | 4248 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 4249 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 4250 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 | 4251 | |
3f2aec07 ML |
4252 | const char *fd = FPR(fd_value, info); |
4253 | const char *fs = FPR(fs_value, info); | |
4254 | const char *ft = FPR(ft_value, info); | |
89a955e8 | 4255 | |
c5231692 | 4256 | return img_format("CMP.SULT.D %s, %s, %s", fd, fs, ft); |
89a955e8 AM |
4257 | } |
4258 | ||
4259 | ||
4260 | /* | |
4261 | * | |
4262 | * | |
4263 | * 3 2 1 | |
4264 | * 10987654321098765432109876543210 | |
4265 | * 001000 x1110000101 | |
4266 | * rt ----- | |
4267 | * rs ----- | |
4268 | * rd ----- | |
4269 | */ | |
7def8a4b | 4270 | static char *CMP_SULT_S(uint64 instruction, Dis_info *info) |
89a955e8 | 4271 | { |
17ce2f00 | 4272 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 4273 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 4274 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 | 4275 | |
3f2aec07 ML |
4276 | const char *fd = FPR(fd_value, info); |
4277 | const char *fs = FPR(fs_value, info); | |
4278 | const char *ft = FPR(ft_value, info); | |
89a955e8 | 4279 | |
c5231692 | 4280 | return img_format("CMP.SULT.S %s, %s, %s", fd, fs, ft); |
89a955e8 AM |
4281 | } |
4282 | ||
4283 | ||
4284 | /* | |
4285 | * | |
4286 | * | |
4287 | * 3 2 1 | |
4288 | * 10987654321098765432109876543210 | |
4289 | * 001000 x1110000101 | |
4290 | * rt ----- | |
4291 | * rs ----- | |
4292 | * rd ----- | |
4293 | */ | |
7def8a4b | 4294 | static char *CMP_SUN_D(uint64 instruction, Dis_info *info) |
89a955e8 | 4295 | { |
17ce2f00 | 4296 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 4297 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 4298 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 | 4299 | |
3f2aec07 ML |
4300 | const char *fd = FPR(fd_value, info); |
4301 | const char *fs = FPR(fs_value, info); | |
4302 | const char *ft = FPR(ft_value, info); | |
89a955e8 | 4303 | |
c5231692 | 4304 | return img_format("CMP.SUN.D %s, %s, %s", fd, fs, ft); |
89a955e8 AM |
4305 | } |
4306 | ||
4307 | ||
4308 | /* | |
4309 | * | |
4310 | * | |
4311 | * 3 2 1 | |
4312 | * 10987654321098765432109876543210 | |
4313 | * 001000 x1110000101 | |
4314 | * rt ----- | |
4315 | * rs ----- | |
4316 | * rd ----- | |
4317 | */ | |
7def8a4b | 4318 | static char *CMP_SUNE_D(uint64 instruction, Dis_info *info) |
89a955e8 | 4319 | { |
17ce2f00 | 4320 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 4321 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 4322 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 | 4323 | |
3f2aec07 ML |
4324 | const char *fd = FPR(fd_value, info); |
4325 | const char *fs = FPR(fs_value, info); | |
4326 | const char *ft = FPR(ft_value, info); | |
89a955e8 | 4327 | |
c5231692 | 4328 | return img_format("CMP.SUNE.D %s, %s, %s", fd, fs, ft); |
89a955e8 AM |
4329 | } |
4330 | ||
4331 | ||
4332 | /* | |
4333 | * | |
4334 | * | |
4335 | * 3 2 1 | |
4336 | * 10987654321098765432109876543210 | |
4337 | * 001000 x1110000101 | |
4338 | * rt ----- | |
4339 | * rs ----- | |
4340 | * rd ----- | |
4341 | */ | |
7def8a4b | 4342 | static char *CMP_SUNE_S(uint64 instruction, Dis_info *info) |
89a955e8 | 4343 | { |
17ce2f00 | 4344 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 4345 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 4346 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 | 4347 | |
3f2aec07 ML |
4348 | const char *fd = FPR(fd_value, info); |
4349 | const char *fs = FPR(fs_value, info); | |
4350 | const char *ft = FPR(ft_value, info); | |
89a955e8 | 4351 | |
c5231692 | 4352 | return img_format("CMP.SUNE.S %s, %s, %s", fd, fs, ft); |
89a955e8 AM |
4353 | } |
4354 | ||
4355 | ||
4356 | /* | |
4357 | * | |
4358 | * | |
4359 | * 3 2 1 | |
4360 | * 10987654321098765432109876543210 | |
4361 | * 001000 x1110000101 | |
4362 | * rt ----- | |
4363 | * rs ----- | |
4364 | * rd ----- | |
4365 | */ | |
7def8a4b | 4366 | static char *CMP_SUN_S(uint64 instruction, Dis_info *info) |
89a955e8 | 4367 | { |
17ce2f00 | 4368 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 4369 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 4370 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 | 4371 | |
3f2aec07 ML |
4372 | const char *fd = FPR(fd_value, info); |
4373 | const char *fs = FPR(fs_value, info); | |
4374 | const char *ft = FPR(ft_value, info); | |
89a955e8 | 4375 | |
c5231692 | 4376 | return img_format("CMP.SUN.S %s, %s, %s", fd, fs, ft); |
89a955e8 AM |
4377 | } |
4378 | ||
4379 | ||
4380 | /* | |
4381 | * | |
4382 | * | |
4383 | * 3 2 1 | |
4384 | * 10987654321098765432109876543210 | |
4385 | * 001000 x1110000101 | |
4386 | * rt ----- | |
4387 | * rs ----- | |
4388 | * rd ----- | |
4389 | */ | |
7def8a4b | 4390 | static char *CMP_UEQ_D(uint64 instruction, Dis_info *info) |
89a955e8 | 4391 | { |
17ce2f00 | 4392 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 4393 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 4394 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 | 4395 | |
3f2aec07 ML |
4396 | const char *fd = FPR(fd_value, info); |
4397 | const char *fs = FPR(fs_value, info); | |
4398 | const char *ft = FPR(ft_value, info); | |
89a955e8 | 4399 | |
c5231692 | 4400 | return img_format("CMP.UEQ.D %s, %s, %s", fd, fs, ft); |
89a955e8 AM |
4401 | } |
4402 | ||
4403 | ||
4404 | /* | |
4405 | * | |
4406 | * | |
4407 | * 3 2 1 | |
4408 | * 10987654321098765432109876543210 | |
4409 | * 001000 x1110000101 | |
4410 | * rt ----- | |
4411 | * rs ----- | |
4412 | * rd ----- | |
4413 | */ | |
7def8a4b | 4414 | static char *CMP_UEQ_S(uint64 instruction, Dis_info *info) |
89a955e8 | 4415 | { |
17ce2f00 | 4416 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 4417 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 4418 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 | 4419 | |
3f2aec07 ML |
4420 | const char *fd = FPR(fd_value, info); |
4421 | const char *fs = FPR(fs_value, info); | |
4422 | const char *ft = FPR(ft_value, info); | |
89a955e8 | 4423 | |
c5231692 | 4424 | return img_format("CMP.UEQ.S %s, %s, %s", fd, fs, ft); |
89a955e8 AM |
4425 | } |
4426 | ||
4427 | ||
4428 | /* | |
4429 | * | |
4430 | * | |
4431 | * 3 2 1 | |
4432 | * 10987654321098765432109876543210 | |
4433 | * 001000 x1110000101 | |
4434 | * rt ----- | |
4435 | * rs ----- | |
4436 | * rd ----- | |
4437 | */ | |
7def8a4b | 4438 | static char *CMP_ULE_D(uint64 instruction, Dis_info *info) |
89a955e8 | 4439 | { |
17ce2f00 | 4440 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 4441 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 4442 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 | 4443 | |
3f2aec07 ML |
4444 | const char *fd = FPR(fd_value, info); |
4445 | const char *fs = FPR(fs_value, info); | |
4446 | const char *ft = FPR(ft_value, info); | |
89a955e8 | 4447 | |
c5231692 | 4448 | return img_format("CMP.ULE.D %s, %s, %s", fd, fs, ft); |
89a955e8 AM |
4449 | } |
4450 | ||
4451 | ||
4452 | /* | |
4453 | * | |
4454 | * | |
4455 | * 3 2 1 | |
4456 | * 10987654321098765432109876543210 | |
4457 | * 001000 x1110000101 | |
4458 | * rt ----- | |
4459 | * rs ----- | |
4460 | * rd ----- | |
4461 | */ | |
7def8a4b | 4462 | static char *CMP_ULE_S(uint64 instruction, Dis_info *info) |
89a955e8 | 4463 | { |
17ce2f00 | 4464 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 4465 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 4466 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 | 4467 | |
3f2aec07 ML |
4468 | const char *fd = FPR(fd_value, info); |
4469 | const char *fs = FPR(fs_value, info); | |
4470 | const char *ft = FPR(ft_value, info); | |
89a955e8 | 4471 | |
c5231692 | 4472 | return img_format("CMP.ULE.S %s, %s, %s", fd, fs, ft); |
89a955e8 AM |
4473 | } |
4474 | ||
4475 | ||
4476 | /* | |
4477 | * | |
4478 | * | |
4479 | * 3 2 1 | |
4480 | * 10987654321098765432109876543210 | |
4481 | * 001000 x1110000101 | |
4482 | * rt ----- | |
4483 | * rs ----- | |
4484 | * rd ----- | |
4485 | */ | |
7def8a4b | 4486 | static char *CMP_ULT_D(uint64 instruction, Dis_info *info) |
89a955e8 | 4487 | { |
17ce2f00 | 4488 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 4489 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 4490 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 | 4491 | |
3f2aec07 ML |
4492 | const char *fd = FPR(fd_value, info); |
4493 | const char *fs = FPR(fs_value, info); | |
4494 | const char *ft = FPR(ft_value, info); | |
89a955e8 | 4495 | |
c5231692 | 4496 | return img_format("CMP.ULT.D %s, %s, %s", fd, fs, ft); |
89a955e8 AM |
4497 | } |
4498 | ||
4499 | ||
4500 | /* | |
4501 | * | |
4502 | * | |
4503 | * 3 2 1 | |
4504 | * 10987654321098765432109876543210 | |
4505 | * 001000 x1110000101 | |
4506 | * rt ----- | |
4507 | * rs ----- | |
4508 | * rd ----- | |
4509 | */ | |
7def8a4b | 4510 | static char *CMP_ULT_S(uint64 instruction, Dis_info *info) |
89a955e8 | 4511 | { |
17ce2f00 | 4512 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 4513 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 4514 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 | 4515 | |
3f2aec07 ML |
4516 | const char *fd = FPR(fd_value, info); |
4517 | const char *fs = FPR(fs_value, info); | |
4518 | const char *ft = FPR(ft_value, info); | |
89a955e8 | 4519 | |
c5231692 | 4520 | return img_format("CMP.ULT.S %s, %s, %s", fd, fs, ft); |
89a955e8 AM |
4521 | } |
4522 | ||
4523 | ||
4524 | /* | |
4525 | * | |
4526 | * | |
4527 | * 3 2 1 | |
4528 | * 10987654321098765432109876543210 | |
4529 | * 001000 x1110000101 | |
4530 | * rt ----- | |
4531 | * rs ----- | |
4532 | * rd ----- | |
4533 | */ | |
7def8a4b | 4534 | static char *CMP_UN_D(uint64 instruction, Dis_info *info) |
89a955e8 | 4535 | { |
17ce2f00 | 4536 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 4537 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 4538 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 | 4539 | |
3f2aec07 ML |
4540 | const char *fd = FPR(fd_value, info); |
4541 | const char *fs = FPR(fs_value, info); | |
4542 | const char *ft = FPR(ft_value, info); | |
89a955e8 | 4543 | |
c5231692 | 4544 | return img_format("CMP.UN.D %s, %s, %s", fd, fs, ft); |
89a955e8 AM |
4545 | } |
4546 | ||
4547 | ||
4548 | /* | |
4549 | * | |
4550 | * | |
4551 | * 3 2 1 | |
4552 | * 10987654321098765432109876543210 | |
4553 | * 001000 x1110000101 | |
4554 | * rt ----- | |
4555 | * rs ----- | |
4556 | * rd ----- | |
4557 | */ | |
7def8a4b | 4558 | static char *CMP_UNE_D(uint64 instruction, Dis_info *info) |
89a955e8 | 4559 | { |
17ce2f00 | 4560 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 4561 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 4562 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 | 4563 | |
3f2aec07 ML |
4564 | const char *fd = FPR(fd_value, info); |
4565 | const char *fs = FPR(fs_value, info); | |
4566 | const char *ft = FPR(ft_value, info); | |
89a955e8 | 4567 | |
c5231692 | 4568 | return img_format("CMP.UNE.D %s, %s, %s", fd, fs, ft); |
89a955e8 AM |
4569 | } |
4570 | ||
4571 | ||
4572 | /* | |
4573 | * | |
4574 | * | |
4575 | * 3 2 1 | |
4576 | * 10987654321098765432109876543210 | |
4577 | * 001000 x1110000101 | |
4578 | * rt ----- | |
4579 | * rs ----- | |
4580 | * rd ----- | |
4581 | */ | |
7def8a4b | 4582 | static char *CMP_UNE_S(uint64 instruction, Dis_info *info) |
89a955e8 | 4583 | { |
17ce2f00 | 4584 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 4585 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 4586 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 | 4587 | |
3f2aec07 ML |
4588 | const char *fd = FPR(fd_value, info); |
4589 | const char *fs = FPR(fs_value, info); | |
4590 | const char *ft = FPR(ft_value, info); | |
89a955e8 | 4591 | |
c5231692 | 4592 | return img_format("CMP.UNE.S %s, %s, %s", fd, fs, ft); |
89a955e8 AM |
4593 | } |
4594 | ||
4595 | ||
4596 | /* | |
4597 | * | |
4598 | * | |
4599 | * 3 2 1 | |
4600 | * 10987654321098765432109876543210 | |
4601 | * 001000 x1110000101 | |
4602 | * rt ----- | |
4603 | * rs ----- | |
4604 | * rd ----- | |
4605 | */ | |
7def8a4b | 4606 | static char *CMP_UN_S(uint64 instruction, Dis_info *info) |
89a955e8 | 4607 | { |
17ce2f00 | 4608 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 4609 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 4610 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 | 4611 | |
3f2aec07 ML |
4612 | const char *fd = FPR(fd_value, info); |
4613 | const char *fs = FPR(fs_value, info); | |
4614 | const char *ft = FPR(ft_value, info); | |
89a955e8 | 4615 | |
c5231692 | 4616 | return img_format("CMP.UN.S %s, %s, %s", fd, fs, ft); |
89a955e8 AM |
4617 | } |
4618 | ||
4619 | ||
4620 | /* | |
5c65eed6 AM |
4621 | * [DSP] CMPGDU.EQ.QB rd, rs, rt - Compare unsigned vector of |
4622 | * four bytes and write result to GPR and DSPControl | |
89a955e8 AM |
4623 | * |
4624 | * 3 2 1 | |
4625 | * 10987654321098765432109876543210 | |
5c65eed6 | 4626 | * 001000 x0110000101 |
89a955e8 AM |
4627 | * rt ----- |
4628 | * rs ----- | |
4629 | * rd ----- | |
4630 | */ | |
7def8a4b | 4631 | static char *CMPGDU_EQ_QB(uint64 instruction, Dis_info *info) |
89a955e8 AM |
4632 | { |
4633 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 4634 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 4635 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 4636 | |
3f2aec07 ML |
4637 | const char *rd = GPR(rd_value, info); |
4638 | const char *rs = GPR(rs_value, info); | |
4639 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 4640 | |
c5231692 | 4641 | return img_format("CMPGDU.EQ.QB %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
4642 | } |
4643 | ||
4644 | ||
4645 | /* | |
5c65eed6 AM |
4646 | * [DSP] CMPGDU.LE.QB rd, rs, rt - Compare unsigned vector of |
4647 | * four bytes and write result to GPR and DSPControl | |
89a955e8 AM |
4648 | * |
4649 | * 3 2 1 | |
4650 | * 10987654321098765432109876543210 | |
5c65eed6 | 4651 | * 001000 x1000000101 |
89a955e8 AM |
4652 | * rt ----- |
4653 | * rs ----- | |
4654 | * rd ----- | |
4655 | */ | |
7def8a4b | 4656 | static char *CMPGDU_LE_QB(uint64 instruction, Dis_info *info) |
89a955e8 AM |
4657 | { |
4658 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 4659 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 4660 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 4661 | |
3f2aec07 ML |
4662 | const char *rd = GPR(rd_value, info); |
4663 | const char *rs = GPR(rs_value, info); | |
4664 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 4665 | |
c5231692 | 4666 | return img_format("CMPGDU.LE.QB %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
4667 | } |
4668 | ||
4669 | ||
4670 | /* | |
5c65eed6 AM |
4671 | * [DSP] CMPGDU.EQ.QB rd, rs, rt - Compare unsigned vector of |
4672 | * four bytes and write result to GPR and DSPControl | |
89a955e8 AM |
4673 | * |
4674 | * 3 2 1 | |
4675 | * 10987654321098765432109876543210 | |
5c65eed6 | 4676 | * 001000 x0111000101 |
89a955e8 AM |
4677 | * rt ----- |
4678 | * rs ----- | |
4679 | * rd ----- | |
4680 | */ | |
7def8a4b | 4681 | static char *CMPGDU_LT_QB(uint64 instruction, Dis_info *info) |
89a955e8 AM |
4682 | { |
4683 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 4684 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 4685 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 4686 | |
3f2aec07 ML |
4687 | const char *rd = GPR(rd_value, info); |
4688 | const char *rs = GPR(rs_value, info); | |
4689 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 4690 | |
c5231692 | 4691 | return img_format("CMPGDU.LT.QB %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
4692 | } |
4693 | ||
4694 | ||
4695 | /* | |
5c65eed6 AM |
4696 | * [DSP] CMPGU.EQ.QB rd, rs, rt - Compare vectors of unsigned |
4697 | * byte values and write result to a GPR | |
89a955e8 AM |
4698 | * |
4699 | * 3 2 1 | |
4700 | * 10987654321098765432109876543210 | |
5c65eed6 | 4701 | * 001000 x0011000101 |
89a955e8 AM |
4702 | * rt ----- |
4703 | * rs ----- | |
4704 | * rd ----- | |
4705 | */ | |
7def8a4b | 4706 | static char *CMPGU_EQ_QB(uint64 instruction, Dis_info *info) |
89a955e8 AM |
4707 | { |
4708 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 4709 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 4710 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 4711 | |
3f2aec07 ML |
4712 | const char *rd = GPR(rd_value, info); |
4713 | const char *rs = GPR(rs_value, info); | |
4714 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 4715 | |
c5231692 | 4716 | return img_format("CMPGU.EQ.QB %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
4717 | } |
4718 | ||
4719 | ||
4720 | /* | |
5c65eed6 AM |
4721 | * [DSP] CMPGU.LE.QB rd, rs, rt - Compare vectors of unsigned |
4722 | * byte values and write result to a GPR | |
89a955e8 AM |
4723 | * |
4724 | * 3 2 1 | |
4725 | * 10987654321098765432109876543210 | |
5c65eed6 | 4726 | * 001000 x0101000101 |
89a955e8 AM |
4727 | * rt ----- |
4728 | * rs ----- | |
4729 | * rd ----- | |
4730 | */ | |
7def8a4b | 4731 | static char *CMPGU_LE_QB(uint64 instruction, Dis_info *info) |
89a955e8 AM |
4732 | { |
4733 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 4734 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 4735 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 4736 | |
3f2aec07 ML |
4737 | const char *rd = GPR(rd_value, info); |
4738 | const char *rs = GPR(rs_value, info); | |
4739 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 4740 | |
c5231692 | 4741 | return img_format("CMPGU.LE.QB %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
4742 | } |
4743 | ||
4744 | ||
4745 | /* | |
5c65eed6 AM |
4746 | * [DSP] CMPGU.LT.QB rd, rs, rt - Compare vectors of unsigned |
4747 | * byte values and write result to a GPR | |
89a955e8 AM |
4748 | * |
4749 | * 3 2 1 | |
4750 | * 10987654321098765432109876543210 | |
5c65eed6 | 4751 | * 001000 x0100000101 |
89a955e8 AM |
4752 | * rt ----- |
4753 | * rs ----- | |
4754 | * rd ----- | |
4755 | */ | |
7def8a4b | 4756 | static char *CMPGU_LT_QB(uint64 instruction, Dis_info *info) |
89a955e8 AM |
4757 | { |
4758 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 4759 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 4760 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 4761 | |
3f2aec07 ML |
4762 | const char *rd = GPR(rd_value, info); |
4763 | const char *rs = GPR(rs_value, info); | |
4764 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 4765 | |
c5231692 | 4766 | return img_format("CMPGU.LT.QB %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
4767 | } |
4768 | ||
4769 | ||
4770 | /* | |
5c65eed6 AM |
4771 | * [DSP] CMPU.EQ.QB rd, rs, rt - Compare vectors of unsigned |
4772 | * byte values | |
89a955e8 AM |
4773 | * |
4774 | * 3 2 1 | |
4775 | * 10987654321098765432109876543210 | |
5c65eed6 | 4776 | * 001000 xxxxxx1001000101 |
89a955e8 AM |
4777 | * rt ----- |
4778 | * rs ----- | |
89a955e8 | 4779 | */ |
7def8a4b | 4780 | static char *CMPU_EQ_QB(uint64 instruction, Dis_info *info) |
89a955e8 AM |
4781 | { |
4782 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
4783 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
4784 | ||
3f2aec07 ML |
4785 | const char *rs = GPR(rs_value, info); |
4786 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 4787 | |
c5231692 | 4788 | return img_format("CMPU.EQ.QB %s, %s", rs, rt); |
89a955e8 AM |
4789 | } |
4790 | ||
4791 | ||
4792 | /* | |
5c65eed6 AM |
4793 | * [DSP] CMPU.LE.QB rd, rs, rt - Compare vectors of unsigned |
4794 | * byte values | |
89a955e8 AM |
4795 | * |
4796 | * 3 2 1 | |
4797 | * 10987654321098765432109876543210 | |
5c65eed6 | 4798 | * 001000 xxxxxx1011000101 |
89a955e8 AM |
4799 | * rt ----- |
4800 | * rs ----- | |
89a955e8 | 4801 | */ |
7def8a4b | 4802 | static char *CMPU_LE_QB(uint64 instruction, Dis_info *info) |
89a955e8 AM |
4803 | { |
4804 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
4805 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
4806 | ||
3f2aec07 ML |
4807 | const char *rs = GPR(rs_value, info); |
4808 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 4809 | |
c5231692 | 4810 | return img_format("CMPU.LE.QB %s, %s", rs, rt); |
89a955e8 AM |
4811 | } |
4812 | ||
4813 | ||
4814 | /* | |
5c65eed6 AM |
4815 | * [DSP] CMPU.LT.QB rd, rs, rt - Compare vectors of unsigned |
4816 | * byte values | |
89a955e8 AM |
4817 | * |
4818 | * 3 2 1 | |
4819 | * 10987654321098765432109876543210 | |
5c65eed6 | 4820 | * 001000 xxxxxx1010000101 |
89a955e8 AM |
4821 | * rt ----- |
4822 | * rs ----- | |
89a955e8 | 4823 | */ |
7def8a4b | 4824 | static char *CMPU_LT_QB(uint64 instruction, Dis_info *info) |
89a955e8 AM |
4825 | { |
4826 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
4827 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
4828 | ||
3f2aec07 ML |
4829 | const char *rs = GPR(rs_value, info); |
4830 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 4831 | |
c5231692 | 4832 | return img_format("CMPU.LT.QB %s, %s", rs, rt); |
89a955e8 AM |
4833 | } |
4834 | ||
4835 | ||
4836 | /* | |
4837 | * | |
4838 | * | |
4839 | * 3 2 1 | |
4840 | * 10987654321098765432109876543210 | |
4841 | * 001000 x1110000101 | |
4842 | * rt ----- | |
4843 | * rs ----- | |
4844 | * rd ----- | |
4845 | */ | |
7def8a4b | 4846 | static char *COP2_1(uint64 instruction, Dis_info *info) |
89a955e8 AM |
4847 | { |
4848 | uint64 cofun_value = extract_cofun_25_24_23(instruction); | |
4849 | ||
89a955e8 | 4850 | |
4066c152 | 4851 | return img_format("COP2_1 0x%" PRIx64, cofun_value); |
89a955e8 AM |
4852 | } |
4853 | ||
4854 | ||
4855 | /* | |
4856 | * | |
4857 | * | |
4858 | * 3 2 1 | |
4859 | * 10987654321098765432109876543210 | |
4860 | * 001000 x1110000101 | |
4861 | * rt ----- | |
4862 | * rs ----- | |
4863 | * rd ----- | |
4864 | */ | |
7def8a4b | 4865 | static char *CTC1(uint64 instruction, Dis_info *info) |
89a955e8 | 4866 | { |
89a955e8 | 4867 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); |
86b5f803 | 4868 | uint64 cs_value = extract_cs_20_19_18_17_16(instruction); |
89a955e8 | 4869 | |
3f2aec07 | 4870 | const char *rt = GPR(rt_value, info); |
89a955e8 | 4871 | |
043dc73c | 4872 | return img_format("CTC1 %s, CP%" PRIu64, rt, cs_value); |
89a955e8 AM |
4873 | } |
4874 | ||
4875 | ||
4876 | /* | |
4877 | * | |
4878 | * | |
4879 | * 3 2 1 | |
4880 | * 10987654321098765432109876543210 | |
4881 | * 001000 x1110000101 | |
4882 | * rt ----- | |
4883 | * rs ----- | |
4884 | * rd ----- | |
4885 | */ | |
7def8a4b | 4886 | static char *CTC2(uint64 instruction, Dis_info *info) |
89a955e8 | 4887 | { |
89a955e8 | 4888 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); |
86b5f803 | 4889 | uint64 cs_value = extract_cs_20_19_18_17_16(instruction); |
89a955e8 | 4890 | |
3f2aec07 | 4891 | const char *rt = GPR(rt_value, info); |
89a955e8 | 4892 | |
043dc73c | 4893 | return img_format("CTC2 %s, CP%" PRIu64, rt, cs_value); |
89a955e8 AM |
4894 | } |
4895 | ||
4896 | ||
4897 | /* | |
4898 | * | |
4899 | * | |
4900 | * 3 2 1 | |
4901 | * 10987654321098765432109876543210 | |
4902 | * 001000 x1110000101 | |
4903 | * rt ----- | |
4904 | * rs ----- | |
4905 | * rd ----- | |
4906 | */ | |
7def8a4b | 4907 | static char *CVT_D_L(uint64 instruction, Dis_info *info) |
89a955e8 | 4908 | { |
17ce2f00 | 4909 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 4910 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 | 4911 | |
3f2aec07 ML |
4912 | const char *ft = FPR(ft_value, info); |
4913 | const char *fs = FPR(fs_value, info); | |
89a955e8 | 4914 | |
c5231692 | 4915 | return img_format("CVT.D.L %s, %s", ft, fs); |
89a955e8 AM |
4916 | } |
4917 | ||
4918 | ||
4919 | /* | |
4920 | * | |
4921 | * | |
4922 | * 3 2 1 | |
4923 | * 10987654321098765432109876543210 | |
4924 | * 001000 x1110000101 | |
4925 | * rt ----- | |
4926 | * rs ----- | |
4927 | * rd ----- | |
4928 | */ | |
7def8a4b | 4929 | static char *CVT_D_S(uint64 instruction, Dis_info *info) |
89a955e8 | 4930 | { |
17ce2f00 | 4931 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 4932 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 | 4933 | |
3f2aec07 ML |
4934 | const char *ft = FPR(ft_value, info); |
4935 | const char *fs = FPR(fs_value, info); | |
89a955e8 | 4936 | |
c5231692 | 4937 | return img_format("CVT.D.S %s, %s", ft, fs); |
89a955e8 AM |
4938 | } |
4939 | ||
4940 | ||
4941 | /* | |
4942 | * | |
4943 | * | |
4944 | * 3 2 1 | |
4945 | * 10987654321098765432109876543210 | |
4946 | * 001000 x1110000101 | |
4947 | * rt ----- | |
4948 | * rs ----- | |
4949 | * rd ----- | |
4950 | */ | |
7def8a4b | 4951 | static char *CVT_D_W(uint64 instruction, Dis_info *info) |
89a955e8 | 4952 | { |
17ce2f00 | 4953 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 4954 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 | 4955 | |
3f2aec07 ML |
4956 | const char *ft = FPR(ft_value, info); |
4957 | const char *fs = FPR(fs_value, info); | |
89a955e8 | 4958 | |
c5231692 | 4959 | return img_format("CVT.D.W %s, %s", ft, fs); |
89a955e8 AM |
4960 | } |
4961 | ||
4962 | ||
4963 | /* | |
4964 | * | |
4965 | * | |
4966 | * 3 2 1 | |
4967 | * 10987654321098765432109876543210 | |
4968 | * 001000 x1110000101 | |
4969 | * rt ----- | |
4970 | * rs ----- | |
4971 | * rd ----- | |
4972 | */ | |
7def8a4b | 4973 | static char *CVT_L_D(uint64 instruction, Dis_info *info) |
89a955e8 | 4974 | { |
17ce2f00 | 4975 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 4976 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 | 4977 | |
3f2aec07 ML |
4978 | const char *ft = FPR(ft_value, info); |
4979 | const char *fs = FPR(fs_value, info); | |
89a955e8 | 4980 | |
c5231692 | 4981 | return img_format("CVT.L.D %s, %s", ft, fs); |
89a955e8 AM |
4982 | } |
4983 | ||
4984 | ||
4985 | /* | |
4986 | * | |
4987 | * | |
4988 | * 3 2 1 | |
4989 | * 10987654321098765432109876543210 | |
4990 | * 001000 x1110000101 | |
4991 | * rt ----- | |
4992 | * rs ----- | |
4993 | * rd ----- | |
4994 | */ | |
7def8a4b | 4995 | static char *CVT_L_S(uint64 instruction, Dis_info *info) |
89a955e8 | 4996 | { |
17ce2f00 | 4997 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 4998 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 | 4999 | |
3f2aec07 ML |
5000 | const char *ft = FPR(ft_value, info); |
5001 | const char *fs = FPR(fs_value, info); | |
89a955e8 | 5002 | |
c5231692 | 5003 | return img_format("CVT.L.S %s, %s", ft, fs); |
89a955e8 AM |
5004 | } |
5005 | ||
5006 | ||
5007 | /* | |
5008 | * | |
5009 | * | |
5010 | * 3 2 1 | |
5011 | * 10987654321098765432109876543210 | |
5012 | * 001000 x1110000101 | |
5013 | * rt ----- | |
5014 | * rs ----- | |
5015 | * rd ----- | |
5016 | */ | |
7def8a4b | 5017 | static char *CVT_S_D(uint64 instruction, Dis_info *info) |
89a955e8 | 5018 | { |
17ce2f00 | 5019 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 5020 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 | 5021 | |
3f2aec07 ML |
5022 | const char *ft = FPR(ft_value, info); |
5023 | const char *fs = FPR(fs_value, info); | |
89a955e8 | 5024 | |
c5231692 | 5025 | return img_format("CVT.S.D %s, %s", ft, fs); |
89a955e8 AM |
5026 | } |
5027 | ||
5028 | ||
5029 | /* | |
5030 | * | |
5031 | * | |
5032 | * 3 2 1 | |
5033 | * 10987654321098765432109876543210 | |
5034 | * 001000 x1110000101 | |
5035 | * rt ----- | |
5036 | * rs ----- | |
5037 | * rd ----- | |
5038 | */ | |
7def8a4b | 5039 | static char *CVT_S_L(uint64 instruction, Dis_info *info) |
89a955e8 | 5040 | { |
17ce2f00 | 5041 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 5042 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 | 5043 | |
3f2aec07 ML |
5044 | const char *ft = FPR(ft_value, info); |
5045 | const char *fs = FPR(fs_value, info); | |
89a955e8 | 5046 | |
c5231692 | 5047 | return img_format("CVT.S.L %s, %s", ft, fs); |
89a955e8 AM |
5048 | } |
5049 | ||
5050 | ||
5051 | /* | |
5052 | * | |
5053 | * | |
5054 | * 3 2 1 | |
5055 | * 10987654321098765432109876543210 | |
5056 | * 001000 x1110000101 | |
5057 | * rt ----- | |
5058 | * rs ----- | |
5059 | * rd ----- | |
5060 | */ | |
7def8a4b | 5061 | static char *CVT_S_PL(uint64 instruction, Dis_info *info) |
89a955e8 | 5062 | { |
17ce2f00 | 5063 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 5064 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 | 5065 | |
3f2aec07 ML |
5066 | const char *ft = FPR(ft_value, info); |
5067 | const char *fs = FPR(fs_value, info); | |
89a955e8 | 5068 | |
c5231692 | 5069 | return img_format("CVT.S.PL %s, %s", ft, fs); |
89a955e8 AM |
5070 | } |
5071 | ||
5072 | ||
5073 | /* | |
5074 | * | |
5075 | * | |
5076 | * 3 2 1 | |
5077 | * 10987654321098765432109876543210 | |
5078 | * 001000 x1110000101 | |
5079 | * rt ----- | |
5080 | * rs ----- | |
5081 | * rd ----- | |
5082 | */ | |
7def8a4b | 5083 | static char *CVT_S_PU(uint64 instruction, Dis_info *info) |
89a955e8 | 5084 | { |
17ce2f00 | 5085 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 5086 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 | 5087 | |
3f2aec07 ML |
5088 | const char *ft = FPR(ft_value, info); |
5089 | const char *fs = FPR(fs_value, info); | |
89a955e8 | 5090 | |
c5231692 | 5091 | return img_format("CVT.S.PU %s, %s", ft, fs); |
89a955e8 AM |
5092 | } |
5093 | ||
5094 | ||
5095 | /* | |
5096 | * | |
5097 | * | |
5098 | * 3 2 1 | |
5099 | * 10987654321098765432109876543210 | |
5100 | * 001000 x1110000101 | |
5101 | * rt ----- | |
5102 | * rs ----- | |
5103 | * rd ----- | |
5104 | */ | |
7def8a4b | 5105 | static char *CVT_S_W(uint64 instruction, Dis_info *info) |
89a955e8 | 5106 | { |
17ce2f00 | 5107 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 5108 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 | 5109 | |
3f2aec07 ML |
5110 | const char *ft = FPR(ft_value, info); |
5111 | const char *fs = FPR(fs_value, info); | |
89a955e8 | 5112 | |
c5231692 | 5113 | return img_format("CVT.S.W %s, %s", ft, fs); |
89a955e8 AM |
5114 | } |
5115 | ||
5116 | ||
5117 | /* | |
5118 | * | |
5119 | * | |
5120 | * 3 2 1 | |
5121 | * 10987654321098765432109876543210 | |
5122 | * 001000 x1110000101 | |
5123 | * rt ----- | |
5124 | * rs ----- | |
5125 | * rd ----- | |
5126 | */ | |
7def8a4b | 5127 | static char *CVT_W_D(uint64 instruction, Dis_info *info) |
89a955e8 | 5128 | { |
17ce2f00 | 5129 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 5130 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 | 5131 | |
3f2aec07 ML |
5132 | const char *ft = FPR(ft_value, info); |
5133 | const char *fs = FPR(fs_value, info); | |
89a955e8 | 5134 | |
c5231692 | 5135 | return img_format("CVT.W.D %s, %s", ft, fs); |
89a955e8 AM |
5136 | } |
5137 | ||
5138 | ||
5139 | /* | |
5140 | * | |
5141 | * | |
5142 | * 3 2 1 | |
5143 | * 10987654321098765432109876543210 | |
5144 | * 001000 x1110000101 | |
5145 | * rt ----- | |
5146 | * rs ----- | |
5147 | * rd ----- | |
5148 | */ | |
7def8a4b | 5149 | static char *CVT_W_S(uint64 instruction, Dis_info *info) |
89a955e8 | 5150 | { |
17ce2f00 | 5151 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 5152 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 | 5153 | |
3f2aec07 ML |
5154 | const char *ft = FPR(ft_value, info); |
5155 | const char *fs = FPR(fs_value, info); | |
89a955e8 | 5156 | |
c5231692 | 5157 | return img_format("CVT.W.S %s, %s", ft, fs); |
89a955e8 AM |
5158 | } |
5159 | ||
5160 | ||
5161 | /* | |
5162 | * | |
5163 | * | |
5164 | * 3 2 1 | |
5165 | * 10987654321098765432109876543210 | |
5166 | * 001000 x1110000101 | |
5167 | * rt ----- | |
5168 | * rs ----- | |
5169 | * rd ----- | |
5170 | */ | |
7def8a4b | 5171 | static char *DADDIU_48_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
5172 | { |
5173 | uint64 rt_value = extract_rt_41_40_39_38_37(instruction); | |
d3605cc0 | 5174 | int64 s_value = extract_s__se31_15_to_0_31_to_16(instruction); |
89a955e8 | 5175 | |
3f2aec07 | 5176 | const char *rt = GPR(rt_value, info); |
89a955e8 | 5177 | |
04849c94 | 5178 | return img_format("DADDIU %s, %" PRId64, rt, s_value); |
89a955e8 AM |
5179 | } |
5180 | ||
5181 | ||
5182 | /* | |
5183 | * | |
5184 | * | |
5185 | * 3 2 1 | |
5186 | * 10987654321098765432109876543210 | |
5187 | * 001000 x1110000101 | |
5188 | * rt ----- | |
5189 | * rs ----- | |
5190 | * rd ----- | |
5191 | */ | |
7def8a4b | 5192 | static char *DADDIU_NEG_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
5193 | { |
5194 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 5195 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 5196 | uint64 u_value = extract_u_11_10_9_8_7_6_5_4_3_2_1_0(instruction); |
89a955e8 | 5197 | |
3f2aec07 ML |
5198 | const char *rt = GPR(rt_value, info); |
5199 | const char *rs = GPR(rs_value, info); | |
4066c152 | 5200 | int64 u = neg_copy(u_value); |
89a955e8 | 5201 | |
4066c152 | 5202 | return img_format("DADDIU %s, %s, %" PRId64, rt, rs, u); |
89a955e8 AM |
5203 | } |
5204 | ||
5205 | ||
5206 | /* | |
5207 | * | |
5208 | * | |
5209 | * 3 2 1 | |
5210 | * 10987654321098765432109876543210 | |
5211 | * 001000 x1110000101 | |
5212 | * rt ----- | |
5213 | * rs ----- | |
5214 | * rd ----- | |
5215 | */ | |
7def8a4b | 5216 | static char *DADDIU_U12_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
5217 | { |
5218 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 5219 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 5220 | uint64 u_value = extract_u_11_10_9_8_7_6_5_4_3_2_1_0(instruction); |
89a955e8 | 5221 | |
3f2aec07 ML |
5222 | const char *rt = GPR(rt_value, info); |
5223 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 5224 | |
4066c152 | 5225 | return img_format("DADDIU %s, %s, 0x%" PRIx64, rt, rs, u_value); |
89a955e8 AM |
5226 | } |
5227 | ||
5228 | ||
5229 | /* | |
5230 | * | |
5231 | * | |
5232 | * 3 2 1 | |
5233 | * 10987654321098765432109876543210 | |
5234 | * 001000 x1110000101 | |
5235 | * rt ----- | |
5236 | * rs ----- | |
5237 | * rd ----- | |
5238 | */ | |
7def8a4b | 5239 | static char *DADD(uint64 instruction, Dis_info *info) |
89a955e8 AM |
5240 | { |
5241 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 5242 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 5243 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 5244 | |
3f2aec07 ML |
5245 | const char *rd = GPR(rd_value, info); |
5246 | const char *rs = GPR(rs_value, info); | |
5247 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 5248 | |
c5231692 | 5249 | return img_format("DADD %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
5250 | } |
5251 | ||
5252 | ||
5253 | /* | |
5254 | * | |
5255 | * | |
5256 | * 3 2 1 | |
5257 | * 10987654321098765432109876543210 | |
5258 | * 001000 x1110000101 | |
5259 | * rt ----- | |
5260 | * rs ----- | |
5261 | * rd ----- | |
5262 | */ | |
7def8a4b | 5263 | static char *DADDU(uint64 instruction, Dis_info *info) |
89a955e8 AM |
5264 | { |
5265 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 5266 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 5267 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 5268 | |
3f2aec07 ML |
5269 | const char *rd = GPR(rd_value, info); |
5270 | const char *rs = GPR(rs_value, info); | |
5271 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 5272 | |
c5231692 | 5273 | return img_format("DADDU %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
5274 | } |
5275 | ||
5276 | ||
5277 | /* | |
5278 | * | |
5279 | * | |
5280 | * 3 2 1 | |
5281 | * 10987654321098765432109876543210 | |
5282 | * 001000 x1110000101 | |
5283 | * rt ----- | |
5284 | * rs ----- | |
5285 | * rd ----- | |
5286 | */ | |
7def8a4b | 5287 | static char *DCLO(uint64 instruction, Dis_info *info) |
89a955e8 AM |
5288 | { |
5289 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
5290 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
5291 | ||
3f2aec07 ML |
5292 | const char *rt = GPR(rt_value, info); |
5293 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 5294 | |
c5231692 | 5295 | return img_format("DCLO %s, %s", rt, rs); |
89a955e8 AM |
5296 | } |
5297 | ||
5298 | ||
5299 | /* | |
5300 | * | |
5301 | * | |
5302 | * 3 2 1 | |
5303 | * 10987654321098765432109876543210 | |
5304 | * 001000 x1110000101 | |
5305 | * rt ----- | |
5306 | * rs ----- | |
5307 | * rd ----- | |
5308 | */ | |
7def8a4b | 5309 | static char *DCLZ(uint64 instruction, Dis_info *info) |
89a955e8 AM |
5310 | { |
5311 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
5312 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
5313 | ||
3f2aec07 ML |
5314 | const char *rt = GPR(rt_value, info); |
5315 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 5316 | |
c5231692 | 5317 | return img_format("DCLZ %s, %s", rt, rs); |
89a955e8 AM |
5318 | } |
5319 | ||
5320 | ||
5321 | /* | |
5322 | * | |
5323 | * | |
5324 | * 3 2 1 | |
5325 | * 10987654321098765432109876543210 | |
5326 | * 001000 x1110000101 | |
5327 | * rt ----- | |
5328 | * rs ----- | |
5329 | * rd ----- | |
5330 | */ | |
7def8a4b | 5331 | static char *DDIV(uint64 instruction, Dis_info *info) |
89a955e8 AM |
5332 | { |
5333 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 5334 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 5335 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 5336 | |
3f2aec07 ML |
5337 | const char *rd = GPR(rd_value, info); |
5338 | const char *rs = GPR(rs_value, info); | |
5339 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 5340 | |
c5231692 | 5341 | return img_format("DDIV %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
5342 | } |
5343 | ||
5344 | ||
5345 | /* | |
5346 | * | |
5347 | * | |
5348 | * 3 2 1 | |
5349 | * 10987654321098765432109876543210 | |
5350 | * 001000 x1110000101 | |
5351 | * rt ----- | |
5352 | * rs ----- | |
5353 | * rd ----- | |
5354 | */ | |
7def8a4b | 5355 | static char *DDIVU(uint64 instruction, Dis_info *info) |
89a955e8 AM |
5356 | { |
5357 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 5358 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 5359 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 5360 | |
3f2aec07 ML |
5361 | const char *rd = GPR(rd_value, info); |
5362 | const char *rs = GPR(rs_value, info); | |
5363 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 5364 | |
c5231692 | 5365 | return img_format("DDIVU %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
5366 | } |
5367 | ||
5368 | ||
5369 | /* | |
5370 | * | |
5371 | * | |
5372 | * 3 2 1 | |
5373 | * 10987654321098765432109876543210 | |
5374 | * 001000 x1110000101 | |
5375 | * rt ----- | |
5376 | * rs ----- | |
5377 | * rd ----- | |
5378 | */ | |
7def8a4b | 5379 | static char *DERET(uint64 instruction, Dis_info *info) |
89a955e8 AM |
5380 | { |
5381 | (void)instruction; | |
5382 | ||
7def8a4b | 5383 | return g_strdup("DERET "); |
89a955e8 AM |
5384 | } |
5385 | ||
5386 | ||
5387 | /* | |
5388 | * | |
5389 | * | |
5390 | * 3 2 1 | |
5391 | * 10987654321098765432109876543210 | |
5392 | * 001000 x1110000101 | |
5393 | * rt ----- | |
5394 | * rs ----- | |
5395 | * rd ----- | |
5396 | */ | |
7def8a4b | 5397 | static char *DEXTM(uint64 instruction, Dis_info *info) |
89a955e8 AM |
5398 | { |
5399 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
86b5f803 | 5400 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
89a955e8 AM |
5401 | uint64 msbd_value = extract_msbt_10_9_8_7_6(instruction); |
5402 | uint64 lsb_value = extract_lsb_4_3_2_1_0(instruction); | |
89a955e8 | 5403 | |
3f2aec07 ML |
5404 | const char *rt = GPR(rt_value, info); |
5405 | const char *rs = GPR(rs_value, info); | |
4066c152 | 5406 | uint64 msbd = encode_msbd_from_size(msbd_value); |
89a955e8 | 5407 | |
4066c152 ML |
5408 | return img_format("DEXTM %s, %s, 0x%" PRIx64 ", 0x%" PRIx64, |
5409 | rt, rs, lsb_value, msbd); | |
89a955e8 AM |
5410 | } |
5411 | ||
5412 | ||
5413 | /* | |
5414 | * | |
5415 | * | |
5416 | * 3 2 1 | |
5417 | * 10987654321098765432109876543210 | |
5418 | * 001000 x1110000101 | |
5419 | * rt ----- | |
5420 | * rs ----- | |
5421 | * rd ----- | |
5422 | */ | |
7def8a4b | 5423 | static char *DEXT(uint64 instruction, Dis_info *info) |
89a955e8 AM |
5424 | { |
5425 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
86b5f803 | 5426 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
89a955e8 AM |
5427 | uint64 msbd_value = extract_msbt_10_9_8_7_6(instruction); |
5428 | uint64 lsb_value = extract_lsb_4_3_2_1_0(instruction); | |
89a955e8 | 5429 | |
3f2aec07 ML |
5430 | const char *rt = GPR(rt_value, info); |
5431 | const char *rs = GPR(rs_value, info); | |
4066c152 | 5432 | uint64 msbd = encode_msbd_from_size(msbd_value); |
89a955e8 | 5433 | |
4066c152 ML |
5434 | return img_format("DEXT %s, %s, 0x%" PRIx64 ", 0x%" PRIx64, |
5435 | rt, rs, lsb_value, msbd); | |
89a955e8 AM |
5436 | } |
5437 | ||
5438 | ||
5439 | /* | |
5440 | * | |
5441 | * | |
5442 | * 3 2 1 | |
5443 | * 10987654321098765432109876543210 | |
5444 | * 001000 x1110000101 | |
5445 | * rt ----- | |
5446 | * rs ----- | |
5447 | * rd ----- | |
5448 | */ | |
7def8a4b | 5449 | static char *DEXTU(uint64 instruction, Dis_info *info) |
89a955e8 AM |
5450 | { |
5451 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
86b5f803 | 5452 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
89a955e8 AM |
5453 | uint64 msbd_value = extract_msbt_10_9_8_7_6(instruction); |
5454 | uint64 lsb_value = extract_lsb_4_3_2_1_0(instruction); | |
89a955e8 | 5455 | |
3f2aec07 ML |
5456 | const char *rt = GPR(rt_value, info); |
5457 | const char *rs = GPR(rs_value, info); | |
4066c152 | 5458 | uint64 msbd = encode_msbd_from_size(msbd_value); |
89a955e8 | 5459 | |
4066c152 ML |
5460 | return img_format("DEXTU %s, %s, 0x%" PRIx64 ", 0x%" PRIx64, |
5461 | rt, rs, lsb_value, msbd); | |
89a955e8 AM |
5462 | } |
5463 | ||
5464 | ||
5465 | /* | |
5466 | * | |
5467 | * | |
5468 | * 3 2 1 | |
5469 | * 10987654321098765432109876543210 | |
5470 | * 001000 x1110000101 | |
5471 | * rt ----- | |
5472 | * rs ----- | |
5473 | * rd ----- | |
5474 | */ | |
7def8a4b | 5475 | static char *DINSM(uint64 instruction, Dis_info *info) |
89a955e8 AM |
5476 | { |
5477 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
86b5f803 | 5478 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
89a955e8 AM |
5479 | uint64 msbd_value = extract_msbt_10_9_8_7_6(instruction); |
5480 | uint64 lsb_value = extract_lsb_4_3_2_1_0(instruction); | |
89a955e8 | 5481 | |
3f2aec07 ML |
5482 | const char *rt = GPR(rt_value, info); |
5483 | const char *rs = GPR(rs_value, info); | |
89a955e8 AM |
5484 | /* !!!!!!!!!! - no conversion function */ |
5485 | ||
4066c152 ML |
5486 | return img_format("DINSM %s, %s, 0x%" PRIx64 ", 0x%" PRIx64, |
5487 | rt, rs, lsb_value, msbd_value); | |
89a955e8 AM |
5488 | /* hand edited */ |
5489 | } | |
5490 | ||
5491 | ||
5492 | /* | |
5493 | * | |
5494 | * | |
5495 | * 3 2 1 | |
5496 | * 10987654321098765432109876543210 | |
5497 | * 001000 x1110000101 | |
5498 | * rt ----- | |
5499 | * rs ----- | |
5500 | * rd ----- | |
5501 | */ | |
7def8a4b | 5502 | static char *DINS(uint64 instruction, Dis_info *info) |
89a955e8 AM |
5503 | { |
5504 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
86b5f803 | 5505 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
89a955e8 AM |
5506 | uint64 msbd_value = extract_msbt_10_9_8_7_6(instruction); |
5507 | uint64 lsb_value = extract_lsb_4_3_2_1_0(instruction); | |
89a955e8 | 5508 | |
3f2aec07 ML |
5509 | const char *rt = GPR(rt_value, info); |
5510 | const char *rs = GPR(rs_value, info); | |
89a955e8 AM |
5511 | /* !!!!!!!!!! - no conversion function */ |
5512 | ||
4066c152 ML |
5513 | return img_format("DINS %s, %s, 0x%" PRIx64 ", 0x%" PRIx64, |
5514 | rt, rs, lsb_value, msbd_value); | |
89a955e8 AM |
5515 | /* hand edited */ |
5516 | } | |
5517 | ||
5518 | ||
5519 | /* | |
5520 | * | |
5521 | * | |
5522 | * 3 2 1 | |
5523 | * 10987654321098765432109876543210 | |
5524 | * 001000 x1110000101 | |
5525 | * rt ----- | |
5526 | * rs ----- | |
5527 | * rd ----- | |
5528 | */ | |
7def8a4b | 5529 | static char *DINSU(uint64 instruction, Dis_info *info) |
89a955e8 AM |
5530 | { |
5531 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
86b5f803 | 5532 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
89a955e8 AM |
5533 | uint64 msbd_value = extract_msbt_10_9_8_7_6(instruction); |
5534 | uint64 lsb_value = extract_lsb_4_3_2_1_0(instruction); | |
89a955e8 | 5535 | |
3f2aec07 ML |
5536 | const char *rt = GPR(rt_value, info); |
5537 | const char *rs = GPR(rs_value, info); | |
89a955e8 AM |
5538 | /* !!!!!!!!!! - no conversion function */ |
5539 | ||
4066c152 ML |
5540 | return img_format("DINSU %s, %s, 0x%" PRIx64 ", 0x%" PRIx64, |
5541 | rt, rs, lsb_value, msbd_value); | |
89a955e8 AM |
5542 | /* hand edited */ |
5543 | } | |
5544 | ||
5545 | ||
5546 | /* | |
5547 | * | |
5548 | * | |
5549 | * 3 2 1 | |
5550 | * 10987654321098765432109876543210 | |
5551 | * 001000 x1110000101 | |
5552 | * rt ----- | |
5553 | * rs ----- | |
5554 | * rd ----- | |
5555 | */ | |
7def8a4b | 5556 | static char *DI(uint64 instruction, Dis_info *info) |
89a955e8 AM |
5557 | { |
5558 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
5559 | ||
3f2aec07 | 5560 | const char *rt = GPR(rt_value, info); |
89a955e8 | 5561 | |
c5231692 | 5562 | return img_format("DI %s", rt); |
89a955e8 AM |
5563 | } |
5564 | ||
5565 | ||
5566 | /* | |
5567 | * | |
5568 | * | |
5569 | * 3 2 1 | |
5570 | * 10987654321098765432109876543210 | |
5571 | * 001000 x1110000101 | |
5572 | * rt ----- | |
5573 | * rs ----- | |
5574 | * rd ----- | |
5575 | */ | |
7def8a4b | 5576 | static char *DIV(uint64 instruction, Dis_info *info) |
89a955e8 AM |
5577 | { |
5578 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 5579 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 5580 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 5581 | |
3f2aec07 ML |
5582 | const char *rd = GPR(rd_value, info); |
5583 | const char *rs = GPR(rs_value, info); | |
5584 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 5585 | |
c5231692 | 5586 | return img_format("DIV %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
5587 | } |
5588 | ||
5589 | ||
5590 | /* | |
5591 | * | |
5592 | * | |
5593 | * 3 2 1 | |
5594 | * 10987654321098765432109876543210 | |
5595 | * 001000 x1110000101 | |
5596 | * rt ----- | |
5597 | * rs ----- | |
5598 | * rd ----- | |
5599 | */ | |
7def8a4b | 5600 | static char *DIV_D(uint64 instruction, Dis_info *info) |
89a955e8 | 5601 | { |
17ce2f00 | 5602 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 5603 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 5604 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 | 5605 | |
3f2aec07 ML |
5606 | const char *fd = FPR(fd_value, info); |
5607 | const char *fs = FPR(fs_value, info); | |
5608 | const char *ft = FPR(ft_value, info); | |
89a955e8 | 5609 | |
c5231692 | 5610 | return img_format("DIV.D %s, %s, %s", fd, fs, ft); |
89a955e8 AM |
5611 | } |
5612 | ||
5613 | ||
5614 | /* | |
5615 | * | |
5616 | * | |
5617 | * 3 2 1 | |
5618 | * 10987654321098765432109876543210 | |
5619 | * 001000 x1110000101 | |
5620 | * rt ----- | |
5621 | * rs ----- | |
5622 | * rd ----- | |
5623 | */ | |
7def8a4b | 5624 | static char *DIV_S(uint64 instruction, Dis_info *info) |
89a955e8 | 5625 | { |
17ce2f00 | 5626 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 5627 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 5628 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 | 5629 | |
3f2aec07 ML |
5630 | const char *fd = FPR(fd_value, info); |
5631 | const char *fs = FPR(fs_value, info); | |
5632 | const char *ft = FPR(ft_value, info); | |
89a955e8 | 5633 | |
c5231692 | 5634 | return img_format("DIV.S %s, %s, %s", fd, fs, ft); |
89a955e8 AM |
5635 | } |
5636 | ||
5637 | ||
5638 | /* | |
5639 | * | |
5640 | * | |
5641 | * 3 2 1 | |
5642 | * 10987654321098765432109876543210 | |
5643 | * 001000 x1110000101 | |
5644 | * rt ----- | |
5645 | * rs ----- | |
5646 | * rd ----- | |
5647 | */ | |
7def8a4b | 5648 | static char *DIVU(uint64 instruction, Dis_info *info) |
89a955e8 AM |
5649 | { |
5650 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 5651 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 5652 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 5653 | |
3f2aec07 ML |
5654 | const char *rd = GPR(rd_value, info); |
5655 | const char *rs = GPR(rs_value, info); | |
5656 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 5657 | |
c5231692 | 5658 | return img_format("DIVU %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
5659 | } |
5660 | ||
5661 | ||
5662 | /* | |
5663 | * | |
5664 | * | |
5665 | * 3 2 1 | |
5666 | * 10987654321098765432109876543210 | |
5667 | * 001000 x1110000101 | |
5668 | * rt ----- | |
5669 | * rs ----- | |
5670 | * rd ----- | |
5671 | */ | |
7def8a4b | 5672 | static char *DLSA(uint64 instruction, Dis_info *info) |
89a955e8 AM |
5673 | { |
5674 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
86b5f803 | 5675 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
b4c5d21c | 5676 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 5677 | uint64 u2_value = extract_u2_10_9(instruction); |
89a955e8 | 5678 | |
3f2aec07 ML |
5679 | const char *rd = GPR(rd_value, info); |
5680 | const char *rs = GPR(rs_value, info); | |
5681 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 5682 | |
4066c152 | 5683 | return img_format("DLSA %s, %s, %s, 0x%" PRIx64, rd, rs, rt, u2_value); |
89a955e8 AM |
5684 | } |
5685 | ||
5686 | ||
5687 | /* | |
5688 | * | |
5689 | * | |
5690 | * 3 2 1 | |
5691 | * 10987654321098765432109876543210 | |
5692 | * 001000 x1110000101 | |
5693 | * rt ----- | |
5694 | * rs ----- | |
5695 | * rd ----- | |
5696 | */ | |
7def8a4b | 5697 | static char *DLUI_48_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
5698 | { |
5699 | uint64 rt_value = extract_rt_41_40_39_38_37(instruction); | |
11b9732a | 5700 | uint64 u_value = extract_u_31_to_0__s32(instruction); |
89a955e8 | 5701 | |
3f2aec07 | 5702 | const char *rt = GPR(rt_value, info); |
89a955e8 | 5703 | |
4066c152 | 5704 | return img_format("DLUI %s, 0x%" PRIx64, rt, u_value); |
89a955e8 AM |
5705 | } |
5706 | ||
5707 | ||
5708 | /* | |
5709 | * | |
5710 | * | |
5711 | * 3 2 1 | |
5712 | * 10987654321098765432109876543210 | |
5713 | * 001000 x1110000101 | |
5714 | * rt ----- | |
5715 | * rs ----- | |
5716 | * rd ----- | |
5717 | */ | |
7def8a4b | 5718 | static char *DMFC0(uint64 instruction, Dis_info *info) |
89a955e8 AM |
5719 | { |
5720 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
5721 | uint64 c0s_value = extract_c0s_20_19_18_17_16(instruction); | |
5722 | uint64 sel_value = extract_sel_15_14_13_12_11(instruction); | |
5723 | ||
3f2aec07 | 5724 | const char *rt = GPR(rt_value, info); |
89a955e8 | 5725 | |
043dc73c ML |
5726 | return img_format("DMFC0 %s, CP%" PRIu64 ", 0x%" PRIx64, |
5727 | rt, c0s_value, sel_value); | |
89a955e8 AM |
5728 | } |
5729 | ||
5730 | ||
5731 | /* | |
5732 | * | |
5733 | * | |
5734 | * 3 2 1 | |
5735 | * 10987654321098765432109876543210 | |
5736 | * 001000 x1110000101 | |
5737 | * rt ----- | |
5738 | * rs ----- | |
5739 | * rd ----- | |
5740 | */ | |
7def8a4b | 5741 | static char *DMFC1(uint64 instruction, Dis_info *info) |
89a955e8 AM |
5742 | { |
5743 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
52a96d22 | 5744 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 | 5745 | |
3f2aec07 ML |
5746 | const char *rt = GPR(rt_value, info); |
5747 | const char *fs = FPR(fs_value, info); | |
89a955e8 | 5748 | |
c5231692 | 5749 | return img_format("DMFC1 %s, %s", rt, fs); |
89a955e8 AM |
5750 | } |
5751 | ||
5752 | ||
5753 | /* | |
5754 | * | |
5755 | * | |
5756 | * 3 2 1 | |
5757 | * 10987654321098765432109876543210 | |
5758 | * 001000 x1110000101 | |
5759 | * rt ----- | |
5760 | * rs ----- | |
5761 | * rd ----- | |
5762 | */ | |
7def8a4b | 5763 | static char *DMFC2(uint64 instruction, Dis_info *info) |
89a955e8 | 5764 | { |
89a955e8 | 5765 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); |
86b5f803 | 5766 | uint64 cs_value = extract_cs_20_19_18_17_16(instruction); |
89a955e8 | 5767 | |
3f2aec07 | 5768 | const char *rt = GPR(rt_value, info); |
89a955e8 | 5769 | |
043dc73c | 5770 | return img_format("DMFC2 %s, CP%" PRIu64, rt, cs_value); |
89a955e8 AM |
5771 | } |
5772 | ||
5773 | ||
5774 | /* | |
5775 | * | |
5776 | * | |
5777 | * 3 2 1 | |
5778 | * 10987654321098765432109876543210 | |
5779 | * 001000 x1110000101 | |
5780 | * rt ----- | |
5781 | * rs ----- | |
5782 | * rd ----- | |
5783 | */ | |
7def8a4b | 5784 | static char *DMFGC0(uint64 instruction, Dis_info *info) |
89a955e8 AM |
5785 | { |
5786 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
5787 | uint64 c0s_value = extract_c0s_20_19_18_17_16(instruction); | |
5788 | uint64 sel_value = extract_sel_15_14_13_12_11(instruction); | |
5789 | ||
3f2aec07 | 5790 | const char *rt = GPR(rt_value, info); |
89a955e8 | 5791 | |
043dc73c ML |
5792 | return img_format("DMFGC0 %s, CP%" PRIu64 ", 0x%" PRIx64, |
5793 | rt, c0s_value, sel_value); | |
89a955e8 AM |
5794 | } |
5795 | ||
5796 | ||
5797 | /* | |
5798 | * | |
5799 | * | |
5800 | * 3 2 1 | |
5801 | * 10987654321098765432109876543210 | |
5802 | * 001000 x1110000101 | |
5803 | * rt ----- | |
5804 | * rs ----- | |
5805 | * rd ----- | |
5806 | */ | |
7def8a4b | 5807 | static char *DMOD(uint64 instruction, Dis_info *info) |
89a955e8 AM |
5808 | { |
5809 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 5810 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 5811 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 5812 | |
3f2aec07 ML |
5813 | const char *rd = GPR(rd_value, info); |
5814 | const char *rs = GPR(rs_value, info); | |
5815 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 5816 | |
c5231692 | 5817 | return img_format("DMOD %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
5818 | } |
5819 | ||
5820 | ||
5821 | /* | |
5822 | * | |
5823 | * | |
5824 | * 3 2 1 | |
5825 | * 10987654321098765432109876543210 | |
5826 | * 001000 x1110000101 | |
5827 | * rt ----- | |
5828 | * rs ----- | |
5829 | * rd ----- | |
5830 | */ | |
7def8a4b | 5831 | static char *DMODU(uint64 instruction, Dis_info *info) |
89a955e8 AM |
5832 | { |
5833 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 5834 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 5835 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 5836 | |
3f2aec07 ML |
5837 | const char *rd = GPR(rd_value, info); |
5838 | const char *rs = GPR(rs_value, info); | |
5839 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 5840 | |
c5231692 | 5841 | return img_format("DMODU %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
5842 | } |
5843 | ||
5844 | ||
5845 | /* | |
5846 | * | |
5847 | * | |
5848 | * 3 2 1 | |
5849 | * 10987654321098765432109876543210 | |
5850 | * 001000 x1110000101 | |
5851 | * rt ----- | |
5852 | * rs ----- | |
5853 | * rd ----- | |
5854 | */ | |
7def8a4b | 5855 | static char *DMTC0(uint64 instruction, Dis_info *info) |
89a955e8 AM |
5856 | { |
5857 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
5858 | uint64 c0s_value = extract_c0s_20_19_18_17_16(instruction); | |
5859 | uint64 sel_value = extract_sel_15_14_13_12_11(instruction); | |
5860 | ||
3f2aec07 | 5861 | const char *rt = GPR(rt_value, info); |
89a955e8 | 5862 | |
043dc73c ML |
5863 | return img_format("DMTC0 %s, CP%" PRIu64 ", 0x%" PRIx64, |
5864 | rt, c0s_value, sel_value); | |
89a955e8 AM |
5865 | } |
5866 | ||
5867 | ||
5868 | /* | |
5869 | * | |
5870 | * | |
5871 | * 3 2 1 | |
5872 | * 10987654321098765432109876543210 | |
5873 | * 001000 x1110000101 | |
5874 | * rt ----- | |
5875 | * rs ----- | |
5876 | * rd ----- | |
5877 | */ | |
7def8a4b | 5878 | static char *DMTC1(uint64 instruction, Dis_info *info) |
89a955e8 AM |
5879 | { |
5880 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
52a96d22 | 5881 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 | 5882 | |
3f2aec07 ML |
5883 | const char *rt = GPR(rt_value, info); |
5884 | const char *fs = FPR(fs_value, info); | |
89a955e8 | 5885 | |
c5231692 | 5886 | return img_format("DMTC1 %s, %s", rt, fs); |
89a955e8 AM |
5887 | } |
5888 | ||
5889 | ||
5890 | /* | |
5891 | * | |
5892 | * | |
5893 | * 3 2 1 | |
5894 | * 10987654321098765432109876543210 | |
5895 | * 001000 x1110000101 | |
5896 | * rt ----- | |
5897 | * rs ----- | |
5898 | * rd ----- | |
5899 | */ | |
7def8a4b | 5900 | static char *DMTC2(uint64 instruction, Dis_info *info) |
89a955e8 | 5901 | { |
89a955e8 | 5902 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); |
86b5f803 | 5903 | uint64 cs_value = extract_cs_20_19_18_17_16(instruction); |
89a955e8 | 5904 | |
3f2aec07 | 5905 | const char *rt = GPR(rt_value, info); |
89a955e8 | 5906 | |
043dc73c | 5907 | return img_format("DMTC2 %s, CP%" PRIu64, rt, cs_value); |
89a955e8 AM |
5908 | } |
5909 | ||
5910 | ||
5911 | /* | |
5912 | * | |
5913 | * | |
5914 | * 3 2 1 | |
5915 | * 10987654321098765432109876543210 | |
5916 | * 001000 x1110000101 | |
5917 | * rt ----- | |
5918 | * rs ----- | |
5919 | * rd ----- | |
5920 | */ | |
7def8a4b | 5921 | static char *DMTGC0(uint64 instruction, Dis_info *info) |
89a955e8 AM |
5922 | { |
5923 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
5924 | uint64 c0s_value = extract_c0s_20_19_18_17_16(instruction); | |
5925 | uint64 sel_value = extract_sel_15_14_13_12_11(instruction); | |
5926 | ||
3f2aec07 | 5927 | const char *rt = GPR(rt_value, info); |
89a955e8 | 5928 | |
043dc73c ML |
5929 | return img_format("DMTGC0 %s, CP%" PRIu64 ", 0x%" PRIx64, |
5930 | rt, c0s_value, sel_value); | |
89a955e8 AM |
5931 | } |
5932 | ||
5933 | ||
5934 | /* | |
5935 | * | |
5936 | * | |
5937 | * 3 2 1 | |
5938 | * 10987654321098765432109876543210 | |
5939 | * 001000 x1110000101 | |
5940 | * rt ----- | |
5941 | * rs ----- | |
5942 | * rd ----- | |
5943 | */ | |
7def8a4b | 5944 | static char *DMT(uint64 instruction, Dis_info *info) |
89a955e8 AM |
5945 | { |
5946 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
5947 | ||
3f2aec07 | 5948 | const char *rt = GPR(rt_value, info); |
89a955e8 | 5949 | |
c5231692 | 5950 | return img_format("DMT %s", rt); |
89a955e8 AM |
5951 | } |
5952 | ||
5953 | ||
5954 | /* | |
5955 | * | |
5956 | * | |
5957 | * 3 2 1 | |
5958 | * 10987654321098765432109876543210 | |
5959 | * 001000 x1110000101 | |
5960 | * rt ----- | |
5961 | * rs ----- | |
5962 | * rd ----- | |
5963 | */ | |
7def8a4b | 5964 | static char *DMUH(uint64 instruction, Dis_info *info) |
89a955e8 AM |
5965 | { |
5966 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 5967 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 5968 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 5969 | |
3f2aec07 ML |
5970 | const char *rd = GPR(rd_value, info); |
5971 | const char *rs = GPR(rs_value, info); | |
5972 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 5973 | |
c5231692 | 5974 | return img_format("DMUH %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
5975 | } |
5976 | ||
5977 | ||
5978 | /* | |
5979 | * | |
5980 | * | |
5981 | * 3 2 1 | |
5982 | * 10987654321098765432109876543210 | |
5983 | * 001000 x1110000101 | |
5984 | * rt ----- | |
5985 | * rs ----- | |
5986 | * rd ----- | |
5987 | */ | |
7def8a4b | 5988 | static char *DMUHU(uint64 instruction, Dis_info *info) |
89a955e8 AM |
5989 | { |
5990 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 5991 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 5992 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 5993 | |
3f2aec07 ML |
5994 | const char *rd = GPR(rd_value, info); |
5995 | const char *rs = GPR(rs_value, info); | |
5996 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 5997 | |
c5231692 | 5998 | return img_format("DMUHU %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
5999 | } |
6000 | ||
6001 | ||
6002 | /* | |
6003 | * | |
6004 | * | |
6005 | * 3 2 1 | |
6006 | * 10987654321098765432109876543210 | |
6007 | * 001000 x1110000101 | |
6008 | * rt ----- | |
6009 | * rs ----- | |
6010 | * rd ----- | |
6011 | */ | |
7def8a4b | 6012 | static char *DMUL(uint64 instruction, Dis_info *info) |
89a955e8 AM |
6013 | { |
6014 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 6015 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 6016 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 6017 | |
3f2aec07 ML |
6018 | const char *rd = GPR(rd_value, info); |
6019 | const char *rs = GPR(rs_value, info); | |
6020 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 6021 | |
c5231692 | 6022 | return img_format("DMUL %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
6023 | } |
6024 | ||
6025 | ||
6026 | /* | |
6027 | * | |
6028 | * | |
6029 | * 3 2 1 | |
6030 | * 10987654321098765432109876543210 | |
6031 | * 001000 x1110000101 | |
6032 | * rt ----- | |
6033 | * rs ----- | |
6034 | * rd ----- | |
6035 | */ | |
7def8a4b | 6036 | static char *DMULU(uint64 instruction, Dis_info *info) |
89a955e8 AM |
6037 | { |
6038 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 6039 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 6040 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 6041 | |
3f2aec07 ML |
6042 | const char *rd = GPR(rd_value, info); |
6043 | const char *rs = GPR(rs_value, info); | |
6044 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 6045 | |
c5231692 | 6046 | return img_format("DMULU %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
6047 | } |
6048 | ||
6049 | ||
6050 | /* | |
5c65eed6 AM |
6051 | * [DSP] DPA.W.PH ac, rs, rt - Dot product with accumulate on |
6052 | * vector integer halfword elements | |
89a955e8 AM |
6053 | * |
6054 | * 3 2 1 | |
6055 | * 10987654321098765432109876543210 | |
5c65eed6 | 6056 | * 001000 00000010111111 |
89a955e8 AM |
6057 | * rt ----- |
6058 | * rs ----- | |
5c65eed6 | 6059 | * ac -- |
89a955e8 | 6060 | */ |
7def8a4b | 6061 | static char *DPA_W_PH(uint64 instruction, Dis_info *info) |
89a955e8 AM |
6062 | { |
6063 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 6064 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
0f74e61d | 6065 | uint64 ac_value = extract_ac_15_14(instruction); |
89a955e8 | 6066 | |
3f2aec07 ML |
6067 | const char *ac = AC(ac_value, info); |
6068 | const char *rs = GPR(rs_value, info); | |
6069 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 6070 | |
c5231692 | 6071 | return img_format("DPA.W.PH %s, %s, %s", ac, rs, rt); |
89a955e8 AM |
6072 | } |
6073 | ||
6074 | ||
6075 | /* | |
6076 | * | |
6077 | * | |
6078 | * 3 2 1 | |
6079 | * 10987654321098765432109876543210 | |
6080 | * 001000 x1110000101 | |
6081 | * rt ----- | |
6082 | * rs ----- | |
6083 | * rd ----- | |
6084 | */ | |
7def8a4b | 6085 | static char *DPAQ_SA_L_W(uint64 instruction, Dis_info *info) |
89a955e8 AM |
6086 | { |
6087 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 6088 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
0f74e61d | 6089 | uint64 ac_value = extract_ac_15_14(instruction); |
89a955e8 | 6090 | |
3f2aec07 ML |
6091 | const char *ac = AC(ac_value, info); |
6092 | const char *rs = GPR(rs_value, info); | |
6093 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 6094 | |
c5231692 | 6095 | return img_format("DPAQ_SA.L.W %s, %s, %s", ac, rs, rt); |
89a955e8 AM |
6096 | } |
6097 | ||
6098 | ||
6099 | /* | |
6100 | * | |
6101 | * | |
6102 | * 3 2 1 | |
6103 | * 10987654321098765432109876543210 | |
6104 | * 001000 x1110000101 | |
6105 | * rt ----- | |
6106 | * rs ----- | |
6107 | * rd ----- | |
6108 | */ | |
7def8a4b | 6109 | static char *DPAQ_S_W_PH(uint64 instruction, Dis_info *info) |
89a955e8 AM |
6110 | { |
6111 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 6112 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
0f74e61d | 6113 | uint64 ac_value = extract_ac_15_14(instruction); |
89a955e8 | 6114 | |
3f2aec07 ML |
6115 | const char *ac = AC(ac_value, info); |
6116 | const char *rs = GPR(rs_value, info); | |
6117 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 6118 | |
c5231692 | 6119 | return img_format("DPAQ_S.W.PH %s, %s, %s", ac, rs, rt); |
89a955e8 AM |
6120 | } |
6121 | ||
6122 | ||
6123 | /* | |
6124 | * | |
6125 | * | |
6126 | * 3 2 1 | |
6127 | * 10987654321098765432109876543210 | |
6128 | * 001000 x1110000101 | |
6129 | * rt ----- | |
6130 | * rs ----- | |
6131 | * rd ----- | |
6132 | */ | |
7def8a4b | 6133 | static char *DPAQX_SA_W_PH(uint64 instruction, Dis_info *info) |
89a955e8 AM |
6134 | { |
6135 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 6136 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
0f74e61d | 6137 | uint64 ac_value = extract_ac_15_14(instruction); |
89a955e8 | 6138 | |
3f2aec07 ML |
6139 | const char *ac = AC(ac_value, info); |
6140 | const char *rs = GPR(rs_value, info); | |
6141 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 6142 | |
c5231692 | 6143 | return img_format("DPAQX_SA.W.PH %s, %s, %s", ac, rs, rt); |
89a955e8 AM |
6144 | } |
6145 | ||
6146 | ||
6147 | /* | |
6148 | * | |
6149 | * | |
6150 | * 3 2 1 | |
6151 | * 10987654321098765432109876543210 | |
6152 | * 001000 x1110000101 | |
6153 | * rt ----- | |
6154 | * rs ----- | |
6155 | * rd ----- | |
6156 | */ | |
7def8a4b | 6157 | static char *DPAQX_S_W_PH(uint64 instruction, Dis_info *info) |
89a955e8 AM |
6158 | { |
6159 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 6160 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
0f74e61d | 6161 | uint64 ac_value = extract_ac_15_14(instruction); |
89a955e8 | 6162 | |
3f2aec07 ML |
6163 | const char *ac = AC(ac_value, info); |
6164 | const char *rs = GPR(rs_value, info); | |
6165 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 6166 | |
c5231692 | 6167 | return img_format("DPAQX_S.W.PH %s, %s, %s", ac, rs, rt); |
89a955e8 AM |
6168 | } |
6169 | ||
6170 | ||
6171 | /* | |
6172 | * | |
6173 | * | |
6174 | * 3 2 1 | |
6175 | * 10987654321098765432109876543210 | |
6176 | * 001000 x1110000101 | |
6177 | * rt ----- | |
6178 | * rs ----- | |
6179 | * rd ----- | |
6180 | */ | |
7def8a4b | 6181 | static char *DPAU_H_QBL(uint64 instruction, Dis_info *info) |
89a955e8 AM |
6182 | { |
6183 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 6184 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
0f74e61d | 6185 | uint64 ac_value = extract_ac_15_14(instruction); |
89a955e8 | 6186 | |
3f2aec07 ML |
6187 | const char *ac = AC(ac_value, info); |
6188 | const char *rs = GPR(rs_value, info); | |
6189 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 6190 | |
c5231692 | 6191 | return img_format("DPAU.H.QBL %s, %s, %s", ac, rs, rt); |
89a955e8 AM |
6192 | } |
6193 | ||
6194 | ||
6195 | /* | |
6196 | * | |
6197 | * | |
6198 | * 3 2 1 | |
6199 | * 10987654321098765432109876543210 | |
6200 | * 001000 x1110000101 | |
6201 | * rt ----- | |
6202 | * rs ----- | |
6203 | * rd ----- | |
6204 | */ | |
7def8a4b | 6205 | static char *DPAU_H_QBR(uint64 instruction, Dis_info *info) |
89a955e8 AM |
6206 | { |
6207 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 6208 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
0f74e61d | 6209 | uint64 ac_value = extract_ac_15_14(instruction); |
89a955e8 | 6210 | |
3f2aec07 ML |
6211 | const char *ac = AC(ac_value, info); |
6212 | const char *rs = GPR(rs_value, info); | |
6213 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 6214 | |
c5231692 | 6215 | return img_format("DPAU.H.QBR %s, %s, %s", ac, rs, rt); |
89a955e8 AM |
6216 | } |
6217 | ||
6218 | ||
6219 | /* | |
6220 | * | |
6221 | * | |
6222 | * 3 2 1 | |
6223 | * 10987654321098765432109876543210 | |
6224 | * 001000 x1110000101 | |
6225 | * rt ----- | |
6226 | * rs ----- | |
6227 | * rd ----- | |
6228 | */ | |
7def8a4b | 6229 | static char *DPAX_W_PH(uint64 instruction, Dis_info *info) |
89a955e8 AM |
6230 | { |
6231 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 6232 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
0f74e61d | 6233 | uint64 ac_value = extract_ac_15_14(instruction); |
89a955e8 | 6234 | |
3f2aec07 ML |
6235 | const char *ac = AC(ac_value, info); |
6236 | const char *rs = GPR(rs_value, info); | |
6237 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 6238 | |
c5231692 | 6239 | return img_format("DPAX.W.PH %s, %s, %s", ac, rs, rt); |
89a955e8 AM |
6240 | } |
6241 | ||
6242 | ||
6243 | /* | |
6244 | * | |
6245 | * | |
6246 | * 3 2 1 | |
6247 | * 10987654321098765432109876543210 | |
6248 | * 001000 x1110000101 | |
6249 | * rt ----- | |
6250 | * rs ----- | |
6251 | * rd ----- | |
6252 | */ | |
7def8a4b | 6253 | static char *DPS_W_PH(uint64 instruction, Dis_info *info) |
89a955e8 AM |
6254 | { |
6255 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 6256 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
0f74e61d | 6257 | uint64 ac_value = extract_ac_15_14(instruction); |
89a955e8 | 6258 | |
3f2aec07 ML |
6259 | const char *ac = AC(ac_value, info); |
6260 | const char *rs = GPR(rs_value, info); | |
6261 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 6262 | |
c5231692 | 6263 | return img_format("DPS.W.PH %s, %s, %s", ac, rs, rt); |
89a955e8 AM |
6264 | } |
6265 | ||
6266 | ||
6267 | /* | |
6268 | * | |
6269 | * | |
6270 | * 3 2 1 | |
6271 | * 10987654321098765432109876543210 | |
6272 | * 001000 x1110000101 | |
6273 | * rt ----- | |
6274 | * rs ----- | |
6275 | * rd ----- | |
6276 | */ | |
7def8a4b | 6277 | static char *DPSQ_SA_L_W(uint64 instruction, Dis_info *info) |
89a955e8 AM |
6278 | { |
6279 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 6280 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
0f74e61d | 6281 | uint64 ac_value = extract_ac_15_14(instruction); |
89a955e8 | 6282 | |
3f2aec07 ML |
6283 | const char *ac = AC(ac_value, info); |
6284 | const char *rs = GPR(rs_value, info); | |
6285 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 6286 | |
c5231692 | 6287 | return img_format("DPSQ_SA.L.W %s, %s, %s", ac, rs, rt); |
89a955e8 AM |
6288 | } |
6289 | ||
6290 | ||
6291 | /* | |
6292 | * | |
6293 | * | |
6294 | * 3 2 1 | |
6295 | * 10987654321098765432109876543210 | |
6296 | * 001000 x1110000101 | |
6297 | * rt ----- | |
6298 | * rs ----- | |
6299 | * rd ----- | |
6300 | */ | |
7def8a4b | 6301 | static char *DPSQ_S_W_PH(uint64 instruction, Dis_info *info) |
89a955e8 AM |
6302 | { |
6303 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 6304 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
0f74e61d | 6305 | uint64 ac_value = extract_ac_15_14(instruction); |
89a955e8 | 6306 | |
3f2aec07 ML |
6307 | const char *ac = AC(ac_value, info); |
6308 | const char *rs = GPR(rs_value, info); | |
6309 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 6310 | |
c5231692 | 6311 | return img_format("DPSQ_S.W.PH %s, %s, %s", ac, rs, rt); |
89a955e8 AM |
6312 | } |
6313 | ||
6314 | ||
6315 | /* | |
6316 | * | |
6317 | * | |
6318 | * 3 2 1 | |
6319 | * 10987654321098765432109876543210 | |
6320 | * 001000 x1110000101 | |
6321 | * rt ----- | |
6322 | * rs ----- | |
6323 | * rd ----- | |
6324 | */ | |
7def8a4b | 6325 | static char *DPSQX_SA_W_PH(uint64 instruction, Dis_info *info) |
89a955e8 AM |
6326 | { |
6327 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 6328 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
0f74e61d | 6329 | uint64 ac_value = extract_ac_15_14(instruction); |
89a955e8 | 6330 | |
3f2aec07 ML |
6331 | const char *ac = AC(ac_value, info); |
6332 | const char *rs = GPR(rs_value, info); | |
6333 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 6334 | |
c5231692 | 6335 | return img_format("DPSQX_SA.W.PH %s, %s, %s", ac, rs, rt); |
89a955e8 AM |
6336 | } |
6337 | ||
6338 | ||
6339 | /* | |
6340 | * | |
6341 | * | |
6342 | * 3 2 1 | |
6343 | * 10987654321098765432109876543210 | |
6344 | * 001000 x1110000101 | |
6345 | * rt ----- | |
6346 | * rs ----- | |
6347 | * rd ----- | |
6348 | */ | |
7def8a4b | 6349 | static char *DPSQX_S_W_PH(uint64 instruction, Dis_info *info) |
89a955e8 AM |
6350 | { |
6351 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 6352 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
0f74e61d | 6353 | uint64 ac_value = extract_ac_15_14(instruction); |
89a955e8 | 6354 | |
3f2aec07 ML |
6355 | const char *ac = AC(ac_value, info); |
6356 | const char *rs = GPR(rs_value, info); | |
6357 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 6358 | |
c5231692 | 6359 | return img_format("DPSQX_S.W.PH %s, %s, %s", ac, rs, rt); |
89a955e8 AM |
6360 | } |
6361 | ||
6362 | ||
6363 | /* | |
6364 | * | |
6365 | * | |
6366 | * 3 2 1 | |
6367 | * 10987654321098765432109876543210 | |
6368 | * 001000 x1110000101 | |
6369 | * rt ----- | |
6370 | * rs ----- | |
6371 | * rd ----- | |
6372 | */ | |
7def8a4b | 6373 | static char *DPSU_H_QBL(uint64 instruction, Dis_info *info) |
89a955e8 AM |
6374 | { |
6375 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 6376 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
0f74e61d | 6377 | uint64 ac_value = extract_ac_15_14(instruction); |
89a955e8 | 6378 | |
3f2aec07 ML |
6379 | const char *ac = AC(ac_value, info); |
6380 | const char *rs = GPR(rs_value, info); | |
6381 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 6382 | |
c5231692 | 6383 | return img_format("DPSU.H.QBL %s, %s, %s", ac, rs, rt); |
89a955e8 AM |
6384 | } |
6385 | ||
6386 | ||
6387 | /* | |
6388 | * | |
6389 | * | |
6390 | * 3 2 1 | |
6391 | * 10987654321098765432109876543210 | |
6392 | * 001000 x1110000101 | |
6393 | * rt ----- | |
6394 | * rs ----- | |
6395 | * rd ----- | |
6396 | */ | |
7def8a4b | 6397 | static char *DPSU_H_QBR(uint64 instruction, Dis_info *info) |
89a955e8 AM |
6398 | { |
6399 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 6400 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
0f74e61d | 6401 | uint64 ac_value = extract_ac_15_14(instruction); |
89a955e8 | 6402 | |
3f2aec07 ML |
6403 | const char *ac = AC(ac_value, info); |
6404 | const char *rs = GPR(rs_value, info); | |
6405 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 6406 | |
c5231692 | 6407 | return img_format("DPSU.H.QBR %s, %s, %s", ac, rs, rt); |
89a955e8 AM |
6408 | } |
6409 | ||
6410 | ||
6411 | /* | |
6412 | * | |
6413 | * | |
6414 | * 3 2 1 | |
6415 | * 10987654321098765432109876543210 | |
6416 | * 001000 x1110000101 | |
6417 | * rt ----- | |
6418 | * rs ----- | |
6419 | * rd ----- | |
6420 | */ | |
7def8a4b | 6421 | static char *DPSX_W_PH(uint64 instruction, Dis_info *info) |
89a955e8 AM |
6422 | { |
6423 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 6424 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
0f74e61d | 6425 | uint64 ac_value = extract_ac_15_14(instruction); |
89a955e8 | 6426 | |
3f2aec07 ML |
6427 | const char *ac = AC(ac_value, info); |
6428 | const char *rs = GPR(rs_value, info); | |
6429 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 6430 | |
c5231692 | 6431 | return img_format("DPSX.W.PH %s, %s, %s", ac, rs, rt); |
89a955e8 AM |
6432 | } |
6433 | ||
6434 | ||
6435 | /* | |
6436 | * DROTR - | |
6437 | * | |
6438 | * 3 2 1 | |
6439 | * 10987654321098765432109876543210 | |
6440 | * 001000 x1110000101 | |
6441 | * rt ----- | |
6442 | * rs ----- | |
6443 | * rd ----- | |
6444 | */ | |
7def8a4b | 6445 | static char *DROTR(uint64 instruction, Dis_info *info) |
89a955e8 AM |
6446 | { |
6447 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 6448 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 6449 | uint64 shift_value = extract_shift_4_3_2_1_0(instruction); |
89a955e8 | 6450 | |
3f2aec07 ML |
6451 | const char *rt = GPR(rt_value, info); |
6452 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 6453 | |
4066c152 | 6454 | return img_format("DROTR %s, %s, 0x%" PRIx64, rt, rs, shift_value); |
89a955e8 AM |
6455 | } |
6456 | ||
6457 | ||
6458 | /* | |
6459 | * DROTR[32] - | |
6460 | * | |
6461 | * 3 2 1 | |
6462 | * 10987654321098765432109876543210 | |
6463 | * 10o000 1100xxx0110 | |
6464 | * rt ----- | |
6465 | * rs ----- | |
6466 | * shift ----- | |
6467 | */ | |
7def8a4b | 6468 | static char *DROTR32(uint64 instruction, Dis_info *info) |
89a955e8 AM |
6469 | { |
6470 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 6471 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 6472 | uint64 shift_value = extract_shift_4_3_2_1_0(instruction); |
89a955e8 | 6473 | |
3f2aec07 ML |
6474 | const char *rt = GPR(rt_value, info); |
6475 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 6476 | |
4066c152 | 6477 | return img_format("DROTR32 %s, %s, 0x%" PRIx64, rt, rs, shift_value); |
89a955e8 AM |
6478 | } |
6479 | ||
6480 | ||
6481 | /* | |
6482 | * | |
6483 | * | |
6484 | * 3 2 1 | |
6485 | * 10987654321098765432109876543210 | |
6486 | * 001000 x1110000101 | |
6487 | * rt ----- | |
6488 | * rs ----- | |
6489 | * rd ----- | |
6490 | */ | |
7def8a4b | 6491 | static char *DROTRV(uint64 instruction, Dis_info *info) |
89a955e8 AM |
6492 | { |
6493 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 6494 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 6495 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 6496 | |
3f2aec07 ML |
6497 | const char *rd = GPR(rd_value, info); |
6498 | const char *rs = GPR(rs_value, info); | |
6499 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 6500 | |
c5231692 | 6501 | return img_format("DROTRV %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
6502 | } |
6503 | ||
6504 | ||
6505 | /* | |
6506 | * | |
6507 | * | |
6508 | * 3 2 1 | |
6509 | * 10987654321098765432109876543210 | |
6510 | * 001000 x1110000101 | |
6511 | * rt ----- | |
6512 | * rs ----- | |
6513 | * rd ----- | |
6514 | */ | |
7def8a4b | 6515 | static char *DROTX(uint64 instruction, Dis_info *info) |
89a955e8 AM |
6516 | { |
6517 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 6518 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 AM |
6519 | uint64 shiftx_value = extract_shiftx_11_10_9_8_7_6(instruction); |
6520 | uint64 shift_value = extract_shift_5_4_3_2_1_0(instruction); | |
89a955e8 | 6521 | |
3f2aec07 ML |
6522 | const char *rt = GPR(rt_value, info); |
6523 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 6524 | |
4066c152 ML |
6525 | return img_format("DROTX %s, %s, 0x%" PRIx64 ", 0x%" PRIx64, |
6526 | rt, rs, shift_value, shiftx_value); | |
89a955e8 AM |
6527 | } |
6528 | ||
6529 | ||
6530 | /* | |
6531 | * DSLL - | |
6532 | * | |
6533 | * 3 2 1 | |
6534 | * 10987654321098765432109876543210 | |
6535 | * 10o000 1100xxx0000 | |
6536 | * rt ----- | |
6537 | * rs ----- | |
6538 | * shift ----- | |
6539 | */ | |
7def8a4b | 6540 | static char *DSLL(uint64 instruction, Dis_info *info) |
89a955e8 AM |
6541 | { |
6542 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 6543 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 6544 | uint64 shift_value = extract_shift_4_3_2_1_0(instruction); |
89a955e8 | 6545 | |
3f2aec07 ML |
6546 | const char *rt = GPR(rt_value, info); |
6547 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 6548 | |
4066c152 | 6549 | return img_format("DSLL %s, %s, 0x%" PRIx64, rt, rs, shift_value); |
89a955e8 AM |
6550 | } |
6551 | ||
6552 | ||
6553 | /* | |
6554 | * DSLL[32] - | |
6555 | * | |
6556 | * 3 2 1 | |
6557 | * 10987654321098765432109876543210 | |
6558 | * 10o000 1100xxx0000 | |
6559 | * rt ----- | |
6560 | * rs ----- | |
6561 | * shift ----- | |
6562 | */ | |
7def8a4b | 6563 | static char *DSLL32(uint64 instruction, Dis_info *info) |
89a955e8 AM |
6564 | { |
6565 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 6566 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 6567 | uint64 shift_value = extract_shift_4_3_2_1_0(instruction); |
89a955e8 | 6568 | |
3f2aec07 ML |
6569 | const char *rt = GPR(rt_value, info); |
6570 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 6571 | |
4066c152 | 6572 | return img_format("DSLL32 %s, %s, 0x%" PRIx64, rt, rs, shift_value); |
89a955e8 AM |
6573 | } |
6574 | ||
6575 | ||
6576 | /* | |
6577 | * | |
6578 | * | |
6579 | * 3 2 1 | |
6580 | * 10987654321098765432109876543210 | |
6581 | * 001000 x1110000101 | |
6582 | * rt ----- | |
6583 | * rs ----- | |
6584 | * rd ----- | |
6585 | */ | |
7def8a4b | 6586 | static char *DSLLV(uint64 instruction, Dis_info *info) |
89a955e8 AM |
6587 | { |
6588 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 6589 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 6590 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 6591 | |
3f2aec07 ML |
6592 | const char *rd = GPR(rd_value, info); |
6593 | const char *rs = GPR(rs_value, info); | |
6594 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 6595 | |
c5231692 | 6596 | return img_format("DSLLV %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
6597 | } |
6598 | ||
6599 | ||
6600 | /* | |
6601 | * DSRA - | |
6602 | * | |
6603 | * 3 2 1 | |
6604 | * 10987654321098765432109876543210 | |
6605 | * 10o000 1100xxx0100 | |
6606 | * rt ----- | |
6607 | * rs ----- | |
6608 | * shift ----- | |
6609 | */ | |
7def8a4b | 6610 | static char *DSRA(uint64 instruction, Dis_info *info) |
89a955e8 AM |
6611 | { |
6612 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 6613 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 6614 | uint64 shift_value = extract_shift_4_3_2_1_0(instruction); |
89a955e8 | 6615 | |
3f2aec07 ML |
6616 | const char *rt = GPR(rt_value, info); |
6617 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 6618 | |
4066c152 | 6619 | return img_format("DSRA %s, %s, 0x%" PRIx64, rt, rs, shift_value); |
89a955e8 AM |
6620 | } |
6621 | ||
6622 | ||
6623 | /* | |
6624 | * DSRA[32] - | |
6625 | * | |
6626 | * 3 2 1 | |
6627 | * 10987654321098765432109876543210 | |
6628 | * 10o000 1100xxx0100 | |
6629 | * rt ----- | |
6630 | * rs ----- | |
6631 | * shift ----- | |
6632 | */ | |
7def8a4b | 6633 | static char *DSRA32(uint64 instruction, Dis_info *info) |
89a955e8 AM |
6634 | { |
6635 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 6636 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 6637 | uint64 shift_value = extract_shift_4_3_2_1_0(instruction); |
89a955e8 | 6638 | |
3f2aec07 ML |
6639 | const char *rt = GPR(rt_value, info); |
6640 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 6641 | |
4066c152 | 6642 | return img_format("DSRA32 %s, %s, 0x%" PRIx64, rt, rs, shift_value); |
89a955e8 AM |
6643 | } |
6644 | ||
6645 | ||
6646 | /* | |
6647 | * | |
6648 | * | |
6649 | * 3 2 1 | |
6650 | * 10987654321098765432109876543210 | |
6651 | * 001000 x1110000101 | |
6652 | * rt ----- | |
6653 | * rs ----- | |
6654 | * rd ----- | |
6655 | */ | |
7def8a4b | 6656 | static char *DSRAV(uint64 instruction, Dis_info *info) |
89a955e8 AM |
6657 | { |
6658 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 6659 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 6660 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 6661 | |
3f2aec07 ML |
6662 | const char *rd = GPR(rd_value, info); |
6663 | const char *rs = GPR(rs_value, info); | |
6664 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 6665 | |
c5231692 | 6666 | return img_format("DSRAV %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
6667 | } |
6668 | ||
6669 | ||
6670 | /* | |
6671 | * DSRL - | |
6672 | * | |
6673 | * 3 2 1 | |
6674 | * 10987654321098765432109876543210 | |
6675 | * 10o000 1100xxx0100 | |
6676 | * rt ----- | |
6677 | * rs ----- | |
6678 | * shift ----- | |
6679 | */ | |
7def8a4b | 6680 | static char *DSRL(uint64 instruction, Dis_info *info) |
89a955e8 AM |
6681 | { |
6682 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 6683 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 6684 | uint64 shift_value = extract_shift_4_3_2_1_0(instruction); |
89a955e8 | 6685 | |
3f2aec07 ML |
6686 | const char *rt = GPR(rt_value, info); |
6687 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 6688 | |
4066c152 | 6689 | return img_format("DSRL %s, %s, 0x%" PRIx64, rt, rs, shift_value); |
89a955e8 AM |
6690 | } |
6691 | ||
6692 | ||
6693 | /* | |
6694 | * DSRL[32] - | |
6695 | * | |
6696 | * 3 2 1 | |
6697 | * 10987654321098765432109876543210 | |
6698 | * 10o000 1100xxx0010 | |
6699 | * rt ----- | |
6700 | * rs ----- | |
6701 | * shift ----- | |
6702 | */ | |
7def8a4b | 6703 | static char *DSRL32(uint64 instruction, Dis_info *info) |
89a955e8 AM |
6704 | { |
6705 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 6706 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 6707 | uint64 shift_value = extract_shift_4_3_2_1_0(instruction); |
89a955e8 | 6708 | |
3f2aec07 ML |
6709 | const char *rt = GPR(rt_value, info); |
6710 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 6711 | |
4066c152 | 6712 | return img_format("DSRL32 %s, %s, 0x%" PRIx64, rt, rs, shift_value); |
89a955e8 AM |
6713 | } |
6714 | ||
6715 | ||
6716 | /* | |
6717 | * | |
6718 | * | |
6719 | * 3 2 1 | |
6720 | * 10987654321098765432109876543210 | |
6721 | * 001000 x1110000101 | |
6722 | * rt ----- | |
6723 | * rs ----- | |
6724 | * rd ----- | |
6725 | */ | |
7def8a4b | 6726 | static char *DSRLV(uint64 instruction, Dis_info *info) |
89a955e8 AM |
6727 | { |
6728 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 6729 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 6730 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 6731 | |
3f2aec07 ML |
6732 | const char *rd = GPR(rd_value, info); |
6733 | const char *rs = GPR(rs_value, info); | |
6734 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 6735 | |
c5231692 | 6736 | return img_format("DSRLV %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
6737 | } |
6738 | ||
6739 | ||
6740 | /* | |
6741 | * | |
6742 | * | |
6743 | * 3 2 1 | |
6744 | * 10987654321098765432109876543210 | |
6745 | * 001000 x1110000101 | |
6746 | * rt ----- | |
6747 | * rs ----- | |
6748 | * rd ----- | |
6749 | */ | |
7def8a4b | 6750 | static char *DSUB(uint64 instruction, Dis_info *info) |
89a955e8 AM |
6751 | { |
6752 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 6753 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 6754 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 6755 | |
3f2aec07 ML |
6756 | const char *rd = GPR(rd_value, info); |
6757 | const char *rs = GPR(rs_value, info); | |
6758 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 6759 | |
c5231692 | 6760 | return img_format("DSUB %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
6761 | } |
6762 | ||
6763 | ||
6764 | /* | |
6765 | * | |
6766 | * | |
6767 | * 3 2 1 | |
6768 | * 10987654321098765432109876543210 | |
6769 | * 001000 x1110000101 | |
6770 | * rt ----- | |
6771 | * rs ----- | |
6772 | * rd ----- | |
6773 | */ | |
7def8a4b | 6774 | static char *DSUBU(uint64 instruction, Dis_info *info) |
89a955e8 AM |
6775 | { |
6776 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 6777 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 6778 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 6779 | |
3f2aec07 ML |
6780 | const char *rd = GPR(rd_value, info); |
6781 | const char *rs = GPR(rs_value, info); | |
6782 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 6783 | |
c5231692 | 6784 | return img_format("DSUBU %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
6785 | } |
6786 | ||
6787 | ||
6788 | /* | |
6789 | * | |
6790 | * | |
6791 | * 3 2 1 | |
6792 | * 10987654321098765432109876543210 | |
6793 | * 001000 x1110000101 | |
6794 | * rt ----- | |
6795 | * rs ----- | |
6796 | * rd ----- | |
6797 | */ | |
7def8a4b | 6798 | static char *DVPE(uint64 instruction, Dis_info *info) |
89a955e8 AM |
6799 | { |
6800 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
6801 | ||
3f2aec07 | 6802 | const char *rt = GPR(rt_value, info); |
89a955e8 | 6803 | |
c5231692 | 6804 | return img_format("DVPE %s", rt); |
89a955e8 AM |
6805 | } |
6806 | ||
6807 | ||
6808 | /* | |
6809 | * | |
6810 | * | |
6811 | * 3 2 1 | |
6812 | * 10987654321098765432109876543210 | |
6813 | * 001000 x1110000101 | |
6814 | * rt ----- | |
6815 | * rs ----- | |
6816 | * rd ----- | |
6817 | */ | |
7def8a4b | 6818 | static char *DVP(uint64 instruction, Dis_info *info) |
89a955e8 AM |
6819 | { |
6820 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
6821 | ||
3f2aec07 | 6822 | const char *rt = GPR(rt_value, info); |
89a955e8 | 6823 | |
c5231692 | 6824 | return img_format("DVP %s", rt); |
89a955e8 AM |
6825 | } |
6826 | ||
6827 | ||
6828 | /* | |
6829 | * | |
6830 | * | |
6831 | * 3 2 1 | |
6832 | * 10987654321098765432109876543210 | |
6833 | * 001000 x1110000101 | |
6834 | * rt ----- | |
6835 | * rs ----- | |
6836 | * rd ----- | |
6837 | */ | |
7def8a4b | 6838 | static char *EHB(uint64 instruction, Dis_info *info) |
89a955e8 AM |
6839 | { |
6840 | (void)instruction; | |
6841 | ||
7def8a4b | 6842 | return g_strdup("EHB "); |
89a955e8 AM |
6843 | } |
6844 | ||
6845 | ||
6846 | /* | |
6847 | * | |
6848 | * | |
6849 | * 3 2 1 | |
6850 | * 10987654321098765432109876543210 | |
6851 | * 001000 x1110000101 | |
6852 | * rt ----- | |
6853 | * rs ----- | |
6854 | * rd ----- | |
6855 | */ | |
7def8a4b | 6856 | static char *EI(uint64 instruction, Dis_info *info) |
89a955e8 AM |
6857 | { |
6858 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
6859 | ||
3f2aec07 | 6860 | const char *rt = GPR(rt_value, info); |
89a955e8 | 6861 | |
c5231692 | 6862 | return img_format("EI %s", rt); |
89a955e8 AM |
6863 | } |
6864 | ||
6865 | ||
6866 | /* | |
6867 | * | |
6868 | * | |
6869 | * 3 2 1 | |
6870 | * 10987654321098765432109876543210 | |
6871 | * 001000 x1110000101 | |
6872 | * rt ----- | |
6873 | * rs ----- | |
6874 | * rd ----- | |
6875 | */ | |
7def8a4b | 6876 | static char *EMT(uint64 instruction, Dis_info *info) |
89a955e8 AM |
6877 | { |
6878 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
6879 | ||
3f2aec07 | 6880 | const char *rt = GPR(rt_value, info); |
89a955e8 | 6881 | |
c5231692 | 6882 | return img_format("EMT %s", rt); |
89a955e8 AM |
6883 | } |
6884 | ||
6885 | ||
6886 | /* | |
6887 | * | |
6888 | * | |
6889 | * 3 2 1 | |
6890 | * 10987654321098765432109876543210 | |
6891 | * 001000 x1110000101 | |
6892 | * rt ----- | |
6893 | * rs ----- | |
6894 | * rd ----- | |
6895 | */ | |
7def8a4b | 6896 | static char *ERET(uint64 instruction, Dis_info *info) |
89a955e8 AM |
6897 | { |
6898 | (void)instruction; | |
6899 | ||
7def8a4b | 6900 | return g_strdup("ERET "); |
89a955e8 AM |
6901 | } |
6902 | ||
6903 | ||
6904 | /* | |
6905 | * | |
6906 | * | |
6907 | * 3 2 1 | |
6908 | * 10987654321098765432109876543210 | |
6909 | * 001000 x1110000101 | |
6910 | * rt ----- | |
6911 | * rs ----- | |
6912 | * rd ----- | |
6913 | */ | |
7def8a4b | 6914 | static char *ERETNC(uint64 instruction, Dis_info *info) |
89a955e8 AM |
6915 | { |
6916 | (void)instruction; | |
6917 | ||
7def8a4b | 6918 | return g_strdup("ERETNC "); |
89a955e8 AM |
6919 | } |
6920 | ||
6921 | ||
6922 | /* | |
6923 | * | |
6924 | * | |
6925 | * 3 2 1 | |
6926 | * 10987654321098765432109876543210 | |
6927 | * 001000 x1110000101 | |
6928 | * rt ----- | |
6929 | * rs ----- | |
6930 | * rd ----- | |
6931 | */ | |
7def8a4b | 6932 | static char *EVP(uint64 instruction, Dis_info *info) |
89a955e8 AM |
6933 | { |
6934 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
6935 | ||
3f2aec07 | 6936 | const char *rt = GPR(rt_value, info); |
89a955e8 | 6937 | |
c5231692 | 6938 | return img_format("EVP %s", rt); |
89a955e8 AM |
6939 | } |
6940 | ||
6941 | ||
6942 | /* | |
6943 | * | |
6944 | * | |
6945 | * 3 2 1 | |
6946 | * 10987654321098765432109876543210 | |
6947 | * 001000 x1110000101 | |
6948 | * rt ----- | |
6949 | * rs ----- | |
6950 | * rd ----- | |
6951 | */ | |
7def8a4b | 6952 | static char *EVPE(uint64 instruction, Dis_info *info) |
89a955e8 AM |
6953 | { |
6954 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
6955 | ||
3f2aec07 | 6956 | const char *rt = GPR(rt_value, info); |
89a955e8 | 6957 | |
c5231692 | 6958 | return img_format("EVPE %s", rt); |
89a955e8 AM |
6959 | } |
6960 | ||
6961 | ||
6962 | /* | |
6963 | * | |
6964 | * | |
6965 | * 3 2 1 | |
6966 | * 10987654321098765432109876543210 | |
6967 | * 001000 x1110000101 | |
6968 | * rt ----- | |
6969 | * rs ----- | |
6970 | * rd ----- | |
6971 | */ | |
7def8a4b | 6972 | static char *EXT(uint64 instruction, Dis_info *info) |
89a955e8 AM |
6973 | { |
6974 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
75199b40 | 6975 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
89a955e8 AM |
6976 | uint64 msbd_value = extract_msbt_10_9_8_7_6(instruction); |
6977 | uint64 lsb_value = extract_lsb_4_3_2_1_0(instruction); | |
89a955e8 | 6978 | |
3f2aec07 ML |
6979 | const char *rt = GPR(rt_value, info); |
6980 | const char *rs = GPR(rs_value, info); | |
4066c152 | 6981 | uint64 msbd = encode_msbd_from_size(msbd_value); |
89a955e8 | 6982 | |
4066c152 ML |
6983 | return img_format("EXT %s, %s, 0x%" PRIx64 ", 0x%" PRIx64, |
6984 | rt, rs, lsb_value, msbd); | |
89a955e8 AM |
6985 | } |
6986 | ||
6987 | ||
6988 | /* | |
6989 | * | |
6990 | * | |
6991 | * 3 2 1 | |
6992 | * 10987654321098765432109876543210 | |
6993 | * 001000 x1110000101 | |
6994 | * rt ----- | |
6995 | * rs ----- | |
6996 | * rd ----- | |
6997 | */ | |
7def8a4b | 6998 | static char *EXTD(uint64 instruction, Dis_info *info) |
89a955e8 AM |
6999 | { |
7000 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 7001 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 7002 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
75199b40 | 7003 | uint64 shift_value = extract_shift_10_9_8_7_6(instruction); |
89a955e8 | 7004 | |
3f2aec07 ML |
7005 | const char *rd = GPR(rd_value, info); |
7006 | const char *rs = GPR(rs_value, info); | |
7007 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 7008 | |
4066c152 | 7009 | return img_format("EXTD %s, %s, %s, 0x%" PRIx64, rd, rs, rt, shift_value); |
89a955e8 AM |
7010 | } |
7011 | ||
7012 | ||
7013 | /* | |
7014 | * | |
7015 | * | |
7016 | * 3 2 1 | |
7017 | * 10987654321098765432109876543210 | |
7018 | * 001000 x1110000101 | |
7019 | * rt ----- | |
7020 | * rs ----- | |
7021 | * rd ----- | |
7022 | */ | |
7def8a4b | 7023 | static char *EXTD32(uint64 instruction, Dis_info *info) |
89a955e8 AM |
7024 | { |
7025 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 7026 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 7027 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
75199b40 | 7028 | uint64 shift_value = extract_shift_10_9_8_7_6(instruction); |
89a955e8 | 7029 | |
3f2aec07 ML |
7030 | const char *rd = GPR(rd_value, info); |
7031 | const char *rs = GPR(rs_value, info); | |
7032 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 7033 | |
4066c152 | 7034 | return img_format("EXTD32 %s, %s, %s, 0x%" PRIx64, rd, rs, rt, shift_value); |
89a955e8 AM |
7035 | } |
7036 | ||
7037 | ||
7038 | /* | |
7039 | * | |
7040 | * | |
7041 | * 3 2 1 | |
7042 | * 10987654321098765432109876543210 | |
7043 | * 001000 x1110000101 | |
7044 | * rt ----- | |
7045 | * rs ----- | |
7046 | * rd ----- | |
7047 | */ | |
7def8a4b | 7048 | static char *EXTPDP(uint64 instruction, Dis_info *info) |
89a955e8 AM |
7049 | { |
7050 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 7051 | uint64 size_value = extract_size_20_19_18_17_16(instruction); |
0f74e61d | 7052 | uint64 ac_value = extract_ac_15_14(instruction); |
89a955e8 | 7053 | |
3f2aec07 ML |
7054 | const char *rt = GPR(rt_value, info); |
7055 | const char *ac = AC(ac_value, info); | |
89a955e8 | 7056 | |
4066c152 | 7057 | return img_format("EXTPDP %s, %s, 0x%" PRIx64, rt, ac, size_value); |
89a955e8 AM |
7058 | } |
7059 | ||
7060 | ||
7061 | /* | |
7062 | * | |
7063 | * | |
7064 | * 3 2 1 | |
7065 | * 10987654321098765432109876543210 | |
7066 | * 001000 x1110000101 | |
7067 | * rt ----- | |
7068 | * rs ----- | |
7069 | * rd ----- | |
7070 | */ | |
7def8a4b | 7071 | static char *EXTPDPV(uint64 instruction, Dis_info *info) |
89a955e8 AM |
7072 | { |
7073 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 7074 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
0f74e61d | 7075 | uint64 ac_value = extract_ac_15_14(instruction); |
89a955e8 | 7076 | |
3f2aec07 ML |
7077 | const char *rt = GPR(rt_value, info); |
7078 | const char *ac = AC(ac_value, info); | |
7079 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 7080 | |
c5231692 | 7081 | return img_format("EXTPDPV %s, %s, %s", rt, ac, rs); |
89a955e8 AM |
7082 | } |
7083 | ||
7084 | ||
7085 | /* | |
7086 | * | |
7087 | * | |
7088 | * 3 2 1 | |
7089 | * 10987654321098765432109876543210 | |
7090 | * 001000 x1110000101 | |
7091 | * rt ----- | |
7092 | * rs ----- | |
7093 | * rd ----- | |
7094 | */ | |
7def8a4b | 7095 | static char *EXTP(uint64 instruction, Dis_info *info) |
89a955e8 AM |
7096 | { |
7097 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 7098 | uint64 size_value = extract_size_20_19_18_17_16(instruction); |
0f74e61d | 7099 | uint64 ac_value = extract_ac_15_14(instruction); |
89a955e8 | 7100 | |
3f2aec07 ML |
7101 | const char *rt = GPR(rt_value, info); |
7102 | const char *ac = AC(ac_value, info); | |
89a955e8 | 7103 | |
4066c152 | 7104 | return img_format("EXTP %s, %s, 0x%" PRIx64, rt, ac, size_value); |
89a955e8 AM |
7105 | } |
7106 | ||
7107 | ||
7108 | /* | |
7109 | * | |
7110 | * | |
7111 | * 3 2 1 | |
7112 | * 10987654321098765432109876543210 | |
7113 | * 001000 x1110000101 | |
7114 | * rt ----- | |
7115 | * rs ----- | |
7116 | * rd ----- | |
7117 | */ | |
7def8a4b | 7118 | static char *EXTPV(uint64 instruction, Dis_info *info) |
89a955e8 AM |
7119 | { |
7120 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 7121 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
0f74e61d | 7122 | uint64 ac_value = extract_ac_15_14(instruction); |
89a955e8 | 7123 | |
3f2aec07 ML |
7124 | const char *rt = GPR(rt_value, info); |
7125 | const char *ac = AC(ac_value, info); | |
7126 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 7127 | |
c5231692 | 7128 | return img_format("EXTPV %s, %s, %s", rt, ac, rs); |
89a955e8 AM |
7129 | } |
7130 | ||
7131 | ||
7132 | /* | |
5c65eed6 AM |
7133 | * [DSP] EXTR_RS.W rt, ac, shift - Extract word value from accumulator to GPR |
7134 | * with right shift | |
89a955e8 AM |
7135 | * |
7136 | * 3 2 1 | |
7137 | * 10987654321098765432109876543210 | |
5c65eed6 | 7138 | * 001000 10111001111111 |
89a955e8 | 7139 | * rt ----- |
5c65eed6 AM |
7140 | * shift ----- |
7141 | * ac -- | |
89a955e8 | 7142 | */ |
7def8a4b | 7143 | static char *EXTR_RS_W(uint64 instruction, Dis_info *info) |
89a955e8 AM |
7144 | { |
7145 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
7146 | uint64 shift_value = extract_shift_20_19_18_17_16(instruction); | |
0f74e61d | 7147 | uint64 ac_value = extract_ac_15_14(instruction); |
89a955e8 | 7148 | |
3f2aec07 ML |
7149 | const char *rt = GPR(rt_value, info); |
7150 | const char *ac = AC(ac_value, info); | |
89a955e8 | 7151 | |
4066c152 | 7152 | return img_format("EXTR_RS.W %s, %s, 0x%" PRIx64, rt, ac, shift_value); |
89a955e8 AM |
7153 | } |
7154 | ||
7155 | ||
7156 | /* | |
5c65eed6 AM |
7157 | * [DSP] EXTR_R.W rt, ac, shift - Extract word value from accumulator to GPR |
7158 | * with right shift | |
89a955e8 AM |
7159 | * |
7160 | * 3 2 1 | |
7161 | * 10987654321098765432109876543210 | |
5c65eed6 | 7162 | * 001000 01111001111111 |
89a955e8 | 7163 | * rt ----- |
5c65eed6 AM |
7164 | * shift ----- |
7165 | * ac -- | |
89a955e8 | 7166 | */ |
7def8a4b | 7167 | static char *EXTR_R_W(uint64 instruction, Dis_info *info) |
89a955e8 AM |
7168 | { |
7169 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
7170 | uint64 shift_value = extract_shift_20_19_18_17_16(instruction); | |
0f74e61d | 7171 | uint64 ac_value = extract_ac_15_14(instruction); |
89a955e8 | 7172 | |
3f2aec07 ML |
7173 | const char *rt = GPR(rt_value, info); |
7174 | const char *ac = AC(ac_value, info); | |
89a955e8 | 7175 | |
4066c152 | 7176 | return img_format("EXTR_R.W %s, %s, 0x%" PRIx64, rt, ac, shift_value); |
89a955e8 AM |
7177 | } |
7178 | ||
7179 | ||
7180 | /* | |
5c65eed6 AM |
7181 | * [DSP] EXTR_S.H rt, ac, shift - Extract halfword value from accumulator |
7182 | * to GPR with right shift and saturate | |
89a955e8 AM |
7183 | * |
7184 | * 3 2 1 | |
7185 | * 10987654321098765432109876543210 | |
5c65eed6 | 7186 | * 001000 11111001111111 |
89a955e8 | 7187 | * rt ----- |
5c65eed6 AM |
7188 | * shift ----- |
7189 | * ac -- | |
89a955e8 | 7190 | */ |
7def8a4b | 7191 | static char *EXTR_S_H(uint64 instruction, Dis_info *info) |
89a955e8 AM |
7192 | { |
7193 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
7194 | uint64 shift_value = extract_shift_20_19_18_17_16(instruction); | |
0f74e61d | 7195 | uint64 ac_value = extract_ac_15_14(instruction); |
89a955e8 | 7196 | |
3f2aec07 ML |
7197 | const char *rt = GPR(rt_value, info); |
7198 | const char *ac = AC(ac_value, info); | |
89a955e8 | 7199 | |
4066c152 | 7200 | return img_format("EXTR_S.H %s, %s, 0x%" PRIx64, rt, ac, shift_value); |
89a955e8 AM |
7201 | } |
7202 | ||
7203 | ||
7204 | /* | |
5c65eed6 AM |
7205 | * [DSP] EXTR.W rt, ac, shift - Extract word value from accumulator to GPR |
7206 | * with right shift | |
89a955e8 AM |
7207 | * |
7208 | * 3 2 1 | |
7209 | * 10987654321098765432109876543210 | |
5c65eed6 | 7210 | * 001000 00111001111111 |
89a955e8 | 7211 | * rt ----- |
5c65eed6 AM |
7212 | * shift ----- |
7213 | * ac -- | |
89a955e8 | 7214 | */ |
7def8a4b | 7215 | static char *EXTR_W(uint64 instruction, Dis_info *info) |
89a955e8 AM |
7216 | { |
7217 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
7218 | uint64 shift_value = extract_shift_20_19_18_17_16(instruction); | |
0f74e61d | 7219 | uint64 ac_value = extract_ac_15_14(instruction); |
89a955e8 | 7220 | |
3f2aec07 ML |
7221 | const char *rt = GPR(rt_value, info); |
7222 | const char *ac = AC(ac_value, info); | |
89a955e8 | 7223 | |
4066c152 | 7224 | return img_format("EXTR.W %s, %s, 0x%" PRIx64, rt, ac, shift_value); |
89a955e8 AM |
7225 | } |
7226 | ||
7227 | ||
7228 | /* | |
5c65eed6 AM |
7229 | * [DSP] EXTRV_RS.W rt, ac, rs - Extract word value with variable |
7230 | * right shift from accumulator to GPR | |
89a955e8 AM |
7231 | * |
7232 | * 3 2 1 | |
7233 | * 10987654321098765432109876543210 | |
5c65eed6 | 7234 | * 001000 10111010111111 |
89a955e8 AM |
7235 | * rt ----- |
7236 | * rs ----- | |
5c65eed6 | 7237 | * ac -- |
89a955e8 | 7238 | */ |
7def8a4b | 7239 | static char *EXTRV_RS_W(uint64 instruction, Dis_info *info) |
89a955e8 AM |
7240 | { |
7241 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 7242 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
0f74e61d | 7243 | uint64 ac_value = extract_ac_15_14(instruction); |
89a955e8 | 7244 | |
3f2aec07 ML |
7245 | const char *rt = GPR(rt_value, info); |
7246 | const char *ac = AC(ac_value, info); | |
7247 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 7248 | |
c5231692 | 7249 | return img_format("EXTRV_RS.W %s, %s, %s", rt, ac, rs); |
89a955e8 AM |
7250 | } |
7251 | ||
7252 | ||
7253 | /* | |
5c65eed6 AM |
7254 | * [DSP] EXTRV_R.W rt, ac, rs - Extract word value with variable |
7255 | * right shift from accumulator to GPR | |
89a955e8 AM |
7256 | * |
7257 | * 3 2 1 | |
7258 | * 10987654321098765432109876543210 | |
5c65eed6 | 7259 | * 001000 01111010111111 |
89a955e8 AM |
7260 | * rt ----- |
7261 | * rs ----- | |
5c65eed6 | 7262 | * ac -- |
89a955e8 | 7263 | */ |
7def8a4b | 7264 | static char *EXTRV_R_W(uint64 instruction, Dis_info *info) |
89a955e8 AM |
7265 | { |
7266 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 7267 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
0f74e61d | 7268 | uint64 ac_value = extract_ac_15_14(instruction); |
89a955e8 | 7269 | |
3f2aec07 ML |
7270 | const char *rt = GPR(rt_value, info); |
7271 | const char *ac = AC(ac_value, info); | |
7272 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 7273 | |
c5231692 | 7274 | return img_format("EXTRV_R.W %s, %s, %s", rt, ac, rs); |
89a955e8 AM |
7275 | } |
7276 | ||
7277 | ||
7278 | /* | |
5c65eed6 AM |
7279 | * [DSP] EXTRV_S.H rt, ac, rs - Extract halfword value variable from |
7280 | * accumulator to GPR with right shift and saturate | |
89a955e8 AM |
7281 | * |
7282 | * 3 2 1 | |
7283 | * 10987654321098765432109876543210 | |
5c65eed6 | 7284 | * 001000 11111010111111 |
89a955e8 AM |
7285 | * rt ----- |
7286 | * rs ----- | |
5c65eed6 | 7287 | * ac -- |
89a955e8 | 7288 | */ |
7def8a4b | 7289 | static char *EXTRV_S_H(uint64 instruction, Dis_info *info) |
89a955e8 AM |
7290 | { |
7291 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 7292 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
0f74e61d | 7293 | uint64 ac_value = extract_ac_15_14(instruction); |
89a955e8 | 7294 | |
3f2aec07 ML |
7295 | const char *rt = GPR(rt_value, info); |
7296 | const char *ac = AC(ac_value, info); | |
7297 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 7298 | |
c5231692 | 7299 | return img_format("EXTRV_S.H %s, %s, %s", rt, ac, rs); |
89a955e8 AM |
7300 | } |
7301 | ||
7302 | ||
7303 | /* | |
5c65eed6 AM |
7304 | * [DSP] EXTRV.W rt, ac, rs - Extract word value with variable |
7305 | * right shift from accumulator to GPR | |
89a955e8 AM |
7306 | * |
7307 | * 3 2 1 | |
7308 | * 10987654321098765432109876543210 | |
5c65eed6 | 7309 | * 001000 00111010111111 |
89a955e8 AM |
7310 | * rt ----- |
7311 | * rs ----- | |
5c65eed6 | 7312 | * ac -- |
89a955e8 | 7313 | */ |
7def8a4b | 7314 | static char *EXTRV_W(uint64 instruction, Dis_info *info) |
89a955e8 AM |
7315 | { |
7316 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 7317 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
0f74e61d | 7318 | uint64 ac_value = extract_ac_15_14(instruction); |
89a955e8 | 7319 | |
3f2aec07 ML |
7320 | const char *rt = GPR(rt_value, info); |
7321 | const char *ac = AC(ac_value, info); | |
7322 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 7323 | |
c5231692 | 7324 | return img_format("EXTRV.W %s, %s, %s", rt, ac, rs); |
89a955e8 AM |
7325 | } |
7326 | ||
7327 | ||
7328 | /* | |
7329 | * EXTW - Extract Word | |
7330 | * | |
7331 | * 3 2 1 | |
7332 | * 10987654321098765432109876543210 | |
7333 | * 001000 011111 | |
7334 | * rt ----- | |
7335 | * rs ----- | |
7336 | * rd ----- | |
7337 | * shift ----- | |
7338 | */ | |
7def8a4b | 7339 | static char *EXTW(uint64 instruction, Dis_info *info) |
89a955e8 AM |
7340 | { |
7341 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 7342 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 7343 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
75199b40 | 7344 | uint64 shift_value = extract_shift_10_9_8_7_6(instruction); |
89a955e8 | 7345 | |
3f2aec07 ML |
7346 | const char *rd = GPR(rd_value, info); |
7347 | const char *rs = GPR(rs_value, info); | |
7348 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 7349 | |
4066c152 | 7350 | return img_format("EXTW %s, %s, %s, 0x%" PRIx64, rd, rs, rt, shift_value); |
89a955e8 AM |
7351 | } |
7352 | ||
7353 | ||
7354 | /* | |
7355 | * | |
7356 | * | |
7357 | * 3 2 1 | |
7358 | * 10987654321098765432109876543210 | |
7359 | * 001000 x1110000101 | |
7360 | * rt ----- | |
7361 | * rs ----- | |
7362 | * rd ----- | |
7363 | */ | |
7def8a4b | 7364 | static char *FLOOR_L_D(uint64 instruction, Dis_info *info) |
89a955e8 | 7365 | { |
17ce2f00 | 7366 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 7367 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 | 7368 | |
3f2aec07 ML |
7369 | const char *ft = FPR(ft_value, info); |
7370 | const char *fs = FPR(fs_value, info); | |
89a955e8 | 7371 | |
c5231692 | 7372 | return img_format("FLOOR.L.D %s, %s", ft, fs); |
89a955e8 AM |
7373 | } |
7374 | ||
7375 | ||
7376 | /* | |
7377 | * | |
7378 | * | |
7379 | * 3 2 1 | |
7380 | * 10987654321098765432109876543210 | |
7381 | * 001000 x1110000101 | |
7382 | * rt ----- | |
7383 | * rs ----- | |
7384 | * rd ----- | |
7385 | */ | |
7def8a4b | 7386 | static char *FLOOR_L_S(uint64 instruction, Dis_info *info) |
89a955e8 | 7387 | { |
17ce2f00 | 7388 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 7389 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 | 7390 | |
3f2aec07 ML |
7391 | const char *ft = FPR(ft_value, info); |
7392 | const char *fs = FPR(fs_value, info); | |
89a955e8 | 7393 | |
c5231692 | 7394 | return img_format("FLOOR.L.S %s, %s", ft, fs); |
89a955e8 AM |
7395 | } |
7396 | ||
7397 | ||
7398 | /* | |
7399 | * | |
7400 | * | |
7401 | * 3 2 1 | |
7402 | * 10987654321098765432109876543210 | |
7403 | * 001000 x1110000101 | |
7404 | * rt ----- | |
7405 | * rs ----- | |
7406 | * rd ----- | |
7407 | */ | |
7def8a4b | 7408 | static char *FLOOR_W_D(uint64 instruction, Dis_info *info) |
89a955e8 | 7409 | { |
17ce2f00 | 7410 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 7411 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 | 7412 | |
3f2aec07 ML |
7413 | const char *ft = FPR(ft_value, info); |
7414 | const char *fs = FPR(fs_value, info); | |
89a955e8 | 7415 | |
c5231692 | 7416 | return img_format("FLOOR.W.D %s, %s", ft, fs); |
89a955e8 AM |
7417 | } |
7418 | ||
7419 | ||
7420 | /* | |
7421 | * | |
7422 | * | |
7423 | * 3 2 1 | |
7424 | * 10987654321098765432109876543210 | |
7425 | * 001000 x1110000101 | |
7426 | * rt ----- | |
7427 | * rs ----- | |
7428 | * rd ----- | |
7429 | */ | |
7def8a4b | 7430 | static char *FLOOR_W_S(uint64 instruction, Dis_info *info) |
89a955e8 | 7431 | { |
17ce2f00 | 7432 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 7433 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 | 7434 | |
3f2aec07 ML |
7435 | const char *ft = FPR(ft_value, info); |
7436 | const char *fs = FPR(fs_value, info); | |
89a955e8 | 7437 | |
c5231692 | 7438 | return img_format("FLOOR.W.S %s, %s", ft, fs); |
89a955e8 AM |
7439 | } |
7440 | ||
7441 | ||
7442 | /* | |
7443 | * | |
7444 | * | |
7445 | * 3 2 1 | |
7446 | * 10987654321098765432109876543210 | |
7447 | * 001000 x1110000101 | |
7448 | * rt ----- | |
7449 | * rs ----- | |
7450 | * rd ----- | |
7451 | */ | |
7def8a4b | 7452 | static char *FORK(uint64 instruction, Dis_info *info) |
89a955e8 AM |
7453 | { |
7454 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 7455 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 7456 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 7457 | |
3f2aec07 ML |
7458 | const char *rd = GPR(rd_value, info); |
7459 | const char *rs = GPR(rs_value, info); | |
7460 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 7461 | |
c5231692 | 7462 | return img_format("FORK %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
7463 | } |
7464 | ||
7465 | ||
7466 | /* | |
7467 | * | |
7468 | * | |
7469 | * 3 2 1 | |
7470 | * 10987654321098765432109876543210 | |
7471 | * 001000 x1110000101 | |
7472 | * rt ----- | |
7473 | * rs ----- | |
7474 | * rd ----- | |
7475 | */ | |
7def8a4b | 7476 | static char *HYPCALL(uint64 instruction, Dis_info *info) |
89a955e8 AM |
7477 | { |
7478 | uint64 code_value = extract_code_17_to_0(instruction); | |
7479 | ||
89a955e8 | 7480 | |
4066c152 | 7481 | return img_format("HYPCALL 0x%" PRIx64, code_value); |
89a955e8 AM |
7482 | } |
7483 | ||
7484 | ||
7485 | /* | |
7486 | * | |
7487 | * | |
7488 | * 3 2 1 | |
7489 | * 10987654321098765432109876543210 | |
7490 | * 001000 x1110000101 | |
7491 | * rt ----- | |
7492 | * rs ----- | |
7493 | * rd ----- | |
7494 | */ | |
7def8a4b | 7495 | static char *HYPCALL_16_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
7496 | { |
7497 | uint64 code_value = extract_code_1_0(instruction); | |
7498 | ||
89a955e8 | 7499 | |
4066c152 | 7500 | return img_format("HYPCALL 0x%" PRIx64, code_value); |
89a955e8 AM |
7501 | } |
7502 | ||
7503 | ||
7504 | /* | |
7505 | * | |
7506 | * | |
7507 | * 3 2 1 | |
7508 | * 10987654321098765432109876543210 | |
7509 | * 001000 x1110000101 | |
7510 | * rt ----- | |
7511 | * rs ----- | |
7512 | * rd ----- | |
7513 | */ | |
7def8a4b | 7514 | static char *INS(uint64 instruction, Dis_info *info) |
89a955e8 AM |
7515 | { |
7516 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
75199b40 | 7517 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
89a955e8 AM |
7518 | uint64 msbd_value = extract_msbt_10_9_8_7_6(instruction); |
7519 | uint64 lsb_value = extract_lsb_4_3_2_1_0(instruction); | |
89a955e8 | 7520 | |
3f2aec07 ML |
7521 | const char *rt = GPR(rt_value, info); |
7522 | const char *rs = GPR(rs_value, info); | |
89a955e8 AM |
7523 | /* !!!!!!!!!! - no conversion function */ |
7524 | ||
4066c152 ML |
7525 | return img_format("INS %s, %s, 0x%" PRIx64 ", 0x%" PRIx64, |
7526 | rt, rs, lsb_value, msbd_value); | |
89a955e8 AM |
7527 | /* hand edited */ |
7528 | } | |
7529 | ||
7530 | ||
7531 | /* | |
5c65eed6 | 7532 | * [DSP] INSV rt, rs - Insert bit field variable |
89a955e8 AM |
7533 | * |
7534 | * 3 2 1 | |
7535 | * 10987654321098765432109876543210 | |
5c65eed6 | 7536 | * 001000 0100000100111111 |
89a955e8 AM |
7537 | * rt ----- |
7538 | * rs ----- | |
89a955e8 | 7539 | */ |
7def8a4b | 7540 | static char *INSV(uint64 instruction, Dis_info *info) |
89a955e8 AM |
7541 | { |
7542 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
7543 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
7544 | ||
3f2aec07 ML |
7545 | const char *rt = GPR(rt_value, info); |
7546 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 7547 | |
c5231692 | 7548 | return img_format("INSV %s, %s", rt, rs); |
89a955e8 AM |
7549 | } |
7550 | ||
7551 | ||
7552 | /* | |
7553 | * | |
7554 | * | |
7555 | * 3 2 1 | |
7556 | * 10987654321098765432109876543210 | |
7557 | * 001000 x1110000101 | |
7558 | * rt ----- | |
7559 | * rs ----- | |
7560 | * rd ----- | |
7561 | */ | |
7def8a4b | 7562 | static char *IRET(uint64 instruction, Dis_info *info) |
89a955e8 AM |
7563 | { |
7564 | (void)instruction; | |
7565 | ||
7def8a4b | 7566 | return g_strdup("IRET "); |
89a955e8 AM |
7567 | } |
7568 | ||
7569 | ||
7570 | /* | |
7571 | * | |
7572 | * | |
7573 | * 3 2 1 | |
7574 | * 10987654321098765432109876543210 | |
7575 | * 001000 x1110000101 | |
7576 | * rt ----- | |
7577 | * rs ----- | |
7578 | * rd ----- | |
7579 | */ | |
7def8a4b | 7580 | static char *JALRC_16_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
7581 | { |
7582 | uint64 rt_value = extract_rt_9_8_7_6_5(instruction); | |
7583 | ||
3f2aec07 | 7584 | const char *rt = GPR(rt_value, info); |
89a955e8 | 7585 | |
c5231692 | 7586 | return img_format("JALRC $%d, %s", 31, rt); |
89a955e8 AM |
7587 | } |
7588 | ||
7589 | ||
7590 | /* | |
7591 | * | |
7592 | * | |
7593 | * 3 2 1 | |
7594 | * 10987654321098765432109876543210 | |
7595 | * 001000 x1110000101 | |
7596 | * rt ----- | |
7597 | * rs ----- | |
7598 | * rd ----- | |
7599 | */ | |
7def8a4b | 7600 | static char *JALRC_32_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
7601 | { |
7602 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
7603 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
7604 | ||
3f2aec07 ML |
7605 | const char *rt = GPR(rt_value, info); |
7606 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 7607 | |
c5231692 | 7608 | return img_format("JALRC %s, %s", rt, rs); |
89a955e8 AM |
7609 | } |
7610 | ||
7611 | ||
7612 | /* | |
7613 | * | |
7614 | * | |
7615 | * 3 2 1 | |
7616 | * 10987654321098765432109876543210 | |
7617 | * 001000 x1110000101 | |
7618 | * rt ----- | |
7619 | * rs ----- | |
7620 | * rd ----- | |
7621 | */ | |
7def8a4b | 7622 | static char *JALRC_HB(uint64 instruction, Dis_info *info) |
89a955e8 AM |
7623 | { |
7624 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
7625 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
7626 | ||
3f2aec07 ML |
7627 | const char *rt = GPR(rt_value, info); |
7628 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 7629 | |
c5231692 | 7630 | return img_format("JALRC.HB %s, %s", rt, rs); |
89a955e8 AM |
7631 | } |
7632 | ||
7633 | ||
7634 | /* | |
7635 | * | |
7636 | * | |
7637 | * 3 2 1 | |
7638 | * 10987654321098765432109876543210 | |
7639 | * 001000 x1110000101 | |
7640 | * rt ----- | |
7641 | * rs ----- | |
7642 | * rd ----- | |
7643 | */ | |
7def8a4b | 7644 | static char *JRC(uint64 instruction, Dis_info *info) |
89a955e8 AM |
7645 | { |
7646 | uint64 rt_value = extract_rt_9_8_7_6_5(instruction); | |
7647 | ||
3f2aec07 | 7648 | const char *rt = GPR(rt_value, info); |
89a955e8 | 7649 | |
c5231692 | 7650 | return img_format("JRC %s", rt); |
89a955e8 AM |
7651 | } |
7652 | ||
7653 | ||
7654 | /* | |
7655 | * | |
7656 | * | |
7657 | * 3 2 1 | |
7658 | * 10987654321098765432109876543210 | |
7659 | * 001000 x1110000101 | |
7660 | * rt ----- | |
7661 | * rs ----- | |
7662 | * rd ----- | |
7663 | */ | |
7def8a4b | 7664 | static char *LB_16_(uint64 instruction, Dis_info *info) |
89a955e8 | 7665 | { |
89a955e8 AM |
7666 | uint64 rt3_value = extract_rt3_9_8_7(instruction); |
7667 | uint64 rs3_value = extract_rs3_6_5_4(instruction); | |
75199b40 | 7668 | uint64 u_value = extract_u_1_0(instruction); |
89a955e8 | 7669 | |
3f2aec07 ML |
7670 | const char *rt3 = GPR(decode_gpr_gpr3(rt3_value, info), info); |
7671 | const char *rs3 = GPR(decode_gpr_gpr3(rs3_value, info), info); | |
89a955e8 | 7672 | |
4066c152 | 7673 | return img_format("LB %s, 0x%" PRIx64 "(%s)", rt3, u_value, rs3); |
89a955e8 AM |
7674 | } |
7675 | ||
7676 | ||
7677 | /* | |
7678 | * | |
7679 | * | |
7680 | * 3 2 1 | |
7681 | * 10987654321098765432109876543210 | |
7682 | * 001000 x1110000101 | |
7683 | * rt ----- | |
7684 | * rs ----- | |
7685 | * rd ----- | |
7686 | */ | |
7def8a4b | 7687 | static char *LB_GP_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
7688 | { |
7689 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
7690 | uint64 u_value = extract_u_17_to_0(instruction); | |
7691 | ||
3f2aec07 | 7692 | const char *rt = GPR(rt_value, info); |
89a955e8 | 7693 | |
4066c152 | 7694 | return img_format("LB %s, 0x%" PRIx64 "($%d)", rt, u_value, 28); |
89a955e8 AM |
7695 | } |
7696 | ||
7697 | ||
7698 | /* | |
7699 | * | |
7700 | * | |
7701 | * 3 2 1 | |
7702 | * 10987654321098765432109876543210 | |
7703 | * 001000 x1110000101 | |
7704 | * rt ----- | |
7705 | * rs ----- | |
7706 | * rd ----- | |
7707 | */ | |
7def8a4b | 7708 | static char *LB_S9_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
7709 | { |
7710 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 7711 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 7712 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
89a955e8 | 7713 | |
3f2aec07 ML |
7714 | const char *rt = GPR(rt_value, info); |
7715 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 7716 | |
4066c152 | 7717 | return img_format("LB %s, %" PRId64 "(%s)", rt, s_value, rs); |
89a955e8 AM |
7718 | } |
7719 | ||
7720 | ||
7721 | /* | |
7722 | * | |
7723 | * | |
7724 | * 3 2 1 | |
7725 | * 10987654321098765432109876543210 | |
7726 | * 001000 x1110000101 | |
7727 | * rt ----- | |
7728 | * rs ----- | |
7729 | * rd ----- | |
7730 | */ | |
7def8a4b | 7731 | static char *LB_U12_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
7732 | { |
7733 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 7734 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 7735 | uint64 u_value = extract_u_11_10_9_8_7_6_5_4_3_2_1_0(instruction); |
89a955e8 | 7736 | |
3f2aec07 ML |
7737 | const char *rt = GPR(rt_value, info); |
7738 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 7739 | |
4066c152 | 7740 | return img_format("LB %s, 0x%" PRIx64 "(%s)", rt, u_value, rs); |
89a955e8 AM |
7741 | } |
7742 | ||
7743 | ||
7744 | /* | |
7745 | * | |
7746 | * | |
7747 | * 3 2 1 | |
7748 | * 10987654321098765432109876543210 | |
7749 | * 001000 x1110000101 | |
7750 | * rt ----- | |
7751 | * rs ----- | |
7752 | * rd ----- | |
7753 | */ | |
7def8a4b | 7754 | static char *LBE(uint64 instruction, Dis_info *info) |
89a955e8 AM |
7755 | { |
7756 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 7757 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 7758 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
89a955e8 | 7759 | |
3f2aec07 ML |
7760 | const char *rt = GPR(rt_value, info); |
7761 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 7762 | |
4066c152 | 7763 | return img_format("LBE %s, %" PRId64 "(%s)", rt, s_value, rs); |
89a955e8 AM |
7764 | } |
7765 | ||
7766 | ||
7767 | /* | |
7768 | * | |
7769 | * | |
7770 | * 3 2 1 | |
7771 | * 10987654321098765432109876543210 | |
7772 | * 001000 x1110000101 | |
7773 | * rt ----- | |
7774 | * rs ----- | |
7775 | * rd ----- | |
7776 | */ | |
7def8a4b | 7777 | static char *LBU_16_(uint64 instruction, Dis_info *info) |
89a955e8 | 7778 | { |
89a955e8 AM |
7779 | uint64 rt3_value = extract_rt3_9_8_7(instruction); |
7780 | uint64 rs3_value = extract_rs3_6_5_4(instruction); | |
75199b40 | 7781 | uint64 u_value = extract_u_1_0(instruction); |
89a955e8 | 7782 | |
3f2aec07 ML |
7783 | const char *rt3 = GPR(decode_gpr_gpr3(rt3_value, info), info); |
7784 | const char *rs3 = GPR(decode_gpr_gpr3(rs3_value, info), info); | |
89a955e8 | 7785 | |
4066c152 | 7786 | return img_format("LBU %s, 0x%" PRIx64 "(%s)", rt3, u_value, rs3); |
89a955e8 AM |
7787 | } |
7788 | ||
7789 | ||
7790 | /* | |
7791 | * | |
7792 | * | |
7793 | * 3 2 1 | |
7794 | * 10987654321098765432109876543210 | |
7795 | * 001000 x1110000101 | |
7796 | * rt ----- | |
7797 | * rs ----- | |
7798 | * rd ----- | |
7799 | */ | |
7def8a4b | 7800 | static char *LBU_GP_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
7801 | { |
7802 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
7803 | uint64 u_value = extract_u_17_to_0(instruction); | |
7804 | ||
3f2aec07 | 7805 | const char *rt = GPR(rt_value, info); |
89a955e8 | 7806 | |
4066c152 | 7807 | return img_format("LBU %s, 0x%" PRIx64 "($%d)", rt, u_value, 28); |
89a955e8 AM |
7808 | } |
7809 | ||
7810 | ||
7811 | /* | |
7812 | * | |
7813 | * | |
7814 | * 3 2 1 | |
7815 | * 10987654321098765432109876543210 | |
7816 | * 001000 x1110000101 | |
7817 | * rt ----- | |
7818 | * rs ----- | |
7819 | * rd ----- | |
7820 | */ | |
7def8a4b | 7821 | static char *LBU_S9_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
7822 | { |
7823 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 7824 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 7825 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
89a955e8 | 7826 | |
3f2aec07 ML |
7827 | const char *rt = GPR(rt_value, info); |
7828 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 7829 | |
4066c152 | 7830 | return img_format("LBU %s, %" PRId64 "(%s)", rt, s_value, rs); |
89a955e8 AM |
7831 | } |
7832 | ||
7833 | ||
7834 | /* | |
7835 | * | |
7836 | * | |
7837 | * 3 2 1 | |
7838 | * 10987654321098765432109876543210 | |
7839 | * 001000 x1110000101 | |
7840 | * rt ----- | |
7841 | * rs ----- | |
7842 | * rd ----- | |
7843 | */ | |
7def8a4b | 7844 | static char *LBU_U12_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
7845 | { |
7846 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 7847 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 7848 | uint64 u_value = extract_u_11_10_9_8_7_6_5_4_3_2_1_0(instruction); |
89a955e8 | 7849 | |
3f2aec07 ML |
7850 | const char *rt = GPR(rt_value, info); |
7851 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 7852 | |
4066c152 | 7853 | return img_format("LBU %s, 0x%" PRIx64 "(%s)", rt, u_value, rs); |
89a955e8 AM |
7854 | } |
7855 | ||
7856 | ||
7857 | /* | |
7858 | * | |
7859 | * | |
7860 | * 3 2 1 | |
7861 | * 10987654321098765432109876543210 | |
7862 | * 001000 x1110000101 | |
7863 | * rt ----- | |
7864 | * rs ----- | |
7865 | * rd ----- | |
7866 | */ | |
7def8a4b | 7867 | static char *LBUE(uint64 instruction, Dis_info *info) |
89a955e8 AM |
7868 | { |
7869 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 7870 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 7871 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
89a955e8 | 7872 | |
3f2aec07 ML |
7873 | const char *rt = GPR(rt_value, info); |
7874 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 7875 | |
4066c152 | 7876 | return img_format("LBUE %s, %" PRId64 "(%s)", rt, s_value, rs); |
89a955e8 AM |
7877 | } |
7878 | ||
7879 | ||
7880 | /* | |
7881 | * | |
7882 | * | |
7883 | * 3 2 1 | |
7884 | * 10987654321098765432109876543210 | |
7885 | * 001000 x1110000101 | |
7886 | * rt ----- | |
7887 | * rs ----- | |
7888 | * rd ----- | |
7889 | */ | |
7def8a4b | 7890 | static char *LBUX(uint64 instruction, Dis_info *info) |
89a955e8 AM |
7891 | { |
7892 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 7893 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 7894 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 7895 | |
3f2aec07 ML |
7896 | const char *rd = GPR(rd_value, info); |
7897 | const char *rs = GPR(rs_value, info); | |
7898 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 7899 | |
c5231692 | 7900 | return img_format("LBUX %s, %s(%s)", rd, rs, rt); |
89a955e8 AM |
7901 | } |
7902 | ||
7903 | ||
7904 | /* | |
7905 | * | |
7906 | * | |
7907 | * 3 2 1 | |
7908 | * 10987654321098765432109876543210 | |
7909 | * 001000 x1110000101 | |
7910 | * rt ----- | |
7911 | * rs ----- | |
7912 | * rd ----- | |
7913 | */ | |
7def8a4b | 7914 | static char *LBX(uint64 instruction, Dis_info *info) |
89a955e8 AM |
7915 | { |
7916 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 7917 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 7918 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 7919 | |
3f2aec07 ML |
7920 | const char *rd = GPR(rd_value, info); |
7921 | const char *rs = GPR(rs_value, info); | |
7922 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 7923 | |
c5231692 | 7924 | return img_format("LBX %s, %s(%s)", rd, rs, rt); |
89a955e8 AM |
7925 | } |
7926 | ||
7927 | ||
7928 | /* | |
7929 | * | |
7930 | * | |
7931 | * 3 2 1 | |
7932 | * 10987654321098765432109876543210 | |
7933 | * 001000 x1110000101 | |
7934 | * rt ----- | |
7935 | * rs ----- | |
7936 | * rd ----- | |
7937 | */ | |
7def8a4b | 7938 | static char *LD_GP_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
7939 | { |
7940 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
11b9732a | 7941 | uint64 u_value = extract_u_20_to_3__s3(instruction); |
89a955e8 | 7942 | |
3f2aec07 | 7943 | const char *rt = GPR(rt_value, info); |
89a955e8 | 7944 | |
4066c152 | 7945 | return img_format("LD %s, 0x%" PRIx64 "($%d)", rt, u_value, 28); |
89a955e8 AM |
7946 | } |
7947 | ||
7948 | ||
7949 | /* | |
7950 | * | |
7951 | * | |
7952 | * 3 2 1 | |
7953 | * 10987654321098765432109876543210 | |
7954 | * 001000 x1110000101 | |
7955 | * rt ----- | |
7956 | * rs ----- | |
7957 | * rd ----- | |
7958 | */ | |
7def8a4b | 7959 | static char *LD_S9_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
7960 | { |
7961 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 7962 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 7963 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
89a955e8 | 7964 | |
3f2aec07 ML |
7965 | const char *rt = GPR(rt_value, info); |
7966 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 7967 | |
4066c152 | 7968 | return img_format("LD %s, %" PRId64 "(%s)", rt, s_value, rs); |
89a955e8 AM |
7969 | } |
7970 | ||
7971 | ||
7972 | /* | |
7973 | * | |
7974 | * | |
7975 | * 3 2 1 | |
7976 | * 10987654321098765432109876543210 | |
7977 | * 001000 x1110000101 | |
7978 | * rt ----- | |
7979 | * rs ----- | |
7980 | * rd ----- | |
7981 | */ | |
7def8a4b | 7982 | static char *LD_U12_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
7983 | { |
7984 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 7985 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 7986 | uint64 u_value = extract_u_11_10_9_8_7_6_5_4_3_2_1_0(instruction); |
89a955e8 | 7987 | |
3f2aec07 ML |
7988 | const char *rt = GPR(rt_value, info); |
7989 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 7990 | |
4066c152 | 7991 | return img_format("LD %s, 0x%" PRIx64 "(%s)", rt, u_value, rs); |
89a955e8 AM |
7992 | } |
7993 | ||
7994 | ||
7995 | /* | |
7996 | * | |
7997 | * | |
7998 | * 3 2 1 | |
7999 | * 10987654321098765432109876543210 | |
8000 | * 001000 x1110000101 | |
8001 | * rt ----- | |
8002 | * rs ----- | |
8003 | * rd ----- | |
8004 | */ | |
7def8a4b | 8005 | static char *LDC1_GP_(uint64 instruction, Dis_info *info) |
89a955e8 | 8006 | { |
17ce2f00 | 8007 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
11b9732a | 8008 | uint64 u_value = extract_u_17_to_2__s2(instruction); |
89a955e8 | 8009 | |
3f2aec07 | 8010 | const char *ft = FPR(ft_value, info); |
89a955e8 | 8011 | |
4066c152 | 8012 | return img_format("LDC1 %s, 0x%" PRIx64 "($%d)", ft, u_value, 28); |
89a955e8 AM |
8013 | } |
8014 | ||
8015 | ||
8016 | /* | |
8017 | * | |
8018 | * | |
8019 | * 3 2 1 | |
8020 | * 10987654321098765432109876543210 | |
8021 | * 001000 x1110000101 | |
8022 | * rt ----- | |
8023 | * rs ----- | |
8024 | * rd ----- | |
8025 | */ | |
7def8a4b | 8026 | static char *LDC1_S9_(uint64 instruction, Dis_info *info) |
89a955e8 | 8027 | { |
17ce2f00 | 8028 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
89a955e8 | 8029 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 8030 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
89a955e8 | 8031 | |
3f2aec07 ML |
8032 | const char *ft = FPR(ft_value, info); |
8033 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 8034 | |
4066c152 | 8035 | return img_format("LDC1 %s, %" PRId64 "(%s)", ft, s_value, rs); |
89a955e8 AM |
8036 | } |
8037 | ||
8038 | ||
8039 | /* | |
8040 | * | |
8041 | * | |
8042 | * 3 2 1 | |
8043 | * 10987654321098765432109876543210 | |
8044 | * 001000 x1110000101 | |
8045 | * rt ----- | |
8046 | * rs ----- | |
8047 | * rd ----- | |
8048 | */ | |
7def8a4b | 8049 | static char *LDC1_U12_(uint64 instruction, Dis_info *info) |
89a955e8 | 8050 | { |
17ce2f00 | 8051 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
89a955e8 | 8052 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 8053 | uint64 u_value = extract_u_11_10_9_8_7_6_5_4_3_2_1_0(instruction); |
89a955e8 | 8054 | |
3f2aec07 ML |
8055 | const char *ft = FPR(ft_value, info); |
8056 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 8057 | |
4066c152 | 8058 | return img_format("LDC1 %s, 0x%" PRIx64 "(%s)", ft, u_value, rs); |
89a955e8 AM |
8059 | } |
8060 | ||
8061 | ||
8062 | /* | |
8063 | * | |
8064 | * | |
8065 | * 3 2 1 | |
8066 | * 10987654321098765432109876543210 | |
8067 | * 001000 x1110000101 | |
8068 | * rt ----- | |
8069 | * rs ----- | |
8070 | * rd ----- | |
8071 | */ | |
7def8a4b | 8072 | static char *LDC1XS(uint64 instruction, Dis_info *info) |
89a955e8 AM |
8073 | { |
8074 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 8075 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 8076 | uint64 ft_value = extract_ft_15_14_13_12_11(instruction); |
89a955e8 | 8077 | |
3f2aec07 ML |
8078 | const char *ft = FPR(ft_value, info); |
8079 | const char *rs = GPR(rs_value, info); | |
8080 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 8081 | |
c5231692 | 8082 | return img_format("LDC1XS %s, %s(%s)", ft, rs, rt); |
89a955e8 AM |
8083 | } |
8084 | ||
8085 | ||
8086 | /* | |
8087 | * | |
8088 | * | |
8089 | * 3 2 1 | |
8090 | * 10987654321098765432109876543210 | |
8091 | * 001000 x1110000101 | |
8092 | * rt ----- | |
8093 | * rs ----- | |
8094 | * rd ----- | |
8095 | */ | |
7def8a4b | 8096 | static char *LDC1X(uint64 instruction, Dis_info *info) |
89a955e8 AM |
8097 | { |
8098 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 8099 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 8100 | uint64 ft_value = extract_ft_15_14_13_12_11(instruction); |
89a955e8 | 8101 | |
3f2aec07 ML |
8102 | const char *ft = FPR(ft_value, info); |
8103 | const char *rs = GPR(rs_value, info); | |
8104 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 8105 | |
c5231692 | 8106 | return img_format("LDC1X %s, %s(%s)", ft, rs, rt); |
89a955e8 AM |
8107 | } |
8108 | ||
8109 | ||
8110 | /* | |
8111 | * | |
8112 | * | |
8113 | * 3 2 1 | |
8114 | * 10987654321098765432109876543210 | |
8115 | * 001000 x1110000101 | |
8116 | * rt ----- | |
8117 | * rs ----- | |
8118 | * rd ----- | |
8119 | */ | |
7def8a4b | 8120 | static char *LDC2(uint64 instruction, Dis_info *info) |
89a955e8 | 8121 | { |
89a955e8 AM |
8122 | uint64 ct_value = extract_ct_25_24_23_22_21(instruction); |
8123 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
75199b40 | 8124 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
89a955e8 | 8125 | |
3f2aec07 | 8126 | const char *rs = GPR(rs_value, info); |
89a955e8 | 8127 | |
043dc73c ML |
8128 | return img_format("LDC2 CP%" PRIu64 ", %" PRId64 "(%s)", |
8129 | ct_value, s_value, rs); | |
89a955e8 AM |
8130 | } |
8131 | ||
8132 | ||
8133 | /* | |
8134 | * | |
8135 | * | |
8136 | * 3 2 1 | |
8137 | * 10987654321098765432109876543210 | |
8138 | * 001000 x1110000101 | |
8139 | * rt ----- | |
8140 | * rs ----- | |
8141 | * rd ----- | |
8142 | */ | |
7def8a4b | 8143 | static char *LDM(uint64 instruction, Dis_info *info) |
89a955e8 AM |
8144 | { |
8145 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 8146 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 AM |
8147 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
8148 | uint64 count3_value = extract_count3_14_13_12(instruction); | |
89a955e8 | 8149 | |
3f2aec07 ML |
8150 | const char *rt = GPR(rt_value, info); |
8151 | const char *rs = GPR(rs_value, info); | |
4066c152 | 8152 | uint64 count3 = encode_count3_from_count(count3_value); |
89a955e8 | 8153 | |
4066c152 ML |
8154 | return img_format("LDM %s, %" PRId64 "(%s), 0x%" PRIx64, |
8155 | rt, s_value, rs, count3); | |
89a955e8 AM |
8156 | } |
8157 | ||
8158 | ||
8159 | /* | |
8160 | * | |
8161 | * | |
8162 | * 3 2 1 | |
8163 | * 10987654321098765432109876543210 | |
8164 | * 001000 x1110000101 | |
8165 | * rt ----- | |
8166 | * rs ----- | |
8167 | * rd ----- | |
8168 | */ | |
7def8a4b | 8169 | static char *LDPC_48_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
8170 | { |
8171 | uint64 rt_value = extract_rt_41_40_39_38_37(instruction); | |
d3605cc0 | 8172 | int64 s_value = extract_s__se31_15_to_0_31_to_16(instruction); |
89a955e8 | 8173 | |
3f2aec07 | 8174 | const char *rt = GPR(rt_value, info); |
22e7b52a | 8175 | g_autofree char *s = ADDRESS(s_value, 6, info); |
89a955e8 | 8176 | |
c5231692 | 8177 | return img_format("LDPC %s, %s", rt, s); |
89a955e8 AM |
8178 | } |
8179 | ||
8180 | ||
8181 | /* | |
8182 | * | |
8183 | * | |
8184 | * 3 2 1 | |
8185 | * 10987654321098765432109876543210 | |
8186 | * 001000 x1110000101 | |
8187 | * rt ----- | |
8188 | * rs ----- | |
8189 | * rd ----- | |
8190 | */ | |
7def8a4b | 8191 | static char *LDX(uint64 instruction, Dis_info *info) |
89a955e8 AM |
8192 | { |
8193 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 8194 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 8195 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 8196 | |
3f2aec07 ML |
8197 | const char *rd = GPR(rd_value, info); |
8198 | const char *rs = GPR(rs_value, info); | |
8199 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 8200 | |
c5231692 | 8201 | return img_format("LDX %s, %s(%s)", rd, rs, rt); |
89a955e8 AM |
8202 | } |
8203 | ||
8204 | ||
8205 | /* | |
8206 | * | |
8207 | * | |
8208 | * 3 2 1 | |
8209 | * 10987654321098765432109876543210 | |
8210 | * 001000 x1110000101 | |
8211 | * rt ----- | |
8212 | * rs ----- | |
8213 | * rd ----- | |
8214 | */ | |
7def8a4b | 8215 | static char *LDXS(uint64 instruction, Dis_info *info) |
89a955e8 AM |
8216 | { |
8217 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 8218 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 8219 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 8220 | |
3f2aec07 ML |
8221 | const char *rd = GPR(rd_value, info); |
8222 | const char *rs = GPR(rs_value, info); | |
8223 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 8224 | |
c5231692 | 8225 | return img_format("LDXS %s, %s(%s)", rd, rs, rt); |
89a955e8 AM |
8226 | } |
8227 | ||
8228 | ||
8229 | /* | |
8230 | * | |
8231 | * | |
8232 | * 3 2 1 | |
8233 | * 10987654321098765432109876543210 | |
8234 | * 001000 x1110000101 | |
8235 | * rt ----- | |
8236 | * rs ----- | |
8237 | * rd ----- | |
8238 | */ | |
7def8a4b | 8239 | static char *LH_16_(uint64 instruction, Dis_info *info) |
89a955e8 | 8240 | { |
89a955e8 AM |
8241 | uint64 rt3_value = extract_rt3_9_8_7(instruction); |
8242 | uint64 rs3_value = extract_rs3_6_5_4(instruction); | |
75199b40 | 8243 | uint64 u_value = extract_u_2_1__s1(instruction); |
89a955e8 | 8244 | |
3f2aec07 ML |
8245 | const char *rt3 = GPR(decode_gpr_gpr3(rt3_value, info), info); |
8246 | const char *rs3 = GPR(decode_gpr_gpr3(rs3_value, info), info); | |
89a955e8 | 8247 | |
4066c152 | 8248 | return img_format("LH %s, 0x%" PRIx64 "(%s)", rt3, u_value, rs3); |
89a955e8 AM |
8249 | } |
8250 | ||
8251 | ||
8252 | /* | |
8253 | * | |
8254 | * | |
8255 | * 3 2 1 | |
8256 | * 10987654321098765432109876543210 | |
8257 | * 001000 x1110000101 | |
8258 | * rt ----- | |
8259 | * rs ----- | |
8260 | * rd ----- | |
8261 | */ | |
7def8a4b | 8262 | static char *LH_GP_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
8263 | { |
8264 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
11b9732a | 8265 | uint64 u_value = extract_u_17_to_1__s1(instruction); |
89a955e8 | 8266 | |
3f2aec07 | 8267 | const char *rt = GPR(rt_value, info); |
89a955e8 | 8268 | |
4066c152 | 8269 | return img_format("LH %s, 0x%" PRIx64 "($%d)", rt, u_value, 28); |
89a955e8 AM |
8270 | } |
8271 | ||
8272 | ||
8273 | /* | |
8274 | * | |
8275 | * | |
8276 | * 3 2 1 | |
8277 | * 10987654321098765432109876543210 | |
8278 | * 001000 x1110000101 | |
8279 | * rt ----- | |
8280 | * rs ----- | |
8281 | * rd ----- | |
8282 | */ | |
7def8a4b | 8283 | static char *LH_S9_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
8284 | { |
8285 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 8286 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 8287 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
89a955e8 | 8288 | |
3f2aec07 ML |
8289 | const char *rt = GPR(rt_value, info); |
8290 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 8291 | |
4066c152 | 8292 | return img_format("LH %s, %" PRId64 "(%s)", rt, s_value, rs); |
89a955e8 AM |
8293 | } |
8294 | ||
8295 | ||
8296 | /* | |
8297 | * | |
8298 | * | |
8299 | * 3 2 1 | |
8300 | * 10987654321098765432109876543210 | |
8301 | * 001000 x1110000101 | |
8302 | * rt ----- | |
8303 | * rs ----- | |
8304 | * rd ----- | |
8305 | */ | |
7def8a4b | 8306 | static char *LH_U12_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
8307 | { |
8308 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 8309 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 8310 | uint64 u_value = extract_u_11_10_9_8_7_6_5_4_3_2_1_0(instruction); |
89a955e8 | 8311 | |
3f2aec07 ML |
8312 | const char *rt = GPR(rt_value, info); |
8313 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 8314 | |
4066c152 | 8315 | return img_format("LH %s, 0x%" PRIx64 "(%s)", rt, u_value, rs); |
89a955e8 AM |
8316 | } |
8317 | ||
8318 | ||
8319 | /* | |
8320 | * | |
8321 | * | |
8322 | * 3 2 1 | |
8323 | * 10987654321098765432109876543210 | |
8324 | * 001000 x1110000101 | |
8325 | * rt ----- | |
8326 | * rs ----- | |
8327 | * rd ----- | |
8328 | */ | |
7def8a4b | 8329 | static char *LHE(uint64 instruction, Dis_info *info) |
89a955e8 AM |
8330 | { |
8331 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 8332 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 8333 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
89a955e8 | 8334 | |
3f2aec07 ML |
8335 | const char *rt = GPR(rt_value, info); |
8336 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 8337 | |
4066c152 | 8338 | return img_format("LHE %s, %" PRId64 "(%s)", rt, s_value, rs); |
89a955e8 AM |
8339 | } |
8340 | ||
8341 | ||
8342 | /* | |
8343 | * | |
8344 | * | |
8345 | * 3 2 1 | |
8346 | * 10987654321098765432109876543210 | |
8347 | * 001000 x1110000101 | |
8348 | * rt ----- | |
8349 | * rs ----- | |
8350 | * rd ----- | |
8351 | */ | |
7def8a4b | 8352 | static char *LHU_16_(uint64 instruction, Dis_info *info) |
89a955e8 | 8353 | { |
89a955e8 AM |
8354 | uint64 rt3_value = extract_rt3_9_8_7(instruction); |
8355 | uint64 rs3_value = extract_rs3_6_5_4(instruction); | |
75199b40 | 8356 | uint64 u_value = extract_u_2_1__s1(instruction); |
89a955e8 | 8357 | |
3f2aec07 ML |
8358 | const char *rt3 = GPR(decode_gpr_gpr3(rt3_value, info), info); |
8359 | const char *rs3 = GPR(decode_gpr_gpr3(rs3_value, info), info); | |
89a955e8 | 8360 | |
4066c152 | 8361 | return img_format("LHU %s, 0x%" PRIx64 "(%s)", rt3, u_value, rs3); |
89a955e8 AM |
8362 | } |
8363 | ||
8364 | ||
8365 | /* | |
8366 | * | |
8367 | * | |
8368 | * 3 2 1 | |
8369 | * 10987654321098765432109876543210 | |
8370 | * 001000 x1110000101 | |
8371 | * rt ----- | |
8372 | * rs ----- | |
8373 | * rd ----- | |
8374 | */ | |
7def8a4b | 8375 | static char *LHU_GP_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
8376 | { |
8377 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
11b9732a | 8378 | uint64 u_value = extract_u_17_to_1__s1(instruction); |
89a955e8 | 8379 | |
3f2aec07 | 8380 | const char *rt = GPR(rt_value, info); |
89a955e8 | 8381 | |
4066c152 | 8382 | return img_format("LHU %s, 0x%" PRIx64 "($%d)", rt, u_value, 28); |
89a955e8 AM |
8383 | } |
8384 | ||
8385 | ||
8386 | /* | |
8387 | * | |
8388 | * | |
8389 | * 3 2 1 | |
8390 | * 10987654321098765432109876543210 | |
8391 | * 001000 x1110000101 | |
8392 | * rt ----- | |
8393 | * rs ----- | |
8394 | * rd ----- | |
8395 | */ | |
7def8a4b | 8396 | static char *LHU_S9_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
8397 | { |
8398 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 8399 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 8400 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
89a955e8 | 8401 | |
3f2aec07 ML |
8402 | const char *rt = GPR(rt_value, info); |
8403 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 8404 | |
4066c152 | 8405 | return img_format("LHU %s, %" PRId64 "(%s)", rt, s_value, rs); |
89a955e8 AM |
8406 | } |
8407 | ||
8408 | ||
8409 | /* | |
8410 | * | |
8411 | * | |
8412 | * 3 2 1 | |
8413 | * 10987654321098765432109876543210 | |
8414 | * 001000 x1110000101 | |
8415 | * rt ----- | |
8416 | * rs ----- | |
8417 | * rd ----- | |
8418 | */ | |
7def8a4b | 8419 | static char *LHU_U12_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
8420 | { |
8421 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 8422 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 8423 | uint64 u_value = extract_u_11_10_9_8_7_6_5_4_3_2_1_0(instruction); |
89a955e8 | 8424 | |
3f2aec07 ML |
8425 | const char *rt = GPR(rt_value, info); |
8426 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 8427 | |
4066c152 | 8428 | return img_format("LHU %s, 0x%" PRIx64 "(%s)", rt, u_value, rs); |
89a955e8 AM |
8429 | } |
8430 | ||
8431 | ||
8432 | /* | |
8433 | * | |
8434 | * | |
8435 | * 3 2 1 | |
8436 | * 10987654321098765432109876543210 | |
8437 | * 001000 x1110000101 | |
8438 | * rt ----- | |
8439 | * rs ----- | |
8440 | * rd ----- | |
8441 | */ | |
7def8a4b | 8442 | static char *LHUE(uint64 instruction, Dis_info *info) |
89a955e8 AM |
8443 | { |
8444 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 8445 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 8446 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
89a955e8 | 8447 | |
3f2aec07 ML |
8448 | const char *rt = GPR(rt_value, info); |
8449 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 8450 | |
4066c152 | 8451 | return img_format("LHUE %s, %" PRId64 "(%s)", rt, s_value, rs); |
89a955e8 AM |
8452 | } |
8453 | ||
8454 | ||
8455 | /* | |
8456 | * | |
8457 | * | |
8458 | * 3 2 1 | |
8459 | * 10987654321098765432109876543210 | |
8460 | * 001000 x1110000101 | |
8461 | * rt ----- | |
8462 | * rs ----- | |
8463 | * rd ----- | |
8464 | */ | |
7def8a4b | 8465 | static char *LHUX(uint64 instruction, Dis_info *info) |
89a955e8 AM |
8466 | { |
8467 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 8468 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 8469 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 8470 | |
3f2aec07 ML |
8471 | const char *rd = GPR(rd_value, info); |
8472 | const char *rs = GPR(rs_value, info); | |
8473 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 8474 | |
c5231692 | 8475 | return img_format("LHUX %s, %s(%s)", rd, rs, rt); |
89a955e8 AM |
8476 | } |
8477 | ||
8478 | ||
8479 | /* | |
8480 | * | |
8481 | * | |
8482 | * 3 2 1 | |
8483 | * 10987654321098765432109876543210 | |
8484 | * 001000 x1110000101 | |
8485 | * rt ----- | |
8486 | * rs ----- | |
8487 | * rd ----- | |
8488 | */ | |
7def8a4b | 8489 | static char *LHUXS(uint64 instruction, Dis_info *info) |
89a955e8 AM |
8490 | { |
8491 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 8492 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 8493 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 8494 | |
3f2aec07 ML |
8495 | const char *rd = GPR(rd_value, info); |
8496 | const char *rs = GPR(rs_value, info); | |
8497 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 8498 | |
c5231692 | 8499 | return img_format("LHUXS %s, %s(%s)", rd, rs, rt); |
89a955e8 AM |
8500 | } |
8501 | ||
8502 | ||
8503 | /* | |
8504 | * | |
8505 | * | |
8506 | * 3 2 1 | |
8507 | * 10987654321098765432109876543210 | |
8508 | * 001000 x1110000101 | |
8509 | * rt ----- | |
8510 | * rs ----- | |
8511 | * rd ----- | |
8512 | */ | |
7def8a4b | 8513 | static char *LHXS(uint64 instruction, Dis_info *info) |
89a955e8 AM |
8514 | { |
8515 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 8516 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 8517 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 8518 | |
3f2aec07 ML |
8519 | const char *rd = GPR(rd_value, info); |
8520 | const char *rs = GPR(rs_value, info); | |
8521 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 8522 | |
c5231692 | 8523 | return img_format("LHXS %s, %s(%s)", rd, rs, rt); |
89a955e8 AM |
8524 | } |
8525 | ||
8526 | ||
8527 | /* | |
8528 | * | |
8529 | * | |
8530 | * 3 2 1 | |
8531 | * 10987654321098765432109876543210 | |
8532 | * 001000 x1110000101 | |
8533 | * rt ----- | |
8534 | * rs ----- | |
8535 | * rd ----- | |
8536 | */ | |
7def8a4b | 8537 | static char *LHX(uint64 instruction, Dis_info *info) |
89a955e8 AM |
8538 | { |
8539 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 8540 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 8541 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 8542 | |
3f2aec07 ML |
8543 | const char *rd = GPR(rd_value, info); |
8544 | const char *rs = GPR(rs_value, info); | |
8545 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 8546 | |
c5231692 | 8547 | return img_format("LHX %s, %s(%s)", rd, rs, rt); |
89a955e8 AM |
8548 | } |
8549 | ||
8550 | ||
8551 | /* | |
8552 | * | |
8553 | * | |
8554 | * 3 2 1 | |
8555 | * 10987654321098765432109876543210 | |
8556 | * 001000 x1110000101 | |
8557 | * rt ----- | |
8558 | * rs ----- | |
8559 | * rd ----- | |
8560 | */ | |
7def8a4b | 8561 | static char *LI_16_(uint64 instruction, Dis_info *info) |
89a955e8 | 8562 | { |
89a955e8 | 8563 | uint64 rt3_value = extract_rt3_9_8_7(instruction); |
75199b40 | 8564 | uint64 eu_value = extract_eu_6_5_4_3_2_1_0(instruction); |
89a955e8 | 8565 | |
3f2aec07 | 8566 | const char *rt3 = GPR(decode_gpr_gpr3(rt3_value, info), info); |
4066c152 | 8567 | int64 eu = encode_eu_from_s_li16(eu_value); |
89a955e8 | 8568 | |
4066c152 | 8569 | return img_format("LI %s, %" PRId64, rt3, eu); |
89a955e8 AM |
8570 | } |
8571 | ||
8572 | ||
8573 | /* | |
8574 | * | |
8575 | * | |
8576 | * 3 2 1 | |
8577 | * 10987654321098765432109876543210 | |
8578 | * 001000 x1110000101 | |
8579 | * rt ----- | |
8580 | * rs ----- | |
8581 | * rd ----- | |
8582 | */ | |
7def8a4b | 8583 | static char *LI_48_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
8584 | { |
8585 | uint64 rt_value = extract_rt_41_40_39_38_37(instruction); | |
d3605cc0 | 8586 | int64 s_value = extract_s__se31_15_to_0_31_to_16(instruction); |
89a955e8 | 8587 | |
3f2aec07 | 8588 | const char *rt = GPR(rt_value, info); |
89a955e8 | 8589 | |
4066c152 | 8590 | return img_format("LI %s, %" PRId64, rt, s_value); |
89a955e8 AM |
8591 | } |
8592 | ||
8593 | ||
8594 | /* | |
8595 | * | |
8596 | * | |
8597 | * 3 2 1 | |
8598 | * 10987654321098765432109876543210 | |
8599 | * 001000 x1110000101 | |
8600 | * rt ----- | |
8601 | * rs ----- | |
8602 | * rd ----- | |
8603 | */ | |
7def8a4b | 8604 | static char *LL(uint64 instruction, Dis_info *info) |
89a955e8 AM |
8605 | { |
8606 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 8607 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 8608 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_s2(instruction); |
89a955e8 | 8609 | |
3f2aec07 ML |
8610 | const char *rt = GPR(rt_value, info); |
8611 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 8612 | |
4066c152 | 8613 | return img_format("LL %s, %" PRId64 "(%s)", rt, s_value, rs); |
89a955e8 AM |
8614 | } |
8615 | ||
8616 | ||
8617 | /* | |
8618 | * | |
8619 | * | |
8620 | * 3 2 1 | |
8621 | * 10987654321098765432109876543210 | |
8622 | * 001000 x1110000101 | |
8623 | * rt ----- | |
8624 | * rs ----- | |
8625 | * rd ----- | |
8626 | */ | |
7def8a4b | 8627 | static char *LLD(uint64 instruction, Dis_info *info) |
89a955e8 AM |
8628 | { |
8629 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 8630 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 8631 | int64 s_value = extract_s__se8_15_7_6_5_4_3_s3(instruction); |
89a955e8 | 8632 | |
3f2aec07 ML |
8633 | const char *rt = GPR(rt_value, info); |
8634 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 8635 | |
4066c152 | 8636 | return img_format("LLD %s, %" PRId64 "(%s)", rt, s_value, rs); |
89a955e8 AM |
8637 | } |
8638 | ||
8639 | ||
8640 | /* | |
8641 | * | |
8642 | * | |
8643 | * 3 2 1 | |
8644 | * 10987654321098765432109876543210 | |
8645 | * 001000 x1110000101 | |
8646 | * rt ----- | |
8647 | * rs ----- | |
8648 | * rd ----- | |
8649 | */ | |
7def8a4b | 8650 | static char *LLDP(uint64 instruction, Dis_info *info) |
89a955e8 AM |
8651 | { |
8652 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 8653 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 8654 | uint64 ru_value = extract_ru_7_6_5_4_3(instruction); |
89a955e8 | 8655 | |
3f2aec07 ML |
8656 | const char *rt = GPR(rt_value, info); |
8657 | const char *ru = GPR(ru_value, info); | |
8658 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 8659 | |
c5231692 | 8660 | return img_format("LLDP %s, %s, (%s)", rt, ru, rs); |
89a955e8 AM |
8661 | } |
8662 | ||
8663 | ||
8664 | /* | |
8665 | * | |
8666 | * | |
8667 | * 3 2 1 | |
8668 | * 10987654321098765432109876543210 | |
8669 | * 001000 x1110000101 | |
8670 | * rt ----- | |
8671 | * rs ----- | |
8672 | * rd ----- | |
8673 | */ | |
7def8a4b | 8674 | static char *LLE(uint64 instruction, Dis_info *info) |
89a955e8 AM |
8675 | { |
8676 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 8677 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 8678 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_s2(instruction); |
89a955e8 | 8679 | |
3f2aec07 ML |
8680 | const char *rt = GPR(rt_value, info); |
8681 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 8682 | |
4066c152 | 8683 | return img_format("LLE %s, %" PRId64 "(%s)", rt, s_value, rs); |
89a955e8 AM |
8684 | } |
8685 | ||
8686 | ||
8687 | /* | |
8688 | * | |
8689 | * | |
8690 | * 3 2 1 | |
8691 | * 10987654321098765432109876543210 | |
8692 | * 001000 x1110000101 | |
8693 | * rt ----- | |
8694 | * rs ----- | |
8695 | * rd ----- | |
8696 | */ | |
7def8a4b | 8697 | static char *LLWP(uint64 instruction, Dis_info *info) |
89a955e8 AM |
8698 | { |
8699 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 8700 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 8701 | uint64 ru_value = extract_ru_7_6_5_4_3(instruction); |
89a955e8 | 8702 | |
3f2aec07 ML |
8703 | const char *rt = GPR(rt_value, info); |
8704 | const char *ru = GPR(ru_value, info); | |
8705 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 8706 | |
c5231692 | 8707 | return img_format("LLWP %s, %s, (%s)", rt, ru, rs); |
89a955e8 AM |
8708 | } |
8709 | ||
8710 | ||
8711 | /* | |
8712 | * | |
8713 | * | |
8714 | * 3 2 1 | |
8715 | * 10987654321098765432109876543210 | |
8716 | * 001000 x1110000101 | |
8717 | * rt ----- | |
8718 | * rs ----- | |
8719 | * rd ----- | |
8720 | */ | |
7def8a4b | 8721 | static char *LLWPE(uint64 instruction, Dis_info *info) |
89a955e8 AM |
8722 | { |
8723 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 8724 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 8725 | uint64 ru_value = extract_ru_7_6_5_4_3(instruction); |
89a955e8 | 8726 | |
3f2aec07 ML |
8727 | const char *rt = GPR(rt_value, info); |
8728 | const char *ru = GPR(ru_value, info); | |
8729 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 8730 | |
c5231692 | 8731 | return img_format("LLWPE %s, %s, (%s)", rt, ru, rs); |
89a955e8 AM |
8732 | } |
8733 | ||
8734 | ||
8735 | /* | |
8736 | * | |
8737 | * | |
8738 | * 3 2 1 | |
8739 | * 10987654321098765432109876543210 | |
8740 | * 001000 x1110000101 | |
8741 | * rt ----- | |
8742 | * rs ----- | |
8743 | * rd ----- | |
8744 | */ | |
7def8a4b | 8745 | static char *LSA(uint64 instruction, Dis_info *info) |
89a955e8 AM |
8746 | { |
8747 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
75199b40 | 8748 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
b4c5d21c | 8749 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 8750 | uint64 u2_value = extract_u2_10_9(instruction); |
89a955e8 | 8751 | |
3f2aec07 ML |
8752 | const char *rd = GPR(rd_value, info); |
8753 | const char *rs = GPR(rs_value, info); | |
8754 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 8755 | |
4066c152 | 8756 | return img_format("LSA %s, %s, %s, 0x%" PRIx64, rd, rs, rt, u2_value); |
89a955e8 AM |
8757 | } |
8758 | ||
8759 | ||
8760 | /* | |
8761 | * | |
8762 | * | |
8763 | * 3 2 1 | |
8764 | * 10987654321098765432109876543210 | |
8765 | * 001000 x1110000101 | |
8766 | * rt ----- | |
8767 | * rs ----- | |
8768 | * rd ----- | |
8769 | */ | |
7def8a4b | 8770 | static char *LUI(uint64 instruction, Dis_info *info) |
89a955e8 AM |
8771 | { |
8772 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
d3605cc0 | 8773 | int64 s_value = extract_s__se31_0_11_to_2_20_to_12_s12(instruction); |
89a955e8 | 8774 | |
3f2aec07 | 8775 | const char *rt = GPR(rt_value, info); |
89a955e8 | 8776 | |
4066c152 | 8777 | return img_format("LUI %s, %%hi(%" PRId64 ")", rt, s_value); |
89a955e8 AM |
8778 | } |
8779 | ||
8780 | ||
8781 | /* | |
8782 | * | |
8783 | * | |
8784 | * 3 2 1 | |
8785 | * 10987654321098765432109876543210 | |
8786 | * 001000 x1110000101 | |
8787 | * rt ----- | |
8788 | * rs ----- | |
8789 | * rd ----- | |
8790 | */ | |
7def8a4b | 8791 | static char *LW_16_(uint64 instruction, Dis_info *info) |
89a955e8 | 8792 | { |
89a955e8 AM |
8793 | uint64 rt3_value = extract_rt3_9_8_7(instruction); |
8794 | uint64 rs3_value = extract_rs3_6_5_4(instruction); | |
75199b40 | 8795 | uint64 u_value = extract_u_3_2_1_0__s2(instruction); |
89a955e8 | 8796 | |
3f2aec07 ML |
8797 | const char *rt3 = GPR(decode_gpr_gpr3(rt3_value, info), info); |
8798 | const char *rs3 = GPR(decode_gpr_gpr3(rs3_value, info), info); | |
89a955e8 | 8799 | |
4066c152 | 8800 | return img_format("LW %s, 0x%" PRIx64 "(%s)", rt3, u_value, rs3); |
89a955e8 AM |
8801 | } |
8802 | ||
8803 | ||
8804 | /* | |
8805 | * | |
8806 | * | |
8807 | * 3 2 1 | |
8808 | * 10987654321098765432109876543210 | |
8809 | * 001000 x1110000101 | |
8810 | * rt ----- | |
8811 | * rs ----- | |
8812 | * rd ----- | |
8813 | */ | |
7def8a4b | 8814 | static char *LW_4X4_(uint64 instruction, Dis_info *info) |
89a955e8 | 8815 | { |
89a955e8 | 8816 | uint64 rt4_value = extract_rt4_9_7_6_5(instruction); |
75199b40 | 8817 | uint64 rs4_value = extract_rs4_4_2_1_0(instruction); |
11b9732a | 8818 | uint64 u_value = extract_u_3_8__s2(instruction); |
89a955e8 | 8819 | |
3f2aec07 ML |
8820 | const char *rt4 = GPR(decode_gpr_gpr4(rt4_value, info), info); |
8821 | const char *rs4 = GPR(decode_gpr_gpr4(rs4_value, info), info); | |
89a955e8 | 8822 | |
4066c152 | 8823 | return img_format("LW %s, 0x%" PRIx64 "(%s)", rt4, u_value, rs4); |
89a955e8 AM |
8824 | } |
8825 | ||
8826 | ||
8827 | /* | |
8828 | * | |
8829 | * | |
8830 | * 3 2 1 | |
8831 | * 10987654321098765432109876543210 | |
8832 | * 001000 x1110000101 | |
8833 | * rt ----- | |
8834 | * rs ----- | |
8835 | * rd ----- | |
8836 | */ | |
7def8a4b | 8837 | static char *LW_GP_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
8838 | { |
8839 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
11b9732a | 8840 | uint64 u_value = extract_u_20_to_2__s2(instruction); |
89a955e8 | 8841 | |
3f2aec07 | 8842 | const char *rt = GPR(rt_value, info); |
89a955e8 | 8843 | |
4066c152 | 8844 | return img_format("LW %s, 0x%" PRIx64 "($%d)", rt, u_value, 28); |
89a955e8 AM |
8845 | } |
8846 | ||
8847 | ||
8848 | /* | |
8849 | * | |
8850 | * | |
8851 | * 3 2 1 | |
8852 | * 10987654321098765432109876543210 | |
8853 | * 001000 x1110000101 | |
8854 | * rt ----- | |
8855 | * rs ----- | |
8856 | * rd ----- | |
8857 | */ | |
7def8a4b | 8858 | static char *LW_GP16_(uint64 instruction, Dis_info *info) |
89a955e8 | 8859 | { |
89a955e8 | 8860 | uint64 rt3_value = extract_rt3_9_8_7(instruction); |
75199b40 | 8861 | uint64 u_value = extract_u_6_5_4_3_2_1_0__s2(instruction); |
89a955e8 | 8862 | |
3f2aec07 | 8863 | const char *rt3 = GPR(decode_gpr_gpr3(rt3_value, info), info); |
89a955e8 | 8864 | |
4066c152 | 8865 | return img_format("LW %s, 0x%" PRIx64 "($%d)", rt3, u_value, 28); |
89a955e8 AM |
8866 | } |
8867 | ||
8868 | ||
8869 | /* | |
8870 | * | |
8871 | * | |
8872 | * 3 2 1 | |
8873 | * 10987654321098765432109876543210 | |
8874 | * 001000 x1110000101 | |
8875 | * rt ----- | |
8876 | * rs ----- | |
8877 | * rd ----- | |
8878 | */ | |
7def8a4b | 8879 | static char *LW_S9_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
8880 | { |
8881 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 8882 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 8883 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
89a955e8 | 8884 | |
3f2aec07 ML |
8885 | const char *rt = GPR(rt_value, info); |
8886 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 8887 | |
4066c152 | 8888 | return img_format("LW %s, %" PRId64 "(%s)", rt, s_value, rs); |
89a955e8 AM |
8889 | } |
8890 | ||
8891 | ||
8892 | /* | |
8893 | * | |
8894 | * | |
8895 | * 3 2 1 | |
8896 | * 10987654321098765432109876543210 | |
8897 | * 001000 x1110000101 | |
8898 | * rt ----- | |
8899 | * rs ----- | |
8900 | * rd ----- | |
8901 | */ | |
7def8a4b | 8902 | static char *LW_SP_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
8903 | { |
8904 | uint64 rt_value = extract_rt_9_8_7_6_5(instruction); | |
11b9732a | 8905 | uint64 u_value = extract_u_4_3_2_1_0__s2(instruction); |
89a955e8 | 8906 | |
3f2aec07 | 8907 | const char *rt = GPR(rt_value, info); |
89a955e8 | 8908 | |
4066c152 | 8909 | return img_format("LW %s, 0x%" PRIx64 "($%d)", rt, u_value, 29); |
89a955e8 AM |
8910 | } |
8911 | ||
8912 | ||
8913 | /* | |
8914 | * | |
8915 | * | |
8916 | * 3 2 1 | |
8917 | * 10987654321098765432109876543210 | |
8918 | * 001000 x1110000101 | |
8919 | * rt ----- | |
8920 | * rs ----- | |
8921 | * rd ----- | |
8922 | */ | |
7def8a4b | 8923 | static char *LW_U12_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
8924 | { |
8925 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 8926 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 8927 | uint64 u_value = extract_u_11_10_9_8_7_6_5_4_3_2_1_0(instruction); |
89a955e8 | 8928 | |
3f2aec07 ML |
8929 | const char *rt = GPR(rt_value, info); |
8930 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 8931 | |
4066c152 | 8932 | return img_format("LW %s, 0x%" PRIx64 "(%s)", rt, u_value, rs); |
89a955e8 AM |
8933 | } |
8934 | ||
8935 | ||
8936 | /* | |
8937 | * | |
8938 | * | |
8939 | * 3 2 1 | |
8940 | * 10987654321098765432109876543210 | |
8941 | * 001000 x1110000101 | |
8942 | * rt ----- | |
8943 | * rs ----- | |
8944 | * rd ----- | |
8945 | */ | |
7def8a4b | 8946 | static char *LWC1_GP_(uint64 instruction, Dis_info *info) |
89a955e8 | 8947 | { |
17ce2f00 | 8948 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
11b9732a | 8949 | uint64 u_value = extract_u_17_to_2__s2(instruction); |
89a955e8 | 8950 | |
3f2aec07 | 8951 | const char *ft = FPR(ft_value, info); |
89a955e8 | 8952 | |
4066c152 | 8953 | return img_format("LWC1 %s, 0x%" PRIx64 "($%d)", ft, u_value, 28); |
89a955e8 AM |
8954 | } |
8955 | ||
8956 | ||
8957 | /* | |
8958 | * | |
8959 | * | |
8960 | * 3 2 1 | |
8961 | * 10987654321098765432109876543210 | |
8962 | * 001000 x1110000101 | |
8963 | * rt ----- | |
8964 | * rs ----- | |
8965 | * rd ----- | |
8966 | */ | |
7def8a4b | 8967 | static char *LWC1_S9_(uint64 instruction, Dis_info *info) |
89a955e8 | 8968 | { |
17ce2f00 | 8969 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
89a955e8 | 8970 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 8971 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
89a955e8 | 8972 | |
3f2aec07 ML |
8973 | const char *ft = FPR(ft_value, info); |
8974 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 8975 | |
4066c152 | 8976 | return img_format("LWC1 %s, %" PRId64 "(%s)", ft, s_value, rs); |
89a955e8 AM |
8977 | } |
8978 | ||
8979 | ||
8980 | /* | |
8981 | * | |
8982 | * | |
8983 | * 3 2 1 | |
8984 | * 10987654321098765432109876543210 | |
8985 | * 001000 x1110000101 | |
8986 | * rt ----- | |
8987 | * rs ----- | |
8988 | * rd ----- | |
8989 | */ | |
7def8a4b | 8990 | static char *LWC1_U12_(uint64 instruction, Dis_info *info) |
89a955e8 | 8991 | { |
17ce2f00 | 8992 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
89a955e8 | 8993 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 8994 | uint64 u_value = extract_u_11_10_9_8_7_6_5_4_3_2_1_0(instruction); |
89a955e8 | 8995 | |
3f2aec07 ML |
8996 | const char *ft = FPR(ft_value, info); |
8997 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 8998 | |
4066c152 | 8999 | return img_format("LWC1 %s, 0x%" PRIx64 "(%s)", ft, u_value, rs); |
89a955e8 AM |
9000 | } |
9001 | ||
9002 | ||
9003 | /* | |
9004 | * | |
9005 | * | |
9006 | * 3 2 1 | |
9007 | * 10987654321098765432109876543210 | |
9008 | * 001000 x1110000101 | |
9009 | * rt ----- | |
9010 | * rs ----- | |
9011 | * rd ----- | |
9012 | */ | |
7def8a4b | 9013 | static char *LWC1X(uint64 instruction, Dis_info *info) |
89a955e8 AM |
9014 | { |
9015 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 9016 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 9017 | uint64 ft_value = extract_ft_15_14_13_12_11(instruction); |
89a955e8 | 9018 | |
3f2aec07 ML |
9019 | const char *ft = FPR(ft_value, info); |
9020 | const char *rs = GPR(rs_value, info); | |
9021 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 9022 | |
c5231692 | 9023 | return img_format("LWC1X %s, %s(%s)", ft, rs, rt); |
89a955e8 AM |
9024 | } |
9025 | ||
9026 | ||
9027 | /* | |
9028 | * | |
9029 | * | |
9030 | * 3 2 1 | |
9031 | * 10987654321098765432109876543210 | |
9032 | * 001000 x1110000101 | |
9033 | * rt ----- | |
9034 | * rs ----- | |
9035 | * rd ----- | |
9036 | */ | |
7def8a4b | 9037 | static char *LWC1XS(uint64 instruction, Dis_info *info) |
89a955e8 AM |
9038 | { |
9039 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 9040 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 9041 | uint64 ft_value = extract_ft_15_14_13_12_11(instruction); |
89a955e8 | 9042 | |
3f2aec07 ML |
9043 | const char *ft = FPR(ft_value, info); |
9044 | const char *rs = GPR(rs_value, info); | |
9045 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 9046 | |
c5231692 | 9047 | return img_format("LWC1XS %s, %s(%s)", ft, rs, rt); |
89a955e8 AM |
9048 | } |
9049 | ||
9050 | ||
9051 | /* | |
9052 | * | |
9053 | * | |
9054 | * 3 2 1 | |
9055 | * 10987654321098765432109876543210 | |
9056 | * 001000 x1110000101 | |
9057 | * rt ----- | |
9058 | * rs ----- | |
9059 | * rd ----- | |
9060 | */ | |
7def8a4b | 9061 | static char *LWC2(uint64 instruction, Dis_info *info) |
89a955e8 | 9062 | { |
89a955e8 AM |
9063 | uint64 ct_value = extract_ct_25_24_23_22_21(instruction); |
9064 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
75199b40 | 9065 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
89a955e8 | 9066 | |
3f2aec07 | 9067 | const char *rs = GPR(rs_value, info); |
89a955e8 | 9068 | |
043dc73c ML |
9069 | return img_format("LWC2 CP%" PRIu64 ", %" PRId64 "(%s)", |
9070 | ct_value, s_value, rs); | |
89a955e8 AM |
9071 | } |
9072 | ||
9073 | ||
9074 | /* | |
9075 | * | |
9076 | * | |
9077 | * 3 2 1 | |
9078 | * 10987654321098765432109876543210 | |
9079 | * 001000 x1110000101 | |
9080 | * rt ----- | |
9081 | * rs ----- | |
9082 | * rd ----- | |
9083 | */ | |
7def8a4b | 9084 | static char *LWE(uint64 instruction, Dis_info *info) |
89a955e8 AM |
9085 | { |
9086 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 9087 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 9088 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
89a955e8 | 9089 | |
3f2aec07 ML |
9090 | const char *rt = GPR(rt_value, info); |
9091 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 9092 | |
4066c152 | 9093 | return img_format("LWE %s, %" PRId64 "(%s)", rt, s_value, rs); |
89a955e8 AM |
9094 | } |
9095 | ||
9096 | ||
9097 | /* | |
9098 | * | |
9099 | * | |
9100 | * 3 2 1 | |
9101 | * 10987654321098765432109876543210 | |
9102 | * 001000 x1110000101 | |
9103 | * rt ----- | |
9104 | * rs ----- | |
9105 | * rd ----- | |
9106 | */ | |
7def8a4b | 9107 | static char *LWM(uint64 instruction, Dis_info *info) |
89a955e8 AM |
9108 | { |
9109 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 9110 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 AM |
9111 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
9112 | uint64 count3_value = extract_count3_14_13_12(instruction); | |
89a955e8 | 9113 | |
3f2aec07 ML |
9114 | const char *rt = GPR(rt_value, info); |
9115 | const char *rs = GPR(rs_value, info); | |
4066c152 | 9116 | uint64 count3 = encode_count3_from_count(count3_value); |
89a955e8 | 9117 | |
4066c152 ML |
9118 | return img_format("LWM %s, %" PRId64 "(%s), 0x%" PRIx64, |
9119 | rt, s_value, rs, count3); | |
89a955e8 AM |
9120 | } |
9121 | ||
9122 | ||
9123 | /* | |
9124 | * | |
9125 | * | |
9126 | * 3 2 1 | |
9127 | * 10987654321098765432109876543210 | |
9128 | * 001000 x1110000101 | |
9129 | * rt ----- | |
9130 | * rs ----- | |
9131 | * rd ----- | |
9132 | */ | |
7def8a4b | 9133 | static char *LWPC_48_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
9134 | { |
9135 | uint64 rt_value = extract_rt_41_40_39_38_37(instruction); | |
d3605cc0 | 9136 | int64 s_value = extract_s__se31_15_to_0_31_to_16(instruction); |
89a955e8 | 9137 | |
3f2aec07 | 9138 | const char *rt = GPR(rt_value, info); |
22e7b52a | 9139 | g_autofree char *s = ADDRESS(s_value, 6, info); |
89a955e8 | 9140 | |
c5231692 | 9141 | return img_format("LWPC %s, %s", rt, s); |
89a955e8 AM |
9142 | } |
9143 | ||
9144 | ||
9145 | /* | |
9146 | * | |
9147 | * | |
9148 | * 3 2 1 | |
9149 | * 10987654321098765432109876543210 | |
9150 | * 001000 x1110000101 | |
9151 | * rt ----- | |
9152 | * rs ----- | |
9153 | * rd ----- | |
9154 | */ | |
7def8a4b | 9155 | static char *LWU_GP_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
9156 | { |
9157 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
11b9732a | 9158 | uint64 u_value = extract_u_17_to_2__s2(instruction); |
89a955e8 | 9159 | |
3f2aec07 | 9160 | const char *rt = GPR(rt_value, info); |
89a955e8 | 9161 | |
4066c152 | 9162 | return img_format("LWU %s, 0x%" PRIx64 "($%d)", rt, u_value, 28); |
89a955e8 AM |
9163 | } |
9164 | ||
9165 | ||
9166 | /* | |
9167 | * | |
9168 | * | |
9169 | * 3 2 1 | |
9170 | * 10987654321098765432109876543210 | |
9171 | * 001000 x1110000101 | |
9172 | * rt ----- | |
9173 | * rs ----- | |
9174 | * rd ----- | |
9175 | */ | |
7def8a4b | 9176 | static char *LWU_S9_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
9177 | { |
9178 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 9179 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 9180 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
89a955e8 | 9181 | |
3f2aec07 ML |
9182 | const char *rt = GPR(rt_value, info); |
9183 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 9184 | |
4066c152 | 9185 | return img_format("LWU %s, %" PRId64 "(%s)", rt, s_value, rs); |
89a955e8 AM |
9186 | } |
9187 | ||
9188 | ||
9189 | /* | |
9190 | * | |
9191 | * | |
9192 | * 3 2 1 | |
9193 | * 10987654321098765432109876543210 | |
9194 | * 001000 x1110000101 | |
9195 | * rt ----- | |
9196 | * rs ----- | |
9197 | * rd ----- | |
9198 | */ | |
7def8a4b | 9199 | static char *LWU_U12_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
9200 | { |
9201 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 9202 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 9203 | uint64 u_value = extract_u_11_10_9_8_7_6_5_4_3_2_1_0(instruction); |
89a955e8 | 9204 | |
3f2aec07 ML |
9205 | const char *rt = GPR(rt_value, info); |
9206 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 9207 | |
4066c152 | 9208 | return img_format("LWU %s, 0x%" PRIx64 "(%s)", rt, u_value, rs); |
89a955e8 AM |
9209 | } |
9210 | ||
9211 | ||
9212 | /* | |
9213 | * | |
9214 | * | |
9215 | * 3 2 1 | |
9216 | * 10987654321098765432109876543210 | |
9217 | * 001000 x1110000101 | |
9218 | * rt ----- | |
9219 | * rs ----- | |
9220 | * rd ----- | |
9221 | */ | |
7def8a4b | 9222 | static char *LWUX(uint64 instruction, Dis_info *info) |
89a955e8 AM |
9223 | { |
9224 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 9225 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 9226 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 9227 | |
3f2aec07 ML |
9228 | const char *rd = GPR(rd_value, info); |
9229 | const char *rs = GPR(rs_value, info); | |
9230 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 9231 | |
c5231692 | 9232 | return img_format("LWUX %s, %s(%s)", rd, rs, rt); |
89a955e8 AM |
9233 | } |
9234 | ||
9235 | ||
9236 | /* | |
9237 | * | |
9238 | * | |
9239 | * 3 2 1 | |
9240 | * 10987654321098765432109876543210 | |
9241 | * 001000 x1110000101 | |
9242 | * rt ----- | |
9243 | * rs ----- | |
9244 | * rd ----- | |
9245 | */ | |
7def8a4b | 9246 | static char *LWUXS(uint64 instruction, Dis_info *info) |
89a955e8 AM |
9247 | { |
9248 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 9249 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 9250 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 9251 | |
3f2aec07 ML |
9252 | const char *rd = GPR(rd_value, info); |
9253 | const char *rs = GPR(rs_value, info); | |
9254 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 9255 | |
c5231692 | 9256 | return img_format("LWUXS %s, %s(%s)", rd, rs, rt); |
89a955e8 AM |
9257 | } |
9258 | ||
9259 | ||
9260 | /* | |
9261 | * | |
9262 | * | |
9263 | * 3 2 1 | |
9264 | * 10987654321098765432109876543210 | |
9265 | * 001000 x1110000101 | |
9266 | * rt ----- | |
9267 | * rs ----- | |
9268 | * rd ----- | |
9269 | */ | |
7def8a4b | 9270 | static char *LWX(uint64 instruction, Dis_info *info) |
89a955e8 AM |
9271 | { |
9272 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 9273 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 9274 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 9275 | |
3f2aec07 ML |
9276 | const char *rd = GPR(rd_value, info); |
9277 | const char *rs = GPR(rs_value, info); | |
9278 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 9279 | |
c5231692 | 9280 | return img_format("LWX %s, %s(%s)", rd, rs, rt); |
89a955e8 AM |
9281 | } |
9282 | ||
9283 | ||
9284 | /* | |
9285 | * | |
9286 | * | |
9287 | * 3 2 1 | |
9288 | * 10987654321098765432109876543210 | |
9289 | * 001000 x1110000101 | |
9290 | * rt ----- | |
9291 | * rs ----- | |
9292 | * rd ----- | |
9293 | */ | |
7def8a4b | 9294 | static char *LWXS_16_(uint64 instruction, Dis_info *info) |
89a955e8 | 9295 | { |
89a955e8 AM |
9296 | uint64 rt3_value = extract_rt3_9_8_7(instruction); |
9297 | uint64 rs3_value = extract_rs3_6_5_4(instruction); | |
86b5f803 | 9298 | uint64 rd3_value = extract_rd3_3_2_1(instruction); |
89a955e8 | 9299 | |
3f2aec07 ML |
9300 | const char *rd3 = GPR(decode_gpr_gpr3(rd3_value, info), info); |
9301 | const char *rs3 = GPR(decode_gpr_gpr3(rs3_value, info), info); | |
9302 | uint64 rt3 = decode_gpr_gpr3(rt3_value, info); | |
89a955e8 | 9303 | |
4066c152 | 9304 | return img_format("LWXS %s, %s(0x%" PRIx64 ")", rd3, rs3, rt3); |
89a955e8 AM |
9305 | } |
9306 | ||
9307 | ||
9308 | /* | |
9309 | * | |
9310 | * | |
9311 | * 3 2 1 | |
9312 | * 10987654321098765432109876543210 | |
9313 | * 001000 x1110000101 | |
9314 | * rt ----- | |
9315 | * rs ----- | |
9316 | * rd ----- | |
9317 | */ | |
7def8a4b | 9318 | static char *LWXS_32_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
9319 | { |
9320 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 9321 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 9322 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 9323 | |
3f2aec07 ML |
9324 | const char *rd = GPR(rd_value, info); |
9325 | const char *rs = GPR(rs_value, info); | |
9326 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 9327 | |
c5231692 | 9328 | return img_format("LWXS %s, %s(%s)", rd, rs, rt); |
89a955e8 AM |
9329 | } |
9330 | ||
9331 | ||
9332 | /* | |
fc95c241 AM |
9333 | * [DSP] MADD ac, rs, rt - Multiply two words and add to the specified |
9334 | * accumulator | |
89a955e8 AM |
9335 | * |
9336 | * 3 2 1 | |
9337 | * 10987654321098765432109876543210 | |
9338 | * 001000 x1110000101 | |
9339 | * rt ----- | |
9340 | * rs ----- | |
9341 | * rd ----- | |
9342 | */ | |
7def8a4b | 9343 | static char *MADD_DSP_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
9344 | { |
9345 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 9346 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
0f74e61d | 9347 | uint64 ac_value = extract_ac_15_14(instruction); |
89a955e8 | 9348 | |
3f2aec07 ML |
9349 | const char *ac = AC(ac_value, info); |
9350 | const char *rs = GPR(rs_value, info); | |
9351 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 9352 | |
c5231692 | 9353 | return img_format("MADD %s, %s, %s", ac, rs, rt); |
89a955e8 AM |
9354 | } |
9355 | ||
9356 | ||
9357 | /* | |
9358 | * | |
9359 | * | |
9360 | * 3 2 1 | |
9361 | * 10987654321098765432109876543210 | |
9362 | * 001000 x1110000101 | |
9363 | * rt ----- | |
9364 | * rs ----- | |
9365 | * rd ----- | |
9366 | */ | |
7def8a4b | 9367 | static char *MADDF_D(uint64 instruction, Dis_info *info) |
89a955e8 | 9368 | { |
17ce2f00 | 9369 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 9370 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 9371 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 | 9372 | |
3f2aec07 ML |
9373 | const char *fd = FPR(fd_value, info); |
9374 | const char *fs = FPR(fs_value, info); | |
9375 | const char *ft = FPR(ft_value, info); | |
89a955e8 | 9376 | |
c5231692 | 9377 | return img_format("MADDF.D %s, %s, %s", fd, fs, ft); |
89a955e8 AM |
9378 | } |
9379 | ||
9380 | ||
9381 | /* | |
9382 | * | |
9383 | * | |
9384 | * 3 2 1 | |
9385 | * 10987654321098765432109876543210 | |
9386 | * 001000 x1110000101 | |
9387 | * rt ----- | |
9388 | * rs ----- | |
9389 | * rd ----- | |
9390 | */ | |
7def8a4b | 9391 | static char *MADDF_S(uint64 instruction, Dis_info *info) |
89a955e8 | 9392 | { |
17ce2f00 | 9393 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 9394 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 9395 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 | 9396 | |
3f2aec07 ML |
9397 | const char *fd = FPR(fd_value, info); |
9398 | const char *fs = FPR(fs_value, info); | |
9399 | const char *ft = FPR(ft_value, info); | |
89a955e8 | 9400 | |
c5231692 | 9401 | return img_format("MADDF.S %s, %s, %s", fd, fs, ft); |
89a955e8 AM |
9402 | } |
9403 | ||
9404 | ||
9405 | /* | |
fc95c241 AM |
9406 | * [DSP] MADDU ac, rs, rt - Multiply two unsigned words and add to the |
9407 | * specified accumulator | |
89a955e8 AM |
9408 | * |
9409 | * 3 2 1 | |
9410 | * 10987654321098765432109876543210 | |
9411 | * 001000 x1110000101 | |
9412 | * rt ----- | |
9413 | * rs ----- | |
9414 | * rd ----- | |
9415 | */ | |
7def8a4b | 9416 | static char *MADDU_DSP_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
9417 | { |
9418 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 9419 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
0f74e61d | 9420 | uint64 ac_value = extract_ac_15_14(instruction); |
89a955e8 | 9421 | |
3f2aec07 ML |
9422 | const char *ac = AC(ac_value, info); |
9423 | const char *rs = GPR(rs_value, info); | |
9424 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 9425 | |
c5231692 | 9426 | return img_format("MADDU %s, %s, %s", ac, rs, rt); |
89a955e8 AM |
9427 | } |
9428 | ||
9429 | ||
9430 | /* | |
fc95c241 AM |
9431 | * [DSP] MAQ_S.W.PHL ac, rs, rt - Multiply the left-most single vector |
9432 | * fractional halfword elements with accumulation | |
89a955e8 AM |
9433 | * |
9434 | * 3 2 1 | |
9435 | * 10987654321098765432109876543210 | |
9436 | * 001000 x1110000101 | |
9437 | * rt ----- | |
9438 | * rs ----- | |
9439 | * rd ----- | |
9440 | */ | |
7def8a4b | 9441 | static char *MAQ_S_W_PHL(uint64 instruction, Dis_info *info) |
89a955e8 AM |
9442 | { |
9443 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 9444 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
0f74e61d | 9445 | uint64 ac_value = extract_ac_15_14(instruction); |
89a955e8 | 9446 | |
3f2aec07 ML |
9447 | const char *ac = AC(ac_value, info); |
9448 | const char *rs = GPR(rs_value, info); | |
9449 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 9450 | |
c5231692 | 9451 | return img_format("MAQ_S.W.PHL %s, %s, %s", ac, rs, rt); |
89a955e8 AM |
9452 | } |
9453 | ||
9454 | ||
9455 | /* | |
fc95c241 AM |
9456 | * [DSP] MAQ_S.W.PHR ac, rs, rt - Multiply the right-most single vector |
9457 | * fractional halfword elements with accumulation | |
89a955e8 AM |
9458 | * |
9459 | * 3 2 1 | |
9460 | * 10987654321098765432109876543210 | |
9461 | * 001000 x1110000101 | |
9462 | * rt ----- | |
9463 | * rs ----- | |
9464 | * rd ----- | |
9465 | */ | |
7def8a4b | 9466 | static char *MAQ_S_W_PHR(uint64 instruction, Dis_info *info) |
89a955e8 AM |
9467 | { |
9468 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 9469 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
0f74e61d | 9470 | uint64 ac_value = extract_ac_15_14(instruction); |
89a955e8 | 9471 | |
3f2aec07 ML |
9472 | const char *ac = AC(ac_value, info); |
9473 | const char *rs = GPR(rs_value, info); | |
9474 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 9475 | |
c5231692 | 9476 | return img_format("MAQ_S.W.PHR %s, %s, %s", ac, rs, rt); |
89a955e8 AM |
9477 | } |
9478 | ||
9479 | ||
9480 | /* | |
fc95c241 AM |
9481 | * [DSP] MAQ_SA.W.PHL ac, rs, rt - Multiply the left-most single vector |
9482 | * fractional halfword elements with saturating accumulation | |
89a955e8 AM |
9483 | * |
9484 | * 3 2 1 | |
9485 | * 10987654321098765432109876543210 | |
9486 | * 001000 x1110000101 | |
9487 | * rt ----- | |
9488 | * rs ----- | |
9489 | * rd ----- | |
9490 | */ | |
7def8a4b | 9491 | static char *MAQ_SA_W_PHL(uint64 instruction, Dis_info *info) |
89a955e8 AM |
9492 | { |
9493 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 9494 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
0f74e61d | 9495 | uint64 ac_value = extract_ac_15_14(instruction); |
89a955e8 | 9496 | |
3f2aec07 ML |
9497 | const char *ac = AC(ac_value, info); |
9498 | const char *rs = GPR(rs_value, info); | |
9499 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 9500 | |
c5231692 | 9501 | return img_format("MAQ_SA.W.PHL %s, %s, %s", ac, rs, rt); |
89a955e8 AM |
9502 | } |
9503 | ||
9504 | ||
9505 | /* | |
fc95c241 AM |
9506 | * [DSP] MAQ_SA.W.PHR ac, rs, rt - Multiply the right-most single vector |
9507 | * fractional halfword elements with saturating accumulation | |
89a955e8 AM |
9508 | * |
9509 | * 3 2 1 | |
9510 | * 10987654321098765432109876543210 | |
9511 | * 001000 x1110000101 | |
9512 | * rt ----- | |
9513 | * rs ----- | |
9514 | * rd ----- | |
9515 | */ | |
7def8a4b | 9516 | static char *MAQ_SA_W_PHR(uint64 instruction, Dis_info *info) |
89a955e8 AM |
9517 | { |
9518 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 9519 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
0f74e61d | 9520 | uint64 ac_value = extract_ac_15_14(instruction); |
89a955e8 | 9521 | |
3f2aec07 ML |
9522 | const char *ac = AC(ac_value, info); |
9523 | const char *rs = GPR(rs_value, info); | |
9524 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 9525 | |
c5231692 | 9526 | return img_format("MAQ_SA.W.PHR %s, %s, %s", ac, rs, rt); |
89a955e8 AM |
9527 | } |
9528 | ||
9529 | ||
9530 | /* | |
9531 | * | |
9532 | * | |
9533 | * 3 2 1 | |
9534 | * 10987654321098765432109876543210 | |
9535 | * 001000 x1110000101 | |
9536 | * rt ----- | |
9537 | * rs ----- | |
9538 | * rd ----- | |
9539 | */ | |
7def8a4b | 9540 | static char *MAX_D(uint64 instruction, Dis_info *info) |
89a955e8 | 9541 | { |
17ce2f00 | 9542 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 9543 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 9544 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 | 9545 | |
3f2aec07 ML |
9546 | const char *fd = FPR(fd_value, info); |
9547 | const char *fs = FPR(fs_value, info); | |
9548 | const char *ft = FPR(ft_value, info); | |
89a955e8 | 9549 | |
c5231692 | 9550 | return img_format("MAX.D %s, %s, %s", fd, fs, ft); |
89a955e8 AM |
9551 | } |
9552 | ||
9553 | ||
9554 | /* | |
9555 | * | |
9556 | * | |
9557 | * 3 2 1 | |
9558 | * 10987654321098765432109876543210 | |
9559 | * 001000 x1110000101 | |
9560 | * rt ----- | |
9561 | * rs ----- | |
9562 | * rd ----- | |
9563 | */ | |
7def8a4b | 9564 | static char *MAX_S(uint64 instruction, Dis_info *info) |
89a955e8 | 9565 | { |
17ce2f00 | 9566 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 9567 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 9568 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 | 9569 | |
3f2aec07 ML |
9570 | const char *fd = FPR(fd_value, info); |
9571 | const char *fs = FPR(fs_value, info); | |
9572 | const char *ft = FPR(ft_value, info); | |
89a955e8 | 9573 | |
c5231692 | 9574 | return img_format("MAX.S %s, %s, %s", fd, fs, ft); |
89a955e8 AM |
9575 | } |
9576 | ||
9577 | ||
9578 | /* | |
9579 | * | |
9580 | * | |
9581 | * 3 2 1 | |
9582 | * 10987654321098765432109876543210 | |
9583 | * 001000 x1110000101 | |
9584 | * rt ----- | |
9585 | * rs ----- | |
9586 | * rd ----- | |
9587 | */ | |
7def8a4b | 9588 | static char *MAXA_D(uint64 instruction, Dis_info *info) |
89a955e8 | 9589 | { |
17ce2f00 | 9590 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 9591 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 9592 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 | 9593 | |
3f2aec07 ML |
9594 | const char *fd = FPR(fd_value, info); |
9595 | const char *fs = FPR(fs_value, info); | |
9596 | const char *ft = FPR(ft_value, info); | |
89a955e8 | 9597 | |
c5231692 | 9598 | return img_format("MAXA.D %s, %s, %s", fd, fs, ft); |
89a955e8 AM |
9599 | } |
9600 | ||
9601 | ||
9602 | /* | |
9603 | * | |
9604 | * | |
9605 | * 3 2 1 | |
9606 | * 10987654321098765432109876543210 | |
9607 | * 001000 x1110000101 | |
9608 | * rt ----- | |
9609 | * rs ----- | |
9610 | * rd ----- | |
9611 | */ | |
7def8a4b | 9612 | static char *MAXA_S(uint64 instruction, Dis_info *info) |
89a955e8 | 9613 | { |
17ce2f00 | 9614 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 9615 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 9616 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 | 9617 | |
3f2aec07 ML |
9618 | const char *fd = FPR(fd_value, info); |
9619 | const char *fs = FPR(fs_value, info); | |
9620 | const char *ft = FPR(ft_value, info); | |
89a955e8 | 9621 | |
c5231692 | 9622 | return img_format("MAXA.S %s, %s, %s", fd, fs, ft); |
89a955e8 AM |
9623 | } |
9624 | ||
9625 | ||
9626 | /* | |
9627 | * | |
9628 | * | |
9629 | * 3 2 1 | |
9630 | * 10987654321098765432109876543210 | |
9631 | * 001000 x1110000101 | |
9632 | * rt ----- | |
9633 | * rs ----- | |
9634 | * rd ----- | |
9635 | */ | |
7def8a4b | 9636 | static char *MFC0(uint64 instruction, Dis_info *info) |
89a955e8 AM |
9637 | { |
9638 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
9639 | uint64 c0s_value = extract_c0s_20_19_18_17_16(instruction); | |
9640 | uint64 sel_value = extract_sel_15_14_13_12_11(instruction); | |
9641 | ||
3f2aec07 | 9642 | const char *rt = GPR(rt_value, info); |
89a955e8 | 9643 | |
043dc73c ML |
9644 | return img_format("MFC0 %s, CP%" PRIu64 ", 0x%" PRIx64, |
9645 | rt, c0s_value, sel_value); | |
89a955e8 AM |
9646 | } |
9647 | ||
9648 | ||
9649 | /* | |
9650 | * | |
9651 | * | |
9652 | * 3 2 1 | |
9653 | * 10987654321098765432109876543210 | |
9654 | * 001000 x1110000101 | |
9655 | * rt ----- | |
9656 | * rs ----- | |
9657 | * rd ----- | |
9658 | */ | |
7def8a4b | 9659 | static char *MFC1(uint64 instruction, Dis_info *info) |
89a955e8 AM |
9660 | { |
9661 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
52a96d22 | 9662 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 | 9663 | |
3f2aec07 ML |
9664 | const char *rt = GPR(rt_value, info); |
9665 | const char *fs = FPR(fs_value, info); | |
89a955e8 | 9666 | |
c5231692 | 9667 | return img_format("MFC1 %s, %s", rt, fs); |
89a955e8 AM |
9668 | } |
9669 | ||
9670 | ||
9671 | /* | |
9672 | * | |
9673 | * | |
9674 | * 3 2 1 | |
9675 | * 10987654321098765432109876543210 | |
9676 | * 001000 x1110000101 | |
9677 | * rt ----- | |
9678 | * rs ----- | |
9679 | * rd ----- | |
9680 | */ | |
7def8a4b | 9681 | static char *MFC2(uint64 instruction, Dis_info *info) |
89a955e8 | 9682 | { |
89a955e8 | 9683 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); |
86b5f803 | 9684 | uint64 cs_value = extract_cs_20_19_18_17_16(instruction); |
89a955e8 | 9685 | |
3f2aec07 | 9686 | const char *rt = GPR(rt_value, info); |
89a955e8 | 9687 | |
043dc73c | 9688 | return img_format("MFC2 %s, CP%" PRIu64, rt, cs_value); |
89a955e8 AM |
9689 | } |
9690 | ||
9691 | ||
9692 | /* | |
9693 | * | |
9694 | * | |
9695 | * 3 2 1 | |
9696 | * 10987654321098765432109876543210 | |
9697 | * 001000 x1110000101 | |
9698 | * rt ----- | |
9699 | * rs ----- | |
9700 | * rd ----- | |
9701 | */ | |
7def8a4b | 9702 | static char *MFGC0(uint64 instruction, Dis_info *info) |
89a955e8 AM |
9703 | { |
9704 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
9705 | uint64 c0s_value = extract_c0s_20_19_18_17_16(instruction); | |
9706 | uint64 sel_value = extract_sel_15_14_13_12_11(instruction); | |
9707 | ||
3f2aec07 | 9708 | const char *rt = GPR(rt_value, info); |
89a955e8 | 9709 | |
043dc73c ML |
9710 | return img_format("MFGC0 %s, CP%" PRIu64 ", 0x%" PRIx64, |
9711 | rt, c0s_value, sel_value); | |
89a955e8 AM |
9712 | } |
9713 | ||
9714 | ||
9715 | /* | |
9716 | * | |
9717 | * | |
9718 | * 3 2 1 | |
9719 | * 10987654321098765432109876543210 | |
9720 | * 001000 x1110000101 | |
9721 | * rt ----- | |
9722 | * rs ----- | |
9723 | * rd ----- | |
9724 | */ | |
7def8a4b | 9725 | static char *MFHC0(uint64 instruction, Dis_info *info) |
89a955e8 AM |
9726 | { |
9727 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
9728 | uint64 c0s_value = extract_c0s_20_19_18_17_16(instruction); | |
9729 | uint64 sel_value = extract_sel_15_14_13_12_11(instruction); | |
9730 | ||
3f2aec07 | 9731 | const char *rt = GPR(rt_value, info); |
89a955e8 | 9732 | |
043dc73c ML |
9733 | return img_format("MFHC0 %s, CP%" PRIu64 ", 0x%" PRIx64, |
9734 | rt, c0s_value, sel_value); | |
89a955e8 AM |
9735 | } |
9736 | ||
9737 | ||
9738 | /* | |
9739 | * | |
9740 | * | |
9741 | * 3 2 1 | |
9742 | * 10987654321098765432109876543210 | |
9743 | * 001000 x1110000101 | |
9744 | * rt ----- | |
9745 | * rs ----- | |
9746 | * rd ----- | |
9747 | */ | |
7def8a4b | 9748 | static char *MFHC1(uint64 instruction, Dis_info *info) |
89a955e8 AM |
9749 | { |
9750 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
52a96d22 | 9751 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 | 9752 | |
3f2aec07 ML |
9753 | const char *rt = GPR(rt_value, info); |
9754 | const char *fs = FPR(fs_value, info); | |
89a955e8 | 9755 | |
c5231692 | 9756 | return img_format("MFHC1 %s, %s", rt, fs); |
89a955e8 AM |
9757 | } |
9758 | ||
9759 | ||
9760 | /* | |
9761 | * | |
9762 | * | |
9763 | * 3 2 1 | |
9764 | * 10987654321098765432109876543210 | |
9765 | * 001000 x1110000101 | |
9766 | * rt ----- | |
9767 | * rs ----- | |
9768 | * rd ----- | |
9769 | */ | |
7def8a4b | 9770 | static char *MFHC2(uint64 instruction, Dis_info *info) |
89a955e8 | 9771 | { |
89a955e8 | 9772 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); |
86b5f803 | 9773 | uint64 cs_value = extract_cs_20_19_18_17_16(instruction); |
89a955e8 | 9774 | |
3f2aec07 | 9775 | const char *rt = GPR(rt_value, info); |
89a955e8 | 9776 | |
043dc73c | 9777 | return img_format("MFHC2 %s, CP%" PRIu64, rt, cs_value); |
89a955e8 AM |
9778 | } |
9779 | ||
9780 | ||
9781 | /* | |
9782 | * | |
9783 | * | |
9784 | * 3 2 1 | |
9785 | * 10987654321098765432109876543210 | |
9786 | * 001000 x1110000101 | |
9787 | * rt ----- | |
9788 | * rs ----- | |
9789 | * rd ----- | |
9790 | */ | |
7def8a4b | 9791 | static char *MFHGC0(uint64 instruction, Dis_info *info) |
89a955e8 AM |
9792 | { |
9793 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
9794 | uint64 c0s_value = extract_c0s_20_19_18_17_16(instruction); | |
9795 | uint64 sel_value = extract_sel_15_14_13_12_11(instruction); | |
9796 | ||
3f2aec07 | 9797 | const char *rt = GPR(rt_value, info); |
89a955e8 | 9798 | |
043dc73c ML |
9799 | return img_format("MFHGC0 %s, CP%" PRIu64 ", 0x%" PRIx64, |
9800 | rt, c0s_value, sel_value); | |
89a955e8 AM |
9801 | } |
9802 | ||
9803 | ||
9804 | /* | |
5c65eed6 | 9805 | * [DSP] MFHI rs, ac - Move from HI register |
89a955e8 AM |
9806 | * |
9807 | * 3 2 1 | |
9808 | * 10987654321098765432109876543210 | |
5c65eed6 | 9809 | * 001000 xxxxx 00000001111111 |
89a955e8 | 9810 | * rt ----- |
5c65eed6 | 9811 | * ac -- |
89a955e8 | 9812 | */ |
7def8a4b | 9813 | static char *MFHI_DSP_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
9814 | { |
9815 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
0f74e61d | 9816 | uint64 ac_value = extract_ac_15_14(instruction); |
89a955e8 | 9817 | |
3f2aec07 ML |
9818 | const char *rt = GPR(rt_value, info); |
9819 | const char *ac = AC(ac_value, info); | |
89a955e8 | 9820 | |
c5231692 | 9821 | return img_format("MFHI %s, %s", rt, ac); |
89a955e8 AM |
9822 | } |
9823 | ||
9824 | ||
9825 | /* | |
9826 | * | |
9827 | * | |
9828 | * 3 2 1 | |
9829 | * 10987654321098765432109876543210 | |
9830 | * 001000 x1110000101 | |
9831 | * rt ----- | |
9832 | * rs ----- | |
9833 | * rd ----- | |
9834 | */ | |
7def8a4b | 9835 | static char *MFHTR(uint64 instruction, Dis_info *info) |
89a955e8 AM |
9836 | { |
9837 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
9838 | uint64 c0s_value = extract_c0s_20_19_18_17_16(instruction); | |
9839 | uint64 sel_value = extract_sel_15_14_13_12_11(instruction); | |
9840 | uint64 u_value = extract_u_10(instruction); | |
9841 | ||
3f2aec07 | 9842 | const char *rt = GPR(rt_value, info); |
89a955e8 | 9843 | |
4066c152 ML |
9844 | return img_format("MFHTR %s, 0x%" PRIx64 ", 0x%" PRIx64 ", 0x%" PRIx64, |
9845 | rt, c0s_value, u_value, sel_value); | |
89a955e8 AM |
9846 | } |
9847 | ||
9848 | ||
9849 | /* | |
5c65eed6 | 9850 | * [DSP] MFLO rs, ac - Move from HI register |
89a955e8 AM |
9851 | * |
9852 | * 3 2 1 | |
9853 | * 10987654321098765432109876543210 | |
5c65eed6 | 9854 | * 001000 xxxxx 01000001111111 |
89a955e8 | 9855 | * rt ----- |
5c65eed6 | 9856 | * ac -- |
89a955e8 | 9857 | */ |
7def8a4b | 9858 | static char *MFLO_DSP_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
9859 | { |
9860 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
0f74e61d | 9861 | uint64 ac_value = extract_ac_15_14(instruction); |
89a955e8 | 9862 | |
3f2aec07 ML |
9863 | const char *rt = GPR(rt_value, info); |
9864 | const char *ac = AC(ac_value, info); | |
89a955e8 | 9865 | |
c5231692 | 9866 | return img_format("MFLO %s, %s", rt, ac); |
89a955e8 AM |
9867 | } |
9868 | ||
9869 | ||
9870 | /* | |
9871 | * | |
9872 | * | |
9873 | * 3 2 1 | |
9874 | * 10987654321098765432109876543210 | |
9875 | * 001000 x1110000101 | |
9876 | * rt ----- | |
9877 | * rs ----- | |
9878 | * rd ----- | |
9879 | */ | |
7def8a4b | 9880 | static char *MFTR(uint64 instruction, Dis_info *info) |
89a955e8 AM |
9881 | { |
9882 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
9883 | uint64 c0s_value = extract_c0s_20_19_18_17_16(instruction); | |
9884 | uint64 sel_value = extract_sel_15_14_13_12_11(instruction); | |
9885 | uint64 u_value = extract_u_10(instruction); | |
9886 | ||
3f2aec07 | 9887 | const char *rt = GPR(rt_value, info); |
89a955e8 | 9888 | |
4066c152 ML |
9889 | return img_format("MFTR %s, 0x%" PRIx64 ", 0x%" PRIx64 ", 0x%" PRIx64, |
9890 | rt, c0s_value, u_value, sel_value); | |
89a955e8 AM |
9891 | } |
9892 | ||
9893 | ||
9894 | /* | |
9895 | * | |
9896 | * | |
9897 | * 3 2 1 | |
9898 | * 10987654321098765432109876543210 | |
9899 | * 001000 x1110000101 | |
9900 | * rt ----- | |
9901 | * rs ----- | |
9902 | * rd ----- | |
9903 | */ | |
7def8a4b | 9904 | static char *MIN_D(uint64 instruction, Dis_info *info) |
89a955e8 | 9905 | { |
17ce2f00 | 9906 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 9907 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 9908 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 | 9909 | |
3f2aec07 ML |
9910 | const char *fd = FPR(fd_value, info); |
9911 | const char *fs = FPR(fs_value, info); | |
9912 | const char *ft = FPR(ft_value, info); | |
89a955e8 | 9913 | |
c5231692 | 9914 | return img_format("MIN.D %s, %s, %s", fd, fs, ft); |
89a955e8 AM |
9915 | } |
9916 | ||
9917 | ||
9918 | /* | |
9919 | * | |
9920 | * | |
9921 | * 3 2 1 | |
9922 | * 10987654321098765432109876543210 | |
9923 | * 001000 x1110000101 | |
9924 | * rt ----- | |
9925 | * rs ----- | |
9926 | * rd ----- | |
9927 | */ | |
7def8a4b | 9928 | static char *MIN_S(uint64 instruction, Dis_info *info) |
89a955e8 | 9929 | { |
17ce2f00 | 9930 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 9931 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 9932 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 | 9933 | |
3f2aec07 ML |
9934 | const char *fd = FPR(fd_value, info); |
9935 | const char *fs = FPR(fs_value, info); | |
9936 | const char *ft = FPR(ft_value, info); | |
89a955e8 | 9937 | |
c5231692 | 9938 | return img_format("MIN.S %s, %s, %s", fd, fs, ft); |
89a955e8 AM |
9939 | } |
9940 | ||
9941 | ||
9942 | /* | |
9943 | * | |
9944 | * | |
9945 | * 3 2 1 | |
9946 | * 10987654321098765432109876543210 | |
9947 | * 001000 x1110000101 | |
9948 | * rt ----- | |
9949 | * rs ----- | |
9950 | * rd ----- | |
9951 | */ | |
7def8a4b | 9952 | static char *MINA_D(uint64 instruction, Dis_info *info) |
89a955e8 | 9953 | { |
17ce2f00 | 9954 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 9955 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 9956 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 | 9957 | |
3f2aec07 ML |
9958 | const char *fd = FPR(fd_value, info); |
9959 | const char *fs = FPR(fs_value, info); | |
9960 | const char *ft = FPR(ft_value, info); | |
89a955e8 | 9961 | |
c5231692 | 9962 | return img_format("MINA.D %s, %s, %s", fd, fs, ft); |
89a955e8 AM |
9963 | } |
9964 | ||
9965 | ||
9966 | /* | |
9967 | * | |
9968 | * | |
9969 | * 3 2 1 | |
9970 | * 10987654321098765432109876543210 | |
9971 | * 001000 x1110000101 | |
9972 | * rt ----- | |
9973 | * rs ----- | |
9974 | * rd ----- | |
9975 | */ | |
7def8a4b | 9976 | static char *MINA_S(uint64 instruction, Dis_info *info) |
89a955e8 | 9977 | { |
17ce2f00 | 9978 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 9979 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 9980 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 | 9981 | |
3f2aec07 ML |
9982 | const char *fd = FPR(fd_value, info); |
9983 | const char *fs = FPR(fs_value, info); | |
9984 | const char *ft = FPR(ft_value, info); | |
89a955e8 | 9985 | |
c5231692 | 9986 | return img_format("MINA.S %s, %s, %s", fd, fs, ft); |
89a955e8 AM |
9987 | } |
9988 | ||
9989 | ||
9990 | /* | |
9991 | * | |
9992 | * | |
9993 | * 3 2 1 | |
9994 | * 10987654321098765432109876543210 | |
9995 | * 001000 x1110000101 | |
9996 | * rt ----- | |
9997 | * rs ----- | |
9998 | * rd ----- | |
9999 | */ | |
7def8a4b | 10000 | static char *MOD(uint64 instruction, Dis_info *info) |
89a955e8 AM |
10001 | { |
10002 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 10003 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 10004 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 10005 | |
3f2aec07 ML |
10006 | const char *rd = GPR(rd_value, info); |
10007 | const char *rs = GPR(rs_value, info); | |
10008 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 10009 | |
c5231692 | 10010 | return img_format("MOD %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
10011 | } |
10012 | ||
10013 | ||
10014 | /* | |
5c65eed6 | 10015 | * [DSP] MODSUB rd, rs, rt - Modular subtraction on an index value |
89a955e8 AM |
10016 | * |
10017 | * 3 2 1 | |
10018 | * 10987654321098765432109876543210 | |
10019 | * 001000 x1110000101 | |
10020 | * rt ----- | |
10021 | * rs ----- | |
10022 | * rd ----- | |
10023 | */ | |
7def8a4b | 10024 | static char *MODSUB(uint64 instruction, Dis_info *info) |
89a955e8 AM |
10025 | { |
10026 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 10027 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 10028 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 10029 | |
3f2aec07 ML |
10030 | const char *rd = GPR(rd_value, info); |
10031 | const char *rs = GPR(rs_value, info); | |
10032 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 10033 | |
c5231692 | 10034 | return img_format("MODSUB %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
10035 | } |
10036 | ||
10037 | ||
10038 | /* | |
10039 | * | |
10040 | * | |
10041 | * 3 2 1 | |
10042 | * 10987654321098765432109876543210 | |
5c65eed6 | 10043 | * 001000 x1010010101 |
89a955e8 AM |
10044 | * rt ----- |
10045 | * rs ----- | |
10046 | * rd ----- | |
10047 | */ | |
7def8a4b | 10048 | static char *MODU(uint64 instruction, Dis_info *info) |
89a955e8 AM |
10049 | { |
10050 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 10051 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 10052 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 10053 | |
3f2aec07 ML |
10054 | const char *rd = GPR(rd_value, info); |
10055 | const char *rs = GPR(rs_value, info); | |
10056 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 10057 | |
c5231692 | 10058 | return img_format("MODU %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
10059 | } |
10060 | ||
10061 | ||
10062 | /* | |
10063 | * | |
10064 | * | |
10065 | * 3 2 1 | |
10066 | * 10987654321098765432109876543210 | |
10067 | * 001000 x1110000101 | |
10068 | * rt ----- | |
10069 | * rs ----- | |
10070 | * rd ----- | |
10071 | */ | |
7def8a4b | 10072 | static char *MOV_D(uint64 instruction, Dis_info *info) |
89a955e8 | 10073 | { |
17ce2f00 | 10074 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 10075 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 | 10076 | |
3f2aec07 ML |
10077 | const char *ft = FPR(ft_value, info); |
10078 | const char *fs = FPR(fs_value, info); | |
89a955e8 | 10079 | |
c5231692 | 10080 | return img_format("MOV.D %s, %s", ft, fs); |
89a955e8 AM |
10081 | } |
10082 | ||
10083 | ||
10084 | /* | |
10085 | * | |
10086 | * | |
10087 | * 3 2 1 | |
10088 | * 10987654321098765432109876543210 | |
10089 | * 001000 x1110000101 | |
10090 | * rt ----- | |
10091 | * rs ----- | |
10092 | * rd ----- | |
10093 | */ | |
7def8a4b | 10094 | static char *MOV_S(uint64 instruction, Dis_info *info) |
89a955e8 | 10095 | { |
17ce2f00 | 10096 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 10097 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 | 10098 | |
3f2aec07 ML |
10099 | const char *ft = FPR(ft_value, info); |
10100 | const char *fs = FPR(fs_value, info); | |
89a955e8 | 10101 | |
c5231692 | 10102 | return img_format("MOV.S %s, %s", ft, fs); |
89a955e8 AM |
10103 | } |
10104 | ||
10105 | ||
10106 | /* | |
10107 | * | |
10108 | * | |
10109 | * 3 2 1 | |
10110 | * 10987654321098765432109876543210 | |
10111 | * 001000 x1110000101 | |
10112 | * rt ----- | |
10113 | * rs ----- | |
10114 | * rd ----- | |
10115 | */ | |
7def8a4b | 10116 | static char *MOVE_BALC(uint64 instruction, Dis_info *info) |
89a955e8 | 10117 | { |
86b5f803 | 10118 | uint64 rtz4_value = extract_rtz4_27_26_25_23_22_21(instruction); |
89a955e8 | 10119 | uint64 rd1_value = extract_rdl_25_24(instruction); |
d3605cc0 | 10120 | int64 s_value = extract_s__se21_0_20_to_1_s1(instruction); |
89a955e8 | 10121 | |
3f2aec07 ML |
10122 | const char *rd1 = GPR(decode_gpr_gpr1(rd1_value, info), info); |
10123 | const char *rtz4 = GPR(decode_gpr_gpr4_zero(rtz4_value, info), info); | |
22e7b52a | 10124 | g_autofree char *s = ADDRESS(s_value, 4, info); |
89a955e8 | 10125 | |
c5231692 | 10126 | return img_format("MOVE.BALC %s, %s, %s", rd1, rtz4, s); |
89a955e8 AM |
10127 | } |
10128 | ||
10129 | ||
10130 | /* | |
10131 | * | |
10132 | * | |
10133 | * 3 2 1 | |
10134 | * 10987654321098765432109876543210 | |
10135 | * 001000 x1110000101 | |
10136 | * rt ----- | |
10137 | * rs ----- | |
10138 | * rd ----- | |
10139 | */ | |
7def8a4b | 10140 | static char *MOVEP(uint64 instruction, Dis_info *info) |
89a955e8 | 10141 | { |
89a955e8 AM |
10142 | uint64 rtz4_value = extract_rtz4_9_7_6_5(instruction); |
10143 | uint64 rd2_value = extract_rd2_3_8(instruction); | |
75199b40 | 10144 | uint64 rsz4_value = extract_rsz4_4_2_1_0(instruction); |
89a955e8 | 10145 | |
3f2aec07 ML |
10146 | const char *rd2 = GPR(decode_gpr_gpr2_reg1(rd2_value, info), info); |
10147 | const char *re2 = GPR(decode_gpr_gpr2_reg2(rd2_value, info), info); | |
89a955e8 | 10148 | /* !!!!!!!!!! - no conversion function */ |
3f2aec07 ML |
10149 | const char *rsz4 = GPR(decode_gpr_gpr4_zero(rsz4_value, info), info); |
10150 | const char *rtz4 = GPR(decode_gpr_gpr4_zero(rtz4_value, info), info); | |
89a955e8 | 10151 | |
c5231692 | 10152 | return img_format("MOVEP %s, %s, %s, %s", rd2, re2, rsz4, rtz4); |
89a955e8 AM |
10153 | /* hand edited */ |
10154 | } | |
10155 | ||
10156 | ||
10157 | /* | |
10158 | * | |
10159 | * | |
10160 | * 3 2 1 | |
10161 | * 10987654321098765432109876543210 | |
10162 | * 001000 x1110000101 | |
10163 | * rt ----- | |
10164 | * rs ----- | |
10165 | * rd ----- | |
10166 | */ | |
7def8a4b | 10167 | static char *MOVEP_REV_(uint64 instruction, Dis_info *info) |
89a955e8 | 10168 | { |
89a955e8 AM |
10169 | uint64 rt4_value = extract_rt4_9_7_6_5(instruction); |
10170 | uint64 rd2_value = extract_rd2_3_8(instruction); | |
75199b40 | 10171 | uint64 rs4_value = extract_rs4_4_2_1_0(instruction); |
89a955e8 | 10172 | |
3f2aec07 ML |
10173 | const char *rs4 = GPR(decode_gpr_gpr4(rs4_value, info), info); |
10174 | const char *rt4 = GPR(decode_gpr_gpr4(rt4_value, info), info); | |
10175 | const char *rd2 = GPR(decode_gpr_gpr2_reg1(rd2_value, info), info); | |
10176 | const char *rs2 = GPR(decode_gpr_gpr2_reg2(rd2_value, info), info); | |
89a955e8 AM |
10177 | /* !!!!!!!!!! - no conversion function */ |
10178 | ||
c5231692 | 10179 | return img_format("MOVEP %s, %s, %s, %s", rs4, rt4, rd2, rs2); |
89a955e8 AM |
10180 | /* hand edited */ |
10181 | } | |
10182 | ||
10183 | ||
10184 | /* | |
10185 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
10186 | * | |
10187 | * 3 2 1 | |
10188 | * 10987654321098765432109876543210 | |
10189 | * 001000 00010001101 | |
10190 | * rt ----- | |
10191 | * rs ----- | |
10192 | * rd ----- | |
10193 | */ | |
7def8a4b | 10194 | static char *MOVE(uint64 instruction, Dis_info *info) |
89a955e8 AM |
10195 | { |
10196 | uint64 rt_value = extract_rt_9_8_7_6_5(instruction); | |
10197 | uint64 rs_value = extract_rs_4_3_2_1_0(instruction); | |
10198 | ||
3f2aec07 ML |
10199 | const char *rt = GPR(rt_value, info); |
10200 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 10201 | |
c5231692 | 10202 | return img_format("MOVE %s, %s", rt, rs); |
89a955e8 AM |
10203 | } |
10204 | ||
10205 | ||
10206 | /* | |
10207 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
10208 | * | |
10209 | * 3 2 1 | |
10210 | * 10987654321098765432109876543210 | |
10211 | * 001000 00010001101 | |
10212 | * rt ----- | |
10213 | * rs ----- | |
10214 | * rd ----- | |
10215 | */ | |
7def8a4b | 10216 | static char *MOVN(uint64 instruction, Dis_info *info) |
89a955e8 AM |
10217 | { |
10218 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 10219 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 10220 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 10221 | |
3f2aec07 ML |
10222 | const char *rd = GPR(rd_value, info); |
10223 | const char *rs = GPR(rs_value, info); | |
10224 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 10225 | |
c5231692 | 10226 | return img_format("MOVN %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
10227 | } |
10228 | ||
10229 | ||
10230 | /* | |
10231 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
10232 | * | |
10233 | * 3 2 1 | |
10234 | * 10987654321098765432109876543210 | |
10235 | * 001000 00010001101 | |
10236 | * rt ----- | |
10237 | * rs ----- | |
10238 | * rd ----- | |
10239 | */ | |
7def8a4b | 10240 | static char *MOVZ(uint64 instruction, Dis_info *info) |
89a955e8 AM |
10241 | { |
10242 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 10243 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 10244 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 10245 | |
3f2aec07 ML |
10246 | const char *rd = GPR(rd_value, info); |
10247 | const char *rs = GPR(rs_value, info); | |
10248 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 10249 | |
c5231692 | 10250 | return img_format("MOVZ %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
10251 | } |
10252 | ||
10253 | ||
10254 | /* | |
5c65eed6 | 10255 | * [DSP] MSUB ac, rs, rt - Multiply word and subtract from accumulator |
89a955e8 AM |
10256 | * |
10257 | * 3 2 1 | |
10258 | * 10987654321098765432109876543210 | |
5c65eed6 | 10259 | * 001000 10101010111111 |
89a955e8 AM |
10260 | * rt ----- |
10261 | * rs ----- | |
5c65eed6 | 10262 | * ac -- |
89a955e8 | 10263 | */ |
7def8a4b | 10264 | static char *MSUB_DSP_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
10265 | { |
10266 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 10267 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
0f74e61d | 10268 | uint64 ac_value = extract_ac_15_14(instruction); |
89a955e8 | 10269 | |
3f2aec07 ML |
10270 | const char *ac = AC(ac_value, info); |
10271 | const char *rs = GPR(rs_value, info); | |
10272 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 10273 | |
c5231692 | 10274 | return img_format("MSUB %s, %s, %s", ac, rs, rt); |
89a955e8 AM |
10275 | } |
10276 | ||
10277 | ||
10278 | /* | |
10279 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
10280 | * | |
10281 | * 3 2 1 | |
10282 | * 10987654321098765432109876543210 | |
10283 | * 001000 00010001101 | |
10284 | * rt ----- | |
10285 | * rs ----- | |
10286 | * rd ----- | |
10287 | */ | |
7def8a4b | 10288 | static char *MSUBF_D(uint64 instruction, Dis_info *info) |
89a955e8 | 10289 | { |
17ce2f00 | 10290 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 10291 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 10292 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 | 10293 | |
3f2aec07 ML |
10294 | const char *fd = FPR(fd_value, info); |
10295 | const char *fs = FPR(fs_value, info); | |
10296 | const char *ft = FPR(ft_value, info); | |
89a955e8 | 10297 | |
c5231692 | 10298 | return img_format("MSUBF.D %s, %s, %s", fd, fs, ft); |
89a955e8 AM |
10299 | } |
10300 | ||
10301 | ||
10302 | /* | |
10303 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
10304 | * | |
10305 | * 3 2 1 | |
10306 | * 10987654321098765432109876543210 | |
10307 | * 001000 00010001101 | |
10308 | * rt ----- | |
10309 | * rs ----- | |
10310 | * rd ----- | |
10311 | */ | |
7def8a4b | 10312 | static char *MSUBF_S(uint64 instruction, Dis_info *info) |
89a955e8 | 10313 | { |
17ce2f00 | 10314 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 10315 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 10316 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 | 10317 | |
3f2aec07 ML |
10318 | const char *fd = FPR(fd_value, info); |
10319 | const char *fs = FPR(fs_value, info); | |
10320 | const char *ft = FPR(ft_value, info); | |
89a955e8 | 10321 | |
c5231692 | 10322 | return img_format("MSUBF.S %s, %s, %s", fd, fs, ft); |
89a955e8 AM |
10323 | } |
10324 | ||
10325 | ||
10326 | /* | |
5c65eed6 | 10327 | * [DSP] MSUBU ac, rs, rt - Multiply word and add to accumulator |
89a955e8 AM |
10328 | * |
10329 | * 3 2 1 | |
10330 | * 10987654321098765432109876543210 | |
5c65eed6 | 10331 | * 001000 11101010111111 |
89a955e8 AM |
10332 | * rt ----- |
10333 | * rs ----- | |
5c65eed6 | 10334 | * ac -- |
89a955e8 | 10335 | */ |
7def8a4b | 10336 | static char *MSUBU_DSP_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
10337 | { |
10338 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 10339 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
0f74e61d | 10340 | uint64 ac_value = extract_ac_15_14(instruction); |
89a955e8 | 10341 | |
3f2aec07 ML |
10342 | const char *ac = AC(ac_value, info); |
10343 | const char *rs = GPR(rs_value, info); | |
10344 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 10345 | |
c5231692 | 10346 | return img_format("MSUBU %s, %s, %s", ac, rs, rt); |
89a955e8 AM |
10347 | } |
10348 | ||
10349 | ||
10350 | /* | |
10351 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
10352 | * | |
10353 | * 3 2 1 | |
10354 | * 10987654321098765432109876543210 | |
10355 | * 001000 00010001101 | |
10356 | * rt ----- | |
10357 | * rs ----- | |
10358 | * rd ----- | |
10359 | */ | |
7def8a4b | 10360 | static char *MTC0(uint64 instruction, Dis_info *info) |
89a955e8 AM |
10361 | { |
10362 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
10363 | uint64 c0s_value = extract_c0s_20_19_18_17_16(instruction); | |
10364 | uint64 sel_value = extract_sel_15_14_13_12_11(instruction); | |
10365 | ||
3f2aec07 | 10366 | const char *rt = GPR(rt_value, info); |
89a955e8 | 10367 | |
043dc73c ML |
10368 | return img_format("MTC0 %s, CP%" PRIu64 ", 0x%" PRIx64, |
10369 | rt, c0s_value, sel_value); | |
89a955e8 AM |
10370 | } |
10371 | ||
10372 | ||
10373 | /* | |
10374 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
10375 | * | |
10376 | * 3 2 1 | |
10377 | * 10987654321098765432109876543210 | |
10378 | * 001000 00010001101 | |
10379 | * rt ----- | |
10380 | * rs ----- | |
10381 | * rd ----- | |
10382 | */ | |
7def8a4b | 10383 | static char *MTC1(uint64 instruction, Dis_info *info) |
89a955e8 AM |
10384 | { |
10385 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
52a96d22 | 10386 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 | 10387 | |
3f2aec07 ML |
10388 | const char *rt = GPR(rt_value, info); |
10389 | const char *fs = FPR(fs_value, info); | |
89a955e8 | 10390 | |
c5231692 | 10391 | return img_format("MTC1 %s, %s", rt, fs); |
89a955e8 AM |
10392 | } |
10393 | ||
10394 | ||
10395 | /* | |
10396 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
10397 | * | |
10398 | * 3 2 1 | |
10399 | * 10987654321098765432109876543210 | |
10400 | * 001000 00010001101 | |
10401 | * rt ----- | |
10402 | * rs ----- | |
10403 | * rd ----- | |
10404 | */ | |
7def8a4b | 10405 | static char *MTC2(uint64 instruction, Dis_info *info) |
89a955e8 | 10406 | { |
89a955e8 | 10407 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); |
86b5f803 | 10408 | uint64 cs_value = extract_cs_20_19_18_17_16(instruction); |
89a955e8 | 10409 | |
3f2aec07 | 10410 | const char *rt = GPR(rt_value, info); |
89a955e8 | 10411 | |
043dc73c | 10412 | return img_format("MTC2 %s, CP%" PRIu64, rt, cs_value); |
89a955e8 AM |
10413 | } |
10414 | ||
10415 | ||
10416 | /* | |
10417 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
10418 | * | |
10419 | * 3 2 1 | |
10420 | * 10987654321098765432109876543210 | |
10421 | * 001000 00010001101 | |
10422 | * rt ----- | |
10423 | * rs ----- | |
10424 | * rd ----- | |
10425 | */ | |
7def8a4b | 10426 | static char *MTGC0(uint64 instruction, Dis_info *info) |
89a955e8 AM |
10427 | { |
10428 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
10429 | uint64 c0s_value = extract_c0s_20_19_18_17_16(instruction); | |
10430 | uint64 sel_value = extract_sel_15_14_13_12_11(instruction); | |
10431 | ||
3f2aec07 | 10432 | const char *rt = GPR(rt_value, info); |
89a955e8 | 10433 | |
043dc73c ML |
10434 | return img_format("MTGC0 %s, CP%" PRIu64 ", 0x%" PRIx64, |
10435 | rt, c0s_value, sel_value); | |
89a955e8 AM |
10436 | } |
10437 | ||
10438 | ||
10439 | /* | |
10440 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
10441 | * | |
10442 | * 3 2 1 | |
10443 | * 10987654321098765432109876543210 | |
10444 | * 001000 00010001101 | |
10445 | * rt ----- | |
10446 | * rs ----- | |
10447 | * rd ----- | |
10448 | */ | |
7def8a4b | 10449 | static char *MTHC0(uint64 instruction, Dis_info *info) |
89a955e8 AM |
10450 | { |
10451 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
10452 | uint64 c0s_value = extract_c0s_20_19_18_17_16(instruction); | |
10453 | uint64 sel_value = extract_sel_15_14_13_12_11(instruction); | |
10454 | ||
3f2aec07 | 10455 | const char *rt = GPR(rt_value, info); |
89a955e8 | 10456 | |
043dc73c ML |
10457 | return img_format("MTHC0 %s, CP%" PRIu64 ", 0x%" PRIx64, |
10458 | rt, c0s_value, sel_value); | |
89a955e8 AM |
10459 | } |
10460 | ||
10461 | ||
10462 | /* | |
10463 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
10464 | * | |
10465 | * 3 2 1 | |
10466 | * 10987654321098765432109876543210 | |
10467 | * 001000 00010001101 | |
10468 | * rt ----- | |
10469 | * rs ----- | |
10470 | * rd ----- | |
10471 | */ | |
7def8a4b | 10472 | static char *MTHC1(uint64 instruction, Dis_info *info) |
89a955e8 AM |
10473 | { |
10474 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
52a96d22 | 10475 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 | 10476 | |
3f2aec07 ML |
10477 | const char *rt = GPR(rt_value, info); |
10478 | const char *fs = FPR(fs_value, info); | |
89a955e8 | 10479 | |
c5231692 | 10480 | return img_format("MTHC1 %s, %s", rt, fs); |
89a955e8 AM |
10481 | } |
10482 | ||
10483 | ||
10484 | /* | |
10485 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
10486 | * | |
10487 | * 3 2 1 | |
10488 | * 10987654321098765432109876543210 | |
10489 | * 001000 00010001101 | |
10490 | * rt ----- | |
10491 | * rs ----- | |
10492 | * rd ----- | |
10493 | */ | |
7def8a4b | 10494 | static char *MTHC2(uint64 instruction, Dis_info *info) |
89a955e8 | 10495 | { |
89a955e8 | 10496 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); |
86b5f803 | 10497 | uint64 cs_value = extract_cs_20_19_18_17_16(instruction); |
89a955e8 | 10498 | |
3f2aec07 | 10499 | const char *rt = GPR(rt_value, info); |
89a955e8 | 10500 | |
043dc73c | 10501 | return img_format("MTHC2 %s, CP%" PRIu64, rt, cs_value); |
89a955e8 AM |
10502 | } |
10503 | ||
10504 | ||
10505 | /* | |
10506 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
10507 | * | |
10508 | * 3 2 1 | |
10509 | * 10987654321098765432109876543210 | |
10510 | * 001000 00010001101 | |
10511 | * rt ----- | |
10512 | * rs ----- | |
10513 | * rd ----- | |
10514 | */ | |
7def8a4b | 10515 | static char *MTHGC0(uint64 instruction, Dis_info *info) |
89a955e8 AM |
10516 | { |
10517 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
10518 | uint64 c0s_value = extract_c0s_20_19_18_17_16(instruction); | |
10519 | uint64 sel_value = extract_sel_15_14_13_12_11(instruction); | |
10520 | ||
3f2aec07 | 10521 | const char *rt = GPR(rt_value, info); |
89a955e8 | 10522 | |
043dc73c ML |
10523 | return img_format("MTHGC0 %s, CP%" PRIu64 ", 0x%" PRIx64, |
10524 | rt, c0s_value, sel_value); | |
89a955e8 AM |
10525 | } |
10526 | ||
10527 | ||
10528 | /* | |
5c65eed6 | 10529 | * [DSP] MTHI rs, ac - Move to HI register |
89a955e8 AM |
10530 | * |
10531 | * 3 2 1 | |
10532 | * 10987654321098765432109876543210 | |
5c65eed6 | 10533 | * 001000xxxxx 10000001111111 |
89a955e8 | 10534 | * rs ----- |
5c65eed6 | 10535 | * ac -- |
89a955e8 | 10536 | */ |
7def8a4b | 10537 | static char *MTHI_DSP_(uint64 instruction, Dis_info *info) |
89a955e8 | 10538 | { |
89a955e8 | 10539 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
0f74e61d | 10540 | uint64 ac_value = extract_ac_15_14(instruction); |
89a955e8 | 10541 | |
3f2aec07 ML |
10542 | const char *rs = GPR(rs_value, info); |
10543 | const char *ac = AC(ac_value, info); | |
89a955e8 | 10544 | |
c5231692 | 10545 | return img_format("MTHI %s, %s", rs, ac); |
89a955e8 AM |
10546 | } |
10547 | ||
10548 | ||
10549 | /* | |
5c65eed6 | 10550 | * [DSP] MTHLIP rs, ac - Copy LO to HI and a GPR to LO and increment pos by 32 |
89a955e8 AM |
10551 | * |
10552 | * 3 2 1 | |
10553 | * 10987654321098765432109876543210 | |
5c65eed6 | 10554 | * 001000xxxxx 00001001111111 |
89a955e8 | 10555 | * rs ----- |
5c65eed6 | 10556 | * ac -- |
89a955e8 | 10557 | */ |
7def8a4b | 10558 | static char *MTHLIP(uint64 instruction, Dis_info *info) |
89a955e8 | 10559 | { |
89a955e8 | 10560 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
0f74e61d | 10561 | uint64 ac_value = extract_ac_15_14(instruction); |
89a955e8 | 10562 | |
3f2aec07 ML |
10563 | const char *rs = GPR(rs_value, info); |
10564 | const char *ac = AC(ac_value, info); | |
89a955e8 | 10565 | |
c5231692 | 10566 | return img_format("MTHLIP %s, %s", rs, ac); |
89a955e8 AM |
10567 | } |
10568 | ||
10569 | ||
10570 | /* | |
10571 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
10572 | * | |
10573 | * 3 2 1 | |
10574 | * 10987654321098765432109876543210 | |
10575 | * 001000 00010001101 | |
10576 | * rt ----- | |
10577 | * rs ----- | |
10578 | * rd ----- | |
10579 | */ | |
7def8a4b | 10580 | static char *MTHTR(uint64 instruction, Dis_info *info) |
89a955e8 AM |
10581 | { |
10582 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
10583 | uint64 c0s_value = extract_c0s_20_19_18_17_16(instruction); | |
10584 | uint64 sel_value = extract_sel_15_14_13_12_11(instruction); | |
10585 | uint64 u_value = extract_u_10(instruction); | |
10586 | ||
3f2aec07 | 10587 | const char *rt = GPR(rt_value, info); |
89a955e8 | 10588 | |
4066c152 ML |
10589 | return img_format("MTHTR %s, 0x%" PRIx64 ", 0x%" PRIx64 ", 0x%" PRIx64, |
10590 | rt, c0s_value, u_value, sel_value); | |
89a955e8 AM |
10591 | } |
10592 | ||
10593 | ||
10594 | /* | |
5c65eed6 | 10595 | * [DSP] MTLO rs, ac - Move to LO register |
89a955e8 AM |
10596 | * |
10597 | * 3 2 1 | |
10598 | * 10987654321098765432109876543210 | |
5c65eed6 | 10599 | * 001000xxxxx 11000001111111 |
89a955e8 | 10600 | * rs ----- |
5c65eed6 | 10601 | * ac -- |
89a955e8 | 10602 | */ |
7def8a4b | 10603 | static char *MTLO_DSP_(uint64 instruction, Dis_info *info) |
89a955e8 | 10604 | { |
89a955e8 | 10605 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
0f74e61d | 10606 | uint64 ac_value = extract_ac_15_14(instruction); |
89a955e8 | 10607 | |
3f2aec07 ML |
10608 | const char *rs = GPR(rs_value, info); |
10609 | const char *ac = AC(ac_value, info); | |
89a955e8 | 10610 | |
c5231692 | 10611 | return img_format("MTLO %s, %s", rs, ac); |
89a955e8 AM |
10612 | } |
10613 | ||
10614 | ||
10615 | /* | |
10616 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
10617 | * | |
10618 | * 3 2 1 | |
10619 | * 10987654321098765432109876543210 | |
10620 | * 001000 00010001101 | |
10621 | * rt ----- | |
10622 | * rs ----- | |
10623 | * rd ----- | |
10624 | */ | |
7def8a4b | 10625 | static char *MTTR(uint64 instruction, Dis_info *info) |
89a955e8 AM |
10626 | { |
10627 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
10628 | uint64 c0s_value = extract_c0s_20_19_18_17_16(instruction); | |
10629 | uint64 sel_value = extract_sel_15_14_13_12_11(instruction); | |
10630 | uint64 u_value = extract_u_10(instruction); | |
10631 | ||
3f2aec07 | 10632 | const char *rt = GPR(rt_value, info); |
89a955e8 | 10633 | |
4066c152 ML |
10634 | return img_format("MTTR %s, 0x%" PRIx64 ", 0x%" PRIx64 ", 0x%" PRIx64, |
10635 | rt, c0s_value, u_value, sel_value); | |
89a955e8 AM |
10636 | } |
10637 | ||
10638 | ||
10639 | /* | |
10640 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
10641 | * | |
10642 | * 3 2 1 | |
10643 | * 10987654321098765432109876543210 | |
10644 | * 001000 00010001101 | |
10645 | * rt ----- | |
10646 | * rs ----- | |
10647 | * rd ----- | |
10648 | */ | |
7def8a4b | 10649 | static char *MUH(uint64 instruction, Dis_info *info) |
89a955e8 AM |
10650 | { |
10651 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 10652 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 10653 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 10654 | |
3f2aec07 ML |
10655 | const char *rd = GPR(rd_value, info); |
10656 | const char *rs = GPR(rs_value, info); | |
10657 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 10658 | |
c5231692 | 10659 | return img_format("MUH %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
10660 | } |
10661 | ||
10662 | ||
10663 | /* | |
10664 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
10665 | * | |
10666 | * 3 2 1 | |
10667 | * 10987654321098765432109876543210 | |
10668 | * 001000 00010001101 | |
10669 | * rt ----- | |
10670 | * rs ----- | |
10671 | * rd ----- | |
10672 | */ | |
7def8a4b | 10673 | static char *MUHU(uint64 instruction, Dis_info *info) |
89a955e8 AM |
10674 | { |
10675 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 10676 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 10677 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 10678 | |
3f2aec07 ML |
10679 | const char *rd = GPR(rd_value, info); |
10680 | const char *rs = GPR(rs_value, info); | |
10681 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 10682 | |
c5231692 | 10683 | return img_format("MUHU %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
10684 | } |
10685 | ||
10686 | ||
10687 | /* | |
10688 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
10689 | * | |
10690 | * 3 2 1 | |
10691 | * 10987654321098765432109876543210 | |
10692 | * 001000 00010001101 | |
10693 | * rt ----- | |
10694 | * rs ----- | |
10695 | * rd ----- | |
10696 | */ | |
7def8a4b | 10697 | static char *MUL_32_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
10698 | { |
10699 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 10700 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 10701 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 10702 | |
3f2aec07 ML |
10703 | const char *rd = GPR(rd_value, info); |
10704 | const char *rs = GPR(rs_value, info); | |
10705 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 10706 | |
c5231692 | 10707 | return img_format("MUL %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
10708 | } |
10709 | ||
10710 | ||
10711 | /* | |
10712 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
10713 | * | |
10714 | * 3 2 1 | |
10715 | * 10987654321098765432109876543210 | |
10716 | * 001000 00010001101 | |
10717 | * rt ----- | |
10718 | * rs ----- | |
10719 | * rd ----- | |
10720 | */ | |
7def8a4b | 10721 | static char *MUL_4X4_(uint64 instruction, Dis_info *info) |
89a955e8 | 10722 | { |
89a955e8 | 10723 | uint64 rt4_value = extract_rt4_9_7_6_5(instruction); |
75199b40 | 10724 | uint64 rs4_value = extract_rs4_4_2_1_0(instruction); |
89a955e8 | 10725 | |
3f2aec07 ML |
10726 | const char *rs4 = GPR(decode_gpr_gpr4(rs4_value, info), info); |
10727 | const char *rt4 = GPR(decode_gpr_gpr4(rt4_value, info), info); | |
89a955e8 | 10728 | |
c5231692 | 10729 | return img_format("MUL %s, %s", rs4, rt4); |
89a955e8 AM |
10730 | } |
10731 | ||
10732 | ||
10733 | /* | |
10734 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
10735 | * | |
10736 | * 3 2 1 | |
10737 | * 10987654321098765432109876543210 | |
10738 | * 001000 00010001101 | |
10739 | * rt ----- | |
10740 | * rs ----- | |
10741 | * rd ----- | |
10742 | */ | |
7def8a4b | 10743 | static char *MUL_D(uint64 instruction, Dis_info *info) |
89a955e8 | 10744 | { |
17ce2f00 | 10745 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 10746 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 10747 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 | 10748 | |
3f2aec07 ML |
10749 | const char *fd = FPR(fd_value, info); |
10750 | const char *fs = FPR(fs_value, info); | |
10751 | const char *ft = FPR(ft_value, info); | |
89a955e8 | 10752 | |
c5231692 | 10753 | return img_format("MUL.D %s, %s, %s", fd, fs, ft); |
89a955e8 AM |
10754 | } |
10755 | ||
10756 | ||
10757 | /* | |
5c65eed6 AM |
10758 | * [DSP] MUL.PH rd, rs, rt - Multiply vector integer half words to same size |
10759 | * products | |
89a955e8 AM |
10760 | * |
10761 | * 3 2 1 | |
10762 | * 10987654321098765432109876543210 | |
5c65eed6 | 10763 | * 001000 00000101101 |
89a955e8 AM |
10764 | * rt ----- |
10765 | * rs ----- | |
10766 | * rd ----- | |
10767 | */ | |
7def8a4b | 10768 | static char *MUL_PH(uint64 instruction, Dis_info *info) |
89a955e8 AM |
10769 | { |
10770 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 10771 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 10772 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 10773 | |
3f2aec07 ML |
10774 | const char *rd = GPR(rd_value, info); |
10775 | const char *rs = GPR(rs_value, info); | |
10776 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 10777 | |
c5231692 | 10778 | return img_format("MUL.PH %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
10779 | } |
10780 | ||
10781 | ||
10782 | /* | |
5c65eed6 AM |
10783 | * [DSP] MUL_S.PH rd, rs, rt - Multiply vector integer half words to same size |
10784 | * products (saturated) | |
89a955e8 AM |
10785 | * |
10786 | * 3 2 1 | |
10787 | * 10987654321098765432109876543210 | |
5c65eed6 | 10788 | * 001000 10000101101 |
89a955e8 AM |
10789 | * rt ----- |
10790 | * rs ----- | |
10791 | * rd ----- | |
10792 | */ | |
7def8a4b | 10793 | static char *MUL_S_PH(uint64 instruction, Dis_info *info) |
89a955e8 AM |
10794 | { |
10795 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 10796 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 10797 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 10798 | |
3f2aec07 ML |
10799 | const char *rd = GPR(rd_value, info); |
10800 | const char *rs = GPR(rs_value, info); | |
10801 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 10802 | |
c5231692 | 10803 | return img_format("MUL_S.PH %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
10804 | } |
10805 | ||
10806 | ||
10807 | /* | |
10808 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
10809 | * | |
10810 | * 3 2 1 | |
10811 | * 10987654321098765432109876543210 | |
10812 | * 001000 00010001101 | |
10813 | * rt ----- | |
10814 | * rs ----- | |
10815 | * rd ----- | |
10816 | */ | |
7def8a4b | 10817 | static char *MUL_S(uint64 instruction, Dis_info *info) |
89a955e8 | 10818 | { |
17ce2f00 | 10819 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 10820 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 10821 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 | 10822 | |
3f2aec07 ML |
10823 | const char *fd = FPR(fd_value, info); |
10824 | const char *fs = FPR(fs_value, info); | |
10825 | const char *ft = FPR(ft_value, info); | |
89a955e8 | 10826 | |
c5231692 | 10827 | return img_format("MUL.S %s, %s, %s", fd, fs, ft); |
89a955e8 AM |
10828 | } |
10829 | ||
10830 | ||
10831 | /* | |
5c65eed6 AM |
10832 | * [DSP] MULEQ_S.W.PHL rd, rs, rt - Multiply vector fractional left halfwords |
10833 | * to expanded width products | |
89a955e8 AM |
10834 | * |
10835 | * 3 2 1 | |
10836 | * 10987654321098765432109876543210 | |
5c65eed6 | 10837 | * 001000 x0000100101 |
89a955e8 AM |
10838 | * rt ----- |
10839 | * rs ----- | |
10840 | * rd ----- | |
10841 | */ | |
7def8a4b | 10842 | static char *MULEQ_S_W_PHL(uint64 instruction, Dis_info *info) |
89a955e8 AM |
10843 | { |
10844 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 10845 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 10846 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 10847 | |
3f2aec07 ML |
10848 | const char *rd = GPR(rd_value, info); |
10849 | const char *rs = GPR(rs_value, info); | |
10850 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 10851 | |
c5231692 | 10852 | return img_format("MULEQ_S.W.PHL %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
10853 | } |
10854 | ||
10855 | ||
10856 | /* | |
5c65eed6 AM |
10857 | * [DSP] MULEQ_S.W.PHR rd, rs, rt - Multiply vector fractional right halfwords |
10858 | * to expanded width products | |
89a955e8 AM |
10859 | * |
10860 | * 3 2 1 | |
10861 | * 10987654321098765432109876543210 | |
5c65eed6 | 10862 | * 001000 x0001100101 |
89a955e8 AM |
10863 | * rt ----- |
10864 | * rs ----- | |
10865 | * rd ----- | |
10866 | */ | |
7def8a4b | 10867 | static char *MULEQ_S_W_PHR(uint64 instruction, Dis_info *info) |
89a955e8 AM |
10868 | { |
10869 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 10870 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 10871 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 10872 | |
3f2aec07 ML |
10873 | const char *rd = GPR(rd_value, info); |
10874 | const char *rs = GPR(rs_value, info); | |
10875 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 10876 | |
c5231692 | 10877 | return img_format("MULEQ_S.W.PHR %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
10878 | } |
10879 | ||
10880 | ||
10881 | /* | |
5c65eed6 AM |
10882 | * [DSP] MULEU_S.PH.QBL rd, rs, rt - Multiply vector fractional left bytes |
10883 | * by halfwords to halfword products | |
89a955e8 AM |
10884 | * |
10885 | * 3 2 1 | |
10886 | * 10987654321098765432109876543210 | |
5c65eed6 | 10887 | * 001000 x0010010101 |
89a955e8 AM |
10888 | * rt ----- |
10889 | * rs ----- | |
10890 | * rd ----- | |
10891 | */ | |
7def8a4b | 10892 | static char *MULEU_S_PH_QBL(uint64 instruction, Dis_info *info) |
89a955e8 AM |
10893 | { |
10894 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 10895 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 10896 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 10897 | |
3f2aec07 ML |
10898 | const char *rd = GPR(rd_value, info); |
10899 | const char *rs = GPR(rs_value, info); | |
10900 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 10901 | |
c5231692 | 10902 | return img_format("MULEU_S.PH.QBL %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
10903 | } |
10904 | ||
10905 | ||
10906 | /* | |
5c65eed6 AM |
10907 | * [DSP] MULEU_S.PH.QBR rd, rs, rt - Multiply vector fractional right bytes |
10908 | * by halfwords to halfword products | |
89a955e8 AM |
10909 | * |
10910 | * 3 2 1 | |
10911 | * 10987654321098765432109876543210 | |
5c65eed6 | 10912 | * 001000 x0011010101 |
89a955e8 AM |
10913 | * rt ----- |
10914 | * rs ----- | |
10915 | * rd ----- | |
10916 | */ | |
7def8a4b | 10917 | static char *MULEU_S_PH_QBR(uint64 instruction, Dis_info *info) |
89a955e8 AM |
10918 | { |
10919 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 10920 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 10921 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 10922 | |
3f2aec07 ML |
10923 | const char *rd = GPR(rd_value, info); |
10924 | const char *rs = GPR(rs_value, info); | |
10925 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 10926 | |
c5231692 | 10927 | return img_format("MULEU_S.PH.QBR %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
10928 | } |
10929 | ||
10930 | ||
10931 | /* | |
5c65eed6 AM |
10932 | * [DSP] MULQ_RS.PH rd, rs, rt - Multiply vector fractional halfwords |
10933 | * to fractional halfword products | |
89a955e8 AM |
10934 | * |
10935 | * 3 2 1 | |
10936 | * 10987654321098765432109876543210 | |
5c65eed6 | 10937 | * 001000 x0100010101 |
89a955e8 AM |
10938 | * rt ----- |
10939 | * rs ----- | |
10940 | * rd ----- | |
10941 | */ | |
7def8a4b | 10942 | static char *MULQ_RS_PH(uint64 instruction, Dis_info *info) |
89a955e8 AM |
10943 | { |
10944 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 10945 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 10946 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 10947 | |
3f2aec07 ML |
10948 | const char *rd = GPR(rd_value, info); |
10949 | const char *rs = GPR(rs_value, info); | |
10950 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 10951 | |
c5231692 | 10952 | return img_format("MULQ_RS.PH %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
10953 | } |
10954 | ||
10955 | ||
10956 | /* | |
5c65eed6 AM |
10957 | * [DSP] MULQ_RS.W rd, rs, rt - Multiply fractional words to same size |
10958 | * product with saturation and rounding | |
89a955e8 AM |
10959 | * |
10960 | * 3 2 1 | |
10961 | * 10987654321098765432109876543210 | |
5c65eed6 | 10962 | * 001000 x0110010101 |
89a955e8 AM |
10963 | * rt ----- |
10964 | * rs ----- | |
10965 | * rd ----- | |
10966 | */ | |
7def8a4b | 10967 | static char *MULQ_RS_W(uint64 instruction, Dis_info *info) |
89a955e8 AM |
10968 | { |
10969 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 10970 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 10971 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 10972 | |
3f2aec07 ML |
10973 | const char *rd = GPR(rd_value, info); |
10974 | const char *rs = GPR(rs_value, info); | |
10975 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 10976 | |
c5231692 | 10977 | return img_format("MULQ_RS.W %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
10978 | } |
10979 | ||
10980 | ||
10981 | /* | |
5c65eed6 AM |
10982 | * [DSP] MULQ_S.PH rd, rs, rt - Multiply fractional halfwords to same size |
10983 | * products | |
89a955e8 AM |
10984 | * |
10985 | * 3 2 1 | |
10986 | * 10987654321098765432109876543210 | |
5c65eed6 | 10987 | * 001000 x0101010101 |
89a955e8 AM |
10988 | * rt ----- |
10989 | * rs ----- | |
10990 | * rd ----- | |
10991 | */ | |
7def8a4b | 10992 | static char *MULQ_S_PH(uint64 instruction, Dis_info *info) |
89a955e8 AM |
10993 | { |
10994 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 10995 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 10996 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 10997 | |
3f2aec07 ML |
10998 | const char *rd = GPR(rd_value, info); |
10999 | const char *rs = GPR(rs_value, info); | |
11000 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 11001 | |
c5231692 | 11002 | return img_format("MULQ_S.PH %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
11003 | } |
11004 | ||
11005 | ||
11006 | /* | |
5c65eed6 AM |
11007 | * [DSP] MULQ_S.W rd, rs, rt - Multiply fractional words to same size product |
11008 | * with saturation | |
89a955e8 AM |
11009 | * |
11010 | * 3 2 1 | |
11011 | * 10987654321098765432109876543210 | |
5c65eed6 | 11012 | * 001000 x0111010101 |
89a955e8 AM |
11013 | * rt ----- |
11014 | * rs ----- | |
11015 | * rd ----- | |
11016 | */ | |
7def8a4b | 11017 | static char *MULQ_S_W(uint64 instruction, Dis_info *info) |
89a955e8 AM |
11018 | { |
11019 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 11020 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 11021 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 11022 | |
3f2aec07 ML |
11023 | const char *rd = GPR(rd_value, info); |
11024 | const char *rs = GPR(rs_value, info); | |
11025 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 11026 | |
c5231692 | 11027 | return img_format("MULQ_S.W %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
11028 | } |
11029 | ||
11030 | ||
11031 | /* | |
5c65eed6 AM |
11032 | * [DSP] MULSA.W.PH ac, rs, rt - Multiply and subtract vector integer halfword |
11033 | * elements and accumulate | |
89a955e8 AM |
11034 | * |
11035 | * 3 2 1 | |
11036 | * 10987654321098765432109876543210 | |
5c65eed6 | 11037 | * 001000 10110010111111 |
89a955e8 AM |
11038 | * rt ----- |
11039 | * rs ----- | |
5c65eed6 | 11040 | * ac -- |
89a955e8 | 11041 | */ |
7def8a4b | 11042 | static char *MULSA_W_PH(uint64 instruction, Dis_info *info) |
89a955e8 AM |
11043 | { |
11044 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 11045 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
0f74e61d | 11046 | uint64 ac_value = extract_ac_15_14(instruction); |
89a955e8 | 11047 | |
3f2aec07 ML |
11048 | const char *ac = AC(ac_value, info); |
11049 | const char *rs = GPR(rs_value, info); | |
11050 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 11051 | |
c5231692 | 11052 | return img_format("MULSA.W.PH %s, %s, %s", ac, rs, rt); |
89a955e8 AM |
11053 | } |
11054 | ||
11055 | ||
11056 | /* | |
5c65eed6 AM |
11057 | * [DSP] MULSAQ_S.W.PH ac, rs, rt - Multiply and subtract vector fractional |
11058 | * halfwords and accumulate | |
89a955e8 AM |
11059 | * |
11060 | * 3 2 1 | |
11061 | * 10987654321098765432109876543210 | |
5c65eed6 | 11062 | * 001000 11110010111111 |
89a955e8 AM |
11063 | * rt ----- |
11064 | * rs ----- | |
5c65eed6 | 11065 | * ac -- |
89a955e8 | 11066 | */ |
7def8a4b | 11067 | static char *MULSAQ_S_W_PH(uint64 instruction, Dis_info *info) |
89a955e8 AM |
11068 | { |
11069 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 11070 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
0f74e61d | 11071 | uint64 ac_value = extract_ac_15_14(instruction); |
89a955e8 | 11072 | |
3f2aec07 ML |
11073 | const char *ac = AC(ac_value, info); |
11074 | const char *rs = GPR(rs_value, info); | |
11075 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 11076 | |
c5231692 | 11077 | return img_format("MULSAQ_S.W.PH %s, %s, %s", ac, rs, rt); |
89a955e8 AM |
11078 | } |
11079 | ||
11080 | ||
11081 | /* | |
5c65eed6 | 11082 | * [DSP] MULT ac, rs, rt - Multiply word |
89a955e8 AM |
11083 | * |
11084 | * 3 2 1 | |
11085 | * 10987654321098765432109876543210 | |
5c65eed6 | 11086 | * 001000 00110010111111 |
89a955e8 AM |
11087 | * rt ----- |
11088 | * rs ----- | |
5c65eed6 | 11089 | * ac -- |
89a955e8 | 11090 | */ |
7def8a4b | 11091 | static char *MULT_DSP_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
11092 | { |
11093 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 11094 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
0f74e61d | 11095 | uint64 ac_value = extract_ac_15_14(instruction); |
89a955e8 | 11096 | |
3f2aec07 ML |
11097 | const char *ac = AC(ac_value, info); |
11098 | const char *rs = GPR(rs_value, info); | |
11099 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 11100 | |
c5231692 | 11101 | return img_format("MULT %s, %s, %s", ac, rs, rt); |
89a955e8 AM |
11102 | } |
11103 | ||
11104 | ||
11105 | /* | |
5c65eed6 | 11106 | * [DSP] MULTU ac, rs, rt - Multiply unsigned word |
89a955e8 AM |
11107 | * |
11108 | * 3 2 1 | |
11109 | * 10987654321098765432109876543210 | |
5c65eed6 | 11110 | * 001000 01110010111111 |
89a955e8 AM |
11111 | * rt ----- |
11112 | * rs ----- | |
5c65eed6 | 11113 | * ac -- |
89a955e8 | 11114 | */ |
7def8a4b | 11115 | static char *MULTU_DSP_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
11116 | { |
11117 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 11118 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
0f74e61d | 11119 | uint64 ac_value = extract_ac_15_14(instruction); |
89a955e8 | 11120 | |
3f2aec07 ML |
11121 | const char *ac = AC(ac_value, info); |
11122 | const char *rs = GPR(rs_value, info); | |
11123 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 11124 | |
c5231692 | 11125 | return img_format("MULTU %s, %s, %s", ac, rs, rt); |
89a955e8 AM |
11126 | } |
11127 | ||
11128 | ||
11129 | /* | |
11130 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
11131 | * | |
11132 | * 3 2 1 | |
11133 | * 10987654321098765432109876543210 | |
11134 | * 001000 00010001101 | |
11135 | * rt ----- | |
11136 | * rs ----- | |
11137 | * rd ----- | |
11138 | */ | |
7def8a4b | 11139 | static char *MULU(uint64 instruction, Dis_info *info) |
89a955e8 AM |
11140 | { |
11141 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 11142 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 11143 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 11144 | |
3f2aec07 ML |
11145 | const char *rd = GPR(rd_value, info); |
11146 | const char *rs = GPR(rs_value, info); | |
11147 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 11148 | |
c5231692 | 11149 | return img_format("MULU %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
11150 | } |
11151 | ||
11152 | ||
11153 | /* | |
11154 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
11155 | * | |
11156 | * 3 2 1 | |
11157 | * 10987654321098765432109876543210 | |
11158 | * 001000 00010001101 | |
11159 | * rt ----- | |
11160 | * rs ----- | |
11161 | * rd ----- | |
11162 | */ | |
7def8a4b | 11163 | static char *NEG_D(uint64 instruction, Dis_info *info) |
89a955e8 | 11164 | { |
17ce2f00 | 11165 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 11166 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 | 11167 | |
3f2aec07 ML |
11168 | const char *ft = FPR(ft_value, info); |
11169 | const char *fs = FPR(fs_value, info); | |
89a955e8 | 11170 | |
c5231692 | 11171 | return img_format("NEG.D %s, %s", ft, fs); |
89a955e8 AM |
11172 | } |
11173 | ||
11174 | ||
11175 | /* | |
11176 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
11177 | * | |
11178 | * 3 2 1 | |
11179 | * 10987654321098765432109876543210 | |
11180 | * 001000 00010001101 | |
11181 | * rt ----- | |
11182 | * rs ----- | |
11183 | * rd ----- | |
11184 | */ | |
7def8a4b | 11185 | static char *NEG_S(uint64 instruction, Dis_info *info) |
89a955e8 | 11186 | { |
17ce2f00 | 11187 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 11188 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 | 11189 | |
3f2aec07 ML |
11190 | const char *ft = FPR(ft_value, info); |
11191 | const char *fs = FPR(fs_value, info); | |
89a955e8 | 11192 | |
c5231692 | 11193 | return img_format("NEG.S %s, %s", ft, fs); |
89a955e8 AM |
11194 | } |
11195 | ||
11196 | ||
11197 | /* | |
11198 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
11199 | * | |
11200 | * 3 2 1 | |
11201 | * 10987654321098765432109876543210 | |
11202 | * 001000 00010001101 | |
11203 | * rt ----- | |
11204 | * rs ----- | |
11205 | * rd ----- | |
11206 | */ | |
7def8a4b | 11207 | static char *NOP_16_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
11208 | { |
11209 | (void)instruction; | |
11210 | ||
7def8a4b | 11211 | return g_strdup("NOP "); |
89a955e8 AM |
11212 | } |
11213 | ||
11214 | ||
11215 | /* | |
11216 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
11217 | * | |
11218 | * 3 2 1 | |
11219 | * 10987654321098765432109876543210 | |
11220 | * 001000 00010001101 | |
11221 | * rt ----- | |
11222 | * rs ----- | |
11223 | * rd ----- | |
11224 | */ | |
7def8a4b | 11225 | static char *NOP_32_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
11226 | { |
11227 | (void)instruction; | |
11228 | ||
7def8a4b | 11229 | return g_strdup("NOP "); |
89a955e8 AM |
11230 | } |
11231 | ||
11232 | ||
11233 | /* | |
11234 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
11235 | * | |
11236 | * 3 2 1 | |
11237 | * 10987654321098765432109876543210 | |
11238 | * 001000 00010001101 | |
11239 | * rt ----- | |
11240 | * rs ----- | |
11241 | * rd ----- | |
11242 | */ | |
7def8a4b | 11243 | static char *NOR(uint64 instruction, Dis_info *info) |
89a955e8 AM |
11244 | { |
11245 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 11246 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 11247 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 11248 | |
3f2aec07 ML |
11249 | const char *rd = GPR(rd_value, info); |
11250 | const char *rs = GPR(rs_value, info); | |
11251 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 11252 | |
c5231692 | 11253 | return img_format("NOR %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
11254 | } |
11255 | ||
11256 | ||
11257 | /* | |
11258 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
11259 | * | |
11260 | * 3 2 1 | |
11261 | * 10987654321098765432109876543210 | |
11262 | * 001000 00010001101 | |
11263 | * rt ----- | |
11264 | * rs ----- | |
11265 | * rd ----- | |
11266 | */ | |
7def8a4b | 11267 | static char *NOT_16_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
11268 | { |
11269 | uint64 rt3_value = extract_rt3_9_8_7(instruction); | |
11270 | uint64 rs3_value = extract_rs3_6_5_4(instruction); | |
11271 | ||
3f2aec07 ML |
11272 | const char *rt3 = GPR(decode_gpr_gpr3(rt3_value, info), info); |
11273 | const char *rs3 = GPR(decode_gpr_gpr3(rs3_value, info), info); | |
89a955e8 | 11274 | |
c5231692 | 11275 | return img_format("NOT %s, %s", rt3, rs3); |
89a955e8 AM |
11276 | } |
11277 | ||
11278 | ||
11279 | /* | |
11280 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
11281 | * | |
11282 | * 3 2 1 | |
11283 | * 10987654321098765432109876543210 | |
11284 | * 001000 00010001101 | |
11285 | * rt ----- | |
11286 | * rs ----- | |
11287 | * rd ----- | |
11288 | */ | |
7def8a4b | 11289 | static char *OR_16_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
11290 | { |
11291 | uint64 rt3_value = extract_rt3_9_8_7(instruction); | |
11292 | uint64 rs3_value = extract_rs3_6_5_4(instruction); | |
11293 | ||
3f2aec07 ML |
11294 | const char *rs3 = GPR(decode_gpr_gpr3(rs3_value, info), info); |
11295 | const char *rt3 = GPR(decode_gpr_gpr3(rt3_value, info), info); | |
89a955e8 | 11296 | |
c5231692 | 11297 | return img_format("OR %s, %s", rs3, rt3); |
89a955e8 AM |
11298 | } |
11299 | ||
11300 | ||
11301 | /* | |
11302 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
11303 | * | |
11304 | * 3 2 1 | |
11305 | * 10987654321098765432109876543210 | |
11306 | * 001000 00010001101 | |
11307 | * rt ----- | |
11308 | * rs ----- | |
11309 | * rd ----- | |
11310 | */ | |
7def8a4b | 11311 | static char *OR_32_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
11312 | { |
11313 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 11314 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 11315 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 11316 | |
3f2aec07 ML |
11317 | const char *rd = GPR(rd_value, info); |
11318 | const char *rs = GPR(rs_value, info); | |
11319 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 11320 | |
c5231692 | 11321 | return img_format("OR %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
11322 | } |
11323 | ||
11324 | ||
11325 | /* | |
11326 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
11327 | * | |
11328 | * 3 2 1 | |
11329 | * 10987654321098765432109876543210 | |
11330 | * 001000 00010001101 | |
11331 | * rt ----- | |
11332 | * rs ----- | |
11333 | * rd ----- | |
11334 | */ | |
7def8a4b | 11335 | static char *ORI(uint64 instruction, Dis_info *info) |
89a955e8 AM |
11336 | { |
11337 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 11338 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 11339 | uint64 u_value = extract_u_11_10_9_8_7_6_5_4_3_2_1_0(instruction); |
89a955e8 | 11340 | |
3f2aec07 ML |
11341 | const char *rt = GPR(rt_value, info); |
11342 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 11343 | |
4066c152 | 11344 | return img_format("ORI %s, %s, 0x%" PRIx64, rt, rs, u_value); |
89a955e8 AM |
11345 | } |
11346 | ||
11347 | ||
11348 | /* | |
fc95c241 AM |
11349 | * [DSP] PACKRL.PH rd, rs, rt - Pack a word using the right halfword from one |
11350 | * source register and left halfword from another source register | |
89a955e8 AM |
11351 | * |
11352 | * 3 2 1 | |
11353 | * 10987654321098765432109876543210 | |
11354 | * 001000 00010001101 | |
11355 | * rt ----- | |
11356 | * rs ----- | |
11357 | * rd ----- | |
11358 | */ | |
7def8a4b | 11359 | static char *PACKRL_PH(uint64 instruction, Dis_info *info) |
89a955e8 AM |
11360 | { |
11361 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 11362 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 11363 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 11364 | |
3f2aec07 ML |
11365 | const char *rd = GPR(rd_value, info); |
11366 | const char *rs = GPR(rs_value, info); | |
11367 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 11368 | |
c5231692 | 11369 | return img_format("PACKRL.PH %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
11370 | } |
11371 | ||
11372 | ||
11373 | /* | |
11374 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
11375 | * | |
11376 | * 3 2 1 | |
11377 | * 10987654321098765432109876543210 | |
11378 | * 001000 00010001101 | |
11379 | * rt ----- | |
11380 | * rs ----- | |
11381 | * rd ----- | |
11382 | */ | |
7def8a4b | 11383 | static char *PAUSE(uint64 instruction, Dis_info *info) |
89a955e8 AM |
11384 | { |
11385 | (void)instruction; | |
11386 | ||
7def8a4b | 11387 | return g_strdup("PAUSE "); |
89a955e8 AM |
11388 | } |
11389 | ||
11390 | ||
11391 | /* | |
fc95c241 AM |
11392 | * [DSP] PICK.PH rd, rs, rt - Pick a vector of halfwords based on condition |
11393 | * code bits | |
89a955e8 AM |
11394 | * |
11395 | * 3 2 1 | |
11396 | * 10987654321098765432109876543210 | |
11397 | * 001000 00010001101 | |
11398 | * rt ----- | |
11399 | * rs ----- | |
11400 | * rd ----- | |
11401 | */ | |
7def8a4b | 11402 | static char *PICK_PH(uint64 instruction, Dis_info *info) |
89a955e8 AM |
11403 | { |
11404 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 11405 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 11406 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 11407 | |
3f2aec07 ML |
11408 | const char *rd = GPR(rd_value, info); |
11409 | const char *rs = GPR(rs_value, info); | |
11410 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 11411 | |
c5231692 | 11412 | return img_format("PICK.PH %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
11413 | } |
11414 | ||
11415 | ||
11416 | /* | |
fc95c241 AM |
11417 | * [DSP] PICK.QB rd, rs, rt - Pick a vector of byte values based on condition |
11418 | * code bits | |
89a955e8 AM |
11419 | * |
11420 | * 3 2 1 | |
11421 | * 10987654321098765432109876543210 | |
11422 | * 001000 00010001101 | |
11423 | * rt ----- | |
11424 | * rs ----- | |
11425 | * rd ----- | |
11426 | */ | |
7def8a4b | 11427 | static char *PICK_QB(uint64 instruction, Dis_info *info) |
89a955e8 AM |
11428 | { |
11429 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 11430 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 11431 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 11432 | |
3f2aec07 ML |
11433 | const char *rd = GPR(rd_value, info); |
11434 | const char *rs = GPR(rs_value, info); | |
11435 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 11436 | |
c5231692 | 11437 | return img_format("PICK.QB %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
11438 | } |
11439 | ||
11440 | ||
11441 | /* | |
fc95c241 AM |
11442 | * [DSP] PRECEQ.W.PHL rt, rs - Expand the precision of the left-most element |
11443 | * of a paired halfword | |
89a955e8 AM |
11444 | * |
11445 | * 3 2 1 | |
11446 | * 10987654321098765432109876543210 | |
11447 | * 001000 00010001101 | |
11448 | * rt ----- | |
11449 | * rs ----- | |
11450 | * rd ----- | |
11451 | */ | |
7def8a4b | 11452 | static char *PRECEQ_W_PHL(uint64 instruction, Dis_info *info) |
89a955e8 AM |
11453 | { |
11454 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
11455 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
11456 | ||
3f2aec07 ML |
11457 | const char *rt = GPR(rt_value, info); |
11458 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 11459 | |
c5231692 | 11460 | return img_format("PRECEQ.W.PHL %s, %s", rt, rs); |
89a955e8 AM |
11461 | } |
11462 | ||
11463 | ||
11464 | /* | |
fc95c241 AM |
11465 | * [DSP] PRECEQ.W.PHR rt, rs - Expand the precision of the right-most element |
11466 | * of a paired halfword | |
89a955e8 AM |
11467 | * |
11468 | * 3 2 1 | |
11469 | * 10987654321098765432109876543210 | |
11470 | * 001000 00010001101 | |
11471 | * rt ----- | |
11472 | * rs ----- | |
11473 | * rd ----- | |
11474 | */ | |
7def8a4b | 11475 | static char *PRECEQ_W_PHR(uint64 instruction, Dis_info *info) |
89a955e8 AM |
11476 | { |
11477 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
11478 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
11479 | ||
3f2aec07 ML |
11480 | const char *rt = GPR(rt_value, info); |
11481 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 11482 | |
c5231692 | 11483 | return img_format("PRECEQ.W.PHR %s, %s", rt, rs); |
89a955e8 AM |
11484 | } |
11485 | ||
11486 | ||
11487 | /* | |
fc95c241 AM |
11488 | * [DSP] PRECEQU.PH.QBLA rt, rs - Expand the precision of the two |
11489 | * left-alternate elements of a quad byte vector | |
89a955e8 AM |
11490 | * |
11491 | * 3 2 1 | |
11492 | * 10987654321098765432109876543210 | |
11493 | * 001000 00010001101 | |
11494 | * rt ----- | |
11495 | * rs ----- | |
11496 | * rd ----- | |
11497 | */ | |
7def8a4b | 11498 | static char *PRECEQU_PH_QBLA(uint64 instruction, Dis_info *info) |
89a955e8 AM |
11499 | { |
11500 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
11501 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
11502 | ||
3f2aec07 ML |
11503 | const char *rt = GPR(rt_value, info); |
11504 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 11505 | |
c5231692 | 11506 | return img_format("PRECEQU.PH.QBLA %s, %s", rt, rs); |
89a955e8 AM |
11507 | } |
11508 | ||
11509 | ||
11510 | /* | |
fc95c241 AM |
11511 | * [DSP] PRECEQU.PH.QBL rt, rs - Expand the precision of the two left-most |
11512 | * elements of a quad byte vector | |
89a955e8 AM |
11513 | * |
11514 | * 3 2 1 | |
11515 | * 10987654321098765432109876543210 | |
11516 | * 001000 00010001101 | |
11517 | * rt ----- | |
11518 | * rs ----- | |
11519 | * rd ----- | |
11520 | */ | |
7def8a4b | 11521 | static char *PRECEQU_PH_QBL(uint64 instruction, Dis_info *info) |
89a955e8 AM |
11522 | { |
11523 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
11524 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
11525 | ||
3f2aec07 ML |
11526 | const char *rt = GPR(rt_value, info); |
11527 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 11528 | |
c5231692 | 11529 | return img_format("PRECEQU.PH.QBL %s, %s", rt, rs); |
89a955e8 AM |
11530 | } |
11531 | ||
11532 | ||
11533 | /* | |
fc95c241 AM |
11534 | * [DSP] PRECEQU.PH.QBRA rt, rs - Expand the precision of the two |
11535 | * right-alternate elements of a quad byte vector | |
89a955e8 AM |
11536 | * |
11537 | * 3 2 1 | |
11538 | * 10987654321098765432109876543210 | |
11539 | * 001000 00010001101 | |
11540 | * rt ----- | |
11541 | * rs ----- | |
11542 | * rd ----- | |
11543 | */ | |
7def8a4b | 11544 | static char *PRECEQU_PH_QBRA(uint64 instruction, Dis_info *info) |
89a955e8 AM |
11545 | { |
11546 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
11547 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
11548 | ||
3f2aec07 ML |
11549 | const char *rt = GPR(rt_value, info); |
11550 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 11551 | |
c5231692 | 11552 | return img_format("PRECEQU.PH.QBRA %s, %s", rt, rs); |
89a955e8 AM |
11553 | } |
11554 | ||
11555 | ||
11556 | /* | |
fc95c241 AM |
11557 | * [DSP] PRECEQU.PH.QBR rt, rs - Expand the precision of the two right-most |
11558 | * elements of a quad byte vector | |
89a955e8 AM |
11559 | * |
11560 | * 3 2 1 | |
11561 | * 10987654321098765432109876543210 | |
11562 | * 001000 00010001101 | |
11563 | * rt ----- | |
11564 | * rs ----- | |
11565 | * rd ----- | |
11566 | */ | |
7def8a4b | 11567 | static char *PRECEQU_PH_QBR(uint64 instruction, Dis_info *info) |
89a955e8 AM |
11568 | { |
11569 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
11570 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
11571 | ||
3f2aec07 ML |
11572 | const char *rt = GPR(rt_value, info); |
11573 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 11574 | |
c5231692 | 11575 | return img_format("PRECEQU.PH.QBR %s, %s", rt, rs); |
89a955e8 AM |
11576 | } |
11577 | ||
11578 | ||
11579 | /* | |
fc95c241 AM |
11580 | * [DSP] PRECEU.PH.QBLA rt, rs - Expand the precision of the two |
11581 | * left-alternate elements of a quad byte vector to four unsigned | |
11582 | * halfwords | |
89a955e8 AM |
11583 | * |
11584 | * 3 2 1 | |
11585 | * 10987654321098765432109876543210 | |
11586 | * 001000 00010001101 | |
11587 | * rt ----- | |
11588 | * rs ----- | |
11589 | * rd ----- | |
11590 | */ | |
7def8a4b | 11591 | static char *PRECEU_PH_QBLA(uint64 instruction, Dis_info *info) |
89a955e8 AM |
11592 | { |
11593 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
11594 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
11595 | ||
3f2aec07 ML |
11596 | const char *rt = GPR(rt_value, info); |
11597 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 11598 | |
c5231692 | 11599 | return img_format("PRECEU.PH.QBLA %s, %s", rt, rs); |
89a955e8 AM |
11600 | } |
11601 | ||
11602 | ||
11603 | /* | |
fc95c241 AM |
11604 | * [DSP] PRECEU.PH.QBL rt, rs - Expand the precision of the two left-most |
11605 | * elements of a quad byte vector to form unsigned halfwords | |
89a955e8 AM |
11606 | * |
11607 | * 3 2 1 | |
11608 | * 10987654321098765432109876543210 | |
11609 | * 001000 00010001101 | |
11610 | * rt ----- | |
11611 | * rs ----- | |
11612 | * rd ----- | |
11613 | */ | |
7def8a4b | 11614 | static char *PRECEU_PH_QBL(uint64 instruction, Dis_info *info) |
89a955e8 AM |
11615 | { |
11616 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
11617 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
11618 | ||
3f2aec07 ML |
11619 | const char *rt = GPR(rt_value, info); |
11620 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 11621 | |
c5231692 | 11622 | return img_format("PRECEU.PH.QBL %s, %s", rt, rs); |
89a955e8 AM |
11623 | } |
11624 | ||
11625 | ||
11626 | /* | |
fc95c241 AM |
11627 | * [DSP] PRECEU.PH.QBRA rt, rs - Expand the precision of the two |
11628 | * right-alternate elements of a quad byte vector to form four | |
11629 | * unsigned halfwords | |
89a955e8 AM |
11630 | * |
11631 | * 3 2 1 | |
11632 | * 10987654321098765432109876543210 | |
11633 | * 001000 00010001101 | |
11634 | * rt ----- | |
11635 | * rs ----- | |
11636 | * rd ----- | |
11637 | */ | |
7def8a4b | 11638 | static char *PRECEU_PH_QBRA(uint64 instruction, Dis_info *info) |
89a955e8 AM |
11639 | { |
11640 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
11641 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
11642 | ||
3f2aec07 ML |
11643 | const char *rt = GPR(rt_value, info); |
11644 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 11645 | |
c5231692 | 11646 | return img_format("PRECEU.PH.QBRA %s, %s", rt, rs); |
89a955e8 AM |
11647 | } |
11648 | ||
11649 | ||
11650 | /* | |
fc95c241 AM |
11651 | * [DSP] PRECEU.PH.QBR rt, rs - Expand the precision of the two right-most |
11652 | * elements of a quad byte vector to form unsigned halfwords | |
89a955e8 AM |
11653 | * |
11654 | * 3 2 1 | |
11655 | * 10987654321098765432109876543210 | |
11656 | * 001000 00010001101 | |
11657 | * rt ----- | |
11658 | * rs ----- | |
11659 | * rd ----- | |
11660 | */ | |
7def8a4b | 11661 | static char *PRECEU_PH_QBR(uint64 instruction, Dis_info *info) |
89a955e8 AM |
11662 | { |
11663 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
11664 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
11665 | ||
3f2aec07 ML |
11666 | const char *rt = GPR(rt_value, info); |
11667 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 11668 | |
c5231692 | 11669 | return img_format("PRECEU.PH.QBR %s, %s", rt, rs); |
89a955e8 AM |
11670 | } |
11671 | ||
11672 | ||
11673 | /* | |
5c65eed6 AM |
11674 | * [DSP] PRECR.QB.PH rd, rs, rt - Reduce the precision of four integer |
11675 | * halfwords to four bytes | |
89a955e8 AM |
11676 | * |
11677 | * 3 2 1 | |
11678 | * 10987654321098765432109876543210 | |
5c65eed6 | 11679 | * 001000 x0001101101 |
89a955e8 AM |
11680 | * rt ----- |
11681 | * rs ----- | |
11682 | * rd ----- | |
11683 | */ | |
7def8a4b | 11684 | static char *PRECR_QB_PH(uint64 instruction, Dis_info *info) |
89a955e8 AM |
11685 | { |
11686 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 11687 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 11688 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 11689 | |
3f2aec07 ML |
11690 | const char *rd = GPR(rd_value, info); |
11691 | const char *rs = GPR(rs_value, info); | |
11692 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 11693 | |
c5231692 | 11694 | return img_format("PRECR.QB.PH %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
11695 | } |
11696 | ||
11697 | ||
11698 | /* | |
5c65eed6 AM |
11699 | * [DSP] PRECR_SRA.PH.W rt, rs, sa - Reduce the precision of two integer |
11700 | * words to halfwords after a right shift | |
89a955e8 AM |
11701 | * |
11702 | * 3 2 1 | |
11703 | * 10987654321098765432109876543210 | |
11704 | * 001000 x1110000101 | |
11705 | * rt ----- | |
11706 | * rs ----- | |
11707 | * rd ----- | |
11708 | */ | |
7def8a4b | 11709 | static char *PRECR_SRA_PH_W(uint64 instruction, Dis_info *info) |
89a955e8 AM |
11710 | { |
11711 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 11712 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 11713 | uint64 sa_value = extract_sa_15_14_13_12_11(instruction); |
89a955e8 | 11714 | |
3f2aec07 ML |
11715 | const char *rt = GPR(rt_value, info); |
11716 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 11717 | |
4066c152 | 11718 | return img_format("PRECR_SRA.PH.W %s, %s, 0x%" PRIx64, rt, rs, sa_value); |
89a955e8 AM |
11719 | } |
11720 | ||
11721 | ||
11722 | /* | |
5c65eed6 AM |
11723 | * [DSP] PRECR_SRA_R.PH.W rt, rs, sa - Reduce the precision of two integer |
11724 | * words to halfwords after a right shift with rounding | |
89a955e8 AM |
11725 | * |
11726 | * 3 2 1 | |
11727 | * 10987654321098765432109876543210 | |
11728 | * 001000 x1110000101 | |
11729 | * rt ----- | |
11730 | * rs ----- | |
11731 | * rd ----- | |
11732 | */ | |
7def8a4b | 11733 | static char *PRECR_SRA_R_PH_W(uint64 instruction, Dis_info *info) |
89a955e8 AM |
11734 | { |
11735 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 11736 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 11737 | uint64 sa_value = extract_sa_15_14_13_12_11(instruction); |
89a955e8 | 11738 | |
3f2aec07 ML |
11739 | const char *rt = GPR(rt_value, info); |
11740 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 11741 | |
4066c152 | 11742 | return img_format("PRECR_SRA_R.PH.W %s, %s, 0x%" PRIx64, rt, rs, sa_value); |
89a955e8 AM |
11743 | } |
11744 | ||
11745 | ||
11746 | /* | |
5c65eed6 AM |
11747 | * [DSP] PRECRQ.PH.W rd, rs, rt - Reduce the precision of fractional |
11748 | * words to fractional halfwords | |
89a955e8 AM |
11749 | * |
11750 | * 3 2 1 | |
11751 | * 10987654321098765432109876543210 | |
11752 | * 001000 x1110000101 | |
11753 | * rt ----- | |
11754 | * rs ----- | |
11755 | * rd ----- | |
11756 | */ | |
7def8a4b | 11757 | static char *PRECRQ_PH_W(uint64 instruction, Dis_info *info) |
89a955e8 AM |
11758 | { |
11759 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 11760 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 11761 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 11762 | |
3f2aec07 ML |
11763 | const char *rd = GPR(rd_value, info); |
11764 | const char *rs = GPR(rs_value, info); | |
11765 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 11766 | |
c5231692 | 11767 | return img_format("PRECRQ.PH.W %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
11768 | } |
11769 | ||
11770 | ||
11771 | /* | |
5c65eed6 AM |
11772 | * [DSP] PRECRQ.QB.PH rd, rs, rt - Reduce the precision of four fractional |
11773 | * halfwords to four bytes | |
89a955e8 AM |
11774 | * |
11775 | * 3 2 1 | |
11776 | * 10987654321098765432109876543210 | |
5c65eed6 | 11777 | * 001000 x0010101101 |
89a955e8 AM |
11778 | * rt ----- |
11779 | * rs ----- | |
11780 | * rd ----- | |
11781 | */ | |
7def8a4b | 11782 | static char *PRECRQ_QB_PH(uint64 instruction, Dis_info *info) |
89a955e8 AM |
11783 | { |
11784 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 11785 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 11786 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 11787 | |
3f2aec07 ML |
11788 | const char *rd = GPR(rd_value, info); |
11789 | const char *rs = GPR(rs_value, info); | |
11790 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 11791 | |
c5231692 | 11792 | return img_format("PRECRQ.QB.PH %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
11793 | } |
11794 | ||
11795 | ||
11796 | /* | |
5c65eed6 AM |
11797 | * [DSP] PRECRQ_RS.PH.W rd, rs, rt - Reduce the precision of fractional |
11798 | * words to halfwords with rounding and saturation | |
89a955e8 AM |
11799 | * |
11800 | * 3 2 1 | |
11801 | * 10987654321098765432109876543210 | |
11802 | * 001000 x1110000101 | |
11803 | * rt ----- | |
11804 | * rs ----- | |
11805 | * rd ----- | |
11806 | */ | |
7def8a4b | 11807 | static char *PRECRQ_RS_PH_W(uint64 instruction, Dis_info *info) |
89a955e8 AM |
11808 | { |
11809 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 11810 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 11811 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 11812 | |
3f2aec07 ML |
11813 | const char *rd = GPR(rd_value, info); |
11814 | const char *rs = GPR(rs_value, info); | |
11815 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 11816 | |
c5231692 | 11817 | return img_format("PRECRQ_RS.PH.W %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
11818 | } |
11819 | ||
11820 | ||
11821 | /* | |
5c65eed6 AM |
11822 | * [DSP] PRECRQU_S.QB.PH rd, rs, rt - Reduce the precision of fractional |
11823 | * halfwords to unsigned bytes with saturation | |
89a955e8 AM |
11824 | * |
11825 | * 3 2 1 | |
11826 | * 10987654321098765432109876543210 | |
11827 | * 001000 x1110000101 | |
11828 | * rt ----- | |
11829 | * rs ----- | |
11830 | * rd ----- | |
11831 | */ | |
7def8a4b | 11832 | static char *PRECRQU_S_QB_PH(uint64 instruction, Dis_info *info) |
89a955e8 AM |
11833 | { |
11834 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 11835 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 11836 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 11837 | |
3f2aec07 ML |
11838 | const char *rd = GPR(rd_value, info); |
11839 | const char *rs = GPR(rs_value, info); | |
11840 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 11841 | |
c5231692 | 11842 | return img_format("PRECRQU_S.QB.PH %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
11843 | } |
11844 | ||
11845 | ||
11846 | /* | |
11847 | * | |
11848 | * | |
11849 | * 3 2 1 | |
11850 | * 10987654321098765432109876543210 | |
11851 | * 001000 x1110000101 | |
11852 | * rt ----- | |
11853 | * rs ----- | |
11854 | * rd ----- | |
11855 | */ | |
7def8a4b | 11856 | static char *PREF_S9_(uint64 instruction, Dis_info *info) |
89a955e8 | 11857 | { |
89a955e8 AM |
11858 | uint64 hint_value = extract_hint_25_24_23_22_21(instruction); |
11859 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
d3605cc0 | 11860 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
89a955e8 | 11861 | |
3f2aec07 | 11862 | const char *rs = GPR(rs_value, info); |
89a955e8 | 11863 | |
04849c94 | 11864 | return img_format("PREF 0x%" PRIx64 ", %" PRId64 "(%s)", |
4066c152 | 11865 | hint_value, s_value, rs); |
89a955e8 AM |
11866 | } |
11867 | ||
11868 | ||
11869 | /* | |
11870 | * | |
11871 | * | |
11872 | * 3 2 1 | |
11873 | * 10987654321098765432109876543210 | |
11874 | * 001000 x1110000101 | |
11875 | * rt ----- | |
11876 | * rs ----- | |
11877 | * rd ----- | |
11878 | */ | |
7def8a4b | 11879 | static char *PREF_U12_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
11880 | { |
11881 | uint64 hint_value = extract_hint_25_24_23_22_21(instruction); | |
89a955e8 | 11882 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 11883 | uint64 u_value = extract_u_11_10_9_8_7_6_5_4_3_2_1_0(instruction); |
89a955e8 | 11884 | |
3f2aec07 | 11885 | const char *rs = GPR(rs_value, info); |
89a955e8 | 11886 | |
4066c152 ML |
11887 | return img_format("PREF 0x%" PRIx64 ", 0x%" PRIx64 "(%s)", |
11888 | hint_value, u_value, rs); | |
89a955e8 AM |
11889 | } |
11890 | ||
11891 | ||
11892 | /* | |
11893 | * | |
11894 | * | |
11895 | * 3 2 1 | |
11896 | * 10987654321098765432109876543210 | |
11897 | * 001000 x1110000101 | |
11898 | * rt ----- | |
11899 | * rs ----- | |
11900 | * rd ----- | |
11901 | */ | |
7def8a4b | 11902 | static char *PREFE(uint64 instruction, Dis_info *info) |
89a955e8 | 11903 | { |
89a955e8 AM |
11904 | uint64 hint_value = extract_hint_25_24_23_22_21(instruction); |
11905 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
75199b40 | 11906 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
89a955e8 | 11907 | |
3f2aec07 | 11908 | const char *rs = GPR(rs_value, info); |
89a955e8 | 11909 | |
04849c94 PMD |
11910 | return img_format("PREFE 0x%" PRIx64 ", %" PRId64 "(%s)", |
11911 | hint_value, s_value, rs); | |
89a955e8 AM |
11912 | } |
11913 | ||
11914 | ||
11915 | /* | |
5c65eed6 | 11916 | * [DSP] PREPEND rt, rs, sa - Right shift and prepend bits to the MSB |
89a955e8 AM |
11917 | * |
11918 | * 3 2 1 | |
11919 | * 10987654321098765432109876543210 | |
11920 | * 001000 x1110000101 | |
11921 | * rt ----- | |
11922 | * rs ----- | |
11923 | * rd ----- | |
11924 | */ | |
7def8a4b | 11925 | static char *PREPEND(uint64 instruction, Dis_info *info) |
89a955e8 AM |
11926 | { |
11927 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 11928 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 11929 | uint64 sa_value = extract_sa_15_14_13_12_11(instruction); |
89a955e8 | 11930 | |
3f2aec07 ML |
11931 | const char *rt = GPR(rt_value, info); |
11932 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 11933 | |
4066c152 | 11934 | return img_format("PREPEND %s, %s, 0x%" PRIx64, rt, rs, sa_value); |
89a955e8 AM |
11935 | } |
11936 | ||
11937 | ||
11938 | /* | |
5c65eed6 | 11939 | * [DSP] RADDU.W.QB rt, rs - Unsigned reduction add of vector quad bytes |
89a955e8 AM |
11940 | * |
11941 | * 3 2 1 | |
11942 | * 10987654321098765432109876543210 | |
5c65eed6 | 11943 | * 001000 1111000100111111 |
89a955e8 AM |
11944 | * rt ----- |
11945 | * rs ----- | |
89a955e8 | 11946 | */ |
7def8a4b | 11947 | static char *RADDU_W_QB(uint64 instruction, Dis_info *info) |
89a955e8 AM |
11948 | { |
11949 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
11950 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
11951 | ||
3f2aec07 ML |
11952 | const char *rt = GPR(rt_value, info); |
11953 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 11954 | |
c5231692 | 11955 | return img_format("RADDU.W.QB %s, %s", rt, rs); |
89a955e8 AM |
11956 | } |
11957 | ||
11958 | ||
11959 | /* | |
5c65eed6 | 11960 | * [DSP] RDDSP rt, mask - Read DSPControl register fields to a GPR |
89a955e8 AM |
11961 | * |
11962 | * 3 2 1 | |
11963 | * 10987654321098765432109876543210 | |
5c65eed6 | 11964 | * 001000 00011001111111 |
89a955e8 | 11965 | * rt ----- |
5c65eed6 | 11966 | * mask ------- |
89a955e8 | 11967 | */ |
7def8a4b | 11968 | static char *RDDSP(uint64 instruction, Dis_info *info) |
89a955e8 AM |
11969 | { |
11970 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
11971 | uint64 mask_value = extract_mask_20_19_18_17_16_15_14(instruction); | |
11972 | ||
3f2aec07 | 11973 | const char *rt = GPR(rt_value, info); |
89a955e8 | 11974 | |
4066c152 | 11975 | return img_format("RDDSP %s, 0x%" PRIx64, rt, mask_value); |
89a955e8 AM |
11976 | } |
11977 | ||
11978 | ||
11979 | /* | |
11980 | * | |
11981 | * | |
11982 | * 3 2 1 | |
11983 | * 10987654321098765432109876543210 | |
11984 | * 001000 x1110000101 | |
11985 | * rt ----- | |
11986 | * rs ----- | |
11987 | * rd ----- | |
11988 | */ | |
7def8a4b | 11989 | static char *RDHWR(uint64 instruction, Dis_info *info) |
89a955e8 AM |
11990 | { |
11991 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
11992 | uint64 hs_value = extract_hs_20_19_18_17_16(instruction); | |
11993 | uint64 sel_value = extract_sel_13_12_11(instruction); | |
11994 | ||
3f2aec07 | 11995 | const char *rt = GPR(rt_value, info); |
89a955e8 | 11996 | |
043dc73c ML |
11997 | return img_format("RDHWR %s, CP%" PRIu64 ", 0x%" PRIx64, |
11998 | rt, hs_value, sel_value); | |
89a955e8 AM |
11999 | } |
12000 | ||
12001 | ||
12002 | /* | |
12003 | * | |
12004 | * | |
12005 | * 3 2 1 | |
12006 | * 10987654321098765432109876543210 | |
12007 | * 001000 x1110000101 | |
12008 | * rt ----- | |
12009 | * rs ----- | |
12010 | * rd ----- | |
12011 | */ | |
7def8a4b | 12012 | static char *RDPGPR(uint64 instruction, Dis_info *info) |
89a955e8 AM |
12013 | { |
12014 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
12015 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
12016 | ||
3f2aec07 ML |
12017 | const char *rt = GPR(rt_value, info); |
12018 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 12019 | |
c5231692 | 12020 | return img_format("RDPGPR %s, %s", rt, rs); |
89a955e8 AM |
12021 | } |
12022 | ||
12023 | ||
12024 | /* | |
12025 | * | |
12026 | * | |
12027 | * 3 2 1 | |
12028 | * 10987654321098765432109876543210 | |
12029 | * 001000 x1110000101 | |
12030 | * rt ----- | |
12031 | * rs ----- | |
12032 | * rd ----- | |
12033 | */ | |
7def8a4b | 12034 | static char *RECIP_D(uint64 instruction, Dis_info *info) |
89a955e8 | 12035 | { |
17ce2f00 | 12036 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 12037 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 | 12038 | |
3f2aec07 ML |
12039 | const char *ft = FPR(ft_value, info); |
12040 | const char *fs = FPR(fs_value, info); | |
89a955e8 | 12041 | |
c5231692 | 12042 | return img_format("RECIP.D %s, %s", ft, fs); |
89a955e8 AM |
12043 | } |
12044 | ||
12045 | ||
12046 | /* | |
12047 | * | |
12048 | * | |
12049 | * 3 2 1 | |
12050 | * 10987654321098765432109876543210 | |
12051 | * 001000 x1110000101 | |
12052 | * rt ----- | |
12053 | * rs ----- | |
12054 | * rd ----- | |
12055 | */ | |
7def8a4b | 12056 | static char *RECIP_S(uint64 instruction, Dis_info *info) |
89a955e8 | 12057 | { |
17ce2f00 | 12058 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 12059 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 | 12060 | |
3f2aec07 ML |
12061 | const char *ft = FPR(ft_value, info); |
12062 | const char *fs = FPR(fs_value, info); | |
89a955e8 | 12063 | |
c5231692 | 12064 | return img_format("RECIP.S %s, %s", ft, fs); |
89a955e8 AM |
12065 | } |
12066 | ||
12067 | ||
12068 | /* | |
5c65eed6 AM |
12069 | * [DSP] REPL.PH rd, s - Replicate immediate integer into all vector element |
12070 | * positions | |
89a955e8 AM |
12071 | * |
12072 | * 3 2 1 | |
12073 | * 10987654321098765432109876543210 | |
5c65eed6 | 12074 | * 001000 x0000111101 |
89a955e8 | 12075 | * rt ----- |
5c65eed6 | 12076 | * s ---------- |
89a955e8 | 12077 | */ |
7def8a4b | 12078 | static char *REPL_PH(uint64 instruction, Dis_info *info) |
89a955e8 AM |
12079 | { |
12080 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
d3605cc0 | 12081 | int64 s_value = extract_s__se9_20_19_18_17_16_15_14_13_12_11(instruction); |
89a955e8 | 12082 | |
3f2aec07 | 12083 | const char *rt = GPR(rt_value, info); |
89a955e8 | 12084 | |
04849c94 | 12085 | return img_format("REPL.PH %s, %" PRId64, rt, s_value); |
89a955e8 AM |
12086 | } |
12087 | ||
12088 | ||
12089 | /* | |
5c65eed6 AM |
12090 | * [DSP] REPL.QB rd, u - Replicate immediate integer into all vector element |
12091 | * positions | |
89a955e8 AM |
12092 | * |
12093 | * 3 2 1 | |
12094 | * 10987654321098765432109876543210 | |
5c65eed6 | 12095 | * 001000 x010111111111 |
89a955e8 | 12096 | * rt ----- |
5c65eed6 | 12097 | * u -------- |
89a955e8 | 12098 | */ |
7def8a4b | 12099 | static char *REPL_QB(uint64 instruction, Dis_info *info) |
89a955e8 AM |
12100 | { |
12101 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
12102 | uint64 u_value = extract_u_20_19_18_17_16_15_14_13(instruction); | |
12103 | ||
3f2aec07 | 12104 | const char *rt = GPR(rt_value, info); |
89a955e8 | 12105 | |
4066c152 | 12106 | return img_format("REPL.QB %s, 0x%" PRIx64, rt, u_value); |
89a955e8 AM |
12107 | } |
12108 | ||
12109 | ||
12110 | /* | |
5c65eed6 AM |
12111 | * [DSP] REPLV.PH rt, rs - Replicate a halfword into all vector element |
12112 | * positions | |
89a955e8 AM |
12113 | * |
12114 | * 3 2 1 | |
12115 | * 10987654321098765432109876543210 | |
5c65eed6 | 12116 | * 001000 0000001100111111 |
89a955e8 AM |
12117 | * rt ----- |
12118 | * rs ----- | |
89a955e8 | 12119 | */ |
7def8a4b | 12120 | static char *REPLV_PH(uint64 instruction, Dis_info *info) |
89a955e8 AM |
12121 | { |
12122 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
12123 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
12124 | ||
3f2aec07 ML |
12125 | const char *rt = GPR(rt_value, info); |
12126 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 12127 | |
c5231692 | 12128 | return img_format("REPLV.PH %s, %s", rt, rs); |
89a955e8 AM |
12129 | } |
12130 | ||
12131 | ||
12132 | /* | |
5c65eed6 | 12133 | * [DSP] REPLV.QB rt, rs - Replicate byte into all vector element positions |
89a955e8 AM |
12134 | * |
12135 | * 3 2 1 | |
12136 | * 10987654321098765432109876543210 | |
5c65eed6 | 12137 | * 001000 0001001100111111 |
89a955e8 AM |
12138 | * rt ----- |
12139 | * rs ----- | |
89a955e8 | 12140 | */ |
7def8a4b | 12141 | static char *REPLV_QB(uint64 instruction, Dis_info *info) |
89a955e8 AM |
12142 | { |
12143 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
12144 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
12145 | ||
3f2aec07 ML |
12146 | const char *rt = GPR(rt_value, info); |
12147 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 12148 | |
c5231692 | 12149 | return img_format("REPLV.QB %s, %s", rt, rs); |
89a955e8 AM |
12150 | } |
12151 | ||
12152 | ||
12153 | /* | |
12154 | * | |
12155 | * | |
12156 | * 3 2 1 | |
12157 | * 10987654321098765432109876543210 | |
12158 | * 001000 x1110000101 | |
12159 | * rt ----- | |
12160 | * rs ----- | |
12161 | * rd ----- | |
12162 | */ | |
7def8a4b | 12163 | static char *RESTORE_32_(uint64 instruction, Dis_info *info) |
89a955e8 | 12164 | { |
89a955e8 | 12165 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); |
75199b40 | 12166 | uint64 count_value = extract_count_19_18_17_16(instruction); |
11b9732a | 12167 | uint64 u_value = extract_u_11_10_9_8_7_6_5_4_3__s3(instruction); |
89a955e8 AM |
12168 | uint64 gp_value = extract_gp_2(instruction); |
12169 | ||
22e7b52a | 12170 | g_autofree char *save_restore_str = save_restore_list( |
3f2aec07 | 12171 | rt_value, count_value, gp_value, info); |
22e7b52a | 12172 | return img_format("RESTORE 0x%" PRIx64 "%s", u_value, save_restore_str); |
89a955e8 AM |
12173 | } |
12174 | ||
12175 | ||
12176 | /* | |
12177 | * | |
12178 | * | |
12179 | * 3 2 1 | |
12180 | * 10987654321098765432109876543210 | |
12181 | * 001000 x1110000101 | |
12182 | * rt ----- | |
12183 | * rs ----- | |
12184 | * rd ----- | |
12185 | */ | |
7def8a4b | 12186 | static char *RESTORE_JRC_16_(uint64 instruction, Dis_info *info) |
89a955e8 | 12187 | { |
89a955e8 | 12188 | uint64 rt1_value = extract_rtl_11(instruction); |
11b9732a | 12189 | uint64 u_value = extract_u_7_6_5_4__s4(instruction); |
75199b40 | 12190 | uint64 count_value = extract_count_3_2_1_0(instruction); |
89a955e8 | 12191 | |
22e7b52a | 12192 | g_autofree char *save_restore_str = save_restore_list( |
3f2aec07 | 12193 | encode_rt1_from_rt(rt1_value), count_value, 0, info); |
22e7b52a | 12194 | return img_format("RESTORE.JRC 0x%" PRIx64 "%s", u_value, save_restore_str); |
89a955e8 AM |
12195 | } |
12196 | ||
12197 | ||
12198 | /* | |
12199 | * | |
12200 | * | |
12201 | * 3 2 1 | |
12202 | * 10987654321098765432109876543210 | |
12203 | * 001000 x1110000101 | |
12204 | * rt ----- | |
12205 | * rs ----- | |
12206 | * rd ----- | |
12207 | */ | |
7def8a4b | 12208 | static char *RESTORE_JRC_32_(uint64 instruction, Dis_info *info) |
89a955e8 | 12209 | { |
89a955e8 | 12210 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); |
86b5f803 | 12211 | uint64 count_value = extract_count_19_18_17_16(instruction); |
11b9732a | 12212 | uint64 u_value = extract_u_11_10_9_8_7_6_5_4_3__s3(instruction); |
89a955e8 AM |
12213 | uint64 gp_value = extract_gp_2(instruction); |
12214 | ||
22e7b52a | 12215 | g_autofree char *save_restore_str = save_restore_list( |
3f2aec07 | 12216 | rt_value, count_value, gp_value, info); |
4066c152 | 12217 | return img_format("RESTORE.JRC 0x%" PRIx64 "%s", u_value, |
22e7b52a | 12218 | save_restore_str); |
89a955e8 AM |
12219 | } |
12220 | ||
12221 | ||
12222 | /* | |
12223 | * | |
12224 | * | |
12225 | * 3 2 1 | |
12226 | * 10987654321098765432109876543210 | |
12227 | * 001000 x1110000101 | |
12228 | * rt ----- | |
12229 | * rs ----- | |
12230 | * rd ----- | |
12231 | */ | |
7def8a4b | 12232 | static char *RESTOREF(uint64 instruction, Dis_info *info) |
89a955e8 AM |
12233 | { |
12234 | uint64 count_value = extract_count_19_18_17_16(instruction); | |
11b9732a | 12235 | uint64 u_value = extract_u_11_10_9_8_7_6_5_4_3__s3(instruction); |
89a955e8 | 12236 | |
89a955e8 | 12237 | |
4066c152 | 12238 | return img_format("RESTOREF 0x%" PRIx64 ", %s", u_value, count_value); |
89a955e8 AM |
12239 | } |
12240 | ||
12241 | ||
12242 | /* | |
12243 | * | |
12244 | * | |
12245 | * 3 2 1 | |
12246 | * 10987654321098765432109876543210 | |
12247 | * 001000 x1110000101 | |
12248 | * rt ----- | |
12249 | * rs ----- | |
12250 | * rd ----- | |
12251 | */ | |
7def8a4b | 12252 | static char *RINT_D(uint64 instruction, Dis_info *info) |
89a955e8 | 12253 | { |
17ce2f00 | 12254 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 12255 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 | 12256 | |
3f2aec07 ML |
12257 | const char *ft = FPR(ft_value, info); |
12258 | const char *fs = FPR(fs_value, info); | |
89a955e8 | 12259 | |
c5231692 | 12260 | return img_format("RINT.D %s, %s", ft, fs); |
89a955e8 AM |
12261 | } |
12262 | ||
12263 | ||
12264 | /* | |
12265 | * | |
12266 | * | |
12267 | * 3 2 1 | |
12268 | * 10987654321098765432109876543210 | |
12269 | * 001000 x1110000101 | |
12270 | * rt ----- | |
12271 | * rs ----- | |
12272 | * rd ----- | |
12273 | */ | |
7def8a4b | 12274 | static char *RINT_S(uint64 instruction, Dis_info *info) |
89a955e8 | 12275 | { |
17ce2f00 | 12276 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 12277 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 | 12278 | |
3f2aec07 ML |
12279 | const char *ft = FPR(ft_value, info); |
12280 | const char *fs = FPR(fs_value, info); | |
89a955e8 | 12281 | |
c5231692 | 12282 | return img_format("RINT.S %s, %s", ft, fs); |
89a955e8 AM |
12283 | } |
12284 | ||
12285 | ||
12286 | /* | |
12287 | * | |
12288 | * | |
12289 | * 3 2 1 | |
12290 | * 10987654321098765432109876543210 | |
12291 | * 001000 x1110000101 | |
12292 | * rt ----- | |
12293 | * rs ----- | |
12294 | * rd ----- | |
12295 | */ | |
7def8a4b | 12296 | static char *ROTR(uint64 instruction, Dis_info *info) |
89a955e8 AM |
12297 | { |
12298 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 12299 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 12300 | uint64 shift_value = extract_shift_4_3_2_1_0(instruction); |
89a955e8 | 12301 | |
3f2aec07 ML |
12302 | const char *rt = GPR(rt_value, info); |
12303 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 12304 | |
4066c152 | 12305 | return img_format("ROTR %s, %s, 0x%" PRIx64, rt, rs, shift_value); |
89a955e8 AM |
12306 | } |
12307 | ||
12308 | ||
12309 | /* | |
12310 | * | |
12311 | * | |
12312 | * 3 2 1 | |
12313 | * 10987654321098765432109876543210 | |
12314 | * 001000 x1110000101 | |
12315 | * rt ----- | |
12316 | * rs ----- | |
12317 | * rd ----- | |
12318 | */ | |
7def8a4b | 12319 | static char *ROTRV(uint64 instruction, Dis_info *info) |
89a955e8 AM |
12320 | { |
12321 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 12322 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 12323 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 12324 | |
3f2aec07 ML |
12325 | const char *rd = GPR(rd_value, info); |
12326 | const char *rs = GPR(rs_value, info); | |
12327 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 12328 | |
c5231692 | 12329 | return img_format("ROTRV %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
12330 | } |
12331 | ||
12332 | ||
12333 | /* | |
12334 | * | |
12335 | * | |
12336 | * 3 2 1 | |
12337 | * 10987654321098765432109876543210 | |
12338 | * 001000 x1110000101 | |
12339 | * rt ----- | |
12340 | * rs ----- | |
12341 | * rd ----- | |
12342 | */ | |
7def8a4b | 12343 | static char *ROTX(uint64 instruction, Dis_info *info) |
89a955e8 AM |
12344 | { |
12345 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
86b5f803 | 12346 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
11b9732a | 12347 | uint64 shiftx_value = extract_shiftx_10_9_8_7__s1(instruction); |
89a955e8 | 12348 | uint64 stripe_value = extract_stripe_6(instruction); |
86b5f803 | 12349 | uint64 shift_value = extract_shift_4_3_2_1_0(instruction); |
89a955e8 | 12350 | |
3f2aec07 ML |
12351 | const char *rt = GPR(rt_value, info); |
12352 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 12353 | |
4066c152 ML |
12354 | return img_format("ROTX %s, %s, 0x%" PRIx64 ", 0x%" PRIx64 ", 0x%" PRIx64, |
12355 | rt, rs, shift_value, shiftx_value, stripe_value); | |
89a955e8 AM |
12356 | } |
12357 | ||
12358 | ||
12359 | /* | |
12360 | * | |
12361 | * | |
12362 | * 3 2 1 | |
12363 | * 10987654321098765432109876543210 | |
12364 | * 001000 x1110000101 | |
12365 | * rt ----- | |
12366 | * rs ----- | |
12367 | * rd ----- | |
12368 | */ | |
7def8a4b | 12369 | static char *ROUND_L_D(uint64 instruction, Dis_info *info) |
89a955e8 | 12370 | { |
17ce2f00 | 12371 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 12372 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 | 12373 | |
3f2aec07 ML |
12374 | const char *ft = FPR(ft_value, info); |
12375 | const char *fs = FPR(fs_value, info); | |
89a955e8 | 12376 | |
c5231692 | 12377 | return img_format("ROUND.L.D %s, %s", ft, fs); |
89a955e8 AM |
12378 | } |
12379 | ||
12380 | ||
12381 | /* | |
12382 | * | |
12383 | * | |
12384 | * 3 2 1 | |
12385 | * 10987654321098765432109876543210 | |
12386 | * 001000 x1110000101 | |
12387 | * rt ----- | |
12388 | * rs ----- | |
12389 | * rd ----- | |
12390 | */ | |
7def8a4b | 12391 | static char *ROUND_L_S(uint64 instruction, Dis_info *info) |
89a955e8 | 12392 | { |
17ce2f00 | 12393 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 12394 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 | 12395 | |
3f2aec07 ML |
12396 | const char *ft = FPR(ft_value, info); |
12397 | const char *fs = FPR(fs_value, info); | |
89a955e8 | 12398 | |
c5231692 | 12399 | return img_format("ROUND.L.S %s, %s", ft, fs); |
89a955e8 AM |
12400 | } |
12401 | ||
12402 | ||
12403 | /* | |
12404 | * | |
12405 | * | |
12406 | * 3 2 1 | |
12407 | * 10987654321098765432109876543210 | |
12408 | * 001000 x1110000101 | |
12409 | * rt ----- | |
12410 | * rs ----- | |
12411 | * rd ----- | |
12412 | */ | |
7def8a4b | 12413 | static char *ROUND_W_D(uint64 instruction, Dis_info *info) |
89a955e8 | 12414 | { |
17ce2f00 | 12415 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 12416 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 | 12417 | |
3f2aec07 ML |
12418 | const char *ft = FPR(ft_value, info); |
12419 | const char *fs = FPR(fs_value, info); | |
89a955e8 | 12420 | |
c5231692 | 12421 | return img_format("ROUND.W.D %s, %s", ft, fs); |
89a955e8 AM |
12422 | } |
12423 | ||
12424 | ||
12425 | /* | |
12426 | * | |
12427 | * | |
12428 | * 3 2 1 | |
12429 | * 10987654321098765432109876543210 | |
12430 | * 001000 x1110000101 | |
12431 | * rt ----- | |
12432 | * rs ----- | |
12433 | * rd ----- | |
12434 | */ | |
7def8a4b | 12435 | static char *ROUND_W_S(uint64 instruction, Dis_info *info) |
89a955e8 | 12436 | { |
17ce2f00 | 12437 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 12438 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 | 12439 | |
3f2aec07 ML |
12440 | const char *ft = FPR(ft_value, info); |
12441 | const char *fs = FPR(fs_value, info); | |
89a955e8 | 12442 | |
c5231692 | 12443 | return img_format("ROUND.W.S %s, %s", ft, fs); |
89a955e8 AM |
12444 | } |
12445 | ||
12446 | ||
12447 | /* | |
12448 | * | |
12449 | * | |
12450 | * 3 2 1 | |
12451 | * 10987654321098765432109876543210 | |
12452 | * 001000 x1110000101 | |
12453 | * rt ----- | |
12454 | * rs ----- | |
12455 | * rd ----- | |
12456 | */ | |
7def8a4b | 12457 | static char *RSQRT_D(uint64 instruction, Dis_info *info) |
89a955e8 | 12458 | { |
17ce2f00 | 12459 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 12460 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 | 12461 | |
3f2aec07 ML |
12462 | const char *ft = FPR(ft_value, info); |
12463 | const char *fs = FPR(fs_value, info); | |
89a955e8 | 12464 | |
c5231692 | 12465 | return img_format("RSQRT.D %s, %s", ft, fs); |
89a955e8 AM |
12466 | } |
12467 | ||
12468 | ||
12469 | /* | |
12470 | * | |
12471 | * | |
12472 | * 3 2 1 | |
12473 | * 10987654321098765432109876543210 | |
12474 | * 001000 x1110000101 | |
12475 | * rt ----- | |
12476 | * rs ----- | |
12477 | * rd ----- | |
12478 | */ | |
7def8a4b | 12479 | static char *RSQRT_S(uint64 instruction, Dis_info *info) |
89a955e8 | 12480 | { |
17ce2f00 | 12481 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 12482 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 | 12483 | |
3f2aec07 ML |
12484 | const char *ft = FPR(ft_value, info); |
12485 | const char *fs = FPR(fs_value, info); | |
89a955e8 | 12486 | |
c5231692 | 12487 | return img_format("RSQRT.S %s, %s", ft, fs); |
89a955e8 AM |
12488 | } |
12489 | ||
12490 | ||
12491 | /* | |
12492 | * | |
12493 | * | |
12494 | * 3 2 1 | |
12495 | * 10987654321098765432109876543210 | |
12496 | * 001000 01001001101 | |
12497 | * rt ----- | |
12498 | * rs ----- | |
12499 | * rd ----- | |
12500 | */ | |
7def8a4b | 12501 | static char *SAVE_16_(uint64 instruction, Dis_info *info) |
89a955e8 | 12502 | { |
89a955e8 | 12503 | uint64 rt1_value = extract_rtl_11(instruction); |
11b9732a | 12504 | uint64 u_value = extract_u_7_6_5_4__s4(instruction); |
75199b40 | 12505 | uint64 count_value = extract_count_3_2_1_0(instruction); |
89a955e8 | 12506 | |
22e7b52a | 12507 | g_autofree char *save_restore_str = save_restore_list( |
3f2aec07 | 12508 | encode_rt1_from_rt(rt1_value), count_value, 0, info); |
22e7b52a | 12509 | return img_format("SAVE 0x%" PRIx64 "%s", u_value, save_restore_str); |
89a955e8 AM |
12510 | } |
12511 | ||
12512 | ||
12513 | /* | |
12514 | * | |
12515 | * | |
12516 | * 3 2 1 | |
12517 | * 10987654321098765432109876543210 | |
12518 | * 001000 01001001101 | |
12519 | * rt ----- | |
12520 | * rs ----- | |
12521 | * rd ----- | |
12522 | */ | |
7def8a4b | 12523 | static char *SAVE_32_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
12524 | { |
12525 | uint64 count_value = extract_count_19_18_17_16(instruction); | |
12526 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
11b9732a | 12527 | uint64 u_value = extract_u_11_10_9_8_7_6_5_4_3__s3(instruction); |
89a955e8 AM |
12528 | uint64 gp_value = extract_gp_2(instruction); |
12529 | ||
22e7b52a | 12530 | g_autofree char *save_restore_str = save_restore_list( |
3f2aec07 | 12531 | rt_value, count_value, gp_value, info); |
22e7b52a | 12532 | return img_format("SAVE 0x%" PRIx64 "%s", u_value, save_restore_str); |
89a955e8 AM |
12533 | } |
12534 | ||
12535 | ||
12536 | /* | |
12537 | * | |
12538 | * | |
12539 | * 3 2 1 | |
12540 | * 10987654321098765432109876543210 | |
12541 | * 001000 01001001101 | |
12542 | * rt ----- | |
12543 | * rs ----- | |
12544 | * rd ----- | |
12545 | */ | |
7def8a4b | 12546 | static char *SAVEF(uint64 instruction, Dis_info *info) |
89a955e8 AM |
12547 | { |
12548 | uint64 count_value = extract_count_19_18_17_16(instruction); | |
11b9732a | 12549 | uint64 u_value = extract_u_11_10_9_8_7_6_5_4_3__s3(instruction); |
89a955e8 | 12550 | |
89a955e8 | 12551 | |
4066c152 | 12552 | return img_format("SAVEF 0x%" PRIx64 ", 0x%" PRIx64, u_value, count_value); |
89a955e8 AM |
12553 | } |
12554 | ||
12555 | ||
12556 | /* | |
12557 | * | |
12558 | * | |
12559 | * 3 2 1 | |
12560 | * 10987654321098765432109876543210 | |
12561 | * 001000 01001001101 | |
12562 | * rt ----- | |
12563 | * rs ----- | |
12564 | * rd ----- | |
12565 | */ | |
7def8a4b | 12566 | static char *SB_16_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
12567 | { |
12568 | uint64 rtz3_value = extract_rtz3_9_8_7(instruction); | |
89a955e8 | 12569 | uint64 rs3_value = extract_rs3_6_5_4(instruction); |
75199b40 | 12570 | uint64 u_value = extract_u_1_0(instruction); |
89a955e8 | 12571 | |
3f2aec07 ML |
12572 | const char *rtz3 = GPR(decode_gpr_gpr3_src_store(rtz3_value, info), info); |
12573 | const char *rs3 = GPR(decode_gpr_gpr3(rs3_value, info), info); | |
89a955e8 | 12574 | |
4066c152 | 12575 | return img_format("SB %s, 0x%" PRIx64 "(%s)", rtz3, u_value, rs3); |
89a955e8 AM |
12576 | } |
12577 | ||
12578 | ||
12579 | /* | |
12580 | * | |
12581 | * | |
12582 | * 3 2 1 | |
12583 | * 10987654321098765432109876543210 | |
12584 | * 001000 01001001101 | |
12585 | * rt ----- | |
12586 | * rs ----- | |
12587 | * rd ----- | |
12588 | */ | |
7def8a4b | 12589 | static char *SB_GP_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
12590 | { |
12591 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
12592 | uint64 u_value = extract_u_17_to_0(instruction); | |
12593 | ||
3f2aec07 | 12594 | const char *rt = GPR(rt_value, info); |
89a955e8 | 12595 | |
4066c152 | 12596 | return img_format("SB %s, 0x%" PRIx64 "($%d)", rt, u_value, 28); |
89a955e8 AM |
12597 | } |
12598 | ||
12599 | ||
12600 | /* | |
12601 | * | |
12602 | * | |
12603 | * 3 2 1 | |
12604 | * 10987654321098765432109876543210 | |
12605 | * 001000 01001001101 | |
12606 | * rt ----- | |
12607 | * rs ----- | |
12608 | * rd ----- | |
12609 | */ | |
7def8a4b | 12610 | static char *SB_S9_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
12611 | { |
12612 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 12613 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 12614 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
89a955e8 | 12615 | |
3f2aec07 ML |
12616 | const char *rt = GPR(rt_value, info); |
12617 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 12618 | |
04849c94 | 12619 | return img_format("SB %s, %" PRId64 "(%s)", rt, s_value, rs); |
89a955e8 AM |
12620 | } |
12621 | ||
12622 | ||
12623 | /* | |
12624 | * | |
12625 | * | |
12626 | * 3 2 1 | |
12627 | * 10987654321098765432109876543210 | |
12628 | * 001000 01001001101 | |
12629 | * rt ----- | |
12630 | * rs ----- | |
12631 | * rd ----- | |
12632 | */ | |
7def8a4b | 12633 | static char *SB_U12_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
12634 | { |
12635 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 12636 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 12637 | uint64 u_value = extract_u_11_10_9_8_7_6_5_4_3_2_1_0(instruction); |
89a955e8 | 12638 | |
3f2aec07 ML |
12639 | const char *rt = GPR(rt_value, info); |
12640 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 12641 | |
4066c152 | 12642 | return img_format("SB %s, 0x%" PRIx64 "(%s)", rt, u_value, rs); |
89a955e8 AM |
12643 | } |
12644 | ||
12645 | ||
12646 | /* | |
12647 | * | |
12648 | * | |
12649 | * 3 2 1 | |
12650 | * 10987654321098765432109876543210 | |
12651 | * 001000 01001001101 | |
12652 | * rt ----- | |
12653 | * rs ----- | |
12654 | * rd ----- | |
12655 | */ | |
7def8a4b | 12656 | static char *SBE(uint64 instruction, Dis_info *info) |
89a955e8 AM |
12657 | { |
12658 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 12659 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 12660 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
89a955e8 | 12661 | |
3f2aec07 ML |
12662 | const char *rt = GPR(rt_value, info); |
12663 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 12664 | |
04849c94 | 12665 | return img_format("SBE %s, %" PRId64 "(%s)", rt, s_value, rs); |
89a955e8 AM |
12666 | } |
12667 | ||
12668 | ||
12669 | /* | |
12670 | * | |
12671 | * | |
12672 | * 3 2 1 | |
12673 | * 10987654321098765432109876543210 | |
12674 | * 001000 01001001101 | |
12675 | * rt ----- | |
12676 | * rs ----- | |
12677 | * rd ----- | |
12678 | */ | |
7def8a4b | 12679 | static char *SBX(uint64 instruction, Dis_info *info) |
89a955e8 AM |
12680 | { |
12681 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 12682 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 12683 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 12684 | |
3f2aec07 ML |
12685 | const char *rd = GPR(rd_value, info); |
12686 | const char *rs = GPR(rs_value, info); | |
12687 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 12688 | |
c5231692 | 12689 | return img_format("SBX %s, %s(%s)", rd, rs, rt); |
89a955e8 AM |
12690 | } |
12691 | ||
12692 | ||
12693 | /* | |
12694 | * | |
12695 | * | |
12696 | * 3 2 1 | |
12697 | * 10987654321098765432109876543210 | |
12698 | * 001000 01001001101 | |
12699 | * rt ----- | |
12700 | * rs ----- | |
12701 | * rd ----- | |
12702 | */ | |
7def8a4b | 12703 | static char *SC(uint64 instruction, Dis_info *info) |
89a955e8 AM |
12704 | { |
12705 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 12706 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 12707 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_s2(instruction); |
89a955e8 | 12708 | |
3f2aec07 ML |
12709 | const char *rt = GPR(rt_value, info); |
12710 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 12711 | |
04849c94 | 12712 | return img_format("SC %s, %" PRId64 "(%s)", rt, s_value, rs); |
89a955e8 AM |
12713 | } |
12714 | ||
12715 | ||
12716 | /* | |
12717 | * | |
12718 | * | |
12719 | * 3 2 1 | |
12720 | * 10987654321098765432109876543210 | |
12721 | * 001000 01001001101 | |
12722 | * rt ----- | |
12723 | * rs ----- | |
12724 | * rd ----- | |
12725 | */ | |
7def8a4b | 12726 | static char *SCD(uint64 instruction, Dis_info *info) |
89a955e8 AM |
12727 | { |
12728 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 12729 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 12730 | int64 s_value = extract_s__se8_15_7_6_5_4_3_s3(instruction); |
89a955e8 | 12731 | |
3f2aec07 ML |
12732 | const char *rt = GPR(rt_value, info); |
12733 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 12734 | |
04849c94 | 12735 | return img_format("SCD %s, %" PRId64 "(%s)", rt, s_value, rs); |
89a955e8 AM |
12736 | } |
12737 | ||
12738 | ||
12739 | /* | |
12740 | * | |
12741 | * | |
12742 | * 3 2 1 | |
12743 | * 10987654321098765432109876543210 | |
12744 | * 001000 01001001101 | |
12745 | * rt ----- | |
12746 | * rs ----- | |
12747 | * rd ----- | |
12748 | */ | |
7def8a4b | 12749 | static char *SCDP(uint64 instruction, Dis_info *info) |
89a955e8 AM |
12750 | { |
12751 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 12752 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 12753 | uint64 ru_value = extract_ru_7_6_5_4_3(instruction); |
89a955e8 | 12754 | |
3f2aec07 ML |
12755 | const char *rt = GPR(rt_value, info); |
12756 | const char *ru = GPR(ru_value, info); | |
12757 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 12758 | |
c5231692 | 12759 | return img_format("SCDP %s, %s, (%s)", rt, ru, rs); |
89a955e8 AM |
12760 | } |
12761 | ||
12762 | ||
12763 | /* | |
12764 | * | |
12765 | * | |
12766 | * 3 2 1 | |
12767 | * 10987654321098765432109876543210 | |
12768 | * 001000 01001001101 | |
12769 | * rt ----- | |
12770 | * rs ----- | |
12771 | * rd ----- | |
12772 | */ | |
7def8a4b | 12773 | static char *SCE(uint64 instruction, Dis_info *info) |
89a955e8 AM |
12774 | { |
12775 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 12776 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 12777 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_s2(instruction); |
89a955e8 | 12778 | |
3f2aec07 ML |
12779 | const char *rt = GPR(rt_value, info); |
12780 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 12781 | |
04849c94 | 12782 | return img_format("SCE %s, %" PRId64 "(%s)", rt, s_value, rs); |
89a955e8 AM |
12783 | } |
12784 | ||
12785 | ||
12786 | /* | |
12787 | * | |
12788 | * | |
12789 | * 3 2 1 | |
12790 | * 10987654321098765432109876543210 | |
12791 | * 001000 01001001101 | |
12792 | * rt ----- | |
12793 | * rs ----- | |
12794 | * rd ----- | |
12795 | */ | |
7def8a4b | 12796 | static char *SCWP(uint64 instruction, Dis_info *info) |
89a955e8 AM |
12797 | { |
12798 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 12799 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 12800 | uint64 ru_value = extract_ru_7_6_5_4_3(instruction); |
89a955e8 | 12801 | |
3f2aec07 ML |
12802 | const char *rt = GPR(rt_value, info); |
12803 | const char *ru = GPR(ru_value, info); | |
12804 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 12805 | |
c5231692 | 12806 | return img_format("SCWP %s, %s, (%s)", rt, ru, rs); |
89a955e8 AM |
12807 | } |
12808 | ||
12809 | ||
12810 | /* | |
12811 | * | |
12812 | * | |
12813 | * 3 2 1 | |
12814 | * 10987654321098765432109876543210 | |
12815 | * 001000 01001001101 | |
12816 | * rt ----- | |
12817 | * rs ----- | |
12818 | * rd ----- | |
12819 | */ | |
7def8a4b | 12820 | static char *SCWPE(uint64 instruction, Dis_info *info) |
89a955e8 AM |
12821 | { |
12822 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 12823 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 12824 | uint64 ru_value = extract_ru_7_6_5_4_3(instruction); |
89a955e8 | 12825 | |
3f2aec07 ML |
12826 | const char *rt = GPR(rt_value, info); |
12827 | const char *ru = GPR(ru_value, info); | |
12828 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 12829 | |
c5231692 | 12830 | return img_format("SCWPE %s, %s, (%s)", rt, ru, rs); |
89a955e8 AM |
12831 | } |
12832 | ||
12833 | ||
12834 | /* | |
12835 | * | |
12836 | * | |
12837 | * 3 2 1 | |
12838 | * 10987654321098765432109876543210 | |
12839 | * 001000 01001001101 | |
12840 | * rt ----- | |
12841 | * rs ----- | |
12842 | * rd ----- | |
12843 | */ | |
7def8a4b | 12844 | static char *SD_GP_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
12845 | { |
12846 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
11b9732a | 12847 | uint64 u_value = extract_u_20_to_3__s3(instruction); |
89a955e8 | 12848 | |
3f2aec07 | 12849 | const char *rt = GPR(rt_value, info); |
89a955e8 | 12850 | |
4066c152 | 12851 | return img_format("SD %s, 0x%" PRIx64 "($%d)", rt, u_value, 28); |
89a955e8 AM |
12852 | } |
12853 | ||
12854 | ||
12855 | /* | |
12856 | * | |
12857 | * | |
12858 | * 3 2 1 | |
12859 | * 10987654321098765432109876543210 | |
12860 | * 001000 01001001101 | |
12861 | * rt ----- | |
12862 | * rs ----- | |
12863 | * rd ----- | |
12864 | */ | |
7def8a4b | 12865 | static char *SD_S9_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
12866 | { |
12867 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 12868 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 12869 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
89a955e8 | 12870 | |
3f2aec07 ML |
12871 | const char *rt = GPR(rt_value, info); |
12872 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 12873 | |
04849c94 | 12874 | return img_format("SD %s, %" PRId64 "(%s)", rt, s_value, rs); |
89a955e8 AM |
12875 | } |
12876 | ||
12877 | ||
12878 | /* | |
12879 | * | |
12880 | * | |
12881 | * 3 2 1 | |
12882 | * 10987654321098765432109876543210 | |
12883 | * 001000 01001001101 | |
12884 | * rt ----- | |
12885 | * rs ----- | |
12886 | * rd ----- | |
12887 | */ | |
7def8a4b | 12888 | static char *SD_U12_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
12889 | { |
12890 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 12891 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 12892 | uint64 u_value = extract_u_11_10_9_8_7_6_5_4_3_2_1_0(instruction); |
89a955e8 | 12893 | |
3f2aec07 ML |
12894 | const char *rt = GPR(rt_value, info); |
12895 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 12896 | |
4066c152 | 12897 | return img_format("SD %s, 0x%" PRIx64 "(%s)", rt, u_value, rs); |
89a955e8 AM |
12898 | } |
12899 | ||
12900 | ||
12901 | /* | |
12902 | * | |
12903 | * | |
12904 | * 3 2 1 | |
12905 | * 10987654321098765432109876543210 | |
12906 | * 001000 01001001101 | |
12907 | * rt ----- | |
12908 | * rs ----- | |
12909 | * rd ----- | |
12910 | */ | |
7def8a4b | 12911 | static char *SDBBP_16_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
12912 | { |
12913 | uint64 code_value = extract_code_2_1_0(instruction); | |
12914 | ||
89a955e8 | 12915 | |
4066c152 | 12916 | return img_format("SDBBP 0x%" PRIx64, code_value); |
89a955e8 AM |
12917 | } |
12918 | ||
12919 | ||
12920 | /* | |
12921 | * | |
12922 | * | |
12923 | * 3 2 1 | |
12924 | * 10987654321098765432109876543210 | |
12925 | * 001000 01001001101 | |
12926 | * rt ----- | |
12927 | * rs ----- | |
12928 | * rd ----- | |
12929 | */ | |
7def8a4b | 12930 | static char *SDBBP_32_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
12931 | { |
12932 | uint64 code_value = extract_code_18_to_0(instruction); | |
12933 | ||
89a955e8 | 12934 | |
4066c152 | 12935 | return img_format("SDBBP 0x%" PRIx64, code_value); |
89a955e8 AM |
12936 | } |
12937 | ||
12938 | ||
12939 | /* | |
12940 | * | |
12941 | * | |
12942 | * 3 2 1 | |
12943 | * 10987654321098765432109876543210 | |
12944 | * 001000 01001001101 | |
12945 | * rt ----- | |
12946 | * rs ----- | |
12947 | * rd ----- | |
12948 | */ | |
7def8a4b | 12949 | static char *SDC1_GP_(uint64 instruction, Dis_info *info) |
89a955e8 | 12950 | { |
17ce2f00 | 12951 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
11b9732a | 12952 | uint64 u_value = extract_u_17_to_2__s2(instruction); |
89a955e8 | 12953 | |
3f2aec07 | 12954 | const char *ft = FPR(ft_value, info); |
89a955e8 | 12955 | |
4066c152 | 12956 | return img_format("SDC1 %s, 0x%" PRIx64 "($%d)", ft, u_value, 28); |
89a955e8 AM |
12957 | } |
12958 | ||
12959 | ||
12960 | /* | |
12961 | * | |
12962 | * | |
12963 | * 3 2 1 | |
12964 | * 10987654321098765432109876543210 | |
12965 | * 001000 01001001101 | |
12966 | * rt ----- | |
12967 | * rs ----- | |
12968 | * rd ----- | |
12969 | */ | |
7def8a4b | 12970 | static char *SDC1_S9_(uint64 instruction, Dis_info *info) |
89a955e8 | 12971 | { |
17ce2f00 | 12972 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
89a955e8 | 12973 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 12974 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
89a955e8 | 12975 | |
3f2aec07 ML |
12976 | const char *ft = FPR(ft_value, info); |
12977 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 12978 | |
04849c94 | 12979 | return img_format("SDC1 %s, %" PRId64 "(%s)", ft, s_value, rs); |
89a955e8 AM |
12980 | } |
12981 | ||
12982 | ||
12983 | /* | |
12984 | * | |
12985 | * | |
12986 | * 3 2 1 | |
12987 | * 10987654321098765432109876543210 | |
12988 | * 001000 01001001101 | |
12989 | * rt ----- | |
12990 | * rs ----- | |
12991 | * rd ----- | |
12992 | */ | |
7def8a4b | 12993 | static char *SDC1_U12_(uint64 instruction, Dis_info *info) |
89a955e8 | 12994 | { |
17ce2f00 | 12995 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
89a955e8 | 12996 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 12997 | uint64 u_value = extract_u_11_10_9_8_7_6_5_4_3_2_1_0(instruction); |
89a955e8 | 12998 | |
3f2aec07 ML |
12999 | const char *ft = FPR(ft_value, info); |
13000 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 13001 | |
4066c152 | 13002 | return img_format("SDC1 %s, 0x%" PRIx64 "(%s)", ft, u_value, rs); |
89a955e8 AM |
13003 | } |
13004 | ||
13005 | ||
13006 | /* | |
13007 | * | |
13008 | * | |
13009 | * 3 2 1 | |
13010 | * 10987654321098765432109876543210 | |
13011 | * 001000 01001001101 | |
13012 | * rt ----- | |
13013 | * rs ----- | |
13014 | * rd ----- | |
13015 | */ | |
7def8a4b | 13016 | static char *SDC1X(uint64 instruction, Dis_info *info) |
89a955e8 AM |
13017 | { |
13018 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 13019 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 13020 | uint64 ft_value = extract_ft_15_14_13_12_11(instruction); |
89a955e8 | 13021 | |
3f2aec07 ML |
13022 | const char *ft = FPR(ft_value, info); |
13023 | const char *rs = GPR(rs_value, info); | |
13024 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 13025 | |
c5231692 | 13026 | return img_format("SDC1X %s, %s(%s)", ft, rs, rt); |
89a955e8 AM |
13027 | } |
13028 | ||
13029 | ||
13030 | /* | |
13031 | * | |
13032 | * | |
13033 | * 3 2 1 | |
13034 | * 10987654321098765432109876543210 | |
13035 | * 001000 01001001101 | |
13036 | * rt ----- | |
13037 | * rs ----- | |
13038 | * rd ----- | |
13039 | */ | |
7def8a4b | 13040 | static char *SDC1XS(uint64 instruction, Dis_info *info) |
89a955e8 AM |
13041 | { |
13042 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 13043 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 13044 | uint64 ft_value = extract_ft_15_14_13_12_11(instruction); |
89a955e8 | 13045 | |
3f2aec07 ML |
13046 | const char *ft = FPR(ft_value, info); |
13047 | const char *rs = GPR(rs_value, info); | |
13048 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 13049 | |
c5231692 | 13050 | return img_format("SDC1XS %s, %s(%s)", ft, rs, rt); |
89a955e8 AM |
13051 | } |
13052 | ||
13053 | ||
13054 | /* | |
13055 | * | |
13056 | * | |
13057 | * 3 2 1 | |
13058 | * 10987654321098765432109876543210 | |
13059 | * 001000 01001001101 | |
13060 | * rt ----- | |
13061 | * rs ----- | |
13062 | * rd ----- | |
13063 | */ | |
7def8a4b | 13064 | static char *SDC2(uint64 instruction, Dis_info *info) |
89a955e8 AM |
13065 | { |
13066 | uint64 cs_value = extract_cs_25_24_23_22_21(instruction); | |
89a955e8 | 13067 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 13068 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
89a955e8 | 13069 | |
3f2aec07 | 13070 | const char *rs = GPR(rs_value, info); |
89a955e8 | 13071 | |
04849c94 PMD |
13072 | return img_format("SDC2 CP%" PRIu64 ", %" PRId64 "(%s)", |
13073 | cs_value, s_value, rs); | |
89a955e8 AM |
13074 | } |
13075 | ||
13076 | ||
13077 | /* | |
13078 | * | |
13079 | * | |
13080 | * 3 2 1 | |
13081 | * 10987654321098765432109876543210 | |
13082 | * 001000 01001001101 | |
13083 | * rt ----- | |
13084 | * rs ----- | |
13085 | * rd ----- | |
13086 | */ | |
7def8a4b | 13087 | static char *SDM(uint64 instruction, Dis_info *info) |
89a955e8 AM |
13088 | { |
13089 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 13090 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 AM |
13091 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
13092 | uint64 count3_value = extract_count3_14_13_12(instruction); | |
89a955e8 | 13093 | |
3f2aec07 ML |
13094 | const char *rt = GPR(rt_value, info); |
13095 | const char *rs = GPR(rs_value, info); | |
4066c152 | 13096 | uint64 count3 = encode_count3_from_count(count3_value); |
89a955e8 | 13097 | |
04849c94 PMD |
13098 | return img_format("SDM %s, %" PRId64 "(%s), 0x%" PRIx64, |
13099 | rt, s_value, rs, count3); | |
89a955e8 AM |
13100 | } |
13101 | ||
13102 | ||
13103 | /* | |
13104 | * | |
13105 | * | |
13106 | * 3 2 1 | |
13107 | * 10987654321098765432109876543210 | |
13108 | * 001000 01001001101 | |
13109 | * rt ----- | |
13110 | * rs ----- | |
13111 | * rd ----- | |
13112 | */ | |
7def8a4b | 13113 | static char *SDPC_48_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
13114 | { |
13115 | uint64 rt_value = extract_rt_41_40_39_38_37(instruction); | |
d3605cc0 | 13116 | int64 s_value = extract_s__se31_15_to_0_31_to_16(instruction); |
89a955e8 | 13117 | |
3f2aec07 | 13118 | const char *rt = GPR(rt_value, info); |
22e7b52a | 13119 | g_autofree char *s = ADDRESS(s_value, 6, info); |
89a955e8 | 13120 | |
c5231692 | 13121 | return img_format("SDPC %s, %s", rt, s); |
89a955e8 AM |
13122 | } |
13123 | ||
13124 | ||
13125 | /* | |
13126 | * | |
13127 | * | |
13128 | * 3 2 1 | |
13129 | * 10987654321098765432109876543210 | |
13130 | * 001000 01001001101 | |
13131 | * rt ----- | |
13132 | * rs ----- | |
13133 | * rd ----- | |
13134 | */ | |
7def8a4b | 13135 | static char *SDXS(uint64 instruction, Dis_info *info) |
89a955e8 AM |
13136 | { |
13137 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 13138 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 13139 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 13140 | |
3f2aec07 ML |
13141 | const char *rd = GPR(rd_value, info); |
13142 | const char *rs = GPR(rs_value, info); | |
13143 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 13144 | |
c5231692 | 13145 | return img_format("SDXS %s, %s(%s)", rd, rs, rt); |
89a955e8 AM |
13146 | } |
13147 | ||
13148 | ||
13149 | /* | |
13150 | * | |
13151 | * | |
13152 | * 3 2 1 | |
13153 | * 10987654321098765432109876543210 | |
13154 | * 001000 01001001101 | |
13155 | * rt ----- | |
13156 | * rs ----- | |
13157 | * rd ----- | |
13158 | */ | |
7def8a4b | 13159 | static char *SDX(uint64 instruction, Dis_info *info) |
89a955e8 AM |
13160 | { |
13161 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 13162 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 13163 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 13164 | |
3f2aec07 ML |
13165 | const char *rd = GPR(rd_value, info); |
13166 | const char *rs = GPR(rs_value, info); | |
13167 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 13168 | |
c5231692 | 13169 | return img_format("SDX %s, %s(%s)", rd, rs, rt); |
89a955e8 AM |
13170 | } |
13171 | ||
13172 | ||
13173 | /* | |
13174 | * | |
13175 | * | |
13176 | * 3 2 1 | |
13177 | * 10987654321098765432109876543210 | |
13178 | * 001000 01001001101 | |
13179 | * rt ----- | |
13180 | * rs ----- | |
13181 | * rd ----- | |
13182 | */ | |
7def8a4b | 13183 | static char *SEB(uint64 instruction, Dis_info *info) |
89a955e8 AM |
13184 | { |
13185 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
13186 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
13187 | ||
3f2aec07 ML |
13188 | const char *rt = GPR(rt_value, info); |
13189 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 13190 | |
c5231692 | 13191 | return img_format("SEB %s, %s", rt, rs); |
89a955e8 AM |
13192 | } |
13193 | ||
13194 | ||
13195 | /* | |
13196 | * | |
13197 | * | |
13198 | * 3 2 1 | |
13199 | * 10987654321098765432109876543210 | |
13200 | * 001000 01001001101 | |
13201 | * rt ----- | |
13202 | * rs ----- | |
13203 | * rd ----- | |
13204 | */ | |
7def8a4b | 13205 | static char *SEH(uint64 instruction, Dis_info *info) |
89a955e8 AM |
13206 | { |
13207 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
13208 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
13209 | ||
3f2aec07 ML |
13210 | const char *rt = GPR(rt_value, info); |
13211 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 13212 | |
c5231692 | 13213 | return img_format("SEH %s, %s", rt, rs); |
89a955e8 AM |
13214 | } |
13215 | ||
13216 | ||
13217 | /* | |
13218 | * | |
13219 | * | |
13220 | * 3 2 1 | |
13221 | * 10987654321098765432109876543210 | |
13222 | * 001000 01001001101 | |
13223 | * rt ----- | |
13224 | * rs ----- | |
13225 | * rd ----- | |
13226 | */ | |
7def8a4b | 13227 | static char *SEL_D(uint64 instruction, Dis_info *info) |
89a955e8 | 13228 | { |
17ce2f00 | 13229 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 13230 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 13231 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 | 13232 | |
3f2aec07 ML |
13233 | const char *fd = FPR(fd_value, info); |
13234 | const char *fs = FPR(fs_value, info); | |
13235 | const char *ft = FPR(ft_value, info); | |
89a955e8 | 13236 | |
c5231692 | 13237 | return img_format("SEL.D %s, %s, %s", fd, fs, ft); |
89a955e8 AM |
13238 | } |
13239 | ||
13240 | ||
13241 | /* | |
13242 | * | |
13243 | * | |
13244 | * 3 2 1 | |
13245 | * 10987654321098765432109876543210 | |
13246 | * 001000 01001001101 | |
13247 | * rt ----- | |
13248 | * rs ----- | |
13249 | * rd ----- | |
13250 | */ | |
7def8a4b | 13251 | static char *SEL_S(uint64 instruction, Dis_info *info) |
89a955e8 | 13252 | { |
17ce2f00 | 13253 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 13254 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 13255 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 | 13256 | |
3f2aec07 ML |
13257 | const char *fd = FPR(fd_value, info); |
13258 | const char *fs = FPR(fs_value, info); | |
13259 | const char *ft = FPR(ft_value, info); | |
89a955e8 | 13260 | |
c5231692 | 13261 | return img_format("SEL.S %s, %s, %s", fd, fs, ft); |
89a955e8 AM |
13262 | } |
13263 | ||
13264 | ||
13265 | /* | |
13266 | * | |
13267 | * | |
13268 | * 3 2 1 | |
13269 | * 10987654321098765432109876543210 | |
13270 | * 001000 01001001101 | |
13271 | * rt ----- | |
13272 | * rs ----- | |
13273 | * rd ----- | |
13274 | */ | |
7def8a4b | 13275 | static char *SELEQZ_D(uint64 instruction, Dis_info *info) |
89a955e8 | 13276 | { |
17ce2f00 | 13277 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 13278 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 13279 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 | 13280 | |
3f2aec07 ML |
13281 | const char *fd = FPR(fd_value, info); |
13282 | const char *fs = FPR(fs_value, info); | |
13283 | const char *ft = FPR(ft_value, info); | |
89a955e8 | 13284 | |
c5231692 | 13285 | return img_format("SELEQZ.D %s, %s, %s", fd, fs, ft); |
89a955e8 AM |
13286 | } |
13287 | ||
13288 | ||
13289 | /* | |
13290 | * | |
13291 | * | |
13292 | * 3 2 1 | |
13293 | * 10987654321098765432109876543210 | |
13294 | * 001000 01001001101 | |
13295 | * rt ----- | |
13296 | * rs ----- | |
13297 | * rd ----- | |
13298 | */ | |
7def8a4b | 13299 | static char *SELEQZ_S(uint64 instruction, Dis_info *info) |
89a955e8 | 13300 | { |
17ce2f00 | 13301 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 13302 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 13303 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 | 13304 | |
3f2aec07 ML |
13305 | const char *fd = FPR(fd_value, info); |
13306 | const char *fs = FPR(fs_value, info); | |
13307 | const char *ft = FPR(ft_value, info); | |
89a955e8 | 13308 | |
c5231692 | 13309 | return img_format("SELEQZ.S %s, %s, %s", fd, fs, ft); |
89a955e8 AM |
13310 | } |
13311 | ||
13312 | ||
13313 | /* | |
13314 | * | |
13315 | * | |
13316 | * 3 2 1 | |
13317 | * 10987654321098765432109876543210 | |
13318 | * 001000 01001001101 | |
13319 | * rt ----- | |
13320 | * rs ----- | |
13321 | * rd ----- | |
13322 | */ | |
7def8a4b | 13323 | static char *SELNEZ_D(uint64 instruction, Dis_info *info) |
89a955e8 | 13324 | { |
17ce2f00 | 13325 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 13326 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 13327 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 | 13328 | |
3f2aec07 ML |
13329 | const char *fd = FPR(fd_value, info); |
13330 | const char *fs = FPR(fs_value, info); | |
13331 | const char *ft = FPR(ft_value, info); | |
89a955e8 | 13332 | |
c5231692 | 13333 | return img_format("SELNEZ.D %s, %s, %s", fd, fs, ft); |
89a955e8 AM |
13334 | } |
13335 | ||
13336 | ||
13337 | /* | |
13338 | * | |
13339 | * | |
13340 | * 3 2 1 | |
13341 | * 10987654321098765432109876543210 | |
13342 | * 001000 01001001101 | |
13343 | * rt ----- | |
13344 | * rs ----- | |
13345 | * rd ----- | |
13346 | */ | |
7def8a4b | 13347 | static char *SELNEZ_S(uint64 instruction, Dis_info *info) |
89a955e8 | 13348 | { |
17ce2f00 | 13349 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 13350 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 13351 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 | 13352 | |
3f2aec07 ML |
13353 | const char *fd = FPR(fd_value, info); |
13354 | const char *fs = FPR(fs_value, info); | |
13355 | const char *ft = FPR(ft_value, info); | |
89a955e8 | 13356 | |
c5231692 | 13357 | return img_format("SELNEZ.S %s, %s, %s", fd, fs, ft); |
89a955e8 AM |
13358 | } |
13359 | ||
13360 | ||
13361 | /* | |
13362 | * | |
13363 | * | |
13364 | * 3 2 1 | |
13365 | * 10987654321098765432109876543210 | |
13366 | * 001000 01001001101 | |
13367 | * rt ----- | |
13368 | * rs ----- | |
13369 | * rd ----- | |
13370 | */ | |
7def8a4b | 13371 | static char *SEQI(uint64 instruction, Dis_info *info) |
89a955e8 AM |
13372 | { |
13373 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 13374 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 13375 | uint64 u_value = extract_u_11_10_9_8_7_6_5_4_3_2_1_0(instruction); |
89a955e8 | 13376 | |
3f2aec07 ML |
13377 | const char *rt = GPR(rt_value, info); |
13378 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 13379 | |
4066c152 | 13380 | return img_format("SEQI %s, %s, 0x%" PRIx64, rt, rs, u_value); |
89a955e8 AM |
13381 | } |
13382 | ||
13383 | ||
13384 | /* | |
13385 | * | |
13386 | * | |
13387 | * 3 2 1 | |
13388 | * 10987654321098765432109876543210 | |
13389 | * 001000 01001001101 | |
13390 | * rt ----- | |
13391 | * rs ----- | |
13392 | * rd ----- | |
13393 | */ | |
7def8a4b | 13394 | static char *SH_16_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
13395 | { |
13396 | uint64 rtz3_value = extract_rtz3_9_8_7(instruction); | |
89a955e8 | 13397 | uint64 rs3_value = extract_rs3_6_5_4(instruction); |
75199b40 | 13398 | uint64 u_value = extract_u_2_1__s1(instruction); |
89a955e8 | 13399 | |
3f2aec07 ML |
13400 | const char *rtz3 = GPR(decode_gpr_gpr3_src_store(rtz3_value, info), info); |
13401 | const char *rs3 = GPR(decode_gpr_gpr3(rs3_value, info), info); | |
89a955e8 | 13402 | |
4066c152 | 13403 | return img_format("SH %s, 0x%" PRIx64 "(%s)", rtz3, u_value, rs3); |
89a955e8 AM |
13404 | } |
13405 | ||
13406 | ||
13407 | /* | |
13408 | * | |
13409 | * | |
13410 | * 3 2 1 | |
13411 | * 10987654321098765432109876543210 | |
13412 | * 001000 01001001101 | |
13413 | * rt ----- | |
13414 | * rs ----- | |
13415 | * rd ----- | |
13416 | */ | |
7def8a4b | 13417 | static char *SH_GP_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
13418 | { |
13419 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
11b9732a | 13420 | uint64 u_value = extract_u_17_to_1__s1(instruction); |
89a955e8 | 13421 | |
3f2aec07 | 13422 | const char *rt = GPR(rt_value, info); |
89a955e8 | 13423 | |
4066c152 | 13424 | return img_format("SH %s, 0x%" PRIx64 "($%d)", rt, u_value, 28); |
89a955e8 AM |
13425 | } |
13426 | ||
13427 | ||
13428 | /* | |
13429 | * | |
13430 | * | |
13431 | * 3 2 1 | |
13432 | * 10987654321098765432109876543210 | |
13433 | * 001000 01001001101 | |
13434 | * rt ----- | |
13435 | * rs ----- | |
13436 | * rd ----- | |
13437 | */ | |
7def8a4b | 13438 | static char *SH_S9_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
13439 | { |
13440 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 13441 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 13442 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
89a955e8 | 13443 | |
3f2aec07 ML |
13444 | const char *rt = GPR(rt_value, info); |
13445 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 13446 | |
4066c152 | 13447 | return img_format("SH %s, %" PRId64 "(%s)", rt, s_value, rs); |
89a955e8 AM |
13448 | } |
13449 | ||
13450 | ||
13451 | /* | |
13452 | * | |
13453 | * | |
13454 | * 3 2 1 | |
13455 | * 10987654321098765432109876543210 | |
13456 | * 001000 01001001101 | |
13457 | * rt ----- | |
13458 | * rs ----- | |
13459 | * rd ----- | |
13460 | */ | |
7def8a4b | 13461 | static char *SH_U12_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
13462 | { |
13463 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 13464 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 13465 | uint64 u_value = extract_u_11_10_9_8_7_6_5_4_3_2_1_0(instruction); |
89a955e8 | 13466 | |
3f2aec07 ML |
13467 | const char *rt = GPR(rt_value, info); |
13468 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 13469 | |
4066c152 | 13470 | return img_format("SH %s, 0x%" PRIx64 "(%s)", rt, u_value, rs); |
89a955e8 AM |
13471 | } |
13472 | ||
13473 | ||
13474 | /* | |
13475 | * | |
13476 | * | |
13477 | * 3 2 1 | |
13478 | * 10987654321098765432109876543210 | |
13479 | * 001000 01001001101 | |
13480 | * rt ----- | |
13481 | * rs ----- | |
13482 | * rd ----- | |
13483 | */ | |
7def8a4b | 13484 | static char *SHE(uint64 instruction, Dis_info *info) |
89a955e8 AM |
13485 | { |
13486 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 13487 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 13488 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
89a955e8 | 13489 | |
3f2aec07 ML |
13490 | const char *rt = GPR(rt_value, info); |
13491 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 13492 | |
4066c152 | 13493 | return img_format("SHE %s, %" PRId64 "(%s)", rt, s_value, rs); |
89a955e8 AM |
13494 | } |
13495 | ||
13496 | ||
13497 | /* | |
5c65eed6 AM |
13498 | * [DSP] SHILO ac, shift - Shift an accumulator value leaving the result in |
13499 | * the same accumulator | |
89a955e8 AM |
13500 | * |
13501 | * 3 2 1 | |
13502 | * 10987654321098765432109876543210 | |
13503 | * 001000xxxx xxxx0000011101 | |
13504 | * shift ------ | |
13505 | * ac -- | |
13506 | */ | |
7def8a4b | 13507 | static char *SHILO(uint64 instruction, Dis_info *info) |
89a955e8 | 13508 | { |
d3605cc0 | 13509 | int64 shift_value = extract_shift__se5_21_20_19_18_17_16(instruction); |
0f74e61d | 13510 | uint64 ac_value = extract_ac_15_14(instruction); |
89a955e8 | 13511 | |
3f2aec07 | 13512 | const char *ac = AC(ac_value, info); |
89a955e8 | 13513 | |
4066c152 | 13514 | return img_format("SHILO %s, 0x%" PRIx64, ac, shift_value); |
89a955e8 AM |
13515 | } |
13516 | ||
13517 | ||
13518 | /* | |
5c65eed6 AM |
13519 | * [DSP] SHILOV ac, rs - Variable shift of accumulator value leaving the result |
13520 | * in the same accumulator | |
89a955e8 AM |
13521 | * |
13522 | * 3 2 1 | |
13523 | * 10987654321098765432109876543210 | |
13524 | * 001000xxxxx 01001001111111 | |
13525 | * rs ----- | |
13526 | * ac -- | |
13527 | */ | |
7def8a4b | 13528 | static char *SHILOV(uint64 instruction, Dis_info *info) |
89a955e8 AM |
13529 | { |
13530 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
0f74e61d | 13531 | uint64 ac_value = extract_ac_15_14(instruction); |
89a955e8 | 13532 | |
3f2aec07 ML |
13533 | const char *rs = GPR(rs_value, info); |
13534 | const char *ac = AC(ac_value, info); | |
89a955e8 | 13535 | |
c5231692 | 13536 | return img_format("SHILOV %s, %s", ac, rs); |
89a955e8 AM |
13537 | } |
13538 | ||
13539 | ||
13540 | /* | |
5c65eed6 | 13541 | * [DSP] SHLL.PH rt, rs, sa - Shift left logical vector pair halfwords |
89a955e8 AM |
13542 | * |
13543 | * 3 2 1 | |
13544 | * 10987654321098765432109876543210 | |
13545 | * 001000 001110110101 | |
13546 | * rt ----- | |
13547 | * rs ----- | |
13548 | * sa ---- | |
13549 | */ | |
7def8a4b | 13550 | static char *SHLL_PH(uint64 instruction, Dis_info *info) |
89a955e8 AM |
13551 | { |
13552 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
13553 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
13554 | uint64 sa_value = extract_sa_15_14_13_12(instruction); | |
13555 | ||
3f2aec07 ML |
13556 | const char *rt = GPR(rt_value, info); |
13557 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 13558 | |
4066c152 | 13559 | return img_format("SHLL.PH %s, %s, 0x%" PRIx64, rt, rs, sa_value); |
89a955e8 AM |
13560 | } |
13561 | ||
13562 | ||
13563 | /* | |
5c65eed6 | 13564 | * [DSP] SHLL.QB rt, rs, sa - Shift left logical vector quad bytes |
89a955e8 AM |
13565 | * |
13566 | * 3 2 1 | |
13567 | * 10987654321098765432109876543210 | |
13568 | * 001000 0100001111111 | |
13569 | * rt ----- | |
13570 | * rs ----- | |
13571 | * sa --- | |
13572 | */ | |
7def8a4b | 13573 | static char *SHLL_QB(uint64 instruction, Dis_info *info) |
89a955e8 AM |
13574 | { |
13575 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
13576 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
13577 | uint64 sa_value = extract_sa_15_14_13(instruction); | |
13578 | ||
3f2aec07 ML |
13579 | const char *rt = GPR(rt_value, info); |
13580 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 13581 | |
4066c152 | 13582 | return img_format("SHLL.QB %s, %s, 0x%" PRIx64, rt, rs, sa_value); |
89a955e8 AM |
13583 | } |
13584 | ||
13585 | ||
13586 | /* | |
5c65eed6 AM |
13587 | * [DSP] SHLL_S.PH rt, rs, sa - Shift left logical vector pair halfwords |
13588 | * with saturation | |
89a955e8 AM |
13589 | * |
13590 | * 3 2 1 | |
13591 | * 10987654321098765432109876543210 | |
13592 | * 001000 001110110101 | |
13593 | * rt ----- | |
13594 | * rs ----- | |
13595 | * sa ---- | |
13596 | */ | |
7def8a4b | 13597 | static char *SHLL_S_PH(uint64 instruction, Dis_info *info) |
89a955e8 AM |
13598 | { |
13599 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
13600 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
13601 | uint64 sa_value = extract_sa_15_14_13_12(instruction); | |
13602 | ||
3f2aec07 ML |
13603 | const char *rt = GPR(rt_value, info); |
13604 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 13605 | |
4066c152 | 13606 | return img_format("SHLL_S.PH %s, %s, 0x%" PRIx64, rt, rs, sa_value); |
89a955e8 AM |
13607 | } |
13608 | ||
13609 | ||
13610 | /* | |
5c65eed6 | 13611 | * [DSP] SHLL_S.PH rt, rs, sa - Shift left logical word with saturation |
89a955e8 AM |
13612 | * |
13613 | * 3 2 1 | |
13614 | * 10987654321098765432109876543210 | |
5c65eed6 | 13615 | * 001000 x1111110101 |
89a955e8 AM |
13616 | * rt ----- |
13617 | * rs ----- | |
5c65eed6 | 13618 | * sa ----- |
89a955e8 | 13619 | */ |
7def8a4b | 13620 | static char *SHLL_S_W(uint64 instruction, Dis_info *info) |
89a955e8 AM |
13621 | { |
13622 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 13623 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 13624 | uint64 sa_value = extract_sa_15_14_13_12_11(instruction); |
89a955e8 | 13625 | |
3f2aec07 ML |
13626 | const char *rt = GPR(rt_value, info); |
13627 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 13628 | |
4066c152 | 13629 | return img_format("SHLL_S.W %s, %s, 0x%" PRIx64, rt, rs, sa_value); |
89a955e8 AM |
13630 | } |
13631 | ||
13632 | ||
13633 | /* | |
5c65eed6 AM |
13634 | * [DSP] SHLLV.PH rd, rt, rs - Shift left logical variable vector pair |
13635 | * halfwords | |
89a955e8 AM |
13636 | * |
13637 | * 3 2 1 | |
13638 | * 10987654321098765432109876543210 | |
5c65eed6 | 13639 | * 001000 01110001101 |
89a955e8 AM |
13640 | * rt ----- |
13641 | * rs ----- | |
13642 | * rd ----- | |
13643 | */ | |
7def8a4b | 13644 | static char *SHLLV_PH(uint64 instruction, Dis_info *info) |
89a955e8 AM |
13645 | { |
13646 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 13647 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 13648 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 13649 | |
3f2aec07 ML |
13650 | const char *rd = GPR(rd_value, info); |
13651 | const char *rt = GPR(rt_value, info); | |
13652 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 13653 | |
c5231692 | 13654 | return img_format("SHLLV.PH %s, %s, %s", rd, rt, rs); |
89a955e8 AM |
13655 | } |
13656 | ||
13657 | ||
13658 | /* | |
5c65eed6 | 13659 | * [DSP] SHLLV_S.QB rd, rt, rs - Shift left logical variable vector quad bytes |
89a955e8 AM |
13660 | * |
13661 | * 3 2 1 | |
13662 | * 10987654321098765432109876543210 | |
5c65eed6 | 13663 | * 001000 x1110010101 |
89a955e8 AM |
13664 | * rt ----- |
13665 | * rs ----- | |
13666 | * rd ----- | |
13667 | */ | |
7def8a4b | 13668 | static char *SHLLV_QB(uint64 instruction, Dis_info *info) |
89a955e8 AM |
13669 | { |
13670 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 13671 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 13672 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 13673 | |
3f2aec07 ML |
13674 | const char *rd = GPR(rd_value, info); |
13675 | const char *rt = GPR(rt_value, info); | |
13676 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 13677 | |
c5231692 | 13678 | return img_format("SHLLV.QB %s, %s, %s", rd, rt, rs); |
89a955e8 AM |
13679 | } |
13680 | ||
13681 | ||
13682 | /* | |
5c65eed6 AM |
13683 | * [DSP] SHLLV.PH rd, rt, rs - Shift left logical variable vector pair |
13684 | * halfwords with saturation | |
89a955e8 AM |
13685 | * |
13686 | * 3 2 1 | |
13687 | * 10987654321098765432109876543210 | |
5c65eed6 | 13688 | * 001000 11110001101 |
89a955e8 AM |
13689 | * rt ----- |
13690 | * rs ----- | |
13691 | * rd ----- | |
13692 | */ | |
7def8a4b | 13693 | static char *SHLLV_S_PH(uint64 instruction, Dis_info *info) |
89a955e8 AM |
13694 | { |
13695 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 13696 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 13697 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 13698 | |
3f2aec07 ML |
13699 | const char *rd = GPR(rd_value, info); |
13700 | const char *rt = GPR(rt_value, info); | |
13701 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 13702 | |
c5231692 | 13703 | return img_format("SHLLV_S.PH %s, %s, %s", rd, rt, rs); |
89a955e8 AM |
13704 | } |
13705 | ||
13706 | ||
13707 | /* | |
5c65eed6 | 13708 | * [DSP] SHLLV_S.W rd, rt, rs - Shift left logical variable vector word |
89a955e8 AM |
13709 | * |
13710 | * 3 2 1 | |
13711 | * 10987654321098765432109876543210 | |
5c65eed6 | 13712 | * 001000 x1111010101 |
89a955e8 AM |
13713 | * rt ----- |
13714 | * rs ----- | |
13715 | * rd ----- | |
13716 | */ | |
7def8a4b | 13717 | static char *SHLLV_S_W(uint64 instruction, Dis_info *info) |
89a955e8 AM |
13718 | { |
13719 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 13720 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 13721 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 13722 | |
3f2aec07 ML |
13723 | const char *rd = GPR(rd_value, info); |
13724 | const char *rt = GPR(rt_value, info); | |
13725 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 13726 | |
c5231692 | 13727 | return img_format("SHLLV_S.W %s, %s, %s", rd, rt, rs); |
89a955e8 AM |
13728 | } |
13729 | ||
13730 | ||
13731 | /* | |
13732 | * | |
13733 | * | |
13734 | * 3 2 1 | |
13735 | * 10987654321098765432109876543210 | |
13736 | * 001000 01001001101 | |
13737 | * rt ----- | |
13738 | * rs ----- | |
13739 | * rd ----- | |
13740 | */ | |
7def8a4b | 13741 | static char *SHRA_PH(uint64 instruction, Dis_info *info) |
89a955e8 AM |
13742 | { |
13743 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 13744 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 13745 | uint64 sa_value = extract_sa_15_14_13_12(instruction); |
89a955e8 | 13746 | |
3f2aec07 ML |
13747 | const char *rt = GPR(rt_value, info); |
13748 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 13749 | |
4066c152 | 13750 | return img_format("SHRA.PH %s, %s, 0x%" PRIx64, rt, rs, sa_value); |
89a955e8 AM |
13751 | } |
13752 | ||
13753 | ||
13754 | /* | |
13755 | * | |
13756 | * | |
13757 | * 3 2 1 | |
13758 | * 10987654321098765432109876543210 | |
13759 | * 001000 01001001101 | |
13760 | * rt ----- | |
13761 | * rs ----- | |
13762 | * rd ----- | |
13763 | */ | |
7def8a4b | 13764 | static char *SHRA_QB(uint64 instruction, Dis_info *info) |
89a955e8 AM |
13765 | { |
13766 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 13767 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 13768 | uint64 sa_value = extract_sa_15_14_13(instruction); |
89a955e8 | 13769 | |
3f2aec07 ML |
13770 | const char *rt = GPR(rt_value, info); |
13771 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 13772 | |
4066c152 | 13773 | return img_format("SHRA.QB %s, %s, 0x%" PRIx64, rt, rs, sa_value); |
89a955e8 AM |
13774 | } |
13775 | ||
13776 | ||
13777 | /* | |
13778 | * | |
13779 | * | |
13780 | * 3 2 1 | |
13781 | * 10987654321098765432109876543210 | |
13782 | * 001000 01001001101 | |
13783 | * rt ----- | |
13784 | * rs ----- | |
13785 | * rd ----- | |
13786 | */ | |
7def8a4b | 13787 | static char *SHRA_R_PH(uint64 instruction, Dis_info *info) |
89a955e8 AM |
13788 | { |
13789 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 13790 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 13791 | uint64 sa_value = extract_sa_15_14_13_12(instruction); |
89a955e8 | 13792 | |
3f2aec07 ML |
13793 | const char *rt = GPR(rt_value, info); |
13794 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 13795 | |
4066c152 | 13796 | return img_format("SHRA_R.PH %s, %s, 0x%" PRIx64, rt, rs, sa_value); |
89a955e8 AM |
13797 | } |
13798 | ||
13799 | ||
13800 | /* | |
13801 | * | |
13802 | * | |
13803 | * 3 2 1 | |
13804 | * 10987654321098765432109876543210 | |
13805 | * 001000 01001001101 | |
13806 | * rt ----- | |
13807 | * rs ----- | |
13808 | * rd ----- | |
13809 | */ | |
7def8a4b | 13810 | static char *SHRA_R_QB(uint64 instruction, Dis_info *info) |
89a955e8 AM |
13811 | { |
13812 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 13813 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 13814 | uint64 sa_value = extract_sa_15_14_13(instruction); |
89a955e8 | 13815 | |
3f2aec07 ML |
13816 | const char *rt = GPR(rt_value, info); |
13817 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 13818 | |
4066c152 | 13819 | return img_format("SHRA_R.QB %s, %s, 0x%" PRIx64, rt, rs, sa_value); |
89a955e8 AM |
13820 | } |
13821 | ||
13822 | ||
13823 | /* | |
13824 | * | |
13825 | * | |
13826 | * 3 2 1 | |
13827 | * 10987654321098765432109876543210 | |
13828 | * 001000 01001001101 | |
13829 | * rt ----- | |
13830 | * rs ----- | |
13831 | * rd ----- | |
13832 | */ | |
7def8a4b | 13833 | static char *SHRA_R_W(uint64 instruction, Dis_info *info) |
89a955e8 AM |
13834 | { |
13835 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 13836 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 13837 | uint64 sa_value = extract_sa_15_14_13_12_11(instruction); |
89a955e8 | 13838 | |
3f2aec07 ML |
13839 | const char *rt = GPR(rt_value, info); |
13840 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 13841 | |
4066c152 | 13842 | return img_format("SHRA_R.W %s, %s, 0x%" PRIx64, rt, rs, sa_value); |
89a955e8 AM |
13843 | } |
13844 | ||
13845 | ||
13846 | /* | |
13847 | * | |
13848 | * | |
13849 | * 3 2 1 | |
13850 | * 10987654321098765432109876543210 | |
13851 | * 001000 01001001101 | |
13852 | * rt ----- | |
13853 | * rs ----- | |
13854 | * rd ----- | |
13855 | */ | |
7def8a4b | 13856 | static char *SHRAV_PH(uint64 instruction, Dis_info *info) |
89a955e8 AM |
13857 | { |
13858 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 13859 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 13860 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 13861 | |
3f2aec07 ML |
13862 | const char *rd = GPR(rd_value, info); |
13863 | const char *rt = GPR(rt_value, info); | |
13864 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 13865 | |
c5231692 | 13866 | return img_format("SHRAV.PH %s, %s, %s", rd, rt, rs); |
89a955e8 AM |
13867 | } |
13868 | ||
13869 | ||
13870 | /* | |
13871 | * | |
13872 | * | |
13873 | * 3 2 1 | |
13874 | * 10987654321098765432109876543210 | |
13875 | * 001000 01001001101 | |
13876 | * rt ----- | |
13877 | * rs ----- | |
13878 | * rd ----- | |
13879 | */ | |
7def8a4b | 13880 | static char *SHRAV_QB(uint64 instruction, Dis_info *info) |
89a955e8 AM |
13881 | { |
13882 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 13883 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 13884 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 13885 | |
3f2aec07 ML |
13886 | const char *rd = GPR(rd_value, info); |
13887 | const char *rt = GPR(rt_value, info); | |
13888 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 13889 | |
c5231692 | 13890 | return img_format("SHRAV.QB %s, %s, %s", rd, rt, rs); |
89a955e8 AM |
13891 | } |
13892 | ||
13893 | ||
13894 | /* | |
13895 | * | |
13896 | * | |
13897 | * 3 2 1 | |
13898 | * 10987654321098765432109876543210 | |
13899 | * 001000 01001001101 | |
13900 | * rt ----- | |
13901 | * rs ----- | |
13902 | * rd ----- | |
13903 | */ | |
7def8a4b | 13904 | static char *SHRAV_R_PH(uint64 instruction, Dis_info *info) |
89a955e8 AM |
13905 | { |
13906 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 13907 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 13908 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 13909 | |
3f2aec07 ML |
13910 | const char *rd = GPR(rd_value, info); |
13911 | const char *rt = GPR(rt_value, info); | |
13912 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 13913 | |
c5231692 | 13914 | return img_format("SHRAV_R.PH %s, %s, %s", rd, rt, rs); |
89a955e8 AM |
13915 | } |
13916 | ||
13917 | ||
13918 | /* | |
13919 | * | |
13920 | * | |
13921 | * 3 2 1 | |
13922 | * 10987654321098765432109876543210 | |
13923 | * 001000 01001001101 | |
13924 | * rt ----- | |
13925 | * rs ----- | |
13926 | * rd ----- | |
13927 | */ | |
7def8a4b | 13928 | static char *SHRAV_R_QB(uint64 instruction, Dis_info *info) |
89a955e8 AM |
13929 | { |
13930 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 13931 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 13932 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 13933 | |
3f2aec07 ML |
13934 | const char *rd = GPR(rd_value, info); |
13935 | const char *rt = GPR(rt_value, info); | |
13936 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 13937 | |
c5231692 | 13938 | return img_format("SHRAV_R.QB %s, %s, %s", rd, rt, rs); |
89a955e8 AM |
13939 | } |
13940 | ||
13941 | ||
13942 | /* | |
13943 | * | |
13944 | * | |
13945 | * 3 2 1 | |
13946 | * 10987654321098765432109876543210 | |
13947 | * 001000 01001001101 | |
13948 | * rt ----- | |
13949 | * rs ----- | |
13950 | * rd ----- | |
13951 | */ | |
7def8a4b | 13952 | static char *SHRAV_R_W(uint64 instruction, Dis_info *info) |
89a955e8 AM |
13953 | { |
13954 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 13955 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 13956 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 13957 | |
3f2aec07 ML |
13958 | const char *rd = GPR(rd_value, info); |
13959 | const char *rt = GPR(rt_value, info); | |
13960 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 13961 | |
c5231692 | 13962 | return img_format("SHRAV_R.W %s, %s, %s", rd, rt, rs); |
89a955e8 AM |
13963 | } |
13964 | ||
13965 | ||
13966 | /* | |
5c65eed6 | 13967 | * [DSP] SHRL.PH rt, rs, sa - Shift right logical two halfwords |
89a955e8 AM |
13968 | * |
13969 | * 3 2 1 | |
13970 | * 10987654321098765432109876543210 | |
5c65eed6 | 13971 | * 001000 001111111111 |
89a955e8 AM |
13972 | * rt ----- |
13973 | * rs ----- | |
5c65eed6 | 13974 | * sa ---- |
89a955e8 | 13975 | */ |
7def8a4b | 13976 | static char *SHRL_PH(uint64 instruction, Dis_info *info) |
89a955e8 AM |
13977 | { |
13978 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 13979 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 13980 | uint64 sa_value = extract_sa_15_14_13_12(instruction); |
89a955e8 | 13981 | |
3f2aec07 ML |
13982 | const char *rt = GPR(rt_value, info); |
13983 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 13984 | |
4066c152 | 13985 | return img_format("SHRL.PH %s, %s, 0x%" PRIx64, rt, rs, sa_value); |
89a955e8 AM |
13986 | } |
13987 | ||
13988 | ||
13989 | /* | |
5c65eed6 | 13990 | * [DSP] SHRL.QB rt, rs, sa - Shift right logical vector quad bytes |
89a955e8 AM |
13991 | * |
13992 | * 3 2 1 | |
13993 | * 10987654321098765432109876543210 | |
5c65eed6 | 13994 | * 001000 1100001111111 |
89a955e8 AM |
13995 | * rt ----- |
13996 | * rs ----- | |
5c65eed6 | 13997 | * sa --- |
89a955e8 | 13998 | */ |
7def8a4b | 13999 | static char *SHRL_QB(uint64 instruction, Dis_info *info) |
89a955e8 AM |
14000 | { |
14001 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 14002 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 14003 | uint64 sa_value = extract_sa_15_14_13(instruction); |
89a955e8 | 14004 | |
3f2aec07 ML |
14005 | const char *rt = GPR(rt_value, info); |
14006 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 14007 | |
4066c152 | 14008 | return img_format("SHRL.QB %s, %s, 0x%" PRIx64, rt, rs, sa_value); |
89a955e8 AM |
14009 | } |
14010 | ||
14011 | ||
14012 | /* | |
5c65eed6 AM |
14013 | * [DSP] SHLLV.PH rd, rt, rs - Shift right logical variable vector pair of |
14014 | * halfwords | |
89a955e8 AM |
14015 | * |
14016 | * 3 2 1 | |
14017 | * 10987654321098765432109876543210 | |
5c65eed6 | 14018 | * 001000 x1100010101 |
89a955e8 AM |
14019 | * rt ----- |
14020 | * rs ----- | |
14021 | * rd ----- | |
14022 | */ | |
7def8a4b | 14023 | static char *SHRLV_PH(uint64 instruction, Dis_info *info) |
89a955e8 AM |
14024 | { |
14025 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 14026 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 14027 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 14028 | |
3f2aec07 ML |
14029 | const char *rd = GPR(rd_value, info); |
14030 | const char *rt = GPR(rt_value, info); | |
14031 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 14032 | |
c5231692 | 14033 | return img_format("SHRLV.PH %s, %s, %s", rd, rt, rs); |
89a955e8 AM |
14034 | } |
14035 | ||
14036 | ||
14037 | /* | |
5c65eed6 | 14038 | * [DSP] SHLLV.QB rd, rt, rs - Shift right logical variable vector quad bytes |
89a955e8 AM |
14039 | * |
14040 | * 3 2 1 | |
14041 | * 10987654321098765432109876543210 | |
5c65eed6 | 14042 | * 001000 x1101010101 |
89a955e8 AM |
14043 | * rt ----- |
14044 | * rs ----- | |
14045 | * rd ----- | |
14046 | */ | |
7def8a4b | 14047 | static char *SHRLV_QB(uint64 instruction, Dis_info *info) |
89a955e8 AM |
14048 | { |
14049 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 14050 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 14051 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 14052 | |
3f2aec07 ML |
14053 | const char *rd = GPR(rd_value, info); |
14054 | const char *rt = GPR(rt_value, info); | |
14055 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 14056 | |
c5231692 | 14057 | return img_format("SHRLV.QB %s, %s, %s", rd, rt, rs); |
89a955e8 AM |
14058 | } |
14059 | ||
14060 | ||
14061 | /* | |
14062 | * | |
14063 | * | |
14064 | * 3 2 1 | |
14065 | * 10987654321098765432109876543210 | |
14066 | * 001000 01001001101 | |
14067 | * rt ----- | |
14068 | * rs ----- | |
14069 | * rd ----- | |
14070 | */ | |
7def8a4b | 14071 | static char *SHX(uint64 instruction, Dis_info *info) |
89a955e8 AM |
14072 | { |
14073 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 14074 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 14075 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 14076 | |
3f2aec07 ML |
14077 | const char *rd = GPR(rd_value, info); |
14078 | const char *rs = GPR(rs_value, info); | |
14079 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 14080 | |
c5231692 | 14081 | return img_format("SHX %s, %s(%s)", rd, rs, rt); |
89a955e8 AM |
14082 | } |
14083 | ||
14084 | ||
14085 | /* | |
14086 | * | |
14087 | * | |
14088 | * 3 2 1 | |
14089 | * 10987654321098765432109876543210 | |
14090 | * 001000 01001001101 | |
14091 | * rt ----- | |
14092 | * rs ----- | |
14093 | * rd ----- | |
14094 | */ | |
7def8a4b | 14095 | static char *SHXS(uint64 instruction, Dis_info *info) |
89a955e8 AM |
14096 | { |
14097 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 14098 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 14099 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 14100 | |
3f2aec07 ML |
14101 | const char *rd = GPR(rd_value, info); |
14102 | const char *rs = GPR(rs_value, info); | |
14103 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 14104 | |
c5231692 | 14105 | return img_format("SHXS %s, %s(%s)", rd, rs, rt); |
89a955e8 AM |
14106 | } |
14107 | ||
14108 | ||
14109 | /* | |
14110 | * | |
14111 | * | |
14112 | * 3 2 1 | |
14113 | * 10987654321098765432109876543210 | |
14114 | * 001000 01001001101 | |
14115 | * rt ----- | |
14116 | * rs ----- | |
14117 | * rd ----- | |
14118 | */ | |
7def8a4b | 14119 | static char *SIGRIE(uint64 instruction, Dis_info *info) |
89a955e8 AM |
14120 | { |
14121 | uint64 code_value = extract_code_18_to_0(instruction); | |
14122 | ||
89a955e8 | 14123 | |
4066c152 | 14124 | return img_format("SIGRIE 0x%" PRIx64, code_value); |
89a955e8 AM |
14125 | } |
14126 | ||
14127 | ||
14128 | /* | |
14129 | * | |
14130 | * | |
14131 | * 3 2 1 | |
14132 | * 10987654321098765432109876543210 | |
14133 | * 001000 01001001101 | |
14134 | * rt ----- | |
14135 | * rs ----- | |
14136 | * rd ----- | |
14137 | */ | |
7def8a4b | 14138 | static char *SLL_16_(uint64 instruction, Dis_info *info) |
89a955e8 | 14139 | { |
89a955e8 AM |
14140 | uint64 rt3_value = extract_rt3_9_8_7(instruction); |
14141 | uint64 rs3_value = extract_rs3_6_5_4(instruction); | |
75199b40 | 14142 | uint64 shift3_value = extract_shift3_2_1_0(instruction); |
89a955e8 | 14143 | |
3f2aec07 ML |
14144 | const char *rt3 = GPR(decode_gpr_gpr3(rt3_value, info), info); |
14145 | const char *rs3 = GPR(decode_gpr_gpr3(rs3_value, info), info); | |
4066c152 | 14146 | uint64 shift3 = encode_shift3_from_shift(shift3_value); |
89a955e8 | 14147 | |
4066c152 | 14148 | return img_format("SLL %s, %s, 0x%" PRIx64, rt3, rs3, shift3); |
89a955e8 AM |
14149 | } |
14150 | ||
14151 | ||
14152 | /* | |
14153 | * | |
14154 | * | |
14155 | * 3 2 1 | |
14156 | * 10987654321098765432109876543210 | |
14157 | * 001000 01001001101 | |
14158 | * rt ----- | |
14159 | * rs ----- | |
14160 | * rd ----- | |
14161 | */ | |
7def8a4b | 14162 | static char *SLL_32_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
14163 | { |
14164 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 14165 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 14166 | uint64 shift_value = extract_shift_4_3_2_1_0(instruction); |
89a955e8 | 14167 | |
3f2aec07 ML |
14168 | const char *rt = GPR(rt_value, info); |
14169 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 14170 | |
4066c152 | 14171 | return img_format("SLL %s, %s, 0x%" PRIx64, rt, rs, shift_value); |
89a955e8 AM |
14172 | } |
14173 | ||
14174 | ||
14175 | /* | |
14176 | * | |
14177 | * | |
14178 | * 3 2 1 | |
14179 | * 10987654321098765432109876543210 | |
14180 | * 001000 01001001101 | |
14181 | * rt ----- | |
14182 | * rs ----- | |
14183 | * rd ----- | |
14184 | */ | |
7def8a4b | 14185 | static char *SLLV(uint64 instruction, Dis_info *info) |
89a955e8 AM |
14186 | { |
14187 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 14188 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 14189 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 14190 | |
3f2aec07 ML |
14191 | const char *rd = GPR(rd_value, info); |
14192 | const char *rs = GPR(rs_value, info); | |
14193 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 14194 | |
c5231692 | 14195 | return img_format("SLLV %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
14196 | } |
14197 | ||
14198 | ||
14199 | /* | |
14200 | * | |
14201 | * | |
14202 | * 3 2 1 | |
14203 | * 10987654321098765432109876543210 | |
14204 | * 001000 01001001101 | |
14205 | * rt ----- | |
14206 | * rs ----- | |
14207 | * rd ----- | |
14208 | */ | |
7def8a4b | 14209 | static char *SLT(uint64 instruction, Dis_info *info) |
89a955e8 AM |
14210 | { |
14211 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 14212 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 14213 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 14214 | |
3f2aec07 ML |
14215 | const char *rd = GPR(rd_value, info); |
14216 | const char *rs = GPR(rs_value, info); | |
14217 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 14218 | |
c5231692 | 14219 | return img_format("SLT %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
14220 | } |
14221 | ||
14222 | ||
14223 | /* | |
14224 | * | |
14225 | * | |
14226 | * 3 2 1 | |
14227 | * 10987654321098765432109876543210 | |
14228 | * 001000 01001001101 | |
14229 | * rt ----- | |
14230 | * rs ----- | |
14231 | * rd ----- | |
14232 | */ | |
7def8a4b | 14233 | static char *SLTI(uint64 instruction, Dis_info *info) |
89a955e8 AM |
14234 | { |
14235 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 14236 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 14237 | uint64 u_value = extract_u_11_10_9_8_7_6_5_4_3_2_1_0(instruction); |
89a955e8 | 14238 | |
3f2aec07 ML |
14239 | const char *rt = GPR(rt_value, info); |
14240 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 14241 | |
4066c152 | 14242 | return img_format("SLTI %s, %s, 0x%" PRIx64, rt, rs, u_value); |
89a955e8 AM |
14243 | } |
14244 | ||
14245 | ||
14246 | /* | |
14247 | * | |
14248 | * | |
14249 | * 3 2 1 | |
14250 | * 10987654321098765432109876543210 | |
14251 | * 001000 01001001101 | |
14252 | * rt ----- | |
14253 | * rs ----- | |
14254 | * rd ----- | |
14255 | */ | |
7def8a4b | 14256 | static char *SLTIU(uint64 instruction, Dis_info *info) |
89a955e8 AM |
14257 | { |
14258 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 14259 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 14260 | uint64 u_value = extract_u_11_10_9_8_7_6_5_4_3_2_1_0(instruction); |
89a955e8 | 14261 | |
3f2aec07 ML |
14262 | const char *rt = GPR(rt_value, info); |
14263 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 14264 | |
4066c152 | 14265 | return img_format("SLTIU %s, %s, 0x%" PRIx64, rt, rs, u_value); |
89a955e8 AM |
14266 | } |
14267 | ||
14268 | ||
14269 | /* | |
14270 | * | |
14271 | * | |
14272 | * 3 2 1 | |
14273 | * 10987654321098765432109876543210 | |
14274 | * 001000 01001001101 | |
14275 | * rt ----- | |
14276 | * rs ----- | |
14277 | * rd ----- | |
14278 | */ | |
7def8a4b | 14279 | static char *SLTU(uint64 instruction, Dis_info *info) |
89a955e8 AM |
14280 | { |
14281 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 14282 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 14283 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 14284 | |
3f2aec07 ML |
14285 | const char *rd = GPR(rd_value, info); |
14286 | const char *rs = GPR(rs_value, info); | |
14287 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 14288 | |
c5231692 | 14289 | return img_format("SLTU %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
14290 | } |
14291 | ||
14292 | ||
14293 | /* | |
14294 | * | |
14295 | * | |
14296 | * 3 2 1 | |
14297 | * 10987654321098765432109876543210 | |
14298 | * 001000 01001001101 | |
14299 | * rt ----- | |
14300 | * rs ----- | |
14301 | * rd ----- | |
14302 | */ | |
7def8a4b | 14303 | static char *SOV(uint64 instruction, Dis_info *info) |
89a955e8 AM |
14304 | { |
14305 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 14306 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 14307 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 14308 | |
3f2aec07 ML |
14309 | const char *rd = GPR(rd_value, info); |
14310 | const char *rs = GPR(rs_value, info); | |
14311 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 14312 | |
c5231692 | 14313 | return img_format("SOV %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
14314 | } |
14315 | ||
14316 | ||
14317 | /* | |
14318 | * | |
14319 | * | |
14320 | * 3 2 1 | |
14321 | * 10987654321098765432109876543210 | |
14322 | * 001000 01001001101 | |
14323 | * rt ----- | |
14324 | * rs ----- | |
14325 | * rd ----- | |
14326 | */ | |
7def8a4b | 14327 | static char *SPECIAL2(uint64 instruction, Dis_info *info) |
89a955e8 AM |
14328 | { |
14329 | uint64 op_value = extract_op_25_to_3(instruction); | |
14330 | ||
89a955e8 | 14331 | |
4066c152 | 14332 | return img_format("SPECIAL2 0x%" PRIx64, op_value); |
89a955e8 AM |
14333 | } |
14334 | ||
14335 | ||
14336 | /* | |
14337 | * | |
14338 | * | |
14339 | * 3 2 1 | |
14340 | * 10987654321098765432109876543210 | |
14341 | * 001000 01001001101 | |
14342 | * rt ----- | |
14343 | * rs ----- | |
14344 | * rd ----- | |
14345 | */ | |
7def8a4b | 14346 | static char *SQRT_D(uint64 instruction, Dis_info *info) |
89a955e8 | 14347 | { |
17ce2f00 | 14348 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 14349 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 | 14350 | |
3f2aec07 ML |
14351 | const char *ft = FPR(ft_value, info); |
14352 | const char *fs = FPR(fs_value, info); | |
89a955e8 | 14353 | |
c5231692 | 14354 | return img_format("SQRT.D %s, %s", ft, fs); |
89a955e8 AM |
14355 | } |
14356 | ||
14357 | ||
14358 | /* | |
14359 | * | |
14360 | * | |
14361 | * 3 2 1 | |
14362 | * 10987654321098765432109876543210 | |
14363 | * 001000 01001001101 | |
14364 | * rt ----- | |
14365 | * rs ----- | |
14366 | * rd ----- | |
14367 | */ | |
7def8a4b | 14368 | static char *SQRT_S(uint64 instruction, Dis_info *info) |
89a955e8 | 14369 | { |
17ce2f00 | 14370 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 14371 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 | 14372 | |
3f2aec07 ML |
14373 | const char *ft = FPR(ft_value, info); |
14374 | const char *fs = FPR(fs_value, info); | |
89a955e8 | 14375 | |
c5231692 | 14376 | return img_format("SQRT.S %s, %s", ft, fs); |
89a955e8 AM |
14377 | } |
14378 | ||
14379 | ||
14380 | /* | |
14381 | * SRA rd, rt, sa - Shift Word Right Arithmetic | |
14382 | * | |
14383 | * 3 2 1 | |
14384 | * 10987654321098765432109876543210 | |
14385 | * 00000000000 000011 | |
14386 | * rt ----- | |
14387 | * rd ----- | |
14388 | * sa ----- | |
14389 | */ | |
7def8a4b | 14390 | static char *SRA(uint64 instruction, Dis_info *info) |
89a955e8 AM |
14391 | { |
14392 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
14393 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
14394 | uint64 shift_value = extract_shift_4_3_2_1_0(instruction); | |
14395 | ||
3f2aec07 ML |
14396 | const char *rt = GPR(rt_value, info); |
14397 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 14398 | |
4066c152 | 14399 | return img_format("SRA %s, %s, 0x%" PRIx64, rt, rs, shift_value); |
89a955e8 AM |
14400 | } |
14401 | ||
14402 | ||
14403 | /* | |
14404 | * SRAV rd, rt, rs - Shift Word Right Arithmetic Variable | |
14405 | * | |
14406 | * 3 2 1 | |
14407 | * 10987654321098765432109876543210 | |
14408 | * 001000 00000000111 | |
14409 | * rs ----- | |
14410 | * rt ----- | |
14411 | * rd ----- | |
14412 | */ | |
7def8a4b | 14413 | static char *SRAV(uint64 instruction, Dis_info *info) |
89a955e8 AM |
14414 | { |
14415 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 14416 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 14417 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 14418 | |
3f2aec07 ML |
14419 | const char *rd = GPR(rd_value, info); |
14420 | const char *rs = GPR(rs_value, info); | |
14421 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 14422 | |
c5231692 | 14423 | return img_format("SRAV %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
14424 | } |
14425 | ||
14426 | ||
14427 | /* | |
14428 | * | |
14429 | * | |
14430 | * 3 2 1 | |
14431 | * 10987654321098765432109876543210 | |
14432 | * 001000 00000000111 | |
14433 | * rs ----- | |
14434 | * rt ----- | |
14435 | * rd ----- | |
14436 | */ | |
7def8a4b | 14437 | static char *SRL_16_(uint64 instruction, Dis_info *info) |
89a955e8 | 14438 | { |
89a955e8 AM |
14439 | uint64 rt3_value = extract_rt3_9_8_7(instruction); |
14440 | uint64 rs3_value = extract_rs3_6_5_4(instruction); | |
75199b40 | 14441 | uint64 shift3_value = extract_shift3_2_1_0(instruction); |
89a955e8 | 14442 | |
3f2aec07 ML |
14443 | const char *rt3 = GPR(decode_gpr_gpr3(rt3_value, info), info); |
14444 | const char *rs3 = GPR(decode_gpr_gpr3(rs3_value, info), info); | |
4066c152 | 14445 | uint64 shift3 = encode_shift3_from_shift(shift3_value); |
89a955e8 | 14446 | |
4066c152 | 14447 | return img_format("SRL %s, %s, 0x%" PRIx64, rt3, rs3, shift3); |
89a955e8 AM |
14448 | } |
14449 | ||
14450 | ||
14451 | /* | |
14452 | * | |
14453 | * | |
14454 | * 3 2 1 | |
14455 | * 10987654321098765432109876543210 | |
14456 | * 001000 01001001101 | |
14457 | * rt ----- | |
14458 | * rs ----- | |
14459 | * rd ----- | |
14460 | */ | |
7def8a4b | 14461 | static char *SRL_32_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
14462 | { |
14463 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 14464 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 14465 | uint64 shift_value = extract_shift_4_3_2_1_0(instruction); |
89a955e8 | 14466 | |
3f2aec07 ML |
14467 | const char *rt = GPR(rt_value, info); |
14468 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 14469 | |
4066c152 | 14470 | return img_format("SRL %s, %s, 0x%" PRIx64, rt, rs, shift_value); |
89a955e8 AM |
14471 | } |
14472 | ||
14473 | ||
14474 | /* | |
14475 | * | |
14476 | * | |
14477 | * 3 2 1 | |
14478 | * 10987654321098765432109876543210 | |
14479 | * 001000 01001001101 | |
14480 | * rt ----- | |
14481 | * rs ----- | |
14482 | * rd ----- | |
14483 | */ | |
7def8a4b | 14484 | static char *SRLV(uint64 instruction, Dis_info *info) |
89a955e8 AM |
14485 | { |
14486 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 14487 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 14488 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 14489 | |
3f2aec07 ML |
14490 | const char *rd = GPR(rd_value, info); |
14491 | const char *rs = GPR(rs_value, info); | |
14492 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 14493 | |
c5231692 | 14494 | return img_format("SRLV %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
14495 | } |
14496 | ||
14497 | ||
14498 | /* | |
14499 | * | |
14500 | * | |
14501 | * 3 2 1 | |
14502 | * 10987654321098765432109876543210 | |
14503 | * 001000 01001001101 | |
14504 | * rt ----- | |
14505 | * rs ----- | |
14506 | * rd ----- | |
14507 | */ | |
7def8a4b | 14508 | static char *SUB(uint64 instruction, Dis_info *info) |
89a955e8 AM |
14509 | { |
14510 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 14511 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 14512 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 14513 | |
3f2aec07 ML |
14514 | const char *rd = GPR(rd_value, info); |
14515 | const char *rs = GPR(rs_value, info); | |
14516 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 14517 | |
c5231692 | 14518 | return img_format("SUB %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
14519 | } |
14520 | ||
14521 | ||
14522 | /* | |
14523 | * | |
14524 | * | |
14525 | * 3 2 1 | |
14526 | * 10987654321098765432109876543210 | |
14527 | * 001000 01001001101 | |
14528 | * rt ----- | |
14529 | * rs ----- | |
14530 | * rd ----- | |
14531 | */ | |
7def8a4b | 14532 | static char *SUB_D(uint64 instruction, Dis_info *info) |
89a955e8 | 14533 | { |
17ce2f00 | 14534 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 14535 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 14536 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 | 14537 | |
3f2aec07 ML |
14538 | const char *fd = FPR(fd_value, info); |
14539 | const char *fs = FPR(fs_value, info); | |
14540 | const char *ft = FPR(ft_value, info); | |
89a955e8 | 14541 | |
c5231692 | 14542 | return img_format("SUB.D %s, %s, %s", fd, fs, ft); |
89a955e8 AM |
14543 | } |
14544 | ||
14545 | ||
14546 | /* | |
14547 | * | |
14548 | * | |
14549 | * 3 2 1 | |
14550 | * 10987654321098765432109876543210 | |
14551 | * 001000 01001001101 | |
14552 | * rt ----- | |
14553 | * rs ----- | |
14554 | * rd ----- | |
14555 | */ | |
7def8a4b | 14556 | static char *SUB_S(uint64 instruction, Dis_info *info) |
89a955e8 | 14557 | { |
17ce2f00 | 14558 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 14559 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 14560 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 | 14561 | |
3f2aec07 ML |
14562 | const char *fd = FPR(fd_value, info); |
14563 | const char *fs = FPR(fs_value, info); | |
14564 | const char *ft = FPR(ft_value, info); | |
89a955e8 | 14565 | |
c5231692 | 14566 | return img_format("SUB.S %s, %s, %s", fd, fs, ft); |
89a955e8 AM |
14567 | } |
14568 | ||
14569 | ||
14570 | /* | |
14571 | * | |
14572 | * | |
14573 | * 3 2 1 | |
14574 | * 10987654321098765432109876543210 | |
14575 | * 001000 01001001101 | |
14576 | * rt ----- | |
14577 | * rs ----- | |
14578 | * rd ----- | |
14579 | */ | |
7def8a4b | 14580 | static char *SUBQ_PH(uint64 instruction, Dis_info *info) |
89a955e8 AM |
14581 | { |
14582 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 14583 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 14584 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 14585 | |
3f2aec07 ML |
14586 | const char *rd = GPR(rd_value, info); |
14587 | const char *rs = GPR(rs_value, info); | |
14588 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 14589 | |
c5231692 | 14590 | return img_format("SUBQ.PH %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
14591 | } |
14592 | ||
14593 | ||
14594 | /* | |
5c65eed6 AM |
14595 | * [DSP] SUBQ.S.PH rd, rt, rs - Subtract fractional halfword vectors and shift |
14596 | * right to halve results | |
89a955e8 AM |
14597 | * |
14598 | * 3 2 1 | |
14599 | * 10987654321098765432109876543210 | |
14600 | * 001000 01001001101 | |
14601 | * rt ----- | |
14602 | * rs ----- | |
14603 | * rd ----- | |
14604 | */ | |
7def8a4b | 14605 | static char *SUBQ_S_PH(uint64 instruction, Dis_info *info) |
89a955e8 AM |
14606 | { |
14607 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 14608 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 14609 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 14610 | |
3f2aec07 ML |
14611 | const char *rd = GPR(rd_value, info); |
14612 | const char *rs = GPR(rs_value, info); | |
14613 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 14614 | |
c5231692 | 14615 | return img_format("SUBQ_S.PH %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
14616 | } |
14617 | ||
14618 | ||
14619 | /* | |
5c65eed6 AM |
14620 | * [DSP] SUBQ.S.W rd, rt, rs - Subtract fractional halfword vectors and shift |
14621 | * right to halve results | |
89a955e8 AM |
14622 | * |
14623 | * 3 2 1 | |
14624 | * 10987654321098765432109876543210 | |
14625 | * 001000 01001001101 | |
14626 | * rt ----- | |
14627 | * rs ----- | |
14628 | * rd ----- | |
14629 | */ | |
7def8a4b | 14630 | static char *SUBQ_S_W(uint64 instruction, Dis_info *info) |
89a955e8 AM |
14631 | { |
14632 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 14633 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 14634 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 14635 | |
3f2aec07 ML |
14636 | const char *rd = GPR(rd_value, info); |
14637 | const char *rs = GPR(rs_value, info); | |
14638 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 14639 | |
c5231692 | 14640 | return img_format("SUBQ_S.W %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
14641 | } |
14642 | ||
14643 | ||
14644 | /* | |
5c65eed6 AM |
14645 | * [DSP] SUBQH.PH rd, rt, rs - Subtract fractional halfword vectors and shift |
14646 | * right to halve results | |
89a955e8 AM |
14647 | * |
14648 | * 3 2 1 | |
14649 | * 10987654321098765432109876543210 | |
14650 | * 001000 01001001101 | |
14651 | * rt ----- | |
14652 | * rs ----- | |
14653 | * rd ----- | |
14654 | */ | |
7def8a4b | 14655 | static char *SUBQH_PH(uint64 instruction, Dis_info *info) |
89a955e8 AM |
14656 | { |
14657 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 14658 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 14659 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 14660 | |
3f2aec07 ML |
14661 | const char *rd = GPR(rd_value, info); |
14662 | const char *rs = GPR(rs_value, info); | |
14663 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 14664 | |
c5231692 | 14665 | return img_format("SUBQH.PH %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
14666 | } |
14667 | ||
14668 | ||
14669 | /* | |
5c65eed6 AM |
14670 | * [DSP] SUBQH_R.PH rd, rt, rs - Subtract fractional halfword vectors and shift |
14671 | * right to halve results | |
89a955e8 AM |
14672 | * |
14673 | * 3 2 1 | |
14674 | * 10987654321098765432109876543210 | |
14675 | * 001000 01001001101 | |
14676 | * rt ----- | |
14677 | * rs ----- | |
14678 | * rd ----- | |
14679 | */ | |
7def8a4b | 14680 | static char *SUBQH_R_PH(uint64 instruction, Dis_info *info) |
89a955e8 AM |
14681 | { |
14682 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 14683 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 14684 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 14685 | |
3f2aec07 ML |
14686 | const char *rd = GPR(rd_value, info); |
14687 | const char *rs = GPR(rs_value, info); | |
14688 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 14689 | |
c5231692 | 14690 | return img_format("SUBQH_R.PH %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
14691 | } |
14692 | ||
14693 | ||
14694 | /* | |
5c65eed6 AM |
14695 | * [DSP] SUBQH_R.W rd, rt, rs - Subtract fractional halfword vectors and shift |
14696 | * right to halve results with rounding | |
89a955e8 AM |
14697 | * |
14698 | * 3 2 1 | |
14699 | * 10987654321098765432109876543210 | |
14700 | * 001000 11001001101 | |
14701 | * rt ----- | |
14702 | * rs ----- | |
14703 | * rd ----- | |
14704 | */ | |
7def8a4b | 14705 | static char *SUBQH_R_W(uint64 instruction, Dis_info *info) |
89a955e8 AM |
14706 | { |
14707 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 14708 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 14709 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 14710 | |
3f2aec07 ML |
14711 | const char *rd = GPR(rd_value, info); |
14712 | const char *rs = GPR(rs_value, info); | |
14713 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 14714 | |
c5231692 | 14715 | return img_format("SUBQH_R.W %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
14716 | } |
14717 | ||
14718 | ||
14719 | /* | |
5c65eed6 AM |
14720 | * [DSP] SUBQH.W rd, rs, rt - Subtract fractional words and shift right to |
14721 | * halve results | |
89a955e8 AM |
14722 | * |
14723 | * 3 2 1 | |
14724 | * 10987654321098765432109876543210 | |
14725 | * 001000 01010001101 | |
14726 | * rt ----- | |
14727 | * rs ----- | |
14728 | * rd ----- | |
14729 | */ | |
7def8a4b | 14730 | static char *SUBQH_W(uint64 instruction, Dis_info *info) |
89a955e8 AM |
14731 | { |
14732 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 14733 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 14734 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 14735 | |
3f2aec07 ML |
14736 | const char *rd = GPR(rd_value, info); |
14737 | const char *rs = GPR(rs_value, info); | |
14738 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 14739 | |
c5231692 | 14740 | return img_format("SUBQH.W %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
14741 | } |
14742 | ||
14743 | ||
14744 | /* | |
14745 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
14746 | * | |
14747 | * 3 2 1 | |
14748 | * 10987654321098765432109876543210 | |
14749 | * 001000 00010001101 | |
14750 | * rt ----- | |
14751 | * rs ----- | |
14752 | * rd ----- | |
14753 | */ | |
7def8a4b | 14754 | static char *SUBU_16_(uint64 instruction, Dis_info *info) |
89a955e8 | 14755 | { |
89a955e8 AM |
14756 | uint64 rt3_value = extract_rt3_9_8_7(instruction); |
14757 | uint64 rs3_value = extract_rs3_6_5_4(instruction); | |
86b5f803 | 14758 | uint64 rd3_value = extract_rd3_3_2_1(instruction); |
89a955e8 | 14759 | |
3f2aec07 ML |
14760 | const char *rd3 = GPR(decode_gpr_gpr3(rd3_value, info), info); |
14761 | const char *rs3 = GPR(decode_gpr_gpr3(rs3_value, info), info); | |
14762 | const char *rt3 = GPR(decode_gpr_gpr3(rt3_value, info), info); | |
89a955e8 | 14763 | |
c5231692 | 14764 | return img_format("SUBU %s, %s, %s", rd3, rs3, rt3); |
89a955e8 AM |
14765 | } |
14766 | ||
14767 | ||
14768 | /* | |
14769 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
14770 | * | |
14771 | * 3 2 1 | |
14772 | * 10987654321098765432109876543210 | |
14773 | * 001000 00010001101 | |
14774 | * rt ----- | |
14775 | * rs ----- | |
14776 | * rd ----- | |
14777 | */ | |
7def8a4b | 14778 | static char *SUBU_32_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
14779 | { |
14780 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 14781 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 14782 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 14783 | |
3f2aec07 ML |
14784 | const char *rd = GPR(rd_value, info); |
14785 | const char *rs = GPR(rs_value, info); | |
14786 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 14787 | |
c5231692 | 14788 | return img_format("SUBU %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
14789 | } |
14790 | ||
14791 | ||
14792 | /* | |
fc95c241 | 14793 | * [DSP] SUBU.PH rd, rs, rt - Subtract unsigned unsigned halfwords |
89a955e8 AM |
14794 | * |
14795 | * 3 2 1 | |
14796 | * 10987654321098765432109876543210 | |
14797 | * 001000 01100001101 | |
14798 | * rt ----- | |
14799 | * rs ----- | |
14800 | * rd ----- | |
14801 | */ | |
7def8a4b | 14802 | static char *SUBU_PH(uint64 instruction, Dis_info *info) |
89a955e8 AM |
14803 | { |
14804 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 14805 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 14806 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 14807 | |
3f2aec07 ML |
14808 | const char *rd = GPR(rd_value, info); |
14809 | const char *rs = GPR(rs_value, info); | |
14810 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 14811 | |
c5231692 | 14812 | return img_format("SUBU.PH %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
14813 | } |
14814 | ||
14815 | ||
14816 | /* | |
fc95c241 | 14817 | * [DSP] SUBU.QB rd, rs, rt - Subtract unsigned quad byte vectors |
89a955e8 AM |
14818 | * |
14819 | * 3 2 1 | |
14820 | * 10987654321098765432109876543210 | |
14821 | * 001000 01011001101 | |
14822 | * rt ----- | |
14823 | * rs ----- | |
14824 | * rd ----- | |
14825 | */ | |
7def8a4b | 14826 | static char *SUBU_QB(uint64 instruction, Dis_info *info) |
89a955e8 AM |
14827 | { |
14828 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 14829 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 14830 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 14831 | |
3f2aec07 ML |
14832 | const char *rd = GPR(rd_value, info); |
14833 | const char *rs = GPR(rs_value, info); | |
14834 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 14835 | |
c5231692 | 14836 | return img_format("SUBU.QB %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
14837 | } |
14838 | ||
14839 | ||
14840 | /* | |
fc95c241 | 14841 | * [DSP] SUBU_S.PH rd, rs, rt - Subtract unsigned unsigned halfwords with |
5c65eed6 | 14842 | * 8-bit saturation |
89a955e8 AM |
14843 | * |
14844 | * 3 2 1 | |
14845 | * 10987654321098765432109876543210 | |
14846 | * 001000 11100001101 | |
14847 | * rt ----- | |
14848 | * rs ----- | |
14849 | * rd ----- | |
14850 | */ | |
7def8a4b | 14851 | static char *SUBU_S_PH(uint64 instruction, Dis_info *info) |
89a955e8 AM |
14852 | { |
14853 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 14854 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 14855 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 14856 | |
3f2aec07 ML |
14857 | const char *rd = GPR(rd_value, info); |
14858 | const char *rs = GPR(rs_value, info); | |
14859 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 14860 | |
c5231692 | 14861 | return img_format("SUBU_S.PH %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
14862 | } |
14863 | ||
14864 | ||
14865 | /* | |
fc95c241 | 14866 | * [DSP] SUBU_S.QB rd, rs, rt - Subtract unsigned quad byte vectors with |
5c65eed6 | 14867 | * 8-bit saturation |
89a955e8 AM |
14868 | * |
14869 | * 3 2 1 | |
14870 | * 10987654321098765432109876543210 | |
14871 | * 001000 11011001101 | |
14872 | * rt ----- | |
14873 | * rs ----- | |
14874 | * rd ----- | |
14875 | */ | |
7def8a4b | 14876 | static char *SUBU_S_QB(uint64 instruction, Dis_info *info) |
89a955e8 AM |
14877 | { |
14878 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 14879 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 14880 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 14881 | |
3f2aec07 ML |
14882 | const char *rd = GPR(rd_value, info); |
14883 | const char *rs = GPR(rs_value, info); | |
14884 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 14885 | |
c5231692 | 14886 | return img_format("SUBU_S.QB %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
14887 | } |
14888 | ||
14889 | ||
14890 | /* | |
fc95c241 | 14891 | * [DSP] SUBUH.QB rd, rs, rt - Subtract unsigned bytes and right shift |
5c65eed6 | 14892 | * to halve results |
89a955e8 AM |
14893 | * |
14894 | * 3 2 1 | |
14895 | * 10987654321098765432109876543210 | |
14896 | * 001000 01101001101 | |
14897 | * rt ----- | |
14898 | * rs ----- | |
14899 | * rd ----- | |
14900 | */ | |
7def8a4b | 14901 | static char *SUBUH_QB(uint64 instruction, Dis_info *info) |
89a955e8 AM |
14902 | { |
14903 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 14904 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 14905 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 14906 | |
3f2aec07 ML |
14907 | const char *rd = GPR(rd_value, info); |
14908 | const char *rs = GPR(rs_value, info); | |
14909 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 14910 | |
c5231692 | 14911 | return img_format("SUBUH.QB %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
14912 | } |
14913 | ||
14914 | ||
14915 | /* | |
fc95c241 | 14916 | * [DSP] SUBUH_R.QB rd, rs, rt - Subtract unsigned bytes and right shift |
5c65eed6 | 14917 | * to halve results with rounding |
89a955e8 AM |
14918 | * |
14919 | * 3 2 1 | |
14920 | * 10987654321098765432109876543210 | |
14921 | * 001000 11101001101 | |
14922 | * rt ----- | |
14923 | * rs ----- | |
14924 | * rd ----- | |
14925 | */ | |
7def8a4b | 14926 | static char *SUBUH_R_QB(uint64 instruction, Dis_info *info) |
89a955e8 AM |
14927 | { |
14928 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 14929 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 14930 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 14931 | |
3f2aec07 ML |
14932 | const char *rd = GPR(rd_value, info); |
14933 | const char *rs = GPR(rs_value, info); | |
14934 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 14935 | |
c5231692 | 14936 | return img_format("SUBUH_R.QB %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
14937 | } |
14938 | ||
14939 | ||
14940 | /* | |
14941 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
14942 | * | |
14943 | * 3 2 1 | |
14944 | * 10987654321098765432109876543210 | |
14945 | * 001000 00010001101 | |
14946 | * rt ----- | |
14947 | * rs ----- | |
14948 | * rd ----- | |
14949 | */ | |
7def8a4b | 14950 | static char *SW_16_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
14951 | { |
14952 | uint64 rtz3_value = extract_rtz3_9_8_7(instruction); | |
89a955e8 | 14953 | uint64 rs3_value = extract_rs3_6_5_4(instruction); |
75199b40 | 14954 | uint64 u_value = extract_u_3_2_1_0__s2(instruction); |
89a955e8 | 14955 | |
3f2aec07 ML |
14956 | const char *rtz3 = GPR(decode_gpr_gpr3_src_store(rtz3_value, info), info); |
14957 | const char *rs3 = GPR(decode_gpr_gpr3(rs3_value, info), info); | |
89a955e8 | 14958 | |
4066c152 | 14959 | return img_format("SW %s, 0x%" PRIx64 "(%s)", rtz3, u_value, rs3); |
89a955e8 AM |
14960 | } |
14961 | ||
14962 | ||
14963 | /* | |
14964 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
14965 | * | |
14966 | * 3 2 1 | |
14967 | * 10987654321098765432109876543210 | |
14968 | * 001000 00010001101 | |
14969 | * rt ----- | |
14970 | * rs ----- | |
14971 | * rd ----- | |
14972 | */ | |
7def8a4b | 14973 | static char *SW_4X4_(uint64 instruction, Dis_info *info) |
89a955e8 | 14974 | { |
89a955e8 | 14975 | uint64 rtz4_value = extract_rtz4_9_7_6_5(instruction); |
75199b40 | 14976 | uint64 rs4_value = extract_rs4_4_2_1_0(instruction); |
11b9732a | 14977 | uint64 u_value = extract_u_3_8__s2(instruction); |
89a955e8 | 14978 | |
3f2aec07 ML |
14979 | const char *rtz4 = GPR(decode_gpr_gpr4_zero(rtz4_value, info), info); |
14980 | const char *rs4 = GPR(decode_gpr_gpr4(rs4_value, info), info); | |
89a955e8 | 14981 | |
4066c152 | 14982 | return img_format("SW %s, 0x%" PRIx64 "(%s)", rtz4, u_value, rs4); |
89a955e8 AM |
14983 | } |
14984 | ||
14985 | ||
14986 | /* | |
14987 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
14988 | * | |
14989 | * 3 2 1 | |
14990 | * 10987654321098765432109876543210 | |
14991 | * 001000 00010001101 | |
14992 | * rt ----- | |
14993 | * rs ----- | |
14994 | * rd ----- | |
14995 | */ | |
7def8a4b | 14996 | static char *SW_GP16_(uint64 instruction, Dis_info *info) |
89a955e8 | 14997 | { |
11b9732a | 14998 | uint64 u_value = extract_u_6_5_4_3_2_1_0__s2(instruction); |
75199b40 | 14999 | uint64 rtz3_value = extract_rtz3_9_8_7(instruction); |
89a955e8 | 15000 | |
3f2aec07 | 15001 | const char *rtz3 = GPR(decode_gpr_gpr3_src_store(rtz3_value, info), info); |
89a955e8 | 15002 | |
4066c152 | 15003 | return img_format("SW %s, 0x%" PRIx64 "($%d)", rtz3, u_value, 28); |
89a955e8 AM |
15004 | } |
15005 | ||
15006 | ||
15007 | /* | |
15008 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
15009 | * | |
15010 | * 3 2 1 | |
15011 | * 10987654321098765432109876543210 | |
15012 | * 001000 00010001101 | |
15013 | * rt ----- | |
15014 | * rs ----- | |
15015 | * rd ----- | |
15016 | */ | |
7def8a4b | 15017 | static char *SW_GP_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
15018 | { |
15019 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
11b9732a | 15020 | uint64 u_value = extract_u_20_to_2__s2(instruction); |
89a955e8 | 15021 | |
3f2aec07 | 15022 | const char *rt = GPR(rt_value, info); |
89a955e8 | 15023 | |
4066c152 | 15024 | return img_format("SW %s, 0x%" PRIx64 "($%d)", rt, u_value, 28); |
89a955e8 AM |
15025 | } |
15026 | ||
15027 | ||
15028 | /* | |
15029 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
15030 | * | |
15031 | * 3 2 1 | |
15032 | * 10987654321098765432109876543210 | |
15033 | * 001000 00010001101 | |
15034 | * rt ----- | |
15035 | * rs ----- | |
15036 | * rd ----- | |
15037 | */ | |
7def8a4b | 15038 | static char *SW_S9_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
15039 | { |
15040 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
d3605cc0 | 15041 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
89a955e8 AM |
15042 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
15043 | ||
3f2aec07 ML |
15044 | const char *rt = GPR(rt_value, info); |
15045 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 15046 | |
4066c152 | 15047 | return img_format("SW %s, %" PRId64 "(%s)", rt, s_value, rs); |
89a955e8 AM |
15048 | } |
15049 | ||
15050 | ||
15051 | /* | |
15052 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
15053 | * | |
15054 | * 3 2 1 | |
15055 | * 10987654321098765432109876543210 | |
15056 | * 001000 00010001101 | |
15057 | * rt ----- | |
15058 | * rs ----- | |
15059 | * rd ----- | |
15060 | */ | |
7def8a4b | 15061 | static char *SW_SP_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
15062 | { |
15063 | uint64 rt_value = extract_rt_9_8_7_6_5(instruction); | |
11b9732a | 15064 | uint64 u_value = extract_u_4_3_2_1_0__s2(instruction); |
89a955e8 | 15065 | |
3f2aec07 | 15066 | const char *rt = GPR(rt_value, info); |
89a955e8 | 15067 | |
4066c152 | 15068 | return img_format("SW %s, 0x%" PRIx64 "($%d)", rt, u_value, 29); |
89a955e8 AM |
15069 | } |
15070 | ||
15071 | ||
15072 | /* | |
15073 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
15074 | * | |
15075 | * 3 2 1 | |
15076 | * 10987654321098765432109876543210 | |
15077 | * 001000 00010001101 | |
15078 | * rt ----- | |
15079 | * rs ----- | |
15080 | * rd ----- | |
15081 | */ | |
7def8a4b | 15082 | static char *SW_U12_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
15083 | { |
15084 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 15085 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 15086 | uint64 u_value = extract_u_11_10_9_8_7_6_5_4_3_2_1_0(instruction); |
89a955e8 | 15087 | |
3f2aec07 ML |
15088 | const char *rt = GPR(rt_value, info); |
15089 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 15090 | |
4066c152 | 15091 | return img_format("SW %s, 0x%" PRIx64 "(%s)", rt, u_value, rs); |
89a955e8 AM |
15092 | } |
15093 | ||
15094 | ||
15095 | /* | |
15096 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
15097 | * | |
15098 | * 3 2 1 | |
15099 | * 10987654321098765432109876543210 | |
15100 | * 001000 00010001101 | |
15101 | * rt ----- | |
15102 | * rs ----- | |
15103 | * rd ----- | |
15104 | */ | |
7def8a4b | 15105 | static char *SWC1_GP_(uint64 instruction, Dis_info *info) |
89a955e8 | 15106 | { |
17ce2f00 | 15107 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
11b9732a | 15108 | uint64 u_value = extract_u_17_to_2__s2(instruction); |
89a955e8 | 15109 | |
3f2aec07 | 15110 | const char *ft = FPR(ft_value, info); |
89a955e8 | 15111 | |
4066c152 | 15112 | return img_format("SWC1 %s, 0x%" PRIx64 "($%d)", ft, u_value, 28); |
89a955e8 AM |
15113 | } |
15114 | ||
15115 | ||
15116 | /* | |
15117 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
15118 | * | |
15119 | * 3 2 1 | |
15120 | * 10987654321098765432109876543210 | |
15121 | * 001000 00010001101 | |
15122 | * rt ----- | |
15123 | * rs ----- | |
15124 | * rd ----- | |
15125 | */ | |
7def8a4b | 15126 | static char *SWC1_S9_(uint64 instruction, Dis_info *info) |
89a955e8 | 15127 | { |
17ce2f00 | 15128 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
89a955e8 | 15129 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 15130 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
89a955e8 | 15131 | |
3f2aec07 ML |
15132 | const char *ft = FPR(ft_value, info); |
15133 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 15134 | |
4066c152 | 15135 | return img_format("SWC1 %s, %" PRId64 "(%s)", ft, s_value, rs); |
89a955e8 AM |
15136 | } |
15137 | ||
15138 | ||
15139 | /* | |
15140 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
15141 | * | |
15142 | * 3 2 1 | |
15143 | * 10987654321098765432109876543210 | |
15144 | * 001000 00010001101 | |
15145 | * rt ----- | |
15146 | * rs ----- | |
15147 | * rd ----- | |
15148 | */ | |
7def8a4b | 15149 | static char *SWC1_U12_(uint64 instruction, Dis_info *info) |
89a955e8 | 15150 | { |
17ce2f00 | 15151 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
89a955e8 | 15152 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 15153 | uint64 u_value = extract_u_11_10_9_8_7_6_5_4_3_2_1_0(instruction); |
89a955e8 | 15154 | |
3f2aec07 ML |
15155 | const char *ft = FPR(ft_value, info); |
15156 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 15157 | |
4066c152 | 15158 | return img_format("SWC1 %s, 0x%" PRIx64 "(%s)", ft, u_value, rs); |
89a955e8 AM |
15159 | } |
15160 | ||
15161 | ||
15162 | /* | |
15163 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
15164 | * | |
15165 | * 3 2 1 | |
15166 | * 10987654321098765432109876543210 | |
15167 | * 001000 00010001101 | |
15168 | * rt ----- | |
15169 | * rs ----- | |
15170 | * rd ----- | |
15171 | */ | |
7def8a4b | 15172 | static char *SWC1X(uint64 instruction, Dis_info *info) |
89a955e8 AM |
15173 | { |
15174 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 15175 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 15176 | uint64 ft_value = extract_ft_15_14_13_12_11(instruction); |
89a955e8 | 15177 | |
3f2aec07 ML |
15178 | const char *ft = FPR(ft_value, info); |
15179 | const char *rs = GPR(rs_value, info); | |
15180 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 15181 | |
c5231692 | 15182 | return img_format("SWC1X %s, %s(%s)", ft, rs, rt); |
89a955e8 AM |
15183 | } |
15184 | ||
15185 | ||
15186 | /* | |
15187 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
15188 | * | |
15189 | * 3 2 1 | |
15190 | * 10987654321098765432109876543210 | |
15191 | * 001000 00010001101 | |
15192 | * rt ----- | |
15193 | * rs ----- | |
15194 | * rd ----- | |
15195 | */ | |
7def8a4b | 15196 | static char *SWC1XS(uint64 instruction, Dis_info *info) |
89a955e8 AM |
15197 | { |
15198 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 15199 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 15200 | uint64 ft_value = extract_ft_15_14_13_12_11(instruction); |
89a955e8 | 15201 | |
3f2aec07 ML |
15202 | const char *ft = FPR(ft_value, info); |
15203 | const char *rs = GPR(rs_value, info); | |
15204 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 15205 | |
c5231692 | 15206 | return img_format("SWC1XS %s, %s(%s)", ft, rs, rt); |
89a955e8 AM |
15207 | } |
15208 | ||
15209 | ||
15210 | /* | |
15211 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
15212 | * | |
15213 | * 3 2 1 | |
15214 | * 10987654321098765432109876543210 | |
15215 | * 001000 00010001101 | |
15216 | * rt ----- | |
15217 | * rs ----- | |
15218 | * rd ----- | |
15219 | */ | |
7def8a4b | 15220 | static char *SWC2(uint64 instruction, Dis_info *info) |
89a955e8 AM |
15221 | { |
15222 | uint64 cs_value = extract_cs_25_24_23_22_21(instruction); | |
89a955e8 | 15223 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 15224 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
89a955e8 | 15225 | |
3f2aec07 | 15226 | const char *rs = GPR(rs_value, info); |
89a955e8 | 15227 | |
043dc73c ML |
15228 | return img_format("SWC2 CP%" PRIu64 ", %" PRId64 "(%s)", |
15229 | cs_value, s_value, rs); | |
89a955e8 AM |
15230 | } |
15231 | ||
15232 | ||
15233 | /* | |
15234 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
15235 | * | |
15236 | * 3 2 1 | |
15237 | * 10987654321098765432109876543210 | |
15238 | * 001000 00010001101 | |
15239 | * rt ----- | |
15240 | * rs ----- | |
15241 | * rd ----- | |
15242 | */ | |
7def8a4b | 15243 | static char *SWE(uint64 instruction, Dis_info *info) |
89a955e8 AM |
15244 | { |
15245 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 15246 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 15247 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
89a955e8 | 15248 | |
3f2aec07 ML |
15249 | const char *rt = GPR(rt_value, info); |
15250 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 15251 | |
4066c152 | 15252 | return img_format("SWE %s, %" PRId64 "(%s)", rt, s_value, rs); |
89a955e8 AM |
15253 | } |
15254 | ||
15255 | ||
15256 | /* | |
15257 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
15258 | * | |
15259 | * 3 2 1 | |
15260 | * 10987654321098765432109876543210 | |
15261 | * 001000 00010001101 | |
15262 | * rt ----- | |
15263 | * rs ----- | |
15264 | * rd ----- | |
15265 | */ | |
7def8a4b | 15266 | static char *SWM(uint64 instruction, Dis_info *info) |
89a955e8 AM |
15267 | { |
15268 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 15269 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 AM |
15270 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
15271 | uint64 count3_value = extract_count3_14_13_12(instruction); | |
89a955e8 | 15272 | |
3f2aec07 ML |
15273 | const char *rt = GPR(rt_value, info); |
15274 | const char *rs = GPR(rs_value, info); | |
4066c152 | 15275 | uint64 count3 = encode_count3_from_count(count3_value); |
89a955e8 | 15276 | |
4066c152 ML |
15277 | return img_format("SWM %s, %" PRId64 "(%s), 0x%" PRIx64, |
15278 | rt, s_value, rs, count3); | |
89a955e8 AM |
15279 | } |
15280 | ||
15281 | ||
15282 | /* | |
15283 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
15284 | * | |
15285 | * 3 2 1 | |
15286 | * 10987654321098765432109876543210 | |
15287 | * 001000 00010001101 | |
15288 | * rt ----- | |
15289 | * rs ----- | |
15290 | * rd ----- | |
15291 | */ | |
7def8a4b | 15292 | static char *SWPC_48_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
15293 | { |
15294 | uint64 rt_value = extract_rt_41_40_39_38_37(instruction); | |
d3605cc0 | 15295 | int64 s_value = extract_s__se31_15_to_0_31_to_16(instruction); |
89a955e8 | 15296 | |
3f2aec07 | 15297 | const char *rt = GPR(rt_value, info); |
22e7b52a | 15298 | g_autofree char *s = ADDRESS(s_value, 6, info); |
89a955e8 | 15299 | |
c5231692 | 15300 | return img_format("SWPC %s, %s", rt, s); |
89a955e8 AM |
15301 | } |
15302 | ||
15303 | ||
15304 | /* | |
15305 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
15306 | * | |
15307 | * 3 2 1 | |
15308 | * 10987654321098765432109876543210 | |
15309 | * 001000 00010001101 | |
15310 | * rt ----- | |
15311 | * rs ----- | |
15312 | * rd ----- | |
15313 | */ | |
7def8a4b | 15314 | static char *SWX(uint64 instruction, Dis_info *info) |
89a955e8 AM |
15315 | { |
15316 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 15317 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 15318 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 15319 | |
3f2aec07 ML |
15320 | const char *rd = GPR(rd_value, info); |
15321 | const char *rs = GPR(rs_value, info); | |
15322 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 15323 | |
c5231692 | 15324 | return img_format("SWX %s, %s(%s)", rd, rs, rt); |
89a955e8 AM |
15325 | } |
15326 | ||
15327 | ||
15328 | /* | |
15329 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
15330 | * | |
15331 | * 3 2 1 | |
15332 | * 10987654321098765432109876543210 | |
15333 | * 001000 00010001101 | |
15334 | * rt ----- | |
15335 | * rs ----- | |
15336 | * rd ----- | |
15337 | */ | |
7def8a4b | 15338 | static char *SWXS(uint64 instruction, Dis_info *info) |
89a955e8 AM |
15339 | { |
15340 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 15341 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 15342 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 15343 | |
3f2aec07 ML |
15344 | const char *rd = GPR(rd_value, info); |
15345 | const char *rs = GPR(rs_value, info); | |
15346 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 15347 | |
c5231692 | 15348 | return img_format("SWXS %s, %s(%s)", rd, rs, rt); |
89a955e8 AM |
15349 | } |
15350 | ||
15351 | ||
15352 | /* | |
15353 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
15354 | * | |
15355 | * 3 2 1 | |
15356 | * 10987654321098765432109876543210 | |
15357 | * 001000 00010001101 | |
15358 | * rt ----- | |
15359 | * rs ----- | |
15360 | * rd ----- | |
15361 | */ | |
7def8a4b | 15362 | static char *SYNC(uint64 instruction, Dis_info *info) |
89a955e8 AM |
15363 | { |
15364 | uint64 stype_value = extract_stype_20_19_18_17_16(instruction); | |
15365 | ||
89a955e8 | 15366 | |
4066c152 | 15367 | return img_format("SYNC 0x%" PRIx64, stype_value); |
89a955e8 AM |
15368 | } |
15369 | ||
15370 | ||
15371 | /* | |
15372 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
15373 | * | |
15374 | * 3 2 1 | |
15375 | * 10987654321098765432109876543210 | |
15376 | * 001000 00010001101 | |
15377 | * rt ----- | |
15378 | * rs ----- | |
15379 | * rd ----- | |
15380 | */ | |
7def8a4b | 15381 | static char *SYNCI(uint64 instruction, Dis_info *info) |
89a955e8 | 15382 | { |
89a955e8 | 15383 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 15384 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
89a955e8 | 15385 | |
3f2aec07 | 15386 | const char *rs = GPR(rs_value, info); |
89a955e8 | 15387 | |
4066c152 | 15388 | return img_format("SYNCI %" PRId64 "(%s)", s_value, rs); |
89a955e8 AM |
15389 | } |
15390 | ||
15391 | ||
15392 | /* | |
15393 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
15394 | * | |
15395 | * 3 2 1 | |
15396 | * 10987654321098765432109876543210 | |
15397 | * 001000 00010001101 | |
15398 | * rt ----- | |
15399 | * rs ----- | |
15400 | * rd ----- | |
15401 | */ | |
7def8a4b | 15402 | static char *SYNCIE(uint64 instruction, Dis_info *info) |
89a955e8 | 15403 | { |
89a955e8 | 15404 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 15405 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
89a955e8 | 15406 | |
3f2aec07 | 15407 | const char *rs = GPR(rs_value, info); |
89a955e8 | 15408 | |
4066c152 | 15409 | return img_format("SYNCIE %" PRId64 "(%s)", s_value, rs); |
89a955e8 AM |
15410 | } |
15411 | ||
15412 | ||
15413 | /* | |
15414 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
15415 | * | |
15416 | * 3 2 1 | |
15417 | * 10987654321098765432109876543210 | |
15418 | * 001000 00010001101 | |
15419 | * rt ----- | |
15420 | * rs ----- | |
15421 | * rd ----- | |
15422 | */ | |
7def8a4b | 15423 | static char *SYSCALL_16_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
15424 | { |
15425 | uint64 code_value = extract_code_1_0(instruction); | |
15426 | ||
89a955e8 | 15427 | |
4066c152 | 15428 | return img_format("SYSCALL 0x%" PRIx64, code_value); |
89a955e8 AM |
15429 | } |
15430 | ||
15431 | ||
15432 | /* | |
15433 | * SYSCALL code - System Call. Cause a System Call Exception | |
15434 | * | |
15435 | * 3 2 1 | |
15436 | * 10987654321098765432109876543210 | |
15437 | * 00000000000010 | |
15438 | * code ------------------ | |
15439 | */ | |
7def8a4b | 15440 | static char *SYSCALL_32_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
15441 | { |
15442 | uint64 code_value = extract_code_17_to_0(instruction); | |
15443 | ||
89a955e8 | 15444 | |
4066c152 | 15445 | return img_format("SYSCALL 0x%" PRIx64, code_value); |
89a955e8 AM |
15446 | } |
15447 | ||
15448 | ||
15449 | /* | |
15450 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
15451 | * | |
15452 | * 3 2 1 | |
15453 | * 10987654321098765432109876543210 | |
15454 | * 001000 00010001101 | |
15455 | * rt ----- | |
15456 | * rs ----- | |
15457 | * rd ----- | |
15458 | */ | |
7def8a4b | 15459 | static char *TEQ(uint64 instruction, Dis_info *info) |
89a955e8 AM |
15460 | { |
15461 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
15462 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
15463 | ||
3f2aec07 ML |
15464 | const char *rs = GPR(rs_value, info); |
15465 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 15466 | |
c5231692 | 15467 | return img_format("TEQ %s, %s", rs, rt); |
89a955e8 AM |
15468 | } |
15469 | ||
15470 | ||
15471 | /* | |
15472 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
15473 | * | |
15474 | * 3 2 1 | |
15475 | * 10987654321098765432109876543210 | |
15476 | * 001000 00010001101 | |
15477 | * rt ----- | |
15478 | * rs ----- | |
15479 | * rd ----- | |
15480 | */ | |
7def8a4b | 15481 | static char *TLBGINV(uint64 instruction, Dis_info *info) |
89a955e8 AM |
15482 | { |
15483 | (void)instruction; | |
15484 | ||
7def8a4b | 15485 | return g_strdup("TLBGINV "); |
89a955e8 AM |
15486 | } |
15487 | ||
15488 | ||
15489 | /* | |
15490 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
15491 | * | |
15492 | * 3 2 1 | |
15493 | * 10987654321098765432109876543210 | |
15494 | * 001000 00010001101 | |
15495 | * rt ----- | |
15496 | * rs ----- | |
15497 | * rd ----- | |
15498 | */ | |
7def8a4b | 15499 | static char *TLBGINVF(uint64 instruction, Dis_info *info) |
89a955e8 AM |
15500 | { |
15501 | (void)instruction; | |
15502 | ||
7def8a4b | 15503 | return g_strdup("TLBGINVF "); |
89a955e8 AM |
15504 | } |
15505 | ||
15506 | ||
15507 | /* | |
15508 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
15509 | * | |
15510 | * 3 2 1 | |
15511 | * 10987654321098765432109876543210 | |
15512 | * 001000 00010001101 | |
15513 | * rt ----- | |
15514 | * rs ----- | |
15515 | * rd ----- | |
15516 | */ | |
7def8a4b | 15517 | static char *TLBGP(uint64 instruction, Dis_info *info) |
89a955e8 AM |
15518 | { |
15519 | (void)instruction; | |
15520 | ||
7def8a4b | 15521 | return g_strdup("TLBGP "); |
89a955e8 AM |
15522 | } |
15523 | ||
15524 | ||
15525 | /* | |
15526 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
15527 | * | |
15528 | * 3 2 1 | |
15529 | * 10987654321098765432109876543210 | |
15530 | * 001000 00010001101 | |
15531 | * rt ----- | |
15532 | * rs ----- | |
15533 | * rd ----- | |
15534 | */ | |
7def8a4b | 15535 | static char *TLBGR(uint64 instruction, Dis_info *info) |
89a955e8 AM |
15536 | { |
15537 | (void)instruction; | |
15538 | ||
7def8a4b | 15539 | return g_strdup("TLBGR "); |
89a955e8 AM |
15540 | } |
15541 | ||
15542 | ||
15543 | /* | |
15544 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
15545 | * | |
15546 | * 3 2 1 | |
15547 | * 10987654321098765432109876543210 | |
15548 | * 001000 00010001101 | |
15549 | * rt ----- | |
15550 | * rs ----- | |
15551 | * rd ----- | |
15552 | */ | |
7def8a4b | 15553 | static char *TLBGWI(uint64 instruction, Dis_info *info) |
89a955e8 AM |
15554 | { |
15555 | (void)instruction; | |
15556 | ||
7def8a4b | 15557 | return g_strdup("TLBGWI "); |
89a955e8 AM |
15558 | } |
15559 | ||
15560 | ||
15561 | /* | |
15562 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
15563 | * | |
15564 | * 3 2 1 | |
15565 | * 10987654321098765432109876543210 | |
15566 | * 001000 00010001101 | |
15567 | * rt ----- | |
15568 | * rs ----- | |
15569 | * rd ----- | |
15570 | */ | |
7def8a4b | 15571 | static char *TLBGWR(uint64 instruction, Dis_info *info) |
89a955e8 AM |
15572 | { |
15573 | (void)instruction; | |
15574 | ||
7def8a4b | 15575 | return g_strdup("TLBGWR "); |
89a955e8 AM |
15576 | } |
15577 | ||
15578 | ||
15579 | /* | |
15580 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
15581 | * | |
15582 | * 3 2 1 | |
15583 | * 10987654321098765432109876543210 | |
15584 | * 001000 00010001101 | |
15585 | * rt ----- | |
15586 | * rs ----- | |
15587 | * rd ----- | |
15588 | */ | |
7def8a4b | 15589 | static char *TLBINV(uint64 instruction, Dis_info *info) |
89a955e8 AM |
15590 | { |
15591 | (void)instruction; | |
15592 | ||
7def8a4b | 15593 | return g_strdup("TLBINV "); |
89a955e8 AM |
15594 | } |
15595 | ||
15596 | ||
15597 | /* | |
15598 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
15599 | * | |
15600 | * 3 2 1 | |
15601 | * 10987654321098765432109876543210 | |
15602 | * 001000 00010001101 | |
15603 | * rt ----- | |
15604 | * rs ----- | |
15605 | * rd ----- | |
15606 | */ | |
7def8a4b | 15607 | static char *TLBINVF(uint64 instruction, Dis_info *info) |
89a955e8 AM |
15608 | { |
15609 | (void)instruction; | |
15610 | ||
7def8a4b | 15611 | return g_strdup("TLBINVF "); |
89a955e8 AM |
15612 | } |
15613 | ||
15614 | ||
15615 | /* | |
15616 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
15617 | * | |
15618 | * 3 2 1 | |
15619 | * 10987654321098765432109876543210 | |
15620 | * 001000 00010001101 | |
15621 | * rt ----- | |
15622 | * rs ----- | |
15623 | * rd ----- | |
15624 | */ | |
7def8a4b | 15625 | static char *TLBP(uint64 instruction, Dis_info *info) |
89a955e8 AM |
15626 | { |
15627 | (void)instruction; | |
15628 | ||
7def8a4b | 15629 | return g_strdup("TLBP "); |
89a955e8 AM |
15630 | } |
15631 | ||
15632 | ||
15633 | /* | |
15634 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
15635 | * | |
15636 | * 3 2 1 | |
15637 | * 10987654321098765432109876543210 | |
15638 | * 001000 00010001101 | |
15639 | * rt ----- | |
15640 | * rs ----- | |
15641 | * rd ----- | |
15642 | */ | |
7def8a4b | 15643 | static char *TLBR(uint64 instruction, Dis_info *info) |
89a955e8 AM |
15644 | { |
15645 | (void)instruction; | |
15646 | ||
7def8a4b | 15647 | return g_strdup("TLBR "); |
89a955e8 AM |
15648 | } |
15649 | ||
15650 | ||
15651 | /* | |
15652 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
15653 | * | |
15654 | * 3 2 1 | |
15655 | * 10987654321098765432109876543210 | |
15656 | * 001000 00010001101 | |
15657 | * rt ----- | |
15658 | * rs ----- | |
15659 | * rd ----- | |
15660 | */ | |
7def8a4b | 15661 | static char *TLBWI(uint64 instruction, Dis_info *info) |
89a955e8 AM |
15662 | { |
15663 | (void)instruction; | |
15664 | ||
7def8a4b | 15665 | return g_strdup("TLBWI "); |
89a955e8 AM |
15666 | } |
15667 | ||
15668 | ||
15669 | /* | |
15670 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
15671 | * | |
15672 | * 3 2 1 | |
15673 | * 10987654321098765432109876543210 | |
15674 | * 001000 00010001101 | |
15675 | * rt ----- | |
15676 | * rs ----- | |
15677 | * rd ----- | |
15678 | */ | |
7def8a4b | 15679 | static char *TLBWR(uint64 instruction, Dis_info *info) |
89a955e8 AM |
15680 | { |
15681 | (void)instruction; | |
15682 | ||
7def8a4b | 15683 | return g_strdup("TLBWR "); |
89a955e8 AM |
15684 | } |
15685 | ||
15686 | ||
15687 | /* | |
15688 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
15689 | * | |
15690 | * 3 2 1 | |
15691 | * 10987654321098765432109876543210 | |
15692 | * 001000 00010001101 | |
15693 | * rt ----- | |
15694 | * rs ----- | |
15695 | * rd ----- | |
15696 | */ | |
7def8a4b | 15697 | static char *TNE(uint64 instruction, Dis_info *info) |
89a955e8 AM |
15698 | { |
15699 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
15700 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
15701 | ||
3f2aec07 ML |
15702 | const char *rs = GPR(rs_value, info); |
15703 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 15704 | |
c5231692 | 15705 | return img_format("TNE %s, %s", rs, rt); |
89a955e8 AM |
15706 | } |
15707 | ||
15708 | ||
15709 | /* | |
15710 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
15711 | * | |
15712 | * 3 2 1 | |
15713 | * 10987654321098765432109876543210 | |
15714 | * 001000 00010001101 | |
15715 | * rt ----- | |
15716 | * rs ----- | |
15717 | * rd ----- | |
15718 | */ | |
7def8a4b | 15719 | static char *TRUNC_L_D(uint64 instruction, Dis_info *info) |
89a955e8 | 15720 | { |
17ce2f00 | 15721 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 15722 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 | 15723 | |
3f2aec07 ML |
15724 | const char *ft = FPR(ft_value, info); |
15725 | const char *fs = FPR(fs_value, info); | |
89a955e8 | 15726 | |
c5231692 | 15727 | return img_format("TRUNC.L.D %s, %s", ft, fs); |
89a955e8 AM |
15728 | } |
15729 | ||
15730 | ||
15731 | /* | |
15732 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
15733 | * | |
15734 | * 3 2 1 | |
15735 | * 10987654321098765432109876543210 | |
15736 | * 001000 00010001101 | |
15737 | * rt ----- | |
15738 | * rs ----- | |
15739 | * rd ----- | |
15740 | */ | |
7def8a4b | 15741 | static char *TRUNC_L_S(uint64 instruction, Dis_info *info) |
89a955e8 | 15742 | { |
17ce2f00 | 15743 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 15744 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 | 15745 | |
3f2aec07 ML |
15746 | const char *ft = FPR(ft_value, info); |
15747 | const char *fs = FPR(fs_value, info); | |
89a955e8 | 15748 | |
c5231692 | 15749 | return img_format("TRUNC.L.S %s, %s", ft, fs); |
89a955e8 AM |
15750 | } |
15751 | ||
15752 | ||
15753 | /* | |
15754 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
15755 | * | |
15756 | * 3 2 1 | |
15757 | * 10987654321098765432109876543210 | |
15758 | * 001000 00010001101 | |
15759 | * rt ----- | |
15760 | * rs ----- | |
15761 | * rd ----- | |
15762 | */ | |
7def8a4b | 15763 | static char *TRUNC_W_D(uint64 instruction, Dis_info *info) |
89a955e8 | 15764 | { |
17ce2f00 | 15765 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 15766 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 | 15767 | |
3f2aec07 ML |
15768 | const char *ft = FPR(ft_value, info); |
15769 | const char *fs = FPR(fs_value, info); | |
89a955e8 | 15770 | |
c5231692 | 15771 | return img_format("TRUNC.W.D %s, %s", ft, fs); |
89a955e8 AM |
15772 | } |
15773 | ||
15774 | ||
15775 | /* | |
15776 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
15777 | * | |
15778 | * 3 2 1 | |
15779 | * 10987654321098765432109876543210 | |
15780 | * 001000 00010001101 | |
15781 | * rt ----- | |
15782 | * rs ----- | |
15783 | * rd ----- | |
15784 | */ | |
7def8a4b | 15785 | static char *TRUNC_W_S(uint64 instruction, Dis_info *info) |
89a955e8 | 15786 | { |
17ce2f00 | 15787 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 15788 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 | 15789 | |
3f2aec07 ML |
15790 | const char *ft = FPR(ft_value, info); |
15791 | const char *fs = FPR(fs_value, info); | |
89a955e8 | 15792 | |
c5231692 | 15793 | return img_format("TRUNC.W.S %s, %s", ft, fs); |
89a955e8 AM |
15794 | } |
15795 | ||
15796 | ||
15797 | /* | |
15798 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
15799 | * | |
15800 | * 3 2 1 | |
15801 | * 10987654321098765432109876543210 | |
15802 | * 001000 00010001101 | |
15803 | * rt ----- | |
15804 | * rs ----- | |
15805 | * rd ----- | |
15806 | */ | |
7def8a4b | 15807 | static char *UALDM(uint64 instruction, Dis_info *info) |
89a955e8 AM |
15808 | { |
15809 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 15810 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 AM |
15811 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
15812 | uint64 count3_value = extract_count3_14_13_12(instruction); | |
89a955e8 | 15813 | |
3f2aec07 ML |
15814 | const char *rt = GPR(rt_value, info); |
15815 | const char *rs = GPR(rs_value, info); | |
4066c152 | 15816 | uint64 count3 = encode_count3_from_count(count3_value); |
89a955e8 | 15817 | |
4066c152 ML |
15818 | return img_format("UALDM %s, %" PRId64 "(%s), 0x%" PRIx64, |
15819 | rt, s_value, rs, count3); | |
89a955e8 AM |
15820 | } |
15821 | ||
15822 | ||
15823 | /* | |
15824 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
15825 | * | |
15826 | * 3 2 1 | |
15827 | * 10987654321098765432109876543210 | |
15828 | * 001000 00010001101 | |
15829 | * rt ----- | |
15830 | * rs ----- | |
15831 | * rd ----- | |
15832 | */ | |
7def8a4b | 15833 | static char *UALH(uint64 instruction, Dis_info *info) |
89a955e8 AM |
15834 | { |
15835 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 15836 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 15837 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
89a955e8 | 15838 | |
3f2aec07 ML |
15839 | const char *rt = GPR(rt_value, info); |
15840 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 15841 | |
4066c152 | 15842 | return img_format("UALH %s, %" PRId64 "(%s)", rt, s_value, rs); |
89a955e8 AM |
15843 | } |
15844 | ||
15845 | ||
15846 | /* | |
15847 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
15848 | * | |
15849 | * 3 2 1 | |
15850 | * 10987654321098765432109876543210 | |
15851 | * 001000 00010001101 | |
15852 | * rt ----- | |
15853 | * rs ----- | |
15854 | * rd ----- | |
15855 | */ | |
7def8a4b | 15856 | static char *UALWM(uint64 instruction, Dis_info *info) |
89a955e8 AM |
15857 | { |
15858 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 15859 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 AM |
15860 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
15861 | uint64 count3_value = extract_count3_14_13_12(instruction); | |
89a955e8 | 15862 | |
3f2aec07 ML |
15863 | const char *rt = GPR(rt_value, info); |
15864 | const char *rs = GPR(rs_value, info); | |
4066c152 | 15865 | uint64 count3 = encode_count3_from_count(count3_value); |
89a955e8 | 15866 | |
4066c152 ML |
15867 | return img_format("UALWM %s, %" PRId64 "(%s), 0x%" PRIx64, |
15868 | rt, s_value, rs, count3); | |
89a955e8 AM |
15869 | } |
15870 | ||
15871 | ||
15872 | /* | |
15873 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
15874 | * | |
15875 | * 3 2 1 | |
15876 | * 10987654321098765432109876543210 | |
15877 | * 001000 00010001101 | |
15878 | * rt ----- | |
15879 | * rs ----- | |
15880 | * rd ----- | |
15881 | */ | |
7def8a4b | 15882 | static char *UASDM(uint64 instruction, Dis_info *info) |
89a955e8 AM |
15883 | { |
15884 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 15885 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 AM |
15886 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
15887 | uint64 count3_value = extract_count3_14_13_12(instruction); | |
89a955e8 | 15888 | |
3f2aec07 ML |
15889 | const char *rt = GPR(rt_value, info); |
15890 | const char *rs = GPR(rs_value, info); | |
4066c152 | 15891 | uint64 count3 = encode_count3_from_count(count3_value); |
89a955e8 | 15892 | |
4066c152 ML |
15893 | return img_format("UASDM %s, %" PRId64 "(%s), 0x%" PRIx64, |
15894 | rt, s_value, rs, count3); | |
89a955e8 AM |
15895 | } |
15896 | ||
15897 | ||
15898 | /* | |
15899 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
15900 | * | |
15901 | * 3 2 1 | |
15902 | * 10987654321098765432109876543210 | |
15903 | * 001000 00010001101 | |
15904 | * rt ----- | |
15905 | * rs ----- | |
15906 | * rd ----- | |
15907 | */ | |
7def8a4b | 15908 | static char *UASH(uint64 instruction, Dis_info *info) |
89a955e8 AM |
15909 | { |
15910 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 15911 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 15912 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
89a955e8 | 15913 | |
3f2aec07 ML |
15914 | const char *rt = GPR(rt_value, info); |
15915 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 15916 | |
4066c152 | 15917 | return img_format("UASH %s, %" PRId64 "(%s)", rt, s_value, rs); |
89a955e8 AM |
15918 | } |
15919 | ||
15920 | ||
15921 | /* | |
15922 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
15923 | * | |
15924 | * 3 2 1 | |
15925 | * 10987654321098765432109876543210 | |
15926 | * 001000 00010001101 | |
15927 | * rt ----- | |
15928 | * rs ----- | |
15929 | * rd ----- | |
15930 | */ | |
7def8a4b | 15931 | static char *UASWM(uint64 instruction, Dis_info *info) |
89a955e8 AM |
15932 | { |
15933 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 15934 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 AM |
15935 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
15936 | uint64 count3_value = extract_count3_14_13_12(instruction); | |
89a955e8 | 15937 | |
3f2aec07 ML |
15938 | const char *rt = GPR(rt_value, info); |
15939 | const char *rs = GPR(rs_value, info); | |
4066c152 | 15940 | uint64 count3 = encode_count3_from_count(count3_value); |
89a955e8 | 15941 | |
4066c152 ML |
15942 | return img_format("UASWM %s, %" PRId64 "(%s), 0x%" PRIx64, |
15943 | rt, s_value, rs, count3); | |
89a955e8 AM |
15944 | } |
15945 | ||
15946 | ||
15947 | /* | |
15948 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
15949 | * | |
15950 | * 3 2 1 | |
15951 | * 10987654321098765432109876543210 | |
15952 | * 001000 00010001101 | |
15953 | * rt ----- | |
15954 | * rs ----- | |
15955 | * rd ----- | |
15956 | */ | |
7def8a4b | 15957 | static char *UDI(uint64 instruction, Dis_info *info) |
89a955e8 AM |
15958 | { |
15959 | uint64 op_value = extract_op_25_to_3(instruction); | |
15960 | ||
89a955e8 | 15961 | |
4066c152 | 15962 | return img_format("UDI 0x%" PRIx64, op_value); |
89a955e8 AM |
15963 | } |
15964 | ||
15965 | ||
15966 | /* | |
15967 | * WAIT code - Enter Wait State | |
15968 | * | |
15969 | * 3 2 1 | |
15970 | * 10987654321098765432109876543210 | |
15971 | * 001000 1100001101111111 | |
15972 | * code ---------- | |
15973 | */ | |
7def8a4b | 15974 | static char *WAIT(uint64 instruction, Dis_info *info) |
89a955e8 AM |
15975 | { |
15976 | uint64 code_value = extract_code_25_24_23_22_21_20_19_18_17_16(instruction); | |
15977 | ||
89a955e8 | 15978 | |
4066c152 | 15979 | return img_format("WAIT 0x%" PRIx64, code_value); |
89a955e8 AM |
15980 | } |
15981 | ||
15982 | ||
15983 | /* | |
fc95c241 AM |
15984 | * [DSP] WRDSP rt, mask - Write selected fields from a GPR to the DSPControl |
15985 | * register | |
89a955e8 AM |
15986 | * |
15987 | * 3 2 1 | |
15988 | * 10987654321098765432109876543210 | |
15989 | * 001000 01011001111111 | |
15990 | * rt ----- | |
15991 | * mask ------- | |
15992 | */ | |
7def8a4b | 15993 | static char *WRDSP(uint64 instruction, Dis_info *info) |
89a955e8 AM |
15994 | { |
15995 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
15996 | uint64 mask_value = extract_mask_20_19_18_17_16_15_14(instruction); | |
15997 | ||
3f2aec07 | 15998 | const char *rt = GPR(rt_value, info); |
89a955e8 | 15999 | |
4066c152 | 16000 | return img_format("WRDSP %s, 0x%" PRIx64, rt, mask_value); |
89a955e8 AM |
16001 | } |
16002 | ||
16003 | ||
16004 | /* | |
16005 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
16006 | * | |
16007 | * 3 2 1 | |
16008 | * 10987654321098765432109876543210 | |
16009 | * 001000 00010001101 | |
16010 | * rt ----- | |
16011 | * rs ----- | |
16012 | * rd ----- | |
16013 | */ | |
7def8a4b | 16014 | static char *WRPGPR(uint64 instruction, Dis_info *info) |
89a955e8 AM |
16015 | { |
16016 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
16017 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
16018 | ||
3f2aec07 ML |
16019 | const char *rt = GPR(rt_value, info); |
16020 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 16021 | |
c5231692 | 16022 | return img_format("WRPGPR %s, %s", rt, rs); |
89a955e8 AM |
16023 | } |
16024 | ||
16025 | ||
16026 | /* | |
16027 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
16028 | * | |
16029 | * 3 2 1 | |
16030 | * 10987654321098765432109876543210 | |
16031 | * 001000 00010001101 | |
16032 | * rt ----- | |
16033 | * rs ----- | |
16034 | * rd ----- | |
16035 | */ | |
7def8a4b | 16036 | static char *XOR_16_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
16037 | { |
16038 | uint64 rt3_value = extract_rt3_9_8_7(instruction); | |
16039 | uint64 rs3_value = extract_rs3_6_5_4(instruction); | |
16040 | ||
3f2aec07 ML |
16041 | const char *rs3 = GPR(decode_gpr_gpr3(rs3_value, info), info); |
16042 | const char *rt3 = GPR(decode_gpr_gpr3(rt3_value, info), info); | |
89a955e8 | 16043 | |
c5231692 | 16044 | return img_format("XOR %s, %s", rs3, rt3); |
89a955e8 AM |
16045 | } |
16046 | ||
16047 | ||
16048 | /* | |
16049 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
16050 | * | |
16051 | * 3 2 1 | |
16052 | * 10987654321098765432109876543210 | |
16053 | * 001000 00010001101 | |
16054 | * rt ----- | |
16055 | * rs ----- | |
16056 | * rd ----- | |
16057 | */ | |
7def8a4b | 16058 | static char *XOR_32_(uint64 instruction, Dis_info *info) |
89a955e8 AM |
16059 | { |
16060 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 16061 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 16062 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 16063 | |
3f2aec07 ML |
16064 | const char *rd = GPR(rd_value, info); |
16065 | const char *rs = GPR(rs_value, info); | |
16066 | const char *rt = GPR(rt_value, info); | |
89a955e8 | 16067 | |
c5231692 | 16068 | return img_format("XOR %s, %s, %s", rd, rs, rt); |
89a955e8 AM |
16069 | } |
16070 | ||
16071 | ||
16072 | /* | |
16073 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
16074 | * | |
16075 | * 3 2 1 | |
16076 | * 10987654321098765432109876543210 | |
16077 | * 001000 00010001101 | |
16078 | * rt ----- | |
16079 | * rs ----- | |
16080 | * rd ----- | |
16081 | */ | |
7def8a4b | 16082 | static char *XORI(uint64 instruction, Dis_info *info) |
89a955e8 AM |
16083 | { |
16084 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 16085 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 16086 | uint64 u_value = extract_u_11_10_9_8_7_6_5_4_3_2_1_0(instruction); |
89a955e8 | 16087 | |
3f2aec07 ML |
16088 | const char *rt = GPR(rt_value, info); |
16089 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 16090 | |
4066c152 | 16091 | return img_format("XORI %s, %s, 0x%" PRIx64, rt, rs, u_value); |
89a955e8 AM |
16092 | } |
16093 | ||
16094 | ||
16095 | /* | |
16096 | * YIELD rt, rs - | |
16097 | * | |
16098 | * 3 2 1 | |
16099 | * 10987654321098765432109876543210 | |
16100 | * 001000 00010001101 | |
16101 | * rt ----- | |
16102 | * rs ----- | |
16103 | */ | |
7def8a4b | 16104 | static char *YIELD(uint64 instruction, Dis_info *info) |
89a955e8 AM |
16105 | { |
16106 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
16107 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
16108 | ||
3f2aec07 ML |
16109 | const char *rt = GPR(rt_value, info); |
16110 | const char *rs = GPR(rs_value, info); | |
89a955e8 | 16111 | |
c5231692 | 16112 | return img_format("YIELD %s, %s", rt, rs); |
89a955e8 AM |
16113 | } |
16114 | ||
16115 | ||
16116 | ||
ca2b40b7 AM |
16117 | /* |
16118 | * nanoMIPS instruction pool organization | |
16119 | * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
16120 | * | |
16121 | * | |
16122 | * ┌─ P.ADDIU ─── P.RI ─── P.SYSCALL | |
16123 | * │ | |
16124 | * │ ┌─ P.TRAP | |
16125 | * │ │ | |
16126 | * │ ┌─ _POOL32A0_0 ─┼─ P.CMOVE | |
16127 | * │ │ │ | |
16128 | * │ │ └─ P.SLTU | |
16129 | * │ ┌─ _POOL32A0 ─┤ | |
16130 | * │ │ │ | |
16131 | * │ │ │ | |
16132 | * │ │ └─ _POOL32A0_1 ─── CRC32 | |
16133 | * │ │ | |
16134 | * ├─ P32A ─┤ | |
16135 | * │ │ ┌─ PP.LSX | |
16136 | * │ │ ┌─ P.LSX ─────┤ | |
16137 | * │ │ │ └─ PP.LSXS | |
16138 | * │ └─ _POOL32A7 ─┤ | |
16139 | * │ │ ┌─ POOL32Axf_4 | |
16140 | * │ └─ POOL32Axf ─┤ | |
16141 | * │ └─ POOL32Axf_5 | |
16142 | * │ | |
16143 | * ├─ PBAL | |
16144 | * │ | |
16145 | * ├─ P.GP.W ┌─ PP.LSX | |
16146 | * ┌─ P32 ─┤ │ | |
16147 | * │ ├─ P.GP.BH ─┴─ PP.LSXS | |
16148 | * │ │ | |
16149 | * │ ├─ P.J ─────── PP.BALRSC | |
16150 | * │ │ | |
16151 | * │ ├─ P48I | |
16152 | * │ │ ┌─ P.SR | |
16153 | * │ │ │ | |
16154 | * │ │ ├─ P.SHIFT | |
16155 | * │ │ │ | |
16156 | * │ ├─ P.U12 ───┼─ P.ROTX | |
16157 | * │ │ │ | |
16158 | * │ │ ├─ P.INS | |
16159 | * │ │ │ | |
16160 | * │ │ └─ P.EXT | |
16161 | * │ │ | |
16162 | * │ ├─ P.LS.U12 ── P.PREF.U12 | |
16163 | * │ │ | |
16164 | * │ ├─ P.BR1 ───── P.BR3A | |
16165 | * │ │ | |
16166 | * │ │ ┌─ P.LS.S0 ─── P16.SYSCALL | |
16167 | * │ │ │ | |
16168 | * │ │ │ ┌─ P.LL | |
16169 | * │ │ ├─ P.LS.S1 ─┤ | |
16170 | * │ │ │ └─ P.SC | |
16171 | * │ │ │ | |
16172 | * │ │ │ ┌─ P.PREFE | |
16173 | * MAJOR ─┤ ├─ P.LS.S9 ─┤ │ | |
16174 | * │ │ ├─ P.LS.E0 ─┼─ P.LLE | |
16175 | * │ │ │ │ | |
16176 | * │ │ │ └─ P.SCE | |
16177 | * │ │ │ | |
16178 | * │ │ ├─ P.LS.WM | |
16179 | * │ │ │ | |
16180 | * │ │ └─ P.LS.UAWM | |
16181 | * │ │ | |
16182 | * │ │ | |
16183 | * │ ├─ P.BR2 | |
16184 | * │ │ | |
16185 | * │ ├─ P.BRI | |
16186 | * │ │ | |
16187 | * │ └─ P.LUI | |
16188 | * │ | |
16189 | * │ | |
16190 | * │ ┌─ P16.MV ──── P16.RI ─── P16.SYSCALL | |
16191 | * │ │ | |
16192 | * │ ├─ P16.SR | |
16193 | * │ │ | |
16194 | * │ ├─ P16.SHIFT | |
16195 | * │ │ | |
16196 | * │ ├─ P16.4x4 | |
16197 | * │ │ | |
16198 | * │ ├─ P16C ────── POOL16C_0 ── POOL16C_00 | |
16199 | * │ │ | |
16200 | * └─ P16 ─┼─ P16.LB | |
16201 | * │ | |
16202 | * ├─ P16.A1 | |
16203 | * │ | |
16204 | * ├─ P16.LH | |
16205 | * │ | |
16206 | * ├─ P16.A2 ──── P.ADDIU[RS5] | |
16207 | * │ | |
16208 | * ├─ P16.ADDU | |
16209 | * │ | |
16210 | * └─ P16.BR ──┬─ P16.JRC | |
16211 | * │ | |
16212 | * └─ P16.BR1 | |
16213 | * | |
16214 | * | |
16215 | * (FP, DPS, and some minor instruction pools are omitted from the diagram) | |
16216 | * | |
16217 | */ | |
16218 | ||
a1465490 | 16219 | static const Pool P_SYSCALL[2] = { |
89a955e8 | 16220 | { instruction , 0 , 0 , 32, |
8d416f6b | 16221 | 0xfffc0000, 0x00080000, &SYSCALL_32_ , 0, |
89a955e8 AM |
16222 | 0x0 }, /* SYSCALL[32] */ |
16223 | { instruction , 0 , 0 , 32, | |
8d416f6b | 16224 | 0xfffc0000, 0x000c0000, &HYPCALL , 0, |
89a955e8 AM |
16225 | CP0_ | VZ_ }, /* HYPCALL */ |
16226 | }; | |
16227 | ||
16228 | ||
a1465490 | 16229 | static const Pool P_RI[4] = { |
89a955e8 | 16230 | { instruction , 0 , 0 , 32, |
8d416f6b | 16231 | 0xfff80000, 0x00000000, &SIGRIE , 0, |
89a955e8 AM |
16232 | 0x0 }, /* SIGRIE */ |
16233 | { pool , P_SYSCALL , 2 , 32, | |
16234 | 0xfff80000, 0x00080000, 0 , 0, | |
16235 | 0x0 }, /* P.SYSCALL */ | |
16236 | { instruction , 0 , 0 , 32, | |
8d416f6b | 16237 | 0xfff80000, 0x00100000, &BREAK_32_ , 0, |
89a955e8 AM |
16238 | 0x0 }, /* BREAK[32] */ |
16239 | { instruction , 0 , 0 , 32, | |
8d416f6b | 16240 | 0xfff80000, 0x00180000, &SDBBP_32_ , 0, |
89a955e8 AM |
16241 | EJTAG_ }, /* SDBBP[32] */ |
16242 | }; | |
16243 | ||
16244 | ||
a1465490 | 16245 | static const Pool P_ADDIU[2] = { |
89a955e8 AM |
16246 | { pool , P_RI , 4 , 32, |
16247 | 0xffe00000, 0x00000000, 0 , 0, | |
16248 | 0x0 }, /* P.RI */ | |
16249 | { instruction , 0 , 0 , 32, | |
8d416f6b | 16250 | 0xfc000000, 0x00000000, &ADDIU_32_ , &ADDIU_32__cond , |
89a955e8 AM |
16251 | 0x0 }, /* ADDIU[32] */ |
16252 | }; | |
16253 | ||
16254 | ||
a1465490 | 16255 | static const Pool P_TRAP[2] = { |
89a955e8 | 16256 | { instruction , 0 , 0 , 32, |
8d416f6b | 16257 | 0xfc0007ff, 0x20000000, &TEQ , 0, |
89a955e8 AM |
16258 | XMMS_ }, /* TEQ */ |
16259 | { instruction , 0 , 0 , 32, | |
8d416f6b | 16260 | 0xfc0007ff, 0x20000400, &TNE , 0, |
89a955e8 AM |
16261 | XMMS_ }, /* TNE */ |
16262 | }; | |
16263 | ||
16264 | ||
a1465490 | 16265 | static const Pool P_CMOVE[2] = { |
89a955e8 | 16266 | { instruction , 0 , 0 , 32, |
8d416f6b | 16267 | 0xfc0007ff, 0x20000210, &MOVZ , 0, |
89a955e8 AM |
16268 | 0x0 }, /* MOVZ */ |
16269 | { instruction , 0 , 0 , 32, | |
8d416f6b | 16270 | 0xfc0007ff, 0x20000610, &MOVN , 0, |
89a955e8 AM |
16271 | 0x0 }, /* MOVN */ |
16272 | }; | |
16273 | ||
16274 | ||
a1465490 | 16275 | static const Pool P_D_MT_VPE[2] = { |
89a955e8 | 16276 | { instruction , 0 , 0 , 32, |
8d416f6b | 16277 | 0xfc1f3fff, 0x20010ab0, &DMT , 0, |
89a955e8 AM |
16278 | MT_ }, /* DMT */ |
16279 | { instruction , 0 , 0 , 32, | |
8d416f6b | 16280 | 0xfc1f3fff, 0x20000ab0, &DVPE , 0, |
89a955e8 AM |
16281 | MT_ }, /* DVPE */ |
16282 | }; | |
16283 | ||
16284 | ||
a1465490 | 16285 | static const Pool P_E_MT_VPE[2] = { |
89a955e8 | 16286 | { instruction , 0 , 0 , 32, |
8d416f6b | 16287 | 0xfc1f3fff, 0x20010eb0, &EMT , 0, |
89a955e8 AM |
16288 | MT_ }, /* EMT */ |
16289 | { instruction , 0 , 0 , 32, | |
8d416f6b | 16290 | 0xfc1f3fff, 0x20000eb0, &EVPE , 0, |
89a955e8 AM |
16291 | MT_ }, /* EVPE */ |
16292 | }; | |
16293 | ||
16294 | ||
a1465490 | 16295 | static const Pool _P_MT_VPE[2] = { |
89a955e8 AM |
16296 | { pool , P_D_MT_VPE , 2 , 32, |
16297 | 0xfc003fff, 0x20000ab0, 0 , 0, | |
16298 | 0x0 }, /* P.D_MT_VPE */ | |
16299 | { pool , P_E_MT_VPE , 2 , 32, | |
16300 | 0xfc003fff, 0x20000eb0, 0 , 0, | |
16301 | 0x0 }, /* P.E_MT_VPE */ | |
16302 | }; | |
16303 | ||
16304 | ||
a1465490 | 16305 | static const Pool P_MT_VPE[8] = { |
89a955e8 AM |
16306 | { reserved_block , 0 , 0 , 32, |
16307 | 0xfc003bff, 0x200002b0, 0 , 0, | |
16308 | 0x0 }, /* P.MT_VPE~*(0) */ | |
16309 | { pool , _P_MT_VPE , 2 , 32, | |
16310 | 0xfc003bff, 0x20000ab0, 0 , 0, | |
16311 | 0x0 }, /* _P.MT_VPE */ | |
16312 | { reserved_block , 0 , 0 , 32, | |
16313 | 0xfc003bff, 0x200012b0, 0 , 0, | |
16314 | 0x0 }, /* P.MT_VPE~*(2) */ | |
16315 | { reserved_block , 0 , 0 , 32, | |
16316 | 0xfc003bff, 0x20001ab0, 0 , 0, | |
16317 | 0x0 }, /* P.MT_VPE~*(3) */ | |
16318 | { reserved_block , 0 , 0 , 32, | |
16319 | 0xfc003bff, 0x200022b0, 0 , 0, | |
16320 | 0x0 }, /* P.MT_VPE~*(4) */ | |
16321 | { reserved_block , 0 , 0 , 32, | |
16322 | 0xfc003bff, 0x20002ab0, 0 , 0, | |
16323 | 0x0 }, /* P.MT_VPE~*(5) */ | |
16324 | { reserved_block , 0 , 0 , 32, | |
16325 | 0xfc003bff, 0x200032b0, 0 , 0, | |
16326 | 0x0 }, /* P.MT_VPE~*(6) */ | |
16327 | { reserved_block , 0 , 0 , 32, | |
16328 | 0xfc003bff, 0x20003ab0, 0 , 0, | |
16329 | 0x0 }, /* P.MT_VPE~*(7) */ | |
16330 | }; | |
16331 | ||
16332 | ||
a1465490 | 16333 | static const Pool P_DVP[2] = { |
89a955e8 | 16334 | { instruction , 0 , 0 , 32, |
8d416f6b | 16335 | 0xfc00ffff, 0x20000390, &DVP , 0, |
89a955e8 AM |
16336 | 0x0 }, /* DVP */ |
16337 | { instruction , 0 , 0 , 32, | |
8d416f6b | 16338 | 0xfc00ffff, 0x20000790, &EVP , 0, |
89a955e8 AM |
16339 | 0x0 }, /* EVP */ |
16340 | }; | |
16341 | ||
16342 | ||
a1465490 | 16343 | static const Pool P_SLTU[2] = { |
89a955e8 AM |
16344 | { pool , P_DVP , 2 , 32, |
16345 | 0xfc00fbff, 0x20000390, 0 , 0, | |
16346 | 0x0 }, /* P.DVP */ | |
16347 | { instruction , 0 , 0 , 32, | |
8d416f6b | 16348 | 0xfc0003ff, 0x20000390, &SLTU , &SLTU_cond , |
89a955e8 AM |
16349 | 0x0 }, /* SLTU */ |
16350 | }; | |
16351 | ||
16352 | ||
a1465490 | 16353 | static const Pool _POOL32A0[128] = { |
89a955e8 AM |
16354 | { pool , P_TRAP , 2 , 32, |
16355 | 0xfc0003ff, 0x20000000, 0 , 0, | |
16356 | 0x0 }, /* P.TRAP */ | |
16357 | { instruction , 0 , 0 , 32, | |
8d416f6b | 16358 | 0xfc0003ff, 0x20000008, &SEB , 0, |
89a955e8 AM |
16359 | XMMS_ }, /* SEB */ |
16360 | { instruction , 0 , 0 , 32, | |
8d416f6b | 16361 | 0xfc0003ff, 0x20000010, &SLLV , 0, |
89a955e8 AM |
16362 | 0x0 }, /* SLLV */ |
16363 | { instruction , 0 , 0 , 32, | |
8d416f6b | 16364 | 0xfc0003ff, 0x20000018, &MUL_32_ , 0, |
89a955e8 AM |
16365 | 0x0 }, /* MUL[32] */ |
16366 | { reserved_block , 0 , 0 , 32, | |
16367 | 0xfc0003ff, 0x20000020, 0 , 0, | |
16368 | 0x0 }, /* _POOL32A0~*(4) */ | |
16369 | { reserved_block , 0 , 0 , 32, | |
16370 | 0xfc0003ff, 0x20000028, 0 , 0, | |
16371 | 0x0 }, /* _POOL32A0~*(5) */ | |
16372 | { instruction , 0 , 0 , 32, | |
8d416f6b | 16373 | 0xfc0003ff, 0x20000030, &MFC0 , 0, |
89a955e8 AM |
16374 | 0x0 }, /* MFC0 */ |
16375 | { instruction , 0 , 0 , 32, | |
8d416f6b | 16376 | 0xfc0003ff, 0x20000038, &MFHC0 , 0, |
89a955e8 AM |
16377 | CP0_ | MVH_ }, /* MFHC0 */ |
16378 | { reserved_block , 0 , 0 , 32, | |
16379 | 0xfc0003ff, 0x20000040, 0 , 0, | |
16380 | 0x0 }, /* _POOL32A0~*(8) */ | |
16381 | { instruction , 0 , 0 , 32, | |
8d416f6b | 16382 | 0xfc0003ff, 0x20000048, &SEH , 0, |
89a955e8 AM |
16383 | 0x0 }, /* SEH */ |
16384 | { instruction , 0 , 0 , 32, | |
8d416f6b | 16385 | 0xfc0003ff, 0x20000050, &SRLV , 0, |
89a955e8 AM |
16386 | 0x0 }, /* SRLV */ |
16387 | { instruction , 0 , 0 , 32, | |
8d416f6b | 16388 | 0xfc0003ff, 0x20000058, &MUH , 0, |
89a955e8 AM |
16389 | 0x0 }, /* MUH */ |
16390 | { reserved_block , 0 , 0 , 32, | |
16391 | 0xfc0003ff, 0x20000060, 0 , 0, | |
16392 | 0x0 }, /* _POOL32A0~*(12) */ | |
16393 | { reserved_block , 0 , 0 , 32, | |
16394 | 0xfc0003ff, 0x20000068, 0 , 0, | |
16395 | 0x0 }, /* _POOL32A0~*(13) */ | |
16396 | { instruction , 0 , 0 , 32, | |
8d416f6b | 16397 | 0xfc0003ff, 0x20000070, &MTC0 , 0, |
89a955e8 AM |
16398 | CP0_ }, /* MTC0 */ |
16399 | { instruction , 0 , 0 , 32, | |
8d416f6b | 16400 | 0xfc0003ff, 0x20000078, &MTHC0 , 0, |
89a955e8 AM |
16401 | CP0_ | MVH_ }, /* MTHC0 */ |
16402 | { reserved_block , 0 , 0 , 32, | |
16403 | 0xfc0003ff, 0x20000080, 0 , 0, | |
16404 | 0x0 }, /* _POOL32A0~*(16) */ | |
16405 | { reserved_block , 0 , 0 , 32, | |
16406 | 0xfc0003ff, 0x20000088, 0 , 0, | |
16407 | 0x0 }, /* _POOL32A0~*(17) */ | |
16408 | { instruction , 0 , 0 , 32, | |
8d416f6b | 16409 | 0xfc0003ff, 0x20000090, &SRAV , 0, |
89a955e8 AM |
16410 | 0x0 }, /* SRAV */ |
16411 | { instruction , 0 , 0 , 32, | |
8d416f6b | 16412 | 0xfc0003ff, 0x20000098, &MULU , 0, |
89a955e8 AM |
16413 | 0x0 }, /* MULU */ |
16414 | { reserved_block , 0 , 0 , 32, | |
16415 | 0xfc0003ff, 0x200000a0, 0 , 0, | |
16416 | 0x0 }, /* _POOL32A0~*(20) */ | |
16417 | { reserved_block , 0 , 0 , 32, | |
16418 | 0xfc0003ff, 0x200000a8, 0 , 0, | |
16419 | 0x0 }, /* _POOL32A0~*(21) */ | |
16420 | { instruction , 0 , 0 , 32, | |
8d416f6b | 16421 | 0xfc0003ff, 0x200000b0, &MFGC0 , 0, |
89a955e8 AM |
16422 | CP0_ | VZ_ }, /* MFGC0 */ |
16423 | { instruction , 0 , 0 , 32, | |
8d416f6b | 16424 | 0xfc0003ff, 0x200000b8, &MFHGC0 , 0, |
89a955e8 AM |
16425 | CP0_ | VZ_ | MVH_ }, /* MFHGC0 */ |
16426 | { reserved_block , 0 , 0 , 32, | |
16427 | 0xfc0003ff, 0x200000c0, 0 , 0, | |
16428 | 0x0 }, /* _POOL32A0~*(24) */ | |
16429 | { reserved_block , 0 , 0 , 32, | |
16430 | 0xfc0003ff, 0x200000c8, 0 , 0, | |
16431 | 0x0 }, /* _POOL32A0~*(25) */ | |
16432 | { instruction , 0 , 0 , 32, | |
8d416f6b | 16433 | 0xfc0003ff, 0x200000d0, &ROTRV , 0, |
89a955e8 AM |
16434 | 0x0 }, /* ROTRV */ |
16435 | { instruction , 0 , 0 , 32, | |
8d416f6b | 16436 | 0xfc0003ff, 0x200000d8, &MUHU , 0, |
89a955e8 AM |
16437 | 0x0 }, /* MUHU */ |
16438 | { reserved_block , 0 , 0 , 32, | |
16439 | 0xfc0003ff, 0x200000e0, 0 , 0, | |
16440 | 0x0 }, /* _POOL32A0~*(28) */ | |
16441 | { reserved_block , 0 , 0 , 32, | |
16442 | 0xfc0003ff, 0x200000e8, 0 , 0, | |
16443 | 0x0 }, /* _POOL32A0~*(29) */ | |
16444 | { instruction , 0 , 0 , 32, | |
8d416f6b | 16445 | 0xfc0003ff, 0x200000f0, &MTGC0 , 0, |
89a955e8 AM |
16446 | CP0_ | VZ_ }, /* MTGC0 */ |
16447 | { instruction , 0 , 0 , 32, | |
8d416f6b | 16448 | 0xfc0003ff, 0x200000f8, &MTHGC0 , 0, |
89a955e8 AM |
16449 | CP0_ | VZ_ | MVH_ }, /* MTHGC0 */ |
16450 | { reserved_block , 0 , 0 , 32, | |
16451 | 0xfc0003ff, 0x20000100, 0 , 0, | |
16452 | 0x0 }, /* _POOL32A0~*(32) */ | |
16453 | { reserved_block , 0 , 0 , 32, | |
16454 | 0xfc0003ff, 0x20000108, 0 , 0, | |
16455 | 0x0 }, /* _POOL32A0~*(33) */ | |
16456 | { instruction , 0 , 0 , 32, | |
8d416f6b | 16457 | 0xfc0003ff, 0x20000110, &ADD , 0, |
89a955e8 AM |
16458 | XMMS_ }, /* ADD */ |
16459 | { instruction , 0 , 0 , 32, | |
8d416f6b | 16460 | 0xfc0003ff, 0x20000118, &DIV , 0, |
89a955e8 AM |
16461 | 0x0 }, /* DIV */ |
16462 | { reserved_block , 0 , 0 , 32, | |
16463 | 0xfc0003ff, 0x20000120, 0 , 0, | |
16464 | 0x0 }, /* _POOL32A0~*(36) */ | |
16465 | { reserved_block , 0 , 0 , 32, | |
16466 | 0xfc0003ff, 0x20000128, 0 , 0, | |
16467 | 0x0 }, /* _POOL32A0~*(37) */ | |
16468 | { instruction , 0 , 0 , 32, | |
8d416f6b | 16469 | 0xfc0003ff, 0x20000130, &DMFC0 , 0, |
89a955e8 AM |
16470 | CP0_ | MIPS64_ }, /* DMFC0 */ |
16471 | { reserved_block , 0 , 0 , 32, | |
16472 | 0xfc0003ff, 0x20000138, 0 , 0, | |
16473 | 0x0 }, /* _POOL32A0~*(39) */ | |
16474 | { reserved_block , 0 , 0 , 32, | |
16475 | 0xfc0003ff, 0x20000140, 0 , 0, | |
16476 | 0x0 }, /* _POOL32A0~*(40) */ | |
16477 | { reserved_block , 0 , 0 , 32, | |
16478 | 0xfc0003ff, 0x20000148, 0 , 0, | |
16479 | 0x0 }, /* _POOL32A0~*(41) */ | |
16480 | { instruction , 0 , 0 , 32, | |
8d416f6b | 16481 | 0xfc0003ff, 0x20000150, &ADDU_32_ , 0, |
89a955e8 AM |
16482 | 0x0 }, /* ADDU[32] */ |
16483 | { instruction , 0 , 0 , 32, | |
8d416f6b | 16484 | 0xfc0003ff, 0x20000158, &MOD , 0, |
89a955e8 AM |
16485 | 0x0 }, /* MOD */ |
16486 | { reserved_block , 0 , 0 , 32, | |
16487 | 0xfc0003ff, 0x20000160, 0 , 0, | |
16488 | 0x0 }, /* _POOL32A0~*(44) */ | |
16489 | { reserved_block , 0 , 0 , 32, | |
16490 | 0xfc0003ff, 0x20000168, 0 , 0, | |
16491 | 0x0 }, /* _POOL32A0~*(45) */ | |
16492 | { instruction , 0 , 0 , 32, | |
8d416f6b | 16493 | 0xfc0003ff, 0x20000170, &DMTC0 , 0, |
89a955e8 AM |
16494 | CP0_ | MIPS64_ }, /* DMTC0 */ |
16495 | { reserved_block , 0 , 0 , 32, | |
16496 | 0xfc0003ff, 0x20000178, 0 , 0, | |
16497 | 0x0 }, /* _POOL32A0~*(47) */ | |
16498 | { reserved_block , 0 , 0 , 32, | |
16499 | 0xfc0003ff, 0x20000180, 0 , 0, | |
16500 | 0x0 }, /* _POOL32A0~*(48) */ | |
16501 | { reserved_block , 0 , 0 , 32, | |
16502 | 0xfc0003ff, 0x20000188, 0 , 0, | |
16503 | 0x0 }, /* _POOL32A0~*(49) */ | |
16504 | { instruction , 0 , 0 , 32, | |
8d416f6b | 16505 | 0xfc0003ff, 0x20000190, &SUB , 0, |
89a955e8 AM |
16506 | XMMS_ }, /* SUB */ |
16507 | { instruction , 0 , 0 , 32, | |
8d416f6b | 16508 | 0xfc0003ff, 0x20000198, &DIVU , 0, |
89a955e8 AM |
16509 | 0x0 }, /* DIVU */ |
16510 | { reserved_block , 0 , 0 , 32, | |
16511 | 0xfc0003ff, 0x200001a0, 0 , 0, | |
16512 | 0x0 }, /* _POOL32A0~*(52) */ | |
16513 | { reserved_block , 0 , 0 , 32, | |
16514 | 0xfc0003ff, 0x200001a8, 0 , 0, | |
16515 | 0x0 }, /* _POOL32A0~*(53) */ | |
16516 | { instruction , 0 , 0 , 32, | |
8d416f6b | 16517 | 0xfc0003ff, 0x200001b0, &DMFGC0 , 0, |
89a955e8 AM |
16518 | CP0_ | MIPS64_ | VZ_}, /* DMFGC0 */ |
16519 | { reserved_block , 0 , 0 , 32, | |
16520 | 0xfc0003ff, 0x200001b8, 0 , 0, | |
16521 | 0x0 }, /* _POOL32A0~*(55) */ | |
16522 | { instruction , 0 , 0 , 32, | |
8d416f6b | 16523 | 0xfc0003ff, 0x200001c0, &RDHWR , 0, |
89a955e8 AM |
16524 | XMMS_ }, /* RDHWR */ |
16525 | { reserved_block , 0 , 0 , 32, | |
16526 | 0xfc0003ff, 0x200001c8, 0 , 0, | |
16527 | 0x0 }, /* _POOL32A0~*(57) */ | |
16528 | { instruction , 0 , 0 , 32, | |
8d416f6b | 16529 | 0xfc0003ff, 0x200001d0, &SUBU_32_ , 0, |
89a955e8 AM |
16530 | 0x0 }, /* SUBU[32] */ |
16531 | { instruction , 0 , 0 , 32, | |
8d416f6b | 16532 | 0xfc0003ff, 0x200001d8, &MODU , 0, |
89a955e8 AM |
16533 | 0x0 }, /* MODU */ |
16534 | { reserved_block , 0 , 0 , 32, | |
16535 | 0xfc0003ff, 0x200001e0, 0 , 0, | |
16536 | 0x0 }, /* _POOL32A0~*(60) */ | |
16537 | { reserved_block , 0 , 0 , 32, | |
16538 | 0xfc0003ff, 0x200001e8, 0 , 0, | |
16539 | 0x0 }, /* _POOL32A0~*(61) */ | |
16540 | { instruction , 0 , 0 , 32, | |
8d416f6b | 16541 | 0xfc0003ff, 0x200001f0, &DMTGC0 , 0, |
89a955e8 AM |
16542 | CP0_ | MIPS64_ | VZ_}, /* DMTGC0 */ |
16543 | { reserved_block , 0 , 0 , 32, | |
16544 | 0xfc0003ff, 0x200001f8, 0 , 0, | |
16545 | 0x0 }, /* _POOL32A0~*(63) */ | |
16546 | { reserved_block , 0 , 0 , 32, | |
16547 | 0xfc0003ff, 0x20000200, 0 , 0, | |
16548 | 0x0 }, /* _POOL32A0~*(64) */ | |
16549 | { reserved_block , 0 , 0 , 32, | |
16550 | 0xfc0003ff, 0x20000208, 0 , 0, | |
16551 | 0x0 }, /* _POOL32A0~*(65) */ | |
16552 | { pool , P_CMOVE , 2 , 32, | |
16553 | 0xfc0003ff, 0x20000210, 0 , 0, | |
16554 | 0x0 }, /* P.CMOVE */ | |
16555 | { reserved_block , 0 , 0 , 32, | |
16556 | 0xfc0003ff, 0x20000218, 0 , 0, | |
16557 | 0x0 }, /* _POOL32A0~*(67) */ | |
16558 | { reserved_block , 0 , 0 , 32, | |
16559 | 0xfc0003ff, 0x20000220, 0 , 0, | |
16560 | 0x0 }, /* _POOL32A0~*(68) */ | |
16561 | { instruction , 0 , 0 , 32, | |
8d416f6b | 16562 | 0xfc0003ff, 0x20000228, &FORK , 0, |
89a955e8 AM |
16563 | MT_ }, /* FORK */ |
16564 | { instruction , 0 , 0 , 32, | |
8d416f6b | 16565 | 0xfc0003ff, 0x20000230, &MFTR , 0, |
89a955e8 AM |
16566 | MT_ }, /* MFTR */ |
16567 | { instruction , 0 , 0 , 32, | |
8d416f6b | 16568 | 0xfc0003ff, 0x20000238, &MFHTR , 0, |
89a955e8 AM |
16569 | MT_ }, /* MFHTR */ |
16570 | { reserved_block , 0 , 0 , 32, | |
16571 | 0xfc0003ff, 0x20000240, 0 , 0, | |
16572 | 0x0 }, /* _POOL32A0~*(72) */ | |
16573 | { reserved_block , 0 , 0 , 32, | |
16574 | 0xfc0003ff, 0x20000248, 0 , 0, | |
16575 | 0x0 }, /* _POOL32A0~*(73) */ | |
16576 | { instruction , 0 , 0 , 32, | |
8d416f6b | 16577 | 0xfc0003ff, 0x20000250, &AND_32_ , 0, |
89a955e8 AM |
16578 | 0x0 }, /* AND[32] */ |
16579 | { reserved_block , 0 , 0 , 32, | |
16580 | 0xfc0003ff, 0x20000258, 0 , 0, | |
16581 | 0x0 }, /* _POOL32A0~*(75) */ | |
16582 | { reserved_block , 0 , 0 , 32, | |
16583 | 0xfc0003ff, 0x20000260, 0 , 0, | |
16584 | 0x0 }, /* _POOL32A0~*(76) */ | |
16585 | { instruction , 0 , 0 , 32, | |
8d416f6b | 16586 | 0xfc0003ff, 0x20000268, &YIELD , 0, |
89a955e8 AM |
16587 | MT_ }, /* YIELD */ |
16588 | { instruction , 0 , 0 , 32, | |
8d416f6b | 16589 | 0xfc0003ff, 0x20000270, &MTTR , 0, |
89a955e8 AM |
16590 | MT_ }, /* MTTR */ |
16591 | { instruction , 0 , 0 , 32, | |
8d416f6b | 16592 | 0xfc0003ff, 0x20000278, &MTHTR , 0, |
89a955e8 AM |
16593 | MT_ }, /* MTHTR */ |
16594 | { reserved_block , 0 , 0 , 32, | |
16595 | 0xfc0003ff, 0x20000280, 0 , 0, | |
16596 | 0x0 }, /* _POOL32A0~*(80) */ | |
16597 | { reserved_block , 0 , 0 , 32, | |
16598 | 0xfc0003ff, 0x20000288, 0 , 0, | |
16599 | 0x0 }, /* _POOL32A0~*(81) */ | |
16600 | { instruction , 0 , 0 , 32, | |
8d416f6b | 16601 | 0xfc0003ff, 0x20000290, &OR_32_ , 0, |
89a955e8 AM |
16602 | 0x0 }, /* OR[32] */ |
16603 | { reserved_block , 0 , 0 , 32, | |
16604 | 0xfc0003ff, 0x20000298, 0 , 0, | |
16605 | 0x0 }, /* _POOL32A0~*(83) */ | |
16606 | { reserved_block , 0 , 0 , 32, | |
16607 | 0xfc0003ff, 0x200002a0, 0 , 0, | |
16608 | 0x0 }, /* _POOL32A0~*(84) */ | |
16609 | { reserved_block , 0 , 0 , 32, | |
16610 | 0xfc0003ff, 0x200002a8, 0 , 0, | |
16611 | 0x0 }, /* _POOL32A0~*(85) */ | |
16612 | { pool , P_MT_VPE , 8 , 32, | |
16613 | 0xfc0003ff, 0x200002b0, 0 , 0, | |
16614 | 0x0 }, /* P.MT_VPE */ | |
16615 | { reserved_block , 0 , 0 , 32, | |
16616 | 0xfc0003ff, 0x200002b8, 0 , 0, | |
16617 | 0x0 }, /* _POOL32A0~*(87) */ | |
16618 | { reserved_block , 0 , 0 , 32, | |
16619 | 0xfc0003ff, 0x200002c0, 0 , 0, | |
16620 | 0x0 }, /* _POOL32A0~*(88) */ | |
16621 | { reserved_block , 0 , 0 , 32, | |
16622 | 0xfc0003ff, 0x200002c8, 0 , 0, | |
16623 | 0x0 }, /* _POOL32A0~*(89) */ | |
16624 | { instruction , 0 , 0 , 32, | |
8d416f6b | 16625 | 0xfc0003ff, 0x200002d0, &NOR , 0, |
89a955e8 AM |
16626 | 0x0 }, /* NOR */ |
16627 | { reserved_block , 0 , 0 , 32, | |
16628 | 0xfc0003ff, 0x200002d8, 0 , 0, | |
16629 | 0x0 }, /* _POOL32A0~*(91) */ | |
16630 | { reserved_block , 0 , 0 , 32, | |
16631 | 0xfc0003ff, 0x200002e0, 0 , 0, | |
16632 | 0x0 }, /* _POOL32A0~*(92) */ | |
16633 | { reserved_block , 0 , 0 , 32, | |
16634 | 0xfc0003ff, 0x200002e8, 0 , 0, | |
16635 | 0x0 }, /* _POOL32A0~*(93) */ | |
16636 | { reserved_block , 0 , 0 , 32, | |
16637 | 0xfc0003ff, 0x200002f0, 0 , 0, | |
16638 | 0x0 }, /* _POOL32A0~*(94) */ | |
16639 | { reserved_block , 0 , 0 , 32, | |
16640 | 0xfc0003ff, 0x200002f8, 0 , 0, | |
16641 | 0x0 }, /* _POOL32A0~*(95) */ | |
16642 | { reserved_block , 0 , 0 , 32, | |
16643 | 0xfc0003ff, 0x20000300, 0 , 0, | |
16644 | 0x0 }, /* _POOL32A0~*(96) */ | |
16645 | { reserved_block , 0 , 0 , 32, | |
16646 | 0xfc0003ff, 0x20000308, 0 , 0, | |
16647 | 0x0 }, /* _POOL32A0~*(97) */ | |
16648 | { instruction , 0 , 0 , 32, | |
8d416f6b | 16649 | 0xfc0003ff, 0x20000310, &XOR_32_ , 0, |
89a955e8 AM |
16650 | 0x0 }, /* XOR[32] */ |
16651 | { reserved_block , 0 , 0 , 32, | |
16652 | 0xfc0003ff, 0x20000318, 0 , 0, | |
16653 | 0x0 }, /* _POOL32A0~*(99) */ | |
16654 | { reserved_block , 0 , 0 , 32, | |
16655 | 0xfc0003ff, 0x20000320, 0 , 0, | |
16656 | 0x0 }, /* _POOL32A0~*(100) */ | |
16657 | { reserved_block , 0 , 0 , 32, | |
16658 | 0xfc0003ff, 0x20000328, 0 , 0, | |
16659 | 0x0 }, /* _POOL32A0~*(101) */ | |
16660 | { reserved_block , 0 , 0 , 32, | |
16661 | 0xfc0003ff, 0x20000330, 0 , 0, | |
16662 | 0x0 }, /* _POOL32A0~*(102) */ | |
16663 | { reserved_block , 0 , 0 , 32, | |
16664 | 0xfc0003ff, 0x20000338, 0 , 0, | |
16665 | 0x0 }, /* _POOL32A0~*(103) */ | |
16666 | { reserved_block , 0 , 0 , 32, | |
16667 | 0xfc0003ff, 0x20000340, 0 , 0, | |
16668 | 0x0 }, /* _POOL32A0~*(104) */ | |
16669 | { reserved_block , 0 , 0 , 32, | |
16670 | 0xfc0003ff, 0x20000348, 0 , 0, | |
16671 | 0x0 }, /* _POOL32A0~*(105) */ | |
16672 | { instruction , 0 , 0 , 32, | |
8d416f6b | 16673 | 0xfc0003ff, 0x20000350, &SLT , 0, |
89a955e8 AM |
16674 | 0x0 }, /* SLT */ |
16675 | { reserved_block , 0 , 0 , 32, | |
16676 | 0xfc0003ff, 0x20000358, 0 , 0, | |
16677 | 0x0 }, /* _POOL32A0~*(107) */ | |
16678 | { reserved_block , 0 , 0 , 32, | |
16679 | 0xfc0003ff, 0x20000360, 0 , 0, | |
16680 | 0x0 }, /* _POOL32A0~*(108) */ | |
16681 | { reserved_block , 0 , 0 , 32, | |
16682 | 0xfc0003ff, 0x20000368, 0 , 0, | |
16683 | 0x0 }, /* _POOL32A0~*(109) */ | |
16684 | { reserved_block , 0 , 0 , 32, | |
16685 | 0xfc0003ff, 0x20000370, 0 , 0, | |
16686 | 0x0 }, /* _POOL32A0~*(110) */ | |
16687 | { reserved_block , 0 , 0 , 32, | |
16688 | 0xfc0003ff, 0x20000378, 0 , 0, | |
16689 | 0x0 }, /* _POOL32A0~*(111) */ | |
16690 | { reserved_block , 0 , 0 , 32, | |
16691 | 0xfc0003ff, 0x20000380, 0 , 0, | |
16692 | 0x0 }, /* _POOL32A0~*(112) */ | |
16693 | { reserved_block , 0 , 0 , 32, | |
16694 | 0xfc0003ff, 0x20000388, 0 , 0, | |
16695 | 0x0 }, /* _POOL32A0~*(113) */ | |
16696 | { pool , P_SLTU , 2 , 32, | |
16697 | 0xfc0003ff, 0x20000390, 0 , 0, | |
16698 | 0x0 }, /* P.SLTU */ | |
16699 | { reserved_block , 0 , 0 , 32, | |
16700 | 0xfc0003ff, 0x20000398, 0 , 0, | |
16701 | 0x0 }, /* _POOL32A0~*(115) */ | |
16702 | { reserved_block , 0 , 0 , 32, | |
16703 | 0xfc0003ff, 0x200003a0, 0 , 0, | |
16704 | 0x0 }, /* _POOL32A0~*(116) */ | |
16705 | { reserved_block , 0 , 0 , 32, | |
16706 | 0xfc0003ff, 0x200003a8, 0 , 0, | |
16707 | 0x0 }, /* _POOL32A0~*(117) */ | |
16708 | { reserved_block , 0 , 0 , 32, | |
16709 | 0xfc0003ff, 0x200003b0, 0 , 0, | |
16710 | 0x0 }, /* _POOL32A0~*(118) */ | |
16711 | { reserved_block , 0 , 0 , 32, | |
16712 | 0xfc0003ff, 0x200003b8, 0 , 0, | |
16713 | 0x0 }, /* _POOL32A0~*(119) */ | |
16714 | { reserved_block , 0 , 0 , 32, | |
16715 | 0xfc0003ff, 0x200003c0, 0 , 0, | |
16716 | 0x0 }, /* _POOL32A0~*(120) */ | |
16717 | { reserved_block , 0 , 0 , 32, | |
16718 | 0xfc0003ff, 0x200003c8, 0 , 0, | |
16719 | 0x0 }, /* _POOL32A0~*(121) */ | |
16720 | { instruction , 0 , 0 , 32, | |
8d416f6b | 16721 | 0xfc0003ff, 0x200003d0, &SOV , 0, |
89a955e8 AM |
16722 | 0x0 }, /* SOV */ |
16723 | { reserved_block , 0 , 0 , 32, | |
16724 | 0xfc0003ff, 0x200003d8, 0 , 0, | |
16725 | 0x0 }, /* _POOL32A0~*(123) */ | |
16726 | { reserved_block , 0 , 0 , 32, | |
16727 | 0xfc0003ff, 0x200003e0, 0 , 0, | |
16728 | 0x0 }, /* _POOL32A0~*(124) */ | |
16729 | { reserved_block , 0 , 0 , 32, | |
16730 | 0xfc0003ff, 0x200003e8, 0 , 0, | |
16731 | 0x0 }, /* _POOL32A0~*(125) */ | |
16732 | { reserved_block , 0 , 0 , 32, | |
16733 | 0xfc0003ff, 0x200003f0, 0 , 0, | |
16734 | 0x0 }, /* _POOL32A0~*(126) */ | |
16735 | { reserved_block , 0 , 0 , 32, | |
16736 | 0xfc0003ff, 0x200003f8, 0 , 0, | |
16737 | 0x0 }, /* _POOL32A0~*(127) */ | |
16738 | }; | |
16739 | ||
16740 | ||
a1465490 | 16741 | static const Pool ADDQ__S__PH[2] = { |
89a955e8 | 16742 | { instruction , 0 , 0 , 32, |
8d416f6b | 16743 | 0xfc0007ff, 0x2000000d, &ADDQ_PH , 0, |
89a955e8 AM |
16744 | DSP_ }, /* ADDQ.PH */ |
16745 | { instruction , 0 , 0 , 32, | |
8d416f6b | 16746 | 0xfc0007ff, 0x2000040d, &ADDQ_S_PH , 0, |
89a955e8 AM |
16747 | DSP_ }, /* ADDQ_S.PH */ |
16748 | }; | |
16749 | ||
16750 | ||
a1465490 | 16751 | static const Pool MUL__S__PH[2] = { |
89a955e8 | 16752 | { instruction , 0 , 0 , 32, |
8d416f6b | 16753 | 0xfc0007ff, 0x2000002d, &MUL_PH , 0, |
89a955e8 AM |
16754 | DSP_ }, /* MUL.PH */ |
16755 | { instruction , 0 , 0 , 32, | |
8d416f6b | 16756 | 0xfc0007ff, 0x2000042d, &MUL_S_PH , 0, |
89a955e8 AM |
16757 | DSP_ }, /* MUL_S.PH */ |
16758 | }; | |
16759 | ||
16760 | ||
a1465490 | 16761 | static const Pool ADDQH__R__PH[2] = { |
89a955e8 | 16762 | { instruction , 0 , 0 , 32, |
8d416f6b | 16763 | 0xfc0007ff, 0x2000004d, &ADDQH_PH , 0, |
89a955e8 AM |
16764 | DSP_ }, /* ADDQH.PH */ |
16765 | { instruction , 0 , 0 , 32, | |
8d416f6b | 16766 | 0xfc0007ff, 0x2000044d, &ADDQH_R_PH , 0, |
89a955e8 AM |
16767 | DSP_ }, /* ADDQH_R.PH */ |
16768 | }; | |
16769 | ||
16770 | ||
a1465490 | 16771 | static const Pool ADDQH__R__W[2] = { |
89a955e8 | 16772 | { instruction , 0 , 0 , 32, |
8d416f6b | 16773 | 0xfc0007ff, 0x2000008d, &ADDQH_W , 0, |
89a955e8 AM |
16774 | DSP_ }, /* ADDQH.W */ |
16775 | { instruction , 0 , 0 , 32, | |
8d416f6b | 16776 | 0xfc0007ff, 0x2000048d, &ADDQH_R_W , 0, |
89a955e8 AM |
16777 | DSP_ }, /* ADDQH_R.W */ |
16778 | }; | |
16779 | ||
16780 | ||
a1465490 | 16781 | static const Pool ADDU__S__QB[2] = { |
89a955e8 | 16782 | { instruction , 0 , 0 , 32, |
8d416f6b | 16783 | 0xfc0007ff, 0x200000cd, &ADDU_QB , 0, |
89a955e8 AM |
16784 | DSP_ }, /* ADDU.QB */ |
16785 | { instruction , 0 , 0 , 32, | |
8d416f6b | 16786 | 0xfc0007ff, 0x200004cd, &ADDU_S_QB , 0, |
89a955e8 AM |
16787 | DSP_ }, /* ADDU_S.QB */ |
16788 | }; | |
16789 | ||
16790 | ||
a1465490 | 16791 | static const Pool ADDU__S__PH[2] = { |
89a955e8 | 16792 | { instruction , 0 , 0 , 32, |
8d416f6b | 16793 | 0xfc0007ff, 0x2000010d, &ADDU_PH , 0, |
89a955e8 AM |
16794 | DSP_ }, /* ADDU.PH */ |
16795 | { instruction , 0 , 0 , 32, | |
8d416f6b | 16796 | 0xfc0007ff, 0x2000050d, &ADDU_S_PH , 0, |
89a955e8 AM |
16797 | DSP_ }, /* ADDU_S.PH */ |
16798 | }; | |
16799 | ||
16800 | ||
a1465490 | 16801 | static const Pool ADDUH__R__QB[2] = { |
89a955e8 | 16802 | { instruction , 0 , 0 , 32, |
8d416f6b | 16803 | 0xfc0007ff, 0x2000014d, &ADDUH_QB , 0, |
89a955e8 AM |
16804 | DSP_ }, /* ADDUH.QB */ |
16805 | { instruction , 0 , 0 , 32, | |
8d416f6b | 16806 | 0xfc0007ff, 0x2000054d, &ADDUH_R_QB , 0, |
89a955e8 AM |
16807 | DSP_ }, /* ADDUH_R.QB */ |
16808 | }; | |
16809 | ||
16810 | ||
a1465490 | 16811 | static const Pool SHRAV__R__PH[2] = { |
89a955e8 | 16812 | { instruction , 0 , 0 , 32, |
8d416f6b | 16813 | 0xfc0007ff, 0x2000018d, &SHRAV_PH , 0, |
89a955e8 AM |
16814 | DSP_ }, /* SHRAV.PH */ |
16815 | { instruction , 0 , 0 , 32, | |
8d416f6b | 16816 | 0xfc0007ff, 0x2000058d, &SHRAV_R_PH , 0, |
89a955e8 AM |
16817 | DSP_ }, /* SHRAV_R.PH */ |
16818 | }; | |
16819 | ||
16820 | ||
a1465490 | 16821 | static const Pool SHRAV__R__QB[2] = { |
89a955e8 | 16822 | { instruction , 0 , 0 , 32, |
8d416f6b | 16823 | 0xfc0007ff, 0x200001cd, &SHRAV_QB , 0, |
89a955e8 AM |
16824 | DSP_ }, /* SHRAV.QB */ |
16825 | { instruction , 0 , 0 , 32, | |
8d416f6b | 16826 | 0xfc0007ff, 0x200005cd, &SHRAV_R_QB , 0, |
89a955e8 AM |
16827 | DSP_ }, /* SHRAV_R.QB */ |
16828 | }; | |
16829 | ||
16830 | ||
a1465490 | 16831 | static const Pool SUBQ__S__PH[2] = { |
89a955e8 | 16832 | { instruction , 0 , 0 , 32, |
8d416f6b | 16833 | 0xfc0007ff, 0x2000020d, &SUBQ_PH , 0, |
89a955e8 AM |
16834 | DSP_ }, /* SUBQ.PH */ |
16835 | { instruction , 0 , 0 , 32, | |
8d416f6b | 16836 | 0xfc0007ff, 0x2000060d, &SUBQ_S_PH , 0, |
89a955e8 AM |
16837 | DSP_ }, /* SUBQ_S.PH */ |
16838 | }; | |
16839 | ||
16840 | ||
a1465490 | 16841 | static const Pool SUBQH__R__PH[2] = { |
89a955e8 | 16842 | { instruction , 0 , 0 , 32, |
8d416f6b | 16843 | 0xfc0007ff, 0x2000024d, &SUBQH_PH , 0, |
89a955e8 AM |
16844 | DSP_ }, /* SUBQH.PH */ |
16845 | { instruction , 0 , 0 , 32, | |
8d416f6b | 16846 | 0xfc0007ff, 0x2000064d, &SUBQH_R_PH , 0, |
89a955e8 AM |
16847 | DSP_ }, /* SUBQH_R.PH */ |
16848 | }; | |
16849 | ||
16850 | ||
a1465490 | 16851 | static const Pool SUBQH__R__W[2] = { |
89a955e8 | 16852 | { instruction , 0 , 0 , 32, |
8d416f6b | 16853 | 0xfc0007ff, 0x2000028d, &SUBQH_W , 0, |
89a955e8 AM |
16854 | DSP_ }, /* SUBQH.W */ |
16855 | { instruction , 0 , 0 , 32, | |
8d416f6b | 16856 | 0xfc0007ff, 0x2000068d, &SUBQH_R_W , 0, |
89a955e8 AM |
16857 | DSP_ }, /* SUBQH_R.W */ |
16858 | }; | |
16859 | ||
16860 | ||
a1465490 | 16861 | static const Pool SUBU__S__QB[2] = { |
89a955e8 | 16862 | { instruction , 0 , 0 , 32, |
8d416f6b | 16863 | 0xfc0007ff, 0x200002cd, &SUBU_QB , 0, |
89a955e8 AM |
16864 | DSP_ }, /* SUBU.QB */ |
16865 | { instruction , 0 , 0 , 32, | |
8d416f6b | 16866 | 0xfc0007ff, 0x200006cd, &SUBU_S_QB , 0, |
89a955e8 AM |
16867 | DSP_ }, /* SUBU_S.QB */ |
16868 | }; | |
16869 | ||
16870 | ||
a1465490 | 16871 | static const Pool SUBU__S__PH[2] = { |
89a955e8 | 16872 | { instruction , 0 , 0 , 32, |
8d416f6b | 16873 | 0xfc0007ff, 0x2000030d, &SUBU_PH , 0, |
89a955e8 AM |
16874 | DSP_ }, /* SUBU.PH */ |
16875 | { instruction , 0 , 0 , 32, | |
8d416f6b | 16876 | 0xfc0007ff, 0x2000070d, &SUBU_S_PH , 0, |
89a955e8 AM |
16877 | DSP_ }, /* SUBU_S.PH */ |
16878 | }; | |
16879 | ||
16880 | ||
a1465490 | 16881 | static const Pool SHRA__R__PH[2] = { |
89a955e8 | 16882 | { instruction , 0 , 0 , 32, |
8d416f6b | 16883 | 0xfc0007ff, 0x20000335, &SHRA_PH , 0, |
89a955e8 AM |
16884 | DSP_ }, /* SHRA.PH */ |
16885 | { instruction , 0 , 0 , 32, | |
8d416f6b | 16886 | 0xfc0007ff, 0x20000735, &SHRA_R_PH , 0, |
89a955e8 AM |
16887 | DSP_ }, /* SHRA_R.PH */ |
16888 | }; | |
16889 | ||
16890 | ||
a1465490 | 16891 | static const Pool SUBUH__R__QB[2] = { |
89a955e8 | 16892 | { instruction , 0 , 0 , 32, |
8d416f6b | 16893 | 0xfc0007ff, 0x2000034d, &SUBUH_QB , 0, |
89a955e8 AM |
16894 | DSP_ }, /* SUBUH.QB */ |
16895 | { instruction , 0 , 0 , 32, | |
8d416f6b | 16896 | 0xfc0007ff, 0x2000074d, &SUBUH_R_QB , 0, |
89a955e8 AM |
16897 | DSP_ }, /* SUBUH_R.QB */ |
16898 | }; | |
16899 | ||
16900 | ||
a1465490 | 16901 | static const Pool SHLLV__S__PH[2] = { |
89a955e8 | 16902 | { instruction , 0 , 0 , 32, |
8d416f6b | 16903 | 0xfc0007ff, 0x2000038d, &SHLLV_PH , 0, |
89a955e8 AM |
16904 | DSP_ }, /* SHLLV.PH */ |
16905 | { instruction , 0 , 0 , 32, | |
8d416f6b | 16906 | 0xfc0007ff, 0x2000078d, &SHLLV_S_PH , 0, |
89a955e8 AM |
16907 | DSP_ }, /* SHLLV_S.PH */ |
16908 | }; | |
16909 | ||
16910 | ||
a1465490 | 16911 | static const Pool SHLL__S__PH[4] = { |
89a955e8 | 16912 | { instruction , 0 , 0 , 32, |
8d416f6b | 16913 | 0xfc000fff, 0x200003b5, &SHLL_PH , 0, |
89a955e8 AM |
16914 | DSP_ }, /* SHLL.PH */ |
16915 | { reserved_block , 0 , 0 , 32, | |
16916 | 0xfc000fff, 0x200007b5, 0 , 0, | |
16917 | 0x0 }, /* SHLL[_S].PH~*(1) */ | |
16918 | { instruction , 0 , 0 , 32, | |
8d416f6b | 16919 | 0xfc000fff, 0x20000bb5, &SHLL_S_PH , 0, |
89a955e8 AM |
16920 | DSP_ }, /* SHLL_S.PH */ |
16921 | { reserved_block , 0 , 0 , 32, | |
16922 | 0xfc000fff, 0x20000fb5, 0 , 0, | |
16923 | 0x0 }, /* SHLL[_S].PH~*(3) */ | |
16924 | }; | |
16925 | ||
16926 | ||
a1465490 | 16927 | static const Pool PRECR_SRA__R__PH_W[2] = { |
89a955e8 | 16928 | { instruction , 0 , 0 , 32, |
8d416f6b | 16929 | 0xfc0007ff, 0x200003cd, &PRECR_SRA_PH_W , 0, |
89a955e8 AM |
16930 | DSP_ }, /* PRECR_SRA.PH.W */ |
16931 | { instruction , 0 , 0 , 32, | |
8d416f6b | 16932 | 0xfc0007ff, 0x200007cd, &PRECR_SRA_R_PH_W , 0, |
89a955e8 AM |
16933 | DSP_ }, /* PRECR_SRA_R.PH.W */ |
16934 | }; | |
16935 | ||
16936 | ||
a1465490 | 16937 | static const Pool _POOL32A5[128] = { |
89a955e8 | 16938 | { instruction , 0 , 0 , 32, |
8d416f6b | 16939 | 0xfc0003ff, 0x20000005, &CMP_EQ_PH , 0, |
89a955e8 AM |
16940 | DSP_ }, /* CMP.EQ.PH */ |
16941 | { pool , ADDQ__S__PH , 2 , 32, | |
16942 | 0xfc0003ff, 0x2000000d, 0 , 0, | |
16943 | 0x0 }, /* ADDQ[_S].PH */ | |
16944 | { reserved_block , 0 , 0 , 32, | |
16945 | 0xfc0003ff, 0x20000015, 0 , 0, | |
16946 | 0x0 }, /* _POOL32A5~*(2) */ | |
16947 | { instruction , 0 , 0 , 32, | |
8d416f6b | 16948 | 0xfc0003ff, 0x2000001d, &SHILO , 0, |
89a955e8 AM |
16949 | DSP_ }, /* SHILO */ |
16950 | { instruction , 0 , 0 , 32, | |
8d416f6b | 16951 | 0xfc0003ff, 0x20000025, &MULEQ_S_W_PHL , 0, |
89a955e8 AM |
16952 | DSP_ }, /* MULEQ_S.W.PHL */ |
16953 | { pool , MUL__S__PH , 2 , 32, | |
16954 | 0xfc0003ff, 0x2000002d, 0 , 0, | |
16955 | 0x0 }, /* MUL[_S].PH */ | |
16956 | { reserved_block , 0 , 0 , 32, | |
16957 | 0xfc0003ff, 0x20000035, 0 , 0, | |
16958 | 0x0 }, /* _POOL32A5~*(6) */ | |
16959 | { instruction , 0 , 0 , 32, | |
8d416f6b | 16960 | 0xfc0003ff, 0x2000003d, &REPL_PH , 0, |
89a955e8 AM |
16961 | DSP_ }, /* REPL.PH */ |
16962 | { instruction , 0 , 0 , 32, | |
8d416f6b | 16963 | 0xfc0003ff, 0x20000045, &CMP_LT_PH , 0, |
89a955e8 AM |
16964 | DSP_ }, /* CMP.LT.PH */ |
16965 | { pool , ADDQH__R__PH , 2 , 32, | |
16966 | 0xfc0003ff, 0x2000004d, 0 , 0, | |
16967 | 0x0 }, /* ADDQH[_R].PH */ | |
16968 | { reserved_block , 0 , 0 , 32, | |
16969 | 0xfc0003ff, 0x20000055, 0 , 0, | |
16970 | 0x0 }, /* _POOL32A5~*(10) */ | |
16971 | { reserved_block , 0 , 0 , 32, | |
16972 | 0xfc0003ff, 0x2000005d, 0 , 0, | |
16973 | 0x0 }, /* _POOL32A5~*(11) */ | |
16974 | { instruction , 0 , 0 , 32, | |
8d416f6b | 16975 | 0xfc0003ff, 0x20000065, &MULEQ_S_W_PHR , 0, |
89a955e8 AM |
16976 | DSP_ }, /* MULEQ_S.W.PHR */ |
16977 | { instruction , 0 , 0 , 32, | |
8d416f6b | 16978 | 0xfc0003ff, 0x2000006d, &PRECR_QB_PH , 0, |
89a955e8 AM |
16979 | DSP_ }, /* PRECR.QB.PH */ |
16980 | { reserved_block , 0 , 0 , 32, | |
16981 | 0xfc0003ff, 0x20000075, 0 , 0, | |
16982 | 0x0 }, /* _POOL32A5~*(14) */ | |
16983 | { reserved_block , 0 , 0 , 32, | |
16984 | 0xfc0003ff, 0x2000007d, 0 , 0, | |
16985 | 0x0 }, /* _POOL32A5~*(15) */ | |
16986 | { instruction , 0 , 0 , 32, | |
8d416f6b | 16987 | 0xfc0003ff, 0x20000085, &CMP_LE_PH , 0, |
89a955e8 AM |
16988 | DSP_ }, /* CMP.LE.PH */ |
16989 | { pool , ADDQH__R__W , 2 , 32, | |
16990 | 0xfc0003ff, 0x2000008d, 0 , 0, | |
16991 | 0x0 }, /* ADDQH[_R].W */ | |
16992 | { instruction , 0 , 0 , 32, | |
8d416f6b | 16993 | 0xfc0003ff, 0x20000095, &MULEU_S_PH_QBL , 0, |
89a955e8 AM |
16994 | DSP_ }, /* MULEU_S.PH.QBL */ |
16995 | { reserved_block , 0 , 0 , 32, | |
16996 | 0xfc0003ff, 0x2000009d, 0 , 0, | |
16997 | 0x0 }, /* _POOL32A5~*(19) */ | |
16998 | { reserved_block , 0 , 0 , 32, | |
16999 | 0xfc0003ff, 0x200000a5, 0 , 0, | |
17000 | 0x0 }, /* _POOL32A5~*(20) */ | |
17001 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17002 | 0xfc0003ff, 0x200000ad, &PRECRQ_QB_PH , 0, |
89a955e8 AM |
17003 | DSP_ }, /* PRECRQ.QB.PH */ |
17004 | { reserved_block , 0 , 0 , 32, | |
17005 | 0xfc0003ff, 0x200000b5, 0 , 0, | |
17006 | 0x0 }, /* _POOL32A5~*(22) */ | |
17007 | { reserved_block , 0 , 0 , 32, | |
17008 | 0xfc0003ff, 0x200000bd, 0 , 0, | |
17009 | 0x0 }, /* _POOL32A5~*(23) */ | |
17010 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17011 | 0xfc0003ff, 0x200000c5, &CMPGU_EQ_QB , 0, |
89a955e8 AM |
17012 | DSP_ }, /* CMPGU.EQ.QB */ |
17013 | { pool , ADDU__S__QB , 2 , 32, | |
17014 | 0xfc0003ff, 0x200000cd, 0 , 0, | |
17015 | 0x0 }, /* ADDU[_S].QB */ | |
17016 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17017 | 0xfc0003ff, 0x200000d5, &MULEU_S_PH_QBR , 0, |
89a955e8 AM |
17018 | DSP_ }, /* MULEU_S.PH.QBR */ |
17019 | { reserved_block , 0 , 0 , 32, | |
17020 | 0xfc0003ff, 0x200000dd, 0 , 0, | |
17021 | 0x0 }, /* _POOL32A5~*(27) */ | |
17022 | { reserved_block , 0 , 0 , 32, | |
17023 | 0xfc0003ff, 0x200000e5, 0 , 0, | |
17024 | 0x0 }, /* _POOL32A5~*(28) */ | |
17025 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17026 | 0xfc0003ff, 0x200000ed, &PRECRQ_PH_W , 0, |
89a955e8 AM |
17027 | DSP_ }, /* PRECRQ.PH.W */ |
17028 | { reserved_block , 0 , 0 , 32, | |
17029 | 0xfc0003ff, 0x200000f5, 0 , 0, | |
17030 | 0x0 }, /* _POOL32A5~*(30) */ | |
17031 | { reserved_block , 0 , 0 , 32, | |
17032 | 0xfc0003ff, 0x200000fd, 0 , 0, | |
17033 | 0x0 }, /* _POOL32A5~*(31) */ | |
17034 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17035 | 0xfc0003ff, 0x20000105, &CMPGU_LT_QB , 0, |
89a955e8 AM |
17036 | DSP_ }, /* CMPGU.LT.QB */ |
17037 | { pool , ADDU__S__PH , 2 , 32, | |
17038 | 0xfc0003ff, 0x2000010d, 0 , 0, | |
17039 | 0x0 }, /* ADDU[_S].PH */ | |
17040 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17041 | 0xfc0003ff, 0x20000115, &MULQ_RS_PH , 0, |
89a955e8 AM |
17042 | DSP_ }, /* MULQ_RS.PH */ |
17043 | { reserved_block , 0 , 0 , 32, | |
17044 | 0xfc0003ff, 0x2000011d, 0 , 0, | |
17045 | 0x0 }, /* _POOL32A5~*(35) */ | |
17046 | { reserved_block , 0 , 0 , 32, | |
17047 | 0xfc0003ff, 0x20000125, 0 , 0, | |
17048 | 0x0 }, /* _POOL32A5~*(36) */ | |
17049 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17050 | 0xfc0003ff, 0x2000012d, &PRECRQ_RS_PH_W , 0, |
89a955e8 AM |
17051 | DSP_ }, /* PRECRQ_RS.PH.W */ |
17052 | { reserved_block , 0 , 0 , 32, | |
17053 | 0xfc0003ff, 0x20000135, 0 , 0, | |
17054 | 0x0 }, /* _POOL32A5~*(38) */ | |
17055 | { reserved_block , 0 , 0 , 32, | |
17056 | 0xfc0003ff, 0x2000013d, 0 , 0, | |
17057 | 0x0 }, /* _POOL32A5~*(39) */ | |
17058 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17059 | 0xfc0003ff, 0x20000145, &CMPGU_LE_QB , 0, |
89a955e8 AM |
17060 | DSP_ }, /* CMPGU.LE.QB */ |
17061 | { pool , ADDUH__R__QB , 2 , 32, | |
17062 | 0xfc0003ff, 0x2000014d, 0 , 0, | |
17063 | 0x0 }, /* ADDUH[_R].QB */ | |
17064 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17065 | 0xfc0003ff, 0x20000155, &MULQ_S_PH , 0, |
89a955e8 AM |
17066 | DSP_ }, /* MULQ_S.PH */ |
17067 | { reserved_block , 0 , 0 , 32, | |
17068 | 0xfc0003ff, 0x2000015d, 0 , 0, | |
17069 | 0x0 }, /* _POOL32A5~*(43) */ | |
17070 | { reserved_block , 0 , 0 , 32, | |
17071 | 0xfc0003ff, 0x20000165, 0 , 0, | |
17072 | 0x0 }, /* _POOL32A5~*(44) */ | |
17073 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17074 | 0xfc0003ff, 0x2000016d, &PRECRQU_S_QB_PH , 0, |
89a955e8 AM |
17075 | DSP_ }, /* PRECRQU_S.QB.PH */ |
17076 | { reserved_block , 0 , 0 , 32, | |
17077 | 0xfc0003ff, 0x20000175, 0 , 0, | |
17078 | 0x0 }, /* _POOL32A5~*(46) */ | |
17079 | { reserved_block , 0 , 0 , 32, | |
17080 | 0xfc0003ff, 0x2000017d, 0 , 0, | |
17081 | 0x0 }, /* _POOL32A5~*(47) */ | |
17082 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17083 | 0xfc0003ff, 0x20000185, &CMPGDU_EQ_QB , 0, |
89a955e8 AM |
17084 | DSP_ }, /* CMPGDU.EQ.QB */ |
17085 | { pool , SHRAV__R__PH , 2 , 32, | |
17086 | 0xfc0003ff, 0x2000018d, 0 , 0, | |
17087 | 0x0 }, /* SHRAV[_R].PH */ | |
17088 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17089 | 0xfc0003ff, 0x20000195, &MULQ_RS_W , 0, |
89a955e8 AM |
17090 | DSP_ }, /* MULQ_RS.W */ |
17091 | { reserved_block , 0 , 0 , 32, | |
17092 | 0xfc0003ff, 0x2000019d, 0 , 0, | |
17093 | 0x0 }, /* _POOL32A5~*(51) */ | |
17094 | { reserved_block , 0 , 0 , 32, | |
17095 | 0xfc0003ff, 0x200001a5, 0 , 0, | |
17096 | 0x0 }, /* _POOL32A5~*(52) */ | |
17097 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17098 | 0xfc0003ff, 0x200001ad, &PACKRL_PH , 0, |
89a955e8 AM |
17099 | DSP_ }, /* PACKRL.PH */ |
17100 | { reserved_block , 0 , 0 , 32, | |
17101 | 0xfc0003ff, 0x200001b5, 0 , 0, | |
17102 | 0x0 }, /* _POOL32A5~*(54) */ | |
17103 | { reserved_block , 0 , 0 , 32, | |
17104 | 0xfc0003ff, 0x200001bd, 0 , 0, | |
17105 | 0x0 }, /* _POOL32A5~*(55) */ | |
17106 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17107 | 0xfc0003ff, 0x200001c5, &CMPGDU_LT_QB , 0, |
89a955e8 AM |
17108 | DSP_ }, /* CMPGDU.LT.QB */ |
17109 | { pool , SHRAV__R__QB , 2 , 32, | |
17110 | 0xfc0003ff, 0x200001cd, 0 , 0, | |
17111 | 0x0 }, /* SHRAV[_R].QB */ | |
17112 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17113 | 0xfc0003ff, 0x200001d5, &MULQ_S_W , 0, |
89a955e8 AM |
17114 | DSP_ }, /* MULQ_S.W */ |
17115 | { reserved_block , 0 , 0 , 32, | |
17116 | 0xfc0003ff, 0x200001dd, 0 , 0, | |
17117 | 0x0 }, /* _POOL32A5~*(59) */ | |
17118 | { reserved_block , 0 , 0 , 32, | |
17119 | 0xfc0003ff, 0x200001e5, 0 , 0, | |
17120 | 0x0 }, /* _POOL32A5~*(60) */ | |
17121 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17122 | 0xfc0003ff, 0x200001ed, &PICK_QB , 0, |
89a955e8 AM |
17123 | DSP_ }, /* PICK.QB */ |
17124 | { reserved_block , 0 , 0 , 32, | |
17125 | 0xfc0003ff, 0x200001f5, 0 , 0, | |
17126 | 0x0 }, /* _POOL32A5~*(62) */ | |
17127 | { reserved_block , 0 , 0 , 32, | |
17128 | 0xfc0003ff, 0x200001fd, 0 , 0, | |
17129 | 0x0 }, /* _POOL32A5~*(63) */ | |
17130 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17131 | 0xfc0003ff, 0x20000205, &CMPGDU_LE_QB , 0, |
89a955e8 AM |
17132 | DSP_ }, /* CMPGDU.LE.QB */ |
17133 | { pool , SUBQ__S__PH , 2 , 32, | |
17134 | 0xfc0003ff, 0x2000020d, 0 , 0, | |
17135 | 0x0 }, /* SUBQ[_S].PH */ | |
17136 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17137 | 0xfc0003ff, 0x20000215, &APPEND , 0, |
89a955e8 AM |
17138 | DSP_ }, /* APPEND */ |
17139 | { reserved_block , 0 , 0 , 32, | |
17140 | 0xfc0003ff, 0x2000021d, 0 , 0, | |
17141 | 0x0 }, /* _POOL32A5~*(67) */ | |
17142 | { reserved_block , 0 , 0 , 32, | |
17143 | 0xfc0003ff, 0x20000225, 0 , 0, | |
17144 | 0x0 }, /* _POOL32A5~*(68) */ | |
17145 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17146 | 0xfc0003ff, 0x2000022d, &PICK_PH , 0, |
89a955e8 AM |
17147 | DSP_ }, /* PICK.PH */ |
17148 | { reserved_block , 0 , 0 , 32, | |
17149 | 0xfc0003ff, 0x20000235, 0 , 0, | |
17150 | 0x0 }, /* _POOL32A5~*(70) */ | |
17151 | { reserved_block , 0 , 0 , 32, | |
17152 | 0xfc0003ff, 0x2000023d, 0 , 0, | |
17153 | 0x0 }, /* _POOL32A5~*(71) */ | |
17154 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17155 | 0xfc0003ff, 0x20000245, &CMPU_EQ_QB , 0, |
89a955e8 AM |
17156 | DSP_ }, /* CMPU.EQ.QB */ |
17157 | { pool , SUBQH__R__PH , 2 , 32, | |
17158 | 0xfc0003ff, 0x2000024d, 0 , 0, | |
17159 | 0x0 }, /* SUBQH[_R].PH */ | |
17160 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17161 | 0xfc0003ff, 0x20000255, &PREPEND , 0, |
89a955e8 AM |
17162 | DSP_ }, /* PREPEND */ |
17163 | { reserved_block , 0 , 0 , 32, | |
17164 | 0xfc0003ff, 0x2000025d, 0 , 0, | |
17165 | 0x0 }, /* _POOL32A5~*(75) */ | |
17166 | { reserved_block , 0 , 0 , 32, | |
17167 | 0xfc0003ff, 0x20000265, 0 , 0, | |
17168 | 0x0 }, /* _POOL32A5~*(76) */ | |
17169 | { reserved_block , 0 , 0 , 32, | |
17170 | 0xfc0003ff, 0x2000026d, 0 , 0, | |
17171 | 0x0 }, /* _POOL32A5~*(77) */ | |
17172 | { reserved_block , 0 , 0 , 32, | |
17173 | 0xfc0003ff, 0x20000275, 0 , 0, | |
17174 | 0x0 }, /* _POOL32A5~*(78) */ | |
17175 | { reserved_block , 0 , 0 , 32, | |
17176 | 0xfc0003ff, 0x2000027d, 0 , 0, | |
17177 | 0x0 }, /* _POOL32A5~*(79) */ | |
17178 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17179 | 0xfc0003ff, 0x20000285, &CMPU_LT_QB , 0, |
89a955e8 AM |
17180 | DSP_ }, /* CMPU.LT.QB */ |
17181 | { pool , SUBQH__R__W , 2 , 32, | |
17182 | 0xfc0003ff, 0x2000028d, 0 , 0, | |
17183 | 0x0 }, /* SUBQH[_R].W */ | |
17184 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17185 | 0xfc0003ff, 0x20000295, &MODSUB , 0, |
89a955e8 AM |
17186 | DSP_ }, /* MODSUB */ |
17187 | { reserved_block , 0 , 0 , 32, | |
17188 | 0xfc0003ff, 0x2000029d, 0 , 0, | |
17189 | 0x0 }, /* _POOL32A5~*(83) */ | |
17190 | { reserved_block , 0 , 0 , 32, | |
17191 | 0xfc0003ff, 0x200002a5, 0 , 0, | |
17192 | 0x0 }, /* _POOL32A5~*(84) */ | |
17193 | { reserved_block , 0 , 0 , 32, | |
17194 | 0xfc0003ff, 0x200002ad, 0 , 0, | |
17195 | 0x0 }, /* _POOL32A5~*(85) */ | |
17196 | { reserved_block , 0 , 0 , 32, | |
17197 | 0xfc0003ff, 0x200002b5, 0 , 0, | |
17198 | 0x0 }, /* _POOL32A5~*(86) */ | |
17199 | { reserved_block , 0 , 0 , 32, | |
17200 | 0xfc0003ff, 0x200002bd, 0 , 0, | |
17201 | 0x0 }, /* _POOL32A5~*(87) */ | |
17202 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17203 | 0xfc0003ff, 0x200002c5, &CMPU_LE_QB , 0, |
89a955e8 AM |
17204 | DSP_ }, /* CMPU.LE.QB */ |
17205 | { pool , SUBU__S__QB , 2 , 32, | |
17206 | 0xfc0003ff, 0x200002cd, 0 , 0, | |
17207 | 0x0 }, /* SUBU[_S].QB */ | |
17208 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17209 | 0xfc0003ff, 0x200002d5, &SHRAV_R_W , 0, |
89a955e8 AM |
17210 | DSP_ }, /* SHRAV_R.W */ |
17211 | { reserved_block , 0 , 0 , 32, | |
17212 | 0xfc0003ff, 0x200002dd, 0 , 0, | |
17213 | 0x0 }, /* _POOL32A5~*(91) */ | |
17214 | { reserved_block , 0 , 0 , 32, | |
17215 | 0xfc0003ff, 0x200002e5, 0 , 0, | |
17216 | 0x0 }, /* _POOL32A5~*(92) */ | |
17217 | { reserved_block , 0 , 0 , 32, | |
17218 | 0xfc0003ff, 0x200002ed, 0 , 0, | |
17219 | 0x0 }, /* _POOL32A5~*(93) */ | |
17220 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17221 | 0xfc0003ff, 0x200002f5, &SHRA_R_W , 0, |
89a955e8 AM |
17222 | DSP_ }, /* SHRA_R.W */ |
17223 | { reserved_block , 0 , 0 , 32, | |
17224 | 0xfc0003ff, 0x200002fd, 0 , 0, | |
17225 | 0x0 }, /* _POOL32A5~*(95) */ | |
17226 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17227 | 0xfc0003ff, 0x20000305, &ADDQ_S_W , 0, |
89a955e8 AM |
17228 | DSP_ }, /* ADDQ_S.W */ |
17229 | { pool , SUBU__S__PH , 2 , 32, | |
17230 | 0xfc0003ff, 0x2000030d, 0 , 0, | |
17231 | 0x0 }, /* SUBU[_S].PH */ | |
17232 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17233 | 0xfc0003ff, 0x20000315, &SHRLV_PH , 0, |
89a955e8 AM |
17234 | DSP_ }, /* SHRLV.PH */ |
17235 | { reserved_block , 0 , 0 , 32, | |
17236 | 0xfc0003ff, 0x2000031d, 0 , 0, | |
17237 | 0x0 }, /* _POOL32A5~*(99) */ | |
17238 | { reserved_block , 0 , 0 , 32, | |
17239 | 0xfc0003ff, 0x20000325, 0 , 0, | |
17240 | 0x0 }, /* _POOL32A5~*(100) */ | |
17241 | { reserved_block , 0 , 0 , 32, | |
17242 | 0xfc0003ff, 0x2000032d, 0 , 0, | |
17243 | 0x0 }, /* _POOL32A5~*(101) */ | |
17244 | { pool , SHRA__R__PH , 2 , 32, | |
17245 | 0xfc0003ff, 0x20000335, 0 , 0, | |
17246 | 0x0 }, /* SHRA[_R].PH */ | |
17247 | { reserved_block , 0 , 0 , 32, | |
17248 | 0xfc0003ff, 0x2000033d, 0 , 0, | |
17249 | 0x0 }, /* _POOL32A5~*(103) */ | |
17250 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17251 | 0xfc0003ff, 0x20000345, &SUBQ_S_W , 0, |
89a955e8 AM |
17252 | DSP_ }, /* SUBQ_S.W */ |
17253 | { pool , SUBUH__R__QB , 2 , 32, | |
17254 | 0xfc0003ff, 0x2000034d, 0 , 0, | |
17255 | 0x0 }, /* SUBUH[_R].QB */ | |
17256 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17257 | 0xfc0003ff, 0x20000355, &SHRLV_QB , 0, |
89a955e8 AM |
17258 | DSP_ }, /* SHRLV.QB */ |
17259 | { reserved_block , 0 , 0 , 32, | |
17260 | 0xfc0003ff, 0x2000035d, 0 , 0, | |
17261 | 0x0 }, /* _POOL32A5~*(107) */ | |
17262 | { reserved_block , 0 , 0 , 32, | |
17263 | 0xfc0003ff, 0x20000365, 0 , 0, | |
17264 | 0x0 }, /* _POOL32A5~*(108) */ | |
17265 | { reserved_block , 0 , 0 , 32, | |
17266 | 0xfc0003ff, 0x2000036d, 0 , 0, | |
17267 | 0x0 }, /* _POOL32A5~*(109) */ | |
17268 | { reserved_block , 0 , 0 , 32, | |
17269 | 0xfc0003ff, 0x20000375, 0 , 0, | |
17270 | 0x0 }, /* _POOL32A5~*(110) */ | |
17271 | { reserved_block , 0 , 0 , 32, | |
17272 | 0xfc0003ff, 0x2000037d, 0 , 0, | |
17273 | 0x0 }, /* _POOL32A5~*(111) */ | |
17274 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17275 | 0xfc0003ff, 0x20000385, &ADDSC , 0, |
89a955e8 AM |
17276 | DSP_ }, /* ADDSC */ |
17277 | { pool , SHLLV__S__PH , 2 , 32, | |
17278 | 0xfc0003ff, 0x2000038d, 0 , 0, | |
17279 | 0x0 }, /* SHLLV[_S].PH */ | |
17280 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17281 | 0xfc0003ff, 0x20000395, &SHLLV_QB , 0, |
89a955e8 AM |
17282 | DSP_ }, /* SHLLV.QB */ |
17283 | { reserved_block , 0 , 0 , 32, | |
17284 | 0xfc0003ff, 0x2000039d, 0 , 0, | |
17285 | 0x0 }, /* _POOL32A5~*(115) */ | |
17286 | { reserved_block , 0 , 0 , 32, | |
17287 | 0xfc0003ff, 0x200003a5, 0 , 0, | |
17288 | 0x0 }, /* _POOL32A5~*(116) */ | |
17289 | { reserved_block , 0 , 0 , 32, | |
17290 | 0xfc0003ff, 0x200003ad, 0 , 0, | |
17291 | 0x0 }, /* _POOL32A5~*(117) */ | |
17292 | { pool , SHLL__S__PH , 4 , 32, | |
17293 | 0xfc0003ff, 0x200003b5, 0 , 0, | |
17294 | 0x0 }, /* SHLL[_S].PH */ | |
17295 | { reserved_block , 0 , 0 , 32, | |
17296 | 0xfc0003ff, 0x200003bd, 0 , 0, | |
17297 | 0x0 }, /* _POOL32A5~*(119) */ | |
17298 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17299 | 0xfc0003ff, 0x200003c5, &ADDWC , 0, |
89a955e8 AM |
17300 | DSP_ }, /* ADDWC */ |
17301 | { pool , PRECR_SRA__R__PH_W , 2 , 32, | |
17302 | 0xfc0003ff, 0x200003cd, 0 , 0, | |
17303 | 0x0 }, /* PRECR_SRA[_R].PH.W */ | |
17304 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17305 | 0xfc0003ff, 0x200003d5, &SHLLV_S_W , 0, |
89a955e8 AM |
17306 | DSP_ }, /* SHLLV_S.W */ |
17307 | { reserved_block , 0 , 0 , 32, | |
17308 | 0xfc0003ff, 0x200003dd, 0 , 0, | |
17309 | 0x0 }, /* _POOL32A5~*(123) */ | |
17310 | { reserved_block , 0 , 0 , 32, | |
17311 | 0xfc0003ff, 0x200003e5, 0 , 0, | |
17312 | 0x0 }, /* _POOL32A5~*(124) */ | |
17313 | { reserved_block , 0 , 0 , 32, | |
17314 | 0xfc0003ff, 0x200003ed, 0 , 0, | |
17315 | 0x0 }, /* _POOL32A5~*(125) */ | |
17316 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17317 | 0xfc0003ff, 0x200003f5, &SHLL_S_W , 0, |
89a955e8 AM |
17318 | DSP_ }, /* SHLL_S.W */ |
17319 | { reserved_block , 0 , 0 , 32, | |
17320 | 0xfc0003ff, 0x200003fd, 0 , 0, | |
17321 | 0x0 }, /* _POOL32A5~*(127) */ | |
17322 | }; | |
17323 | ||
17324 | ||
a1465490 | 17325 | static const Pool PP_LSX[16] = { |
89a955e8 | 17326 | { instruction , 0 , 0 , 32, |
8d416f6b | 17327 | 0xfc0007ff, 0x20000007, &LBX , 0, |
89a955e8 AM |
17328 | 0x0 }, /* LBX */ |
17329 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17330 | 0xfc0007ff, 0x20000087, &SBX , 0, |
89a955e8 AM |
17331 | XMMS_ }, /* SBX */ |
17332 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17333 | 0xfc0007ff, 0x20000107, &LBUX , 0, |
89a955e8 AM |
17334 | 0x0 }, /* LBUX */ |
17335 | { reserved_block , 0 , 0 , 32, | |
17336 | 0xfc0007ff, 0x20000187, 0 , 0, | |
17337 | 0x0 }, /* PP.LSX~*(3) */ | |
17338 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17339 | 0xfc0007ff, 0x20000207, &LHX , 0, |
89a955e8 AM |
17340 | 0x0 }, /* LHX */ |
17341 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17342 | 0xfc0007ff, 0x20000287, &SHX , 0, |
89a955e8 AM |
17343 | XMMS_ }, /* SHX */ |
17344 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17345 | 0xfc0007ff, 0x20000307, &LHUX , 0, |
89a955e8 AM |
17346 | 0x0 }, /* LHUX */ |
17347 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17348 | 0xfc0007ff, 0x20000387, &LWUX , 0, |
89a955e8 AM |
17349 | MIPS64_ }, /* LWUX */ |
17350 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17351 | 0xfc0007ff, 0x20000407, &LWX , 0, |
89a955e8 AM |
17352 | 0x0 }, /* LWX */ |
17353 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17354 | 0xfc0007ff, 0x20000487, &SWX , 0, |
89a955e8 AM |
17355 | XMMS_ }, /* SWX */ |
17356 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17357 | 0xfc0007ff, 0x20000507, &LWC1X , 0, |
89a955e8 AM |
17358 | CP1_ }, /* LWC1X */ |
17359 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17360 | 0xfc0007ff, 0x20000587, &SWC1X , 0, |
89a955e8 AM |
17361 | CP1_ }, /* SWC1X */ |
17362 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17363 | 0xfc0007ff, 0x20000607, &LDX , 0, |
89a955e8 AM |
17364 | MIPS64_ }, /* LDX */ |
17365 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17366 | 0xfc0007ff, 0x20000687, &SDX , 0, |
89a955e8 AM |
17367 | MIPS64_ }, /* SDX */ |
17368 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17369 | 0xfc0007ff, 0x20000707, &LDC1X , 0, |
89a955e8 AM |
17370 | CP1_ }, /* LDC1X */ |
17371 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17372 | 0xfc0007ff, 0x20000787, &SDC1X , 0, |
89a955e8 AM |
17373 | CP1_ }, /* SDC1X */ |
17374 | }; | |
17375 | ||
17376 | ||
a1465490 | 17377 | static const Pool PP_LSXS[16] = { |
89a955e8 AM |
17378 | { reserved_block , 0 , 0 , 32, |
17379 | 0xfc0007ff, 0x20000047, 0 , 0, | |
17380 | 0x0 }, /* PP.LSXS~*(0) */ | |
17381 | { reserved_block , 0 , 0 , 32, | |
17382 | 0xfc0007ff, 0x200000c7, 0 , 0, | |
17383 | 0x0 }, /* PP.LSXS~*(1) */ | |
17384 | { reserved_block , 0 , 0 , 32, | |
17385 | 0xfc0007ff, 0x20000147, 0 , 0, | |
17386 | 0x0 }, /* PP.LSXS~*(2) */ | |
17387 | { reserved_block , 0 , 0 , 32, | |
17388 | 0xfc0007ff, 0x200001c7, 0 , 0, | |
17389 | 0x0 }, /* PP.LSXS~*(3) */ | |
17390 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17391 | 0xfc0007ff, 0x20000247, &LHXS , 0, |
89a955e8 AM |
17392 | 0x0 }, /* LHXS */ |
17393 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17394 | 0xfc0007ff, 0x200002c7, &SHXS , 0, |
89a955e8 AM |
17395 | XMMS_ }, /* SHXS */ |
17396 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17397 | 0xfc0007ff, 0x20000347, &LHUXS , 0, |
89a955e8 AM |
17398 | 0x0 }, /* LHUXS */ |
17399 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17400 | 0xfc0007ff, 0x200003c7, &LWUXS , 0, |
89a955e8 AM |
17401 | MIPS64_ }, /* LWUXS */ |
17402 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17403 | 0xfc0007ff, 0x20000447, &LWXS_32_ , 0, |
89a955e8 AM |
17404 | 0x0 }, /* LWXS[32] */ |
17405 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17406 | 0xfc0007ff, 0x200004c7, &SWXS , 0, |
89a955e8 AM |
17407 | XMMS_ }, /* SWXS */ |
17408 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17409 | 0xfc0007ff, 0x20000547, &LWC1XS , 0, |
89a955e8 AM |
17410 | CP1_ }, /* LWC1XS */ |
17411 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17412 | 0xfc0007ff, 0x200005c7, &SWC1XS , 0, |
89a955e8 AM |
17413 | CP1_ }, /* SWC1XS */ |
17414 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17415 | 0xfc0007ff, 0x20000647, &LDXS , 0, |
89a955e8 AM |
17416 | MIPS64_ }, /* LDXS */ |
17417 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17418 | 0xfc0007ff, 0x200006c7, &SDXS , 0, |
89a955e8 AM |
17419 | MIPS64_ }, /* SDXS */ |
17420 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17421 | 0xfc0007ff, 0x20000747, &LDC1XS , 0, |
89a955e8 AM |
17422 | CP1_ }, /* LDC1XS */ |
17423 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17424 | 0xfc0007ff, 0x200007c7, &SDC1XS , 0, |
89a955e8 AM |
17425 | CP1_ }, /* SDC1XS */ |
17426 | }; | |
17427 | ||
17428 | ||
a1465490 | 17429 | static const Pool P_LSX[2] = { |
89a955e8 AM |
17430 | { pool , PP_LSX , 16 , 32, |
17431 | 0xfc00007f, 0x20000007, 0 , 0, | |
17432 | 0x0 }, /* PP.LSX */ | |
17433 | { pool , PP_LSXS , 16 , 32, | |
17434 | 0xfc00007f, 0x20000047, 0 , 0, | |
17435 | 0x0 }, /* PP.LSXS */ | |
17436 | }; | |
17437 | ||
17438 | ||
a1465490 | 17439 | static const Pool POOL32Axf_1_0[4] = { |
89a955e8 | 17440 | { instruction , 0 , 0 , 32, |
8d416f6b | 17441 | 0xfc003fff, 0x2000007f, &MFHI_DSP_ , 0, |
89a955e8 AM |
17442 | DSP_ }, /* MFHI[DSP] */ |
17443 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17444 | 0xfc003fff, 0x2000107f, &MFLO_DSP_ , 0, |
89a955e8 AM |
17445 | DSP_ }, /* MFLO[DSP] */ |
17446 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17447 | 0xfc003fff, 0x2000207f, &MTHI_DSP_ , 0, |
89a955e8 AM |
17448 | DSP_ }, /* MTHI[DSP] */ |
17449 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17450 | 0xfc003fff, 0x2000307f, &MTLO_DSP_ , 0, |
89a955e8 AM |
17451 | DSP_ }, /* MTLO[DSP] */ |
17452 | }; | |
17453 | ||
17454 | ||
a1465490 | 17455 | static const Pool POOL32Axf_1_1[4] = { |
89a955e8 | 17456 | { instruction , 0 , 0 , 32, |
8d416f6b | 17457 | 0xfc003fff, 0x2000027f, &MTHLIP , 0, |
89a955e8 AM |
17458 | DSP_ }, /* MTHLIP */ |
17459 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17460 | 0xfc003fff, 0x2000127f, &SHILOV , 0, |
89a955e8 AM |
17461 | DSP_ }, /* SHILOV */ |
17462 | { reserved_block , 0 , 0 , 32, | |
17463 | 0xfc003fff, 0x2000227f, 0 , 0, | |
17464 | 0x0 }, /* POOL32Axf_1_1~*(2) */ | |
17465 | { reserved_block , 0 , 0 , 32, | |
17466 | 0xfc003fff, 0x2000327f, 0 , 0, | |
17467 | 0x0 }, /* POOL32Axf_1_1~*(3) */ | |
17468 | }; | |
17469 | ||
17470 | ||
a1465490 | 17471 | static const Pool POOL32Axf_1_3[4] = { |
89a955e8 | 17472 | { instruction , 0 , 0 , 32, |
8d416f6b | 17473 | 0xfc003fff, 0x2000067f, &RDDSP , 0, |
89a955e8 AM |
17474 | DSP_ }, /* RDDSP */ |
17475 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17476 | 0xfc003fff, 0x2000167f, &WRDSP , 0, |
89a955e8 AM |
17477 | DSP_ }, /* WRDSP */ |
17478 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17479 | 0xfc003fff, 0x2000267f, &EXTP , 0, |
89a955e8 AM |
17480 | DSP_ }, /* EXTP */ |
17481 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17482 | 0xfc003fff, 0x2000367f, &EXTPDP , 0, |
89a955e8 AM |
17483 | DSP_ }, /* EXTPDP */ |
17484 | }; | |
17485 | ||
17486 | ||
a1465490 | 17487 | static const Pool POOL32Axf_1_4[2] = { |
89a955e8 | 17488 | { instruction , 0 , 0 , 32, |
8d416f6b | 17489 | 0xfc001fff, 0x2000087f, &SHLL_QB , 0, |
89a955e8 AM |
17490 | DSP_ }, /* SHLL.QB */ |
17491 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17492 | 0xfc001fff, 0x2000187f, &SHRL_QB , 0, |
89a955e8 AM |
17493 | DSP_ }, /* SHRL.QB */ |
17494 | }; | |
17495 | ||
17496 | ||
a1465490 | 17497 | static const Pool MAQ_S_A__W_PHR[2] = { |
89a955e8 | 17498 | { instruction , 0 , 0 , 32, |
8d416f6b | 17499 | 0xfc003fff, 0x20000a7f, &MAQ_S_W_PHR , 0, |
89a955e8 AM |
17500 | DSP_ }, /* MAQ_S.W.PHR */ |
17501 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17502 | 0xfc003fff, 0x20002a7f, &MAQ_SA_W_PHR , 0, |
89a955e8 AM |
17503 | DSP_ }, /* MAQ_SA.W.PHR */ |
17504 | }; | |
17505 | ||
17506 | ||
a1465490 | 17507 | static const Pool MAQ_S_A__W_PHL[2] = { |
89a955e8 | 17508 | { instruction , 0 , 0 , 32, |
8d416f6b | 17509 | 0xfc003fff, 0x20001a7f, &MAQ_S_W_PHL , 0, |
89a955e8 AM |
17510 | DSP_ }, /* MAQ_S.W.PHL */ |
17511 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17512 | 0xfc003fff, 0x20003a7f, &MAQ_SA_W_PHL , 0, |
89a955e8 AM |
17513 | DSP_ }, /* MAQ_SA.W.PHL */ |
17514 | }; | |
17515 | ||
17516 | ||
a1465490 | 17517 | static const Pool POOL32Axf_1_5[2] = { |
89a955e8 AM |
17518 | { pool , MAQ_S_A__W_PHR , 2 , 32, |
17519 | 0xfc001fff, 0x20000a7f, 0 , 0, | |
17520 | 0x0 }, /* MAQ_S[A].W.PHR */ | |
17521 | { pool , MAQ_S_A__W_PHL , 2 , 32, | |
17522 | 0xfc001fff, 0x20001a7f, 0 , 0, | |
17523 | 0x0 }, /* MAQ_S[A].W.PHL */ | |
17524 | }; | |
17525 | ||
17526 | ||
a1465490 | 17527 | static const Pool POOL32Axf_1_7[4] = { |
89a955e8 | 17528 | { instruction , 0 , 0 , 32, |
8d416f6b | 17529 | 0xfc003fff, 0x20000e7f, &EXTR_W , 0, |
89a955e8 AM |
17530 | DSP_ }, /* EXTR.W */ |
17531 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17532 | 0xfc003fff, 0x20001e7f, &EXTR_R_W , 0, |
89a955e8 AM |
17533 | DSP_ }, /* EXTR_R.W */ |
17534 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17535 | 0xfc003fff, 0x20002e7f, &EXTR_RS_W , 0, |
89a955e8 AM |
17536 | DSP_ }, /* EXTR_RS.W */ |
17537 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17538 | 0xfc003fff, 0x20003e7f, &EXTR_S_H , 0, |
89a955e8 AM |
17539 | DSP_ }, /* EXTR_S.H */ |
17540 | }; | |
17541 | ||
17542 | ||
a1465490 | 17543 | static const Pool POOL32Axf_1[8] = { |
89a955e8 AM |
17544 | { pool , POOL32Axf_1_0 , 4 , 32, |
17545 | 0xfc000fff, 0x2000007f, 0 , 0, | |
17546 | 0x0 }, /* POOL32Axf_1_0 */ | |
17547 | { pool , POOL32Axf_1_1 , 4 , 32, | |
17548 | 0xfc000fff, 0x2000027f, 0 , 0, | |
17549 | 0x0 }, /* POOL32Axf_1_1 */ | |
17550 | { reserved_block , 0 , 0 , 32, | |
17551 | 0xfc000fff, 0x2000047f, 0 , 0, | |
17552 | 0x0 }, /* POOL32Axf_1~*(2) */ | |
17553 | { pool , POOL32Axf_1_3 , 4 , 32, | |
17554 | 0xfc000fff, 0x2000067f, 0 , 0, | |
17555 | 0x0 }, /* POOL32Axf_1_3 */ | |
17556 | { pool , POOL32Axf_1_4 , 2 , 32, | |
17557 | 0xfc000fff, 0x2000087f, 0 , 0, | |
17558 | 0x0 }, /* POOL32Axf_1_4 */ | |
17559 | { pool , POOL32Axf_1_5 , 2 , 32, | |
17560 | 0xfc000fff, 0x20000a7f, 0 , 0, | |
17561 | 0x0 }, /* POOL32Axf_1_5 */ | |
17562 | { reserved_block , 0 , 0 , 32, | |
17563 | 0xfc000fff, 0x20000c7f, 0 , 0, | |
17564 | 0x0 }, /* POOL32Axf_1~*(6) */ | |
17565 | { pool , POOL32Axf_1_7 , 4 , 32, | |
17566 | 0xfc000fff, 0x20000e7f, 0 , 0, | |
17567 | 0x0 }, /* POOL32Axf_1_7 */ | |
17568 | }; | |
17569 | ||
17570 | ||
a1465490 | 17571 | static const Pool POOL32Axf_2_DSP__0_7[8] = { |
89a955e8 | 17572 | { instruction , 0 , 0 , 32, |
8d416f6b | 17573 | 0xfc003fff, 0x200000bf, &DPA_W_PH , 0, |
89a955e8 AM |
17574 | DSP_ }, /* DPA.W.PH */ |
17575 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17576 | 0xfc003fff, 0x200002bf, &DPAQ_S_W_PH , 0, |
89a955e8 AM |
17577 | DSP_ }, /* DPAQ_S.W.PH */ |
17578 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17579 | 0xfc003fff, 0x200004bf, &DPS_W_PH , 0, |
89a955e8 AM |
17580 | DSP_ }, /* DPS.W.PH */ |
17581 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17582 | 0xfc003fff, 0x200006bf, &DPSQ_S_W_PH , 0, |
89a955e8 AM |
17583 | DSP_ }, /* DPSQ_S.W.PH */ |
17584 | { reserved_block , 0 , 0 , 32, | |
17585 | 0xfc003fff, 0x200008bf, 0 , 0, | |
17586 | 0x0 }, /* POOL32Axf_2(DSP)_0_7~*(4) */ | |
17587 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17588 | 0xfc003fff, 0x20000abf, &MADD_DSP_ , 0, |
89a955e8 AM |
17589 | DSP_ }, /* MADD[DSP] */ |
17590 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17591 | 0xfc003fff, 0x20000cbf, &MULT_DSP_ , 0, |
89a955e8 AM |
17592 | DSP_ }, /* MULT[DSP] */ |
17593 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17594 | 0xfc003fff, 0x20000ebf, &EXTRV_W , 0, |
89a955e8 AM |
17595 | DSP_ }, /* EXTRV.W */ |
17596 | }; | |
17597 | ||
17598 | ||
a1465490 | 17599 | static const Pool POOL32Axf_2_DSP__8_15[8] = { |
89a955e8 | 17600 | { instruction , 0 , 0 , 32, |
8d416f6b | 17601 | 0xfc003fff, 0x200010bf, &DPAX_W_PH , 0, |
89a955e8 AM |
17602 | DSP_ }, /* DPAX.W.PH */ |
17603 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17604 | 0xfc003fff, 0x200012bf, &DPAQ_SA_L_W , 0, |
89a955e8 AM |
17605 | DSP_ }, /* DPAQ_SA.L.W */ |
17606 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17607 | 0xfc003fff, 0x200014bf, &DPSX_W_PH , 0, |
89a955e8 AM |
17608 | DSP_ }, /* DPSX.W.PH */ |
17609 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17610 | 0xfc003fff, 0x200016bf, &DPSQ_SA_L_W , 0, |
89a955e8 AM |
17611 | DSP_ }, /* DPSQ_SA.L.W */ |
17612 | { reserved_block , 0 , 0 , 32, | |
17613 | 0xfc003fff, 0x200018bf, 0 , 0, | |
17614 | 0x0 }, /* POOL32Axf_2(DSP)_8_15~*(4) */ | |
17615 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17616 | 0xfc003fff, 0x20001abf, &MADDU_DSP_ , 0, |
89a955e8 AM |
17617 | DSP_ }, /* MADDU[DSP] */ |
17618 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17619 | 0xfc003fff, 0x20001cbf, &MULTU_DSP_ , 0, |
89a955e8 AM |
17620 | DSP_ }, /* MULTU[DSP] */ |
17621 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17622 | 0xfc003fff, 0x20001ebf, &EXTRV_R_W , 0, |
89a955e8 AM |
17623 | DSP_ }, /* EXTRV_R.W */ |
17624 | }; | |
17625 | ||
17626 | ||
a1465490 | 17627 | static const Pool POOL32Axf_2_DSP__16_23[8] = { |
89a955e8 | 17628 | { instruction , 0 , 0 , 32, |
8d416f6b | 17629 | 0xfc003fff, 0x200020bf, &DPAU_H_QBL , 0, |
89a955e8 AM |
17630 | DSP_ }, /* DPAU.H.QBL */ |
17631 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17632 | 0xfc003fff, 0x200022bf, &DPAQX_S_W_PH , 0, |
89a955e8 AM |
17633 | DSP_ }, /* DPAQX_S.W.PH */ |
17634 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17635 | 0xfc003fff, 0x200024bf, &DPSU_H_QBL , 0, |
89a955e8 AM |
17636 | DSP_ }, /* DPSU.H.QBL */ |
17637 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17638 | 0xfc003fff, 0x200026bf, &DPSQX_S_W_PH , 0, |
89a955e8 AM |
17639 | DSP_ }, /* DPSQX_S.W.PH */ |
17640 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17641 | 0xfc003fff, 0x200028bf, &EXTPV , 0, |
89a955e8 AM |
17642 | DSP_ }, /* EXTPV */ |
17643 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17644 | 0xfc003fff, 0x20002abf, &MSUB_DSP_ , 0, |
89a955e8 AM |
17645 | DSP_ }, /* MSUB[DSP] */ |
17646 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17647 | 0xfc003fff, 0x20002cbf, &MULSA_W_PH , 0, |
89a955e8 AM |
17648 | DSP_ }, /* MULSA.W.PH */ |
17649 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17650 | 0xfc003fff, 0x20002ebf, &EXTRV_RS_W , 0, |
89a955e8 AM |
17651 | DSP_ }, /* EXTRV_RS.W */ |
17652 | }; | |
17653 | ||
17654 | ||
a1465490 | 17655 | static const Pool POOL32Axf_2_DSP__24_31[8] = { |
89a955e8 | 17656 | { instruction , 0 , 0 , 32, |
8d416f6b | 17657 | 0xfc003fff, 0x200030bf, &DPAU_H_QBR , 0, |
89a955e8 AM |
17658 | DSP_ }, /* DPAU.H.QBR */ |
17659 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17660 | 0xfc003fff, 0x200032bf, &DPAQX_SA_W_PH , 0, |
89a955e8 AM |
17661 | DSP_ }, /* DPAQX_SA.W.PH */ |
17662 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17663 | 0xfc003fff, 0x200034bf, &DPSU_H_QBR , 0, |
89a955e8 AM |
17664 | DSP_ }, /* DPSU.H.QBR */ |
17665 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17666 | 0xfc003fff, 0x200036bf, &DPSQX_SA_W_PH , 0, |
89a955e8 AM |
17667 | DSP_ }, /* DPSQX_SA.W.PH */ |
17668 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17669 | 0xfc003fff, 0x200038bf, &EXTPDPV , 0, |
89a955e8 AM |
17670 | DSP_ }, /* EXTPDPV */ |
17671 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17672 | 0xfc003fff, 0x20003abf, &MSUBU_DSP_ , 0, |
89a955e8 AM |
17673 | DSP_ }, /* MSUBU[DSP] */ |
17674 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17675 | 0xfc003fff, 0x20003cbf, &MULSAQ_S_W_PH , 0, |
89a955e8 AM |
17676 | DSP_ }, /* MULSAQ_S.W.PH */ |
17677 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17678 | 0xfc003fff, 0x20003ebf, &EXTRV_S_H , 0, |
89a955e8 AM |
17679 | DSP_ }, /* EXTRV_S.H */ |
17680 | }; | |
17681 | ||
17682 | ||
a1465490 | 17683 | static const Pool POOL32Axf_2[4] = { |
89a955e8 AM |
17684 | { pool , POOL32Axf_2_DSP__0_7, 8 , 32, |
17685 | 0xfc0031ff, 0x200000bf, 0 , 0, | |
17686 | 0x0 }, /* POOL32Axf_2(DSP)_0_7 */ | |
17687 | { pool , POOL32Axf_2_DSP__8_15, 8 , 32, | |
17688 | 0xfc0031ff, 0x200010bf, 0 , 0, | |
17689 | 0x0 }, /* POOL32Axf_2(DSP)_8_15 */ | |
17690 | { pool , POOL32Axf_2_DSP__16_23, 8 , 32, | |
17691 | 0xfc0031ff, 0x200020bf, 0 , 0, | |
17692 | 0x0 }, /* POOL32Axf_2(DSP)_16_23 */ | |
17693 | { pool , POOL32Axf_2_DSP__24_31, 8 , 32, | |
17694 | 0xfc0031ff, 0x200030bf, 0 , 0, | |
17695 | 0x0 }, /* POOL32Axf_2(DSP)_24_31 */ | |
17696 | }; | |
17697 | ||
17698 | ||
a1465490 | 17699 | static const Pool POOL32Axf_4[128] = { |
89a955e8 | 17700 | { instruction , 0 , 0 , 32, |
8d416f6b | 17701 | 0xfc00ffff, 0x2000013f, &ABSQ_S_QB , 0, |
89a955e8 AM |
17702 | DSP_ }, /* ABSQ_S.QB */ |
17703 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17704 | 0xfc00ffff, 0x2000033f, &REPLV_PH , 0, |
89a955e8 AM |
17705 | DSP_ }, /* REPLV.PH */ |
17706 | { reserved_block , 0 , 0 , 32, | |
17707 | 0xfc00ffff, 0x2000053f, 0 , 0, | |
17708 | 0x0 }, /* POOL32Axf_4~*(2) */ | |
17709 | { reserved_block , 0 , 0 , 32, | |
17710 | 0xfc00ffff, 0x2000073f, 0 , 0, | |
17711 | 0x0 }, /* POOL32Axf_4~*(3) */ | |
17712 | { reserved_block , 0 , 0 , 32, | |
17713 | 0xfc00ffff, 0x2000093f, 0 , 0, | |
17714 | 0x0 }, /* POOL32Axf_4~*(4) */ | |
17715 | { reserved_block , 0 , 0 , 32, | |
17716 | 0xfc00ffff, 0x20000b3f, 0 , 0, | |
17717 | 0x0 }, /* POOL32Axf_4~*(5) */ | |
17718 | { reserved_block , 0 , 0 , 32, | |
17719 | 0xfc00ffff, 0x20000d3f, 0 , 0, | |
17720 | 0x0 }, /* POOL32Axf_4~*(6) */ | |
17721 | { reserved_block , 0 , 0 , 32, | |
17722 | 0xfc00ffff, 0x20000f3f, 0 , 0, | |
17723 | 0x0 }, /* POOL32Axf_4~*(7) */ | |
17724 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17725 | 0xfc00ffff, 0x2000113f, &ABSQ_S_PH , 0, |
89a955e8 AM |
17726 | DSP_ }, /* ABSQ_S.PH */ |
17727 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17728 | 0xfc00ffff, 0x2000133f, &REPLV_QB , 0, |
89a955e8 AM |
17729 | DSP_ }, /* REPLV.QB */ |
17730 | { reserved_block , 0 , 0 , 32, | |
17731 | 0xfc00ffff, 0x2000153f, 0 , 0, | |
17732 | 0x0 }, /* POOL32Axf_4~*(10) */ | |
17733 | { reserved_block , 0 , 0 , 32, | |
17734 | 0xfc00ffff, 0x2000173f, 0 , 0, | |
17735 | 0x0 }, /* POOL32Axf_4~*(11) */ | |
17736 | { reserved_block , 0 , 0 , 32, | |
17737 | 0xfc00ffff, 0x2000193f, 0 , 0, | |
17738 | 0x0 }, /* POOL32Axf_4~*(12) */ | |
17739 | { reserved_block , 0 , 0 , 32, | |
17740 | 0xfc00ffff, 0x20001b3f, 0 , 0, | |
17741 | 0x0 }, /* POOL32Axf_4~*(13) */ | |
17742 | { reserved_block , 0 , 0 , 32, | |
17743 | 0xfc00ffff, 0x20001d3f, 0 , 0, | |
17744 | 0x0 }, /* POOL32Axf_4~*(14) */ | |
17745 | { reserved_block , 0 , 0 , 32, | |
17746 | 0xfc00ffff, 0x20001f3f, 0 , 0, | |
17747 | 0x0 }, /* POOL32Axf_4~*(15) */ | |
17748 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17749 | 0xfc00ffff, 0x2000213f, &ABSQ_S_W , 0, |
89a955e8 AM |
17750 | DSP_ }, /* ABSQ_S.W */ |
17751 | { reserved_block , 0 , 0 , 32, | |
17752 | 0xfc00ffff, 0x2000233f, 0 , 0, | |
17753 | 0x0 }, /* POOL32Axf_4~*(17) */ | |
17754 | { reserved_block , 0 , 0 , 32, | |
17755 | 0xfc00ffff, 0x2000253f, 0 , 0, | |
17756 | 0x0 }, /* POOL32Axf_4~*(18) */ | |
17757 | { reserved_block , 0 , 0 , 32, | |
17758 | 0xfc00ffff, 0x2000273f, 0 , 0, | |
17759 | 0x0 }, /* POOL32Axf_4~*(19) */ | |
17760 | { reserved_block , 0 , 0 , 32, | |
17761 | 0xfc00ffff, 0x2000293f, 0 , 0, | |
17762 | 0x0 }, /* POOL32Axf_4~*(20) */ | |
17763 | { reserved_block , 0 , 0 , 32, | |
17764 | 0xfc00ffff, 0x20002b3f, 0 , 0, | |
17765 | 0x0 }, /* POOL32Axf_4~*(21) */ | |
17766 | { reserved_block , 0 , 0 , 32, | |
17767 | 0xfc00ffff, 0x20002d3f, 0 , 0, | |
17768 | 0x0 }, /* POOL32Axf_4~*(22) */ | |
17769 | { reserved_block , 0 , 0 , 32, | |
17770 | 0xfc00ffff, 0x20002f3f, 0 , 0, | |
17771 | 0x0 }, /* POOL32Axf_4~*(23) */ | |
17772 | { reserved_block , 0 , 0 , 32, | |
17773 | 0xfc00ffff, 0x2000313f, 0 , 0, | |
17774 | 0x0 }, /* POOL32Axf_4~*(24) */ | |
17775 | { reserved_block , 0 , 0 , 32, | |
17776 | 0xfc00ffff, 0x2000333f, 0 , 0, | |
17777 | 0x0 }, /* POOL32Axf_4~*(25) */ | |
17778 | { reserved_block , 0 , 0 , 32, | |
17779 | 0xfc00ffff, 0x2000353f, 0 , 0, | |
17780 | 0x0 }, /* POOL32Axf_4~*(26) */ | |
17781 | { reserved_block , 0 , 0 , 32, | |
17782 | 0xfc00ffff, 0x2000373f, 0 , 0, | |
17783 | 0x0 }, /* POOL32Axf_4~*(27) */ | |
17784 | { reserved_block , 0 , 0 , 32, | |
17785 | 0xfc00ffff, 0x2000393f, 0 , 0, | |
17786 | 0x0 }, /* POOL32Axf_4~*(28) */ | |
17787 | { reserved_block , 0 , 0 , 32, | |
17788 | 0xfc00ffff, 0x20003b3f, 0 , 0, | |
17789 | 0x0 }, /* POOL32Axf_4~*(29) */ | |
17790 | { reserved_block , 0 , 0 , 32, | |
17791 | 0xfc00ffff, 0x20003d3f, 0 , 0, | |
17792 | 0x0 }, /* POOL32Axf_4~*(30) */ | |
17793 | { reserved_block , 0 , 0 , 32, | |
17794 | 0xfc00ffff, 0x20003f3f, 0 , 0, | |
17795 | 0x0 }, /* POOL32Axf_4~*(31) */ | |
17796 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17797 | 0xfc00ffff, 0x2000413f, &INSV , 0, |
89a955e8 AM |
17798 | DSP_ }, /* INSV */ |
17799 | { reserved_block , 0 , 0 , 32, | |
17800 | 0xfc00ffff, 0x2000433f, 0 , 0, | |
17801 | 0x0 }, /* POOL32Axf_4~*(33) */ | |
17802 | { reserved_block , 0 , 0 , 32, | |
17803 | 0xfc00ffff, 0x2000453f, 0 , 0, | |
17804 | 0x0 }, /* POOL32Axf_4~*(34) */ | |
17805 | { reserved_block , 0 , 0 , 32, | |
17806 | 0xfc00ffff, 0x2000473f, 0 , 0, | |
17807 | 0x0 }, /* POOL32Axf_4~*(35) */ | |
17808 | { reserved_block , 0 , 0 , 32, | |
17809 | 0xfc00ffff, 0x2000493f, 0 , 0, | |
17810 | 0x0 }, /* POOL32Axf_4~*(36) */ | |
17811 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17812 | 0xfc00ffff, 0x20004b3f, &CLO , 0, |
89a955e8 AM |
17813 | XMMS_ }, /* CLO */ |
17814 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17815 | 0xfc00ffff, 0x20004d3f, &MFC2 , 0, |
89a955e8 AM |
17816 | CP2_ }, /* MFC2 */ |
17817 | { reserved_block , 0 , 0 , 32, | |
17818 | 0xfc00ffff, 0x20004f3f, 0 , 0, | |
17819 | 0x0 }, /* POOL32Axf_4~*(39) */ | |
17820 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17821 | 0xfc00ffff, 0x2000513f, &PRECEQ_W_PHL , 0, |
89a955e8 AM |
17822 | DSP_ }, /* PRECEQ.W.PHL */ |
17823 | { reserved_block , 0 , 0 , 32, | |
17824 | 0xfc00ffff, 0x2000533f, 0 , 0, | |
17825 | 0x0 }, /* POOL32Axf_4~*(41) */ | |
17826 | { reserved_block , 0 , 0 , 32, | |
17827 | 0xfc00ffff, 0x2000553f, 0 , 0, | |
17828 | 0x0 }, /* POOL32Axf_4~*(42) */ | |
17829 | { reserved_block , 0 , 0 , 32, | |
17830 | 0xfc00ffff, 0x2000573f, 0 , 0, | |
17831 | 0x0 }, /* POOL32Axf_4~*(43) */ | |
17832 | { reserved_block , 0 , 0 , 32, | |
17833 | 0xfc00ffff, 0x2000593f, 0 , 0, | |
17834 | 0x0 }, /* POOL32Axf_4~*(44) */ | |
17835 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17836 | 0xfc00ffff, 0x20005b3f, &CLZ , 0, |
89a955e8 AM |
17837 | XMMS_ }, /* CLZ */ |
17838 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17839 | 0xfc00ffff, 0x20005d3f, &MTC2 , 0, |
89a955e8 AM |
17840 | CP2_ }, /* MTC2 */ |
17841 | { reserved_block , 0 , 0 , 32, | |
17842 | 0xfc00ffff, 0x20005f3f, 0 , 0, | |
17843 | 0x0 }, /* POOL32Axf_4~*(47) */ | |
17844 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17845 | 0xfc00ffff, 0x2000613f, &PRECEQ_W_PHR , 0, |
89a955e8 AM |
17846 | DSP_ }, /* PRECEQ.W.PHR */ |
17847 | { reserved_block , 0 , 0 , 32, | |
17848 | 0xfc00ffff, 0x2000633f, 0 , 0, | |
17849 | 0x0 }, /* POOL32Axf_4~*(49) */ | |
17850 | { reserved_block , 0 , 0 , 32, | |
17851 | 0xfc00ffff, 0x2000653f, 0 , 0, | |
17852 | 0x0 }, /* POOL32Axf_4~*(50) */ | |
17853 | { reserved_block , 0 , 0 , 32, | |
17854 | 0xfc00ffff, 0x2000673f, 0 , 0, | |
17855 | 0x0 }, /* POOL32Axf_4~*(51) */ | |
17856 | { reserved_block , 0 , 0 , 32, | |
17857 | 0xfc00ffff, 0x2000693f, 0 , 0, | |
17858 | 0x0 }, /* POOL32Axf_4~*(52) */ | |
17859 | { reserved_block , 0 , 0 , 32, | |
17860 | 0xfc00ffff, 0x20006b3f, 0 , 0, | |
17861 | 0x0 }, /* POOL32Axf_4~*(53) */ | |
17862 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17863 | 0xfc00ffff, 0x20006d3f, &DMFC2 , 0, |
89a955e8 AM |
17864 | CP2_ }, /* DMFC2 */ |
17865 | { reserved_block , 0 , 0 , 32, | |
17866 | 0xfc00ffff, 0x20006f3f, 0 , 0, | |
17867 | 0x0 }, /* POOL32Axf_4~*(55) */ | |
17868 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17869 | 0xfc00ffff, 0x2000713f, &PRECEQU_PH_QBL , 0, |
89a955e8 AM |
17870 | DSP_ }, /* PRECEQU.PH.QBL */ |
17871 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17872 | 0xfc00ffff, 0x2000733f, &PRECEQU_PH_QBLA , 0, |
89a955e8 AM |
17873 | DSP_ }, /* PRECEQU.PH.QBLA */ |
17874 | { reserved_block , 0 , 0 , 32, | |
17875 | 0xfc00ffff, 0x2000753f, 0 , 0, | |
17876 | 0x0 }, /* POOL32Axf_4~*(58) */ | |
17877 | { reserved_block , 0 , 0 , 32, | |
17878 | 0xfc00ffff, 0x2000773f, 0 , 0, | |
17879 | 0x0 }, /* POOL32Axf_4~*(59) */ | |
17880 | { reserved_block , 0 , 0 , 32, | |
17881 | 0xfc00ffff, 0x2000793f, 0 , 0, | |
17882 | 0x0 }, /* POOL32Axf_4~*(60) */ | |
17883 | { reserved_block , 0 , 0 , 32, | |
17884 | 0xfc00ffff, 0x20007b3f, 0 , 0, | |
17885 | 0x0 }, /* POOL32Axf_4~*(61) */ | |
17886 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17887 | 0xfc00ffff, 0x20007d3f, &DMTC2 , 0, |
89a955e8 AM |
17888 | CP2_ }, /* DMTC2 */ |
17889 | { reserved_block , 0 , 0 , 32, | |
17890 | 0xfc00ffff, 0x20007f3f, 0 , 0, | |
17891 | 0x0 }, /* POOL32Axf_4~*(63) */ | |
17892 | { reserved_block , 0 , 0 , 32, | |
17893 | 0xfc00ffff, 0x2000813f, 0 , 0, | |
17894 | 0x0 }, /* POOL32Axf_4~*(64) */ | |
17895 | { reserved_block , 0 , 0 , 32, | |
17896 | 0xfc00ffff, 0x2000833f, 0 , 0, | |
17897 | 0x0 }, /* POOL32Axf_4~*(65) */ | |
17898 | { reserved_block , 0 , 0 , 32, | |
17899 | 0xfc00ffff, 0x2000853f, 0 , 0, | |
17900 | 0x0 }, /* POOL32Axf_4~*(66) */ | |
17901 | { reserved_block , 0 , 0 , 32, | |
17902 | 0xfc00ffff, 0x2000873f, 0 , 0, | |
17903 | 0x0 }, /* POOL32Axf_4~*(67) */ | |
17904 | { reserved_block , 0 , 0 , 32, | |
17905 | 0xfc00ffff, 0x2000893f, 0 , 0, | |
17906 | 0x0 }, /* POOL32Axf_4~*(68) */ | |
17907 | { reserved_block , 0 , 0 , 32, | |
17908 | 0xfc00ffff, 0x20008b3f, 0 , 0, | |
17909 | 0x0 }, /* POOL32Axf_4~*(69) */ | |
17910 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17911 | 0xfc00ffff, 0x20008d3f, &MFHC2 , 0, |
89a955e8 AM |
17912 | CP2_ }, /* MFHC2 */ |
17913 | { reserved_block , 0 , 0 , 32, | |
17914 | 0xfc00ffff, 0x20008f3f, 0 , 0, | |
17915 | 0x0 }, /* POOL32Axf_4~*(71) */ | |
17916 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17917 | 0xfc00ffff, 0x2000913f, &PRECEQU_PH_QBR , 0, |
89a955e8 AM |
17918 | DSP_ }, /* PRECEQU.PH.QBR */ |
17919 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17920 | 0xfc00ffff, 0x2000933f, &PRECEQU_PH_QBRA , 0, |
89a955e8 AM |
17921 | DSP_ }, /* PRECEQU.PH.QBRA */ |
17922 | { reserved_block , 0 , 0 , 32, | |
17923 | 0xfc00ffff, 0x2000953f, 0 , 0, | |
17924 | 0x0 }, /* POOL32Axf_4~*(74) */ | |
17925 | { reserved_block , 0 , 0 , 32, | |
17926 | 0xfc00ffff, 0x2000973f, 0 , 0, | |
17927 | 0x0 }, /* POOL32Axf_4~*(75) */ | |
17928 | { reserved_block , 0 , 0 , 32, | |
17929 | 0xfc00ffff, 0x2000993f, 0 , 0, | |
17930 | 0x0 }, /* POOL32Axf_4~*(76) */ | |
17931 | { reserved_block , 0 , 0 , 32, | |
17932 | 0xfc00ffff, 0x20009b3f, 0 , 0, | |
17933 | 0x0 }, /* POOL32Axf_4~*(77) */ | |
17934 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17935 | 0xfc00ffff, 0x20009d3f, &MTHC2 , 0, |
89a955e8 AM |
17936 | CP2_ }, /* MTHC2 */ |
17937 | { reserved_block , 0 , 0 , 32, | |
17938 | 0xfc00ffff, 0x20009f3f, 0 , 0, | |
17939 | 0x0 }, /* POOL32Axf_4~*(79) */ | |
17940 | { reserved_block , 0 , 0 , 32, | |
17941 | 0xfc00ffff, 0x2000a13f, 0 , 0, | |
17942 | 0x0 }, /* POOL32Axf_4~*(80) */ | |
17943 | { reserved_block , 0 , 0 , 32, | |
17944 | 0xfc00ffff, 0x2000a33f, 0 , 0, | |
17945 | 0x0 }, /* POOL32Axf_4~*(81) */ | |
17946 | { reserved_block , 0 , 0 , 32, | |
17947 | 0xfc00ffff, 0x2000a53f, 0 , 0, | |
17948 | 0x0 }, /* POOL32Axf_4~*(82) */ | |
17949 | { reserved_block , 0 , 0 , 32, | |
17950 | 0xfc00ffff, 0x2000a73f, 0 , 0, | |
17951 | 0x0 }, /* POOL32Axf_4~*(83) */ | |
17952 | { reserved_block , 0 , 0 , 32, | |
17953 | 0xfc00ffff, 0x2000a93f, 0 , 0, | |
17954 | 0x0 }, /* POOL32Axf_4~*(84) */ | |
17955 | { reserved_block , 0 , 0 , 32, | |
17956 | 0xfc00ffff, 0x2000ab3f, 0 , 0, | |
17957 | 0x0 }, /* POOL32Axf_4~*(85) */ | |
17958 | { reserved_block , 0 , 0 , 32, | |
17959 | 0xfc00ffff, 0x2000ad3f, 0 , 0, | |
17960 | 0x0 }, /* POOL32Axf_4~*(86) */ | |
17961 | { reserved_block , 0 , 0 , 32, | |
17962 | 0xfc00ffff, 0x2000af3f, 0 , 0, | |
17963 | 0x0 }, /* POOL32Axf_4~*(87) */ | |
17964 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17965 | 0xfc00ffff, 0x2000b13f, &PRECEU_PH_QBL , 0, |
89a955e8 AM |
17966 | DSP_ }, /* PRECEU.PH.QBL */ |
17967 | { instruction , 0 , 0 , 32, | |
8d416f6b | 17968 | 0xfc00ffff, 0x2000b33f, &PRECEU_PH_QBLA , 0, |
89a955e8 AM |
17969 | DSP_ }, /* PRECEU.PH.QBLA */ |
17970 | { reserved_block , 0 , 0 , 32, | |
17971 | 0xfc00ffff, 0x2000b53f, 0 , 0, | |
17972 | 0x0 }, /* POOL32Axf_4~*(90) */ | |
17973 | { reserved_block , 0 , 0 , 32, | |
17974 | 0xfc00ffff, 0x2000b73f, 0 , 0, | |
17975 | 0x0 }, /* POOL32Axf_4~*(91) */ | |
17976 | { reserved_block , 0 , 0 , 32, | |
17977 | 0xfc00ffff, 0x2000b93f, 0 , 0, | |
17978 | 0x0 }, /* POOL32Axf_4~*(92) */ | |
17979 | { reserved_block , 0 , 0 , 32, | |
17980 | 0xfc00ffff, 0x2000bb3f, 0 , 0, | |
17981 | 0x0 }, /* POOL32Axf_4~*(93) */ | |
17982 | { reserved_block , 0 , 0 , 32, | |
17983 | 0xfc00ffff, 0x2000bd3f, 0 , 0, | |
17984 | 0x0 }, /* POOL32Axf_4~*(94) */ | |
17985 | { reserved_block , 0 , 0 , 32, | |
17986 | 0xfc00ffff, 0x2000bf3f, 0 , 0, | |
17987 | 0x0 }, /* POOL32Axf_4~*(95) */ | |
17988 | { reserved_block , 0 , 0 , 32, | |
17989 | 0xfc00ffff, 0x2000c13f, 0 , 0, | |
17990 | 0x0 }, /* POOL32Axf_4~*(96) */ | |
17991 | { reserved_block , 0 , 0 , 32, | |
17992 | 0xfc00ffff, 0x2000c33f, 0 , 0, | |
17993 | 0x0 }, /* POOL32Axf_4~*(97) */ | |
17994 | { reserved_block , 0 , 0 , 32, | |
17995 | 0xfc00ffff, 0x2000c53f, 0 , 0, | |
17996 | 0x0 }, /* POOL32Axf_4~*(98) */ | |
17997 | { reserved_block , 0 , 0 , 32, | |
17998 | 0xfc00ffff, 0x2000c73f, 0 , 0, | |
17999 | 0x0 }, /* POOL32Axf_4~*(99) */ | |
18000 | { reserved_block , 0 , 0 , 32, | |
18001 | 0xfc00ffff, 0x2000c93f, 0 , 0, | |
18002 | 0x0 }, /* POOL32Axf_4~*(100) */ | |
18003 | { reserved_block , 0 , 0 , 32, | |
18004 | 0xfc00ffff, 0x2000cb3f, 0 , 0, | |
18005 | 0x0 }, /* POOL32Axf_4~*(101) */ | |
18006 | { instruction , 0 , 0 , 32, | |
8d416f6b | 18007 | 0xfc00ffff, 0x2000cd3f, &CFC2 , 0, |
89a955e8 AM |
18008 | CP2_ }, /* CFC2 */ |
18009 | { reserved_block , 0 , 0 , 32, | |
18010 | 0xfc00ffff, 0x2000cf3f, 0 , 0, | |
18011 | 0x0 }, /* POOL32Axf_4~*(103) */ | |
18012 | { instruction , 0 , 0 , 32, | |
8d416f6b | 18013 | 0xfc00ffff, 0x2000d13f, &PRECEU_PH_QBR , 0, |
89a955e8 AM |
18014 | DSP_ }, /* PRECEU.PH.QBR */ |
18015 | { instruction , 0 , 0 , 32, | |
8d416f6b | 18016 | 0xfc00ffff, 0x2000d33f, &PRECEU_PH_QBRA , 0, |
89a955e8 AM |
18017 | DSP_ }, /* PRECEU.PH.QBRA */ |
18018 | { reserved_block , 0 , 0 , 32, | |
18019 | 0xfc00ffff, 0x2000d53f, 0 , 0, | |
18020 | 0x0 }, /* POOL32Axf_4~*(106) */ | |
18021 | { reserved_block , 0 , 0 , 32, | |
18022 | 0xfc00ffff, 0x2000d73f, 0 , 0, | |
18023 | 0x0 }, /* POOL32Axf_4~*(107) */ | |
18024 | { reserved_block , 0 , 0 , 32, | |
18025 | 0xfc00ffff, 0x2000d93f, 0 , 0, | |
18026 | 0x0 }, /* POOL32Axf_4~*(108) */ | |
18027 | { reserved_block , 0 , 0 , 32, | |
18028 | 0xfc00ffff, 0x2000db3f, 0 , 0, | |
18029 | 0x0 }, /* POOL32Axf_4~*(109) */ | |
18030 | { instruction , 0 , 0 , 32, | |
8d416f6b | 18031 | 0xfc00ffff, 0x2000dd3f, &CTC2 , 0, |
89a955e8 AM |
18032 | CP2_ }, /* CTC2 */ |
18033 | { reserved_block , 0 , 0 , 32, | |
18034 | 0xfc00ffff, 0x2000df3f, 0 , 0, | |
18035 | 0x0 }, /* POOL32Axf_4~*(111) */ | |
18036 | { reserved_block , 0 , 0 , 32, | |
18037 | 0xfc00ffff, 0x2000e13f, 0 , 0, | |
18038 | 0x0 }, /* POOL32Axf_4~*(112) */ | |
18039 | { reserved_block , 0 , 0 , 32, | |
18040 | 0xfc00ffff, 0x2000e33f, 0 , 0, | |
18041 | 0x0 }, /* POOL32Axf_4~*(113) */ | |
18042 | { reserved_block , 0 , 0 , 32, | |
18043 | 0xfc00ffff, 0x2000e53f, 0 , 0, | |
18044 | 0x0 }, /* POOL32Axf_4~*(114) */ | |
18045 | { reserved_block , 0 , 0 , 32, | |
18046 | 0xfc00ffff, 0x2000e73f, 0 , 0, | |
18047 | 0x0 }, /* POOL32Axf_4~*(115) */ | |
18048 | { reserved_block , 0 , 0 , 32, | |
18049 | 0xfc00ffff, 0x2000e93f, 0 , 0, | |
18050 | 0x0 }, /* POOL32Axf_4~*(116) */ | |
18051 | { reserved_block , 0 , 0 , 32, | |
18052 | 0xfc00ffff, 0x2000eb3f, 0 , 0, | |
18053 | 0x0 }, /* POOL32Axf_4~*(117) */ | |
18054 | { reserved_block , 0 , 0 , 32, | |
18055 | 0xfc00ffff, 0x2000ed3f, 0 , 0, | |
18056 | 0x0 }, /* POOL32Axf_4~*(118) */ | |
18057 | { reserved_block , 0 , 0 , 32, | |
18058 | 0xfc00ffff, 0x2000ef3f, 0 , 0, | |
18059 | 0x0 }, /* POOL32Axf_4~*(119) */ | |
18060 | { instruction , 0 , 0 , 32, | |
8d416f6b | 18061 | 0xfc00ffff, 0x2000f13f, &RADDU_W_QB , 0, |
89a955e8 AM |
18062 | DSP_ }, /* RADDU.W.QB */ |
18063 | { reserved_block , 0 , 0 , 32, | |
18064 | 0xfc00ffff, 0x2000f33f, 0 , 0, | |
18065 | 0x0 }, /* POOL32Axf_4~*(121) */ | |
18066 | { reserved_block , 0 , 0 , 32, | |
18067 | 0xfc00ffff, 0x2000f53f, 0 , 0, | |
18068 | 0x0 }, /* POOL32Axf_4~*(122) */ | |
18069 | { reserved_block , 0 , 0 , 32, | |
18070 | 0xfc00ffff, 0x2000f73f, 0 , 0, | |
18071 | 0x0 }, /* POOL32Axf_4~*(123) */ | |
18072 | { reserved_block , 0 , 0 , 32, | |
18073 | 0xfc00ffff, 0x2000f93f, 0 , 0, | |
18074 | 0x0 }, /* POOL32Axf_4~*(124) */ | |
18075 | { reserved_block , 0 , 0 , 32, | |
18076 | 0xfc00ffff, 0x2000fb3f, 0 , 0, | |
18077 | 0x0 }, /* POOL32Axf_4~*(125) */ | |
18078 | { reserved_block , 0 , 0 , 32, | |
18079 | 0xfc00ffff, 0x2000fd3f, 0 , 0, | |
18080 | 0x0 }, /* POOL32Axf_4~*(126) */ | |
18081 | { reserved_block , 0 , 0 , 32, | |
18082 | 0xfc00ffff, 0x2000ff3f, 0 , 0, | |
18083 | 0x0 }, /* POOL32Axf_4~*(127) */ | |
18084 | }; | |
18085 | ||
18086 | ||
a1465490 | 18087 | static const Pool POOL32Axf_5_group0[32] = { |
89a955e8 | 18088 | { instruction , 0 , 0 , 32, |
8d416f6b | 18089 | 0xfc00ffff, 0x2000017f, &TLBGP , 0, |
89a955e8 AM |
18090 | CP0_ | VZ_ | TLB_ }, /* TLBGP */ |
18091 | { instruction , 0 , 0 , 32, | |
8d416f6b | 18092 | 0xfc00ffff, 0x2000037f, &TLBP , 0, |
89a955e8 AM |
18093 | CP0_ | TLB_ }, /* TLBP */ |
18094 | { instruction , 0 , 0 , 32, | |
8d416f6b | 18095 | 0xfc00ffff, 0x2000057f, &TLBGINV , 0, |
89a955e8 AM |
18096 | CP0_ | VZ_ | TLB_ | TLBINV_}, /* TLBGINV */ |
18097 | { instruction , 0 , 0 , 32, | |
8d416f6b | 18098 | 0xfc00ffff, 0x2000077f, &TLBINV , 0, |
89a955e8 AM |
18099 | CP0_ | TLB_ | TLBINV_}, /* TLBINV */ |
18100 | { reserved_block , 0 , 0 , 32, | |
18101 | 0xfc00ffff, 0x2000097f, 0 , 0, | |
18102 | 0x0 }, /* POOL32Axf_5_group0~*(4) */ | |
18103 | { reserved_block , 0 , 0 , 32, | |
18104 | 0xfc00ffff, 0x20000b7f, 0 , 0, | |
18105 | 0x0 }, /* POOL32Axf_5_group0~*(5) */ | |
18106 | { reserved_block , 0 , 0 , 32, | |
18107 | 0xfc00ffff, 0x20000d7f, 0 , 0, | |
18108 | 0x0 }, /* POOL32Axf_5_group0~*(6) */ | |
18109 | { reserved_block , 0 , 0 , 32, | |
18110 | 0xfc00ffff, 0x20000f7f, 0 , 0, | |
18111 | 0x0 }, /* POOL32Axf_5_group0~*(7) */ | |
18112 | { instruction , 0 , 0 , 32, | |
8d416f6b | 18113 | 0xfc00ffff, 0x2000117f, &TLBGR , 0, |
89a955e8 AM |
18114 | CP0_ | VZ_ | TLB_ }, /* TLBGR */ |
18115 | { instruction , 0 , 0 , 32, | |
8d416f6b | 18116 | 0xfc00ffff, 0x2000137f, &TLBR , 0, |
89a955e8 AM |
18117 | CP0_ | TLB_ }, /* TLBR */ |
18118 | { instruction , 0 , 0 , 32, | |
8d416f6b | 18119 | 0xfc00ffff, 0x2000157f, &TLBGINVF , 0, |
89a955e8 AM |
18120 | CP0_ | VZ_ | TLB_ | TLBINV_}, /* TLBGINVF */ |
18121 | { instruction , 0 , 0 , 32, | |
8d416f6b | 18122 | 0xfc00ffff, 0x2000177f, &TLBINVF , 0, |
89a955e8 AM |
18123 | CP0_ | TLB_ | TLBINV_}, /* TLBINVF */ |
18124 | { reserved_block , 0 , 0 , 32, | |
18125 | 0xfc00ffff, 0x2000197f, 0 , 0, | |
18126 | 0x0 }, /* POOL32Axf_5_group0~*(12) */ | |
18127 | { reserved_block , 0 , 0 , 32, | |
18128 | 0xfc00ffff, 0x20001b7f, 0 , 0, | |
18129 | 0x0 }, /* POOL32Axf_5_group0~*(13) */ | |
18130 | { reserved_block , 0 , 0 , 32, | |
18131 | 0xfc00ffff, 0x20001d7f, 0 , 0, | |
18132 | 0x0 }, /* POOL32Axf_5_group0~*(14) */ | |
18133 | { reserved_block , 0 , 0 , 32, | |
18134 | 0xfc00ffff, 0x20001f7f, 0 , 0, | |
18135 | 0x0 }, /* POOL32Axf_5_group0~*(15) */ | |
18136 | { instruction , 0 , 0 , 32, | |
8d416f6b | 18137 | 0xfc00ffff, 0x2000217f, &TLBGWI , 0, |
89a955e8 AM |
18138 | CP0_ | VZ_ | TLB_ }, /* TLBGWI */ |
18139 | { instruction , 0 , 0 , 32, | |
8d416f6b | 18140 | 0xfc00ffff, 0x2000237f, &TLBWI , 0, |
89a955e8 AM |
18141 | CP0_ | TLB_ }, /* TLBWI */ |
18142 | { reserved_block , 0 , 0 , 32, | |
18143 | 0xfc00ffff, 0x2000257f, 0 , 0, | |
18144 | 0x0 }, /* POOL32Axf_5_group0~*(18) */ | |
18145 | { reserved_block , 0 , 0 , 32, | |
18146 | 0xfc00ffff, 0x2000277f, 0 , 0, | |
18147 | 0x0 }, /* POOL32Axf_5_group0~*(19) */ | |
18148 | { reserved_block , 0 , 0 , 32, | |
18149 | 0xfc00ffff, 0x2000297f, 0 , 0, | |
18150 | 0x0 }, /* POOL32Axf_5_group0~*(20) */ | |
18151 | { reserved_block , 0 , 0 , 32, | |
18152 | 0xfc00ffff, 0x20002b7f, 0 , 0, | |
18153 | 0x0 }, /* POOL32Axf_5_group0~*(21) */ | |
18154 | { reserved_block , 0 , 0 , 32, | |
18155 | 0xfc00ffff, 0x20002d7f, 0 , 0, | |
18156 | 0x0 }, /* POOL32Axf_5_group0~*(22) */ | |
18157 | { reserved_block , 0 , 0 , 32, | |
18158 | 0xfc00ffff, 0x20002f7f, 0 , 0, | |
18159 | 0x0 }, /* POOL32Axf_5_group0~*(23) */ | |
18160 | { instruction , 0 , 0 , 32, | |
8d416f6b | 18161 | 0xfc00ffff, 0x2000317f, &TLBGWR , 0, |
89a955e8 AM |
18162 | CP0_ | VZ_ | TLB_ }, /* TLBGWR */ |
18163 | { instruction , 0 , 0 , 32, | |
8d416f6b | 18164 | 0xfc00ffff, 0x2000337f, &TLBWR , 0, |
89a955e8 AM |
18165 | CP0_ | TLB_ }, /* TLBWR */ |
18166 | { reserved_block , 0 , 0 , 32, | |
18167 | 0xfc00ffff, 0x2000357f, 0 , 0, | |
18168 | 0x0 }, /* POOL32Axf_5_group0~*(26) */ | |
18169 | { reserved_block , 0 , 0 , 32, | |
18170 | 0xfc00ffff, 0x2000377f, 0 , 0, | |
18171 | 0x0 }, /* POOL32Axf_5_group0~*(27) */ | |
18172 | { reserved_block , 0 , 0 , 32, | |
18173 | 0xfc00ffff, 0x2000397f, 0 , 0, | |
18174 | 0x0 }, /* POOL32Axf_5_group0~*(28) */ | |
18175 | { reserved_block , 0 , 0 , 32, | |
18176 | 0xfc00ffff, 0x20003b7f, 0 , 0, | |
18177 | 0x0 }, /* POOL32Axf_5_group0~*(29) */ | |
18178 | { reserved_block , 0 , 0 , 32, | |
18179 | 0xfc00ffff, 0x20003d7f, 0 , 0, | |
18180 | 0x0 }, /* POOL32Axf_5_group0~*(30) */ | |
18181 | { reserved_block , 0 , 0 , 32, | |
18182 | 0xfc00ffff, 0x20003f7f, 0 , 0, | |
18183 | 0x0 }, /* POOL32Axf_5_group0~*(31) */ | |
18184 | }; | |
18185 | ||
18186 | ||
a1465490 | 18187 | static const Pool POOL32Axf_5_group1[32] = { |
89a955e8 AM |
18188 | { reserved_block , 0 , 0 , 32, |
18189 | 0xfc00ffff, 0x2000417f, 0 , 0, | |
18190 | 0x0 }, /* POOL32Axf_5_group1~*(0) */ | |
18191 | { reserved_block , 0 , 0 , 32, | |
18192 | 0xfc00ffff, 0x2000437f, 0 , 0, | |
18193 | 0x0 }, /* POOL32Axf_5_group1~*(1) */ | |
18194 | { reserved_block , 0 , 0 , 32, | |
18195 | 0xfc00ffff, 0x2000457f, 0 , 0, | |
18196 | 0x0 }, /* POOL32Axf_5_group1~*(2) */ | |
18197 | { instruction , 0 , 0 , 32, | |
8d416f6b | 18198 | 0xfc00ffff, 0x2000477f, &DI , 0, |
89a955e8 AM |
18199 | 0x0 }, /* DI */ |
18200 | { reserved_block , 0 , 0 , 32, | |
18201 | 0xfc00ffff, 0x2000497f, 0 , 0, | |
18202 | 0x0 }, /* POOL32Axf_5_group1~*(4) */ | |
18203 | { reserved_block , 0 , 0 , 32, | |
18204 | 0xfc00ffff, 0x20004b7f, 0 , 0, | |
18205 | 0x0 }, /* POOL32Axf_5_group1~*(5) */ | |
18206 | { reserved_block , 0 , 0 , 32, | |
18207 | 0xfc00ffff, 0x20004d7f, 0 , 0, | |
18208 | 0x0 }, /* POOL32Axf_5_group1~*(6) */ | |
18209 | { reserved_block , 0 , 0 , 32, | |
18210 | 0xfc00ffff, 0x20004f7f, 0 , 0, | |
18211 | 0x0 }, /* POOL32Axf_5_group1~*(7) */ | |
18212 | { reserved_block , 0 , 0 , 32, | |
18213 | 0xfc00ffff, 0x2000517f, 0 , 0, | |
18214 | 0x0 }, /* POOL32Axf_5_group1~*(8) */ | |
18215 | { reserved_block , 0 , 0 , 32, | |
18216 | 0xfc00ffff, 0x2000537f, 0 , 0, | |
18217 | 0x0 }, /* POOL32Axf_5_group1~*(9) */ | |
18218 | { reserved_block , 0 , 0 , 32, | |
18219 | 0xfc00ffff, 0x2000557f, 0 , 0, | |
18220 | 0x0 }, /* POOL32Axf_5_group1~*(10) */ | |
18221 | { instruction , 0 , 0 , 32, | |
8d416f6b | 18222 | 0xfc00ffff, 0x2000577f, &EI , 0, |
89a955e8 AM |
18223 | 0x0 }, /* EI */ |
18224 | { reserved_block , 0 , 0 , 32, | |
18225 | 0xfc00ffff, 0x2000597f, 0 , 0, | |
18226 | 0x0 }, /* POOL32Axf_5_group1~*(12) */ | |
18227 | { reserved_block , 0 , 0 , 32, | |
18228 | 0xfc00ffff, 0x20005b7f, 0 , 0, | |
18229 | 0x0 }, /* POOL32Axf_5_group1~*(13) */ | |
18230 | { reserved_block , 0 , 0 , 32, | |
18231 | 0xfc00ffff, 0x20005d7f, 0 , 0, | |
18232 | 0x0 }, /* POOL32Axf_5_group1~*(14) */ | |
18233 | { reserved_block , 0 , 0 , 32, | |
18234 | 0xfc00ffff, 0x20005f7f, 0 , 0, | |
18235 | 0x0 }, /* POOL32Axf_5_group1~*(15) */ | |
18236 | { reserved_block , 0 , 0 , 32, | |
18237 | 0xfc00ffff, 0x2000617f, 0 , 0, | |
18238 | 0x0 }, /* POOL32Axf_5_group1~*(16) */ | |
18239 | { reserved_block , 0 , 0 , 32, | |
18240 | 0xfc00ffff, 0x2000637f, 0 , 0, | |
18241 | 0x0 }, /* POOL32Axf_5_group1~*(17) */ | |
18242 | { reserved_block , 0 , 0 , 32, | |
18243 | 0xfc00ffff, 0x2000657f, 0 , 0, | |
18244 | 0x0 }, /* POOL32Axf_5_group1~*(18) */ | |
18245 | { reserved_block , 0 , 0 , 32, | |
18246 | 0xfc00ffff, 0x2000677f, 0 , 0, | |
18247 | 0x0 }, /* POOL32Axf_5_group1~*(19) */ | |
18248 | { reserved_block , 0 , 0 , 32, | |
18249 | 0xfc00ffff, 0x2000697f, 0 , 0, | |
18250 | 0x0 }, /* POOL32Axf_5_group1~*(20) */ | |
18251 | { reserved_block , 0 , 0 , 32, | |
18252 | 0xfc00ffff, 0x20006b7f, 0 , 0, | |
18253 | 0x0 }, /* POOL32Axf_5_group1~*(21) */ | |
18254 | { reserved_block , 0 , 0 , 32, | |
18255 | 0xfc00ffff, 0x20006d7f, 0 , 0, | |
18256 | 0x0 }, /* POOL32Axf_5_group1~*(22) */ | |
18257 | { reserved_block , 0 , 0 , 32, | |
18258 | 0xfc00ffff, 0x20006f7f, 0 , 0, | |
18259 | 0x0 }, /* POOL32Axf_5_group1~*(23) */ | |
18260 | { reserved_block , 0 , 0 , 32, | |
18261 | 0xfc00ffff, 0x2000717f, 0 , 0, | |
18262 | 0x0 }, /* POOL32Axf_5_group1~*(24) */ | |
18263 | { reserved_block , 0 , 0 , 32, | |
18264 | 0xfc00ffff, 0x2000737f, 0 , 0, | |
18265 | 0x0 }, /* POOL32Axf_5_group1~*(25) */ | |
18266 | { reserved_block , 0 , 0 , 32, | |
18267 | 0xfc00ffff, 0x2000757f, 0 , 0, | |
18268 | 0x0 }, /* POOL32Axf_5_group1~*(26) */ | |
18269 | { reserved_block , 0 , 0 , 32, | |
18270 | 0xfc00ffff, 0x2000777f, 0 , 0, | |
18271 | 0x0 }, /* POOL32Axf_5_group1~*(27) */ | |
18272 | { reserved_block , 0 , 0 , 32, | |
18273 | 0xfc00ffff, 0x2000797f, 0 , 0, | |
18274 | 0x0 }, /* POOL32Axf_5_group1~*(28) */ | |
18275 | { reserved_block , 0 , 0 , 32, | |
18276 | 0xfc00ffff, 0x20007b7f, 0 , 0, | |
18277 | 0x0 }, /* POOL32Axf_5_group1~*(29) */ | |
18278 | { reserved_block , 0 , 0 , 32, | |
18279 | 0xfc00ffff, 0x20007d7f, 0 , 0, | |
18280 | 0x0 }, /* POOL32Axf_5_group1~*(30) */ | |
18281 | { reserved_block , 0 , 0 , 32, | |
18282 | 0xfc00ffff, 0x20007f7f, 0 , 0, | |
18283 | 0x0 }, /* POOL32Axf_5_group1~*(31) */ | |
18284 | }; | |
18285 | ||
18286 | ||
a1465490 | 18287 | static const Pool ERETx[2] = { |
89a955e8 | 18288 | { instruction , 0 , 0 , 32, |
8d416f6b | 18289 | 0xfc01ffff, 0x2000f37f, &ERET , 0, |
89a955e8 AM |
18290 | 0x0 }, /* ERET */ |
18291 | { instruction , 0 , 0 , 32, | |
8d416f6b | 18292 | 0xfc01ffff, 0x2001f37f, &ERETNC , 0, |
89a955e8 AM |
18293 | 0x0 }, /* ERETNC */ |
18294 | }; | |
18295 | ||
18296 | ||
a1465490 | 18297 | static const Pool POOL32Axf_5_group3[32] = { |
89a955e8 AM |
18298 | { reserved_block , 0 , 0 , 32, |
18299 | 0xfc00ffff, 0x2000c17f, 0 , 0, | |
18300 | 0x0 }, /* POOL32Axf_5_group3~*(0) */ | |
18301 | { instruction , 0 , 0 , 32, | |
8d416f6b | 18302 | 0xfc00ffff, 0x2000c37f, &WAIT , 0, |
89a955e8 AM |
18303 | 0x0 }, /* WAIT */ |
18304 | { reserved_block , 0 , 0 , 32, | |
18305 | 0xfc00ffff, 0x2000c57f, 0 , 0, | |
18306 | 0x0 }, /* POOL32Axf_5_group3~*(2) */ | |
18307 | { reserved_block , 0 , 0 , 32, | |
18308 | 0xfc00ffff, 0x2000c77f, 0 , 0, | |
18309 | 0x0 }, /* POOL32Axf_5_group3~*(3) */ | |
18310 | { reserved_block , 0 , 0 , 32, | |
18311 | 0xfc00ffff, 0x2000c97f, 0 , 0, | |
18312 | 0x0 }, /* POOL32Axf_5_group3~*(4) */ | |
18313 | { reserved_block , 0 , 0 , 32, | |
18314 | 0xfc00ffff, 0x2000cb7f, 0 , 0, | |
18315 | 0x0 }, /* POOL32Axf_5_group3~*(5) */ | |
18316 | { reserved_block , 0 , 0 , 32, | |
18317 | 0xfc00ffff, 0x2000cd7f, 0 , 0, | |
18318 | 0x0 }, /* POOL32Axf_5_group3~*(6) */ | |
18319 | { reserved_block , 0 , 0 , 32, | |
18320 | 0xfc00ffff, 0x2000cf7f, 0 , 0, | |
18321 | 0x0 }, /* POOL32Axf_5_group3~*(7) */ | |
18322 | { reserved_block , 0 , 0 , 32, | |
18323 | 0xfc00ffff, 0x2000d17f, 0 , 0, | |
18324 | 0x0 }, /* POOL32Axf_5_group3~*(8) */ | |
18325 | { instruction , 0 , 0 , 32, | |
8d416f6b | 18326 | 0xfc00ffff, 0x2000d37f, &IRET , 0, |
89a955e8 AM |
18327 | MCU_ }, /* IRET */ |
18328 | { reserved_block , 0 , 0 , 32, | |
18329 | 0xfc00ffff, 0x2000d57f, 0 , 0, | |
18330 | 0x0 }, /* POOL32Axf_5_group3~*(10) */ | |
18331 | { reserved_block , 0 , 0 , 32, | |
18332 | 0xfc00ffff, 0x2000d77f, 0 , 0, | |
18333 | 0x0 }, /* POOL32Axf_5_group3~*(11) */ | |
18334 | { reserved_block , 0 , 0 , 32, | |
18335 | 0xfc00ffff, 0x2000d97f, 0 , 0, | |
18336 | 0x0 }, /* POOL32Axf_5_group3~*(12) */ | |
18337 | { reserved_block , 0 , 0 , 32, | |
18338 | 0xfc00ffff, 0x2000db7f, 0 , 0, | |
18339 | 0x0 }, /* POOL32Axf_5_group3~*(13) */ | |
18340 | { reserved_block , 0 , 0 , 32, | |
18341 | 0xfc00ffff, 0x2000dd7f, 0 , 0, | |
18342 | 0x0 }, /* POOL32Axf_5_group3~*(14) */ | |
18343 | { reserved_block , 0 , 0 , 32, | |
18344 | 0xfc00ffff, 0x2000df7f, 0 , 0, | |
18345 | 0x0 }, /* POOL32Axf_5_group3~*(15) */ | |
18346 | { instruction , 0 , 0 , 32, | |
8d416f6b | 18347 | 0xfc00ffff, 0x2000e17f, &RDPGPR , 0, |
89a955e8 AM |
18348 | CP0_ }, /* RDPGPR */ |
18349 | { instruction , 0 , 0 , 32, | |
8d416f6b | 18350 | 0xfc00ffff, 0x2000e37f, &DERET , 0, |
89a955e8 AM |
18351 | EJTAG_ }, /* DERET */ |
18352 | { reserved_block , 0 , 0 , 32, | |
18353 | 0xfc00ffff, 0x2000e57f, 0 , 0, | |
18354 | 0x0 }, /* POOL32Axf_5_group3~*(18) */ | |
18355 | { reserved_block , 0 , 0 , 32, | |
18356 | 0xfc00ffff, 0x2000e77f, 0 , 0, | |
18357 | 0x0 }, /* POOL32Axf_5_group3~*(19) */ | |
18358 | { reserved_block , 0 , 0 , 32, | |
18359 | 0xfc00ffff, 0x2000e97f, 0 , 0, | |
18360 | 0x0 }, /* POOL32Axf_5_group3~*(20) */ | |
18361 | { reserved_block , 0 , 0 , 32, | |
18362 | 0xfc00ffff, 0x2000eb7f, 0 , 0, | |
18363 | 0x0 }, /* POOL32Axf_5_group3~*(21) */ | |
18364 | { reserved_block , 0 , 0 , 32, | |
18365 | 0xfc00ffff, 0x2000ed7f, 0 , 0, | |
18366 | 0x0 }, /* POOL32Axf_5_group3~*(22) */ | |
18367 | { reserved_block , 0 , 0 , 32, | |
18368 | 0xfc00ffff, 0x2000ef7f, 0 , 0, | |
18369 | 0x0 }, /* POOL32Axf_5_group3~*(23) */ | |
18370 | { instruction , 0 , 0 , 32, | |
8d416f6b | 18371 | 0xfc00ffff, 0x2000f17f, &WRPGPR , 0, |
89a955e8 AM |
18372 | CP0_ }, /* WRPGPR */ |
18373 | { pool , ERETx , 2 , 32, | |
18374 | 0xfc00ffff, 0x2000f37f, 0 , 0, | |
18375 | 0x0 }, /* ERETx */ | |
18376 | { reserved_block , 0 , 0 , 32, | |
18377 | 0xfc00ffff, 0x2000f57f, 0 , 0, | |
18378 | 0x0 }, /* POOL32Axf_5_group3~*(26) */ | |
18379 | { reserved_block , 0 , 0 , 32, | |
18380 | 0xfc00ffff, 0x2000f77f, 0 , 0, | |
18381 | 0x0 }, /* POOL32Axf_5_group3~*(27) */ | |
18382 | { reserved_block , 0 , 0 , 32, | |
18383 | 0xfc00ffff, 0x2000f97f, 0 , 0, | |
18384 | 0x0 }, /* POOL32Axf_5_group3~*(28) */ | |
18385 | { reserved_block , 0 , 0 , 32, | |
18386 | 0xfc00ffff, 0x2000fb7f, 0 , 0, | |
18387 | 0x0 }, /* POOL32Axf_5_group3~*(29) */ | |
18388 | { reserved_block , 0 , 0 , 32, | |
18389 | 0xfc00ffff, 0x2000fd7f, 0 , 0, | |
18390 | 0x0 }, /* POOL32Axf_5_group3~*(30) */ | |
18391 | { reserved_block , 0 , 0 , 32, | |
18392 | 0xfc00ffff, 0x2000ff7f, 0 , 0, | |
18393 | 0x0 }, /* POOL32Axf_5_group3~*(31) */ | |
18394 | }; | |
18395 | ||
18396 | ||
a1465490 | 18397 | static const Pool POOL32Axf_5[4] = { |
89a955e8 AM |
18398 | { pool , POOL32Axf_5_group0 , 32 , 32, |
18399 | 0xfc00c1ff, 0x2000017f, 0 , 0, | |
18400 | 0x0 }, /* POOL32Axf_5_group0 */ | |
18401 | { pool , POOL32Axf_5_group1 , 32 , 32, | |
18402 | 0xfc00c1ff, 0x2000417f, 0 , 0, | |
18403 | 0x0 }, /* POOL32Axf_5_group1 */ | |
18404 | { reserved_block , 0 , 0 , 32, | |
18405 | 0xfc00c1ff, 0x2000817f, 0 , 0, | |
18406 | 0x0 }, /* POOL32Axf_5~*(2) */ | |
18407 | { pool , POOL32Axf_5_group3 , 32 , 32, | |
18408 | 0xfc00c1ff, 0x2000c17f, 0 , 0, | |
18409 | 0x0 }, /* POOL32Axf_5_group3 */ | |
18410 | }; | |
18411 | ||
18412 | ||
a1465490 | 18413 | static const Pool SHRA__R__QB[2] = { |
89a955e8 | 18414 | { instruction , 0 , 0 , 32, |
8d416f6b | 18415 | 0xfc001fff, 0x200001ff, &SHRA_QB , 0, |
89a955e8 AM |
18416 | DSP_ }, /* SHRA.QB */ |
18417 | { instruction , 0 , 0 , 32, | |
8d416f6b | 18418 | 0xfc001fff, 0x200011ff, &SHRA_R_QB , 0, |
89a955e8 AM |
18419 | DSP_ }, /* SHRA_R.QB */ |
18420 | }; | |
18421 | ||
18422 | ||
a1465490 | 18423 | static const Pool POOL32Axf_7[8] = { |
89a955e8 AM |
18424 | { pool , SHRA__R__QB , 2 , 32, |
18425 | 0xfc000fff, 0x200001ff, 0 , 0, | |
18426 | 0x0 }, /* SHRA[_R].QB */ | |
18427 | { instruction , 0 , 0 , 32, | |
8d416f6b | 18428 | 0xfc000fff, 0x200003ff, &SHRL_PH , 0, |
89a955e8 AM |
18429 | DSP_ }, /* SHRL.PH */ |
18430 | { instruction , 0 , 0 , 32, | |
8d416f6b | 18431 | 0xfc000fff, 0x200005ff, &REPL_QB , 0, |
89a955e8 AM |
18432 | DSP_ }, /* REPL.QB */ |
18433 | { reserved_block , 0 , 0 , 32, | |
18434 | 0xfc000fff, 0x200007ff, 0 , 0, | |
18435 | 0x0 }, /* POOL32Axf_7~*(3) */ | |
18436 | { reserved_block , 0 , 0 , 32, | |
18437 | 0xfc000fff, 0x200009ff, 0 , 0, | |
18438 | 0x0 }, /* POOL32Axf_7~*(4) */ | |
18439 | { reserved_block , 0 , 0 , 32, | |
18440 | 0xfc000fff, 0x20000bff, 0 , 0, | |
18441 | 0x0 }, /* POOL32Axf_7~*(5) */ | |
18442 | { reserved_block , 0 , 0 , 32, | |
18443 | 0xfc000fff, 0x20000dff, 0 , 0, | |
18444 | 0x0 }, /* POOL32Axf_7~*(6) */ | |
18445 | { reserved_block , 0 , 0 , 32, | |
18446 | 0xfc000fff, 0x20000fff, 0 , 0, | |
18447 | 0x0 }, /* POOL32Axf_7~*(7) */ | |
18448 | }; | |
18449 | ||
18450 | ||
a1465490 | 18451 | static const Pool POOL32Axf[8] = { |
89a955e8 AM |
18452 | { reserved_block , 0 , 0 , 32, |
18453 | 0xfc0001ff, 0x2000003f, 0 , 0, | |
18454 | 0x0 }, /* POOL32Axf~*(0) */ | |
18455 | { pool , POOL32Axf_1 , 8 , 32, | |
18456 | 0xfc0001ff, 0x2000007f, 0 , 0, | |
18457 | 0x0 }, /* POOL32Axf_1 */ | |
18458 | { pool , POOL32Axf_2 , 4 , 32, | |
18459 | 0xfc0001ff, 0x200000bf, 0 , 0, | |
18460 | 0x0 }, /* POOL32Axf_2 */ | |
18461 | { reserved_block , 0 , 0 , 32, | |
18462 | 0xfc0001ff, 0x200000ff, 0 , 0, | |
18463 | 0x0 }, /* POOL32Axf~*(3) */ | |
18464 | { pool , POOL32Axf_4 , 128 , 32, | |
18465 | 0xfc0001ff, 0x2000013f, 0 , 0, | |
18466 | 0x0 }, /* POOL32Axf_4 */ | |
18467 | { pool , POOL32Axf_5 , 4 , 32, | |
18468 | 0xfc0001ff, 0x2000017f, 0 , 0, | |
18469 | 0x0 }, /* POOL32Axf_5 */ | |
18470 | { reserved_block , 0 , 0 , 32, | |
18471 | 0xfc0001ff, 0x200001bf, 0 , 0, | |
18472 | 0x0 }, /* POOL32Axf~*(6) */ | |
18473 | { pool , POOL32Axf_7 , 8 , 32, | |
18474 | 0xfc0001ff, 0x200001ff, 0 , 0, | |
18475 | 0x0 }, /* POOL32Axf_7 */ | |
18476 | }; | |
18477 | ||
18478 | ||
a1465490 | 18479 | static const Pool _POOL32A7[8] = { |
89a955e8 AM |
18480 | { pool , P_LSX , 2 , 32, |
18481 | 0xfc00003f, 0x20000007, 0 , 0, | |
18482 | 0x0 }, /* P.LSX */ | |
18483 | { instruction , 0 , 0 , 32, | |
8d416f6b | 18484 | 0xfc00003f, 0x2000000f, &LSA , 0, |
89a955e8 AM |
18485 | 0x0 }, /* LSA */ |
18486 | { reserved_block , 0 , 0 , 32, | |
18487 | 0xfc00003f, 0x20000017, 0 , 0, | |
18488 | 0x0 }, /* _POOL32A7~*(2) */ | |
18489 | { instruction , 0 , 0 , 32, | |
8d416f6b | 18490 | 0xfc00003f, 0x2000001f, &EXTW , 0, |
89a955e8 AM |
18491 | 0x0 }, /* EXTW */ |
18492 | { reserved_block , 0 , 0 , 32, | |
18493 | 0xfc00003f, 0x20000027, 0 , 0, | |
18494 | 0x0 }, /* _POOL32A7~*(4) */ | |
18495 | { reserved_block , 0 , 0 , 32, | |
18496 | 0xfc00003f, 0x2000002f, 0 , 0, | |
18497 | 0x0 }, /* _POOL32A7~*(5) */ | |
18498 | { reserved_block , 0 , 0 , 32, | |
18499 | 0xfc00003f, 0x20000037, 0 , 0, | |
18500 | 0x0 }, /* _POOL32A7~*(6) */ | |
18501 | { pool , POOL32Axf , 8 , 32, | |
18502 | 0xfc00003f, 0x2000003f, 0 , 0, | |
18503 | 0x0 }, /* POOL32Axf */ | |
18504 | }; | |
18505 | ||
18506 | ||
a1465490 | 18507 | static const Pool P32A[8] = { |
89a955e8 AM |
18508 | { pool , _POOL32A0 , 128 , 32, |
18509 | 0xfc000007, 0x20000000, 0 , 0, | |
18510 | 0x0 }, /* _POOL32A0 */ | |
18511 | { instruction , 0 , 0 , 32, | |
8d416f6b | 18512 | 0xfc000007, 0x20000001, &SPECIAL2 , 0, |
89a955e8 AM |
18513 | UDI_ }, /* SPECIAL2 */ |
18514 | { instruction , 0 , 0 , 32, | |
8d416f6b | 18515 | 0xfc000007, 0x20000002, &COP2_1 , 0, |
89a955e8 AM |
18516 | CP2_ }, /* COP2_1 */ |
18517 | { instruction , 0 , 0 , 32, | |
8d416f6b | 18518 | 0xfc000007, 0x20000003, &UDI , 0, |
89a955e8 AM |
18519 | UDI_ }, /* UDI */ |
18520 | { reserved_block , 0 , 0 , 32, | |
18521 | 0xfc000007, 0x20000004, 0 , 0, | |
18522 | 0x0 }, /* P32A~*(4) */ | |
18523 | { pool , _POOL32A5 , 128 , 32, | |
18524 | 0xfc000007, 0x20000005, 0 , 0, | |
18525 | 0x0 }, /* _POOL32A5 */ | |
18526 | { reserved_block , 0 , 0 , 32, | |
18527 | 0xfc000007, 0x20000006, 0 , 0, | |
18528 | 0x0 }, /* P32A~*(6) */ | |
18529 | { pool , _POOL32A7 , 8 , 32, | |
18530 | 0xfc000007, 0x20000007, 0 , 0, | |
18531 | 0x0 }, /* _POOL32A7 */ | |
18532 | }; | |
18533 | ||
18534 | ||
a1465490 | 18535 | static const Pool P_GP_D[2] = { |
89a955e8 | 18536 | { instruction , 0 , 0 , 32, |
8d416f6b | 18537 | 0xfc000007, 0x40000001, &LD_GP_ , 0, |
89a955e8 AM |
18538 | MIPS64_ }, /* LD[GP] */ |
18539 | { instruction , 0 , 0 , 32, | |
8d416f6b | 18540 | 0xfc000007, 0x40000005, &SD_GP_ , 0, |
89a955e8 AM |
18541 | MIPS64_ }, /* SD[GP] */ |
18542 | }; | |
18543 | ||
18544 | ||
a1465490 | 18545 | static const Pool P_GP_W[4] = { |
89a955e8 | 18546 | { instruction , 0 , 0 , 32, |
8d416f6b | 18547 | 0xfc000003, 0x40000000, &ADDIU_GP_W_ , 0, |
89a955e8 AM |
18548 | 0x0 }, /* ADDIU[GP.W] */ |
18549 | { pool , P_GP_D , 2 , 32, | |
18550 | 0xfc000003, 0x40000001, 0 , 0, | |
18551 | 0x0 }, /* P.GP.D */ | |
18552 | { instruction , 0 , 0 , 32, | |
8d416f6b | 18553 | 0xfc000003, 0x40000002, &LW_GP_ , 0, |
89a955e8 AM |
18554 | 0x0 }, /* LW[GP] */ |
18555 | { instruction , 0 , 0 , 32, | |
8d416f6b | 18556 | 0xfc000003, 0x40000003, &SW_GP_ , 0, |
89a955e8 AM |
18557 | 0x0 }, /* SW[GP] */ |
18558 | }; | |
18559 | ||
18560 | ||
a1465490 | 18561 | static const Pool POOL48I[32] = { |
89a955e8 | 18562 | { instruction , 0 , 0 , 48, |
8d416f6b | 18563 | 0xfc1f00000000ull, 0x600000000000ull, &LI_48_ , 0, |
89a955e8 AM |
18564 | XMMS_ }, /* LI[48] */ |
18565 | { instruction , 0 , 0 , 48, | |
8d416f6b | 18566 | 0xfc1f00000000ull, 0x600100000000ull, &ADDIU_48_ , 0, |
89a955e8 AM |
18567 | XMMS_ }, /* ADDIU[48] */ |
18568 | { instruction , 0 , 0 , 48, | |
8d416f6b | 18569 | 0xfc1f00000000ull, 0x600200000000ull, &ADDIU_GP48_ , 0, |
89a955e8 AM |
18570 | XMMS_ }, /* ADDIU[GP48] */ |
18571 | { instruction , 0 , 0 , 48, | |
8d416f6b | 18572 | 0xfc1f00000000ull, 0x600300000000ull, &ADDIUPC_48_ , 0, |
89a955e8 AM |
18573 | XMMS_ }, /* ADDIUPC[48] */ |
18574 | { reserved_block , 0 , 0 , 48, | |
18575 | 0xfc1f00000000ull, 0x600400000000ull, 0 , 0, | |
18576 | 0x0 }, /* POOL48I~*(4) */ | |
18577 | { reserved_block , 0 , 0 , 48, | |
18578 | 0xfc1f00000000ull, 0x600500000000ull, 0 , 0, | |
18579 | 0x0 }, /* POOL48I~*(5) */ | |
18580 | { reserved_block , 0 , 0 , 48, | |
18581 | 0xfc1f00000000ull, 0x600600000000ull, 0 , 0, | |
18582 | 0x0 }, /* POOL48I~*(6) */ | |
18583 | { reserved_block , 0 , 0 , 48, | |
18584 | 0xfc1f00000000ull, 0x600700000000ull, 0 , 0, | |
18585 | 0x0 }, /* POOL48I~*(7) */ | |
18586 | { reserved_block , 0 , 0 , 48, | |
18587 | 0xfc1f00000000ull, 0x600800000000ull, 0 , 0, | |
18588 | 0x0 }, /* POOL48I~*(8) */ | |
18589 | { reserved_block , 0 , 0 , 48, | |
18590 | 0xfc1f00000000ull, 0x600900000000ull, 0 , 0, | |
18591 | 0x0 }, /* POOL48I~*(9) */ | |
18592 | { reserved_block , 0 , 0 , 48, | |
18593 | 0xfc1f00000000ull, 0x600a00000000ull, 0 , 0, | |
18594 | 0x0 }, /* POOL48I~*(10) */ | |
18595 | { instruction , 0 , 0 , 48, | |
8d416f6b | 18596 | 0xfc1f00000000ull, 0x600b00000000ull, &LWPC_48_ , 0, |
89a955e8 AM |
18597 | XMMS_ }, /* LWPC[48] */ |
18598 | { reserved_block , 0 , 0 , 48, | |
18599 | 0xfc1f00000000ull, 0x600c00000000ull, 0 , 0, | |
18600 | 0x0 }, /* POOL48I~*(12) */ | |
18601 | { reserved_block , 0 , 0 , 48, | |
18602 | 0xfc1f00000000ull, 0x600d00000000ull, 0 , 0, | |
18603 | 0x0 }, /* POOL48I~*(13) */ | |
18604 | { reserved_block , 0 , 0 , 48, | |
18605 | 0xfc1f00000000ull, 0x600e00000000ull, 0 , 0, | |
18606 | 0x0 }, /* POOL48I~*(14) */ | |
18607 | { instruction , 0 , 0 , 48, | |
8d416f6b | 18608 | 0xfc1f00000000ull, 0x600f00000000ull, &SWPC_48_ , 0, |
89a955e8 AM |
18609 | XMMS_ }, /* SWPC[48] */ |
18610 | { reserved_block , 0 , 0 , 48, | |
18611 | 0xfc1f00000000ull, 0x601000000000ull, 0 , 0, | |
18612 | 0x0 }, /* POOL48I~*(16) */ | |
18613 | { instruction , 0 , 0 , 48, | |
8d416f6b | 18614 | 0xfc1f00000000ull, 0x601100000000ull, &DADDIU_48_ , 0, |
89a955e8 AM |
18615 | MIPS64_ }, /* DADDIU[48] */ |
18616 | { reserved_block , 0 , 0 , 48, | |
18617 | 0xfc1f00000000ull, 0x601200000000ull, 0 , 0, | |
18618 | 0x0 }, /* POOL48I~*(18) */ | |
18619 | { reserved_block , 0 , 0 , 48, | |
18620 | 0xfc1f00000000ull, 0x601300000000ull, 0 , 0, | |
18621 | 0x0 }, /* POOL48I~*(19) */ | |
18622 | { instruction , 0 , 0 , 48, | |
8d416f6b | 18623 | 0xfc1f00000000ull, 0x601400000000ull, &DLUI_48_ , 0, |
89a955e8 AM |
18624 | MIPS64_ }, /* DLUI[48] */ |
18625 | { reserved_block , 0 , 0 , 48, | |
18626 | 0xfc1f00000000ull, 0x601500000000ull, 0 , 0, | |
18627 | 0x0 }, /* POOL48I~*(21) */ | |
18628 | { reserved_block , 0 , 0 , 48, | |
18629 | 0xfc1f00000000ull, 0x601600000000ull, 0 , 0, | |
18630 | 0x0 }, /* POOL48I~*(22) */ | |
18631 | { reserved_block , 0 , 0 , 48, | |
18632 | 0xfc1f00000000ull, 0x601700000000ull, 0 , 0, | |
18633 | 0x0 }, /* POOL48I~*(23) */ | |
18634 | { reserved_block , 0 , 0 , 48, | |
18635 | 0xfc1f00000000ull, 0x601800000000ull, 0 , 0, | |
18636 | 0x0 }, /* POOL48I~*(24) */ | |
18637 | { reserved_block , 0 , 0 , 48, | |
18638 | 0xfc1f00000000ull, 0x601900000000ull, 0 , 0, | |
18639 | 0x0 }, /* POOL48I~*(25) */ | |
18640 | { reserved_block , 0 , 0 , 48, | |
18641 | 0xfc1f00000000ull, 0x601a00000000ull, 0 , 0, | |
18642 | 0x0 }, /* POOL48I~*(26) */ | |
18643 | { instruction , 0 , 0 , 48, | |
8d416f6b | 18644 | 0xfc1f00000000ull, 0x601b00000000ull, &LDPC_48_ , 0, |
89a955e8 AM |
18645 | MIPS64_ }, /* LDPC[48] */ |
18646 | { reserved_block , 0 , 0 , 48, | |
18647 | 0xfc1f00000000ull, 0x601c00000000ull, 0 , 0, | |
18648 | 0x0 }, /* POOL48I~*(28) */ | |
18649 | { reserved_block , 0 , 0 , 48, | |
18650 | 0xfc1f00000000ull, 0x601d00000000ull, 0 , 0, | |
18651 | 0x0 }, /* POOL48I~*(29) */ | |
18652 | { reserved_block , 0 , 0 , 48, | |
18653 | 0xfc1f00000000ull, 0x601e00000000ull, 0 , 0, | |
18654 | 0x0 }, /* POOL48I~*(30) */ | |
18655 | { instruction , 0 , 0 , 48, | |
8d416f6b | 18656 | 0xfc1f00000000ull, 0x601f00000000ull, &SDPC_48_ , 0, |
89a955e8 AM |
18657 | MIPS64_ }, /* SDPC[48] */ |
18658 | }; | |
18659 | ||
18660 | ||
a1465490 | 18661 | static const Pool PP_SR[4] = { |
89a955e8 | 18662 | { instruction , 0 , 0 , 32, |
8d416f6b | 18663 | 0xfc10f003, 0x80003000, &SAVE_32_ , 0, |
89a955e8 AM |
18664 | 0x0 }, /* SAVE[32] */ |
18665 | { reserved_block , 0 , 0 , 32, | |
18666 | 0xfc10f003, 0x80003001, 0 , 0, | |
18667 | 0x0 }, /* PP.SR~*(1) */ | |
18668 | { instruction , 0 , 0 , 32, | |
8d416f6b | 18669 | 0xfc10f003, 0x80003002, &RESTORE_32_ , 0, |
89a955e8 AM |
18670 | 0x0 }, /* RESTORE[32] */ |
18671 | { return_instruction , 0 , 0 , 32, | |
8d416f6b | 18672 | 0xfc10f003, 0x80003003, &RESTORE_JRC_32_ , 0, |
89a955e8 AM |
18673 | 0x0 }, /* RESTORE.JRC[32] */ |
18674 | }; | |
18675 | ||
18676 | ||
a1465490 | 18677 | static const Pool P_SR_F[8] = { |
89a955e8 | 18678 | { instruction , 0 , 0 , 32, |
8d416f6b | 18679 | 0xfc10f007, 0x80103000, &SAVEF , 0, |
89a955e8 AM |
18680 | CP1_ }, /* SAVEF */ |
18681 | { instruction , 0 , 0 , 32, | |
8d416f6b | 18682 | 0xfc10f007, 0x80103001, &RESTOREF , 0, |
89a955e8 AM |
18683 | CP1_ }, /* RESTOREF */ |
18684 | { reserved_block , 0 , 0 , 32, | |
18685 | 0xfc10f007, 0x80103002, 0 , 0, | |
18686 | 0x0 }, /* P.SR.F~*(2) */ | |
18687 | { reserved_block , 0 , 0 , 32, | |
18688 | 0xfc10f007, 0x80103003, 0 , 0, | |
18689 | 0x0 }, /* P.SR.F~*(3) */ | |
18690 | { reserved_block , 0 , 0 , 32, | |
18691 | 0xfc10f007, 0x80103004, 0 , 0, | |
18692 | 0x0 }, /* P.SR.F~*(4) */ | |
18693 | { reserved_block , 0 , 0 , 32, | |
18694 | 0xfc10f007, 0x80103005, 0 , 0, | |
18695 | 0x0 }, /* P.SR.F~*(5) */ | |
18696 | { reserved_block , 0 , 0 , 32, | |
18697 | 0xfc10f007, 0x80103006, 0 , 0, | |
18698 | 0x0 }, /* P.SR.F~*(6) */ | |
18699 | { reserved_block , 0 , 0 , 32, | |
18700 | 0xfc10f007, 0x80103007, 0 , 0, | |
18701 | 0x0 }, /* P.SR.F~*(7) */ | |
18702 | }; | |
18703 | ||
18704 | ||
a1465490 | 18705 | static const Pool P_SR[2] = { |
89a955e8 AM |
18706 | { pool , PP_SR , 4 , 32, |
18707 | 0xfc10f000, 0x80003000, 0 , 0, | |
18708 | 0x0 }, /* PP.SR */ | |
18709 | { pool , P_SR_F , 8 , 32, | |
18710 | 0xfc10f000, 0x80103000, 0 , 0, | |
18711 | 0x0 }, /* P.SR.F */ | |
18712 | }; | |
18713 | ||
18714 | ||
a1465490 | 18715 | static const Pool P_SLL[5] = { |
89a955e8 | 18716 | { instruction , 0 , 0 , 32, |
8d416f6b | 18717 | 0xffe0f1ff, 0x8000c000, &NOP_32_ , 0, |
89a955e8 AM |
18718 | 0x0 }, /* NOP[32] */ |
18719 | { instruction , 0 , 0 , 32, | |
8d416f6b | 18720 | 0xffe0f1ff, 0x8000c003, &EHB , 0, |
89a955e8 AM |
18721 | 0x0 }, /* EHB */ |
18722 | { instruction , 0 , 0 , 32, | |
8d416f6b | 18723 | 0xffe0f1ff, 0x8000c005, &PAUSE , 0, |
89a955e8 AM |
18724 | 0x0 }, /* PAUSE */ |
18725 | { instruction , 0 , 0 , 32, | |
8d416f6b | 18726 | 0xffe0f1ff, 0x8000c006, &SYNC , 0, |
89a955e8 AM |
18727 | 0x0 }, /* SYNC */ |
18728 | { instruction , 0 , 0 , 32, | |
8d416f6b | 18729 | 0xfc00f1e0, 0x8000c000, &SLL_32_ , 0, |
89a955e8 AM |
18730 | 0x0 }, /* SLL[32] */ |
18731 | }; | |
18732 | ||
18733 | ||
a1465490 | 18734 | static const Pool P_SHIFT[16] = { |
89a955e8 AM |
18735 | { pool , P_SLL , 5 , 32, |
18736 | 0xfc00f1e0, 0x8000c000, 0 , 0, | |
18737 | 0x0 }, /* P.SLL */ | |
18738 | { reserved_block , 0 , 0 , 32, | |
18739 | 0xfc00f1e0, 0x8000c020, 0 , 0, | |
18740 | 0x0 }, /* P.SHIFT~*(1) */ | |
18741 | { instruction , 0 , 0 , 32, | |
8d416f6b | 18742 | 0xfc00f1e0, 0x8000c040, &SRL_32_ , 0, |
89a955e8 AM |
18743 | 0x0 }, /* SRL[32] */ |
18744 | { reserved_block , 0 , 0 , 32, | |
18745 | 0xfc00f1e0, 0x8000c060, 0 , 0, | |
18746 | 0x0 }, /* P.SHIFT~*(3) */ | |
18747 | { instruction , 0 , 0 , 32, | |
8d416f6b | 18748 | 0xfc00f1e0, 0x8000c080, &SRA , 0, |
89a955e8 AM |
18749 | 0x0 }, /* SRA */ |
18750 | { reserved_block , 0 , 0 , 32, | |
18751 | 0xfc00f1e0, 0x8000c0a0, 0 , 0, | |
18752 | 0x0 }, /* P.SHIFT~*(5) */ | |
18753 | { instruction , 0 , 0 , 32, | |
8d416f6b | 18754 | 0xfc00f1e0, 0x8000c0c0, &ROTR , 0, |
89a955e8 AM |
18755 | 0x0 }, /* ROTR */ |
18756 | { reserved_block , 0 , 0 , 32, | |
18757 | 0xfc00f1e0, 0x8000c0e0, 0 , 0, | |
18758 | 0x0 }, /* P.SHIFT~*(7) */ | |
18759 | { instruction , 0 , 0 , 32, | |
8d416f6b | 18760 | 0xfc00f1e0, 0x8000c100, &DSLL , 0, |
89a955e8 AM |
18761 | MIPS64_ }, /* DSLL */ |
18762 | { instruction , 0 , 0 , 32, | |
8d416f6b | 18763 | 0xfc00f1e0, 0x8000c120, &DSLL32 , 0, |
89a955e8 AM |
18764 | MIPS64_ }, /* DSLL32 */ |
18765 | { instruction , 0 , 0 , 32, | |
8d416f6b | 18766 | 0xfc00f1e0, 0x8000c140, &DSRL , 0, |
89a955e8 AM |
18767 | MIPS64_ }, /* DSRL */ |
18768 | { instruction , 0 , 0 , 32, | |
8d416f6b | 18769 | 0xfc00f1e0, 0x8000c160, &DSRL32 , 0, |
89a955e8 AM |
18770 | MIPS64_ }, /* DSRL32 */ |
18771 | { instruction , 0 , 0 , 32, | |
8d416f6b | 18772 | 0xfc00f1e0, 0x8000c180, &DSRA , 0, |
89a955e8 AM |
18773 | MIPS64_ }, /* DSRA */ |
18774 | { instruction , 0 , 0 , 32, | |
8d416f6b | 18775 | 0xfc00f1e0, 0x8000c1a0, &DSRA32 , 0, |
89a955e8 AM |
18776 | MIPS64_ }, /* DSRA32 */ |
18777 | { instruction , 0 , 0 , 32, | |
8d416f6b | 18778 | 0xfc00f1e0, 0x8000c1c0, &DROTR , 0, |
89a955e8 AM |
18779 | MIPS64_ }, /* DROTR */ |
18780 | { instruction , 0 , 0 , 32, | |
8d416f6b | 18781 | 0xfc00f1e0, 0x8000c1e0, &DROTR32 , 0, |
89a955e8 AM |
18782 | MIPS64_ }, /* DROTR32 */ |
18783 | }; | |
18784 | ||
18785 | ||
a1465490 | 18786 | static const Pool P_ROTX[4] = { |
89a955e8 | 18787 | { instruction , 0 , 0 , 32, |
8d416f6b | 18788 | 0xfc00f820, 0x8000d000, &ROTX , 0, |
89a955e8 AM |
18789 | XMMS_ }, /* ROTX */ |
18790 | { reserved_block , 0 , 0 , 32, | |
18791 | 0xfc00f820, 0x8000d020, 0 , 0, | |
18792 | 0x0 }, /* P.ROTX~*(1) */ | |
18793 | { reserved_block , 0 , 0 , 32, | |
18794 | 0xfc00f820, 0x8000d800, 0 , 0, | |
18795 | 0x0 }, /* P.ROTX~*(2) */ | |
18796 | { reserved_block , 0 , 0 , 32, | |
18797 | 0xfc00f820, 0x8000d820, 0 , 0, | |
18798 | 0x0 }, /* P.ROTX~*(3) */ | |
18799 | }; | |
18800 | ||
18801 | ||
a1465490 | 18802 | static const Pool P_INS[4] = { |
89a955e8 | 18803 | { instruction , 0 , 0 , 32, |
8d416f6b | 18804 | 0xfc00f820, 0x8000e000, &INS , 0, |
89a955e8 AM |
18805 | XMMS_ }, /* INS */ |
18806 | { instruction , 0 , 0 , 32, | |
8d416f6b | 18807 | 0xfc00f820, 0x8000e020, &DINSU , 0, |
89a955e8 AM |
18808 | MIPS64_ }, /* DINSU */ |
18809 | { instruction , 0 , 0 , 32, | |
8d416f6b | 18810 | 0xfc00f820, 0x8000e800, &DINSM , 0, |
89a955e8 AM |
18811 | MIPS64_ }, /* DINSM */ |
18812 | { instruction , 0 , 0 , 32, | |
8d416f6b | 18813 | 0xfc00f820, 0x8000e820, &DINS , 0, |
89a955e8 AM |
18814 | MIPS64_ }, /* DINS */ |
18815 | }; | |
18816 | ||
18817 | ||
a1465490 | 18818 | static const Pool P_EXT[4] = { |
89a955e8 | 18819 | { instruction , 0 , 0 , 32, |
8d416f6b | 18820 | 0xfc00f820, 0x8000f000, &EXT , 0, |
89a955e8 AM |
18821 | XMMS_ }, /* EXT */ |
18822 | { instruction , 0 , 0 , 32, | |
8d416f6b | 18823 | 0xfc00f820, 0x8000f020, &DEXTU , 0, |
89a955e8 AM |
18824 | MIPS64_ }, /* DEXTU */ |
18825 | { instruction , 0 , 0 , 32, | |
8d416f6b | 18826 | 0xfc00f820, 0x8000f800, &DEXTM , 0, |
89a955e8 AM |
18827 | MIPS64_ }, /* DEXTM */ |
18828 | { instruction , 0 , 0 , 32, | |
8d416f6b | 18829 | 0xfc00f820, 0x8000f820, &DEXT , 0, |
89a955e8 AM |
18830 | MIPS64_ }, /* DEXT */ |
18831 | }; | |
18832 | ||
18833 | ||
a1465490 | 18834 | static const Pool P_U12[16] = { |
89a955e8 | 18835 | { instruction , 0 , 0 , 32, |
8d416f6b | 18836 | 0xfc00f000, 0x80000000, &ORI , 0, |
89a955e8 AM |
18837 | 0x0 }, /* ORI */ |
18838 | { instruction , 0 , 0 , 32, | |
8d416f6b | 18839 | 0xfc00f000, 0x80001000, &XORI , 0, |
89a955e8 AM |
18840 | 0x0 }, /* XORI */ |
18841 | { instruction , 0 , 0 , 32, | |
8d416f6b | 18842 | 0xfc00f000, 0x80002000, &ANDI_32_ , 0, |
89a955e8 AM |
18843 | 0x0 }, /* ANDI[32] */ |
18844 | { pool , P_SR , 2 , 32, | |
18845 | 0xfc00f000, 0x80003000, 0 , 0, | |
18846 | 0x0 }, /* P.SR */ | |
18847 | { instruction , 0 , 0 , 32, | |
8d416f6b | 18848 | 0xfc00f000, 0x80004000, &SLTI , 0, |
89a955e8 AM |
18849 | 0x0 }, /* SLTI */ |
18850 | { instruction , 0 , 0 , 32, | |
8d416f6b | 18851 | 0xfc00f000, 0x80005000, &SLTIU , 0, |
89a955e8 AM |
18852 | 0x0 }, /* SLTIU */ |
18853 | { instruction , 0 , 0 , 32, | |
8d416f6b | 18854 | 0xfc00f000, 0x80006000, &SEQI , 0, |
89a955e8 AM |
18855 | 0x0 }, /* SEQI */ |
18856 | { reserved_block , 0 , 0 , 32, | |
18857 | 0xfc00f000, 0x80007000, 0 , 0, | |
18858 | 0x0 }, /* P.U12~*(7) */ | |
18859 | { instruction , 0 , 0 , 32, | |
8d416f6b | 18860 | 0xfc00f000, 0x80008000, &ADDIU_NEG_ , 0, |
89a955e8 AM |
18861 | 0x0 }, /* ADDIU[NEG] */ |
18862 | { instruction , 0 , 0 , 32, | |
8d416f6b | 18863 | 0xfc00f000, 0x80009000, &DADDIU_U12_ , 0, |
89a955e8 AM |
18864 | MIPS64_ }, /* DADDIU[U12] */ |
18865 | { instruction , 0 , 0 , 32, | |
8d416f6b | 18866 | 0xfc00f000, 0x8000a000, &DADDIU_NEG_ , 0, |
89a955e8 AM |
18867 | MIPS64_ }, /* DADDIU[NEG] */ |
18868 | { instruction , 0 , 0 , 32, | |
8d416f6b | 18869 | 0xfc00f000, 0x8000b000, &DROTX , 0, |
89a955e8 AM |
18870 | MIPS64_ }, /* DROTX */ |
18871 | { pool , P_SHIFT , 16 , 32, | |
18872 | 0xfc00f000, 0x8000c000, 0 , 0, | |
18873 | 0x0 }, /* P.SHIFT */ | |
18874 | { pool , P_ROTX , 4 , 32, | |
18875 | 0xfc00f000, 0x8000d000, 0 , 0, | |
18876 | 0x0 }, /* P.ROTX */ | |
18877 | { pool , P_INS , 4 , 32, | |
18878 | 0xfc00f000, 0x8000e000, 0 , 0, | |
18879 | 0x0 }, /* P.INS */ | |
18880 | { pool , P_EXT , 4 , 32, | |
18881 | 0xfc00f000, 0x8000f000, 0 , 0, | |
18882 | 0x0 }, /* P.EXT */ | |
18883 | }; | |
18884 | ||
18885 | ||
a1465490 | 18886 | static const Pool RINT_fmt[2] = { |
89a955e8 | 18887 | { instruction , 0 , 0 , 32, |
8d416f6b | 18888 | 0xfc0003ff, 0xa0000020, &RINT_S , 0, |
89a955e8 AM |
18889 | CP1_ }, /* RINT.S */ |
18890 | { instruction , 0 , 0 , 32, | |
8d416f6b | 18891 | 0xfc0003ff, 0xa0000220, &RINT_D , 0, |
89a955e8 AM |
18892 | CP1_ }, /* RINT.D */ |
18893 | }; | |
18894 | ||
18895 | ||
a1465490 | 18896 | static const Pool ADD_fmt0[2] = { |
89a955e8 | 18897 | { instruction , 0 , 0 , 32, |
8d416f6b | 18898 | 0xfc0003ff, 0xa0000030, &ADD_S , 0, |
89a955e8 AM |
18899 | CP1_ }, /* ADD.S */ |
18900 | { reserved_block , 0 , 0 , 32, | |
18901 | 0xfc0003ff, 0xa0000230, 0 , 0, | |
18902 | CP1_ }, /* ADD.fmt0~*(1) */ | |
18903 | }; | |
18904 | ||
18905 | ||
a1465490 | 18906 | static const Pool SELEQZ_fmt[2] = { |
89a955e8 | 18907 | { instruction , 0 , 0 , 32, |
8d416f6b | 18908 | 0xfc0003ff, 0xa0000038, &SELEQZ_S , 0, |
89a955e8 AM |
18909 | CP1_ }, /* SELEQZ.S */ |
18910 | { instruction , 0 , 0 , 32, | |
8d416f6b | 18911 | 0xfc0003ff, 0xa0000238, &SELEQZ_D , 0, |
89a955e8 AM |
18912 | CP1_ }, /* SELEQZ.D */ |
18913 | }; | |
18914 | ||
18915 | ||
a1465490 | 18916 | static const Pool CLASS_fmt[2] = { |
89a955e8 | 18917 | { instruction , 0 , 0 , 32, |
8d416f6b | 18918 | 0xfc0003ff, 0xa0000060, &CLASS_S , 0, |
89a955e8 AM |
18919 | CP1_ }, /* CLASS.S */ |
18920 | { instruction , 0 , 0 , 32, | |
8d416f6b | 18921 | 0xfc0003ff, 0xa0000260, &CLASS_D , 0, |
89a955e8 AM |
18922 | CP1_ }, /* CLASS.D */ |
18923 | }; | |
18924 | ||
18925 | ||
a1465490 | 18926 | static const Pool SUB_fmt0[2] = { |
89a955e8 | 18927 | { instruction , 0 , 0 , 32, |
8d416f6b | 18928 | 0xfc0003ff, 0xa0000070, &SUB_S , 0, |
89a955e8 AM |
18929 | CP1_ }, /* SUB.S */ |
18930 | { reserved_block , 0 , 0 , 32, | |
18931 | 0xfc0003ff, 0xa0000270, 0 , 0, | |
18932 | CP1_ }, /* SUB.fmt0~*(1) */ | |
18933 | }; | |
18934 | ||
18935 | ||
a1465490 | 18936 | static const Pool SELNEZ_fmt[2] = { |
89a955e8 | 18937 | { instruction , 0 , 0 , 32, |
8d416f6b | 18938 | 0xfc0003ff, 0xa0000078, &SELNEZ_S , 0, |
89a955e8 AM |
18939 | CP1_ }, /* SELNEZ.S */ |
18940 | { instruction , 0 , 0 , 32, | |
8d416f6b | 18941 | 0xfc0003ff, 0xa0000278, &SELNEZ_D , 0, |
89a955e8 AM |
18942 | CP1_ }, /* SELNEZ.D */ |
18943 | }; | |
18944 | ||
18945 | ||
a1465490 | 18946 | static const Pool MUL_fmt0[2] = { |
89a955e8 | 18947 | { instruction , 0 , 0 , 32, |
8d416f6b | 18948 | 0xfc0003ff, 0xa00000b0, &MUL_S , 0, |
89a955e8 AM |
18949 | CP1_ }, /* MUL.S */ |
18950 | { reserved_block , 0 , 0 , 32, | |
18951 | 0xfc0003ff, 0xa00002b0, 0 , 0, | |
18952 | CP1_ }, /* MUL.fmt0~*(1) */ | |
18953 | }; | |
18954 | ||
18955 | ||
a1465490 | 18956 | static const Pool SEL_fmt[2] = { |
89a955e8 | 18957 | { instruction , 0 , 0 , 32, |
8d416f6b | 18958 | 0xfc0003ff, 0xa00000b8, &SEL_S , 0, |
89a955e8 AM |
18959 | CP1_ }, /* SEL.S */ |
18960 | { instruction , 0 , 0 , 32, | |
8d416f6b | 18961 | 0xfc0003ff, 0xa00002b8, &SEL_D , 0, |
89a955e8 AM |
18962 | CP1_ }, /* SEL.D */ |
18963 | }; | |
18964 | ||
18965 | ||
a1465490 | 18966 | static const Pool DIV_fmt0[2] = { |
89a955e8 | 18967 | { instruction , 0 , 0 , 32, |
8d416f6b | 18968 | 0xfc0003ff, 0xa00000f0, &DIV_S , 0, |
89a955e8 AM |
18969 | CP1_ }, /* DIV.S */ |
18970 | { reserved_block , 0 , 0 , 32, | |
18971 | 0xfc0003ff, 0xa00002f0, 0 , 0, | |
18972 | CP1_ }, /* DIV.fmt0~*(1) */ | |
18973 | }; | |
18974 | ||
18975 | ||
a1465490 | 18976 | static const Pool ADD_fmt1[2] = { |
89a955e8 | 18977 | { instruction , 0 , 0 , 32, |
8d416f6b | 18978 | 0xfc0003ff, 0xa0000130, &ADD_D , 0, |
89a955e8 AM |
18979 | CP1_ }, /* ADD.D */ |
18980 | { reserved_block , 0 , 0 , 32, | |
18981 | 0xfc0003ff, 0xa0000330, 0 , 0, | |
18982 | CP1_ }, /* ADD.fmt1~*(1) */ | |
18983 | }; | |
18984 | ||
18985 | ||
a1465490 | 18986 | static const Pool SUB_fmt1[2] = { |
89a955e8 | 18987 | { instruction , 0 , 0 , 32, |
8d416f6b | 18988 | 0xfc0003ff, 0xa0000170, &SUB_D , 0, |
89a955e8 AM |
18989 | CP1_ }, /* SUB.D */ |
18990 | { reserved_block , 0 , 0 , 32, | |
18991 | 0xfc0003ff, 0xa0000370, 0 , 0, | |
18992 | CP1_ }, /* SUB.fmt1~*(1) */ | |
18993 | }; | |
18994 | ||
18995 | ||
a1465490 | 18996 | static const Pool MUL_fmt1[2] = { |
89a955e8 | 18997 | { instruction , 0 , 0 , 32, |
8d416f6b | 18998 | 0xfc0003ff, 0xa00001b0, &MUL_D , 0, |
89a955e8 AM |
18999 | CP1_ }, /* MUL.D */ |
19000 | { reserved_block , 0 , 0 , 32, | |
19001 | 0xfc0003ff, 0xa00003b0, 0 , 0, | |
19002 | CP1_ }, /* MUL.fmt1~*(1) */ | |
19003 | }; | |
19004 | ||
19005 | ||
a1465490 | 19006 | static const Pool MADDF_fmt[2] = { |
89a955e8 | 19007 | { instruction , 0 , 0 , 32, |
8d416f6b | 19008 | 0xfc0003ff, 0xa00001b8, &MADDF_S , 0, |
89a955e8 AM |
19009 | CP1_ }, /* MADDF.S */ |
19010 | { instruction , 0 , 0 , 32, | |
8d416f6b | 19011 | 0xfc0003ff, 0xa00003b8, &MADDF_D , 0, |
89a955e8 AM |
19012 | CP1_ }, /* MADDF.D */ |
19013 | }; | |
19014 | ||
19015 | ||
a1465490 | 19016 | static const Pool DIV_fmt1[2] = { |
89a955e8 | 19017 | { instruction , 0 , 0 , 32, |
8d416f6b | 19018 | 0xfc0003ff, 0xa00001f0, &DIV_D , 0, |
89a955e8 AM |
19019 | CP1_ }, /* DIV.D */ |
19020 | { reserved_block , 0 , 0 , 32, | |
19021 | 0xfc0003ff, 0xa00003f0, 0 , 0, | |
19022 | CP1_ }, /* DIV.fmt1~*(1) */ | |
19023 | }; | |
19024 | ||
19025 | ||
a1465490 | 19026 | static const Pool MSUBF_fmt[2] = { |
89a955e8 | 19027 | { instruction , 0 , 0 , 32, |
8d416f6b | 19028 | 0xfc0003ff, 0xa00001f8, &MSUBF_S , 0, |
89a955e8 AM |
19029 | CP1_ }, /* MSUBF.S */ |
19030 | { instruction , 0 , 0 , 32, | |
8d416f6b | 19031 | 0xfc0003ff, 0xa00003f8, &MSUBF_D , 0, |
89a955e8 AM |
19032 | CP1_ }, /* MSUBF.D */ |
19033 | }; | |
19034 | ||
19035 | ||
a1465490 | 19036 | static const Pool POOL32F_0[64] = { |
89a955e8 AM |
19037 | { reserved_block , 0 , 0 , 32, |
19038 | 0xfc0001ff, 0xa0000000, 0 , 0, | |
19039 | CP1_ }, /* POOL32F_0~*(0) */ | |
19040 | { reserved_block , 0 , 0 , 32, | |
19041 | 0xfc0001ff, 0xa0000008, 0 , 0, | |
19042 | CP1_ }, /* POOL32F_0~*(1) */ | |
19043 | { reserved_block , 0 , 0 , 32, | |
19044 | 0xfc0001ff, 0xa0000010, 0 , 0, | |
19045 | CP1_ }, /* POOL32F_0~*(2) */ | |
19046 | { reserved_block , 0 , 0 , 32, | |
19047 | 0xfc0001ff, 0xa0000018, 0 , 0, | |
19048 | CP1_ }, /* POOL32F_0~*(3) */ | |
19049 | { pool , RINT_fmt , 2 , 32, | |
19050 | 0xfc0001ff, 0xa0000020, 0 , 0, | |
19051 | CP1_ }, /* RINT.fmt */ | |
19052 | { reserved_block , 0 , 0 , 32, | |
19053 | 0xfc0001ff, 0xa0000028, 0 , 0, | |
19054 | CP1_ }, /* POOL32F_0~*(5) */ | |
19055 | { pool , ADD_fmt0 , 2 , 32, | |
19056 | 0xfc0001ff, 0xa0000030, 0 , 0, | |
19057 | CP1_ }, /* ADD.fmt0 */ | |
19058 | { pool , SELEQZ_fmt , 2 , 32, | |
19059 | 0xfc0001ff, 0xa0000038, 0 , 0, | |
19060 | CP1_ }, /* SELEQZ.fmt */ | |
19061 | { reserved_block , 0 , 0 , 32, | |
19062 | 0xfc0001ff, 0xa0000040, 0 , 0, | |
19063 | CP1_ }, /* POOL32F_0~*(8) */ | |
19064 | { reserved_block , 0 , 0 , 32, | |
19065 | 0xfc0001ff, 0xa0000048, 0 , 0, | |
19066 | CP1_ }, /* POOL32F_0~*(9) */ | |
19067 | { reserved_block , 0 , 0 , 32, | |
19068 | 0xfc0001ff, 0xa0000050, 0 , 0, | |
19069 | CP1_ }, /* POOL32F_0~*(10) */ | |
19070 | { reserved_block , 0 , 0 , 32, | |
19071 | 0xfc0001ff, 0xa0000058, 0 , 0, | |
19072 | CP1_ }, /* POOL32F_0~*(11) */ | |
19073 | { pool , CLASS_fmt , 2 , 32, | |
19074 | 0xfc0001ff, 0xa0000060, 0 , 0, | |
19075 | CP1_ }, /* CLASS.fmt */ | |
19076 | { reserved_block , 0 , 0 , 32, | |
19077 | 0xfc0001ff, 0xa0000068, 0 , 0, | |
19078 | CP1_ }, /* POOL32F_0~*(13) */ | |
19079 | { pool , SUB_fmt0 , 2 , 32, | |
19080 | 0xfc0001ff, 0xa0000070, 0 , 0, | |
19081 | CP1_ }, /* SUB.fmt0 */ | |
19082 | { pool , SELNEZ_fmt , 2 , 32, | |
19083 | 0xfc0001ff, 0xa0000078, 0 , 0, | |
19084 | CP1_ }, /* SELNEZ.fmt */ | |
19085 | { reserved_block , 0 , 0 , 32, | |
19086 | 0xfc0001ff, 0xa0000080, 0 , 0, | |
19087 | CP1_ }, /* POOL32F_0~*(16) */ | |
19088 | { reserved_block , 0 , 0 , 32, | |
19089 | 0xfc0001ff, 0xa0000088, 0 , 0, | |
19090 | CP1_ }, /* POOL32F_0~*(17) */ | |
19091 | { reserved_block , 0 , 0 , 32, | |
19092 | 0xfc0001ff, 0xa0000090, 0 , 0, | |
19093 | CP1_ }, /* POOL32F_0~*(18) */ | |
19094 | { reserved_block , 0 , 0 , 32, | |
19095 | 0xfc0001ff, 0xa0000098, 0 , 0, | |
19096 | CP1_ }, /* POOL32F_0~*(19) */ | |
19097 | { reserved_block , 0 , 0 , 32, | |
19098 | 0xfc0001ff, 0xa00000a0, 0 , 0, | |
19099 | CP1_ }, /* POOL32F_0~*(20) */ | |
19100 | { reserved_block , 0 , 0 , 32, | |
19101 | 0xfc0001ff, 0xa00000a8, 0 , 0, | |
19102 | CP1_ }, /* POOL32F_0~*(21) */ | |
19103 | { pool , MUL_fmt0 , 2 , 32, | |
19104 | 0xfc0001ff, 0xa00000b0, 0 , 0, | |
19105 | CP1_ }, /* MUL.fmt0 */ | |
19106 | { pool , SEL_fmt , 2 , 32, | |
19107 | 0xfc0001ff, 0xa00000b8, 0 , 0, | |
19108 | CP1_ }, /* SEL.fmt */ | |
19109 | { reserved_block , 0 , 0 , 32, | |
19110 | 0xfc0001ff, 0xa00000c0, 0 , 0, | |
19111 | CP1_ }, /* POOL32F_0~*(24) */ | |
19112 | { reserved_block , 0 , 0 , 32, | |
19113 | 0xfc0001ff, 0xa00000c8, 0 , 0, | |
19114 | CP1_ }, /* POOL32F_0~*(25) */ | |
19115 | { reserved_block , 0 , 0 , 32, | |
19116 | 0xfc0001ff, 0xa00000d0, 0 , 0, | |
19117 | CP1_ }, /* POOL32F_0~*(26) */ | |
19118 | { reserved_block , 0 , 0 , 32, | |
19119 | 0xfc0001ff, 0xa00000d8, 0 , 0, | |
19120 | CP1_ }, /* POOL32F_0~*(27) */ | |
19121 | { reserved_block , 0 , 0 , 32, | |
19122 | 0xfc0001ff, 0xa00000e0, 0 , 0, | |
19123 | CP1_ }, /* POOL32F_0~*(28) */ | |
19124 | { reserved_block , 0 , 0 , 32, | |
19125 | 0xfc0001ff, 0xa00000e8, 0 , 0, | |
19126 | CP1_ }, /* POOL32F_0~*(29) */ | |
19127 | { pool , DIV_fmt0 , 2 , 32, | |
19128 | 0xfc0001ff, 0xa00000f0, 0 , 0, | |
19129 | CP1_ }, /* DIV.fmt0 */ | |
19130 | { reserved_block , 0 , 0 , 32, | |
19131 | 0xfc0001ff, 0xa00000f8, 0 , 0, | |
19132 | CP1_ }, /* POOL32F_0~*(31) */ | |
19133 | { reserved_block , 0 , 0 , 32, | |
19134 | 0xfc0001ff, 0xa0000100, 0 , 0, | |
19135 | CP1_ }, /* POOL32F_0~*(32) */ | |
19136 | { reserved_block , 0 , 0 , 32, | |
19137 | 0xfc0001ff, 0xa0000108, 0 , 0, | |
19138 | CP1_ }, /* POOL32F_0~*(33) */ | |
19139 | { reserved_block , 0 , 0 , 32, | |
19140 | 0xfc0001ff, 0xa0000110, 0 , 0, | |
19141 | CP1_ }, /* POOL32F_0~*(34) */ | |
19142 | { reserved_block , 0 , 0 , 32, | |
19143 | 0xfc0001ff, 0xa0000118, 0 , 0, | |
19144 | CP1_ }, /* POOL32F_0~*(35) */ | |
19145 | { reserved_block , 0 , 0 , 32, | |
19146 | 0xfc0001ff, 0xa0000120, 0 , 0, | |
19147 | CP1_ }, /* POOL32F_0~*(36) */ | |
19148 | { reserved_block , 0 , 0 , 32, | |
19149 | 0xfc0001ff, 0xa0000128, 0 , 0, | |
19150 | CP1_ }, /* POOL32F_0~*(37) */ | |
19151 | { pool , ADD_fmt1 , 2 , 32, | |
19152 | 0xfc0001ff, 0xa0000130, 0 , 0, | |
19153 | CP1_ }, /* ADD.fmt1 */ | |
19154 | { reserved_block , 0 , 0 , 32, | |
19155 | 0xfc0001ff, 0xa0000138, 0 , 0, | |
19156 | CP1_ }, /* POOL32F_0~*(39) */ | |
19157 | { reserved_block , 0 , 0 , 32, | |
19158 | 0xfc0001ff, 0xa0000140, 0 , 0, | |
19159 | CP1_ }, /* POOL32F_0~*(40) */ | |
19160 | { reserved_block , 0 , 0 , 32, | |
19161 | 0xfc0001ff, 0xa0000148, 0 , 0, | |
19162 | CP1_ }, /* POOL32F_0~*(41) */ | |
19163 | { reserved_block , 0 , 0 , 32, | |
19164 | 0xfc0001ff, 0xa0000150, 0 , 0, | |
19165 | CP1_ }, /* POOL32F_0~*(42) */ | |
19166 | { reserved_block , 0 , 0 , 32, | |
19167 | 0xfc0001ff, 0xa0000158, 0 , 0, | |
19168 | CP1_ }, /* POOL32F_0~*(43) */ | |
19169 | { reserved_block , 0 , 0 , 32, | |
19170 | 0xfc0001ff, 0xa0000160, 0 , 0, | |
19171 | CP1_ }, /* POOL32F_0~*(44) */ | |
19172 | { reserved_block , 0 , 0 , 32, | |
19173 | 0xfc0001ff, 0xa0000168, 0 , 0, | |
19174 | CP1_ }, /* POOL32F_0~*(45) */ | |
19175 | { pool , SUB_fmt1 , 2 , 32, | |
19176 | 0xfc0001ff, 0xa0000170, 0 , 0, | |
19177 | CP1_ }, /* SUB.fmt1 */ | |
19178 | { reserved_block , 0 , 0 , 32, | |
19179 | 0xfc0001ff, 0xa0000178, 0 , 0, | |
19180 | CP1_ }, /* POOL32F_0~*(47) */ | |
19181 | { reserved_block , 0 , 0 , 32, | |
19182 | 0xfc0001ff, 0xa0000180, 0 , 0, | |
19183 | CP1_ }, /* POOL32F_0~*(48) */ | |
19184 | { reserved_block , 0 , 0 , 32, | |
19185 | 0xfc0001ff, 0xa0000188, 0 , 0, | |
19186 | CP1_ }, /* POOL32F_0~*(49) */ | |
19187 | { reserved_block , 0 , 0 , 32, | |
19188 | 0xfc0001ff, 0xa0000190, 0 , 0, | |
19189 | CP1_ }, /* POOL32F_0~*(50) */ | |
19190 | { reserved_block , 0 , 0 , 32, | |
19191 | 0xfc0001ff, 0xa0000198, 0 , 0, | |
19192 | CP1_ }, /* POOL32F_0~*(51) */ | |
19193 | { reserved_block , 0 , 0 , 32, | |
19194 | 0xfc0001ff, 0xa00001a0, 0 , 0, | |
19195 | CP1_ }, /* POOL32F_0~*(52) */ | |
19196 | { reserved_block , 0 , 0 , 32, | |
19197 | 0xfc0001ff, 0xa00001a8, 0 , 0, | |
19198 | CP1_ }, /* POOL32F_0~*(53) */ | |
19199 | { pool , MUL_fmt1 , 2 , 32, | |
19200 | 0xfc0001ff, 0xa00001b0, 0 , 0, | |
19201 | CP1_ }, /* MUL.fmt1 */ | |
19202 | { pool , MADDF_fmt , 2 , 32, | |
19203 | 0xfc0001ff, 0xa00001b8, 0 , 0, | |
19204 | CP1_ }, /* MADDF.fmt */ | |
19205 | { reserved_block , 0 , 0 , 32, | |
19206 | 0xfc0001ff, 0xa00001c0, 0 , 0, | |
19207 | CP1_ }, /* POOL32F_0~*(56) */ | |
19208 | { reserved_block , 0 , 0 , 32, | |
19209 | 0xfc0001ff, 0xa00001c8, 0 , 0, | |
19210 | CP1_ }, /* POOL32F_0~*(57) */ | |
19211 | { reserved_block , 0 , 0 , 32, | |
19212 | 0xfc0001ff, 0xa00001d0, 0 , 0, | |
19213 | CP1_ }, /* POOL32F_0~*(58) */ | |
19214 | { reserved_block , 0 , 0 , 32, | |
19215 | 0xfc0001ff, 0xa00001d8, 0 , 0, | |
19216 | CP1_ }, /* POOL32F_0~*(59) */ | |
19217 | { reserved_block , 0 , 0 , 32, | |
19218 | 0xfc0001ff, 0xa00001e0, 0 , 0, | |
19219 | CP1_ }, /* POOL32F_0~*(60) */ | |
19220 | { reserved_block , 0 , 0 , 32, | |
19221 | 0xfc0001ff, 0xa00001e8, 0 , 0, | |
19222 | CP1_ }, /* POOL32F_0~*(61) */ | |
19223 | { pool , DIV_fmt1 , 2 , 32, | |
19224 | 0xfc0001ff, 0xa00001f0, 0 , 0, | |
19225 | CP1_ }, /* DIV.fmt1 */ | |
19226 | { pool , MSUBF_fmt , 2 , 32, | |
19227 | 0xfc0001ff, 0xa00001f8, 0 , 0, | |
19228 | CP1_ }, /* MSUBF.fmt */ | |
19229 | }; | |
19230 | ||
19231 | ||
a1465490 | 19232 | static const Pool MIN_fmt[2] = { |
89a955e8 | 19233 | { instruction , 0 , 0 , 32, |
8d416f6b | 19234 | 0xfc00023f, 0xa0000003, &MIN_S , 0, |
89a955e8 AM |
19235 | CP1_ }, /* MIN.S */ |
19236 | { instruction , 0 , 0 , 32, | |
8d416f6b | 19237 | 0xfc00023f, 0xa0000203, &MIN_D , 0, |
89a955e8 AM |
19238 | CP1_ }, /* MIN.D */ |
19239 | }; | |
19240 | ||
19241 | ||
a1465490 | 19242 | static const Pool MAX_fmt[2] = { |
89a955e8 | 19243 | { instruction , 0 , 0 , 32, |
8d416f6b | 19244 | 0xfc00023f, 0xa000000b, &MAX_S , 0, |
89a955e8 AM |
19245 | CP1_ }, /* MAX.S */ |
19246 | { instruction , 0 , 0 , 32, | |
8d416f6b | 19247 | 0xfc00023f, 0xa000020b, &MAX_D , 0, |
89a955e8 AM |
19248 | CP1_ }, /* MAX.D */ |
19249 | }; | |
19250 | ||
19251 | ||
a1465490 | 19252 | static const Pool MINA_fmt[2] = { |
89a955e8 | 19253 | { instruction , 0 , 0 , 32, |
8d416f6b | 19254 | 0xfc00023f, 0xa0000023, &MINA_S , 0, |
89a955e8 AM |
19255 | CP1_ }, /* MINA.S */ |
19256 | { instruction , 0 , 0 , 32, | |
8d416f6b | 19257 | 0xfc00023f, 0xa0000223, &MINA_D , 0, |
89a955e8 AM |
19258 | CP1_ }, /* MINA.D */ |
19259 | }; | |
19260 | ||
19261 | ||
a1465490 | 19262 | static const Pool MAXA_fmt[2] = { |
89a955e8 | 19263 | { instruction , 0 , 0 , 32, |
8d416f6b | 19264 | 0xfc00023f, 0xa000002b, &MAXA_S , 0, |
89a955e8 AM |
19265 | CP1_ }, /* MAXA.S */ |
19266 | { instruction , 0 , 0 , 32, | |
8d416f6b | 19267 | 0xfc00023f, 0xa000022b, &MAXA_D , 0, |
89a955e8 AM |
19268 | CP1_ }, /* MAXA.D */ |
19269 | }; | |
19270 | ||
19271 | ||
a1465490 | 19272 | static const Pool CVT_L_fmt[2] = { |
89a955e8 | 19273 | { instruction , 0 , 0 , 32, |
8d416f6b | 19274 | 0xfc007fff, 0xa000013b, &CVT_L_S , 0, |
89a955e8 AM |
19275 | CP1_ }, /* CVT.L.S */ |
19276 | { instruction , 0 , 0 , 32, | |
8d416f6b | 19277 | 0xfc007fff, 0xa000413b, &CVT_L_D , 0, |
89a955e8 AM |
19278 | CP1_ }, /* CVT.L.D */ |
19279 | }; | |
19280 | ||
19281 | ||
a1465490 | 19282 | static const Pool RSQRT_fmt[2] = { |
89a955e8 | 19283 | { instruction , 0 , 0 , 32, |
8d416f6b | 19284 | 0xfc007fff, 0xa000023b, &RSQRT_S , 0, |
89a955e8 AM |
19285 | CP1_ }, /* RSQRT.S */ |
19286 | { instruction , 0 , 0 , 32, | |
8d416f6b | 19287 | 0xfc007fff, 0xa000423b, &RSQRT_D , 0, |
89a955e8 AM |
19288 | CP1_ }, /* RSQRT.D */ |
19289 | }; | |
19290 | ||
19291 | ||
a1465490 | 19292 | static const Pool FLOOR_L_fmt[2] = { |
89a955e8 | 19293 | { instruction , 0 , 0 , 32, |
8d416f6b | 19294 | 0xfc007fff, 0xa000033b, &FLOOR_L_S , 0, |
89a955e8 AM |
19295 | CP1_ }, /* FLOOR.L.S */ |
19296 | { instruction , 0 , 0 , 32, | |
8d416f6b | 19297 | 0xfc007fff, 0xa000433b, &FLOOR_L_D , 0, |
89a955e8 AM |
19298 | CP1_ }, /* FLOOR.L.D */ |
19299 | }; | |
19300 | ||
19301 | ||
a1465490 | 19302 | static const Pool CVT_W_fmt[2] = { |
89a955e8 | 19303 | { instruction , 0 , 0 , 32, |
8d416f6b | 19304 | 0xfc007fff, 0xa000093b, &CVT_W_S , 0, |
89a955e8 AM |
19305 | CP1_ }, /* CVT.W.S */ |
19306 | { instruction , 0 , 0 , 32, | |
8d416f6b | 19307 | 0xfc007fff, 0xa000493b, &CVT_W_D , 0, |
89a955e8 AM |
19308 | CP1_ }, /* CVT.W.D */ |
19309 | }; | |
19310 | ||
19311 | ||
a1465490 | 19312 | static const Pool SQRT_fmt[2] = { |
89a955e8 | 19313 | { instruction , 0 , 0 , 32, |
8d416f6b | 19314 | 0xfc007fff, 0xa0000a3b, &SQRT_S , 0, |
89a955e8 AM |
19315 | CP1_ }, /* SQRT.S */ |
19316 | { instruction , 0 , 0 , 32, | |
8d416f6b | 19317 | 0xfc007fff, 0xa0004a3b, &SQRT_D , 0, |
89a955e8 AM |
19318 | CP1_ }, /* SQRT.D */ |
19319 | }; | |
19320 | ||
19321 | ||
a1465490 | 19322 | static const Pool FLOOR_W_fmt[2] = { |
89a955e8 | 19323 | { instruction , 0 , 0 , 32, |
8d416f6b | 19324 | 0xfc007fff, 0xa0000b3b, &FLOOR_W_S , 0, |
89a955e8 AM |
19325 | CP1_ }, /* FLOOR.W.S */ |
19326 | { instruction , 0 , 0 , 32, | |
8d416f6b | 19327 | 0xfc007fff, 0xa0004b3b, &FLOOR_W_D , 0, |
89a955e8 AM |
19328 | CP1_ }, /* FLOOR.W.D */ |
19329 | }; | |
19330 | ||
19331 | ||
a1465490 | 19332 | static const Pool RECIP_fmt[2] = { |
89a955e8 | 19333 | { instruction , 0 , 0 , 32, |
8d416f6b | 19334 | 0xfc007fff, 0xa000123b, &RECIP_S , 0, |
89a955e8 AM |
19335 | CP1_ }, /* RECIP.S */ |
19336 | { instruction , 0 , 0 , 32, | |
8d416f6b | 19337 | 0xfc007fff, 0xa000523b, &RECIP_D , 0, |
89a955e8 AM |
19338 | CP1_ }, /* RECIP.D */ |
19339 | }; | |
19340 | ||
19341 | ||
a1465490 | 19342 | static const Pool CEIL_L_fmt[2] = { |
89a955e8 | 19343 | { instruction , 0 , 0 , 32, |
8d416f6b | 19344 | 0xfc007fff, 0xa000133b, &CEIL_L_S , 0, |
89a955e8 AM |
19345 | CP1_ }, /* CEIL.L.S */ |
19346 | { instruction , 0 , 0 , 32, | |
8d416f6b | 19347 | 0xfc007fff, 0xa000533b, &CEIL_L_D , 0, |
89a955e8 AM |
19348 | CP1_ }, /* CEIL.L.D */ |
19349 | }; | |
19350 | ||
19351 | ||
a1465490 | 19352 | static const Pool CEIL_W_fmt[2] = { |
89a955e8 | 19353 | { instruction , 0 , 0 , 32, |
8d416f6b | 19354 | 0xfc007fff, 0xa0001b3b, &CEIL_W_S , 0, |
89a955e8 AM |
19355 | CP1_ }, /* CEIL.W.S */ |
19356 | { instruction , 0 , 0 , 32, | |
8d416f6b | 19357 | 0xfc007fff, 0xa0005b3b, &CEIL_W_D , 0, |
89a955e8 AM |
19358 | CP1_ }, /* CEIL.W.D */ |
19359 | }; | |
19360 | ||
19361 | ||
a1465490 | 19362 | static const Pool TRUNC_L_fmt[2] = { |
89a955e8 | 19363 | { instruction , 0 , 0 , 32, |
8d416f6b | 19364 | 0xfc007fff, 0xa000233b, &TRUNC_L_S , 0, |
89a955e8 AM |
19365 | CP1_ }, /* TRUNC.L.S */ |
19366 | { instruction , 0 , 0 , 32, | |
8d416f6b | 19367 | 0xfc007fff, 0xa000633b, &TRUNC_L_D , 0, |
89a955e8 AM |
19368 | CP1_ }, /* TRUNC.L.D */ |
19369 | }; | |
19370 | ||
19371 | ||
a1465490 | 19372 | static const Pool TRUNC_W_fmt[2] = { |
89a955e8 | 19373 | { instruction , 0 , 0 , 32, |
8d416f6b | 19374 | 0xfc007fff, 0xa0002b3b, &TRUNC_W_S , 0, |
89a955e8 AM |
19375 | CP1_ }, /* TRUNC.W.S */ |
19376 | { instruction , 0 , 0 , 32, | |
8d416f6b | 19377 | 0xfc007fff, 0xa0006b3b, &TRUNC_W_D , 0, |
89a955e8 AM |
19378 | CP1_ }, /* TRUNC.W.D */ |
19379 | }; | |
19380 | ||
19381 | ||
a1465490 | 19382 | static const Pool ROUND_L_fmt[2] = { |
89a955e8 | 19383 | { instruction , 0 , 0 , 32, |
8d416f6b | 19384 | 0xfc007fff, 0xa000333b, &ROUND_L_S , 0, |
89a955e8 AM |
19385 | CP1_ }, /* ROUND.L.S */ |
19386 | { instruction , 0 , 0 , 32, | |
8d416f6b | 19387 | 0xfc007fff, 0xa000733b, &ROUND_L_D , 0, |
89a955e8 AM |
19388 | CP1_ }, /* ROUND.L.D */ |
19389 | }; | |
19390 | ||
19391 | ||
a1465490 | 19392 | static const Pool ROUND_W_fmt[2] = { |
89a955e8 | 19393 | { instruction , 0 , 0 , 32, |
8d416f6b | 19394 | 0xfc007fff, 0xa0003b3b, &ROUND_W_S , 0, |
89a955e8 AM |
19395 | CP1_ }, /* ROUND.W.S */ |
19396 | { instruction , 0 , 0 , 32, | |
8d416f6b | 19397 | 0xfc007fff, 0xa0007b3b, &ROUND_W_D , 0, |
89a955e8 AM |
19398 | CP1_ }, /* ROUND.W.D */ |
19399 | }; | |
19400 | ||
19401 | ||
a1465490 | 19402 | static const Pool POOL32Fxf_0[64] = { |
89a955e8 AM |
19403 | { reserved_block , 0 , 0 , 32, |
19404 | 0xfc003fff, 0xa000003b, 0 , 0, | |
19405 | CP1_ }, /* POOL32Fxf_0~*(0) */ | |
19406 | { pool , CVT_L_fmt , 2 , 32, | |
19407 | 0xfc003fff, 0xa000013b, 0 , 0, | |
19408 | CP1_ }, /* CVT.L.fmt */ | |
19409 | { pool , RSQRT_fmt , 2 , 32, | |
19410 | 0xfc003fff, 0xa000023b, 0 , 0, | |
19411 | CP1_ }, /* RSQRT.fmt */ | |
19412 | { pool , FLOOR_L_fmt , 2 , 32, | |
19413 | 0xfc003fff, 0xa000033b, 0 , 0, | |
19414 | CP1_ }, /* FLOOR.L.fmt */ | |
19415 | { reserved_block , 0 , 0 , 32, | |
19416 | 0xfc003fff, 0xa000043b, 0 , 0, | |
19417 | CP1_ }, /* POOL32Fxf_0~*(4) */ | |
19418 | { reserved_block , 0 , 0 , 32, | |
19419 | 0xfc003fff, 0xa000053b, 0 , 0, | |
19420 | CP1_ }, /* POOL32Fxf_0~*(5) */ | |
19421 | { reserved_block , 0 , 0 , 32, | |
19422 | 0xfc003fff, 0xa000063b, 0 , 0, | |
19423 | CP1_ }, /* POOL32Fxf_0~*(6) */ | |
19424 | { reserved_block , 0 , 0 , 32, | |
19425 | 0xfc003fff, 0xa000073b, 0 , 0, | |
19426 | CP1_ }, /* POOL32Fxf_0~*(7) */ | |
19427 | { reserved_block , 0 , 0 , 32, | |
19428 | 0xfc003fff, 0xa000083b, 0 , 0, | |
19429 | CP1_ }, /* POOL32Fxf_0~*(8) */ | |
19430 | { pool , CVT_W_fmt , 2 , 32, | |
19431 | 0xfc003fff, 0xa000093b, 0 , 0, | |
19432 | CP1_ }, /* CVT.W.fmt */ | |
19433 | { pool , SQRT_fmt , 2 , 32, | |
19434 | 0xfc003fff, 0xa0000a3b, 0 , 0, | |
19435 | CP1_ }, /* SQRT.fmt */ | |
19436 | { pool , FLOOR_W_fmt , 2 , 32, | |
19437 | 0xfc003fff, 0xa0000b3b, 0 , 0, | |
19438 | CP1_ }, /* FLOOR.W.fmt */ | |
19439 | { reserved_block , 0 , 0 , 32, | |
19440 | 0xfc003fff, 0xa0000c3b, 0 , 0, | |
19441 | CP1_ }, /* POOL32Fxf_0~*(12) */ | |
19442 | { reserved_block , 0 , 0 , 32, | |
19443 | 0xfc003fff, 0xa0000d3b, 0 , 0, | |
19444 | CP1_ }, /* POOL32Fxf_0~*(13) */ | |
19445 | { reserved_block , 0 , 0 , 32, | |
19446 | 0xfc003fff, 0xa0000e3b, 0 , 0, | |
19447 | CP1_ }, /* POOL32Fxf_0~*(14) */ | |
19448 | { reserved_block , 0 , 0 , 32, | |
19449 | 0xfc003fff, 0xa0000f3b, 0 , 0, | |
19450 | CP1_ }, /* POOL32Fxf_0~*(15) */ | |
19451 | { instruction , 0 , 0 , 32, | |
8d416f6b | 19452 | 0xfc003fff, 0xa000103b, &CFC1 , 0, |
89a955e8 AM |
19453 | CP1_ }, /* CFC1 */ |
19454 | { reserved_block , 0 , 0 , 32, | |
19455 | 0xfc003fff, 0xa000113b, 0 , 0, | |
19456 | CP1_ }, /* POOL32Fxf_0~*(17) */ | |
19457 | { pool , RECIP_fmt , 2 , 32, | |
19458 | 0xfc003fff, 0xa000123b, 0 , 0, | |
19459 | CP1_ }, /* RECIP.fmt */ | |
19460 | { pool , CEIL_L_fmt , 2 , 32, | |
19461 | 0xfc003fff, 0xa000133b, 0 , 0, | |
19462 | CP1_ }, /* CEIL.L.fmt */ | |
19463 | { reserved_block , 0 , 0 , 32, | |
19464 | 0xfc003fff, 0xa000143b, 0 , 0, | |
19465 | CP1_ }, /* POOL32Fxf_0~*(20) */ | |
19466 | { reserved_block , 0 , 0 , 32, | |
19467 | 0xfc003fff, 0xa000153b, 0 , 0, | |
19468 | CP1_ }, /* POOL32Fxf_0~*(21) */ | |
19469 | { reserved_block , 0 , 0 , 32, | |
19470 | 0xfc003fff, 0xa000163b, 0 , 0, | |
19471 | CP1_ }, /* POOL32Fxf_0~*(22) */ | |
19472 | { reserved_block , 0 , 0 , 32, | |
19473 | 0xfc003fff, 0xa000173b, 0 , 0, | |
19474 | CP1_ }, /* POOL32Fxf_0~*(23) */ | |
19475 | { instruction , 0 , 0 , 32, | |
8d416f6b | 19476 | 0xfc003fff, 0xa000183b, &CTC1 , 0, |
89a955e8 AM |
19477 | CP1_ }, /* CTC1 */ |
19478 | { reserved_block , 0 , 0 , 32, | |
19479 | 0xfc003fff, 0xa000193b, 0 , 0, | |
19480 | CP1_ }, /* POOL32Fxf_0~*(25) */ | |
19481 | { reserved_block , 0 , 0 , 32, | |
19482 | 0xfc003fff, 0xa0001a3b, 0 , 0, | |
19483 | CP1_ }, /* POOL32Fxf_0~*(26) */ | |
19484 | { pool , CEIL_W_fmt , 2 , 32, | |
19485 | 0xfc003fff, 0xa0001b3b, 0 , 0, | |
19486 | CP1_ }, /* CEIL.W.fmt */ | |
19487 | { reserved_block , 0 , 0 , 32, | |
19488 | 0xfc003fff, 0xa0001c3b, 0 , 0, | |
19489 | CP1_ }, /* POOL32Fxf_0~*(28) */ | |
19490 | { reserved_block , 0 , 0 , 32, | |
19491 | 0xfc003fff, 0xa0001d3b, 0 , 0, | |
19492 | CP1_ }, /* POOL32Fxf_0~*(29) */ | |
19493 | { reserved_block , 0 , 0 , 32, | |
19494 | 0xfc003fff, 0xa0001e3b, 0 , 0, | |
19495 | CP1_ }, /* POOL32Fxf_0~*(30) */ | |
19496 | { reserved_block , 0 , 0 , 32, | |
19497 | 0xfc003fff, 0xa0001f3b, 0 , 0, | |
19498 | CP1_ }, /* POOL32Fxf_0~*(31) */ | |
19499 | { instruction , 0 , 0 , 32, | |
8d416f6b | 19500 | 0xfc003fff, 0xa000203b, &MFC1 , 0, |
89a955e8 AM |
19501 | CP1_ }, /* MFC1 */ |
19502 | { instruction , 0 , 0 , 32, | |
8d416f6b | 19503 | 0xfc003fff, 0xa000213b, &CVT_S_PL , 0, |
89a955e8 AM |
19504 | CP1_ }, /* CVT.S.PL */ |
19505 | { reserved_block , 0 , 0 , 32, | |
19506 | 0xfc003fff, 0xa000223b, 0 , 0, | |
19507 | CP1_ }, /* POOL32Fxf_0~*(34) */ | |
19508 | { pool , TRUNC_L_fmt , 2 , 32, | |
19509 | 0xfc003fff, 0xa000233b, 0 , 0, | |
19510 | CP1_ }, /* TRUNC.L.fmt */ | |
19511 | { instruction , 0 , 0 , 32, | |
8d416f6b | 19512 | 0xfc003fff, 0xa000243b, &DMFC1 , 0, |
89a955e8 AM |
19513 | CP1_ | MIPS64_ }, /* DMFC1 */ |
19514 | { reserved_block , 0 , 0 , 32, | |
19515 | 0xfc003fff, 0xa000253b, 0 , 0, | |
19516 | CP1_ }, /* POOL32Fxf_0~*(37) */ | |
19517 | { reserved_block , 0 , 0 , 32, | |
19518 | 0xfc003fff, 0xa000263b, 0 , 0, | |
19519 | CP1_ }, /* POOL32Fxf_0~*(38) */ | |
19520 | { reserved_block , 0 , 0 , 32, | |
19521 | 0xfc003fff, 0xa000273b, 0 , 0, | |
19522 | CP1_ }, /* POOL32Fxf_0~*(39) */ | |
19523 | { instruction , 0 , 0 , 32, | |
8d416f6b | 19524 | 0xfc003fff, 0xa000283b, &MTC1 , 0, |
89a955e8 AM |
19525 | CP1_ }, /* MTC1 */ |
19526 | { instruction , 0 , 0 , 32, | |
8d416f6b | 19527 | 0xfc003fff, 0xa000293b, &CVT_S_PU , 0, |
89a955e8 AM |
19528 | CP1_ }, /* CVT.S.PU */ |
19529 | { reserved_block , 0 , 0 , 32, | |
19530 | 0xfc003fff, 0xa0002a3b, 0 , 0, | |
19531 | CP1_ }, /* POOL32Fxf_0~*(42) */ | |
19532 | { pool , TRUNC_W_fmt , 2 , 32, | |
19533 | 0xfc003fff, 0xa0002b3b, 0 , 0, | |
19534 | CP1_ }, /* TRUNC.W.fmt */ | |
19535 | { instruction , 0 , 0 , 32, | |
8d416f6b | 19536 | 0xfc003fff, 0xa0002c3b, &DMTC1 , 0, |
89a955e8 AM |
19537 | CP1_ | MIPS64_ }, /* DMTC1 */ |
19538 | { reserved_block , 0 , 0 , 32, | |
19539 | 0xfc003fff, 0xa0002d3b, 0 , 0, | |
19540 | CP1_ }, /* POOL32Fxf_0~*(45) */ | |
19541 | { reserved_block , 0 , 0 , 32, | |
19542 | 0xfc003fff, 0xa0002e3b, 0 , 0, | |
19543 | CP1_ }, /* POOL32Fxf_0~*(46) */ | |
19544 | { reserved_block , 0 , 0 , 32, | |
19545 | 0xfc003fff, 0xa0002f3b, 0 , 0, | |
19546 | CP1_ }, /* POOL32Fxf_0~*(47) */ | |
19547 | { instruction , 0 , 0 , 32, | |
8d416f6b | 19548 | 0xfc003fff, 0xa000303b, &MFHC1 , 0, |
89a955e8 AM |
19549 | CP1_ }, /* MFHC1 */ |
19550 | { reserved_block , 0 , 0 , 32, | |
19551 | 0xfc003fff, 0xa000313b, 0 , 0, | |
19552 | CP1_ }, /* POOL32Fxf_0~*(49) */ | |
19553 | { reserved_block , 0 , 0 , 32, | |
19554 | 0xfc003fff, 0xa000323b, 0 , 0, | |
19555 | CP1_ }, /* POOL32Fxf_0~*(50) */ | |
19556 | { pool , ROUND_L_fmt , 2 , 32, | |
19557 | 0xfc003fff, 0xa000333b, 0 , 0, | |
19558 | CP1_ }, /* ROUND.L.fmt */ | |
19559 | { reserved_block , 0 , 0 , 32, | |
19560 | 0xfc003fff, 0xa000343b, 0 , 0, | |
19561 | CP1_ }, /* POOL32Fxf_0~*(52) */ | |
19562 | { reserved_block , 0 , 0 , 32, | |
19563 | 0xfc003fff, 0xa000353b, 0 , 0, | |
19564 | CP1_ }, /* POOL32Fxf_0~*(53) */ | |
19565 | { reserved_block , 0 , 0 , 32, | |
19566 | 0xfc003fff, 0xa000363b, 0 , 0, | |
19567 | CP1_ }, /* POOL32Fxf_0~*(54) */ | |
19568 | { reserved_block , 0 , 0 , 32, | |
19569 | 0xfc003fff, 0xa000373b, 0 , 0, | |
19570 | CP1_ }, /* POOL32Fxf_0~*(55) */ | |
19571 | { instruction , 0 , 0 , 32, | |
8d416f6b | 19572 | 0xfc003fff, 0xa000383b, &MTHC1 , 0, |
89a955e8 AM |
19573 | CP1_ }, /* MTHC1 */ |
19574 | { reserved_block , 0 , 0 , 32, | |
19575 | 0xfc003fff, 0xa000393b, 0 , 0, | |
19576 | CP1_ }, /* POOL32Fxf_0~*(57) */ | |
19577 | { reserved_block , 0 , 0 , 32, | |
19578 | 0xfc003fff, 0xa0003a3b, 0 , 0, | |
19579 | CP1_ }, /* POOL32Fxf_0~*(58) */ | |
19580 | { pool , ROUND_W_fmt , 2 , 32, | |
19581 | 0xfc003fff, 0xa0003b3b, 0 , 0, | |
19582 | CP1_ }, /* ROUND.W.fmt */ | |
19583 | { reserved_block , 0 , 0 , 32, | |
19584 | 0xfc003fff, 0xa0003c3b, 0 , 0, | |
19585 | CP1_ }, /* POOL32Fxf_0~*(60) */ | |
19586 | { reserved_block , 0 , 0 , 32, | |
19587 | 0xfc003fff, 0xa0003d3b, 0 , 0, | |
19588 | CP1_ }, /* POOL32Fxf_0~*(61) */ | |
19589 | { reserved_block , 0 , 0 , 32, | |
19590 | 0xfc003fff, 0xa0003e3b, 0 , 0, | |
19591 | CP1_ }, /* POOL32Fxf_0~*(62) */ | |
19592 | { reserved_block , 0 , 0 , 32, | |
19593 | 0xfc003fff, 0xa0003f3b, 0 , 0, | |
19594 | CP1_ }, /* POOL32Fxf_0~*(63) */ | |
19595 | }; | |
19596 | ||
19597 | ||
a1465490 | 19598 | static const Pool MOV_fmt[4] = { |
89a955e8 | 19599 | { instruction , 0 , 0 , 32, |
8d416f6b | 19600 | 0xfc007fff, 0xa000007b, &MOV_S , 0, |
89a955e8 AM |
19601 | CP1_ }, /* MOV.S */ |
19602 | { instruction , 0 , 0 , 32, | |
8d416f6b | 19603 | 0xfc007fff, 0xa000207b, &MOV_D , 0, |
89a955e8 AM |
19604 | CP1_ }, /* MOV.D */ |
19605 | { reserved_block , 0 , 0 , 32, | |
19606 | 0xfc007fff, 0xa000407b, 0 , 0, | |
19607 | CP1_ }, /* MOV.fmt~*(2) */ | |
19608 | { reserved_block , 0 , 0 , 32, | |
19609 | 0xfc007fff, 0xa000607b, 0 , 0, | |
19610 | CP1_ }, /* MOV.fmt~*(3) */ | |
19611 | }; | |
19612 | ||
19613 | ||
a1465490 | 19614 | static const Pool ABS_fmt[4] = { |
89a955e8 | 19615 | { instruction , 0 , 0 , 32, |
8d416f6b | 19616 | 0xfc007fff, 0xa000037b, &ABS_S , 0, |
89a955e8 AM |
19617 | CP1_ }, /* ABS.S */ |
19618 | { instruction , 0 , 0 , 32, | |
8d416f6b | 19619 | 0xfc007fff, 0xa000237b, &ABS_D , 0, |
89a955e8 AM |
19620 | CP1_ }, /* ABS.D */ |
19621 | { reserved_block , 0 , 0 , 32, | |
19622 | 0xfc007fff, 0xa000437b, 0 , 0, | |
19623 | CP1_ }, /* ABS.fmt~*(2) */ | |
19624 | { reserved_block , 0 , 0 , 32, | |
19625 | 0xfc007fff, 0xa000637b, 0 , 0, | |
19626 | CP1_ }, /* ABS.fmt~*(3) */ | |
19627 | }; | |
19628 | ||
19629 | ||
a1465490 | 19630 | static const Pool NEG_fmt[4] = { |
89a955e8 | 19631 | { instruction , 0 , 0 , 32, |
8d416f6b | 19632 | 0xfc007fff, 0xa0000b7b, &NEG_S , 0, |
89a955e8 AM |
19633 | CP1_ }, /* NEG.S */ |
19634 | { instruction , 0 , 0 , 32, | |
8d416f6b | 19635 | 0xfc007fff, 0xa0002b7b, &NEG_D , 0, |
89a955e8 AM |
19636 | CP1_ }, /* NEG.D */ |
19637 | { reserved_block , 0 , 0 , 32, | |
19638 | 0xfc007fff, 0xa0004b7b, 0 , 0, | |
19639 | CP1_ }, /* NEG.fmt~*(2) */ | |
19640 | { reserved_block , 0 , 0 , 32, | |
19641 | 0xfc007fff, 0xa0006b7b, 0 , 0, | |
19642 | CP1_ }, /* NEG.fmt~*(3) */ | |
19643 | }; | |
19644 | ||
19645 | ||
a1465490 | 19646 | static const Pool CVT_D_fmt[4] = { |
89a955e8 | 19647 | { instruction , 0 , 0 , 32, |
8d416f6b | 19648 | 0xfc007fff, 0xa000137b, &CVT_D_S , 0, |
89a955e8 AM |
19649 | CP1_ }, /* CVT.D.S */ |
19650 | { instruction , 0 , 0 , 32, | |
8d416f6b | 19651 | 0xfc007fff, 0xa000337b, &CVT_D_W , 0, |
89a955e8 AM |
19652 | CP1_ }, /* CVT.D.W */ |
19653 | { instruction , 0 , 0 , 32, | |
8d416f6b | 19654 | 0xfc007fff, 0xa000537b, &CVT_D_L , 0, |
89a955e8 AM |
19655 | CP1_ }, /* CVT.D.L */ |
19656 | { reserved_block , 0 , 0 , 32, | |
19657 | 0xfc007fff, 0xa000737b, 0 , 0, | |
19658 | CP1_ }, /* CVT.D.fmt~*(3) */ | |
19659 | }; | |
19660 | ||
19661 | ||
a1465490 | 19662 | static const Pool CVT_S_fmt[4] = { |
89a955e8 | 19663 | { instruction , 0 , 0 , 32, |
8d416f6b | 19664 | 0xfc007fff, 0xa0001b7b, &CVT_S_D , 0, |
89a955e8 AM |
19665 | CP1_ }, /* CVT.S.D */ |
19666 | { instruction , 0 , 0 , 32, | |
8d416f6b | 19667 | 0xfc007fff, 0xa0003b7b, &CVT_S_W , 0, |
89a955e8 AM |
19668 | CP1_ }, /* CVT.S.W */ |
19669 | { instruction , 0 , 0 , 32, | |
8d416f6b | 19670 | 0xfc007fff, 0xa0005b7b, &CVT_S_L , 0, |
89a955e8 AM |
19671 | CP1_ }, /* CVT.S.L */ |
19672 | { reserved_block , 0 , 0 , 32, | |
19673 | 0xfc007fff, 0xa0007b7b, 0 , 0, | |
19674 | CP1_ }, /* CVT.S.fmt~*(3) */ | |
19675 | }; | |
19676 | ||
19677 | ||
a1465490 | 19678 | static const Pool POOL32Fxf_1[32] = { |
89a955e8 AM |
19679 | { pool , MOV_fmt , 4 , 32, |
19680 | 0xfc001fff, 0xa000007b, 0 , 0, | |
19681 | CP1_ }, /* MOV.fmt */ | |
19682 | { reserved_block , 0 , 0 , 32, | |
19683 | 0xfc001fff, 0xa000017b, 0 , 0, | |
19684 | CP1_ }, /* POOL32Fxf_1~*(1) */ | |
19685 | { reserved_block , 0 , 0 , 32, | |
19686 | 0xfc001fff, 0xa000027b, 0 , 0, | |
19687 | CP1_ }, /* POOL32Fxf_1~*(2) */ | |
19688 | { pool , ABS_fmt , 4 , 32, | |
19689 | 0xfc001fff, 0xa000037b, 0 , 0, | |
19690 | CP1_ }, /* ABS.fmt */ | |
19691 | { reserved_block , 0 , 0 , 32, | |
19692 | 0xfc001fff, 0xa000047b, 0 , 0, | |
19693 | CP1_ }, /* POOL32Fxf_1~*(4) */ | |
19694 | { reserved_block , 0 , 0 , 32, | |
19695 | 0xfc001fff, 0xa000057b, 0 , 0, | |
19696 | CP1_ }, /* POOL32Fxf_1~*(5) */ | |
19697 | { reserved_block , 0 , 0 , 32, | |
19698 | 0xfc001fff, 0xa000067b, 0 , 0, | |
19699 | CP1_ }, /* POOL32Fxf_1~*(6) */ | |
19700 | { reserved_block , 0 , 0 , 32, | |
19701 | 0xfc001fff, 0xa000077b, 0 , 0, | |
19702 | CP1_ }, /* POOL32Fxf_1~*(7) */ | |
19703 | { reserved_block , 0 , 0 , 32, | |
19704 | 0xfc001fff, 0xa000087b, 0 , 0, | |
19705 | CP1_ }, /* POOL32Fxf_1~*(8) */ | |
19706 | { reserved_block , 0 , 0 , 32, | |
19707 | 0xfc001fff, 0xa000097b, 0 , 0, | |
19708 | CP1_ }, /* POOL32Fxf_1~*(9) */ | |
19709 | { reserved_block , 0 , 0 , 32, | |
19710 | 0xfc001fff, 0xa0000a7b, 0 , 0, | |
19711 | CP1_ }, /* POOL32Fxf_1~*(10) */ | |
19712 | { pool , NEG_fmt , 4 , 32, | |
19713 | 0xfc001fff, 0xa0000b7b, 0 , 0, | |
19714 | CP1_ }, /* NEG.fmt */ | |
19715 | { reserved_block , 0 , 0 , 32, | |
19716 | 0xfc001fff, 0xa0000c7b, 0 , 0, | |
19717 | CP1_ }, /* POOL32Fxf_1~*(12) */ | |
19718 | { reserved_block , 0 , 0 , 32, | |
19719 | 0xfc001fff, 0xa0000d7b, 0 , 0, | |
19720 | CP1_ }, /* POOL32Fxf_1~*(13) */ | |
19721 | { reserved_block , 0 , 0 , 32, | |
19722 | 0xfc001fff, 0xa0000e7b, 0 , 0, | |
19723 | CP1_ }, /* POOL32Fxf_1~*(14) */ | |
19724 | { reserved_block , 0 , 0 , 32, | |
19725 | 0xfc001fff, 0xa0000f7b, 0 , 0, | |
19726 | CP1_ }, /* POOL32Fxf_1~*(15) */ | |
19727 | { reserved_block , 0 , 0 , 32, | |
19728 | 0xfc001fff, 0xa000107b, 0 , 0, | |
19729 | CP1_ }, /* POOL32Fxf_1~*(16) */ | |
19730 | { reserved_block , 0 , 0 , 32, | |
19731 | 0xfc001fff, 0xa000117b, 0 , 0, | |
19732 | CP1_ }, /* POOL32Fxf_1~*(17) */ | |
19733 | { reserved_block , 0 , 0 , 32, | |
19734 | 0xfc001fff, 0xa000127b, 0 , 0, | |
19735 | CP1_ }, /* POOL32Fxf_1~*(18) */ | |
19736 | { pool , CVT_D_fmt , 4 , 32, | |
19737 | 0xfc001fff, 0xa000137b, 0 , 0, | |
19738 | CP1_ }, /* CVT.D.fmt */ | |
19739 | { reserved_block , 0 , 0 , 32, | |
19740 | 0xfc001fff, 0xa000147b, 0 , 0, | |
19741 | CP1_ }, /* POOL32Fxf_1~*(20) */ | |
19742 | { reserved_block , 0 , 0 , 32, | |
19743 | 0xfc001fff, 0xa000157b, 0 , 0, | |
19744 | CP1_ }, /* POOL32Fxf_1~*(21) */ | |
19745 | { reserved_block , 0 , 0 , 32, | |
19746 | 0xfc001fff, 0xa000167b, 0 , 0, | |
19747 | CP1_ }, /* POOL32Fxf_1~*(22) */ | |
19748 | { reserved_block , 0 , 0 , 32, | |
19749 | 0xfc001fff, 0xa000177b, 0 , 0, | |
19750 | CP1_ }, /* POOL32Fxf_1~*(23) */ | |
19751 | { reserved_block , 0 , 0 , 32, | |
19752 | 0xfc001fff, 0xa000187b, 0 , 0, | |
19753 | CP1_ }, /* POOL32Fxf_1~*(24) */ | |
19754 | { reserved_block , 0 , 0 , 32, | |
19755 | 0xfc001fff, 0xa000197b, 0 , 0, | |
19756 | CP1_ }, /* POOL32Fxf_1~*(25) */ | |
19757 | { reserved_block , 0 , 0 , 32, | |
19758 | 0xfc001fff, 0xa0001a7b, 0 , 0, | |
19759 | CP1_ }, /* POOL32Fxf_1~*(26) */ | |
19760 | { pool , CVT_S_fmt , 4 , 32, | |
19761 | 0xfc001fff, 0xa0001b7b, 0 , 0, | |
19762 | CP1_ }, /* CVT.S.fmt */ | |
19763 | { reserved_block , 0 , 0 , 32, | |
19764 | 0xfc001fff, 0xa0001c7b, 0 , 0, | |
19765 | CP1_ }, /* POOL32Fxf_1~*(28) */ | |
19766 | { reserved_block , 0 , 0 , 32, | |
19767 | 0xfc001fff, 0xa0001d7b, 0 , 0, | |
19768 | CP1_ }, /* POOL32Fxf_1~*(29) */ | |
19769 | { reserved_block , 0 , 0 , 32, | |
19770 | 0xfc001fff, 0xa0001e7b, 0 , 0, | |
19771 | CP1_ }, /* POOL32Fxf_1~*(30) */ | |
19772 | { reserved_block , 0 , 0 , 32, | |
19773 | 0xfc001fff, 0xa0001f7b, 0 , 0, | |
19774 | CP1_ }, /* POOL32Fxf_1~*(31) */ | |
19775 | }; | |
19776 | ||
19777 | ||
a1465490 | 19778 | static const Pool POOL32Fxf[4] = { |
89a955e8 AM |
19779 | { pool , POOL32Fxf_0 , 64 , 32, |
19780 | 0xfc0000ff, 0xa000003b, 0 , 0, | |
19781 | CP1_ }, /* POOL32Fxf_0 */ | |
19782 | { pool , POOL32Fxf_1 , 32 , 32, | |
19783 | 0xfc0000ff, 0xa000007b, 0 , 0, | |
19784 | CP1_ }, /* POOL32Fxf_1 */ | |
19785 | { reserved_block , 0 , 0 , 32, | |
19786 | 0xfc0000ff, 0xa00000bb, 0 , 0, | |
19787 | CP1_ }, /* POOL32Fxf~*(2) */ | |
19788 | { reserved_block , 0 , 0 , 32, | |
19789 | 0xfc0000ff, 0xa00000fb, 0 , 0, | |
19790 | CP1_ }, /* POOL32Fxf~*(3) */ | |
19791 | }; | |
19792 | ||
19793 | ||
a1465490 | 19794 | static const Pool POOL32F_3[8] = { |
89a955e8 AM |
19795 | { pool , MIN_fmt , 2 , 32, |
19796 | 0xfc00003f, 0xa0000003, 0 , 0, | |
19797 | CP1_ }, /* MIN.fmt */ | |
19798 | { pool , MAX_fmt , 2 , 32, | |
19799 | 0xfc00003f, 0xa000000b, 0 , 0, | |
19800 | CP1_ }, /* MAX.fmt */ | |
19801 | { reserved_block , 0 , 0 , 32, | |
19802 | 0xfc00003f, 0xa0000013, 0 , 0, | |
19803 | CP1_ }, /* POOL32F_3~*(2) */ | |
19804 | { reserved_block , 0 , 0 , 32, | |
19805 | 0xfc00003f, 0xa000001b, 0 , 0, | |
19806 | CP1_ }, /* POOL32F_3~*(3) */ | |
19807 | { pool , MINA_fmt , 2 , 32, | |
19808 | 0xfc00003f, 0xa0000023, 0 , 0, | |
19809 | CP1_ }, /* MINA.fmt */ | |
19810 | { pool , MAXA_fmt , 2 , 32, | |
19811 | 0xfc00003f, 0xa000002b, 0 , 0, | |
19812 | CP1_ }, /* MAXA.fmt */ | |
19813 | { reserved_block , 0 , 0 , 32, | |
19814 | 0xfc00003f, 0xa0000033, 0 , 0, | |
19815 | CP1_ }, /* POOL32F_3~*(6) */ | |
19816 | { pool , POOL32Fxf , 4 , 32, | |
19817 | 0xfc00003f, 0xa000003b, 0 , 0, | |
19818 | CP1_ }, /* POOL32Fxf */ | |
19819 | }; | |
19820 | ||
19821 | ||
a1465490 | 19822 | static const Pool CMP_condn_S[32] = { |
89a955e8 | 19823 | { instruction , 0 , 0 , 32, |
8d416f6b | 19824 | 0xfc0007ff, 0xa0000005, &CMP_AF_S , 0, |
89a955e8 AM |
19825 | CP1_ }, /* CMP.AF.S */ |
19826 | { instruction , 0 , 0 , 32, | |
8d416f6b | 19827 | 0xfc0007ff, 0xa0000045, &CMP_UN_S , 0, |
89a955e8 AM |
19828 | CP1_ }, /* CMP.UN.S */ |
19829 | { instruction , 0 , 0 , 32, | |
8d416f6b | 19830 | 0xfc0007ff, 0xa0000085, &CMP_EQ_S , 0, |
89a955e8 AM |
19831 | CP1_ }, /* CMP.EQ.S */ |
19832 | { instruction , 0 , 0 , 32, | |
8d416f6b | 19833 | 0xfc0007ff, 0xa00000c5, &CMP_UEQ_S , 0, |
89a955e8 AM |
19834 | CP1_ }, /* CMP.UEQ.S */ |
19835 | { instruction , 0 , 0 , 32, | |
8d416f6b | 19836 | 0xfc0007ff, 0xa0000105, &CMP_LT_S , 0, |
89a955e8 AM |
19837 | CP1_ }, /* CMP.LT.S */ |
19838 | { instruction , 0 , 0 , 32, | |
8d416f6b | 19839 | 0xfc0007ff, 0xa0000145, &CMP_ULT_S , 0, |
89a955e8 AM |
19840 | CP1_ }, /* CMP.ULT.S */ |
19841 | { instruction , 0 , 0 , 32, | |
8d416f6b | 19842 | 0xfc0007ff, 0xa0000185, &CMP_LE_S , 0, |
89a955e8 AM |
19843 | CP1_ }, /* CMP.LE.S */ |
19844 | { instruction , 0 , 0 , 32, | |
8d416f6b | 19845 | 0xfc0007ff, 0xa00001c5, &CMP_ULE_S , 0, |
89a955e8 AM |
19846 | CP1_ }, /* CMP.ULE.S */ |
19847 | { instruction , 0 , 0 , 32, | |
8d416f6b | 19848 | 0xfc0007ff, 0xa0000205, &CMP_SAF_S , 0, |
89a955e8 AM |
19849 | CP1_ }, /* CMP.SAF.S */ |
19850 | { instruction , 0 , 0 , 32, | |
8d416f6b | 19851 | 0xfc0007ff, 0xa0000245, &CMP_SUN_S , 0, |
89a955e8 AM |
19852 | CP1_ }, /* CMP.SUN.S */ |
19853 | { instruction , 0 , 0 , 32, | |
8d416f6b | 19854 | 0xfc0007ff, 0xa0000285, &CMP_SEQ_S , 0, |
89a955e8 AM |
19855 | CP1_ }, /* CMP.SEQ.S */ |
19856 | { instruction , 0 , 0 , 32, | |
8d416f6b | 19857 | 0xfc0007ff, 0xa00002c5, &CMP_SUEQ_S , 0, |
89a955e8 AM |
19858 | CP1_ }, /* CMP.SUEQ.S */ |
19859 | { instruction , 0 , 0 , 32, | |
8d416f6b | 19860 | 0xfc0007ff, 0xa0000305, &CMP_SLT_S , 0, |
89a955e8 AM |
19861 | CP1_ }, /* CMP.SLT.S */ |
19862 | { instruction , 0 , 0 , 32, | |
8d416f6b | 19863 | 0xfc0007ff, 0xa0000345, &CMP_SULT_S , 0, |
89a955e8 AM |
19864 | CP1_ }, /* CMP.SULT.S */ |
19865 | { instruction , 0 , 0 , 32, | |
8d416f6b | 19866 | 0xfc0007ff, 0xa0000385, &CMP_SLE_S , 0, |
89a955e8 AM |
19867 | CP1_ }, /* CMP.SLE.S */ |
19868 | { instruction , 0 , 0 , 32, | |
8d416f6b | 19869 | 0xfc0007ff, 0xa00003c5, &CMP_SULE_S , 0, |
89a955e8 AM |
19870 | CP1_ }, /* CMP.SULE.S */ |
19871 | { reserved_block , 0 , 0 , 32, | |
19872 | 0xfc0007ff, 0xa0000405, 0 , 0, | |
19873 | CP1_ }, /* CMP.condn.S~*(16) */ | |
19874 | { instruction , 0 , 0 , 32, | |
8d416f6b | 19875 | 0xfc0007ff, 0xa0000445, &CMP_OR_S , 0, |
89a955e8 AM |
19876 | CP1_ }, /* CMP.OR.S */ |
19877 | { instruction , 0 , 0 , 32, | |
8d416f6b | 19878 | 0xfc0007ff, 0xa0000485, &CMP_UNE_S , 0, |
89a955e8 AM |
19879 | CP1_ }, /* CMP.UNE.S */ |
19880 | { instruction , 0 , 0 , 32, | |
8d416f6b | 19881 | 0xfc0007ff, 0xa00004c5, &CMP_NE_S , 0, |
89a955e8 AM |
19882 | CP1_ }, /* CMP.NE.S */ |
19883 | { reserved_block , 0 , 0 , 32, | |
19884 | 0xfc0007ff, 0xa0000505, 0 , 0, | |
19885 | CP1_ }, /* CMP.condn.S~*(20) */ | |
19886 | { reserved_block , 0 , 0 , 32, | |
19887 | 0xfc0007ff, 0xa0000545, 0 , 0, | |
19888 | CP1_ }, /* CMP.condn.S~*(21) */ | |
19889 | { reserved_block , 0 , 0 , 32, | |
19890 | 0xfc0007ff, 0xa0000585, 0 , 0, | |
19891 | CP1_ }, /* CMP.condn.S~*(22) */ | |
19892 | { reserved_block , 0 , 0 , 32, | |
19893 | 0xfc0007ff, 0xa00005c5, 0 , 0, | |
19894 | CP1_ }, /* CMP.condn.S~*(23) */ | |
19895 | { reserved_block , 0 , 0 , 32, | |
19896 | 0xfc0007ff, 0xa0000605, 0 , 0, | |
19897 | CP1_ }, /* CMP.condn.S~*(24) */ | |
19898 | { instruction , 0 , 0 , 32, | |
8d416f6b | 19899 | 0xfc0007ff, 0xa0000645, &CMP_SOR_S , 0, |
89a955e8 AM |
19900 | CP1_ }, /* CMP.SOR.S */ |
19901 | { instruction , 0 , 0 , 32, | |
8d416f6b | 19902 | 0xfc0007ff, 0xa0000685, &CMP_SUNE_S , 0, |
89a955e8 AM |
19903 | CP1_ }, /* CMP.SUNE.S */ |
19904 | { instruction , 0 , 0 , 32, | |
8d416f6b | 19905 | 0xfc0007ff, 0xa00006c5, &CMP_SNE_S , 0, |
89a955e8 AM |
19906 | CP1_ }, /* CMP.SNE.S */ |
19907 | { reserved_block , 0 , 0 , 32, | |
19908 | 0xfc0007ff, 0xa0000705, 0 , 0, | |
19909 | CP1_ }, /* CMP.condn.S~*(28) */ | |
19910 | { reserved_block , 0 , 0 , 32, | |
19911 | 0xfc0007ff, 0xa0000745, 0 , 0, | |
19912 | CP1_ }, /* CMP.condn.S~*(29) */ | |
19913 | { reserved_block , 0 , 0 , 32, | |
19914 | 0xfc0007ff, 0xa0000785, 0 , 0, | |
19915 | CP1_ }, /* CMP.condn.S~*(30) */ | |
19916 | { reserved_block , 0 , 0 , 32, | |
19917 | 0xfc0007ff, 0xa00007c5, 0 , 0, | |
19918 | CP1_ }, /* CMP.condn.S~*(31) */ | |
19919 | }; | |
19920 | ||
19921 | ||
a1465490 | 19922 | static const Pool CMP_condn_D[32] = { |
89a955e8 | 19923 | { instruction , 0 , 0 , 32, |
8d416f6b | 19924 | 0xfc0007ff, 0xa0000015, &CMP_AF_D , 0, |
89a955e8 AM |
19925 | CP1_ }, /* CMP.AF.D */ |
19926 | { instruction , 0 , 0 , 32, | |
8d416f6b | 19927 | 0xfc0007ff, 0xa0000055, &CMP_UN_D , 0, |
89a955e8 AM |
19928 | CP1_ }, /* CMP.UN.D */ |
19929 | { instruction , 0 , 0 , 32, | |
8d416f6b | 19930 | 0xfc0007ff, 0xa0000095, &CMP_EQ_D , 0, |
89a955e8 AM |
19931 | CP1_ }, /* CMP.EQ.D */ |
19932 | { instruction , 0 , 0 , 32, | |
8d416f6b | 19933 | 0xfc0007ff, 0xa00000d5, &CMP_UEQ_D , 0, |
89a955e8 AM |
19934 | CP1_ }, /* CMP.UEQ.D */ |
19935 | { instruction , 0 , 0 , 32, | |
8d416f6b | 19936 | 0xfc0007ff, 0xa0000115, &CMP_LT_D , 0, |
89a955e8 AM |
19937 | CP1_ }, /* CMP.LT.D */ |
19938 | { instruction , 0 , 0 , 32, | |
8d416f6b | 19939 | 0xfc0007ff, 0xa0000155, &CMP_ULT_D , 0, |
89a955e8 AM |
19940 | CP1_ }, /* CMP.ULT.D */ |
19941 | { instruction , 0 , 0 , 32, | |
8d416f6b | 19942 | 0xfc0007ff, 0xa0000195, &CMP_LE_D , 0, |
89a955e8 AM |
19943 | CP1_ }, /* CMP.LE.D */ |
19944 | { instruction , 0 , 0 , 32, | |
8d416f6b | 19945 | 0xfc0007ff, 0xa00001d5, &CMP_ULE_D , 0, |
89a955e8 AM |
19946 | CP1_ }, /* CMP.ULE.D */ |
19947 | { instruction , 0 , 0 , 32, | |
8d416f6b | 19948 | 0xfc0007ff, 0xa0000215, &CMP_SAF_D , 0, |
89a955e8 AM |
19949 | CP1_ }, /* CMP.SAF.D */ |
19950 | { instruction , 0 , 0 , 32, | |
8d416f6b | 19951 | 0xfc0007ff, 0xa0000255, &CMP_SUN_D , 0, |
89a955e8 AM |
19952 | CP1_ }, /* CMP.SUN.D */ |
19953 | { instruction , 0 , 0 , 32, | |
8d416f6b | 19954 | 0xfc0007ff, 0xa0000295, &CMP_SEQ_D , 0, |
89a955e8 AM |
19955 | CP1_ }, /* CMP.SEQ.D */ |
19956 | { instruction , 0 , 0 , 32, | |
8d416f6b | 19957 | 0xfc0007ff, 0xa00002d5, &CMP_SUEQ_D , 0, |
89a955e8 AM |
19958 | CP1_ }, /* CMP.SUEQ.D */ |
19959 | { instruction , 0 , 0 , 32, | |
8d416f6b | 19960 | 0xfc0007ff, 0xa0000315, &CMP_SLT_D , 0, |
89a955e8 AM |
19961 | CP1_ }, /* CMP.SLT.D */ |
19962 | { instruction , 0 , 0 , 32, | |
8d416f6b | 19963 | 0xfc0007ff, 0xa0000355, &CMP_SULT_D , 0, |
89a955e8 AM |
19964 | CP1_ }, /* CMP.SULT.D */ |
19965 | { instruction , 0 , 0 , 32, | |
8d416f6b | 19966 | 0xfc0007ff, 0xa0000395, &CMP_SLE_D , 0, |
89a955e8 AM |
19967 | CP1_ }, /* CMP.SLE.D */ |
19968 | { instruction , 0 , 0 , 32, | |
8d416f6b | 19969 | 0xfc0007ff, 0xa00003d5, &CMP_SULE_D , 0, |
89a955e8 AM |
19970 | CP1_ }, /* CMP.SULE.D */ |
19971 | { reserved_block , 0 , 0 , 32, | |
19972 | 0xfc0007ff, 0xa0000415, 0 , 0, | |
19973 | CP1_ }, /* CMP.condn.D~*(16) */ | |
19974 | { instruction , 0 , 0 , 32, | |
8d416f6b | 19975 | 0xfc0007ff, 0xa0000455, &CMP_OR_D , 0, |
89a955e8 AM |
19976 | CP1_ }, /* CMP.OR.D */ |
19977 | { instruction , 0 , 0 , 32, | |
8d416f6b | 19978 | 0xfc0007ff, 0xa0000495, &CMP_UNE_D , 0, |
89a955e8 AM |
19979 | CP1_ }, /* CMP.UNE.D */ |
19980 | { instruction , 0 , 0 , 32, | |
8d416f6b | 19981 | 0xfc0007ff, 0xa00004d5, &CMP_NE_D , 0, |
89a955e8 AM |
19982 | CP1_ }, /* CMP.NE.D */ |
19983 | { reserved_block , 0 , 0 , 32, | |
19984 | 0xfc0007ff, 0xa0000515, 0 , 0, | |
19985 | CP1_ }, /* CMP.condn.D~*(20) */ | |
19986 | { reserved_block , 0 , 0 , 32, | |
19987 | 0xfc0007ff, 0xa0000555, 0 , 0, | |
19988 | CP1_ }, /* CMP.condn.D~*(21) */ | |
19989 | { reserved_block , 0 , 0 , 32, | |
19990 | 0xfc0007ff, 0xa0000595, 0 , 0, | |
19991 | CP1_ }, /* CMP.condn.D~*(22) */ | |
19992 | { reserved_block , 0 , 0 , 32, | |
19993 | 0xfc0007ff, 0xa00005d5, 0 , 0, | |
19994 | CP1_ }, /* CMP.condn.D~*(23) */ | |
19995 | { reserved_block , 0 , 0 , 32, | |
19996 | 0xfc0007ff, 0xa0000615, 0 , 0, | |
19997 | CP1_ }, /* CMP.condn.D~*(24) */ | |
19998 | { instruction , 0 , 0 , 32, | |
8d416f6b | 19999 | 0xfc0007ff, 0xa0000655, &CMP_SOR_D , 0, |
89a955e8 AM |
20000 | CP1_ }, /* CMP.SOR.D */ |
20001 | { instruction , 0 , 0 , 32, | |
8d416f6b | 20002 | 0xfc0007ff, 0xa0000695, &CMP_SUNE_D , 0, |
89a955e8 AM |
20003 | CP1_ }, /* CMP.SUNE.D */ |
20004 | { instruction , 0 , 0 , 32, | |
8d416f6b | 20005 | 0xfc0007ff, 0xa00006d5, &CMP_SNE_D , 0, |
89a955e8 AM |
20006 | CP1_ }, /* CMP.SNE.D */ |
20007 | { reserved_block , 0 , 0 , 32, | |
20008 | 0xfc0007ff, 0xa0000715, 0 , 0, | |
20009 | CP1_ }, /* CMP.condn.D~*(28) */ | |
20010 | { reserved_block , 0 , 0 , 32, | |
20011 | 0xfc0007ff, 0xa0000755, 0 , 0, | |
20012 | CP1_ }, /* CMP.condn.D~*(29) */ | |
20013 | { reserved_block , 0 , 0 , 32, | |
20014 | 0xfc0007ff, 0xa0000795, 0 , 0, | |
20015 | CP1_ }, /* CMP.condn.D~*(30) */ | |
20016 | { reserved_block , 0 , 0 , 32, | |
20017 | 0xfc0007ff, 0xa00007d5, 0 , 0, | |
20018 | CP1_ }, /* CMP.condn.D~*(31) */ | |
20019 | }; | |
20020 | ||
20021 | ||
a1465490 | 20022 | static const Pool POOL32F_5[8] = { |
89a955e8 AM |
20023 | { pool , CMP_condn_S , 32 , 32, |
20024 | 0xfc00003f, 0xa0000005, 0 , 0, | |
20025 | CP1_ }, /* CMP.condn.S */ | |
20026 | { reserved_block , 0 , 0 , 32, | |
20027 | 0xfc00003f, 0xa000000d, 0 , 0, | |
20028 | CP1_ }, /* POOL32F_5~*(1) */ | |
20029 | { pool , CMP_condn_D , 32 , 32, | |
20030 | 0xfc00003f, 0xa0000015, 0 , 0, | |
20031 | CP1_ }, /* CMP.condn.D */ | |
20032 | { reserved_block , 0 , 0 , 32, | |
20033 | 0xfc00003f, 0xa000001d, 0 , 0, | |
20034 | CP1_ }, /* POOL32F_5~*(3) */ | |
20035 | { reserved_block , 0 , 0 , 32, | |
20036 | 0xfc00003f, 0xa0000025, 0 , 0, | |
20037 | CP1_ }, /* POOL32F_5~*(4) */ | |
20038 | { reserved_block , 0 , 0 , 32, | |
20039 | 0xfc00003f, 0xa000002d, 0 , 0, | |
20040 | CP1_ }, /* POOL32F_5~*(5) */ | |
20041 | { reserved_block , 0 , 0 , 32, | |
20042 | 0xfc00003f, 0xa0000035, 0 , 0, | |
20043 | CP1_ }, /* POOL32F_5~*(6) */ | |
20044 | { reserved_block , 0 , 0 , 32, | |
20045 | 0xfc00003f, 0xa000003d, 0 , 0, | |
20046 | CP1_ }, /* POOL32F_5~*(7) */ | |
20047 | }; | |
20048 | ||
20049 | ||
a1465490 | 20050 | static const Pool POOL32F[8] = { |
89a955e8 AM |
20051 | { pool , POOL32F_0 , 64 , 32, |
20052 | 0xfc000007, 0xa0000000, 0 , 0, | |
20053 | CP1_ }, /* POOL32F_0 */ | |
20054 | { reserved_block , 0 , 0 , 32, | |
20055 | 0xfc000007, 0xa0000001, 0 , 0, | |
20056 | CP1_ }, /* POOL32F~*(1) */ | |
20057 | { reserved_block , 0 , 0 , 32, | |
20058 | 0xfc000007, 0xa0000002, 0 , 0, | |
20059 | CP1_ }, /* POOL32F~*(2) */ | |
20060 | { pool , POOL32F_3 , 8 , 32, | |
20061 | 0xfc000007, 0xa0000003, 0 , 0, | |
20062 | CP1_ }, /* POOL32F_3 */ | |
20063 | { reserved_block , 0 , 0 , 32, | |
20064 | 0xfc000007, 0xa0000004, 0 , 0, | |
20065 | CP1_ }, /* POOL32F~*(4) */ | |
20066 | { pool , POOL32F_5 , 8 , 32, | |
20067 | 0xfc000007, 0xa0000005, 0 , 0, | |
20068 | CP1_ }, /* POOL32F_5 */ | |
20069 | { reserved_block , 0 , 0 , 32, | |
20070 | 0xfc000007, 0xa0000006, 0 , 0, | |
20071 | CP1_ }, /* POOL32F~*(6) */ | |
20072 | { reserved_block , 0 , 0 , 32, | |
20073 | 0xfc000007, 0xa0000007, 0 , 0, | |
20074 | CP1_ }, /* POOL32F~*(7) */ | |
20075 | }; | |
20076 | ||
20077 | ||
a1465490 | 20078 | static const Pool POOL32S_0[64] = { |
89a955e8 AM |
20079 | { reserved_block , 0 , 0 , 32, |
20080 | 0xfc0001ff, 0xc0000000, 0 , 0, | |
20081 | 0x0 }, /* POOL32S_0~*(0) */ | |
20082 | { instruction , 0 , 0 , 32, | |
8d416f6b | 20083 | 0xfc0001ff, 0xc0000008, &DLSA , 0, |
89a955e8 AM |
20084 | MIPS64_ }, /* DLSA */ |
20085 | { instruction , 0 , 0 , 32, | |
8d416f6b | 20086 | 0xfc0001ff, 0xc0000010, &DSLLV , 0, |
89a955e8 AM |
20087 | MIPS64_ }, /* DSLLV */ |
20088 | { instruction , 0 , 0 , 32, | |
8d416f6b | 20089 | 0xfc0001ff, 0xc0000018, &DMUL , 0, |
89a955e8 AM |
20090 | MIPS64_ }, /* DMUL */ |
20091 | { reserved_block , 0 , 0 , 32, | |
20092 | 0xfc0001ff, 0xc0000020, 0 , 0, | |
20093 | 0x0 }, /* POOL32S_0~*(4) */ | |
20094 | { reserved_block , 0 , 0 , 32, | |
20095 | 0xfc0001ff, 0xc0000028, 0 , 0, | |
20096 | 0x0 }, /* POOL32S_0~*(5) */ | |
20097 | { reserved_block , 0 , 0 , 32, | |
20098 | 0xfc0001ff, 0xc0000030, 0 , 0, | |
20099 | 0x0 }, /* POOL32S_0~*(6) */ | |
20100 | { reserved_block , 0 , 0 , 32, | |
20101 | 0xfc0001ff, 0xc0000038, 0 , 0, | |
20102 | 0x0 }, /* POOL32S_0~*(7) */ | |
20103 | { reserved_block , 0 , 0 , 32, | |
20104 | 0xfc0001ff, 0xc0000040, 0 , 0, | |
20105 | 0x0 }, /* POOL32S_0~*(8) */ | |
20106 | { reserved_block , 0 , 0 , 32, | |
20107 | 0xfc0001ff, 0xc0000048, 0 , 0, | |
20108 | 0x0 }, /* POOL32S_0~*(9) */ | |
20109 | { instruction , 0 , 0 , 32, | |
8d416f6b | 20110 | 0xfc0001ff, 0xc0000050, &DSRLV , 0, |
89a955e8 AM |
20111 | MIPS64_ }, /* DSRLV */ |
20112 | { instruction , 0 , 0 , 32, | |
8d416f6b | 20113 | 0xfc0001ff, 0xc0000058, &DMUH , 0, |
89a955e8 AM |
20114 | MIPS64_ }, /* DMUH */ |
20115 | { reserved_block , 0 , 0 , 32, | |
20116 | 0xfc0001ff, 0xc0000060, 0 , 0, | |
20117 | 0x0 }, /* POOL32S_0~*(12) */ | |
20118 | { reserved_block , 0 , 0 , 32, | |
20119 | 0xfc0001ff, 0xc0000068, 0 , 0, | |
20120 | 0x0 }, /* POOL32S_0~*(13) */ | |
20121 | { reserved_block , 0 , 0 , 32, | |
20122 | 0xfc0001ff, 0xc0000070, 0 , 0, | |
20123 | 0x0 }, /* POOL32S_0~*(14) */ | |
20124 | { reserved_block , 0 , 0 , 32, | |
20125 | 0xfc0001ff, 0xc0000078, 0 , 0, | |
20126 | 0x0 }, /* POOL32S_0~*(15) */ | |
20127 | { reserved_block , 0 , 0 , 32, | |
20128 | 0xfc0001ff, 0xc0000080, 0 , 0, | |
20129 | 0x0 }, /* POOL32S_0~*(16) */ | |
20130 | { reserved_block , 0 , 0 , 32, | |
20131 | 0xfc0001ff, 0xc0000088, 0 , 0, | |
20132 | 0x0 }, /* POOL32S_0~*(17) */ | |
20133 | { instruction , 0 , 0 , 32, | |
8d416f6b | 20134 | 0xfc0001ff, 0xc0000090, &DSRAV , 0, |
89a955e8 AM |
20135 | MIPS64_ }, /* DSRAV */ |
20136 | { instruction , 0 , 0 , 32, | |
8d416f6b | 20137 | 0xfc0001ff, 0xc0000098, &DMULU , 0, |
89a955e8 AM |
20138 | MIPS64_ }, /* DMULU */ |
20139 | { reserved_block , 0 , 0 , 32, | |
20140 | 0xfc0001ff, 0xc00000a0, 0 , 0, | |
20141 | 0x0 }, /* POOL32S_0~*(20) */ | |
20142 | { reserved_block , 0 , 0 , 32, | |
20143 | 0xfc0001ff, 0xc00000a8, 0 , 0, | |
20144 | 0x0 }, /* POOL32S_0~*(21) */ | |
20145 | { reserved_block , 0 , 0 , 32, | |
20146 | 0xfc0001ff, 0xc00000b0, 0 , 0, | |
20147 | 0x0 }, /* POOL32S_0~*(22) */ | |
20148 | { reserved_block , 0 , 0 , 32, | |
20149 | 0xfc0001ff, 0xc00000b8, 0 , 0, | |
20150 | 0x0 }, /* POOL32S_0~*(23) */ | |
20151 | { reserved_block , 0 , 0 , 32, | |
20152 | 0xfc0001ff, 0xc00000c0, 0 , 0, | |
20153 | 0x0 }, /* POOL32S_0~*(24) */ | |
20154 | { reserved_block , 0 , 0 , 32, | |
20155 | 0xfc0001ff, 0xc00000c8, 0 , 0, | |
20156 | 0x0 }, /* POOL32S_0~*(25) */ | |
20157 | { instruction , 0 , 0 , 32, | |
8d416f6b | 20158 | 0xfc0001ff, 0xc00000d0, &DROTRV , 0, |
89a955e8 AM |
20159 | MIPS64_ }, /* DROTRV */ |
20160 | { instruction , 0 , 0 , 32, | |
8d416f6b | 20161 | 0xfc0001ff, 0xc00000d8, &DMUHU , 0, |
89a955e8 AM |
20162 | MIPS64_ }, /* DMUHU */ |
20163 | { reserved_block , 0 , 0 , 32, | |
20164 | 0xfc0001ff, 0xc00000e0, 0 , 0, | |
20165 | 0x0 }, /* POOL32S_0~*(28) */ | |
20166 | { reserved_block , 0 , 0 , 32, | |
20167 | 0xfc0001ff, 0xc00000e8, 0 , 0, | |
20168 | 0x0 }, /* POOL32S_0~*(29) */ | |
20169 | { reserved_block , 0 , 0 , 32, | |
20170 | 0xfc0001ff, 0xc00000f0, 0 , 0, | |
20171 | 0x0 }, /* POOL32S_0~*(30) */ | |
20172 | { reserved_block , 0 , 0 , 32, | |
20173 | 0xfc0001ff, 0xc00000f8, 0 , 0, | |
20174 | 0x0 }, /* POOL32S_0~*(31) */ | |
20175 | { reserved_block , 0 , 0 , 32, | |
20176 | 0xfc0001ff, 0xc0000100, 0 , 0, | |
20177 | 0x0 }, /* POOL32S_0~*(32) */ | |
20178 | { reserved_block , 0 , 0 , 32, | |
20179 | 0xfc0001ff, 0xc0000108, 0 , 0, | |
20180 | 0x0 }, /* POOL32S_0~*(33) */ | |
20181 | { instruction , 0 , 0 , 32, | |
8d416f6b | 20182 | 0xfc0001ff, 0xc0000110, &DADD , 0, |
89a955e8 AM |
20183 | MIPS64_ }, /* DADD */ |
20184 | { instruction , 0 , 0 , 32, | |
8d416f6b | 20185 | 0xfc0001ff, 0xc0000118, &DDIV , 0, |
89a955e8 AM |
20186 | MIPS64_ }, /* DDIV */ |
20187 | { reserved_block , 0 , 0 , 32, | |
20188 | 0xfc0001ff, 0xc0000120, 0 , 0, | |
20189 | 0x0 }, /* POOL32S_0~*(36) */ | |
20190 | { reserved_block , 0 , 0 , 32, | |
20191 | 0xfc0001ff, 0xc0000128, 0 , 0, | |
20192 | 0x0 }, /* POOL32S_0~*(37) */ | |
20193 | { reserved_block , 0 , 0 , 32, | |
20194 | 0xfc0001ff, 0xc0000130, 0 , 0, | |
20195 | 0x0 }, /* POOL32S_0~*(38) */ | |
20196 | { reserved_block , 0 , 0 , 32, | |
20197 | 0xfc0001ff, 0xc0000138, 0 , 0, | |
20198 | 0x0 }, /* POOL32S_0~*(39) */ | |
20199 | { reserved_block , 0 , 0 , 32, | |
20200 | 0xfc0001ff, 0xc0000140, 0 , 0, | |
20201 | 0x0 }, /* POOL32S_0~*(40) */ | |
20202 | { reserved_block , 0 , 0 , 32, | |
20203 | 0xfc0001ff, 0xc0000148, 0 , 0, | |
20204 | 0x0 }, /* POOL32S_0~*(41) */ | |
20205 | { instruction , 0 , 0 , 32, | |
8d416f6b | 20206 | 0xfc0001ff, 0xc0000150, &DADDU , 0, |
89a955e8 AM |
20207 | MIPS64_ }, /* DADDU */ |
20208 | { instruction , 0 , 0 , 32, | |
8d416f6b | 20209 | 0xfc0001ff, 0xc0000158, &DMOD , 0, |
89a955e8 AM |
20210 | MIPS64_ }, /* DMOD */ |
20211 | { reserved_block , 0 , 0 , 32, | |
20212 | 0xfc0001ff, 0xc0000160, 0 , 0, | |
20213 | 0x0 }, /* POOL32S_0~*(44) */ | |
20214 | { reserved_block , 0 , 0 , 32, | |
20215 | 0xfc0001ff, 0xc0000168, 0 , 0, | |
20216 | 0x0 }, /* POOL32S_0~*(45) */ | |
20217 | { reserved_block , 0 , 0 , 32, | |
20218 | 0xfc0001ff, 0xc0000170, 0 , 0, | |
20219 | 0x0 }, /* POOL32S_0~*(46) */ | |
20220 | { reserved_block , 0 , 0 , 32, | |
20221 | 0xfc0001ff, 0xc0000178, 0 , 0, | |
20222 | 0x0 }, /* POOL32S_0~*(47) */ | |
20223 | { reserved_block , 0 , 0 , 32, | |
20224 | 0xfc0001ff, 0xc0000180, 0 , 0, | |
20225 | 0x0 }, /* POOL32S_0~*(48) */ | |
20226 | { reserved_block , 0 , 0 , 32, | |
20227 | 0xfc0001ff, 0xc0000188, 0 , 0, | |
20228 | 0x0 }, /* POOL32S_0~*(49) */ | |
20229 | { instruction , 0 , 0 , 32, | |
8d416f6b | 20230 | 0xfc0001ff, 0xc0000190, &DSUB , 0, |
89a955e8 AM |
20231 | MIPS64_ }, /* DSUB */ |
20232 | { instruction , 0 , 0 , 32, | |
8d416f6b | 20233 | 0xfc0001ff, 0xc0000198, &DDIVU , 0, |
89a955e8 AM |
20234 | MIPS64_ }, /* DDIVU */ |
20235 | { reserved_block , 0 , 0 , 32, | |
20236 | 0xfc0001ff, 0xc00001a0, 0 , 0, | |
20237 | 0x0 }, /* POOL32S_0~*(52) */ | |
20238 | { reserved_block , 0 , 0 , 32, | |
20239 | 0xfc0001ff, 0xc00001a8, 0 , 0, | |
20240 | 0x0 }, /* POOL32S_0~*(53) */ | |
20241 | { reserved_block , 0 , 0 , 32, | |
20242 | 0xfc0001ff, 0xc00001b0, 0 , 0, | |
20243 | 0x0 }, /* POOL32S_0~*(54) */ | |
20244 | { reserved_block , 0 , 0 , 32, | |
20245 | 0xfc0001ff, 0xc00001b8, 0 , 0, | |
20246 | 0x0 }, /* POOL32S_0~*(55) */ | |
20247 | { reserved_block , 0 , 0 , 32, | |
20248 | 0xfc0001ff, 0xc00001c0, 0 , 0, | |
20249 | 0x0 }, /* POOL32S_0~*(56) */ | |
20250 | { reserved_block , 0 , 0 , 32, | |
20251 | 0xfc0001ff, 0xc00001c8, 0 , 0, | |
20252 | 0x0 }, /* POOL32S_0~*(57) */ | |
20253 | { instruction , 0 , 0 , 32, | |
8d416f6b | 20254 | 0xfc0001ff, 0xc00001d0, &DSUBU , 0, |
89a955e8 AM |
20255 | MIPS64_ }, /* DSUBU */ |
20256 | { instruction , 0 , 0 , 32, | |
8d416f6b | 20257 | 0xfc0001ff, 0xc00001d8, &DMODU , 0, |
89a955e8 AM |
20258 | MIPS64_ }, /* DMODU */ |
20259 | { reserved_block , 0 , 0 , 32, | |
20260 | 0xfc0001ff, 0xc00001e0, 0 , 0, | |
20261 | 0x0 }, /* POOL32S_0~*(60) */ | |
20262 | { reserved_block , 0 , 0 , 32, | |
20263 | 0xfc0001ff, 0xc00001e8, 0 , 0, | |
20264 | 0x0 }, /* POOL32S_0~*(61) */ | |
20265 | { reserved_block , 0 , 0 , 32, | |
20266 | 0xfc0001ff, 0xc00001f0, 0 , 0, | |
20267 | 0x0 }, /* POOL32S_0~*(62) */ | |
20268 | { reserved_block , 0 , 0 , 32, | |
20269 | 0xfc0001ff, 0xc00001f8, 0 , 0, | |
20270 | 0x0 }, /* POOL32S_0~*(63) */ | |
20271 | }; | |
20272 | ||
20273 | ||
a1465490 | 20274 | static const Pool POOL32Sxf_4[128] = { |
89a955e8 AM |
20275 | { reserved_block , 0 , 0 , 32, |
20276 | 0xfc00ffff, 0xc000013c, 0 , 0, | |
20277 | 0x0 }, /* POOL32Sxf_4~*(0) */ | |
20278 | { reserved_block , 0 , 0 , 32, | |
20279 | 0xfc00ffff, 0xc000033c, 0 , 0, | |
20280 | 0x0 }, /* POOL32Sxf_4~*(1) */ | |
20281 | { reserved_block , 0 , 0 , 32, | |
20282 | 0xfc00ffff, 0xc000053c, 0 , 0, | |
20283 | 0x0 }, /* POOL32Sxf_4~*(2) */ | |
20284 | { reserved_block , 0 , 0 , 32, | |
20285 | 0xfc00ffff, 0xc000073c, 0 , 0, | |
20286 | 0x0 }, /* POOL32Sxf_4~*(3) */ | |
20287 | { reserved_block , 0 , 0 , 32, | |
20288 | 0xfc00ffff, 0xc000093c, 0 , 0, | |
20289 | 0x0 }, /* POOL32Sxf_4~*(4) */ | |
20290 | { reserved_block , 0 , 0 , 32, | |
20291 | 0xfc00ffff, 0xc0000b3c, 0 , 0, | |
20292 | 0x0 }, /* POOL32Sxf_4~*(5) */ | |
20293 | { reserved_block , 0 , 0 , 32, | |
20294 | 0xfc00ffff, 0xc0000d3c, 0 , 0, | |
20295 | 0x0 }, /* POOL32Sxf_4~*(6) */ | |
20296 | { reserved_block , 0 , 0 , 32, | |
20297 | 0xfc00ffff, 0xc0000f3c, 0 , 0, | |
20298 | 0x0 }, /* POOL32Sxf_4~*(7) */ | |
20299 | { reserved_block , 0 , 0 , 32, | |
20300 | 0xfc00ffff, 0xc000113c, 0 , 0, | |
20301 | 0x0 }, /* POOL32Sxf_4~*(8) */ | |
20302 | { reserved_block , 0 , 0 , 32, | |
20303 | 0xfc00ffff, 0xc000133c, 0 , 0, | |
20304 | 0x0 }, /* POOL32Sxf_4~*(9) */ | |
20305 | { reserved_block , 0 , 0 , 32, | |
20306 | 0xfc00ffff, 0xc000153c, 0 , 0, | |
20307 | 0x0 }, /* POOL32Sxf_4~*(10) */ | |
20308 | { reserved_block , 0 , 0 , 32, | |
20309 | 0xfc00ffff, 0xc000173c, 0 , 0, | |
20310 | 0x0 }, /* POOL32Sxf_4~*(11) */ | |
20311 | { reserved_block , 0 , 0 , 32, | |
20312 | 0xfc00ffff, 0xc000193c, 0 , 0, | |
20313 | 0x0 }, /* POOL32Sxf_4~*(12) */ | |
20314 | { reserved_block , 0 , 0 , 32, | |
20315 | 0xfc00ffff, 0xc0001b3c, 0 , 0, | |
20316 | 0x0 }, /* POOL32Sxf_4~*(13) */ | |
20317 | { reserved_block , 0 , 0 , 32, | |
20318 | 0xfc00ffff, 0xc0001d3c, 0 , 0, | |
20319 | 0x0 }, /* POOL32Sxf_4~*(14) */ | |
20320 | { reserved_block , 0 , 0 , 32, | |
20321 | 0xfc00ffff, 0xc0001f3c, 0 , 0, | |
20322 | 0x0 }, /* POOL32Sxf_4~*(15) */ | |
20323 | { reserved_block , 0 , 0 , 32, | |
20324 | 0xfc00ffff, 0xc000213c, 0 , 0, | |
20325 | 0x0 }, /* POOL32Sxf_4~*(16) */ | |
20326 | { reserved_block , 0 , 0 , 32, | |
20327 | 0xfc00ffff, 0xc000233c, 0 , 0, | |
20328 | 0x0 }, /* POOL32Sxf_4~*(17) */ | |
20329 | { reserved_block , 0 , 0 , 32, | |
20330 | 0xfc00ffff, 0xc000253c, 0 , 0, | |
20331 | 0x0 }, /* POOL32Sxf_4~*(18) */ | |
20332 | { reserved_block , 0 , 0 , 32, | |
20333 | 0xfc00ffff, 0xc000273c, 0 , 0, | |
20334 | 0x0 }, /* POOL32Sxf_4~*(19) */ | |
20335 | { reserved_block , 0 , 0 , 32, | |
20336 | 0xfc00ffff, 0xc000293c, 0 , 0, | |
20337 | 0x0 }, /* POOL32Sxf_4~*(20) */ | |
20338 | { reserved_block , 0 , 0 , 32, | |
20339 | 0xfc00ffff, 0xc0002b3c, 0 , 0, | |
20340 | 0x0 }, /* POOL32Sxf_4~*(21) */ | |
20341 | { reserved_block , 0 , 0 , 32, | |
20342 | 0xfc00ffff, 0xc0002d3c, 0 , 0, | |
20343 | 0x0 }, /* POOL32Sxf_4~*(22) */ | |
20344 | { reserved_block , 0 , 0 , 32, | |
20345 | 0xfc00ffff, 0xc0002f3c, 0 , 0, | |
20346 | 0x0 }, /* POOL32Sxf_4~*(23) */ | |
20347 | { reserved_block , 0 , 0 , 32, | |
20348 | 0xfc00ffff, 0xc000313c, 0 , 0, | |
20349 | 0x0 }, /* POOL32Sxf_4~*(24) */ | |
20350 | { reserved_block , 0 , 0 , 32, | |
20351 | 0xfc00ffff, 0xc000333c, 0 , 0, | |
20352 | 0x0 }, /* POOL32Sxf_4~*(25) */ | |
20353 | { reserved_block , 0 , 0 , 32, | |
20354 | 0xfc00ffff, 0xc000353c, 0 , 0, | |
20355 | 0x0 }, /* POOL32Sxf_4~*(26) */ | |
20356 | { reserved_block , 0 , 0 , 32, | |
20357 | 0xfc00ffff, 0xc000373c, 0 , 0, | |
20358 | 0x0 }, /* POOL32Sxf_4~*(27) */ | |
20359 | { reserved_block , 0 , 0 , 32, | |
20360 | 0xfc00ffff, 0xc000393c, 0 , 0, | |
20361 | 0x0 }, /* POOL32Sxf_4~*(28) */ | |
20362 | { reserved_block , 0 , 0 , 32, | |
20363 | 0xfc00ffff, 0xc0003b3c, 0 , 0, | |
20364 | 0x0 }, /* POOL32Sxf_4~*(29) */ | |
20365 | { reserved_block , 0 , 0 , 32, | |
20366 | 0xfc00ffff, 0xc0003d3c, 0 , 0, | |
20367 | 0x0 }, /* POOL32Sxf_4~*(30) */ | |
20368 | { reserved_block , 0 , 0 , 32, | |
20369 | 0xfc00ffff, 0xc0003f3c, 0 , 0, | |
20370 | 0x0 }, /* POOL32Sxf_4~*(31) */ | |
20371 | { reserved_block , 0 , 0 , 32, | |
20372 | 0xfc00ffff, 0xc000413c, 0 , 0, | |
20373 | 0x0 }, /* POOL32Sxf_4~*(32) */ | |
20374 | { reserved_block , 0 , 0 , 32, | |
20375 | 0xfc00ffff, 0xc000433c, 0 , 0, | |
20376 | 0x0 }, /* POOL32Sxf_4~*(33) */ | |
20377 | { reserved_block , 0 , 0 , 32, | |
20378 | 0xfc00ffff, 0xc000453c, 0 , 0, | |
20379 | 0x0 }, /* POOL32Sxf_4~*(34) */ | |
20380 | { reserved_block , 0 , 0 , 32, | |
20381 | 0xfc00ffff, 0xc000473c, 0 , 0, | |
20382 | 0x0 }, /* POOL32Sxf_4~*(35) */ | |
20383 | { reserved_block , 0 , 0 , 32, | |
20384 | 0xfc00ffff, 0xc000493c, 0 , 0, | |
20385 | 0x0 }, /* POOL32Sxf_4~*(36) */ | |
20386 | { instruction , 0 , 0 , 32, | |
8d416f6b | 20387 | 0xfc00ffff, 0xc0004b3c, &DCLO , 0, |
89a955e8 AM |
20388 | MIPS64_ }, /* DCLO */ |
20389 | { reserved_block , 0 , 0 , 32, | |
20390 | 0xfc00ffff, 0xc0004d3c, 0 , 0, | |
20391 | 0x0 }, /* POOL32Sxf_4~*(38) */ | |
20392 | { reserved_block , 0 , 0 , 32, | |
20393 | 0xfc00ffff, 0xc0004f3c, 0 , 0, | |
20394 | 0x0 }, /* POOL32Sxf_4~*(39) */ | |
20395 | { reserved_block , 0 , 0 , 32, | |
20396 | 0xfc00ffff, 0xc000513c, 0 , 0, | |
20397 | 0x0 }, /* POOL32Sxf_4~*(40) */ | |
20398 | { reserved_block , 0 , 0 , 32, | |
20399 | 0xfc00ffff, 0xc000533c, 0 , 0, | |
20400 | 0x0 }, /* POOL32Sxf_4~*(41) */ | |
20401 | { reserved_block , 0 , 0 , 32, | |
20402 | 0xfc00ffff, 0xc000553c, 0 , 0, | |
20403 | 0x0 }, /* POOL32Sxf_4~*(42) */ | |
20404 | { reserved_block , 0 , 0 , 32, | |
20405 | 0xfc00ffff, 0xc000573c, 0 , 0, | |
20406 | 0x0 }, /* POOL32Sxf_4~*(43) */ | |
20407 | { reserved_block , 0 , 0 , 32, | |
20408 | 0xfc00ffff, 0xc000593c, 0 , 0, | |
20409 | 0x0 }, /* POOL32Sxf_4~*(44) */ | |
20410 | { instruction , 0 , 0 , 32, | |
8d416f6b | 20411 | 0xfc00ffff, 0xc0005b3c, &DCLZ , 0, |
89a955e8 AM |
20412 | MIPS64_ }, /* DCLZ */ |
20413 | { reserved_block , 0 , 0 , 32, | |
20414 | 0xfc00ffff, 0xc0005d3c, 0 , 0, | |
20415 | 0x0 }, /* POOL32Sxf_4~*(46) */ | |
20416 | { reserved_block , 0 , 0 , 32, | |
20417 | 0xfc00ffff, 0xc0005f3c, 0 , 0, | |
20418 | 0x0 }, /* POOL32Sxf_4~*(47) */ | |
20419 | { reserved_block , 0 , 0 , 32, | |
20420 | 0xfc00ffff, 0xc000613c, 0 , 0, | |
20421 | 0x0 }, /* POOL32Sxf_4~*(48) */ | |
20422 | { reserved_block , 0 , 0 , 32, | |
20423 | 0xfc00ffff, 0xc000633c, 0 , 0, | |
20424 | 0x0 }, /* POOL32Sxf_4~*(49) */ | |
20425 | { reserved_block , 0 , 0 , 32, | |
20426 | 0xfc00ffff, 0xc000653c, 0 , 0, | |
20427 | 0x0 }, /* POOL32Sxf_4~*(50) */ | |
20428 | { reserved_block , 0 , 0 , 32, | |
20429 | 0xfc00ffff, 0xc000673c, 0 , 0, | |
20430 | 0x0 }, /* POOL32Sxf_4~*(51) */ | |
20431 | { reserved_block , 0 , 0 , 32, | |
20432 | 0xfc00ffff, 0xc000693c, 0 , 0, | |
20433 | 0x0 }, /* POOL32Sxf_4~*(52) */ | |
20434 | { reserved_block , 0 , 0 , 32, | |
20435 | 0xfc00ffff, 0xc0006b3c, 0 , 0, | |
20436 | 0x0 }, /* POOL32Sxf_4~*(53) */ | |
20437 | { reserved_block , 0 , 0 , 32, | |
20438 | 0xfc00ffff, 0xc0006d3c, 0 , 0, | |
20439 | 0x0 }, /* POOL32Sxf_4~*(54) */ | |
20440 | { reserved_block , 0 , 0 , 32, | |
20441 | 0xfc00ffff, 0xc0006f3c, 0 , 0, | |
20442 | 0x0 }, /* POOL32Sxf_4~*(55) */ | |
20443 | { reserved_block , 0 , 0 , 32, | |
20444 | 0xfc00ffff, 0xc000713c, 0 , 0, | |
20445 | 0x0 }, /* POOL32Sxf_4~*(56) */ | |
20446 | { reserved_block , 0 , 0 , 32, | |
20447 | 0xfc00ffff, 0xc000733c, 0 , 0, | |
20448 | 0x0 }, /* POOL32Sxf_4~*(57) */ | |
20449 | { reserved_block , 0 , 0 , 32, | |
20450 | 0xfc00ffff, 0xc000753c, 0 , 0, | |
20451 | 0x0 }, /* POOL32Sxf_4~*(58) */ | |
20452 | { reserved_block , 0 , 0 , 32, | |
20453 | 0xfc00ffff, 0xc000773c, 0 , 0, | |
20454 | 0x0 }, /* POOL32Sxf_4~*(59) */ | |
20455 | { reserved_block , 0 , 0 , 32, | |
20456 | 0xfc00ffff, 0xc000793c, 0 , 0, | |
20457 | 0x0 }, /* POOL32Sxf_4~*(60) */ | |
20458 | { reserved_block , 0 , 0 , 32, | |
20459 | 0xfc00ffff, 0xc0007b3c, 0 , 0, | |
20460 | 0x0 }, /* POOL32Sxf_4~*(61) */ | |
20461 | { reserved_block , 0 , 0 , 32, | |
20462 | 0xfc00ffff, 0xc0007d3c, 0 , 0, | |
20463 | 0x0 }, /* POOL32Sxf_4~*(62) */ | |
20464 | { reserved_block , 0 , 0 , 32, | |
20465 | 0xfc00ffff, 0xc0007f3c, 0 , 0, | |
20466 | 0x0 }, /* POOL32Sxf_4~*(63) */ | |
20467 | { reserved_block , 0 , 0 , 32, | |
20468 | 0xfc00ffff, 0xc000813c, 0 , 0, | |
20469 | 0x0 }, /* POOL32Sxf_4~*(64) */ | |
20470 | { reserved_block , 0 , 0 , 32, | |
20471 | 0xfc00ffff, 0xc000833c, 0 , 0, | |
20472 | 0x0 }, /* POOL32Sxf_4~*(65) */ | |
20473 | { reserved_block , 0 , 0 , 32, | |
20474 | 0xfc00ffff, 0xc000853c, 0 , 0, | |
20475 | 0x0 }, /* POOL32Sxf_4~*(66) */ | |
20476 | { reserved_block , 0 , 0 , 32, | |
20477 | 0xfc00ffff, 0xc000873c, 0 , 0, | |
20478 | 0x0 }, /* POOL32Sxf_4~*(67) */ | |
20479 | { reserved_block , 0 , 0 , 32, | |
20480 | 0xfc00ffff, 0xc000893c, 0 , 0, | |
20481 | 0x0 }, /* POOL32Sxf_4~*(68) */ | |
20482 | { reserved_block , 0 , 0 , 32, | |
20483 | 0xfc00ffff, 0xc0008b3c, 0 , 0, | |
20484 | 0x0 }, /* POOL32Sxf_4~*(69) */ | |
20485 | { reserved_block , 0 , 0 , 32, | |
20486 | 0xfc00ffff, 0xc0008d3c, 0 , 0, | |
20487 | 0x0 }, /* POOL32Sxf_4~*(70) */ | |
20488 | { reserved_block , 0 , 0 , 32, | |
20489 | 0xfc00ffff, 0xc0008f3c, 0 , 0, | |
20490 | 0x0 }, /* POOL32Sxf_4~*(71) */ | |
20491 | { reserved_block , 0 , 0 , 32, | |
20492 | 0xfc00ffff, 0xc000913c, 0 , 0, | |
20493 | 0x0 }, /* POOL32Sxf_4~*(72) */ | |
20494 | { reserved_block , 0 , 0 , 32, | |
20495 | 0xfc00ffff, 0xc000933c, 0 , 0, | |
20496 | 0x0 }, /* POOL32Sxf_4~*(73) */ | |
20497 | { reserved_block , 0 , 0 , 32, | |
20498 | 0xfc00ffff, 0xc000953c, 0 , 0, | |
20499 | 0x0 }, /* POOL32Sxf_4~*(74) */ | |
20500 | { reserved_block , 0 , 0 , 32, | |
20501 | 0xfc00ffff, 0xc000973c, 0 , 0, | |
20502 | 0x0 }, /* POOL32Sxf_4~*(75) */ | |
20503 | { reserved_block , 0 , 0 , 32, | |
20504 | 0xfc00ffff, 0xc000993c, 0 , 0, | |
20505 | 0x0 }, /* POOL32Sxf_4~*(76) */ | |
20506 | { reserved_block , 0 , 0 , 32, | |
20507 | 0xfc00ffff, 0xc0009b3c, 0 , 0, | |
20508 | 0x0 }, /* POOL32Sxf_4~*(77) */ | |
20509 | { reserved_block , 0 , 0 , 32, | |
20510 | 0xfc00ffff, 0xc0009d3c, 0 , 0, | |
20511 | 0x0 }, /* POOL32Sxf_4~*(78) */ | |
20512 | { reserved_block , 0 , 0 , 32, | |
20513 | 0xfc00ffff, 0xc0009f3c, 0 , 0, | |
20514 | 0x0 }, /* POOL32Sxf_4~*(79) */ | |
20515 | { reserved_block , 0 , 0 , 32, | |
20516 | 0xfc00ffff, 0xc000a13c, 0 , 0, | |
20517 | 0x0 }, /* POOL32Sxf_4~*(80) */ | |
20518 | { reserved_block , 0 , 0 , 32, | |
20519 | 0xfc00ffff, 0xc000a33c, 0 , 0, | |
20520 | 0x0 }, /* POOL32Sxf_4~*(81) */ | |
20521 | { reserved_block , 0 , 0 , 32, | |
20522 | 0xfc00ffff, 0xc000a53c, 0 , 0, | |
20523 | 0x0 }, /* POOL32Sxf_4~*(82) */ | |
20524 | { reserved_block , 0 , 0 , 32, | |
20525 | 0xfc00ffff, 0xc000a73c, 0 , 0, | |
20526 | 0x0 }, /* POOL32Sxf_4~*(83) */ | |
20527 | { reserved_block , 0 , 0 , 32, | |
20528 | 0xfc00ffff, 0xc000a93c, 0 , 0, | |
20529 | 0x0 }, /* POOL32Sxf_4~*(84) */ | |
20530 | { reserved_block , 0 , 0 , 32, | |
20531 | 0xfc00ffff, 0xc000ab3c, 0 , 0, | |
20532 | 0x0 }, /* POOL32Sxf_4~*(85) */ | |
20533 | { reserved_block , 0 , 0 , 32, | |
20534 | 0xfc00ffff, 0xc000ad3c, 0 , 0, | |
20535 | 0x0 }, /* POOL32Sxf_4~*(86) */ | |
20536 | { reserved_block , 0 , 0 , 32, | |
20537 | 0xfc00ffff, 0xc000af3c, 0 , 0, | |
20538 | 0x0 }, /* POOL32Sxf_4~*(87) */ | |
20539 | { reserved_block , 0 , 0 , 32, | |
20540 | 0xfc00ffff, 0xc000b13c, 0 , 0, | |
20541 | 0x0 }, /* POOL32Sxf_4~*(88) */ | |
20542 | { reserved_block , 0 , 0 , 32, | |
20543 | 0xfc00ffff, 0xc000b33c, 0 , 0, | |
20544 | 0x0 }, /* POOL32Sxf_4~*(89) */ | |
20545 | { reserved_block , 0 , 0 , 32, | |
20546 | 0xfc00ffff, 0xc000b53c, 0 , 0, | |
20547 | 0x0 }, /* POOL32Sxf_4~*(90) */ | |
20548 | { reserved_block , 0 , 0 , 32, | |
20549 | 0xfc00ffff, 0xc000b73c, 0 , 0, | |
20550 | 0x0 }, /* POOL32Sxf_4~*(91) */ | |
20551 | { reserved_block , 0 , 0 , 32, | |
20552 | 0xfc00ffff, 0xc000b93c, 0 , 0, | |
20553 | 0x0 }, /* POOL32Sxf_4~*(92) */ | |
20554 | { reserved_block , 0 , 0 , 32, | |
20555 | 0xfc00ffff, 0xc000bb3c, 0 , 0, | |
20556 | 0x0 }, /* POOL32Sxf_4~*(93) */ | |
20557 | { reserved_block , 0 , 0 , 32, | |
20558 | 0xfc00ffff, 0xc000bd3c, 0 , 0, | |
20559 | 0x0 }, /* POOL32Sxf_4~*(94) */ | |
20560 | { reserved_block , 0 , 0 , 32, | |
20561 | 0xfc00ffff, 0xc000bf3c, 0 , 0, | |
20562 | 0x0 }, /* POOL32Sxf_4~*(95) */ | |
20563 | { reserved_block , 0 , 0 , 32, | |
20564 | 0xfc00ffff, 0xc000c13c, 0 , 0, | |
20565 | 0x0 }, /* POOL32Sxf_4~*(96) */ | |
20566 | { reserved_block , 0 , 0 , 32, | |
20567 | 0xfc00ffff, 0xc000c33c, 0 , 0, | |
20568 | 0x0 }, /* POOL32Sxf_4~*(97) */ | |
20569 | { reserved_block , 0 , 0 , 32, | |
20570 | 0xfc00ffff, 0xc000c53c, 0 , 0, | |
20571 | 0x0 }, /* POOL32Sxf_4~*(98) */ | |
20572 | { reserved_block , 0 , 0 , 32, | |
20573 | 0xfc00ffff, 0xc000c73c, 0 , 0, | |
20574 | 0x0 }, /* POOL32Sxf_4~*(99) */ | |
20575 | { reserved_block , 0 , 0 , 32, | |
20576 | 0xfc00ffff, 0xc000c93c, 0 , 0, | |
20577 | 0x0 }, /* POOL32Sxf_4~*(100) */ | |
20578 | { reserved_block , 0 , 0 , 32, | |
20579 | 0xfc00ffff, 0xc000cb3c, 0 , 0, | |
20580 | 0x0 }, /* POOL32Sxf_4~*(101) */ | |
20581 | { reserved_block , 0 , 0 , 32, | |
20582 | 0xfc00ffff, 0xc000cd3c, 0 , 0, | |
20583 | 0x0 }, /* POOL32Sxf_4~*(102) */ | |
20584 | { reserved_block , 0 , 0 , 32, | |
20585 | 0xfc00ffff, 0xc000cf3c, 0 , 0, | |
20586 | 0x0 }, /* POOL32Sxf_4~*(103) */ | |
20587 | { reserved_block , 0 , 0 , 32, | |
20588 | 0xfc00ffff, 0xc000d13c, 0 , 0, | |
20589 | 0x0 }, /* POOL32Sxf_4~*(104) */ | |
20590 | { reserved_block , 0 , 0 , 32, | |
20591 | 0xfc00ffff, 0xc000d33c, 0 , 0, | |
20592 | 0x0 }, /* POOL32Sxf_4~*(105) */ | |
20593 | { reserved_block , 0 , 0 , 32, | |
20594 | 0xfc00ffff, 0xc000d53c, 0 , 0, | |
20595 | 0x0 }, /* POOL32Sxf_4~*(106) */ | |
20596 | { reserved_block , 0 , 0 , 32, | |
20597 | 0xfc00ffff, 0xc000d73c, 0 , 0, | |
20598 | 0x0 }, /* POOL32Sxf_4~*(107) */ | |
20599 | { reserved_block , 0 , 0 , 32, | |
20600 | 0xfc00ffff, 0xc000d93c, 0 , 0, | |
20601 | 0x0 }, /* POOL32Sxf_4~*(108) */ | |
20602 | { reserved_block , 0 , 0 , 32, | |
20603 | 0xfc00ffff, 0xc000db3c, 0 , 0, | |
20604 | 0x0 }, /* POOL32Sxf_4~*(109) */ | |
20605 | { reserved_block , 0 , 0 , 32, | |
20606 | 0xfc00ffff, 0xc000dd3c, 0 , 0, | |
20607 | 0x0 }, /* POOL32Sxf_4~*(110) */ | |
20608 | { reserved_block , 0 , 0 , 32, | |
20609 | 0xfc00ffff, 0xc000df3c, 0 , 0, | |
20610 | 0x0 }, /* POOL32Sxf_4~*(111) */ | |
20611 | { reserved_block , 0 , 0 , 32, | |
20612 | 0xfc00ffff, 0xc000e13c, 0 , 0, | |
20613 | 0x0 }, /* POOL32Sxf_4~*(112) */ | |
20614 | { reserved_block , 0 , 0 , 32, | |
20615 | 0xfc00ffff, 0xc000e33c, 0 , 0, | |
20616 | 0x0 }, /* POOL32Sxf_4~*(113) */ | |
20617 | { reserved_block , 0 , 0 , 32, | |
20618 | 0xfc00ffff, 0xc000e53c, 0 , 0, | |
20619 | 0x0 }, /* POOL32Sxf_4~*(114) */ | |
20620 | { reserved_block , 0 , 0 , 32, | |
20621 | 0xfc00ffff, 0xc000e73c, 0 , 0, | |
20622 | 0x0 }, /* POOL32Sxf_4~*(115) */ | |
20623 | { reserved_block , 0 , 0 , 32, | |
20624 | 0xfc00ffff, 0xc000e93c, 0 , 0, | |
20625 | 0x0 }, /* POOL32Sxf_4~*(116) */ | |
20626 | { reserved_block , 0 , 0 , 32, | |
20627 | 0xfc00ffff, 0xc000eb3c, 0 , 0, | |
20628 | 0x0 }, /* POOL32Sxf_4~*(117) */ | |
20629 | { reserved_block , 0 , 0 , 32, | |
20630 | 0xfc00ffff, 0xc000ed3c, 0 , 0, | |
20631 | 0x0 }, /* POOL32Sxf_4~*(118) */ | |
20632 | { reserved_block , 0 , 0 , 32, | |
20633 | 0xfc00ffff, 0xc000ef3c, 0 , 0, | |
20634 | 0x0 }, /* POOL32Sxf_4~*(119) */ | |
20635 | { reserved_block , 0 , 0 , 32, | |
20636 | 0xfc00ffff, 0xc000f13c, 0 , 0, | |
20637 | 0x0 }, /* POOL32Sxf_4~*(120) */ | |
20638 | { reserved_block , 0 , 0 , 32, | |
20639 | 0xfc00ffff, 0xc000f33c, 0 , 0, | |
20640 | 0x0 }, /* POOL32Sxf_4~*(121) */ | |
20641 | { reserved_block , 0 , 0 , 32, | |
20642 | 0xfc00ffff, 0xc000f53c, 0 , 0, | |
20643 | 0x0 }, /* POOL32Sxf_4~*(122) */ | |
20644 | { reserved_block , 0 , 0 , 32, | |
20645 | 0xfc00ffff, 0xc000f73c, 0 , 0, | |
20646 | 0x0 }, /* POOL32Sxf_4~*(123) */ | |
20647 | { reserved_block , 0 , 0 , 32, | |
20648 | 0xfc00ffff, 0xc000f93c, 0 , 0, | |
20649 | 0x0 }, /* POOL32Sxf_4~*(124) */ | |
20650 | { reserved_block , 0 , 0 , 32, | |
20651 | 0xfc00ffff, 0xc000fb3c, 0 , 0, | |
20652 | 0x0 }, /* POOL32Sxf_4~*(125) */ | |
20653 | { reserved_block , 0 , 0 , 32, | |
20654 | 0xfc00ffff, 0xc000fd3c, 0 , 0, | |
20655 | 0x0 }, /* POOL32Sxf_4~*(126) */ | |
20656 | { reserved_block , 0 , 0 , 32, | |
20657 | 0xfc00ffff, 0xc000ff3c, 0 , 0, | |
20658 | 0x0 }, /* POOL32Sxf_4~*(127) */ | |
20659 | }; | |
20660 | ||
20661 | ||
a1465490 | 20662 | static const Pool POOL32Sxf[8] = { |
89a955e8 AM |
20663 | { reserved_block , 0 , 0 , 32, |
20664 | 0xfc0001ff, 0xc000003c, 0 , 0, | |
20665 | 0x0 }, /* POOL32Sxf~*(0) */ | |
20666 | { reserved_block , 0 , 0 , 32, | |
20667 | 0xfc0001ff, 0xc000007c, 0 , 0, | |
20668 | 0x0 }, /* POOL32Sxf~*(1) */ | |
20669 | { reserved_block , 0 , 0 , 32, | |
20670 | 0xfc0001ff, 0xc00000bc, 0 , 0, | |
20671 | 0x0 }, /* POOL32Sxf~*(2) */ | |
20672 | { reserved_block , 0 , 0 , 32, | |
20673 | 0xfc0001ff, 0xc00000fc, 0 , 0, | |
20674 | 0x0 }, /* POOL32Sxf~*(3) */ | |
20675 | { pool , POOL32Sxf_4 , 128 , 32, | |
20676 | 0xfc0001ff, 0xc000013c, 0 , 0, | |
20677 | 0x0 }, /* POOL32Sxf_4 */ | |
20678 | { reserved_block , 0 , 0 , 32, | |
20679 | 0xfc0001ff, 0xc000017c, 0 , 0, | |
20680 | 0x0 }, /* POOL32Sxf~*(5) */ | |
20681 | { reserved_block , 0 , 0 , 32, | |
20682 | 0xfc0001ff, 0xc00001bc, 0 , 0, | |
20683 | 0x0 }, /* POOL32Sxf~*(6) */ | |
20684 | { reserved_block , 0 , 0 , 32, | |
20685 | 0xfc0001ff, 0xc00001fc, 0 , 0, | |
20686 | 0x0 }, /* POOL32Sxf~*(7) */ | |
20687 | }; | |
20688 | ||
20689 | ||
a1465490 | 20690 | static const Pool POOL32S_4[8] = { |
89a955e8 | 20691 | { instruction , 0 , 0 , 32, |
8d416f6b | 20692 | 0xfc00003f, 0xc0000004, &EXTD , 0, |
89a955e8 AM |
20693 | MIPS64_ }, /* EXTD */ |
20694 | { instruction , 0 , 0 , 32, | |
8d416f6b | 20695 | 0xfc00003f, 0xc000000c, &EXTD32 , 0, |
89a955e8 AM |
20696 | MIPS64_ }, /* EXTD32 */ |
20697 | { reserved_block , 0 , 0 , 32, | |
20698 | 0xfc00003f, 0xc0000014, 0 , 0, | |
20699 | 0x0 }, /* POOL32S_4~*(2) */ | |
20700 | { reserved_block , 0 , 0 , 32, | |
20701 | 0xfc00003f, 0xc000001c, 0 , 0, | |
20702 | 0x0 }, /* POOL32S_4~*(3) */ | |
20703 | { reserved_block , 0 , 0 , 32, | |
20704 | 0xfc00003f, 0xc0000024, 0 , 0, | |
20705 | 0x0 }, /* POOL32S_4~*(4) */ | |
20706 | { reserved_block , 0 , 0 , 32, | |
20707 | 0xfc00003f, 0xc000002c, 0 , 0, | |
20708 | 0x0 }, /* POOL32S_4~*(5) */ | |
20709 | { reserved_block , 0 , 0 , 32, | |
20710 | 0xfc00003f, 0xc0000034, 0 , 0, | |
20711 | 0x0 }, /* POOL32S_4~*(6) */ | |
20712 | { pool , POOL32Sxf , 8 , 32, | |
20713 | 0xfc00003f, 0xc000003c, 0 , 0, | |
20714 | 0x0 }, /* POOL32Sxf */ | |
20715 | }; | |
20716 | ||
20717 | ||
a1465490 | 20718 | static const Pool POOL32S[8] = { |
89a955e8 AM |
20719 | { pool , POOL32S_0 , 64 , 32, |
20720 | 0xfc000007, 0xc0000000, 0 , 0, | |
20721 | 0x0 }, /* POOL32S_0 */ | |
20722 | { reserved_block , 0 , 0 , 32, | |
20723 | 0xfc000007, 0xc0000001, 0 , 0, | |
20724 | 0x0 }, /* POOL32S~*(1) */ | |
20725 | { reserved_block , 0 , 0 , 32, | |
20726 | 0xfc000007, 0xc0000002, 0 , 0, | |
20727 | 0x0 }, /* POOL32S~*(2) */ | |
20728 | { reserved_block , 0 , 0 , 32, | |
20729 | 0xfc000007, 0xc0000003, 0 , 0, | |
20730 | 0x0 }, /* POOL32S~*(3) */ | |
20731 | { pool , POOL32S_4 , 8 , 32, | |
20732 | 0xfc000007, 0xc0000004, 0 , 0, | |
20733 | 0x0 }, /* POOL32S_4 */ | |
20734 | { reserved_block , 0 , 0 , 32, | |
20735 | 0xfc000007, 0xc0000005, 0 , 0, | |
20736 | 0x0 }, /* POOL32S~*(5) */ | |
20737 | { reserved_block , 0 , 0 , 32, | |
20738 | 0xfc000007, 0xc0000006, 0 , 0, | |
20739 | 0x0 }, /* POOL32S~*(6) */ | |
20740 | { reserved_block , 0 , 0 , 32, | |
20741 | 0xfc000007, 0xc0000007, 0 , 0, | |
20742 | 0x0 }, /* POOL32S~*(7) */ | |
20743 | }; | |
20744 | ||
20745 | ||
a1465490 | 20746 | static const Pool P_LUI[2] = { |
89a955e8 | 20747 | { instruction , 0 , 0 , 32, |
8d416f6b | 20748 | 0xfc000002, 0xe0000000, &LUI , 0, |
89a955e8 AM |
20749 | 0x0 }, /* LUI */ |
20750 | { instruction , 0 , 0 , 32, | |
8d416f6b | 20751 | 0xfc000002, 0xe0000002, &ALUIPC , 0, |
89a955e8 AM |
20752 | 0x0 }, /* ALUIPC */ |
20753 | }; | |
20754 | ||
20755 | ||
a1465490 | 20756 | static const Pool P_GP_LH[2] = { |
89a955e8 | 20757 | { instruction , 0 , 0 , 32, |
8d416f6b | 20758 | 0xfc1c0001, 0x44100000, &LH_GP_ , 0, |
89a955e8 AM |
20759 | 0x0 }, /* LH[GP] */ |
20760 | { instruction , 0 , 0 , 32, | |
8d416f6b | 20761 | 0xfc1c0001, 0x44100001, &LHU_GP_ , 0, |
89a955e8 AM |
20762 | 0x0 }, /* LHU[GP] */ |
20763 | }; | |
20764 | ||
20765 | ||
a1465490 | 20766 | static const Pool P_GP_SH[2] = { |
89a955e8 | 20767 | { instruction , 0 , 0 , 32, |
8d416f6b | 20768 | 0xfc1c0001, 0x44140000, &SH_GP_ , 0, |
89a955e8 AM |
20769 | 0x0 }, /* SH[GP] */ |
20770 | { reserved_block , 0 , 0 , 32, | |
20771 | 0xfc1c0001, 0x44140001, 0 , 0, | |
20772 | 0x0 }, /* P.GP.SH~*(1) */ | |
20773 | }; | |
20774 | ||
20775 | ||
a1465490 | 20776 | static const Pool P_GP_CP1[4] = { |
89a955e8 | 20777 | { instruction , 0 , 0 , 32, |
8d416f6b | 20778 | 0xfc1c0003, 0x44180000, &LWC1_GP_ , 0, |
89a955e8 AM |
20779 | CP1_ }, /* LWC1[GP] */ |
20780 | { instruction , 0 , 0 , 32, | |
8d416f6b | 20781 | 0xfc1c0003, 0x44180001, &SWC1_GP_ , 0, |
89a955e8 AM |
20782 | CP1_ }, /* SWC1[GP] */ |
20783 | { instruction , 0 , 0 , 32, | |
8d416f6b | 20784 | 0xfc1c0003, 0x44180002, &LDC1_GP_ , 0, |
89a955e8 AM |
20785 | CP1_ }, /* LDC1[GP] */ |
20786 | { instruction , 0 , 0 , 32, | |
8d416f6b | 20787 | 0xfc1c0003, 0x44180003, &SDC1_GP_ , 0, |
89a955e8 AM |
20788 | CP1_ }, /* SDC1[GP] */ |
20789 | }; | |
20790 | ||
20791 | ||
a1465490 | 20792 | static const Pool P_GP_M64[4] = { |
89a955e8 | 20793 | { instruction , 0 , 0 , 32, |
8d416f6b | 20794 | 0xfc1c0003, 0x441c0000, &LWU_GP_ , 0, |
89a955e8 AM |
20795 | MIPS64_ }, /* LWU[GP] */ |
20796 | { reserved_block , 0 , 0 , 32, | |
20797 | 0xfc1c0003, 0x441c0001, 0 , 0, | |
20798 | 0x0 }, /* P.GP.M64~*(1) */ | |
20799 | { reserved_block , 0 , 0 , 32, | |
20800 | 0xfc1c0003, 0x441c0002, 0 , 0, | |
20801 | 0x0 }, /* P.GP.M64~*(2) */ | |
20802 | { reserved_block , 0 , 0 , 32, | |
20803 | 0xfc1c0003, 0x441c0003, 0 , 0, | |
20804 | 0x0 }, /* P.GP.M64~*(3) */ | |
20805 | }; | |
20806 | ||
20807 | ||
a1465490 | 20808 | static const Pool P_GP_BH[8] = { |
89a955e8 | 20809 | { instruction , 0 , 0 , 32, |
8d416f6b | 20810 | 0xfc1c0000, 0x44000000, &LB_GP_ , 0, |
89a955e8 AM |
20811 | 0x0 }, /* LB[GP] */ |
20812 | { instruction , 0 , 0 , 32, | |
8d416f6b | 20813 | 0xfc1c0000, 0x44040000, &SB_GP_ , 0, |
89a955e8 AM |
20814 | 0x0 }, /* SB[GP] */ |
20815 | { instruction , 0 , 0 , 32, | |
8d416f6b | 20816 | 0xfc1c0000, 0x44080000, &LBU_GP_ , 0, |
89a955e8 AM |
20817 | 0x0 }, /* LBU[GP] */ |
20818 | { instruction , 0 , 0 , 32, | |
8d416f6b | 20819 | 0xfc1c0000, 0x440c0000, &ADDIU_GP_B_ , 0, |
89a955e8 AM |
20820 | 0x0 }, /* ADDIU[GP.B] */ |
20821 | { pool , P_GP_LH , 2 , 32, | |
20822 | 0xfc1c0000, 0x44100000, 0 , 0, | |
20823 | 0x0 }, /* P.GP.LH */ | |
20824 | { pool , P_GP_SH , 2 , 32, | |
20825 | 0xfc1c0000, 0x44140000, 0 , 0, | |
20826 | 0x0 }, /* P.GP.SH */ | |
20827 | { pool , P_GP_CP1 , 4 , 32, | |
20828 | 0xfc1c0000, 0x44180000, 0 , 0, | |
20829 | 0x0 }, /* P.GP.CP1 */ | |
20830 | { pool , P_GP_M64 , 4 , 32, | |
20831 | 0xfc1c0000, 0x441c0000, 0 , 0, | |
20832 | 0x0 }, /* P.GP.M64 */ | |
20833 | }; | |
20834 | ||
20835 | ||
a1465490 | 20836 | static const Pool P_LS_U12[16] = { |
89a955e8 | 20837 | { instruction , 0 , 0 , 32, |
8d416f6b | 20838 | 0xfc00f000, 0x84000000, &LB_U12_ , 0, |
89a955e8 AM |
20839 | 0x0 }, /* LB[U12] */ |
20840 | { instruction , 0 , 0 , 32, | |
8d416f6b | 20841 | 0xfc00f000, 0x84001000, &SB_U12_ , 0, |
89a955e8 AM |
20842 | 0x0 }, /* SB[U12] */ |
20843 | { instruction , 0 , 0 , 32, | |
8d416f6b | 20844 | 0xfc00f000, 0x84002000, &LBU_U12_ , 0, |
89a955e8 AM |
20845 | 0x0 }, /* LBU[U12] */ |
20846 | { instruction , 0 , 0 , 32, | |
8d416f6b | 20847 | 0xfc00f000, 0x84003000, &PREF_U12_ , 0, |
89a955e8 AM |
20848 | 0x0 }, /* PREF[U12] */ |
20849 | { instruction , 0 , 0 , 32, | |
8d416f6b | 20850 | 0xfc00f000, 0x84004000, &LH_U12_ , 0, |
89a955e8 AM |
20851 | 0x0 }, /* LH[U12] */ |
20852 | { instruction , 0 , 0 , 32, | |
8d416f6b | 20853 | 0xfc00f000, 0x84005000, &SH_U12_ , 0, |
89a955e8 AM |
20854 | 0x0 }, /* SH[U12] */ |
20855 | { instruction , 0 , 0 , 32, | |
8d416f6b | 20856 | 0xfc00f000, 0x84006000, &LHU_U12_ , 0, |
89a955e8 AM |
20857 | 0x0 }, /* LHU[U12] */ |
20858 | { instruction , 0 , 0 , 32, | |
8d416f6b | 20859 | 0xfc00f000, 0x84007000, &LWU_U12_ , 0, |
89a955e8 AM |
20860 | MIPS64_ }, /* LWU[U12] */ |
20861 | { instruction , 0 , 0 , 32, | |
8d416f6b | 20862 | 0xfc00f000, 0x84008000, &LW_U12_ , 0, |
89a955e8 AM |
20863 | 0x0 }, /* LW[U12] */ |
20864 | { instruction , 0 , 0 , 32, | |
8d416f6b | 20865 | 0xfc00f000, 0x84009000, &SW_U12_ , 0, |
89a955e8 AM |
20866 | 0x0 }, /* SW[U12] */ |
20867 | { instruction , 0 , 0 , 32, | |
8d416f6b | 20868 | 0xfc00f000, 0x8400a000, &LWC1_U12_ , 0, |
89a955e8 AM |
20869 | CP1_ }, /* LWC1[U12] */ |
20870 | { instruction , 0 , 0 , 32, | |
8d416f6b | 20871 | 0xfc00f000, 0x8400b000, &SWC1_U12_ , 0, |
89a955e8 AM |
20872 | CP1_ }, /* SWC1[U12] */ |
20873 | { instruction , 0 , 0 , 32, | |
8d416f6b | 20874 | 0xfc00f000, 0x8400c000, &LD_U12_ , 0, |
89a955e8 AM |
20875 | MIPS64_ }, /* LD[U12] */ |
20876 | { instruction , 0 , 0 , 32, | |
8d416f6b | 20877 | 0xfc00f000, 0x8400d000, &SD_U12_ , 0, |
89a955e8 AM |
20878 | MIPS64_ }, /* SD[U12] */ |
20879 | { instruction , 0 , 0 , 32, | |
8d416f6b | 20880 | 0xfc00f000, 0x8400e000, &LDC1_U12_ , 0, |
89a955e8 AM |
20881 | CP1_ }, /* LDC1[U12] */ |
20882 | { instruction , 0 , 0 , 32, | |
8d416f6b | 20883 | 0xfc00f000, 0x8400f000, &SDC1_U12_ , 0, |
89a955e8 AM |
20884 | CP1_ }, /* SDC1[U12] */ |
20885 | }; | |
20886 | ||
20887 | ||
a1465490 | 20888 | static const Pool P_PREF_S9_[2] = { |
89a955e8 | 20889 | { instruction , 0 , 0 , 32, |
8d416f6b | 20890 | 0xffe07f00, 0xa7e01800, &SYNCI , 0, |
89a955e8 AM |
20891 | 0x0 }, /* SYNCI */ |
20892 | { instruction , 0 , 0 , 32, | |
8d416f6b | 20893 | 0xfc007f00, 0xa4001800, &PREF_S9_ , &PREF_S9__cond , |
89a955e8 AM |
20894 | 0x0 }, /* PREF[S9] */ |
20895 | }; | |
20896 | ||
20897 | ||
a1465490 | 20898 | static const Pool P_LS_S0[16] = { |
89a955e8 | 20899 | { instruction , 0 , 0 , 32, |
8d416f6b | 20900 | 0xfc007f00, 0xa4000000, &LB_S9_ , 0, |
89a955e8 AM |
20901 | 0x0 }, /* LB[S9] */ |
20902 | { instruction , 0 , 0 , 32, | |
8d416f6b | 20903 | 0xfc007f00, 0xa4000800, &SB_S9_ , 0, |
89a955e8 AM |
20904 | 0x0 }, /* SB[S9] */ |
20905 | { instruction , 0 , 0 , 32, | |
8d416f6b | 20906 | 0xfc007f00, 0xa4001000, &LBU_S9_ , 0, |
89a955e8 AM |
20907 | 0x0 }, /* LBU[S9] */ |
20908 | { pool , P_PREF_S9_ , 2 , 32, | |
20909 | 0xfc007f00, 0xa4001800, 0 , 0, | |
20910 | 0x0 }, /* P.PREF[S9] */ | |
20911 | { instruction , 0 , 0 , 32, | |
8d416f6b | 20912 | 0xfc007f00, 0xa4002000, &LH_S9_ , 0, |
89a955e8 AM |
20913 | 0x0 }, /* LH[S9] */ |
20914 | { instruction , 0 , 0 , 32, | |
8d416f6b | 20915 | 0xfc007f00, 0xa4002800, &SH_S9_ , 0, |
89a955e8 AM |
20916 | 0x0 }, /* SH[S9] */ |
20917 | { instruction , 0 , 0 , 32, | |
8d416f6b | 20918 | 0xfc007f00, 0xa4003000, &LHU_S9_ , 0, |
89a955e8 AM |
20919 | 0x0 }, /* LHU[S9] */ |
20920 | { instruction , 0 , 0 , 32, | |
8d416f6b | 20921 | 0xfc007f00, 0xa4003800, &LWU_S9_ , 0, |
89a955e8 AM |
20922 | MIPS64_ }, /* LWU[S9] */ |
20923 | { instruction , 0 , 0 , 32, | |
8d416f6b | 20924 | 0xfc007f00, 0xa4004000, &LW_S9_ , 0, |
89a955e8 AM |
20925 | 0x0 }, /* LW[S9] */ |
20926 | { instruction , 0 , 0 , 32, | |
8d416f6b | 20927 | 0xfc007f00, 0xa4004800, &SW_S9_ , 0, |
89a955e8 AM |
20928 | 0x0 }, /* SW[S9] */ |
20929 | { instruction , 0 , 0 , 32, | |
8d416f6b | 20930 | 0xfc007f00, 0xa4005000, &LWC1_S9_ , 0, |
89a955e8 AM |
20931 | CP1_ }, /* LWC1[S9] */ |
20932 | { instruction , 0 , 0 , 32, | |
8d416f6b | 20933 | 0xfc007f00, 0xa4005800, &SWC1_S9_ , 0, |
89a955e8 AM |
20934 | CP1_ }, /* SWC1[S9] */ |
20935 | { instruction , 0 , 0 , 32, | |
8d416f6b | 20936 | 0xfc007f00, 0xa4006000, &LD_S9_ , 0, |
89a955e8 AM |
20937 | MIPS64_ }, /* LD[S9] */ |
20938 | { instruction , 0 , 0 , 32, | |
8d416f6b | 20939 | 0xfc007f00, 0xa4006800, &SD_S9_ , 0, |
89a955e8 AM |
20940 | MIPS64_ }, /* SD[S9] */ |
20941 | { instruction , 0 , 0 , 32, | |
8d416f6b | 20942 | 0xfc007f00, 0xa4007000, &LDC1_S9_ , 0, |
89a955e8 AM |
20943 | CP1_ }, /* LDC1[S9] */ |
20944 | { instruction , 0 , 0 , 32, | |
8d416f6b | 20945 | 0xfc007f00, 0xa4007800, &SDC1_S9_ , 0, |
89a955e8 AM |
20946 | CP1_ }, /* SDC1[S9] */ |
20947 | }; | |
20948 | ||
20949 | ||
a1465490 | 20950 | static const Pool ASET_ACLR[2] = { |
89a955e8 | 20951 | { instruction , 0 , 0 , 32, |
8d416f6b | 20952 | 0xfe007f00, 0xa4001100, &ASET , 0, |
89a955e8 AM |
20953 | MCU_ }, /* ASET */ |
20954 | { instruction , 0 , 0 , 32, | |
8d416f6b | 20955 | 0xfe007f00, 0xa6001100, &ACLR , 0, |
89a955e8 AM |
20956 | MCU_ }, /* ACLR */ |
20957 | }; | |
20958 | ||
20959 | ||
a1465490 | 20960 | static const Pool P_LL[4] = { |
89a955e8 | 20961 | { instruction , 0 , 0 , 32, |
8d416f6b | 20962 | 0xfc007f03, 0xa4005100, &LL , 0, |
89a955e8 AM |
20963 | 0x0 }, /* LL */ |
20964 | { instruction , 0 , 0 , 32, | |
8d416f6b | 20965 | 0xfc007f03, 0xa4005101, &LLWP , 0, |
89a955e8 AM |
20966 | XNP_ }, /* LLWP */ |
20967 | { reserved_block , 0 , 0 , 32, | |
20968 | 0xfc007f03, 0xa4005102, 0 , 0, | |
20969 | 0x0 }, /* P.LL~*(2) */ | |
20970 | { reserved_block , 0 , 0 , 32, | |
20971 | 0xfc007f03, 0xa4005103, 0 , 0, | |
20972 | 0x0 }, /* P.LL~*(3) */ | |
20973 | }; | |
20974 | ||
20975 | ||
a1465490 | 20976 | static const Pool P_SC[4] = { |
89a955e8 | 20977 | { instruction , 0 , 0 , 32, |
8d416f6b | 20978 | 0xfc007f03, 0xa4005900, &SC , 0, |
89a955e8 AM |
20979 | 0x0 }, /* SC */ |
20980 | { instruction , 0 , 0 , 32, | |
8d416f6b | 20981 | 0xfc007f03, 0xa4005901, &SCWP , 0, |
89a955e8 AM |
20982 | XNP_ }, /* SCWP */ |
20983 | { reserved_block , 0 , 0 , 32, | |
20984 | 0xfc007f03, 0xa4005902, 0 , 0, | |
20985 | 0x0 }, /* P.SC~*(2) */ | |
20986 | { reserved_block , 0 , 0 , 32, | |
20987 | 0xfc007f03, 0xa4005903, 0 , 0, | |
20988 | 0x0 }, /* P.SC~*(3) */ | |
20989 | }; | |
20990 | ||
20991 | ||
a1465490 | 20992 | static const Pool P_LLD[8] = { |
89a955e8 | 20993 | { instruction , 0 , 0 , 32, |
8d416f6b | 20994 | 0xfc007f07, 0xa4007100, &LLD , 0, |
89a955e8 AM |
20995 | MIPS64_ }, /* LLD */ |
20996 | { instruction , 0 , 0 , 32, | |
8d416f6b | 20997 | 0xfc007f07, 0xa4007101, &LLDP , 0, |
89a955e8 AM |
20998 | MIPS64_ }, /* LLDP */ |
20999 | { reserved_block , 0 , 0 , 32, | |
21000 | 0xfc007f07, 0xa4007102, 0 , 0, | |
21001 | 0x0 }, /* P.LLD~*(2) */ | |
21002 | { reserved_block , 0 , 0 , 32, | |
21003 | 0xfc007f07, 0xa4007103, 0 , 0, | |
21004 | 0x0 }, /* P.LLD~*(3) */ | |
21005 | { reserved_block , 0 , 0 , 32, | |
21006 | 0xfc007f07, 0xa4007104, 0 , 0, | |
21007 | 0x0 }, /* P.LLD~*(4) */ | |
21008 | { reserved_block , 0 , 0 , 32, | |
21009 | 0xfc007f07, 0xa4007105, 0 , 0, | |
21010 | 0x0 }, /* P.LLD~*(5) */ | |
21011 | { reserved_block , 0 , 0 , 32, | |
21012 | 0xfc007f07, 0xa4007106, 0 , 0, | |
21013 | 0x0 }, /* P.LLD~*(6) */ | |
21014 | { reserved_block , 0 , 0 , 32, | |
21015 | 0xfc007f07, 0xa4007107, 0 , 0, | |
21016 | 0x0 }, /* P.LLD~*(7) */ | |
21017 | }; | |
21018 | ||
21019 | ||
a1465490 | 21020 | static const Pool P_SCD[8] = { |
89a955e8 | 21021 | { instruction , 0 , 0 , 32, |
8d416f6b | 21022 | 0xfc007f07, 0xa4007900, &SCD , 0, |
89a955e8 AM |
21023 | MIPS64_ }, /* SCD */ |
21024 | { instruction , 0 , 0 , 32, | |
8d416f6b | 21025 | 0xfc007f07, 0xa4007901, &SCDP , 0, |
89a955e8 AM |
21026 | MIPS64_ }, /* SCDP */ |
21027 | { reserved_block , 0 , 0 , 32, | |
21028 | 0xfc007f07, 0xa4007902, 0 , 0, | |
21029 | 0x0 }, /* P.SCD~*(2) */ | |
21030 | { reserved_block , 0 , 0 , 32, | |
21031 | 0xfc007f07, 0xa4007903, 0 , 0, | |
21032 | 0x0 }, /* P.SCD~*(3) */ | |
21033 | { reserved_block , 0 , 0 , 32, | |
21034 | 0xfc007f07, 0xa4007904, 0 , 0, | |
21035 | 0x0 }, /* P.SCD~*(4) */ | |
21036 | { reserved_block , 0 , 0 , 32, | |
21037 | 0xfc007f07, 0xa4007905, 0 , 0, | |
21038 | 0x0 }, /* P.SCD~*(5) */ | |
21039 | { reserved_block , 0 , 0 , 32, | |
21040 | 0xfc007f07, 0xa4007906, 0 , 0, | |
21041 | 0x0 }, /* P.SCD~*(6) */ | |
21042 | { reserved_block , 0 , 0 , 32, | |
21043 | 0xfc007f07, 0xa4007907, 0 , 0, | |
21044 | 0x0 }, /* P.SCD~*(7) */ | |
21045 | }; | |
21046 | ||
21047 | ||
a1465490 | 21048 | static const Pool P_LS_S1[16] = { |
89a955e8 AM |
21049 | { reserved_block , 0 , 0 , 32, |
21050 | 0xfc007f00, 0xa4000100, 0 , 0, | |
21051 | 0x0 }, /* P.LS.S1~*(0) */ | |
21052 | { reserved_block , 0 , 0 , 32, | |
21053 | 0xfc007f00, 0xa4000900, 0 , 0, | |
21054 | 0x0 }, /* P.LS.S1~*(1) */ | |
21055 | { pool , ASET_ACLR , 2 , 32, | |
21056 | 0xfc007f00, 0xa4001100, 0 , 0, | |
21057 | 0x0 }, /* ASET_ACLR */ | |
21058 | { reserved_block , 0 , 0 , 32, | |
21059 | 0xfc007f00, 0xa4001900, 0 , 0, | |
21060 | 0x0 }, /* P.LS.S1~*(3) */ | |
21061 | { instruction , 0 , 0 , 32, | |
8d416f6b | 21062 | 0xfc007f00, 0xa4002100, &UALH , 0, |
89a955e8 AM |
21063 | XMMS_ }, /* UALH */ |
21064 | { instruction , 0 , 0 , 32, | |
8d416f6b | 21065 | 0xfc007f00, 0xa4002900, &UASH , 0, |
89a955e8 AM |
21066 | XMMS_ }, /* UASH */ |
21067 | { reserved_block , 0 , 0 , 32, | |
21068 | 0xfc007f00, 0xa4003100, 0 , 0, | |
21069 | 0x0 }, /* P.LS.S1~*(6) */ | |
21070 | { instruction , 0 , 0 , 32, | |
8d416f6b | 21071 | 0xfc007f00, 0xa4003900, &CACHE , 0, |
89a955e8 AM |
21072 | CP0_ }, /* CACHE */ |
21073 | { instruction , 0 , 0 , 32, | |
8d416f6b | 21074 | 0xfc007f00, 0xa4004100, &LWC2 , 0, |
89a955e8 AM |
21075 | CP2_ }, /* LWC2 */ |
21076 | { instruction , 0 , 0 , 32, | |
8d416f6b | 21077 | 0xfc007f00, 0xa4004900, &SWC2 , 0, |
89a955e8 AM |
21078 | CP2_ }, /* SWC2 */ |
21079 | { pool , P_LL , 4 , 32, | |
21080 | 0xfc007f00, 0xa4005100, 0 , 0, | |
21081 | 0x0 }, /* P.LL */ | |
21082 | { pool , P_SC , 4 , 32, | |
21083 | 0xfc007f00, 0xa4005900, 0 , 0, | |
21084 | 0x0 }, /* P.SC */ | |
21085 | { instruction , 0 , 0 , 32, | |
8d416f6b | 21086 | 0xfc007f00, 0xa4006100, &LDC2 , 0, |
89a955e8 AM |
21087 | CP2_ }, /* LDC2 */ |
21088 | { instruction , 0 , 0 , 32, | |
8d416f6b | 21089 | 0xfc007f00, 0xa4006900, &SDC2 , 0, |
89a955e8 AM |
21090 | CP2_ }, /* SDC2 */ |
21091 | { pool , P_LLD , 8 , 32, | |
21092 | 0xfc007f00, 0xa4007100, 0 , 0, | |
21093 | 0x0 }, /* P.LLD */ | |
21094 | { pool , P_SCD , 8 , 32, | |
21095 | 0xfc007f00, 0xa4007900, 0 , 0, | |
21096 | 0x0 }, /* P.SCD */ | |
21097 | }; | |
21098 | ||
21099 | ||
a1465490 | 21100 | static const Pool P_PREFE[2] = { |
89a955e8 | 21101 | { instruction , 0 , 0 , 32, |
8d416f6b | 21102 | 0xffe07f00, 0xa7e01a00, &SYNCIE , 0, |
89a955e8 AM |
21103 | CP0_ | EVA_ }, /* SYNCIE */ |
21104 | { instruction , 0 , 0 , 32, | |
8d416f6b | 21105 | 0xfc007f00, 0xa4001a00, &PREFE , &PREFE_cond , |
89a955e8 AM |
21106 | CP0_ | EVA_ }, /* PREFE */ |
21107 | }; | |
21108 | ||
21109 | ||
a1465490 | 21110 | static const Pool P_LLE[4] = { |
89a955e8 | 21111 | { instruction , 0 , 0 , 32, |
8d416f6b | 21112 | 0xfc007f03, 0xa4005200, &LLE , 0, |
89a955e8 AM |
21113 | CP0_ | EVA_ }, /* LLE */ |
21114 | { instruction , 0 , 0 , 32, | |
8d416f6b | 21115 | 0xfc007f03, 0xa4005201, &LLWPE , 0, |
89a955e8 AM |
21116 | CP0_ | EVA_ }, /* LLWPE */ |
21117 | { reserved_block , 0 , 0 , 32, | |
21118 | 0xfc007f03, 0xa4005202, 0 , 0, | |
21119 | 0x0 }, /* P.LLE~*(2) */ | |
21120 | { reserved_block , 0 , 0 , 32, | |
21121 | 0xfc007f03, 0xa4005203, 0 , 0, | |
21122 | 0x0 }, /* P.LLE~*(3) */ | |
21123 | }; | |
21124 | ||
21125 | ||
a1465490 | 21126 | static const Pool P_SCE[4] = { |
89a955e8 | 21127 | { instruction , 0 , 0 , 32, |
8d416f6b | 21128 | 0xfc007f03, 0xa4005a00, &SCE , 0, |
89a955e8 AM |
21129 | CP0_ | EVA_ }, /* SCE */ |
21130 | { instruction , 0 , 0 , 32, | |
8d416f6b | 21131 | 0xfc007f03, 0xa4005a01, &SCWPE , 0, |
89a955e8 AM |
21132 | CP0_ | EVA_ }, /* SCWPE */ |
21133 | { reserved_block , 0 , 0 , 32, | |
21134 | 0xfc007f03, 0xa4005a02, 0 , 0, | |
21135 | 0x0 }, /* P.SCE~*(2) */ | |
21136 | { reserved_block , 0 , 0 , 32, | |
21137 | 0xfc007f03, 0xa4005a03, 0 , 0, | |
21138 | 0x0 }, /* P.SCE~*(3) */ | |
21139 | }; | |
21140 | ||
21141 | ||
a1465490 | 21142 | static const Pool P_LS_E0[16] = { |
89a955e8 | 21143 | { instruction , 0 , 0 , 32, |
8d416f6b | 21144 | 0xfc007f00, 0xa4000200, &LBE , 0, |
89a955e8 AM |
21145 | CP0_ | EVA_ }, /* LBE */ |
21146 | { instruction , 0 , 0 , 32, | |
8d416f6b | 21147 | 0xfc007f00, 0xa4000a00, &SBE , 0, |
89a955e8 AM |
21148 | CP0_ | EVA_ }, /* SBE */ |
21149 | { instruction , 0 , 0 , 32, | |
8d416f6b | 21150 | 0xfc007f00, 0xa4001200, &LBUE , 0, |
89a955e8 AM |
21151 | CP0_ | EVA_ }, /* LBUE */ |
21152 | { pool , P_PREFE , 2 , 32, | |
21153 | 0xfc007f00, 0xa4001a00, 0 , 0, | |
21154 | 0x0 }, /* P.PREFE */ | |
21155 | { instruction , 0 , 0 , 32, | |
8d416f6b | 21156 | 0xfc007f00, 0xa4002200, &LHE , 0, |
89a955e8 AM |
21157 | CP0_ | EVA_ }, /* LHE */ |
21158 | { instruction , 0 , 0 , 32, | |
8d416f6b | 21159 | 0xfc007f00, 0xa4002a00, &SHE , 0, |
89a955e8 AM |
21160 | CP0_ | EVA_ }, /* SHE */ |
21161 | { instruction , 0 , 0 , 32, | |
8d416f6b | 21162 | 0xfc007f00, 0xa4003200, &LHUE , 0, |
89a955e8 AM |
21163 | CP0_ | EVA_ }, /* LHUE */ |
21164 | { instruction , 0 , 0 , 32, | |
8d416f6b | 21165 | 0xfc007f00, 0xa4003a00, &CACHEE , 0, |
89a955e8 AM |
21166 | CP0_ | EVA_ }, /* CACHEE */ |
21167 | { instruction , 0 , 0 , 32, | |
8d416f6b | 21168 | 0xfc007f00, 0xa4004200, &LWE , 0, |
89a955e8 AM |
21169 | CP0_ | EVA_ }, /* LWE */ |
21170 | { instruction , 0 , 0 , 32, | |
8d416f6b | 21171 | 0xfc007f00, 0xa4004a00, &SWE , 0, |
89a955e8 AM |
21172 | CP0_ | EVA_ }, /* SWE */ |
21173 | { pool , P_LLE , 4 , 32, | |
21174 | 0xfc007f00, 0xa4005200, 0 , 0, | |
21175 | 0x0 }, /* P.LLE */ | |
21176 | { pool , P_SCE , 4 , 32, | |
21177 | 0xfc007f00, 0xa4005a00, 0 , 0, | |
21178 | 0x0 }, /* P.SCE */ | |
21179 | { reserved_block , 0 , 0 , 32, | |
21180 | 0xfc007f00, 0xa4006200, 0 , 0, | |
21181 | 0x0 }, /* P.LS.E0~*(12) */ | |
21182 | { reserved_block , 0 , 0 , 32, | |
21183 | 0xfc007f00, 0xa4006a00, 0 , 0, | |
21184 | 0x0 }, /* P.LS.E0~*(13) */ | |
21185 | { reserved_block , 0 , 0 , 32, | |
21186 | 0xfc007f00, 0xa4007200, 0 , 0, | |
21187 | 0x0 }, /* P.LS.E0~*(14) */ | |
21188 | { reserved_block , 0 , 0 , 32, | |
21189 | 0xfc007f00, 0xa4007a00, 0 , 0, | |
21190 | 0x0 }, /* P.LS.E0~*(15) */ | |
21191 | }; | |
21192 | ||
21193 | ||
a1465490 | 21194 | static const Pool P_LS_WM[2] = { |
89a955e8 | 21195 | { instruction , 0 , 0 , 32, |
8d416f6b | 21196 | 0xfc000f00, 0xa4000400, &LWM , 0, |
89a955e8 AM |
21197 | XMMS_ }, /* LWM */ |
21198 | { instruction , 0 , 0 , 32, | |
8d416f6b | 21199 | 0xfc000f00, 0xa4000c00, &SWM , 0, |
89a955e8 AM |
21200 | XMMS_ }, /* SWM */ |
21201 | }; | |
21202 | ||
21203 | ||
a1465490 | 21204 | static const Pool P_LS_UAWM[2] = { |
89a955e8 | 21205 | { instruction , 0 , 0 , 32, |
8d416f6b | 21206 | 0xfc000f00, 0xa4000500, &UALWM , 0, |
89a955e8 AM |
21207 | XMMS_ }, /* UALWM */ |
21208 | { instruction , 0 , 0 , 32, | |
8d416f6b | 21209 | 0xfc000f00, 0xa4000d00, &UASWM , 0, |
89a955e8 AM |
21210 | XMMS_ }, /* UASWM */ |
21211 | }; | |
21212 | ||
21213 | ||
a1465490 | 21214 | static const Pool P_LS_DM[2] = { |
89a955e8 | 21215 | { instruction , 0 , 0 , 32, |
8d416f6b | 21216 | 0xfc000f00, 0xa4000600, &LDM , 0, |
89a955e8 AM |
21217 | MIPS64_ }, /* LDM */ |
21218 | { instruction , 0 , 0 , 32, | |
8d416f6b | 21219 | 0xfc000f00, 0xa4000e00, &SDM , 0, |
89a955e8 AM |
21220 | MIPS64_ }, /* SDM */ |
21221 | }; | |
21222 | ||
21223 | ||
a1465490 | 21224 | static const Pool P_LS_UADM[2] = { |
89a955e8 | 21225 | { instruction , 0 , 0 , 32, |
8d416f6b | 21226 | 0xfc000f00, 0xa4000700, &UALDM , 0, |
89a955e8 AM |
21227 | MIPS64_ }, /* UALDM */ |
21228 | { instruction , 0 , 0 , 32, | |
8d416f6b | 21229 | 0xfc000f00, 0xa4000f00, &UASDM , 0, |
89a955e8 AM |
21230 | MIPS64_ }, /* UASDM */ |
21231 | }; | |
21232 | ||
21233 | ||
a1465490 | 21234 | static const Pool P_LS_S9[8] = { |
89a955e8 AM |
21235 | { pool , P_LS_S0 , 16 , 32, |
21236 | 0xfc000700, 0xa4000000, 0 , 0, | |
21237 | 0x0 }, /* P.LS.S0 */ | |
21238 | { pool , P_LS_S1 , 16 , 32, | |
21239 | 0xfc000700, 0xa4000100, 0 , 0, | |
21240 | 0x0 }, /* P.LS.S1 */ | |
21241 | { pool , P_LS_E0 , 16 , 32, | |
21242 | 0xfc000700, 0xa4000200, 0 , 0, | |
21243 | 0x0 }, /* P.LS.E0 */ | |
21244 | { reserved_block , 0 , 0 , 32, | |
21245 | 0xfc000700, 0xa4000300, 0 , 0, | |
21246 | 0x0 }, /* P.LS.S9~*(3) */ | |
21247 | { pool , P_LS_WM , 2 , 32, | |
21248 | 0xfc000700, 0xa4000400, 0 , 0, | |
21249 | 0x0 }, /* P.LS.WM */ | |
21250 | { pool , P_LS_UAWM , 2 , 32, | |
21251 | 0xfc000700, 0xa4000500, 0 , 0, | |
21252 | 0x0 }, /* P.LS.UAWM */ | |
21253 | { pool , P_LS_DM , 2 , 32, | |
21254 | 0xfc000700, 0xa4000600, 0 , 0, | |
21255 | 0x0 }, /* P.LS.DM */ | |
21256 | { pool , P_LS_UADM , 2 , 32, | |
21257 | 0xfc000700, 0xa4000700, 0 , 0, | |
21258 | 0x0 }, /* P.LS.UADM */ | |
21259 | }; | |
21260 | ||
21261 | ||
a1465490 | 21262 | static const Pool P_BAL[2] = { |
89a955e8 | 21263 | { branch_instruction , 0 , 0 , 32, |
8d416f6b | 21264 | 0xfe000000, 0x28000000, &BC_32_ , 0, |
89a955e8 AM |
21265 | 0x0 }, /* BC[32] */ |
21266 | { call_instruction , 0 , 0 , 32, | |
8d416f6b | 21267 | 0xfe000000, 0x2a000000, &BALC_32_ , 0, |
89a955e8 AM |
21268 | 0x0 }, /* BALC[32] */ |
21269 | }; | |
21270 | ||
21271 | ||
a1465490 | 21272 | static const Pool P_BALRSC[2] = { |
89a955e8 | 21273 | { branch_instruction , 0 , 0 , 32, |
8d416f6b | 21274 | 0xffe0f000, 0x48008000, &BRSC , 0, |
89a955e8 AM |
21275 | 0x0 }, /* BRSC */ |
21276 | { call_instruction , 0 , 0 , 32, | |
8d416f6b | 21277 | 0xfc00f000, 0x48008000, &BALRSC , &BALRSC_cond , |
89a955e8 AM |
21278 | 0x0 }, /* BALRSC */ |
21279 | }; | |
21280 | ||
21281 | ||
a1465490 | 21282 | static const Pool P_J[16] = { |
89a955e8 | 21283 | { call_instruction , 0 , 0 , 32, |
8d416f6b | 21284 | 0xfc00f000, 0x48000000, &JALRC_32_ , 0, |
89a955e8 AM |
21285 | 0x0 }, /* JALRC[32] */ |
21286 | { call_instruction , 0 , 0 , 32, | |
8d416f6b | 21287 | 0xfc00f000, 0x48001000, &JALRC_HB , 0, |
89a955e8 AM |
21288 | 0x0 }, /* JALRC.HB */ |
21289 | { reserved_block , 0 , 0 , 32, | |
21290 | 0xfc00f000, 0x48002000, 0 , 0, | |
21291 | 0x0 }, /* P.J~*(2) */ | |
21292 | { reserved_block , 0 , 0 , 32, | |
21293 | 0xfc00f000, 0x48003000, 0 , 0, | |
21294 | 0x0 }, /* P.J~*(3) */ | |
21295 | { reserved_block , 0 , 0 , 32, | |
21296 | 0xfc00f000, 0x48004000, 0 , 0, | |
21297 | 0x0 }, /* P.J~*(4) */ | |
21298 | { reserved_block , 0 , 0 , 32, | |
21299 | 0xfc00f000, 0x48005000, 0 , 0, | |
21300 | 0x0 }, /* P.J~*(5) */ | |
21301 | { reserved_block , 0 , 0 , 32, | |
21302 | 0xfc00f000, 0x48006000, 0 , 0, | |
21303 | 0x0 }, /* P.J~*(6) */ | |
21304 | { reserved_block , 0 , 0 , 32, | |
21305 | 0xfc00f000, 0x48007000, 0 , 0, | |
21306 | 0x0 }, /* P.J~*(7) */ | |
21307 | { pool , P_BALRSC , 2 , 32, | |
21308 | 0xfc00f000, 0x48008000, 0 , 0, | |
21309 | 0x0 }, /* P.BALRSC */ | |
21310 | { reserved_block , 0 , 0 , 32, | |
21311 | 0xfc00f000, 0x48009000, 0 , 0, | |
21312 | 0x0 }, /* P.J~*(9) */ | |
21313 | { reserved_block , 0 , 0 , 32, | |
21314 | 0xfc00f000, 0x4800a000, 0 , 0, | |
21315 | 0x0 }, /* P.J~*(10) */ | |
21316 | { reserved_block , 0 , 0 , 32, | |
21317 | 0xfc00f000, 0x4800b000, 0 , 0, | |
21318 | 0x0 }, /* P.J~*(11) */ | |
21319 | { reserved_block , 0 , 0 , 32, | |
21320 | 0xfc00f000, 0x4800c000, 0 , 0, | |
21321 | 0x0 }, /* P.J~*(12) */ | |
21322 | { reserved_block , 0 , 0 , 32, | |
21323 | 0xfc00f000, 0x4800d000, 0 , 0, | |
21324 | 0x0 }, /* P.J~*(13) */ | |
21325 | { reserved_block , 0 , 0 , 32, | |
21326 | 0xfc00f000, 0x4800e000, 0 , 0, | |
21327 | 0x0 }, /* P.J~*(14) */ | |
21328 | { reserved_block , 0 , 0 , 32, | |
21329 | 0xfc00f000, 0x4800f000, 0 , 0, | |
21330 | 0x0 }, /* P.J~*(15) */ | |
21331 | }; | |
21332 | ||
21333 | ||
a1465490 | 21334 | static const Pool P_BR3A[32] = { |
89a955e8 | 21335 | { branch_instruction , 0 , 0 , 32, |
8d416f6b | 21336 | 0xfc1fc000, 0x88004000, &BC1EQZC , 0, |
89a955e8 AM |
21337 | CP1_ }, /* BC1EQZC */ |
21338 | { branch_instruction , 0 , 0 , 32, | |
8d416f6b | 21339 | 0xfc1fc000, 0x88014000, &BC1NEZC , 0, |
89a955e8 AM |
21340 | CP1_ }, /* BC1NEZC */ |
21341 | { branch_instruction , 0 , 0 , 32, | |
8d416f6b | 21342 | 0xfc1fc000, 0x88024000, &BC2EQZC , 0, |
89a955e8 AM |
21343 | CP2_ }, /* BC2EQZC */ |
21344 | { branch_instruction , 0 , 0 , 32, | |
8d416f6b | 21345 | 0xfc1fc000, 0x88034000, &BC2NEZC , 0, |
89a955e8 AM |
21346 | CP2_ }, /* BC2NEZC */ |
21347 | { branch_instruction , 0 , 0 , 32, | |
8d416f6b | 21348 | 0xfc1fc000, 0x88044000, &BPOSGE32C , 0, |
89a955e8 AM |
21349 | DSP_ }, /* BPOSGE32C */ |
21350 | { reserved_block , 0 , 0 , 32, | |
21351 | 0xfc1fc000, 0x88054000, 0 , 0, | |
21352 | 0x0 }, /* P.BR3A~*(5) */ | |
21353 | { reserved_block , 0 , 0 , 32, | |
21354 | 0xfc1fc000, 0x88064000, 0 , 0, | |
21355 | 0x0 }, /* P.BR3A~*(6) */ | |
21356 | { reserved_block , 0 , 0 , 32, | |
21357 | 0xfc1fc000, 0x88074000, 0 , 0, | |
21358 | 0x0 }, /* P.BR3A~*(7) */ | |
21359 | { reserved_block , 0 , 0 , 32, | |
21360 | 0xfc1fc000, 0x88084000, 0 , 0, | |
21361 | 0x0 }, /* P.BR3A~*(8) */ | |
21362 | { reserved_block , 0 , 0 , 32, | |
21363 | 0xfc1fc000, 0x88094000, 0 , 0, | |
21364 | 0x0 }, /* P.BR3A~*(9) */ | |
21365 | { reserved_block , 0 , 0 , 32, | |
21366 | 0xfc1fc000, 0x880a4000, 0 , 0, | |
21367 | 0x0 }, /* P.BR3A~*(10) */ | |
21368 | { reserved_block , 0 , 0 , 32, | |
21369 | 0xfc1fc000, 0x880b4000, 0 , 0, | |
21370 | 0x0 }, /* P.BR3A~*(11) */ | |
21371 | { reserved_block , 0 , 0 , 32, | |
21372 | 0xfc1fc000, 0x880c4000, 0 , 0, | |
21373 | 0x0 }, /* P.BR3A~*(12) */ | |
21374 | { reserved_block , 0 , 0 , 32, | |
21375 | 0xfc1fc000, 0x880d4000, 0 , 0, | |
21376 | 0x0 }, /* P.BR3A~*(13) */ | |
21377 | { reserved_block , 0 , 0 , 32, | |
21378 | 0xfc1fc000, 0x880e4000, 0 , 0, | |
21379 | 0x0 }, /* P.BR3A~*(14) */ | |
21380 | { reserved_block , 0 , 0 , 32, | |
21381 | 0xfc1fc000, 0x880f4000, 0 , 0, | |
21382 | 0x0 }, /* P.BR3A~*(15) */ | |
21383 | { reserved_block , 0 , 0 , 32, | |
21384 | 0xfc1fc000, 0x88104000, 0 , 0, | |
21385 | 0x0 }, /* P.BR3A~*(16) */ | |
21386 | { reserved_block , 0 , 0 , 32, | |
21387 | 0xfc1fc000, 0x88114000, 0 , 0, | |
21388 | 0x0 }, /* P.BR3A~*(17) */ | |
21389 | { reserved_block , 0 , 0 , 32, | |
21390 | 0xfc1fc000, 0x88124000, 0 , 0, | |
21391 | 0x0 }, /* P.BR3A~*(18) */ | |
21392 | { reserved_block , 0 , 0 , 32, | |
21393 | 0xfc1fc000, 0x88134000, 0 , 0, | |
21394 | 0x0 }, /* P.BR3A~*(19) */ | |
21395 | { reserved_block , 0 , 0 , 32, | |
21396 | 0xfc1fc000, 0x88144000, 0 , 0, | |
21397 | 0x0 }, /* P.BR3A~*(20) */ | |
21398 | { reserved_block , 0 , 0 , 32, | |
21399 | 0xfc1fc000, 0x88154000, 0 , 0, | |
21400 | 0x0 }, /* P.BR3A~*(21) */ | |
21401 | { reserved_block , 0 , 0 , 32, | |
21402 | 0xfc1fc000, 0x88164000, 0 , 0, | |
21403 | 0x0 }, /* P.BR3A~*(22) */ | |
21404 | { reserved_block , 0 , 0 , 32, | |
21405 | 0xfc1fc000, 0x88174000, 0 , 0, | |
21406 | 0x0 }, /* P.BR3A~*(23) */ | |
21407 | { reserved_block , 0 , 0 , 32, | |
21408 | 0xfc1fc000, 0x88184000, 0 , 0, | |
21409 | 0x0 }, /* P.BR3A~*(24) */ | |
21410 | { reserved_block , 0 , 0 , 32, | |
21411 | 0xfc1fc000, 0x88194000, 0 , 0, | |
21412 | 0x0 }, /* P.BR3A~*(25) */ | |
21413 | { reserved_block , 0 , 0 , 32, | |
21414 | 0xfc1fc000, 0x881a4000, 0 , 0, | |
21415 | 0x0 }, /* P.BR3A~*(26) */ | |
21416 | { reserved_block , 0 , 0 , 32, | |
21417 | 0xfc1fc000, 0x881b4000, 0 , 0, | |
21418 | 0x0 }, /* P.BR3A~*(27) */ | |
21419 | { reserved_block , 0 , 0 , 32, | |
21420 | 0xfc1fc000, 0x881c4000, 0 , 0, | |
21421 | 0x0 }, /* P.BR3A~*(28) */ | |
21422 | { reserved_block , 0 , 0 , 32, | |
21423 | 0xfc1fc000, 0x881d4000, 0 , 0, | |
21424 | 0x0 }, /* P.BR3A~*(29) */ | |
21425 | { reserved_block , 0 , 0 , 32, | |
21426 | 0xfc1fc000, 0x881e4000, 0 , 0, | |
21427 | 0x0 }, /* P.BR3A~*(30) */ | |
21428 | { reserved_block , 0 , 0 , 32, | |
21429 | 0xfc1fc000, 0x881f4000, 0 , 0, | |
21430 | 0x0 }, /* P.BR3A~*(31) */ | |
21431 | }; | |
21432 | ||
21433 | ||
a1465490 | 21434 | static const Pool P_BR1[4] = { |
89a955e8 | 21435 | { branch_instruction , 0 , 0 , 32, |
8d416f6b | 21436 | 0xfc00c000, 0x88000000, &BEQC_32_ , 0, |
89a955e8 AM |
21437 | 0x0 }, /* BEQC[32] */ |
21438 | { pool , P_BR3A , 32 , 32, | |
21439 | 0xfc00c000, 0x88004000, 0 , 0, | |
21440 | 0x0 }, /* P.BR3A */ | |
21441 | { branch_instruction , 0 , 0 , 32, | |
8d416f6b | 21442 | 0xfc00c000, 0x88008000, &BGEC , 0, |
89a955e8 AM |
21443 | 0x0 }, /* BGEC */ |
21444 | { branch_instruction , 0 , 0 , 32, | |
8d416f6b | 21445 | 0xfc00c000, 0x8800c000, &BGEUC , 0, |
89a955e8 AM |
21446 | 0x0 }, /* BGEUC */ |
21447 | }; | |
21448 | ||
21449 | ||
a1465490 | 21450 | static const Pool P_BR2[4] = { |
89a955e8 | 21451 | { branch_instruction , 0 , 0 , 32, |
8d416f6b | 21452 | 0xfc00c000, 0xa8000000, &BNEC_32_ , 0, |
89a955e8 AM |
21453 | 0x0 }, /* BNEC[32] */ |
21454 | { reserved_block , 0 , 0 , 32, | |
21455 | 0xfc00c000, 0xa8004000, 0 , 0, | |
21456 | 0x0 }, /* P.BR2~*(1) */ | |
21457 | { branch_instruction , 0 , 0 , 32, | |
8d416f6b | 21458 | 0xfc00c000, 0xa8008000, &BLTC , 0, |
89a955e8 AM |
21459 | 0x0 }, /* BLTC */ |
21460 | { branch_instruction , 0 , 0 , 32, | |
8d416f6b | 21461 | 0xfc00c000, 0xa800c000, &BLTUC , 0, |
89a955e8 AM |
21462 | 0x0 }, /* BLTUC */ |
21463 | }; | |
21464 | ||
21465 | ||
a1465490 | 21466 | static const Pool P_BRI[8] = { |
89a955e8 | 21467 | { branch_instruction , 0 , 0 , 32, |
8d416f6b | 21468 | 0xfc1c0000, 0xc8000000, &BEQIC , 0, |
89a955e8 AM |
21469 | 0x0 }, /* BEQIC */ |
21470 | { branch_instruction , 0 , 0 , 32, | |
8d416f6b | 21471 | 0xfc1c0000, 0xc8040000, &BBEQZC , 0, |
89a955e8 AM |
21472 | XMMS_ }, /* BBEQZC */ |
21473 | { branch_instruction , 0 , 0 , 32, | |
8d416f6b | 21474 | 0xfc1c0000, 0xc8080000, &BGEIC , 0, |
89a955e8 AM |
21475 | 0x0 }, /* BGEIC */ |
21476 | { branch_instruction , 0 , 0 , 32, | |
8d416f6b | 21477 | 0xfc1c0000, 0xc80c0000, &BGEIUC , 0, |
89a955e8 AM |
21478 | 0x0 }, /* BGEIUC */ |
21479 | { branch_instruction , 0 , 0 , 32, | |
8d416f6b | 21480 | 0xfc1c0000, 0xc8100000, &BNEIC , 0, |
89a955e8 AM |
21481 | 0x0 }, /* BNEIC */ |
21482 | { branch_instruction , 0 , 0 , 32, | |
8d416f6b | 21483 | 0xfc1c0000, 0xc8140000, &BBNEZC , 0, |
89a955e8 AM |
21484 | XMMS_ }, /* BBNEZC */ |
21485 | { branch_instruction , 0 , 0 , 32, | |
8d416f6b | 21486 | 0xfc1c0000, 0xc8180000, &BLTIC , 0, |
89a955e8 AM |
21487 | 0x0 }, /* BLTIC */ |
21488 | { branch_instruction , 0 , 0 , 32, | |
8d416f6b | 21489 | 0xfc1c0000, 0xc81c0000, &BLTIUC , 0, |
89a955e8 AM |
21490 | 0x0 }, /* BLTIUC */ |
21491 | }; | |
21492 | ||
21493 | ||
a1465490 | 21494 | static const Pool P32[32] = { |
89a955e8 AM |
21495 | { pool , P_ADDIU , 2 , 32, |
21496 | 0xfc000000, 0x00000000, 0 , 0, | |
21497 | 0x0 }, /* P.ADDIU */ | |
21498 | { pool , P32A , 8 , 32, | |
21499 | 0xfc000000, 0x20000000, 0 , 0, | |
21500 | 0x0 }, /* P32A */ | |
21501 | { pool , P_GP_W , 4 , 32, | |
21502 | 0xfc000000, 0x40000000, 0 , 0, | |
21503 | 0x0 }, /* P.GP.W */ | |
21504 | { pool , POOL48I , 32 , 48, | |
21505 | 0xfc0000000000ull, 0x600000000000ull, 0 , 0, | |
21506 | 0x0 }, /* POOL48I */ | |
21507 | { pool , P_U12 , 16 , 32, | |
21508 | 0xfc000000, 0x80000000, 0 , 0, | |
21509 | 0x0 }, /* P.U12 */ | |
21510 | { pool , POOL32F , 8 , 32, | |
21511 | 0xfc000000, 0xa0000000, 0 , 0, | |
21512 | CP1_ }, /* POOL32F */ | |
21513 | { pool , POOL32S , 8 , 32, | |
21514 | 0xfc000000, 0xc0000000, 0 , 0, | |
21515 | 0x0 }, /* POOL32S */ | |
21516 | { pool , P_LUI , 2 , 32, | |
21517 | 0xfc000000, 0xe0000000, 0 , 0, | |
21518 | 0x0 }, /* P.LUI */ | |
21519 | { instruction , 0 , 0 , 32, | |
8d416f6b | 21520 | 0xfc000000, 0x04000000, &ADDIUPC_32_ , 0, |
89a955e8 AM |
21521 | 0x0 }, /* ADDIUPC[32] */ |
21522 | { reserved_block , 0 , 0 , 32, | |
21523 | 0xfc000000, 0x24000000, 0 , 0, | |
21524 | 0x0 }, /* P32~*(5) */ | |
21525 | { pool , P_GP_BH , 8 , 32, | |
21526 | 0xfc000000, 0x44000000, 0 , 0, | |
21527 | 0x0 }, /* P.GP.BH */ | |
21528 | { reserved_block , 0 , 0 , 32, | |
21529 | 0xfc000000, 0x64000000, 0 , 0, | |
21530 | 0x0 }, /* P32~*(13) */ | |
21531 | { pool , P_LS_U12 , 16 , 32, | |
21532 | 0xfc000000, 0x84000000, 0 , 0, | |
21533 | 0x0 }, /* P.LS.U12 */ | |
21534 | { pool , P_LS_S9 , 8 , 32, | |
21535 | 0xfc000000, 0xa4000000, 0 , 0, | |
21536 | 0x0 }, /* P.LS.S9 */ | |
21537 | { reserved_block , 0 , 0 , 32, | |
21538 | 0xfc000000, 0xc4000000, 0 , 0, | |
21539 | 0x0 }, /* P32~*(25) */ | |
21540 | { reserved_block , 0 , 0 , 32, | |
21541 | 0xfc000000, 0xe4000000, 0 , 0, | |
21542 | 0x0 }, /* P32~*(29) */ | |
21543 | { call_instruction , 0 , 0 , 32, | |
8d416f6b | 21544 | 0xfc000000, 0x08000000, &MOVE_BALC , 0, |
89a955e8 AM |
21545 | XMMS_ }, /* MOVE.BALC */ |
21546 | { pool , P_BAL , 2 , 32, | |
21547 | 0xfc000000, 0x28000000, 0 , 0, | |
21548 | 0x0 }, /* P.BAL */ | |
21549 | { pool , P_J , 16 , 32, | |
21550 | 0xfc000000, 0x48000000, 0 , 0, | |
21551 | 0x0 }, /* P.J */ | |
21552 | { reserved_block , 0 , 0 , 32, | |
21553 | 0xfc000000, 0x68000000, 0 , 0, | |
21554 | 0x0 }, /* P32~*(14) */ | |
21555 | { pool , P_BR1 , 4 , 32, | |
21556 | 0xfc000000, 0x88000000, 0 , 0, | |
21557 | 0x0 }, /* P.BR1 */ | |
21558 | { pool , P_BR2 , 4 , 32, | |
21559 | 0xfc000000, 0xa8000000, 0 , 0, | |
21560 | 0x0 }, /* P.BR2 */ | |
21561 | { pool , P_BRI , 8 , 32, | |
21562 | 0xfc000000, 0xc8000000, 0 , 0, | |
21563 | 0x0 }, /* P.BRI */ | |
21564 | { reserved_block , 0 , 0 , 32, | |
21565 | 0xfc000000, 0xe8000000, 0 , 0, | |
21566 | 0x0 }, /* P32~*(30) */ | |
21567 | { reserved_block , 0 , 0 , 32, | |
21568 | 0xfc000000, 0x0c000000, 0 , 0, | |
21569 | 0x0 }, /* P32~*(3) */ | |
21570 | { reserved_block , 0 , 0 , 32, | |
21571 | 0xfc000000, 0x2c000000, 0 , 0, | |
21572 | 0x0 }, /* P32~*(7) */ | |
21573 | { reserved_block , 0 , 0 , 32, | |
21574 | 0xfc000000, 0x4c000000, 0 , 0, | |
21575 | 0x0 }, /* P32~*(11) */ | |
21576 | { reserved_block , 0 , 0 , 32, | |
21577 | 0xfc000000, 0x6c000000, 0 , 0, | |
21578 | 0x0 }, /* P32~*(15) */ | |
21579 | { reserved_block , 0 , 0 , 32, | |
21580 | 0xfc000000, 0x8c000000, 0 , 0, | |
21581 | 0x0 }, /* P32~*(19) */ | |
21582 | { reserved_block , 0 , 0 , 32, | |
21583 | 0xfc000000, 0xac000000, 0 , 0, | |
21584 | 0x0 }, /* P32~*(23) */ | |
21585 | { reserved_block , 0 , 0 , 32, | |
21586 | 0xfc000000, 0xcc000000, 0 , 0, | |
21587 | 0x0 }, /* P32~*(27) */ | |
21588 | { reserved_block , 0 , 0 , 32, | |
21589 | 0xfc000000, 0xec000000, 0 , 0, | |
21590 | 0x0 }, /* P32~*(31) */ | |
21591 | }; | |
21592 | ||
21593 | ||
a1465490 | 21594 | static const Pool P16_SYSCALL[2] = { |
89a955e8 | 21595 | { instruction , 0 , 0 , 16, |
8d416f6b | 21596 | 0xfffc , 0x1008 , &SYSCALL_16_ , 0, |
89a955e8 AM |
21597 | 0x0 }, /* SYSCALL[16] */ |
21598 | { instruction , 0 , 0 , 16, | |
8d416f6b | 21599 | 0xfffc , 0x100c , &HYPCALL_16_ , 0, |
89a955e8 AM |
21600 | CP0_ | VZ_ }, /* HYPCALL[16] */ |
21601 | }; | |
21602 | ||
21603 | ||
a1465490 | 21604 | static const Pool P16_RI[4] = { |
89a955e8 AM |
21605 | { reserved_block , 0 , 0 , 16, |
21606 | 0xfff8 , 0x1000 , 0 , 0, | |
21607 | 0x0 }, /* P16.RI~*(0) */ | |
21608 | { pool , P16_SYSCALL , 2 , 16, | |
21609 | 0xfff8 , 0x1008 , 0 , 0, | |
21610 | 0x0 }, /* P16.SYSCALL */ | |
21611 | { instruction , 0 , 0 , 16, | |
8d416f6b | 21612 | 0xfff8 , 0x1010 , &BREAK_16_ , 0, |
89a955e8 AM |
21613 | 0x0 }, /* BREAK[16] */ |
21614 | { instruction , 0 , 0 , 16, | |
8d416f6b | 21615 | 0xfff8 , 0x1018 , &SDBBP_16_ , 0, |
89a955e8 AM |
21616 | EJTAG_ }, /* SDBBP[16] */ |
21617 | }; | |
21618 | ||
21619 | ||
a1465490 | 21620 | static const Pool P16_MV[2] = { |
89a955e8 AM |
21621 | { pool , P16_RI , 4 , 16, |
21622 | 0xffe0 , 0x1000 , 0 , 0, | |
21623 | 0x0 }, /* P16.RI */ | |
21624 | { instruction , 0 , 0 , 16, | |
8d416f6b | 21625 | 0xfc00 , 0x1000 , &MOVE , &MOVE_cond , |
89a955e8 AM |
21626 | 0x0 }, /* MOVE */ |
21627 | }; | |
21628 | ||
21629 | ||
a1465490 | 21630 | static const Pool P16_SHIFT[2] = { |
89a955e8 | 21631 | { instruction , 0 , 0 , 16, |
8d416f6b | 21632 | 0xfc08 , 0x3000 , &SLL_16_ , 0, |
89a955e8 AM |
21633 | 0x0 }, /* SLL[16] */ |
21634 | { instruction , 0 , 0 , 16, | |
8d416f6b | 21635 | 0xfc08 , 0x3008 , &SRL_16_ , 0, |
89a955e8 AM |
21636 | 0x0 }, /* SRL[16] */ |
21637 | }; | |
21638 | ||
21639 | ||
a1465490 | 21640 | static const Pool POOL16C_00[4] = { |
89a955e8 | 21641 | { instruction , 0 , 0 , 16, |
8d416f6b | 21642 | 0xfc0f , 0x5000 , &NOT_16_ , 0, |
89a955e8 AM |
21643 | 0x0 }, /* NOT[16] */ |
21644 | { instruction , 0 , 0 , 16, | |
8d416f6b | 21645 | 0xfc0f , 0x5004 , &XOR_16_ , 0, |
89a955e8 AM |
21646 | 0x0 }, /* XOR[16] */ |
21647 | { instruction , 0 , 0 , 16, | |
8d416f6b | 21648 | 0xfc0f , 0x5008 , &AND_16_ , 0, |
89a955e8 AM |
21649 | 0x0 }, /* AND[16] */ |
21650 | { instruction , 0 , 0 , 16, | |
8d416f6b | 21651 | 0xfc0f , 0x500c , &OR_16_ , 0, |
89a955e8 AM |
21652 | 0x0 }, /* OR[16] */ |
21653 | }; | |
21654 | ||
21655 | ||
a1465490 | 21656 | static const Pool POOL16C_0[2] = { |
89a955e8 AM |
21657 | { pool , POOL16C_00 , 4 , 16, |
21658 | 0xfc03 , 0x5000 , 0 , 0, | |
21659 | 0x0 }, /* POOL16C_00 */ | |
21660 | { reserved_block , 0 , 0 , 16, | |
21661 | 0xfc03 , 0x5002 , 0 , 0, | |
21662 | 0x0 }, /* POOL16C_0~*(1) */ | |
21663 | }; | |
21664 | ||
21665 | ||
a1465490 | 21666 | static const Pool P16C[2] = { |
89a955e8 AM |
21667 | { pool , POOL16C_0 , 2 , 16, |
21668 | 0xfc01 , 0x5000 , 0 , 0, | |
21669 | 0x0 }, /* POOL16C_0 */ | |
21670 | { instruction , 0 , 0 , 16, | |
8d416f6b | 21671 | 0xfc01 , 0x5001 , &LWXS_16_ , 0, |
89a955e8 AM |
21672 | 0x0 }, /* LWXS[16] */ |
21673 | }; | |
21674 | ||
21675 | ||
a1465490 | 21676 | static const Pool P16_A1[2] = { |
89a955e8 AM |
21677 | { reserved_block , 0 , 0 , 16, |
21678 | 0xfc40 , 0x7000 , 0 , 0, | |
21679 | 0x0 }, /* P16.A1~*(0) */ | |
21680 | { instruction , 0 , 0 , 16, | |
8d416f6b | 21681 | 0xfc40 , 0x7040 , &ADDIU_R1_SP_ , 0, |
89a955e8 AM |
21682 | 0x0 }, /* ADDIU[R1.SP] */ |
21683 | }; | |
21684 | ||
21685 | ||
a1465490 | 21686 | static const Pool P_ADDIU_RS5_[2] = { |
89a955e8 | 21687 | { instruction , 0 , 0 , 16, |
8d416f6b | 21688 | 0xffe8 , 0x9008 , &NOP_16_ , 0, |
89a955e8 AM |
21689 | 0x0 }, /* NOP[16] */ |
21690 | { instruction , 0 , 0 , 16, | |
8d416f6b | 21691 | 0xfc08 , 0x9008 , &ADDIU_RS5_ , &ADDIU_RS5__cond , |
89a955e8 AM |
21692 | 0x0 }, /* ADDIU[RS5] */ |
21693 | }; | |
21694 | ||
21695 | ||
a1465490 | 21696 | static const Pool P16_A2[2] = { |
89a955e8 | 21697 | { instruction , 0 , 0 , 16, |
8d416f6b | 21698 | 0xfc08 , 0x9000 , &ADDIU_R2_ , 0, |
89a955e8 AM |
21699 | 0x0 }, /* ADDIU[R2] */ |
21700 | { pool , P_ADDIU_RS5_ , 2 , 16, | |
21701 | 0xfc08 , 0x9008 , 0 , 0, | |
21702 | 0x0 }, /* P.ADDIU[RS5] */ | |
21703 | }; | |
21704 | ||
21705 | ||
a1465490 | 21706 | static const Pool P16_ADDU[2] = { |
89a955e8 | 21707 | { instruction , 0 , 0 , 16, |
8d416f6b | 21708 | 0xfc01 , 0xb000 , &ADDU_16_ , 0, |
89a955e8 AM |
21709 | 0x0 }, /* ADDU[16] */ |
21710 | { instruction , 0 , 0 , 16, | |
8d416f6b | 21711 | 0xfc01 , 0xb001 , &SUBU_16_ , 0, |
89a955e8 AM |
21712 | 0x0 }, /* SUBU[16] */ |
21713 | }; | |
21714 | ||
21715 | ||
a1465490 | 21716 | static const Pool P16_JRC[2] = { |
89a955e8 | 21717 | { branch_instruction , 0 , 0 , 16, |
8d416f6b | 21718 | 0xfc1f , 0xd800 , &JRC , 0, |
89a955e8 AM |
21719 | 0x0 }, /* JRC */ |
21720 | { call_instruction , 0 , 0 , 16, | |
8d416f6b | 21721 | 0xfc1f , 0xd810 , &JALRC_16_ , 0, |
89a955e8 AM |
21722 | 0x0 }, /* JALRC[16] */ |
21723 | }; | |
21724 | ||
21725 | ||
a1465490 | 21726 | static const Pool P16_BR1[2] = { |
89a955e8 | 21727 | { branch_instruction , 0 , 0 , 16, |
8d416f6b | 21728 | 0xfc00 , 0xd800 , &BEQC_16_ , &BEQC_16__cond , |
89a955e8 AM |
21729 | XMMS_ }, /* BEQC[16] */ |
21730 | { branch_instruction , 0 , 0 , 16, | |
8d416f6b | 21731 | 0xfc00 , 0xd800 , &BNEC_16_ , &BNEC_16__cond , |
89a955e8 AM |
21732 | XMMS_ }, /* BNEC[16] */ |
21733 | }; | |
21734 | ||
21735 | ||
a1465490 | 21736 | static const Pool P16_BR[2] = { |
89a955e8 AM |
21737 | { pool , P16_JRC , 2 , 16, |
21738 | 0xfc0f , 0xd800 , 0 , 0, | |
21739 | 0x0 }, /* P16.JRC */ | |
21740 | { pool , P16_BR1 , 2 , 16, | |
655fc22f | 21741 | 0xfc00 , 0xd800 , 0 , &P16_BR1_cond , |
89a955e8 AM |
21742 | 0x0 }, /* P16.BR1 */ |
21743 | }; | |
21744 | ||
21745 | ||
a1465490 | 21746 | static const Pool P16_SR[2] = { |
89a955e8 | 21747 | { instruction , 0 , 0 , 16, |
8d416f6b | 21748 | 0xfd00 , 0x1c00 , &SAVE_16_ , 0, |
89a955e8 AM |
21749 | 0x0 }, /* SAVE[16] */ |
21750 | { return_instruction , 0 , 0 , 16, | |
8d416f6b | 21751 | 0xfd00 , 0x1d00 , &RESTORE_JRC_16_ , 0, |
89a955e8 AM |
21752 | 0x0 }, /* RESTORE.JRC[16] */ |
21753 | }; | |
21754 | ||
21755 | ||
a1465490 | 21756 | static const Pool P16_4X4[4] = { |
89a955e8 | 21757 | { instruction , 0 , 0 , 16, |
8d416f6b | 21758 | 0xfd08 , 0x3c00 , &ADDU_4X4_ , 0, |
89a955e8 AM |
21759 | XMMS_ }, /* ADDU[4X4] */ |
21760 | { instruction , 0 , 0 , 16, | |
8d416f6b | 21761 | 0xfd08 , 0x3c08 , &MUL_4X4_ , 0, |
89a955e8 AM |
21762 | XMMS_ }, /* MUL[4X4] */ |
21763 | { reserved_block , 0 , 0 , 16, | |
21764 | 0xfd08 , 0x3d00 , 0 , 0, | |
21765 | 0x0 }, /* P16.4X4~*(2) */ | |
21766 | { reserved_block , 0 , 0 , 16, | |
21767 | 0xfd08 , 0x3d08 , 0 , 0, | |
21768 | 0x0 }, /* P16.4X4~*(3) */ | |
21769 | }; | |
21770 | ||
21771 | ||
a1465490 | 21772 | static const Pool P16_LB[4] = { |
89a955e8 | 21773 | { instruction , 0 , 0 , 16, |
8d416f6b | 21774 | 0xfc0c , 0x5c00 , &LB_16_ , 0, |
89a955e8 AM |
21775 | 0x0 }, /* LB[16] */ |
21776 | { instruction , 0 , 0 , 16, | |
8d416f6b | 21777 | 0xfc0c , 0x5c04 , &SB_16_ , 0, |
89a955e8 AM |
21778 | 0x0 }, /* SB[16] */ |
21779 | { instruction , 0 , 0 , 16, | |
8d416f6b | 21780 | 0xfc0c , 0x5c08 , &LBU_16_ , 0, |
89a955e8 AM |
21781 | 0x0 }, /* LBU[16] */ |
21782 | { reserved_block , 0 , 0 , 16, | |
21783 | 0xfc0c , 0x5c0c , 0 , 0, | |
21784 | 0x0 }, /* P16.LB~*(3) */ | |
21785 | }; | |
21786 | ||
21787 | ||
a1465490 | 21788 | static const Pool P16_LH[4] = { |
89a955e8 | 21789 | { instruction , 0 , 0 , 16, |
8d416f6b | 21790 | 0xfc09 , 0x7c00 , &LH_16_ , 0, |
89a955e8 AM |
21791 | 0x0 }, /* LH[16] */ |
21792 | { instruction , 0 , 0 , 16, | |
8d416f6b | 21793 | 0xfc09 , 0x7c01 , &SH_16_ , 0, |
89a955e8 AM |
21794 | 0x0 }, /* SH[16] */ |
21795 | { instruction , 0 , 0 , 16, | |
8d416f6b | 21796 | 0xfc09 , 0x7c08 , &LHU_16_ , 0, |
89a955e8 AM |
21797 | 0x0 }, /* LHU[16] */ |
21798 | { reserved_block , 0 , 0 , 16, | |
21799 | 0xfc09 , 0x7c09 , 0 , 0, | |
21800 | 0x0 }, /* P16.LH~*(3) */ | |
21801 | }; | |
21802 | ||
21803 | ||
a1465490 | 21804 | static const Pool P16[32] = { |
89a955e8 AM |
21805 | { pool , P16_MV , 2 , 16, |
21806 | 0xfc00 , 0x1000 , 0 , 0, | |
21807 | 0x0 }, /* P16.MV */ | |
21808 | { pool , P16_SHIFT , 2 , 16, | |
21809 | 0xfc00 , 0x3000 , 0 , 0, | |
21810 | 0x0 }, /* P16.SHIFT */ | |
21811 | { pool , P16C , 2 , 16, | |
21812 | 0xfc00 , 0x5000 , 0 , 0, | |
21813 | 0x0 }, /* P16C */ | |
21814 | { pool , P16_A1 , 2 , 16, | |
21815 | 0xfc00 , 0x7000 , 0 , 0, | |
21816 | 0x0 }, /* P16.A1 */ | |
21817 | { pool , P16_A2 , 2 , 16, | |
21818 | 0xfc00 , 0x9000 , 0 , 0, | |
21819 | 0x0 }, /* P16.A2 */ | |
21820 | { pool , P16_ADDU , 2 , 16, | |
21821 | 0xfc00 , 0xb000 , 0 , 0, | |
21822 | 0x0 }, /* P16.ADDU */ | |
21823 | { instruction , 0 , 0 , 16, | |
8d416f6b | 21824 | 0xfc00 , 0xd000 , &LI_16_ , 0, |
89a955e8 AM |
21825 | 0x0 }, /* LI[16] */ |
21826 | { instruction , 0 , 0 , 16, | |
8d416f6b | 21827 | 0xfc00 , 0xf000 , &ANDI_16_ , 0, |
89a955e8 AM |
21828 | 0x0 }, /* ANDI[16] */ |
21829 | { instruction , 0 , 0 , 16, | |
8d416f6b | 21830 | 0xfc00 , 0x1400 , &LW_16_ , 0, |
89a955e8 AM |
21831 | 0x0 }, /* LW[16] */ |
21832 | { instruction , 0 , 0 , 16, | |
8d416f6b | 21833 | 0xfc00 , 0x3400 , &LW_SP_ , 0, |
89a955e8 AM |
21834 | 0x0 }, /* LW[SP] */ |
21835 | { instruction , 0 , 0 , 16, | |
8d416f6b | 21836 | 0xfc00 , 0x5400 , &LW_GP16_ , 0, |
89a955e8 AM |
21837 | 0x0 }, /* LW[GP16] */ |
21838 | { instruction , 0 , 0 , 16, | |
8d416f6b | 21839 | 0xfc00 , 0x7400 , &LW_4X4_ , 0, |
89a955e8 AM |
21840 | XMMS_ }, /* LW[4X4] */ |
21841 | { instruction , 0 , 0 , 16, | |
8d416f6b | 21842 | 0xfc00 , 0x9400 , &SW_16_ , 0, |
89a955e8 AM |
21843 | 0x0 }, /* SW[16] */ |
21844 | { instruction , 0 , 0 , 16, | |
8d416f6b | 21845 | 0xfc00 , 0xb400 , &SW_SP_ , 0, |
89a955e8 AM |
21846 | 0x0 }, /* SW[SP] */ |
21847 | { instruction , 0 , 0 , 16, | |
8d416f6b | 21848 | 0xfc00 , 0xd400 , &SW_GP16_ , 0, |
89a955e8 AM |
21849 | 0x0 }, /* SW[GP16] */ |
21850 | { instruction , 0 , 0 , 16, | |
8d416f6b | 21851 | 0xfc00 , 0xf400 , &SW_4X4_ , 0, |
89a955e8 AM |
21852 | XMMS_ }, /* SW[4X4] */ |
21853 | { branch_instruction , 0 , 0 , 16, | |
8d416f6b | 21854 | 0xfc00 , 0x1800 , &BC_16_ , 0, |
89a955e8 AM |
21855 | 0x0 }, /* BC[16] */ |
21856 | { call_instruction , 0 , 0 , 16, | |
8d416f6b | 21857 | 0xfc00 , 0x3800 , &BALC_16_ , 0, |
89a955e8 AM |
21858 | 0x0 }, /* BALC[16] */ |
21859 | { reserved_block , 0 , 0 , 16, | |
21860 | 0xfc00 , 0x5800 , 0 , 0, | |
21861 | 0x0 }, /* P16~*(10) */ | |
21862 | { reserved_block , 0 , 0 , 16, | |
21863 | 0xfc00 , 0x7800 , 0 , 0, | |
21864 | 0x0 }, /* P16~*(14) */ | |
21865 | { branch_instruction , 0 , 0 , 16, | |
8d416f6b | 21866 | 0xfc00 , 0x9800 , &BEQZC_16_ , 0, |
89a955e8 AM |
21867 | 0x0 }, /* BEQZC[16] */ |
21868 | { branch_instruction , 0 , 0 , 16, | |
8d416f6b | 21869 | 0xfc00 , 0xb800 , &BNEZC_16_ , 0, |
89a955e8 AM |
21870 | 0x0 }, /* BNEZC[16] */ |
21871 | { pool , P16_BR , 2 , 16, | |
21872 | 0xfc00 , 0xd800 , 0 , 0, | |
21873 | 0x0 }, /* P16.BR */ | |
21874 | { reserved_block , 0 , 0 , 16, | |
21875 | 0xfc00 , 0xf800 , 0 , 0, | |
21876 | 0x0 }, /* P16~*(30) */ | |
21877 | { pool , P16_SR , 2 , 16, | |
21878 | 0xfc00 , 0x1c00 , 0 , 0, | |
21879 | 0x0 }, /* P16.SR */ | |
21880 | { pool , P16_4X4 , 4 , 16, | |
21881 | 0xfc00 , 0x3c00 , 0 , 0, | |
21882 | 0x0 }, /* P16.4X4 */ | |
21883 | { pool , P16_LB , 4 , 16, | |
21884 | 0xfc00 , 0x5c00 , 0 , 0, | |
21885 | 0x0 }, /* P16.LB */ | |
21886 | { pool , P16_LH , 4 , 16, | |
21887 | 0xfc00 , 0x7c00 , 0 , 0, | |
21888 | 0x0 }, /* P16.LH */ | |
21889 | { reserved_block , 0 , 0 , 16, | |
21890 | 0xfc00 , 0x9c00 , 0 , 0, | |
21891 | 0x0 }, /* P16~*(19) */ | |
21892 | { instruction , 0 , 0 , 16, | |
8d416f6b | 21893 | 0xfc00 , 0xbc00 , &MOVEP , 0, |
89a955e8 AM |
21894 | XMMS_ }, /* MOVEP */ |
21895 | { reserved_block , 0 , 0 , 16, | |
21896 | 0xfc00 , 0xdc00 , 0 , 0, | |
21897 | 0x0 }, /* P16~*(27) */ | |
21898 | { instruction , 0 , 0 , 16, | |
8d416f6b | 21899 | 0xfc00 , 0xfc00 , &MOVEP_REV_ , 0, |
89a955e8 AM |
21900 | XMMS_ }, /* MOVEP[REV] */ |
21901 | }; | |
21902 | ||
21903 | ||
a1465490 | 21904 | static const Pool MAJOR[2] = { |
89a955e8 AM |
21905 | { pool , P32 , 32 , 32, |
21906 | 0x10000000, 0x00000000, 0 , 0, | |
21907 | 0x0 }, /* P32 */ | |
21908 | { pool , P16 , 32 , 16, | |
21909 | 0x1000 , 0x1000 , 0 , 0, | |
21910 | 0x0 }, /* P16 */ | |
21911 | }; | |
a1465490 | 21912 | |
7def8a4b | 21913 | static int nanomips_dis(char **buf, |
beebf65b ML |
21914 | Dis_info *info, |
21915 | unsigned short one, | |
21916 | unsigned short two, | |
21917 | unsigned short three) | |
21918 | { | |
beebf65b ML |
21919 | uint16 bits[3] = {one, two, three}; |
21920 | ||
21921 | TABLE_ENTRY_TYPE type; | |
a0fee129 | 21922 | int size = Disassemble(bits, buf, &type, MAJOR, 2, info); |
beebf65b ML |
21923 | return size; |
21924 | } | |
21925 | ||
21926 | int print_insn_nanomips(bfd_vma memaddr, struct disassemble_info *info) | |
21927 | { | |
21928 | int status; | |
21929 | bfd_byte buffer[2]; | |
21930 | uint16_t insn1 = 0, insn2 = 0, insn3 = 0; | |
22e7b52a | 21931 | g_autofree char *buf = NULL; |
beebf65b ML |
21932 | |
21933 | info->bytes_per_chunk = 2; | |
21934 | info->display_endian = info->endian; | |
21935 | info->insn_info_valid = 1; | |
21936 | info->branch_delay_insns = 0; | |
21937 | info->data_size = 0; | |
21938 | info->insn_type = dis_nonbranch; | |
21939 | info->target = 0; | |
21940 | info->target2 = 0; | |
21941 | ||
21942 | Dis_info disassm_info; | |
21943 | disassm_info.m_pc = memaddr; | |
3f2aec07 ML |
21944 | disassm_info.fprintf_func = info->fprintf_func; |
21945 | disassm_info.stream = info->stream; | |
beebf65b ML |
21946 | |
21947 | status = (*info->read_memory_func)(memaddr, buffer, 2, info); | |
21948 | if (status != 0) { | |
21949 | (*info->memory_error_func)(status, memaddr, info); | |
21950 | return -1; | |
21951 | } | |
21952 | ||
21953 | if (info->endian == BFD_ENDIAN_BIG) { | |
21954 | insn1 = bfd_getb16(buffer); | |
21955 | } else { | |
21956 | insn1 = bfd_getl16(buffer); | |
21957 | } | |
21958 | (*info->fprintf_func)(info->stream, "%04x ", insn1); | |
21959 | ||
21960 | /* Handle 32-bit opcodes. */ | |
21961 | if ((insn1 & 0x1000) == 0) { | |
21962 | status = (*info->read_memory_func)(memaddr + 2, buffer, 2, info); | |
21963 | if (status != 0) { | |
21964 | (*info->memory_error_func)(status, memaddr + 2, info); | |
21965 | return -1; | |
21966 | } | |
21967 | ||
21968 | if (info->endian == BFD_ENDIAN_BIG) { | |
21969 | insn2 = bfd_getb16(buffer); | |
21970 | } else { | |
21971 | insn2 = bfd_getl16(buffer); | |
21972 | } | |
21973 | (*info->fprintf_func)(info->stream, "%04x ", insn2); | |
21974 | } else { | |
21975 | (*info->fprintf_func)(info->stream, " "); | |
21976 | } | |
21977 | /* Handle 48-bit opcodes. */ | |
21978 | if ((insn1 >> 10) == 0x18) { | |
21979 | status = (*info->read_memory_func)(memaddr + 4, buffer, 2, info); | |
21980 | if (status != 0) { | |
21981 | (*info->memory_error_func)(status, memaddr + 4, info); | |
21982 | return -1; | |
21983 | } | |
21984 | ||
21985 | if (info->endian == BFD_ENDIAN_BIG) { | |
21986 | insn3 = bfd_getb16(buffer); | |
21987 | } else { | |
21988 | insn3 = bfd_getl16(buffer); | |
21989 | } | |
21990 | (*info->fprintf_func)(info->stream, "%04x ", insn3); | |
21991 | } else { | |
21992 | (*info->fprintf_func)(info->stream, " "); | |
21993 | } | |
21994 | ||
39399c38 ML |
21995 | /* Handle runtime errors. */ |
21996 | if (sigsetjmp(disassm_info.buf, 0) != 0) { | |
21997 | info->insn_type = dis_noninsn; | |
21998 | return insn3 ? 6 : insn2 ? 4 : 2; | |
21999 | } | |
22000 | ||
7def8a4b | 22001 | int length = nanomips_dis(&buf, &disassm_info, insn1, insn2, insn3); |
beebf65b ML |
22002 | |
22003 | /* FIXME: Should probably use a hash table on the major opcode here. */ | |
22004 | ||
22005 | (*info->fprintf_func) (info->stream, "%s", buf); | |
22006 | if (length > 0) { | |
22007 | return length / 8; | |
22008 | } | |
22009 | ||
22010 | info->insn_type = dis_noninsn; | |
22011 | ||
22012 | return insn3 ? 6 : insn2 ? 4 : 2; | |
22013 | } |