]>
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 <matthew.fortune@mips.com> |
8bae1509 | 6 | * Copyright (C) 2018 Aleksandar Markovic <amarkovic@wavecomp.com> |
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 AM |
30 | extern "C" { |
31 | #include "qemu/osdep.h" | |
32 | #include "disas/bfd.h" | |
33 | } | |
34 | ||
35 | #include <cstring> | |
36 | #include <stdexcept> | |
37 | #include <sstream> | |
38 | #include <stdio.h> | |
39 | #include <stdarg.h> | |
40 | ||
41 | #include "nanomips.h" | |
42 | ||
43 | #define IMGASSERTONCE(test) | |
44 | ||
45 | ||
46 | int nanomips_dis(char *buf, | |
47 | unsigned address, | |
48 | unsigned short one, | |
49 | unsigned short two, | |
50 | unsigned short three) | |
51 | { | |
52 | std::string disasm; | |
53 | uint16 bits[3] = {one, two, three}; | |
54 | ||
55 | NMD::TABLE_ENTRY_TYPE type; | |
56 | NMD d(address, NMD::ALL_ATTRIBUTES); | |
57 | int size = d.Disassemble(bits, disasm, type); | |
58 | ||
59 | strcpy(buf, disasm.c_str()); | |
60 | return size; | |
61 | } | |
62 | ||
63 | int print_insn_nanomips(bfd_vma memaddr, struct disassemble_info *info) | |
64 | { | |
65 | int status; | |
66 | bfd_byte buffer[2]; | |
67 | uint16_t insn1 = 0, insn2 = 0, insn3 = 0; | |
68 | char buf[200]; | |
69 | ||
70 | info->bytes_per_chunk = 2; | |
71 | info->display_endian = info->endian; | |
72 | info->insn_info_valid = 1; | |
73 | info->branch_delay_insns = 0; | |
74 | info->data_size = 0; | |
75 | info->insn_type = dis_nonbranch; | |
76 | info->target = 0; | |
77 | info->target2 = 0; | |
78 | ||
79 | status = (*info->read_memory_func)(memaddr, buffer, 2, info); | |
80 | if (status != 0) { | |
81 | (*info->memory_error_func)(status, memaddr, info); | |
82 | return -1; | |
83 | } | |
84 | ||
85 | if (info->endian == BFD_ENDIAN_BIG) { | |
86 | insn1 = bfd_getb16(buffer); | |
87 | } else { | |
88 | insn1 = bfd_getl16(buffer); | |
89 | } | |
90 | (*info->fprintf_func)(info->stream, "%04x ", insn1); | |
91 | ||
92 | /* Handle 32-bit opcodes. */ | |
93 | if ((insn1 & 0x1000) == 0) { | |
94 | status = (*info->read_memory_func)(memaddr + 2, buffer, 2, info); | |
95 | if (status != 0) { | |
96 | (*info->memory_error_func)(status, memaddr + 2, info); | |
97 | return -1; | |
98 | } | |
99 | ||
100 | if (info->endian == BFD_ENDIAN_BIG) { | |
101 | insn2 = bfd_getb16(buffer); | |
102 | } else { | |
103 | insn2 = bfd_getl16(buffer); | |
104 | } | |
105 | (*info->fprintf_func)(info->stream, "%04x ", insn2); | |
106 | } else { | |
107 | (*info->fprintf_func)(info->stream, " "); | |
108 | } | |
109 | /* Handle 48-bit opcodes. */ | |
110 | if ((insn1 >> 10) == 0x18) { | |
111 | status = (*info->read_memory_func)(memaddr + 4, buffer, 2, info); | |
112 | if (status != 0) { | |
113 | (*info->memory_error_func)(status, memaddr + 4, info); | |
114 | return -1; | |
115 | } | |
116 | ||
117 | if (info->endian == BFD_ENDIAN_BIG) { | |
118 | insn3 = bfd_getb16(buffer); | |
119 | } else { | |
120 | insn3 = bfd_getl16(buffer); | |
121 | } | |
122 | (*info->fprintf_func)(info->stream, "%04x ", insn3); | |
123 | } else { | |
124 | (*info->fprintf_func)(info->stream, " "); | |
125 | } | |
126 | ||
127 | int length = nanomips_dis(buf, memaddr, insn1, insn2, insn3); | |
128 | ||
129 | /* FIXME: Should probably use a hash table on the major opcode here. */ | |
130 | ||
131 | (*info->fprintf_func) (info->stream, "%s", buf); | |
132 | if (length > 0) { | |
133 | return length / 8; | |
134 | } | |
135 | ||
136 | info->insn_type = dis_noninsn; | |
137 | ||
138 | return insn3 ? 6 : insn2 ? 4 : 2; | |
139 | } | |
140 | ||
141 | ||
142 | namespace img | |
143 | { | |
144 | address addr32(address a) | |
145 | { | |
146 | return a; | |
147 | } | |
148 | ||
149 | std::string format(const char *format, ...) | |
150 | { | |
151 | char buffer[256]; | |
152 | va_list args; | |
153 | va_start(args, format); | |
154 | int err = vsprintf(buffer, format, args); | |
155 | if (err < 0) { | |
156 | perror(buffer); | |
157 | } | |
158 | va_end(args); | |
159 | return buffer; | |
160 | } | |
161 | ||
162 | std::string format(const char *format, | |
163 | std::string s) | |
164 | { | |
165 | char buffer[256]; | |
166 | ||
167 | sprintf(buffer, format, s.c_str()); | |
168 | ||
169 | return buffer; | |
170 | } | |
171 | ||
172 | std::string format(const char *format, | |
173 | std::string s1, | |
174 | std::string s2) | |
175 | { | |
176 | char buffer[256]; | |
177 | ||
178 | sprintf(buffer, format, s1.c_str(), s2.c_str()); | |
179 | ||
180 | return buffer; | |
181 | } | |
182 | ||
183 | std::string format(const char *format, | |
184 | std::string s1, | |
185 | std::string s2, | |
186 | std::string s3) | |
187 | { | |
188 | char buffer[256]; | |
189 | ||
190 | sprintf(buffer, format, s1.c_str(), s2.c_str(), s3.c_str()); | |
191 | ||
192 | return buffer; | |
193 | } | |
194 | ||
195 | std::string format(const char *format, | |
196 | std::string s1, | |
197 | std::string s2, | |
198 | std::string s3, | |
199 | std::string s4) | |
200 | { | |
201 | char buffer[256]; | |
202 | ||
203 | sprintf(buffer, format, s1.c_str(), s2.c_str(), s3.c_str(), | |
204 | s4.c_str()); | |
205 | ||
206 | return buffer; | |
207 | } | |
208 | ||
209 | std::string format(const char *format, | |
210 | std::string s1, | |
211 | std::string s2, | |
212 | std::string s3, | |
213 | std::string s4, | |
214 | std::string s5) | |
215 | { | |
216 | char buffer[256]; | |
217 | ||
218 | sprintf(buffer, format, s1.c_str(), s2.c_str(), s3.c_str(), | |
219 | s4.c_str(), s5.c_str()); | |
220 | ||
221 | return buffer; | |
222 | } | |
223 | ||
224 | std::string format(const char *format, | |
225 | uint64 d, | |
226 | std::string s2) | |
227 | { | |
228 | char buffer[256]; | |
229 | ||
230 | sprintf(buffer, format, d, s2.c_str()); | |
231 | ||
232 | return buffer; | |
233 | } | |
234 | ||
235 | std::string format(const char *format, | |
236 | std::string s1, | |
237 | uint64 d, | |
238 | std::string s2) | |
239 | { | |
240 | char buffer[256]; | |
241 | ||
242 | sprintf(buffer, format, s1.c_str(), d, s2.c_str()); | |
243 | ||
244 | return buffer; | |
245 | } | |
246 | ||
247 | std::string format(const char *format, | |
248 | std::string s1, | |
249 | std::string s2, | |
250 | uint64 d) | |
251 | { | |
252 | char buffer[256]; | |
253 | ||
254 | sprintf(buffer, format, s1.c_str(), s2.c_str(), d); | |
255 | ||
256 | return buffer; | |
257 | } | |
258 | ||
259 | char as_char(int c) | |
260 | { | |
261 | return static_cast<char>(c); | |
262 | } | |
263 | }; | |
264 | ||
265 | ||
266 | std::string to_string(img::address a) | |
267 | { | |
268 | char buffer[256]; | |
8c33ea59 | 269 | sprintf(buffer, "0x%" PRIx64, a); |
89a955e8 AM |
270 | return buffer; |
271 | } | |
272 | ||
273 | ||
274 | uint64 extract_bits(uint64 data, uint32 bit_offset, uint32 bit_size) | |
275 | { | |
276 | return (data << (64 - (bit_size + bit_offset))) >> (64 - bit_size); | |
277 | } | |
278 | ||
279 | ||
280 | int64 sign_extend(int64 data, int msb) | |
281 | { | |
282 | uint64 shift = 63 - msb; | |
283 | return (data << shift) >> shift; | |
284 | } | |
285 | ||
286 | ||
287 | uint64 NMD::renumber_registers(uint64 index, uint64 *register_list, | |
288 | size_t register_list_size) | |
289 | { | |
290 | if (index < register_list_size) { | |
291 | return register_list[index]; | |
292 | } | |
293 | ||
294 | throw std::runtime_error(img::format( | |
8c33ea59 SW |
295 | "Invalid register mapping index %" PRIu64 |
296 | ", size of list = %zu", | |
89a955e8 AM |
297 | index, register_list_size)); |
298 | } | |
299 | ||
300 | ||
eabf76a0 AM |
301 | /* |
302 | * NMD::decode_gpr_gpr4() - decoder for 'gpr4' gpr encoding type | |
303 | * | |
304 | * Map a 4-bit code to the 5-bit register space according to this pattern: | |
305 | * | |
306 | * 1 0 | |
307 | * 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 | |
308 | * | | | | | | | | | | | | | | | | | |
309 | * | | | | | | | | | | | | | | | | | |
310 | * | | | | | | | | | | | ā---------------ā | |
311 | * | | | | | | | | | | ā---------------ā | | |
312 | * | | | | | | | | | ā---------------ā | | | |
313 | * | | | | | | | | ā---------------ā | | | | |
314 | * | | | | | | | | | | | | | | | | | |
315 | * | | | | | | | | | | | | | | | | | |
316 | * 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 | |
317 | * 3 2 1 0 | |
318 | * | |
319 | * Used in handling following instructions: | |
320 | * | |
321 | * - ADDU[4X4] | |
322 | * - LW[4X4] | |
323 | * - MOVEP[REV] | |
324 | * - MUL[4X4] | |
325 | * - SW[4X4] | |
326 | */ | |
327 | uint64 NMD::decode_gpr_gpr4(uint64 d) | |
328 | { | |
329 | static uint64 register_list[] = { 8, 9, 10, 11, 4, 5, 6, 7, | |
330 | 16, 17, 18, 19, 20, 21, 22, 23 }; | |
331 | return renumber_registers(d, register_list, | |
332 | sizeof(register_list) / sizeof(register_list[0])); | |
333 | } | |
334 | ||
335 | ||
336 | /* | |
337 | * NMD::decode_gpr_gpr4_zero() - decoder for 'gpr4.zero' gpr encoding type | |
338 | * | |
339 | * Map a 4-bit code to the 5-bit register space according to this pattern: | |
340 | * | |
341 | * 1 0 | |
342 | * 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 | |
343 | * | | | | | | | | | | | | | | | | | |
344 | * | | | | | | | | | | | | ā---------------------ā | |
345 | * | | | | | | | | | | | ā---------------ā | | |
346 | * | | | | | | | | | | ā---------------ā | | | |
347 | * | | | | | | | | | ā---------------ā | | | | |
348 | * | | | | | | | | ā---------------ā | | | | | |
349 | * | | | | | | | | | | | | | | | | | |
350 | * | | | | | | | | | | | | | | | | | |
351 | * 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 | |
352 | * 3 2 1 0 | |
353 | * | |
354 | * This pattern is the same one used for 'gpr4' gpr encoding type, except for | |
355 | * the input value 3, that is mapped to the output value 0 instead of 11. | |
356 | * | |
357 | * Used in handling following instructions: | |
358 | * | |
359 | * - MOVE.BALC | |
360 | * - MOVEP | |
361 | * - SW[4X4] | |
362 | */ | |
363 | uint64 NMD::decode_gpr_gpr4_zero(uint64 d) | |
364 | { | |
365 | static uint64 register_list[] = { 8, 9, 10, 0, 4, 5, 6, 7, | |
366 | 16, 17, 18, 19, 20, 21, 22, 23 }; | |
367 | return renumber_registers(d, register_list, | |
368 | sizeof(register_list) / sizeof(register_list[0])); | |
369 | } | |
370 | ||
371 | ||
89a955e8 | 372 | /* |
01fc2557 AM |
373 | * NMD::decode_gpr_gpr3() - decoder for 'gpr3' gpr encoding type |
374 | * | |
375 | * Map a 3-bit code to the 5-bit register space according to this pattern: | |
376 | * | |
377 | * 7 6 5 4 3 2 1 0 | |
378 | * | | | | | | | | | |
379 | * | | | | | | | | | |
380 | * | | | ā-----------------------ā | |
381 | * | | ā-----------------------ā | | |
382 | * | ā-----------------------ā | | | |
383 | * ā-----------------------ā | | | | |
384 | * | | | | | | | | | |
385 | * ā-------ā | | | | | | | | |
386 | * | ā-------ā | | | | | | | |
387 | * | | ā-------ā | | | | | | |
388 | * | | | ā-------ā | | | | | |
389 | * | | | | | | | | | |
390 | * 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 | |
391 | * 3 2 1 0 | |
392 | * | |
393 | * Used in handling following instructions: | |
394 | * | |
395 | * - ADDIU[R1.SP] | |
396 | * - ADDIU[R2] | |
397 | * - ADDU[16] | |
398 | * - AND[16] | |
399 | * - ANDI[16] | |
400 | * - BEQC[16] | |
401 | * - BEQZC[16] | |
402 | * - BNEC[16] | |
403 | * - BNEZC[16] | |
404 | * - LB[16] | |
405 | * - LBU[16] | |
406 | * - LH[16] | |
407 | * - LHU[16] | |
408 | * - LI[16] | |
409 | * - LW[16] | |
410 | * - LW[GP16] | |
411 | * - LWXS[16] | |
412 | * - NOT[16] | |
413 | * - OR[16] | |
414 | * - SB[16] | |
415 | * - SH[16] | |
416 | * - SLL[16] | |
417 | * - SRL[16] | |
418 | * - SUBU[16] | |
419 | * - SW[16] | |
420 | * - XOR[16] | |
89a955e8 | 421 | */ |
988d6c89 | 422 | uint64 NMD::decode_gpr_gpr3(uint64 d) |
89a955e8 AM |
423 | { |
424 | static uint64 register_list[] = { 16, 17, 18, 19, 4, 5, 6, 7 }; | |
425 | return renumber_registers(d, register_list, | |
426 | sizeof(register_list) / sizeof(register_list[0])); | |
427 | } | |
428 | ||
429 | ||
6ab8abfc AM |
430 | /* |
431 | * NMD::decode_gpr_gpr3_src_store() - decoder for 'gpr3.src.store' gpr encoding | |
432 | * type | |
433 | * | |
434 | * Map a 3-bit code to the 5-bit register space according to this pattern: | |
435 | * | |
436 | * 7 6 5 4 3 2 1 0 | |
437 | * | | | | | | | | | |
438 | * | | | | | | | ā-----------------------ā | |
439 | * | | | ā-----------------------ā | | |
440 | * | | ā-----------------------ā | | | |
441 | * | ā-----------------------ā | | | | |
442 | * ā-----------------------ā | | | | | |
443 | * | | | | | | | | | |
444 | * ā-------ā | | | | | | | | |
445 | * | ā-------ā | | | | | | | |
446 | * | | ā-------ā | | | | | | |
447 | * | | | | | | | | | |
448 | * | | | | | | | | | |
449 | * 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 | |
450 | * 3 2 1 0 | |
451 | * | |
452 | * This pattern is the same one used for 'gpr3' gpr encoding type, except for | |
453 | * the input value 0, that is mapped to the output value 0 instead of 16. | |
454 | * | |
455 | * Used in handling following instructions: | |
456 | * | |
457 | * - SB[16] | |
458 | * - SH[16] | |
459 | * - SW[16] | |
460 | * - SW[GP16] | |
461 | */ | |
8191856b | 462 | uint64 NMD::decode_gpr_gpr3_src_store(uint64 d) |
89a955e8 AM |
463 | { |
464 | static uint64 register_list[] = { 0, 17, 18, 19, 4, 5, 6, 7 }; | |
465 | return renumber_registers(d, register_list, | |
466 | sizeof(register_list) / sizeof(register_list[0])); | |
467 | } | |
468 | ||
469 | ||
8e2919f6 AM |
470 | /* |
471 | * NMD::decode_gpr_gpr2_reg1() - decoder for 'gpr2.reg1' gpr encoding type | |
472 | * | |
473 | * Map a 2-bit code to the 5-bit register space according to this pattern: | |
474 | * | |
475 | * 3 2 1 0 | |
476 | * | | | | | |
477 | * | | | | | |
478 | * | | | ā-------------------ā | |
479 | * | | ā-------------------ā | | |
480 | * | ā-------------------ā | | | |
481 | * ā-------------------ā | | | | |
482 | * | | | | | |
483 | * | | | | | |
484 | * 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 | |
485 | * 3 2 1 0 | |
486 | * | |
487 | * Used in handling following instructions: | |
488 | * | |
489 | * - MOVEP | |
490 | * - MOVEP[REV] | |
491 | */ | |
4671783a | 492 | uint64 NMD::decode_gpr_gpr2_reg1(uint64 d) |
89a955e8 AM |
493 | { |
494 | static uint64 register_list[] = { 4, 5, 6, 7 }; | |
495 | return renumber_registers(d, register_list, | |
496 | sizeof(register_list) / sizeof(register_list[0])); | |
497 | } | |
498 | ||
499 | ||
a21e0520 AM |
500 | /* |
501 | * NMD::decode_gpr_gpr2_reg2() - decoder for 'gpr2.reg2' gpr encoding type | |
502 | * | |
503 | * Map a 2-bit code to the 5-bit register space according to this pattern: | |
504 | * | |
505 | * 3 2 1 0 | |
506 | * | | | | | |
507 | * | | | | | |
508 | * | | | ā-----------------ā | |
509 | * | | ā-----------------ā | | |
510 | * | ā-----------------ā | | | |
511 | * ā-----------------ā | | | | |
512 | * | | | | | |
513 | * | | | | | |
514 | * 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 | |
515 | * 3 2 1 0 | |
516 | * | |
517 | * Used in handling following instructions: | |
518 | * | |
519 | * - MOVEP | |
520 | * - MOVEP[REV] | |
521 | */ | |
ce0f2617 | 522 | uint64 NMD::decode_gpr_gpr2_reg2(uint64 d) |
89a955e8 AM |
523 | { |
524 | static uint64 register_list[] = { 5, 6, 7, 8 }; | |
525 | return renumber_registers(d, register_list, | |
526 | sizeof(register_list) / sizeof(register_list[0])); | |
527 | } | |
528 | ||
529 | ||
eabf76a0 AM |
530 | /* |
531 | * NMD::decode_gpr_gpr1() - decoder for 'gpr1' gpr encoding type | |
532 | * | |
533 | * Map a 1-bit code to the 5-bit register space according to this pattern: | |
534 | * | |
535 | * 1 0 | |
536 | * | | | |
537 | * | | | |
538 | * | ā---------------------ā | |
539 | * ā---------------------ā | | |
540 | * | | | |
541 | * | | | |
542 | * | | | |
543 | * | | | |
544 | * 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 | |
545 | * 3 2 1 0 | |
546 | * | |
547 | * Used in handling following instruction: | |
548 | * | |
549 | * - MOVE.BALC | |
550 | */ | |
551 | uint64 NMD::decode_gpr_gpr1(uint64 d) | |
552 | { | |
553 | static uint64 register_list[] = { 4, 5 }; | |
554 | return renumber_registers(d, register_list, | |
555 | sizeof(register_list) / sizeof(register_list[0])); | |
556 | } | |
557 | ||
558 | ||
89a955e8 AM |
559 | uint64 NMD::copy(uint64 d) |
560 | { | |
561 | return d; | |
562 | } | |
563 | ||
564 | ||
565 | int64 NMD::copy(int64 d) | |
566 | { | |
567 | return d; | |
568 | } | |
569 | ||
570 | ||
571 | int64 NMD::neg_copy(uint64 d) | |
572 | { | |
573 | return 0ll - d; | |
574 | } | |
575 | ||
576 | ||
577 | int64 NMD::neg_copy(int64 d) | |
578 | { | |
579 | return -d; | |
580 | } | |
581 | ||
582 | ||
583 | /* strange wrapper around gpr3 */ | |
584 | uint64 NMD::encode_rs3_and_check_rs3_ge_rt3(uint64 d) | |
585 | { | |
988d6c89 | 586 | return decode_gpr_gpr3(d); |
89a955e8 AM |
587 | } |
588 | ||
589 | ||
590 | /* strange wrapper around gpr3 */ | |
591 | uint64 NMD::encode_rs3_and_check_rs3_lt_rt3(uint64 d) | |
592 | { | |
988d6c89 | 593 | return decode_gpr_gpr3(d); |
89a955e8 AM |
594 | } |
595 | ||
596 | ||
597 | /* nop - done by extraction function */ | |
598 | uint64 NMD::encode_s_from_address(uint64 d) | |
599 | { | |
600 | return d; | |
601 | } | |
602 | ||
603 | ||
604 | /* nop - done by extraction function */ | |
605 | uint64 NMD::encode_u_from_address(uint64 d) | |
606 | { | |
607 | return d; | |
608 | } | |
609 | ||
610 | ||
611 | /* nop - done by extraction function */ | |
612 | uint64 NMD::encode_s_from_s_hi(uint64 d) | |
613 | { | |
614 | return d; | |
615 | } | |
616 | ||
617 | ||
618 | uint64 NMD::encode_count3_from_count(uint64 d) | |
619 | { | |
620 | IMGASSERTONCE(d < 8); | |
621 | return d == 0ull ? 8ull : d; | |
622 | } | |
623 | ||
624 | ||
625 | uint64 NMD::encode_shift3_from_shift(uint64 d) | |
626 | { | |
627 | IMGASSERTONCE(d < 8); | |
628 | return d == 0ull ? 8ull : d; | |
629 | } | |
630 | ||
631 | ||
632 | /* special value for load literal */ | |
633 | int64 NMD::encode_eu_from_s_li16(uint64 d) | |
634 | { | |
635 | IMGASSERTONCE(d < 128); | |
636 | return d == 127 ? -1 : (int64)d; | |
637 | } | |
638 | ||
639 | ||
640 | uint64 NMD::encode_msbd_from_size(uint64 d) | |
641 | { | |
642 | IMGASSERTONCE(d < 32); | |
643 | return d + 1; | |
644 | } | |
645 | ||
646 | ||
647 | uint64 NMD::encode_eu_from_u_andi16(uint64 d) | |
648 | { | |
649 | IMGASSERTONCE(d < 16); | |
650 | if (d == 12) { | |
651 | return 0x00ffull; | |
652 | } | |
653 | if (d == 13) { | |
654 | return 0xffffull; | |
655 | } | |
656 | return d; | |
657 | } | |
658 | ||
659 | ||
660 | uint64 NMD::encode_msbd_from_pos_and_size(uint64 d) | |
661 | { | |
662 | IMGASSERTONCE(0); | |
663 | return d; | |
664 | } | |
665 | ||
666 | ||
667 | /* save16 / restore16 ???? */ | |
668 | uint64 NMD::encode_rt1_from_rt(uint64 d) | |
669 | { | |
670 | return d ? 31 : 30; | |
671 | } | |
672 | ||
673 | ||
674 | /* ? */ | |
675 | uint64 NMD::encode_lsb_from_pos_and_size(uint64 d) | |
676 | { | |
677 | return d; | |
678 | } | |
679 | ||
680 | ||
681 | std::string NMD::save_restore_list(uint64 rt, uint64 count, uint64 gp) | |
682 | { | |
683 | std::string str; | |
684 | ||
685 | for (uint64 counter = 0; counter != count; counter++) { | |
686 | bool use_gp = gp && (counter == count - 1); | |
687 | uint64 this_rt = use_gp ? 28 : ((rt & 0x10) | (rt + counter)) & 0x1f; | |
688 | str += img::format(",%s", GPR(this_rt)); | |
689 | } | |
690 | ||
691 | return str; | |
692 | } | |
693 | ||
694 | ||
695 | std::string NMD::GPR(uint64 reg) | |
696 | { | |
697 | static const char *gpr_reg[32] = { | |
698 | "zero", "at", "v0", "v1", "a0", "a1", "a2", "a3", | |
699 | "a4", "a5", "a6", "a7", "r12", "r13", "r14", "r15", | |
700 | "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", | |
701 | "r24", "r25", "k0", "k1", "gp", "sp", "fp", "ra" | |
702 | }; | |
703 | ||
704 | if (reg < 32) { | |
705 | return gpr_reg[reg]; | |
706 | } | |
707 | ||
8c33ea59 SW |
708 | throw std::runtime_error(img::format("Invalid GPR register index %" PRIu64, |
709 | reg)); | |
89a955e8 AM |
710 | } |
711 | ||
712 | ||
713 | std::string NMD::FPR(uint64 reg) | |
714 | { | |
715 | static const char *fpr_reg[32] = { | |
716 | "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7", | |
717 | "f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15", | |
718 | "f16", "f17", "f18", "f19", "f20", "f21", "f22", "f23", | |
719 | "f24", "f25", "f26", "f27", "f28", "f29", "f30", "f31" | |
720 | }; | |
721 | ||
722 | if (reg < 32) { | |
723 | return fpr_reg[reg]; | |
724 | } | |
725 | ||
8c33ea59 SW |
726 | throw std::runtime_error(img::format("Invalid FPR register index %" PRIu64, |
727 | reg)); | |
89a955e8 AM |
728 | } |
729 | ||
730 | ||
731 | std::string NMD::AC(uint64 reg) | |
732 | { | |
733 | static const char *ac_reg[4] = { | |
734 | "ac0", "ac1", "ac2", "ac3" | |
735 | }; | |
736 | ||
737 | if (reg < 4) { | |
738 | return ac_reg[reg]; | |
739 | } | |
740 | ||
8c33ea59 SW |
741 | throw std::runtime_error(img::format("Invalid AC register index %" PRIu64, |
742 | reg)); | |
89a955e8 AM |
743 | } |
744 | ||
745 | ||
746 | std::string NMD::IMMEDIATE(uint64 value) | |
747 | { | |
8c33ea59 | 748 | return img::format("0x%" PRIx64, value); |
89a955e8 AM |
749 | } |
750 | ||
751 | ||
752 | std::string NMD::IMMEDIATE(int64 value) | |
753 | { | |
8c33ea59 | 754 | return img::format("%" PRId64, value); |
89a955e8 AM |
755 | } |
756 | ||
757 | ||
758 | std::string NMD::CPR(uint64 reg) | |
759 | { | |
760 | /* needs more work */ | |
8c33ea59 | 761 | return img::format("CP%" PRIu64, reg); |
89a955e8 AM |
762 | } |
763 | ||
764 | ||
765 | std::string NMD::ADDRESS(uint64 value, int instruction_size) | |
766 | { | |
767 | /* token for string replace */ | |
768 | /* const char TOKEN_REPLACE = (char)0xa2; */ | |
769 | img::address address = m_pc + value + instruction_size; | |
770 | /* symbol replacement */ | |
771 | /* return img::as_char(TOKEN_REPLACE) + to_string(address); */ | |
772 | return to_string(address); | |
773 | } | |
774 | ||
775 | ||
776 | uint64 NMD::extract_op_code_value(const uint16 * data, int size) | |
777 | { | |
778 | switch (size) { | |
779 | case 16: | |
780 | return data[0]; | |
781 | case 32: | |
782 | return ((uint64)data[0] << 16) | data[1]; | |
783 | case 48: | |
784 | return ((uint64)data[0] << 32) | ((uint64)data[1] << 16) | data[2]; | |
785 | default: | |
786 | return data[0]; | |
787 | } | |
788 | } | |
789 | ||
790 | ||
791 | int NMD::Disassemble(const uint16 * data, std::string & dis, | |
792 | NMD::TABLE_ENTRY_TYPE & type) | |
793 | { | |
794 | return Disassemble(data, dis, type, MAJOR, 2); | |
795 | } | |
796 | ||
797 | ||
798 | /* | |
799 | * Recurse through tables until the instruction is found then return | |
800 | * the string and size | |
801 | * | |
802 | * inputs: | |
803 | * pointer to a word stream, | |
804 | * disassember table and size | |
805 | * returns: | |
806 | * instruction size - negative is error | |
807 | * disassembly string - on error will constain error string | |
808 | */ | |
809 | int NMD::Disassemble(const uint16 * data, std::string & dis, | |
810 | NMD::TABLE_ENTRY_TYPE & type, const Pool *table, | |
811 | int table_size) | |
812 | { | |
813 | try | |
814 | { | |
815 | for (int i = 0; i < table_size; i++) { | |
816 | uint64 op_code = extract_op_code_value(data, | |
817 | table[i].instructions_size); | |
818 | if ((op_code & table[i].mask) == table[i].value) { | |
819 | /* possible match */ | |
820 | conditional_function cond = table[i].condition; | |
821 | if ((cond == 0) || (this->*cond)(op_code)) { | |
822 | try | |
823 | { | |
824 | if (table[i].type == pool) { | |
825 | return Disassemble(data, dis, type, | |
826 | table[i].next_table, | |
827 | table[i].next_table_size); | |
828 | } else if ((table[i].type == instruction) || | |
829 | (table[i].type == call_instruction) || | |
830 | (table[i].type == branch_instruction) || | |
831 | (table[i].type == return_instruction)) { | |
832 | if ((table[i].attributes != 0) && | |
833 | (m_requested_instruction_categories & | |
834 | table[i].attributes) == 0) { | |
835 | /* | |
836 | * failed due to instruction having | |
837 | * an ASE attribute and the requested version | |
838 | * not having that attribute | |
839 | */ | |
840 | dis = "ASE attribute missmatch"; | |
841 | return -5; | |
842 | } | |
843 | disassembly_function dis_fn = table[i].disassembly; | |
844 | if (dis_fn == 0) { | |
845 | dis = "disassembler failure - bad table entry"; | |
846 | return -6; | |
847 | } | |
848 | type = table[i].type; | |
849 | dis = (this->*dis_fn)(op_code); | |
850 | return table[i].instructions_size; | |
851 | } else { | |
852 | dis = "reserved instruction"; | |
853 | return -2; | |
854 | } | |
855 | } | |
856 | catch (std::runtime_error & e) | |
857 | { | |
858 | dis = e.what(); | |
859 | return -3; /* runtime error */ | |
860 | } | |
861 | } | |
862 | } | |
863 | } | |
864 | } | |
865 | catch (std::exception & e) | |
866 | { | |
867 | dis = e.what(); | |
868 | return -4; /* runtime error */ | |
869 | } | |
870 | ||
871 | dis = "failed to disassemble"; | |
872 | return -1; /* failed to disassemble */ | |
873 | } | |
874 | ||
875 | ||
876 | uint64 NMD::extract_code_18_to_0(uint64 instruction) | |
877 | { | |
878 | uint64 value = 0; | |
879 | value |= extract_bits(instruction, 0, 19); | |
880 | return value; | |
881 | } | |
882 | ||
883 | ||
884 | uint64 NMD::extract_shift3_2_1_0(uint64 instruction) | |
885 | { | |
886 | uint64 value = 0; | |
887 | value |= extract_bits(instruction, 0, 3); | |
888 | return value; | |
889 | } | |
890 | ||
891 | ||
11b9732a | 892 | uint64 NMD::extract_u_11_10_9_8_7_6_5_4_3__s3(uint64 instruction) |
89a955e8 AM |
893 | { |
894 | uint64 value = 0; | |
895 | value |= extract_bits(instruction, 3, 9) << 3; | |
896 | return value; | |
897 | } | |
898 | ||
899 | ||
900 | uint64 NMD::extract_count_3_2_1_0(uint64 instruction) | |
901 | { | |
902 | uint64 value = 0; | |
903 | value |= extract_bits(instruction, 0, 4); | |
904 | return value; | |
905 | } | |
906 | ||
907 | ||
908 | uint64 NMD::extract_rtz3_9_8_7(uint64 instruction) | |
909 | { | |
910 | uint64 value = 0; | |
911 | value |= extract_bits(instruction, 7, 3); | |
912 | return value; | |
913 | } | |
914 | ||
915 | ||
11b9732a | 916 | uint64 NMD::extract_u_17_to_1__s1(uint64 instruction) |
89a955e8 AM |
917 | { |
918 | uint64 value = 0; | |
919 | value |= extract_bits(instruction, 1, 17) << 1; | |
920 | return value; | |
921 | } | |
922 | ||
923 | ||
d3605cc0 | 924 | int64 NMD::extract_s__se9_20_19_18_17_16_15_14_13_12_11(uint64 instruction) |
89a955e8 AM |
925 | { |
926 | int64 value = 0; | |
927 | value |= extract_bits(instruction, 11, 10); | |
928 | value = sign_extend(value, 9); | |
929 | return value; | |
930 | } | |
931 | ||
932 | ||
d3605cc0 | 933 | int64 NMD::extract_s__se11_0_10_9_8_7_6_5_4_3_2_1_0_s1(uint64 instruction) |
89a955e8 AM |
934 | { |
935 | int64 value = 0; | |
936 | value |= extract_bits(instruction, 0, 1) << 11; | |
937 | value |= extract_bits(instruction, 1, 10) << 1; | |
938 | value = sign_extend(value, 11); | |
939 | return value; | |
940 | } | |
941 | ||
942 | ||
943 | uint64 NMD::extract_u_10(uint64 instruction) | |
944 | { | |
945 | uint64 value = 0; | |
946 | value |= extract_bits(instruction, 10, 1); | |
947 | return value; | |
948 | } | |
949 | ||
950 | ||
951 | uint64 NMD::extract_rtz4_27_26_25_23_22_21(uint64 instruction) | |
952 | { | |
953 | uint64 value = 0; | |
954 | value |= extract_bits(instruction, 21, 3); | |
955 | value |= extract_bits(instruction, 25, 1) << 3; | |
956 | return value; | |
957 | } | |
958 | ||
959 | ||
960 | uint64 NMD::extract_sa_15_14_13_12_11(uint64 instruction) | |
961 | { | |
962 | uint64 value = 0; | |
963 | value |= extract_bits(instruction, 11, 5); | |
964 | return value; | |
965 | } | |
966 | ||
967 | ||
968 | uint64 NMD::extract_shift_4_3_2_1_0(uint64 instruction) | |
969 | { | |
970 | uint64 value = 0; | |
971 | value |= extract_bits(instruction, 0, 5); | |
972 | return value; | |
973 | } | |
974 | ||
975 | ||
11b9732a | 976 | uint64 NMD::extract_shiftx_10_9_8_7__s1(uint64 instruction) |
89a955e8 AM |
977 | { |
978 | uint64 value = 0; | |
979 | value |= extract_bits(instruction, 7, 4) << 1; | |
980 | return value; | |
981 | } | |
982 | ||
983 | ||
984 | uint64 NMD::extract_hint_25_24_23_22_21(uint64 instruction) | |
985 | { | |
986 | uint64 value = 0; | |
987 | value |= extract_bits(instruction, 21, 5); | |
988 | return value; | |
989 | } | |
990 | ||
991 | ||
992 | uint64 NMD::extract_count3_14_13_12(uint64 instruction) | |
993 | { | |
994 | uint64 value = 0; | |
995 | value |= extract_bits(instruction, 12, 3); | |
996 | return value; | |
997 | } | |
998 | ||
999 | ||
d3605cc0 | 1000 | int64 NMD::extract_s__se31_0_11_to_2_20_to_12_s12(uint64 instruction) |
89a955e8 AM |
1001 | { |
1002 | int64 value = 0; | |
1003 | value |= extract_bits(instruction, 0, 1) << 31; | |
1004 | value |= extract_bits(instruction, 2, 10) << 21; | |
1005 | value |= extract_bits(instruction, 12, 9) << 12; | |
1006 | value = sign_extend(value, 31); | |
1007 | return value; | |
1008 | } | |
1009 | ||
1010 | ||
d3605cc0 | 1011 | int64 NMD::extract_s__se7_0_6_5_4_3_2_1_s1(uint64 instruction) |
89a955e8 AM |
1012 | { |
1013 | int64 value = 0; | |
1014 | value |= extract_bits(instruction, 0, 1) << 7; | |
1015 | value |= extract_bits(instruction, 1, 6) << 1; | |
1016 | value = sign_extend(value, 7); | |
1017 | return value; | |
1018 | } | |
1019 | ||
1020 | ||
1021 | uint64 NMD::extract_u2_10_9(uint64 instruction) | |
1022 | { | |
1023 | uint64 value = 0; | |
1024 | value |= extract_bits(instruction, 9, 2); | |
1025 | return value; | |
1026 | } | |
1027 | ||
1028 | ||
1029 | uint64 NMD::extract_code_25_24_23_22_21_20_19_18_17_16(uint64 instruction) | |
1030 | { | |
1031 | uint64 value = 0; | |
1032 | value |= extract_bits(instruction, 16, 10); | |
1033 | return value; | |
1034 | } | |
1035 | ||
1036 | ||
1037 | uint64 NMD::extract_rs_20_19_18_17_16(uint64 instruction) | |
1038 | { | |
1039 | uint64 value = 0; | |
1040 | value |= extract_bits(instruction, 16, 5); | |
1041 | return value; | |
1042 | } | |
1043 | ||
1044 | ||
11b9732a | 1045 | uint64 NMD::extract_u_2_1__s1(uint64 instruction) |
89a955e8 AM |
1046 | { |
1047 | uint64 value = 0; | |
1048 | value |= extract_bits(instruction, 1, 2) << 1; | |
1049 | return value; | |
1050 | } | |
1051 | ||
1052 | ||
1053 | uint64 NMD::extract_stripe_6(uint64 instruction) | |
1054 | { | |
1055 | uint64 value = 0; | |
1056 | value |= extract_bits(instruction, 6, 1); | |
1057 | return value; | |
1058 | } | |
1059 | ||
1060 | ||
89a955e8 AM |
1061 | uint64 NMD::extract_ac_13_12(uint64 instruction) |
1062 | { | |
1063 | uint64 value = 0; | |
1064 | value |= extract_bits(instruction, 14, 2); | |
1065 | return value; | |
1066 | } | |
1067 | ||
1068 | ||
1069 | uint64 NMD::extract_shift_20_19_18_17_16(uint64 instruction) | |
1070 | { | |
1071 | uint64 value = 0; | |
1072 | value |= extract_bits(instruction, 16, 5); | |
1073 | return value; | |
1074 | } | |
1075 | ||
1076 | ||
1077 | uint64 NMD::extract_rdl_25_24(uint64 instruction) | |
1078 | { | |
1079 | uint64 value = 0; | |
1080 | value |= extract_bits(instruction, 24, 1); | |
1081 | return value; | |
1082 | } | |
1083 | ||
1084 | ||
d3605cc0 | 1085 | int64 NMD::extract_s__se10_0_9_8_7_6_5_4_3_2_1_s1(uint64 instruction) |
89a955e8 AM |
1086 | { |
1087 | int64 value = 0; | |
1088 | value |= extract_bits(instruction, 0, 1) << 10; | |
1089 | value |= extract_bits(instruction, 1, 9) << 1; | |
1090 | value = sign_extend(value, 10); | |
1091 | return value; | |
1092 | } | |
1093 | ||
1094 | ||
1095 | uint64 NMD::extract_eu_6_5_4_3_2_1_0(uint64 instruction) | |
1096 | { | |
1097 | uint64 value = 0; | |
1098 | value |= extract_bits(instruction, 0, 7); | |
1099 | return value; | |
1100 | } | |
1101 | ||
1102 | ||
1103 | uint64 NMD::extract_shift_5_4_3_2_1_0(uint64 instruction) | |
1104 | { | |
1105 | uint64 value = 0; | |
1106 | value |= extract_bits(instruction, 0, 6); | |
1107 | return value; | |
1108 | } | |
1109 | ||
1110 | ||
89a955e8 AM |
1111 | uint64 NMD::extract_count_19_18_17_16(uint64 instruction) |
1112 | { | |
1113 | uint64 value = 0; | |
1114 | value |= extract_bits(instruction, 16, 4); | |
1115 | return value; | |
1116 | } | |
1117 | ||
1118 | ||
1119 | uint64 NMD::extract_code_2_1_0(uint64 instruction) | |
1120 | { | |
1121 | uint64 value = 0; | |
1122 | value |= extract_bits(instruction, 0, 3); | |
1123 | return value; | |
1124 | } | |
1125 | ||
1126 | ||
89a955e8 AM |
1127 | uint64 NMD::extract_u_11_10_9_8_7_6_5_4_3_2_1_0(uint64 instruction) |
1128 | { | |
1129 | uint64 value = 0; | |
1130 | value |= extract_bits(instruction, 0, 12); | |
1131 | return value; | |
1132 | } | |
1133 | ||
1134 | ||
1135 | uint64 NMD::extract_rs_4_3_2_1_0(uint64 instruction) | |
1136 | { | |
1137 | uint64 value = 0; | |
1138 | value |= extract_bits(instruction, 0, 5); | |
1139 | return value; | |
1140 | } | |
1141 | ||
1142 | ||
11b9732a | 1143 | uint64 NMD::extract_u_20_to_3__s3(uint64 instruction) |
89a955e8 AM |
1144 | { |
1145 | uint64 value = 0; | |
1146 | value |= extract_bits(instruction, 3, 18) << 3; | |
1147 | return value; | |
1148 | } | |
1149 | ||
1150 | ||
11b9732a | 1151 | uint64 NMD::extract_u_3_2_1_0__s2(uint64 instruction) |
89a955e8 AM |
1152 | { |
1153 | uint64 value = 0; | |
1154 | value |= extract_bits(instruction, 0, 4) << 2; | |
1155 | return value; | |
1156 | } | |
1157 | ||
1158 | ||
1159 | uint64 NMD::extract_cofun_25_24_23(uint64 instruction) | |
1160 | { | |
1161 | uint64 value = 0; | |
1162 | value |= extract_bits(instruction, 3, 23); | |
1163 | return value; | |
1164 | } | |
1165 | ||
1166 | ||
11b9732a | 1167 | uint64 NMD::extract_u_2_1_0__s2(uint64 instruction) |
89a955e8 AM |
1168 | { |
1169 | uint64 value = 0; | |
1170 | value |= extract_bits(instruction, 0, 3) << 2; | |
1171 | return value; | |
1172 | } | |
1173 | ||
1174 | ||
89a955e8 AM |
1175 | uint64 NMD::extract_rd3_3_2_1(uint64 instruction) |
1176 | { | |
1177 | uint64 value = 0; | |
1178 | value |= extract_bits(instruction, 1, 3); | |
1179 | return value; | |
1180 | } | |
1181 | ||
1182 | ||
1183 | uint64 NMD::extract_sa_15_14_13_12(uint64 instruction) | |
1184 | { | |
1185 | uint64 value = 0; | |
1186 | value |= extract_bits(instruction, 12, 4); | |
1187 | return value; | |
1188 | } | |
1189 | ||
1190 | ||
1191 | uint64 NMD::extract_rt_25_24_23_22_21(uint64 instruction) | |
1192 | { | |
1193 | uint64 value = 0; | |
1194 | value |= extract_bits(instruction, 21, 5); | |
1195 | return value; | |
1196 | } | |
1197 | ||
1198 | ||
1199 | uint64 NMD::extract_ru_7_6_5_4_3(uint64 instruction) | |
1200 | { | |
1201 | uint64 value = 0; | |
1202 | value |= extract_bits(instruction, 3, 5); | |
1203 | return value; | |
1204 | } | |
1205 | ||
1206 | ||
89a955e8 AM |
1207 | uint64 NMD::extract_u_17_to_0(uint64 instruction) |
1208 | { | |
1209 | uint64 value = 0; | |
1210 | value |= extract_bits(instruction, 0, 18); | |
1211 | return value; | |
1212 | } | |
1213 | ||
1214 | ||
89a955e8 AM |
1215 | uint64 NMD::extract_rsz4_4_2_1_0(uint64 instruction) |
1216 | { | |
1217 | uint64 value = 0; | |
1218 | value |= extract_bits(instruction, 0, 3); | |
1219 | value |= extract_bits(instruction, 4, 1) << 3; | |
1220 | return value; | |
1221 | } | |
1222 | ||
1223 | ||
d3605cc0 | 1224 | int64 NMD::extract_s__se21_0_20_to_1_s1(uint64 instruction) |
89a955e8 AM |
1225 | { |
1226 | int64 value = 0; | |
1227 | value |= extract_bits(instruction, 0, 1) << 21; | |
1228 | value |= extract_bits(instruction, 1, 20) << 1; | |
1229 | value = sign_extend(value, 21); | |
1230 | return value; | |
1231 | } | |
1232 | ||
1233 | ||
1234 | uint64 NMD::extract_op_25_to_3(uint64 instruction) | |
1235 | { | |
1236 | uint64 value = 0; | |
1237 | value |= extract_bits(instruction, 3, 23); | |
1238 | return value; | |
1239 | } | |
1240 | ||
1241 | ||
1242 | uint64 NMD::extract_rs4_4_2_1_0(uint64 instruction) | |
1243 | { | |
1244 | uint64 value = 0; | |
1245 | value |= extract_bits(instruction, 0, 3); | |
1246 | value |= extract_bits(instruction, 4, 1) << 3; | |
1247 | return value; | |
1248 | } | |
1249 | ||
1250 | ||
1251 | uint64 NMD::extract_bit_23_22_21(uint64 instruction) | |
1252 | { | |
1253 | uint64 value = 0; | |
1254 | value |= extract_bits(instruction, 21, 3); | |
1255 | return value; | |
1256 | } | |
1257 | ||
1258 | ||
1259 | uint64 NMD::extract_rt_41_40_39_38_37(uint64 instruction) | |
1260 | { | |
1261 | uint64 value = 0; | |
1262 | value |= extract_bits(instruction, 37, 5); | |
1263 | return value; | |
1264 | } | |
1265 | ||
1266 | ||
d3605cc0 | 1267 | int64 NMD::extract_shift__se5_21_20_19_18_17_16(uint64 instruction) |
89a955e8 AM |
1268 | { |
1269 | int64 value = 0; | |
1270 | value |= extract_bits(instruction, 16, 6); | |
1271 | value = sign_extend(value, 5); | |
1272 | return value; | |
1273 | } | |
1274 | ||
1275 | ||
89a955e8 AM |
1276 | uint64 NMD::extract_rd2_3_8(uint64 instruction) |
1277 | { | |
1278 | uint64 value = 0; | |
1279 | value |= extract_bits(instruction, 3, 1) << 1; | |
1280 | value |= extract_bits(instruction, 8, 1); | |
1281 | return value; | |
1282 | } | |
1283 | ||
1284 | ||
89a955e8 AM |
1285 | uint64 NMD::extract_code_17_to_0(uint64 instruction) |
1286 | { | |
1287 | uint64 value = 0; | |
1288 | value |= extract_bits(instruction, 0, 18); | |
1289 | return value; | |
1290 | } | |
1291 | ||
1292 | ||
89a955e8 AM |
1293 | uint64 NMD::extract_size_20_19_18_17_16(uint64 instruction) |
1294 | { | |
1295 | uint64 value = 0; | |
1296 | value |= extract_bits(instruction, 16, 5); | |
1297 | return value; | |
1298 | } | |
1299 | ||
1300 | ||
d3605cc0 | 1301 | int64 NMD::extract_s__se8_15_7_6_5_4_3_2_s2(uint64 instruction) |
89a955e8 AM |
1302 | { |
1303 | int64 value = 0; | |
1304 | value |= extract_bits(instruction, 2, 6) << 2; | |
1305 | value |= extract_bits(instruction, 15, 1) << 8; | |
1306 | value = sign_extend(value, 8); | |
1307 | return value; | |
1308 | } | |
1309 | ||
1310 | ||
1311 | uint64 NMD::extract_u_15_to_0(uint64 instruction) | |
1312 | { | |
1313 | uint64 value = 0; | |
1314 | value |= extract_bits(instruction, 0, 16); | |
1315 | return value; | |
1316 | } | |
1317 | ||
1318 | ||
52a96d22 | 1319 | uint64 NMD::extract_fs_20_19_18_17_16(uint64 instruction) |
89a955e8 AM |
1320 | { |
1321 | uint64 value = 0; | |
1322 | value |= extract_bits(instruction, 16, 5); | |
1323 | return value; | |
1324 | } | |
1325 | ||
1326 | ||
d3605cc0 | 1327 | int64 NMD::extract_s__se8_15_7_6_5_4_3_2_1_0(uint64 instruction) |
89a955e8 AM |
1328 | { |
1329 | int64 value = 0; | |
1330 | value |= extract_bits(instruction, 0, 8); | |
1331 | value |= extract_bits(instruction, 15, 1) << 8; | |
1332 | value = sign_extend(value, 8); | |
1333 | return value; | |
1334 | } | |
1335 | ||
1336 | ||
1337 | uint64 NMD::extract_stype_20_19_18_17_16(uint64 instruction) | |
1338 | { | |
1339 | uint64 value = 0; | |
1340 | value |= extract_bits(instruction, 16, 5); | |
1341 | return value; | |
1342 | } | |
1343 | ||
1344 | ||
1345 | uint64 NMD::extract_rtl_11(uint64 instruction) | |
1346 | { | |
1347 | uint64 value = 0; | |
1348 | value |= extract_bits(instruction, 9, 1); | |
1349 | return value; | |
1350 | } | |
1351 | ||
1352 | ||
1353 | uint64 NMD::extract_hs_20_19_18_17_16(uint64 instruction) | |
1354 | { | |
1355 | uint64 value = 0; | |
1356 | value |= extract_bits(instruction, 16, 5); | |
1357 | return value; | |
1358 | } | |
1359 | ||
1360 | ||
89a955e8 AM |
1361 | uint64 NMD::extract_sel_13_12_11(uint64 instruction) |
1362 | { | |
1363 | uint64 value = 0; | |
1364 | value |= extract_bits(instruction, 11, 3); | |
1365 | return value; | |
1366 | } | |
1367 | ||
1368 | ||
1369 | uint64 NMD::extract_lsb_4_3_2_1_0(uint64 instruction) | |
1370 | { | |
1371 | uint64 value = 0; | |
1372 | value |= extract_bits(instruction, 0, 5); | |
1373 | return value; | |
1374 | } | |
1375 | ||
1376 | ||
89a955e8 AM |
1377 | uint64 NMD::extract_gp_2(uint64 instruction) |
1378 | { | |
1379 | uint64 value = 0; | |
1380 | value |= extract_bits(instruction, 2, 1); | |
1381 | return value; | |
1382 | } | |
1383 | ||
1384 | ||
1385 | uint64 NMD::extract_rt3_9_8_7(uint64 instruction) | |
1386 | { | |
1387 | uint64 value = 0; | |
1388 | value |= extract_bits(instruction, 7, 3); | |
1389 | return value; | |
1390 | } | |
1391 | ||
1392 | ||
17ce2f00 | 1393 | uint64 NMD::extract_ft_25_24_23_22_21(uint64 instruction) |
89a955e8 AM |
1394 | { |
1395 | uint64 value = 0; | |
1396 | value |= extract_bits(instruction, 21, 5); | |
1397 | return value; | |
1398 | } | |
1399 | ||
1400 | ||
1401 | uint64 NMD::extract_u_17_16_15_14_13_12_11(uint64 instruction) | |
1402 | { | |
1403 | uint64 value = 0; | |
1404 | value |= extract_bits(instruction, 11, 7); | |
1405 | return value; | |
1406 | } | |
1407 | ||
1408 | ||
1409 | uint64 NMD::extract_cs_20_19_18_17_16(uint64 instruction) | |
1410 | { | |
1411 | uint64 value = 0; | |
1412 | value |= extract_bits(instruction, 16, 5); | |
1413 | return value; | |
1414 | } | |
1415 | ||
1416 | ||
89a955e8 AM |
1417 | uint64 NMD::extract_rt4_9_7_6_5(uint64 instruction) |
1418 | { | |
1419 | uint64 value = 0; | |
1420 | value |= extract_bits(instruction, 5, 3); | |
1421 | value |= extract_bits(instruction, 9, 1) << 3; | |
1422 | return value; | |
1423 | } | |
1424 | ||
1425 | ||
1426 | uint64 NMD::extract_msbt_10_9_8_7_6(uint64 instruction) | |
1427 | { | |
1428 | uint64 value = 0; | |
1429 | value |= extract_bits(instruction, 6, 5); | |
1430 | return value; | |
1431 | } | |
1432 | ||
1433 | ||
11b9732a | 1434 | uint64 NMD::extract_u_5_4_3_2_1_0__s2(uint64 instruction) |
89a955e8 AM |
1435 | { |
1436 | uint64 value = 0; | |
1437 | value |= extract_bits(instruction, 0, 6) << 2; | |
1438 | return value; | |
1439 | } | |
1440 | ||
1441 | ||
89a955e8 AM |
1442 | uint64 NMD::extract_sa_15_14_13(uint64 instruction) |
1443 | { | |
1444 | uint64 value = 0; | |
1445 | value |= extract_bits(instruction, 13, 3); | |
1446 | return value; | |
1447 | } | |
1448 | ||
1449 | ||
d3605cc0 | 1450 | int64 NMD::extract_s__se14_0_13_to_1_s1(uint64 instruction) |
89a955e8 AM |
1451 | { |
1452 | int64 value = 0; | |
1453 | value |= extract_bits(instruction, 0, 1) << 14; | |
1454 | value |= extract_bits(instruction, 1, 13) << 1; | |
1455 | value = sign_extend(value, 14); | |
1456 | return value; | |
1457 | } | |
1458 | ||
1459 | ||
1460 | uint64 NMD::extract_rs3_6_5_4(uint64 instruction) | |
1461 | { | |
1462 | uint64 value = 0; | |
1463 | value |= extract_bits(instruction, 4, 3); | |
1464 | return value; | |
1465 | } | |
1466 | ||
1467 | ||
11b9732a | 1468 | uint64 NMD::extract_u_31_to_0__s32(uint64 instruction) |
89a955e8 AM |
1469 | { |
1470 | uint64 value = 0; | |
1471 | value |= extract_bits(instruction, 0, 32) << 32; | |
1472 | return value; | |
1473 | } | |
1474 | ||
1475 | ||
1476 | uint64 NMD::extract_shift_10_9_8_7_6(uint64 instruction) | |
1477 | { | |
1478 | uint64 value = 0; | |
1479 | value |= extract_bits(instruction, 6, 5); | |
1480 | return value; | |
1481 | } | |
1482 | ||
1483 | ||
1484 | uint64 NMD::extract_cs_25_24_23_22_21(uint64 instruction) | |
1485 | { | |
1486 | uint64 value = 0; | |
1487 | value |= extract_bits(instruction, 21, 5); | |
1488 | return value; | |
1489 | } | |
1490 | ||
1491 | ||
1492 | uint64 NMD::extract_shiftx_11_10_9_8_7_6(uint64 instruction) | |
1493 | { | |
1494 | uint64 value = 0; | |
1495 | value |= extract_bits(instruction, 6, 6); | |
1496 | return value; | |
1497 | } | |
1498 | ||
1499 | ||
1500 | uint64 NMD::extract_rt_9_8_7_6_5(uint64 instruction) | |
1501 | { | |
1502 | uint64 value = 0; | |
1503 | value |= extract_bits(instruction, 5, 5); | |
1504 | return value; | |
1505 | } | |
1506 | ||
1507 | ||
1508 | uint64 NMD::extract_op_25_24_23_22_21(uint64 instruction) | |
1509 | { | |
1510 | uint64 value = 0; | |
1511 | value |= extract_bits(instruction, 21, 5); | |
1512 | return value; | |
1513 | } | |
1514 | ||
1515 | ||
11b9732a | 1516 | uint64 NMD::extract_u_6_5_4_3_2_1_0__s2(uint64 instruction) |
89a955e8 AM |
1517 | { |
1518 | uint64 value = 0; | |
1519 | value |= extract_bits(instruction, 0, 7) << 2; | |
1520 | return value; | |
1521 | } | |
1522 | ||
1523 | ||
1524 | uint64 NMD::extract_bit_16_15_14_13_12_11(uint64 instruction) | |
1525 | { | |
1526 | uint64 value = 0; | |
1527 | value |= extract_bits(instruction, 11, 6); | |
1528 | return value; | |
1529 | } | |
1530 | ||
1531 | ||
89a955e8 AM |
1532 | uint64 NMD::extract_mask_20_19_18_17_16_15_14(uint64 instruction) |
1533 | { | |
1534 | uint64 value = 0; | |
1535 | value |= extract_bits(instruction, 14, 7); | |
1536 | return value; | |
1537 | } | |
1538 | ||
1539 | ||
1540 | uint64 NMD::extract_eu_3_2_1_0(uint64 instruction) | |
1541 | { | |
1542 | uint64 value = 0; | |
1543 | value |= extract_bits(instruction, 0, 4); | |
1544 | return value; | |
1545 | } | |
1546 | ||
1547 | ||
11b9732a | 1548 | uint64 NMD::extract_u_7_6_5_4__s4(uint64 instruction) |
89a955e8 AM |
1549 | { |
1550 | uint64 value = 0; | |
1551 | value |= extract_bits(instruction, 4, 4) << 4; | |
1552 | return value; | |
1553 | } | |
1554 | ||
1555 | ||
d3605cc0 | 1556 | int64 NMD::extract_s__se8_15_7_6_5_4_3_s3(uint64 instruction) |
89a955e8 AM |
1557 | { |
1558 | int64 value = 0; | |
1559 | value |= extract_bits(instruction, 3, 5) << 3; | |
1560 | value |= extract_bits(instruction, 15, 1) << 8; | |
1561 | value = sign_extend(value, 8); | |
1562 | return value; | |
1563 | } | |
1564 | ||
1565 | ||
1566 | uint64 NMD::extract_ft_15_14_13_12_11(uint64 instruction) | |
1567 | { | |
1568 | uint64 value = 0; | |
1569 | value |= extract_bits(instruction, 11, 5); | |
1570 | return value; | |
1571 | } | |
1572 | ||
1573 | ||
d3605cc0 | 1574 | int64 NMD::extract_s__se31_15_to_0_31_to_16(uint64 instruction) |
89a955e8 AM |
1575 | { |
1576 | int64 value = 0; | |
1577 | value |= extract_bits(instruction, 0, 16) << 16; | |
1578 | value |= extract_bits(instruction, 16, 16); | |
1579 | value = sign_extend(value, 31); | |
1580 | return value; | |
1581 | } | |
1582 | ||
1583 | ||
1584 | uint64 NMD::extract_u_20_19_18_17_16_15_14_13(uint64 instruction) | |
1585 | { | |
1586 | uint64 value = 0; | |
1587 | value |= extract_bits(instruction, 13, 8); | |
1588 | return value; | |
1589 | } | |
1590 | ||
1591 | ||
11b9732a | 1592 | uint64 NMD::extract_u_17_to_2__s2(uint64 instruction) |
89a955e8 AM |
1593 | { |
1594 | uint64 value = 0; | |
1595 | value |= extract_bits(instruction, 2, 16) << 2; | |
1596 | return value; | |
1597 | } | |
1598 | ||
1599 | ||
b4c5d21c | 1600 | uint64 NMD::extract_rd_15_14_13_12_11(uint64 instruction) |
89a955e8 AM |
1601 | { |
1602 | uint64 value = 0; | |
1603 | value |= extract_bits(instruction, 11, 5); | |
1604 | return value; | |
1605 | } | |
1606 | ||
1607 | ||
1608 | uint64 NMD::extract_c0s_20_19_18_17_16(uint64 instruction) | |
1609 | { | |
1610 | uint64 value = 0; | |
1611 | value |= extract_bits(instruction, 16, 5); | |
1612 | return value; | |
1613 | } | |
1614 | ||
1615 | ||
1616 | uint64 NMD::extract_code_1_0(uint64 instruction) | |
1617 | { | |
1618 | uint64 value = 0; | |
1619 | value |= extract_bits(instruction, 0, 2); | |
1620 | return value; | |
1621 | } | |
1622 | ||
1623 | ||
d3605cc0 | 1624 | int64 NMD::extract_s__se25_0_24_to_1_s1(uint64 instruction) |
89a955e8 AM |
1625 | { |
1626 | int64 value = 0; | |
1627 | value |= extract_bits(instruction, 0, 1) << 25; | |
1628 | value |= extract_bits(instruction, 1, 24) << 1; | |
1629 | value = sign_extend(value, 25); | |
1630 | return value; | |
1631 | } | |
1632 | ||
1633 | ||
89a955e8 AM |
1634 | uint64 NMD::extract_u_1_0(uint64 instruction) |
1635 | { | |
1636 | uint64 value = 0; | |
1637 | value |= extract_bits(instruction, 0, 2); | |
1638 | return value; | |
1639 | } | |
1640 | ||
1641 | ||
11b9732a | 1642 | uint64 NMD::extract_u_3_8__s2(uint64 instruction) |
89a955e8 AM |
1643 | { |
1644 | uint64 value = 0; | |
1645 | value |= extract_bits(instruction, 3, 1) << 3; | |
1646 | value |= extract_bits(instruction, 8, 1) << 2; | |
1647 | return value; | |
1648 | } | |
1649 | ||
1650 | ||
d0c60abd | 1651 | uint64 NMD::extract_fd_15_14_13_12_11(uint64 instruction) |
89a955e8 AM |
1652 | { |
1653 | uint64 value = 0; | |
1654 | value |= extract_bits(instruction, 11, 5); | |
1655 | return value; | |
1656 | } | |
1657 | ||
1658 | ||
11b9732a | 1659 | uint64 NMD::extract_u_4_3_2_1_0__s2(uint64 instruction) |
89a955e8 AM |
1660 | { |
1661 | uint64 value = 0; | |
1662 | value |= extract_bits(instruction, 0, 5) << 2; | |
1663 | return value; | |
1664 | } | |
1665 | ||
1666 | ||
1667 | uint64 NMD::extract_rtz4_9_7_6_5(uint64 instruction) | |
1668 | { | |
1669 | uint64 value = 0; | |
1670 | value |= extract_bits(instruction, 5, 3); | |
1671 | value |= extract_bits(instruction, 9, 1) << 3; | |
1672 | return value; | |
1673 | } | |
1674 | ||
1675 | ||
1676 | uint64 NMD::extract_sel_15_14_13_12_11(uint64 instruction) | |
1677 | { | |
1678 | uint64 value = 0; | |
1679 | value |= extract_bits(instruction, 11, 5); | |
1680 | return value; | |
1681 | } | |
1682 | ||
1683 | ||
1684 | uint64 NMD::extract_ct_25_24_23_22_21(uint64 instruction) | |
1685 | { | |
1686 | uint64 value = 0; | |
1687 | value |= extract_bits(instruction, 21, 5); | |
1688 | return value; | |
1689 | } | |
1690 | ||
1691 | ||
11b9732a | 1692 | uint64 NMD::extract_u_20_to_2__s2(uint64 instruction) |
89a955e8 AM |
1693 | { |
1694 | uint64 value = 0; | |
1695 | value |= extract_bits(instruction, 2, 19) << 2; | |
1696 | return value; | |
1697 | } | |
1698 | ||
1699 | ||
d3605cc0 | 1700 | int64 NMD::extract_s__se3_4_2_1_0(uint64 instruction) |
89a955e8 AM |
1701 | { |
1702 | int64 value = 0; | |
1703 | value |= extract_bits(instruction, 0, 3); | |
1704 | value |= extract_bits(instruction, 4, 1) << 3; | |
1705 | value = sign_extend(value, 3); | |
1706 | return value; | |
1707 | } | |
1708 | ||
1709 | ||
11b9732a | 1710 | uint64 NMD::extract_u_3_2_1_0__s1(uint64 instruction) |
89a955e8 AM |
1711 | { |
1712 | uint64 value = 0; | |
1713 | value |= extract_bits(instruction, 0, 4) << 1; | |
1714 | return value; | |
1715 | } | |
1716 | ||
1717 | ||
89a955e8 AM |
1718 | |
1719 | bool NMD::ADDIU_32__cond(uint64 instruction) | |
1720 | { | |
1721 | uint64 rt = extract_rt_25_24_23_22_21(instruction); | |
1722 | return rt != 0; | |
1723 | } | |
1724 | ||
1725 | ||
1726 | bool NMD::ADDIU_RS5__cond(uint64 instruction) | |
1727 | { | |
1728 | uint64 rt = extract_rt_9_8_7_6_5(instruction); | |
1729 | return rt != 0; | |
1730 | } | |
1731 | ||
1732 | ||
1733 | bool NMD::BALRSC_cond(uint64 instruction) | |
1734 | { | |
1735 | uint64 rt = extract_rt_25_24_23_22_21(instruction); | |
1736 | return rt != 0; | |
1737 | } | |
1738 | ||
1739 | ||
1740 | bool NMD::BEQC_16__cond(uint64 instruction) | |
1741 | { | |
1742 | uint64 rs3 = extract_rs3_6_5_4(instruction); | |
1743 | uint64 rt3 = extract_rt3_9_8_7(instruction); | |
11b9732a | 1744 | uint64 u = extract_u_3_2_1_0__s1(instruction); |
89a955e8 AM |
1745 | return rs3 < rt3 && u != 0; |
1746 | } | |
1747 | ||
1748 | ||
1749 | bool NMD::BNEC_16__cond(uint64 instruction) | |
1750 | { | |
1751 | uint64 rs3 = extract_rs3_6_5_4(instruction); | |
1752 | uint64 rt3 = extract_rt3_9_8_7(instruction); | |
11b9732a | 1753 | uint64 u = extract_u_3_2_1_0__s1(instruction); |
89a955e8 AM |
1754 | return rs3 >= rt3 && u != 0; |
1755 | } | |
1756 | ||
1757 | ||
1758 | bool NMD::MOVE_cond(uint64 instruction) | |
1759 | { | |
1760 | uint64 rt = extract_rt_9_8_7_6_5(instruction); | |
1761 | return rt != 0; | |
1762 | } | |
1763 | ||
1764 | ||
1765 | bool NMD::P16_BR1_cond(uint64 instruction) | |
1766 | { | |
11b9732a | 1767 | uint64 u = extract_u_3_2_1_0__s1(instruction); |
89a955e8 AM |
1768 | return u != 0; |
1769 | } | |
1770 | ||
1771 | ||
1772 | bool NMD::PREF_S9__cond(uint64 instruction) | |
1773 | { | |
1774 | uint64 hint = extract_hint_25_24_23_22_21(instruction); | |
1775 | return hint != 31; | |
1776 | } | |
1777 | ||
1778 | ||
1779 | bool NMD::PREFE_cond(uint64 instruction) | |
1780 | { | |
1781 | uint64 hint = extract_hint_25_24_23_22_21(instruction); | |
1782 | return hint != 31; | |
1783 | } | |
1784 | ||
1785 | ||
1786 | bool NMD::SLTU_cond(uint64 instruction) | |
1787 | { | |
b4c5d21c | 1788 | uint64 rd = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
1789 | return rd != 0; |
1790 | } | |
1791 | ||
1792 | ||
1793 | ||
1794 | /* | |
1795 | * ABS.D fd, fs - Floating Point Absolute Value | |
1796 | * | |
1797 | * 3 2 1 | |
1798 | * 10987654321098765432109876543210 | |
1799 | * 010001 00000 000101 | |
1800 | * fmt ----- | |
1801 | * fs ----- | |
1802 | * fd ----- | |
1803 | */ | |
1804 | std::string NMD::ABS_D(uint64 instruction) | |
1805 | { | |
17ce2f00 | 1806 | uint64 fd_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 1807 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 AM |
1808 | |
1809 | std::string fs = FPR(copy(fs_value)); | |
1810 | std::string fd = FPR(copy(fd_value)); | |
1811 | ||
1812 | return img::format("ABS.D %s, %s", fd, fs); | |
1813 | } | |
1814 | ||
1815 | ||
1816 | /* | |
1817 | * ABS.S fd, fs - Floating Point Absolute Value | |
1818 | * | |
1819 | * 3 2 1 | |
1820 | * 10987654321098765432109876543210 | |
1821 | * 010001 00000 000101 | |
1822 | * fmt ----- | |
1823 | * fd ----- | |
1824 | * fs ----- | |
1825 | */ | |
1826 | std::string NMD::ABS_S(uint64 instruction) | |
1827 | { | |
17ce2f00 | 1828 | uint64 fd_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 1829 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 AM |
1830 | |
1831 | std::string fs = FPR(copy(fs_value)); | |
1832 | std::string fd = FPR(copy(fd_value)); | |
1833 | ||
1834 | return img::format("ABS.S %s, %s", fd, fs); | |
1835 | } | |
1836 | ||
1837 | ||
1838 | /* | |
1839 | * ABSQ_S.PH rt, rs - Find Absolute Value of Two Fractional Halfwords | |
1840 | * | |
1841 | * 3 2 1 | |
1842 | * 10987654321098765432109876543210 | |
1843 | * 001000 0001000100111111 | |
1844 | * rt ----- | |
1845 | * rs ----- | |
1846 | */ | |
1847 | std::string NMD::ABSQ_S_PH(uint64 instruction) | |
1848 | { | |
1849 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
1850 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
1851 | ||
1852 | std::string rt = GPR(copy(rt_value)); | |
1853 | std::string rs = GPR(copy(rs_value)); | |
1854 | ||
1855 | return img::format("ABSQ_S.PH %s, %s", rt, rs); | |
1856 | } | |
1857 | ||
1858 | ||
1859 | /* | |
1860 | * ABSQ_S.QB rt, rs - Find Absolute Value of Four Fractional Byte Values | |
1861 | * | |
1862 | * 3 2 1 | |
1863 | * 10987654321098765432109876543210 | |
1864 | * 001000 0000000100111111 | |
1865 | * rt ----- | |
1866 | * rs ----- | |
1867 | */ | |
1868 | std::string NMD::ABSQ_S_QB(uint64 instruction) | |
1869 | { | |
1870 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
1871 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
1872 | ||
1873 | std::string rt = GPR(copy(rt_value)); | |
1874 | std::string rs = GPR(copy(rs_value)); | |
1875 | ||
1876 | return img::format("ABSQ_S.QB %s, %s", rt, rs); | |
1877 | } | |
1878 | ||
1879 | ||
1880 | /* | |
1881 | * | |
1882 | * | |
1883 | * 3 2 1 | |
1884 | * 10987654321098765432109876543210 | |
1885 | * 001000 0010000100111111 | |
1886 | * rt ----- | |
1887 | * rs ----- | |
1888 | */ | |
1889 | std::string NMD::ABSQ_S_W(uint64 instruction) | |
1890 | { | |
1891 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
1892 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
1893 | ||
1894 | std::string rt = GPR(copy(rt_value)); | |
1895 | std::string rs = GPR(copy(rs_value)); | |
1896 | ||
1897 | return img::format("ABSQ_S.W %s, %s", rt, rs); | |
1898 | } | |
1899 | ||
1900 | ||
1901 | /* | |
1902 | * | |
1903 | * | |
1904 | * 3 2 1 | |
1905 | * 10987654321098765432109876543210 | |
1906 | * 001000 0010000100111111 | |
1907 | * rt ----- | |
1908 | * rs ----- | |
1909 | */ | |
1910 | std::string NMD::ACLR(uint64 instruction) | |
1911 | { | |
1912 | uint64 bit_value = extract_bit_23_22_21(instruction); | |
89a955e8 | 1913 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 1914 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
89a955e8 AM |
1915 | |
1916 | std::string bit = IMMEDIATE(copy(bit_value)); | |
1917 | std::string s = IMMEDIATE(copy(s_value)); | |
1918 | std::string rs = GPR(copy(rs_value)); | |
1919 | ||
1920 | return img::format("ACLR %s, %s(%s)", bit, s, rs); | |
1921 | } | |
1922 | ||
1923 | ||
1924 | /* | |
1925 | * | |
1926 | * | |
1927 | * 3 2 1 | |
1928 | * 10987654321098765432109876543210 | |
1929 | * 001000 0010000100111111 | |
1930 | * rt ----- | |
1931 | * rs ----- | |
1932 | */ | |
1933 | std::string NMD::ADD(uint64 instruction) | |
1934 | { | |
1935 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 1936 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 1937 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
1938 | |
1939 | std::string rd = GPR(copy(rd_value)); | |
1940 | std::string rs = GPR(copy(rs_value)); | |
1941 | std::string rt = GPR(copy(rt_value)); | |
1942 | ||
1943 | return img::format("ADD %s, %s, %s", rd, rs, rt); | |
1944 | } | |
1945 | ||
1946 | ||
1947 | /* | |
1948 | * ADD.D fd, fs, ft - Floating Point Add | |
1949 | * | |
1950 | * 3 2 1 | |
1951 | * 10987654321098765432109876543210 | |
1952 | * 010001 000101 | |
1953 | * fmt ----- | |
1954 | * ft ----- | |
1955 | * fs ----- | |
1956 | * fd ----- | |
1957 | */ | |
1958 | std::string NMD::ADD_D(uint64 instruction) | |
1959 | { | |
17ce2f00 | 1960 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 1961 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 1962 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 AM |
1963 | |
1964 | std::string ft = FPR(copy(ft_value)); | |
1965 | std::string fs = FPR(copy(fs_value)); | |
1966 | std::string fd = FPR(copy(fd_value)); | |
1967 | ||
1968 | return img::format("ADD.D %s, %s, %s", fd, fs, ft); | |
1969 | } | |
1970 | ||
1971 | ||
1972 | /* | |
1973 | * ADD.S fd, fs, ft - Floating Point Add | |
1974 | * | |
1975 | * 3 2 1 | |
1976 | * 10987654321098765432109876543210 | |
1977 | * 010001 000101 | |
1978 | * fmt ----- | |
1979 | * ft ----- | |
1980 | * fs ----- | |
1981 | * fd ----- | |
1982 | */ | |
1983 | std::string NMD::ADD_S(uint64 instruction) | |
1984 | { | |
17ce2f00 | 1985 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 1986 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 1987 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 AM |
1988 | |
1989 | std::string ft = FPR(copy(ft_value)); | |
1990 | std::string fs = FPR(copy(fs_value)); | |
1991 | std::string fd = FPR(copy(fd_value)); | |
1992 | ||
1993 | return img::format("ADD.S %s, %s, %s", fd, fs, ft); | |
1994 | } | |
1995 | ||
1996 | ||
1997 | /* | |
1998 | * | |
1999 | * | |
2000 | * 3 2 1 | |
2001 | * 10987654321098765432109876543210 | |
2002 | * 001000 0010000100111111 | |
2003 | * rt ----- | |
2004 | * rs ----- | |
2005 | */ | |
2006 | std::string NMD::ADDIU_32_(uint64 instruction) | |
2007 | { | |
2008 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 2009 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 2010 | uint64 u_value = extract_u_15_to_0(instruction); |
89a955e8 AM |
2011 | |
2012 | std::string rt = GPR(copy(rt_value)); | |
2013 | std::string rs = GPR(copy(rs_value)); | |
2014 | std::string u = IMMEDIATE(copy(u_value)); | |
2015 | ||
2016 | return img::format("ADDIU %s, %s, %s", rt, rs, u); | |
2017 | } | |
2018 | ||
2019 | ||
2020 | /* | |
2021 | * | |
2022 | * | |
2023 | * 3 2 1 | |
2024 | * 10987654321098765432109876543210 | |
2025 | * 001000 0010000100111111 | |
2026 | * rt ----- | |
2027 | * rs ----- | |
2028 | */ | |
2029 | std::string NMD::ADDIU_48_(uint64 instruction) | |
2030 | { | |
2031 | uint64 rt_value = extract_rt_41_40_39_38_37(instruction); | |
d3605cc0 | 2032 | int64 s_value = extract_s__se31_15_to_0_31_to_16(instruction); |
89a955e8 AM |
2033 | |
2034 | std::string rt = GPR(copy(rt_value)); | |
2035 | std::string s = IMMEDIATE(copy(s_value)); | |
2036 | ||
2037 | return img::format("ADDIU %s, %s", rt, s); | |
2038 | } | |
2039 | ||
2040 | ||
2041 | /* | |
2042 | * | |
2043 | * | |
2044 | * 3 2 1 | |
2045 | * 10987654321098765432109876543210 | |
2046 | * 001000 0010000100111111 | |
2047 | * rt ----- | |
2048 | * rs ----- | |
2049 | */ | |
2050 | std::string NMD::ADDIU_GP48_(uint64 instruction) | |
2051 | { | |
2052 | uint64 rt_value = extract_rt_41_40_39_38_37(instruction); | |
d3605cc0 | 2053 | int64 s_value = extract_s__se31_15_to_0_31_to_16(instruction); |
89a955e8 AM |
2054 | |
2055 | std::string rt = GPR(copy(rt_value)); | |
2056 | std::string s = IMMEDIATE(copy(s_value)); | |
2057 | ||
2058 | return img::format("ADDIU %s, $%d, %s", rt, 28, s); | |
2059 | } | |
2060 | ||
2061 | ||
2062 | /* | |
2063 | * | |
2064 | * | |
2065 | * 3 2 1 | |
2066 | * 10987654321098765432109876543210 | |
2067 | * 001000 0010000100111111 | |
2068 | * rt ----- | |
2069 | * rs ----- | |
2070 | */ | |
2071 | std::string NMD::ADDIU_GP_B_(uint64 instruction) | |
2072 | { | |
2073 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
2074 | uint64 u_value = extract_u_17_to_0(instruction); | |
2075 | ||
2076 | std::string rt = GPR(copy(rt_value)); | |
2077 | std::string u = IMMEDIATE(copy(u_value)); | |
2078 | ||
2079 | return img::format("ADDIU %s, $%d, %s", rt, 28, u); | |
2080 | } | |
2081 | ||
2082 | ||
2083 | /* | |
2084 | * | |
2085 | * | |
2086 | * 3 2 1 | |
2087 | * 10987654321098765432109876543210 | |
2088 | * 001000 0010000100111111 | |
2089 | * rt ----- | |
2090 | * rs ----- | |
2091 | */ | |
2092 | std::string NMD::ADDIU_GP_W_(uint64 instruction) | |
2093 | { | |
2094 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
11b9732a | 2095 | uint64 u_value = extract_u_20_to_2__s2(instruction); |
89a955e8 AM |
2096 | |
2097 | std::string rt = GPR(copy(rt_value)); | |
2098 | std::string u = IMMEDIATE(copy(u_value)); | |
2099 | ||
2100 | return img::format("ADDIU %s, $%d, %s", rt, 28, u); | |
2101 | } | |
2102 | ||
2103 | ||
2104 | /* | |
2105 | * | |
2106 | * | |
2107 | * 3 2 1 | |
2108 | * 10987654321098765432109876543210 | |
2109 | * 001000 0010000100111111 | |
2110 | * rt ----- | |
2111 | * rs ----- | |
2112 | */ | |
2113 | std::string NMD::ADDIU_NEG_(uint64 instruction) | |
2114 | { | |
2115 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 2116 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 2117 | uint64 u_value = extract_u_11_10_9_8_7_6_5_4_3_2_1_0(instruction); |
89a955e8 AM |
2118 | |
2119 | std::string rt = GPR(copy(rt_value)); | |
2120 | std::string rs = GPR(copy(rs_value)); | |
2121 | std::string u = IMMEDIATE(neg_copy(u_value)); | |
2122 | ||
2123 | return img::format("ADDIU %s, %s, %s", rt, rs, u); | |
2124 | } | |
2125 | ||
2126 | ||
2127 | /* | |
2128 | * | |
2129 | * | |
2130 | * 3 2 1 | |
2131 | * 10987654321098765432109876543210 | |
2132 | * 001000 0010000100111111 | |
2133 | * rt ----- | |
2134 | * rs ----- | |
2135 | */ | |
2136 | std::string NMD::ADDIU_R1_SP_(uint64 instruction) | |
2137 | { | |
11b9732a | 2138 | uint64 u_value = extract_u_5_4_3_2_1_0__s2(instruction); |
89a955e8 AM |
2139 | uint64 rt3_value = extract_rt3_9_8_7(instruction); |
2140 | ||
988d6c89 | 2141 | std::string rt3 = GPR(decode_gpr_gpr3(rt3_value)); |
89a955e8 AM |
2142 | std::string u = IMMEDIATE(copy(u_value)); |
2143 | ||
2144 | return img::format("ADDIU %s, $%d, %s", rt3, 29, u); | |
2145 | } | |
2146 | ||
2147 | ||
2148 | /* | |
2149 | * | |
2150 | * | |
2151 | * 3 2 1 | |
2152 | * 10987654321098765432109876543210 | |
2153 | * 001000 0010000100111111 | |
2154 | * rt ----- | |
2155 | * rs ----- | |
2156 | */ | |
2157 | std::string NMD::ADDIU_R2_(uint64 instruction) | |
2158 | { | |
89a955e8 AM |
2159 | uint64 rt3_value = extract_rt3_9_8_7(instruction); |
2160 | uint64 rs3_value = extract_rs3_6_5_4(instruction); | |
75199b40 | 2161 | uint64 u_value = extract_u_2_1_0__s2(instruction); |
89a955e8 | 2162 | |
988d6c89 AM |
2163 | std::string rt3 = GPR(decode_gpr_gpr3(rt3_value)); |
2164 | std::string rs3 = GPR(decode_gpr_gpr3(rs3_value)); | |
89a955e8 AM |
2165 | std::string u = IMMEDIATE(copy(u_value)); |
2166 | ||
2167 | return img::format("ADDIU %s, %s, %s", rt3, rs3, u); | |
2168 | } | |
2169 | ||
2170 | ||
2171 | /* | |
2172 | * ADDIU[RS5] rt, s5 - Add Signed Word and Set Carry Bit | |
2173 | * | |
2174 | * 5432109876543210 | |
2175 | * 100100 1 | |
2176 | * rt ----- | |
2177 | * s - --- | |
2178 | */ | |
2179 | std::string NMD::ADDIU_RS5_(uint64 instruction) | |
2180 | { | |
2181 | uint64 rt_value = extract_rt_9_8_7_6_5(instruction); | |
d3605cc0 | 2182 | int64 s_value = extract_s__se3_4_2_1_0(instruction); |
89a955e8 AM |
2183 | |
2184 | std::string rt = GPR(copy(rt_value)); | |
2185 | std::string s = IMMEDIATE(copy(s_value)); | |
2186 | ||
2187 | return img::format("ADDIU %s, %s", rt, s); | |
2188 | } | |
2189 | ||
2190 | ||
2191 | /* | |
2192 | * | |
2193 | * | |
2194 | * 3 2 1 | |
2195 | * 10987654321098765432109876543210 | |
2196 | * 001000 x1110000101 | |
2197 | * rt ----- | |
2198 | * rs ----- | |
2199 | * rd ----- | |
2200 | */ | |
2201 | std::string NMD::ADDIUPC_32_(uint64 instruction) | |
2202 | { | |
2203 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
d3605cc0 | 2204 | int64 s_value = extract_s__se21_0_20_to_1_s1(instruction); |
89a955e8 AM |
2205 | |
2206 | std::string rt = GPR(copy(rt_value)); | |
2207 | std::string s = ADDRESS(encode_s_from_address(s_value), 4); | |
2208 | ||
2209 | return img::format("ADDIUPC %s, %s", rt, s); | |
2210 | } | |
2211 | ||
2212 | ||
2213 | /* | |
2214 | * | |
2215 | * | |
2216 | * 3 2 1 | |
2217 | * 10987654321098765432109876543210 | |
2218 | * 001000 x1110000101 | |
2219 | * rt ----- | |
2220 | * rs ----- | |
2221 | * rd ----- | |
2222 | */ | |
2223 | std::string NMD::ADDIUPC_48_(uint64 instruction) | |
2224 | { | |
2225 | uint64 rt_value = extract_rt_41_40_39_38_37(instruction); | |
d3605cc0 | 2226 | int64 s_value = extract_s__se31_15_to_0_31_to_16(instruction); |
89a955e8 AM |
2227 | |
2228 | std::string rt = GPR(copy(rt_value)); | |
2229 | std::string s = ADDRESS(encode_s_from_address(s_value), 6); | |
2230 | ||
2231 | return img::format("ADDIUPC %s, %s", rt, s); | |
2232 | } | |
2233 | ||
2234 | ||
2235 | /* | |
2236 | * ADDQ.PH rd, rt, rs - Add Fractional Halfword Vectors | |
2237 | * | |
2238 | * 3 2 1 | |
2239 | * 10987654321098765432109876543210 | |
2240 | * 001000 00000001101 | |
2241 | * rt ----- | |
2242 | * rs ----- | |
2243 | * rd ----- | |
2244 | */ | |
2245 | std::string NMD::ADDQ_PH(uint64 instruction) | |
2246 | { | |
2247 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 2248 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 2249 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
2250 | |
2251 | std::string rd = GPR(copy(rd_value)); | |
2252 | std::string rs = GPR(copy(rs_value)); | |
2253 | std::string rt = GPR(copy(rt_value)); | |
2254 | ||
2255 | return img::format("ADDQ.PH %s, %s, %s", rd, rs, rt); | |
2256 | } | |
2257 | ||
2258 | ||
2259 | /* | |
2260 | * ADDQ_S.PH rd, rt, rs - Add Fractional Halfword Vectors | |
2261 | * | |
2262 | * 3 2 1 | |
2263 | * 10987654321098765432109876543210 | |
2264 | * 001000 10000001101 | |
2265 | * rt ----- | |
2266 | * rs ----- | |
2267 | * rd ----- | |
2268 | */ | |
2269 | std::string NMD::ADDQ_S_PH(uint64 instruction) | |
2270 | { | |
2271 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 2272 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 2273 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
2274 | |
2275 | std::string rd = GPR(copy(rd_value)); | |
2276 | std::string rs = GPR(copy(rs_value)); | |
2277 | std::string rt = GPR(copy(rt_value)); | |
2278 | ||
2279 | return img::format("ADDQ_S.PH %s, %s, %s", rd, rs, rt); | |
2280 | } | |
2281 | ||
2282 | ||
2283 | /* | |
2284 | * ADDQ_S.W rd, rt, rs - Add Fractional Words | |
2285 | * | |
2286 | * 3 2 1 | |
2287 | * 10987654321098765432109876543210 | |
2288 | * 001000 x1100000101 | |
2289 | * rt ----- | |
2290 | * rs ----- | |
2291 | * rd ----- | |
2292 | */ | |
2293 | std::string NMD::ADDQ_S_W(uint64 instruction) | |
2294 | { | |
2295 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 2296 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 2297 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
2298 | |
2299 | std::string rd = GPR(copy(rd_value)); | |
2300 | std::string rs = GPR(copy(rs_value)); | |
2301 | std::string rt = GPR(copy(rt_value)); | |
2302 | ||
2303 | return img::format("ADDQ_S.W %s, %s, %s", rd, rs, rt); | |
2304 | } | |
2305 | ||
2306 | ||
2307 | /* | |
2308 | * ADDQH.PH rd, rt, rs - Add Fractional Halfword Vectors And Shift Right | |
2309 | * to Halve Results | |
2310 | * | |
2311 | * 3 2 1 | |
2312 | * 10987654321098765432109876543210 | |
2313 | * 001000 00001001101 | |
2314 | * rt ----- | |
2315 | * rs ----- | |
2316 | * rd ----- | |
2317 | */ | |
2318 | std::string NMD::ADDQH_PH(uint64 instruction) | |
2319 | { | |
2320 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 2321 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 2322 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
2323 | |
2324 | std::string rd = GPR(copy(rd_value)); | |
2325 | std::string rs = GPR(copy(rs_value)); | |
2326 | std::string rt = GPR(copy(rt_value)); | |
2327 | ||
2328 | return img::format("ADDQH.PH %s, %s, %s", rd, rs, rt); | |
2329 | } | |
2330 | ||
2331 | ||
2332 | /* | |
2333 | * ADDQH_R.PH rd, rt, rs - Add Fractional Halfword Vectors And Shift Right | |
2334 | * to Halve Results | |
2335 | * | |
2336 | * 3 2 1 | |
2337 | * 10987654321098765432109876543210 | |
2338 | * 001000 10001001101 | |
2339 | * rt ----- | |
2340 | * rs ----- | |
2341 | * rd ----- | |
2342 | */ | |
2343 | std::string NMD::ADDQH_R_PH(uint64 instruction) | |
2344 | { | |
2345 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 2346 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 2347 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
2348 | |
2349 | std::string rd = GPR(copy(rd_value)); | |
2350 | std::string rs = GPR(copy(rs_value)); | |
2351 | std::string rt = GPR(copy(rt_value)); | |
2352 | ||
2353 | return img::format("ADDQH_R.PH %s, %s, %s", rd, rs, rt); | |
2354 | } | |
2355 | ||
2356 | ||
2357 | /* | |
2358 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
2359 | * | |
2360 | * 3 2 1 | |
2361 | * 10987654321098765432109876543210 | |
2362 | * 001000 00010001101 | |
2363 | * rt ----- | |
2364 | * rs ----- | |
2365 | * rd ----- | |
2366 | */ | |
2367 | std::string NMD::ADDQH_R_W(uint64 instruction) | |
2368 | { | |
2369 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 2370 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 2371 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
2372 | |
2373 | std::string rd = GPR(copy(rd_value)); | |
2374 | std::string rs = GPR(copy(rs_value)); | |
2375 | std::string rt = GPR(copy(rt_value)); | |
2376 | ||
2377 | return img::format("ADDQH_R.W %s, %s, %s", rd, rs, rt); | |
2378 | } | |
2379 | ||
2380 | ||
2381 | /* | |
2382 | * ADDQH.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
2383 | * | |
2384 | * 3 2 1 | |
2385 | * 10987654321098765432109876543210 | |
2386 | * 001000 10010001101 | |
2387 | * rt ----- | |
2388 | * rs ----- | |
2389 | * rd ----- | |
2390 | */ | |
2391 | std::string NMD::ADDQH_W(uint64 instruction) | |
2392 | { | |
2393 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 2394 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 2395 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
2396 | |
2397 | std::string rd = GPR(copy(rd_value)); | |
2398 | std::string rs = GPR(copy(rs_value)); | |
2399 | std::string rt = GPR(copy(rt_value)); | |
2400 | ||
2401 | return img::format("ADDQH.W %s, %s, %s", rd, rs, rt); | |
2402 | } | |
2403 | ||
2404 | ||
2405 | /* | |
2406 | * ADDSC rd, rt, rs - Add Signed Word and Set Carry Bit | |
2407 | * | |
2408 | * 3 2 1 | |
2409 | * 10987654321098765432109876543210 | |
2410 | * 001000 x1110000101 | |
2411 | * rt ----- | |
2412 | * rs ----- | |
2413 | * rd ----- | |
2414 | */ | |
2415 | std::string NMD::ADDSC(uint64 instruction) | |
2416 | { | |
2417 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 2418 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 2419 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
2420 | |
2421 | std::string rd = GPR(copy(rd_value)); | |
2422 | std::string rs = GPR(copy(rs_value)); | |
2423 | std::string rt = GPR(copy(rt_value)); | |
2424 | ||
2425 | return img::format("ADDSC %s, %s, %s", rd, rs, rt); | |
2426 | } | |
2427 | ||
2428 | ||
2429 | /* | |
2430 | * ADDU[16] rd3, rs3, rt3 - | |
2431 | * | |
2432 | * 5432109876543210 | |
2433 | * 101100 0 | |
2434 | * rt3 --- | |
2435 | * rs3 --- | |
2436 | * rd3 --- | |
2437 | */ | |
2438 | std::string NMD::ADDU_16_(uint64 instruction) | |
2439 | { | |
2440 | uint64 rt3_value = extract_rt3_9_8_7(instruction); | |
2441 | uint64 rs3_value = extract_rs3_6_5_4(instruction); | |
2442 | uint64 rd3_value = extract_rd3_3_2_1(instruction); | |
2443 | ||
988d6c89 AM |
2444 | std::string rt3 = GPR(decode_gpr_gpr3(rt3_value)); |
2445 | std::string rs3 = GPR(decode_gpr_gpr3(rs3_value)); | |
2446 | std::string rd3 = GPR(decode_gpr_gpr3(rd3_value)); | |
89a955e8 AM |
2447 | |
2448 | return img::format("ADDU %s, %s, %s", rd3, rs3, rt3); | |
2449 | } | |
2450 | ||
2451 | ||
2452 | /* | |
2453 | * | |
2454 | * | |
2455 | * 3 2 1 | |
2456 | * 10987654321098765432109876543210 | |
2457 | * 001000 x1110000101 | |
2458 | * rt ----- | |
2459 | * rs ----- | |
2460 | * rd ----- | |
2461 | */ | |
2462 | std::string NMD::ADDU_32_(uint64 instruction) | |
2463 | { | |
2464 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 2465 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 2466 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
2467 | |
2468 | std::string rd = GPR(copy(rd_value)); | |
2469 | std::string rs = GPR(copy(rs_value)); | |
2470 | std::string rt = GPR(copy(rt_value)); | |
2471 | ||
2472 | return img::format("ADDU %s, %s, %s", rd, rs, rt); | |
2473 | } | |
2474 | ||
2475 | ||
2476 | /* | |
2477 | * | |
2478 | * | |
2479 | * 3 2 1 | |
2480 | * 10987654321098765432109876543210 | |
2481 | * 001000 x1110000101 | |
2482 | * rt ----- | |
2483 | * rs ----- | |
2484 | * rd ----- | |
2485 | */ | |
2486 | std::string NMD::ADDU_4X4_(uint64 instruction) | |
2487 | { | |
89a955e8 | 2488 | uint64 rt4_value = extract_rt4_9_7_6_5(instruction); |
86b5f803 | 2489 | uint64 rs4_value = extract_rs4_4_2_1_0(instruction); |
89a955e8 | 2490 | |
131e9b92 AM |
2491 | std::string rs4 = GPR(decode_gpr_gpr4(rs4_value)); |
2492 | std::string rt4 = GPR(decode_gpr_gpr4(rt4_value)); | |
89a955e8 AM |
2493 | |
2494 | return img::format("ADDU %s, %s", rs4, rt4); | |
2495 | } | |
2496 | ||
2497 | ||
2498 | /* | |
2499 | * ADDU.PH rd, rt, rs - Unsigned Add Integer Halfwords | |
2500 | * | |
2501 | * 3 2 1 | |
2502 | * 10987654321098765432109876543210 | |
2503 | * 001000 00100001101 | |
2504 | * rt ----- | |
2505 | * rs ----- | |
2506 | * rd ----- | |
2507 | */ | |
2508 | std::string NMD::ADDU_PH(uint64 instruction) | |
2509 | { | |
2510 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 2511 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 2512 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
2513 | |
2514 | std::string rd = GPR(copy(rd_value)); | |
2515 | std::string rs = GPR(copy(rs_value)); | |
2516 | std::string rt = GPR(copy(rt_value)); | |
2517 | ||
2518 | return img::format("ADDU.PH %s, %s, %s", rd, rs, rt); | |
2519 | } | |
2520 | ||
2521 | ||
2522 | /* | |
2523 | * ADDU.QB rd, rt, rs - Unsigned Add Quad Byte Vectors | |
2524 | * | |
2525 | * 3 2 1 | |
2526 | * 10987654321098765432109876543210 | |
2527 | * 001000 00011001101 | |
2528 | * rt ----- | |
2529 | * rs ----- | |
2530 | * rd ----- | |
2531 | */ | |
2532 | std::string NMD::ADDU_QB(uint64 instruction) | |
2533 | { | |
2534 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 2535 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 2536 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
2537 | |
2538 | std::string rd = GPR(copy(rd_value)); | |
2539 | std::string rs = GPR(copy(rs_value)); | |
2540 | std::string rt = GPR(copy(rt_value)); | |
2541 | ||
2542 | return img::format("ADDU.QB %s, %s, %s", rd, rs, rt); | |
2543 | } | |
2544 | ||
2545 | ||
2546 | /* | |
2547 | * ADDU_S.PH rd, rt, rs - Unsigned Add Integer Halfwords | |
2548 | * | |
2549 | * 3 2 1 | |
2550 | * 10987654321098765432109876543210 | |
2551 | * 001000 10100001101 | |
2552 | * rt ----- | |
2553 | * rs ----- | |
2554 | * rd ----- | |
2555 | */ | |
2556 | std::string NMD::ADDU_S_PH(uint64 instruction) | |
2557 | { | |
2558 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 2559 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 2560 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
2561 | |
2562 | std::string rd = GPR(copy(rd_value)); | |
2563 | std::string rs = GPR(copy(rs_value)); | |
2564 | std::string rt = GPR(copy(rt_value)); | |
2565 | ||
2566 | return img::format("ADDU_S.PH %s, %s, %s", rd, rs, rt); | |
2567 | } | |
2568 | ||
2569 | ||
2570 | /* | |
2571 | * ADDU_S.QB rd, rt, rs - Unsigned Add Quad Byte Vectors | |
2572 | * | |
2573 | * 3 2 1 | |
2574 | * 10987654321098765432109876543210 | |
2575 | * 001000 10011001101 | |
2576 | * rt ----- | |
2577 | * rs ----- | |
2578 | * rd ----- | |
2579 | */ | |
2580 | std::string NMD::ADDU_S_QB(uint64 instruction) | |
2581 | { | |
2582 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 2583 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 2584 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
2585 | |
2586 | std::string rd = GPR(copy(rd_value)); | |
2587 | std::string rs = GPR(copy(rs_value)); | |
2588 | std::string rt = GPR(copy(rt_value)); | |
2589 | ||
2590 | return img::format("ADDU_S.QB %s, %s, %s", rd, rs, rt); | |
2591 | } | |
2592 | ||
2593 | ||
2594 | /* | |
2595 | * ADDUH.QB rd, rt, rs - Unsigned Add Vector Quad-Bytes And Right Shift | |
2596 | * to Halve Results | |
2597 | * | |
2598 | * 3 2 1 | |
2599 | * 10987654321098765432109876543210 | |
2600 | * 001000 00101001101 | |
2601 | * rt ----- | |
2602 | * rs ----- | |
2603 | * rd ----- | |
2604 | */ | |
2605 | std::string NMD::ADDUH_QB(uint64 instruction) | |
2606 | { | |
2607 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 2608 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 2609 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
2610 | |
2611 | std::string rd = GPR(copy(rd_value)); | |
2612 | std::string rs = GPR(copy(rs_value)); | |
2613 | std::string rt = GPR(copy(rt_value)); | |
2614 | ||
2615 | return img::format("ADDUH.QB %s, %s, %s", rd, rs, rt); | |
2616 | } | |
2617 | ||
2618 | ||
2619 | /* | |
2620 | * ADDUH_R.QB rd, rt, rs - Unsigned Add Vector Quad-Bytes And Right Shift | |
2621 | * to Halve Results | |
2622 | * | |
2623 | * 3 2 1 | |
2624 | * 10987654321098765432109876543210 | |
2625 | * 001000 10101001101 | |
2626 | * rt ----- | |
2627 | * rs ----- | |
2628 | * rd ----- | |
2629 | */ | |
2630 | std::string NMD::ADDUH_R_QB(uint64 instruction) | |
2631 | { | |
2632 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 2633 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 2634 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
2635 | |
2636 | std::string rd = GPR(copy(rd_value)); | |
2637 | std::string rs = GPR(copy(rs_value)); | |
2638 | std::string rt = GPR(copy(rt_value)); | |
2639 | ||
2640 | return img::format("ADDUH_R.QB %s, %s, %s", rd, rs, rt); | |
2641 | } | |
2642 | ||
2643 | /* | |
2644 | * ADDWC rd, rt, rs - Add Word with Carry Bit | |
2645 | * | |
2646 | * 3 2 1 | |
2647 | * 10987654321098765432109876543210 | |
2648 | * 001000 x1111000101 | |
2649 | * rt ----- | |
2650 | * rs ----- | |
2651 | * rd ----- | |
2652 | */ | |
2653 | std::string NMD::ADDWC(uint64 instruction) | |
2654 | { | |
2655 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 2656 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 2657 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
2658 | |
2659 | std::string rd = GPR(copy(rd_value)); | |
2660 | std::string rs = GPR(copy(rs_value)); | |
2661 | std::string rt = GPR(copy(rt_value)); | |
2662 | ||
2663 | return img::format("ADDWC %s, %s, %s", rd, rs, rt); | |
2664 | } | |
2665 | ||
2666 | ||
2667 | /* | |
2668 | * | |
2669 | * | |
2670 | * 3 2 1 | |
2671 | * 10987654321098765432109876543210 | |
2672 | * 001000 x1110000101 | |
2673 | * rt ----- | |
2674 | * rs ----- | |
2675 | * rd ----- | |
2676 | */ | |
2677 | std::string NMD::ALUIPC(uint64 instruction) | |
2678 | { | |
2679 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
d3605cc0 | 2680 | int64 s_value = extract_s__se31_0_11_to_2_20_to_12_s12(instruction); |
89a955e8 AM |
2681 | |
2682 | std::string rt = GPR(copy(rt_value)); | |
2683 | std::string s = ADDRESS(encode_s_from_address(s_value), 4); | |
2684 | ||
2685 | return img::format("ALUIPC %s, %%pcrel_hi(%s)", rt, s); | |
2686 | } | |
2687 | ||
2688 | ||
2689 | /* | |
2690 | * AND[16] rt3, rs3 - | |
2691 | * | |
2692 | * 5432109876543210 | |
2693 | * 101100 | |
2694 | * rt3 --- | |
2695 | * rs3 --- | |
2696 | * eu ---- | |
2697 | */ | |
2698 | std::string NMD::AND_16_(uint64 instruction) | |
2699 | { | |
2700 | uint64 rt3_value = extract_rt3_9_8_7(instruction); | |
2701 | uint64 rs3_value = extract_rs3_6_5_4(instruction); | |
2702 | ||
988d6c89 AM |
2703 | std::string rt3 = GPR(decode_gpr_gpr3(rt3_value)); |
2704 | std::string rs3 = GPR(decode_gpr_gpr3(rs3_value)); | |
89a955e8 AM |
2705 | |
2706 | return img::format("AND %s, %s", rs3, rt3); | |
2707 | } | |
2708 | ||
2709 | ||
2710 | /* | |
2711 | * | |
2712 | * | |
2713 | * 3 2 1 | |
2714 | * 10987654321098765432109876543210 | |
2715 | * 001000 x1110000101 | |
2716 | * rt ----- | |
2717 | * rs ----- | |
2718 | * rd ----- | |
2719 | */ | |
2720 | std::string NMD::AND_32_(uint64 instruction) | |
2721 | { | |
2722 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 2723 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 2724 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
2725 | |
2726 | std::string rd = GPR(copy(rd_value)); | |
2727 | std::string rs = GPR(copy(rs_value)); | |
2728 | std::string rt = GPR(copy(rt_value)); | |
2729 | ||
2730 | return img::format("AND %s, %s, %s", rd, rs, rt); | |
2731 | } | |
2732 | ||
2733 | ||
2734 | /* | |
2735 | * ANDI rt, rs, u - | |
2736 | * | |
2737 | * 5432109876543210 | |
2738 | * 101100 | |
2739 | * rt3 --- | |
2740 | * rs3 --- | |
2741 | * eu ---- | |
2742 | */ | |
2743 | std::string NMD::ANDI_16_(uint64 instruction) | |
2744 | { | |
2745 | uint64 rt3_value = extract_rt3_9_8_7(instruction); | |
2746 | uint64 rs3_value = extract_rs3_6_5_4(instruction); | |
2747 | uint64 eu_value = extract_eu_3_2_1_0(instruction); | |
2748 | ||
988d6c89 AM |
2749 | std::string rt3 = GPR(decode_gpr_gpr3(rt3_value)); |
2750 | std::string rs3 = GPR(decode_gpr_gpr3(rs3_value)); | |
89a955e8 AM |
2751 | std::string eu = IMMEDIATE(encode_eu_from_u_andi16(eu_value)); |
2752 | ||
2753 | return img::format("ANDI %s, %s, %s", rt3, rs3, eu); | |
2754 | } | |
2755 | ||
2756 | ||
2757 | /* | |
2758 | * | |
2759 | * | |
2760 | * 3 2 1 | |
2761 | * 10987654321098765432109876543210 | |
2762 | * 001000 x1110000101 | |
2763 | * rt ----- | |
2764 | * rs ----- | |
2765 | * rd ----- | |
2766 | */ | |
2767 | std::string NMD::ANDI_32_(uint64 instruction) | |
2768 | { | |
2769 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 2770 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 2771 | uint64 u_value = extract_u_11_10_9_8_7_6_5_4_3_2_1_0(instruction); |
89a955e8 AM |
2772 | |
2773 | std::string rt = GPR(copy(rt_value)); | |
2774 | std::string rs = GPR(copy(rs_value)); | |
2775 | std::string u = IMMEDIATE(copy(u_value)); | |
2776 | ||
2777 | return img::format("ANDI %s, %s, %s", rt, rs, u); | |
2778 | } | |
2779 | ||
2780 | ||
2781 | /* | |
2782 | * | |
2783 | * | |
2784 | * 3 2 1 | |
2785 | * 10987654321098765432109876543210 | |
2786 | * 001000 x1110000101 | |
2787 | * rt ----- | |
2788 | * rs ----- | |
2789 | * rd ----- | |
2790 | */ | |
2791 | std::string NMD::APPEND(uint64 instruction) | |
2792 | { | |
2793 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 2794 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 2795 | uint64 sa_value = extract_sa_15_14_13_12_11(instruction); |
89a955e8 AM |
2796 | |
2797 | std::string rt = GPR(copy(rt_value)); | |
2798 | std::string rs = GPR(copy(rs_value)); | |
2799 | std::string sa = IMMEDIATE(copy(sa_value)); | |
2800 | ||
2801 | return img::format("APPEND %s, %s, %s", rt, rs, sa); | |
2802 | } | |
2803 | ||
2804 | ||
2805 | /* | |
2806 | * | |
2807 | * | |
2808 | * 3 2 1 | |
2809 | * 10987654321098765432109876543210 | |
2810 | * 001000 x1110000101 | |
2811 | * rt ----- | |
2812 | * rs ----- | |
2813 | * rd ----- | |
2814 | */ | |
2815 | std::string NMD::ASET(uint64 instruction) | |
2816 | { | |
2817 | uint64 bit_value = extract_bit_23_22_21(instruction); | |
89a955e8 | 2818 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 2819 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
89a955e8 AM |
2820 | |
2821 | std::string bit = IMMEDIATE(copy(bit_value)); | |
2822 | std::string s = IMMEDIATE(copy(s_value)); | |
2823 | std::string rs = GPR(copy(rs_value)); | |
2824 | ||
2825 | return img::format("ASET %s, %s(%s)", bit, s, rs); | |
2826 | } | |
2827 | ||
2828 | ||
2829 | /* | |
2830 | * | |
2831 | * | |
2832 | * 3 2 1 | |
2833 | * 10987654321098765432109876543210 | |
2834 | * 001000 x1110000101 | |
2835 | * rt ----- | |
2836 | * rs ----- | |
2837 | * rd ----- | |
2838 | */ | |
2839 | std::string NMD::BALC_16_(uint64 instruction) | |
2840 | { | |
d3605cc0 | 2841 | int64 s_value = extract_s__se10_0_9_8_7_6_5_4_3_2_1_s1(instruction); |
89a955e8 AM |
2842 | |
2843 | std::string s = ADDRESS(encode_s_from_address(s_value), 2); | |
2844 | ||
2845 | return img::format("BALC %s", s); | |
2846 | } | |
2847 | ||
2848 | ||
2849 | /* | |
2850 | * | |
2851 | * | |
2852 | * 3 2 1 | |
2853 | * 10987654321098765432109876543210 | |
2854 | * 001000 x1110000101 | |
2855 | * rt ----- | |
2856 | * rs ----- | |
2857 | * rd ----- | |
2858 | */ | |
2859 | std::string NMD::BALC_32_(uint64 instruction) | |
2860 | { | |
d3605cc0 | 2861 | int64 s_value = extract_s__se25_0_24_to_1_s1(instruction); |
89a955e8 AM |
2862 | |
2863 | std::string s = ADDRESS(encode_s_from_address(s_value), 4); | |
2864 | ||
2865 | return img::format("BALC %s", s); | |
2866 | } | |
2867 | ||
2868 | ||
2869 | /* | |
2870 | * | |
2871 | * | |
2872 | * 3 2 1 | |
2873 | * 10987654321098765432109876543210 | |
2874 | * 001000 x1110000101 | |
2875 | * rt ----- | |
2876 | * rs ----- | |
2877 | * rd ----- | |
2878 | */ | |
2879 | std::string NMD::BALRSC(uint64 instruction) | |
2880 | { | |
2881 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
2882 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
2883 | ||
2884 | std::string rt = GPR(copy(rt_value)); | |
2885 | std::string rs = GPR(copy(rs_value)); | |
2886 | ||
2887 | return img::format("BALRSC %s, %s", rt, rs); | |
2888 | } | |
2889 | ||
2890 | ||
2891 | /* | |
2892 | * | |
2893 | * | |
2894 | * 3 2 1 | |
2895 | * 10987654321098765432109876543210 | |
2896 | * 001000 x1110000101 | |
2897 | * rt ----- | |
2898 | * rs ----- | |
2899 | * rd ----- | |
2900 | */ | |
2901 | std::string NMD::BBEQZC(uint64 instruction) | |
2902 | { | |
2903 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
2904 | uint64 bit_value = extract_bit_16_15_14_13_12_11(instruction); | |
d3605cc0 | 2905 | int64 s_value = extract_s__se11_0_10_9_8_7_6_5_4_3_2_1_0_s1(instruction); |
89a955e8 AM |
2906 | |
2907 | std::string rt = GPR(copy(rt_value)); | |
2908 | std::string bit = IMMEDIATE(copy(bit_value)); | |
2909 | std::string s = ADDRESS(encode_s_from_address(s_value), 4); | |
2910 | ||
2911 | return img::format("BBEQZC %s, %s, %s", rt, bit, s); | |
2912 | } | |
2913 | ||
2914 | ||
2915 | /* | |
2916 | * | |
2917 | * | |
2918 | * 3 2 1 | |
2919 | * 10987654321098765432109876543210 | |
2920 | * 001000 x1110000101 | |
2921 | * rt ----- | |
2922 | * rs ----- | |
2923 | * rd ----- | |
2924 | */ | |
2925 | std::string NMD::BBNEZC(uint64 instruction) | |
2926 | { | |
2927 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
2928 | uint64 bit_value = extract_bit_16_15_14_13_12_11(instruction); | |
d3605cc0 | 2929 | int64 s_value = extract_s__se11_0_10_9_8_7_6_5_4_3_2_1_0_s1(instruction); |
89a955e8 AM |
2930 | |
2931 | std::string rt = GPR(copy(rt_value)); | |
2932 | std::string bit = IMMEDIATE(copy(bit_value)); | |
2933 | std::string s = ADDRESS(encode_s_from_address(s_value), 4); | |
2934 | ||
2935 | return img::format("BBNEZC %s, %s, %s", rt, bit, s); | |
2936 | } | |
2937 | ||
2938 | ||
2939 | /* | |
2940 | * | |
2941 | * | |
2942 | * 3 2 1 | |
2943 | * 10987654321098765432109876543210 | |
2944 | * 001000 x1110000101 | |
2945 | * rt ----- | |
2946 | * rs ----- | |
2947 | * rd ----- | |
2948 | */ | |
2949 | std::string NMD::BC_16_(uint64 instruction) | |
2950 | { | |
d3605cc0 | 2951 | int64 s_value = extract_s__se10_0_9_8_7_6_5_4_3_2_1_s1(instruction); |
89a955e8 AM |
2952 | |
2953 | std::string s = ADDRESS(encode_s_from_address(s_value), 2); | |
2954 | ||
2955 | return img::format("BC %s", s); | |
2956 | } | |
2957 | ||
2958 | ||
2959 | /* | |
2960 | * | |
2961 | * | |
2962 | * 3 2 1 | |
2963 | * 10987654321098765432109876543210 | |
2964 | * 001000 x1110000101 | |
2965 | * rt ----- | |
2966 | * rs ----- | |
2967 | * rd ----- | |
2968 | */ | |
2969 | std::string NMD::BC_32_(uint64 instruction) | |
2970 | { | |
d3605cc0 | 2971 | int64 s_value = extract_s__se25_0_24_to_1_s1(instruction); |
89a955e8 AM |
2972 | |
2973 | std::string s = ADDRESS(encode_s_from_address(s_value), 4); | |
2974 | ||
2975 | return img::format("BC %s", s); | |
2976 | } | |
2977 | ||
2978 | ||
2979 | /* | |
2980 | * | |
2981 | * | |
2982 | * 3 2 1 | |
2983 | * 10987654321098765432109876543210 | |
2984 | * 001000 x1110000101 | |
2985 | * rt ----- | |
2986 | * rs ----- | |
2987 | * rd ----- | |
2988 | */ | |
2989 | std::string NMD::BC1EQZC(uint64 instruction) | |
2990 | { | |
17ce2f00 | 2991 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
75199b40 | 2992 | int64 s_value = extract_s__se14_0_13_to_1_s1(instruction); |
89a955e8 AM |
2993 | |
2994 | std::string ft = FPR(copy(ft_value)); | |
2995 | std::string s = ADDRESS(encode_s_from_address(s_value), 4); | |
2996 | ||
2997 | return img::format("BC1EQZC %s, %s", ft, s); | |
2998 | } | |
2999 | ||
3000 | ||
3001 | /* | |
3002 | * | |
3003 | * | |
3004 | * 3 2 1 | |
3005 | * 10987654321098765432109876543210 | |
3006 | * 001000 x1110000101 | |
3007 | * rt ----- | |
3008 | * rs ----- | |
3009 | * rd ----- | |
3010 | */ | |
3011 | std::string NMD::BC1NEZC(uint64 instruction) | |
3012 | { | |
17ce2f00 | 3013 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
75199b40 | 3014 | int64 s_value = extract_s__se14_0_13_to_1_s1(instruction); |
89a955e8 AM |
3015 | |
3016 | std::string ft = FPR(copy(ft_value)); | |
3017 | std::string s = ADDRESS(encode_s_from_address(s_value), 4); | |
3018 | ||
3019 | return img::format("BC1NEZC %s, %s", ft, s); | |
3020 | } | |
3021 | ||
3022 | ||
3023 | /* | |
3024 | * | |
3025 | * | |
3026 | * 3 2 1 | |
3027 | * 10987654321098765432109876543210 | |
3028 | * 001000 x1110000101 | |
3029 | * rt ----- | |
3030 | * rs ----- | |
3031 | * rd ----- | |
3032 | */ | |
3033 | std::string NMD::BC2EQZC(uint64 instruction) | |
3034 | { | |
89a955e8 | 3035 | uint64 ct_value = extract_ct_25_24_23_22_21(instruction); |
75199b40 | 3036 | int64 s_value = extract_s__se14_0_13_to_1_s1(instruction); |
89a955e8 AM |
3037 | |
3038 | std::string ct = CPR(copy(ct_value)); | |
3039 | std::string s = ADDRESS(encode_s_from_address(s_value), 4); | |
3040 | ||
3041 | return img::format("BC2EQZC %s, %s", ct, s); | |
3042 | } | |
3043 | ||
3044 | ||
3045 | /* | |
3046 | * | |
3047 | * | |
3048 | * 3 2 1 | |
3049 | * 10987654321098765432109876543210 | |
3050 | * 001000 x1110000101 | |
3051 | * rt ----- | |
3052 | * rs ----- | |
3053 | * rd ----- | |
3054 | */ | |
3055 | std::string NMD::BC2NEZC(uint64 instruction) | |
3056 | { | |
89a955e8 | 3057 | uint64 ct_value = extract_ct_25_24_23_22_21(instruction); |
75199b40 | 3058 | int64 s_value = extract_s__se14_0_13_to_1_s1(instruction); |
89a955e8 AM |
3059 | |
3060 | std::string ct = CPR(copy(ct_value)); | |
3061 | std::string s = ADDRESS(encode_s_from_address(s_value), 4); | |
3062 | ||
3063 | return img::format("BC2NEZC %s, %s", ct, s); | |
3064 | } | |
3065 | ||
3066 | ||
3067 | /* | |
3068 | * | |
3069 | * | |
3070 | * 3 2 1 | |
3071 | * 10987654321098765432109876543210 | |
3072 | * 001000 x1110000101 | |
3073 | * rt ----- | |
3074 | * rs ----- | |
3075 | * rd ----- | |
3076 | */ | |
3077 | std::string NMD::BEQC_16_(uint64 instruction) | |
3078 | { | |
89a955e8 AM |
3079 | uint64 rt3_value = extract_rt3_9_8_7(instruction); |
3080 | uint64 rs3_value = extract_rs3_6_5_4(instruction); | |
75199b40 | 3081 | uint64 u_value = extract_u_3_2_1_0__s1(instruction); |
89a955e8 AM |
3082 | |
3083 | std::string rs3 = GPR(encode_rs3_and_check_rs3_lt_rt3(rs3_value)); | |
988d6c89 | 3084 | std::string rt3 = GPR(decode_gpr_gpr3(rt3_value)); |
89a955e8 AM |
3085 | std::string u = ADDRESS(encode_u_from_address(u_value), 2); |
3086 | ||
3087 | return img::format("BEQC %s, %s, %s", rs3, rt3, u); | |
3088 | } | |
3089 | ||
3090 | ||
3091 | /* | |
3092 | * | |
3093 | * | |
3094 | * 3 2 1 | |
3095 | * 10987654321098765432109876543210 | |
3096 | * 001000 x1110000101 | |
3097 | * rt ----- | |
3098 | * rs ----- | |
3099 | * rd ----- | |
3100 | */ | |
3101 | std::string NMD::BEQC_32_(uint64 instruction) | |
3102 | { | |
3103 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 3104 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 3105 | int64 s_value = extract_s__se14_0_13_to_1_s1(instruction); |
89a955e8 AM |
3106 | |
3107 | std::string rs = GPR(copy(rs_value)); | |
3108 | std::string rt = GPR(copy(rt_value)); | |
3109 | std::string s = ADDRESS(encode_s_from_address(s_value), 4); | |
3110 | ||
3111 | return img::format("BEQC %s, %s, %s", rs, rt, s); | |
3112 | } | |
3113 | ||
3114 | ||
3115 | /* | |
3116 | * | |
3117 | * | |
3118 | * 3 2 1 | |
3119 | * 10987654321098765432109876543210 | |
3120 | * 001000 x1110000101 | |
3121 | * rt ----- | |
3122 | * rs ----- | |
3123 | * rd ----- | |
3124 | */ | |
3125 | std::string NMD::BEQIC(uint64 instruction) | |
3126 | { | |
3127 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 3128 | uint64 u_value = extract_u_17_16_15_14_13_12_11(instruction); |
75199b40 | 3129 | int64 s_value = extract_s__se11_0_10_9_8_7_6_5_4_3_2_1_0_s1(instruction); |
89a955e8 AM |
3130 | |
3131 | std::string rt = GPR(copy(rt_value)); | |
3132 | std::string u = IMMEDIATE(copy(u_value)); | |
3133 | std::string s = ADDRESS(encode_s_from_address(s_value), 4); | |
3134 | ||
3135 | return img::format("BEQIC %s, %s, %s", rt, u, s); | |
3136 | } | |
3137 | ||
3138 | ||
3139 | /* | |
3140 | * | |
3141 | * | |
3142 | * 3 2 1 | |
3143 | * 10987654321098765432109876543210 | |
3144 | * 001000 x1110000101 | |
3145 | * rt ----- | |
3146 | * rs ----- | |
3147 | * rd ----- | |
3148 | */ | |
3149 | std::string NMD::BEQZC_16_(uint64 instruction) | |
3150 | { | |
89a955e8 | 3151 | uint64 rt3_value = extract_rt3_9_8_7(instruction); |
75199b40 | 3152 | int64 s_value = extract_s__se7_0_6_5_4_3_2_1_s1(instruction); |
89a955e8 | 3153 | |
988d6c89 | 3154 | std::string rt3 = GPR(decode_gpr_gpr3(rt3_value)); |
89a955e8 AM |
3155 | std::string s = ADDRESS(encode_s_from_address(s_value), 2); |
3156 | ||
3157 | return img::format("BEQZC %s, %s", rt3, s); | |
3158 | } | |
3159 | ||
3160 | ||
3161 | /* | |
3162 | * | |
3163 | * | |
3164 | * 3 2 1 | |
3165 | * 10987654321098765432109876543210 | |
3166 | * 001000 x1110000101 | |
3167 | * rt ----- | |
3168 | * rs ----- | |
3169 | * rd ----- | |
3170 | */ | |
3171 | std::string NMD::BGEC(uint64 instruction) | |
3172 | { | |
3173 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 3174 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 3175 | int64 s_value = extract_s__se14_0_13_to_1_s1(instruction); |
89a955e8 AM |
3176 | |
3177 | std::string rs = GPR(copy(rs_value)); | |
3178 | std::string rt = GPR(copy(rt_value)); | |
3179 | std::string s = ADDRESS(encode_s_from_address(s_value), 4); | |
3180 | ||
3181 | return img::format("BGEC %s, %s, %s", rs, rt, s); | |
3182 | } | |
3183 | ||
3184 | ||
3185 | /* | |
3186 | * | |
3187 | * | |
3188 | * 3 2 1 | |
3189 | * 10987654321098765432109876543210 | |
3190 | * 001000 x1110000101 | |
3191 | * rt ----- | |
3192 | * rs ----- | |
3193 | * rd ----- | |
3194 | */ | |
3195 | std::string NMD::BGEIC(uint64 instruction) | |
3196 | { | |
3197 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 3198 | uint64 u_value = extract_u_17_16_15_14_13_12_11(instruction); |
75199b40 | 3199 | int64 s_value = extract_s__se11_0_10_9_8_7_6_5_4_3_2_1_0_s1(instruction); |
89a955e8 AM |
3200 | |
3201 | std::string rt = GPR(copy(rt_value)); | |
3202 | std::string u = IMMEDIATE(copy(u_value)); | |
3203 | std::string s = ADDRESS(encode_s_from_address(s_value), 4); | |
3204 | ||
3205 | return img::format("BGEIC %s, %s, %s", rt, u, s); | |
3206 | } | |
3207 | ||
3208 | ||
3209 | /* | |
3210 | * | |
3211 | * | |
3212 | * 3 2 1 | |
3213 | * 10987654321098765432109876543210 | |
3214 | * 001000 x1110000101 | |
3215 | * rt ----- | |
3216 | * rs ----- | |
3217 | * rd ----- | |
3218 | */ | |
3219 | std::string NMD::BGEIUC(uint64 instruction) | |
3220 | { | |
3221 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 3222 | uint64 u_value = extract_u_17_16_15_14_13_12_11(instruction); |
75199b40 | 3223 | int64 s_value = extract_s__se11_0_10_9_8_7_6_5_4_3_2_1_0_s1(instruction); |
89a955e8 AM |
3224 | |
3225 | std::string rt = GPR(copy(rt_value)); | |
3226 | std::string u = IMMEDIATE(copy(u_value)); | |
3227 | std::string s = ADDRESS(encode_s_from_address(s_value), 4); | |
3228 | ||
3229 | return img::format("BGEIUC %s, %s, %s", rt, u, s); | |
3230 | } | |
3231 | ||
3232 | ||
3233 | /* | |
3234 | * | |
3235 | * | |
3236 | * 3 2 1 | |
3237 | * 10987654321098765432109876543210 | |
3238 | * 001000 x1110000101 | |
3239 | * rt ----- | |
3240 | * rs ----- | |
3241 | * rd ----- | |
3242 | */ | |
3243 | std::string NMD::BGEUC(uint64 instruction) | |
3244 | { | |
3245 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 3246 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 3247 | int64 s_value = extract_s__se14_0_13_to_1_s1(instruction); |
89a955e8 AM |
3248 | |
3249 | std::string rs = GPR(copy(rs_value)); | |
3250 | std::string rt = GPR(copy(rt_value)); | |
3251 | std::string s = ADDRESS(encode_s_from_address(s_value), 4); | |
3252 | ||
3253 | return img::format("BGEUC %s, %s, %s", rs, rt, s); | |
3254 | } | |
3255 | ||
3256 | ||
3257 | /* | |
3258 | * | |
3259 | * | |
3260 | * 3 2 1 | |
3261 | * 10987654321098765432109876543210 | |
3262 | * 001000 x1110000101 | |
3263 | * rt ----- | |
3264 | * rs ----- | |
3265 | * rd ----- | |
3266 | */ | |
3267 | std::string NMD::BLTC(uint64 instruction) | |
3268 | { | |
3269 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 3270 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 3271 | int64 s_value = extract_s__se14_0_13_to_1_s1(instruction); |
89a955e8 AM |
3272 | |
3273 | std::string rs = GPR(copy(rs_value)); | |
3274 | std::string rt = GPR(copy(rt_value)); | |
3275 | std::string s = ADDRESS(encode_s_from_address(s_value), 4); | |
3276 | ||
3277 | return img::format("BLTC %s, %s, %s", rs, rt, s); | |
3278 | } | |
3279 | ||
3280 | ||
3281 | /* | |
3282 | * | |
3283 | * | |
3284 | * 3 2 1 | |
3285 | * 10987654321098765432109876543210 | |
3286 | * 001000 x1110000101 | |
3287 | * rt ----- | |
3288 | * rs ----- | |
3289 | * rd ----- | |
3290 | */ | |
3291 | std::string NMD::BLTIC(uint64 instruction) | |
3292 | { | |
3293 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 3294 | uint64 u_value = extract_u_17_16_15_14_13_12_11(instruction); |
75199b40 | 3295 | int64 s_value = extract_s__se11_0_10_9_8_7_6_5_4_3_2_1_0_s1(instruction); |
89a955e8 AM |
3296 | |
3297 | std::string rt = GPR(copy(rt_value)); | |
3298 | std::string u = IMMEDIATE(copy(u_value)); | |
3299 | std::string s = ADDRESS(encode_s_from_address(s_value), 4); | |
3300 | ||
3301 | return img::format("BLTIC %s, %s, %s", rt, u, s); | |
3302 | } | |
3303 | ||
3304 | ||
3305 | /* | |
3306 | * | |
3307 | * | |
3308 | * 3 2 1 | |
3309 | * 10987654321098765432109876543210 | |
3310 | * 001000 x1110000101 | |
3311 | * rt ----- | |
3312 | * rs ----- | |
3313 | * rd ----- | |
3314 | */ | |
3315 | std::string NMD::BLTIUC(uint64 instruction) | |
3316 | { | |
3317 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 3318 | uint64 u_value = extract_u_17_16_15_14_13_12_11(instruction); |
75199b40 | 3319 | int64 s_value = extract_s__se11_0_10_9_8_7_6_5_4_3_2_1_0_s1(instruction); |
89a955e8 AM |
3320 | |
3321 | std::string rt = GPR(copy(rt_value)); | |
3322 | std::string u = IMMEDIATE(copy(u_value)); | |
3323 | std::string s = ADDRESS(encode_s_from_address(s_value), 4); | |
3324 | ||
3325 | return img::format("BLTIUC %s, %s, %s", rt, u, s); | |
3326 | } | |
3327 | ||
3328 | ||
3329 | /* | |
3330 | * | |
3331 | * | |
3332 | * 3 2 1 | |
3333 | * 10987654321098765432109876543210 | |
3334 | * 001000 x1110000101 | |
3335 | * rt ----- | |
3336 | * rs ----- | |
3337 | * rd ----- | |
3338 | */ | |
3339 | std::string NMD::BLTUC(uint64 instruction) | |
3340 | { | |
3341 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 3342 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 3343 | int64 s_value = extract_s__se14_0_13_to_1_s1(instruction); |
89a955e8 AM |
3344 | |
3345 | std::string rs = GPR(copy(rs_value)); | |
3346 | std::string rt = GPR(copy(rt_value)); | |
3347 | std::string s = ADDRESS(encode_s_from_address(s_value), 4); | |
3348 | ||
3349 | return img::format("BLTUC %s, %s, %s", rs, rt, s); | |
3350 | } | |
3351 | ||
3352 | ||
3353 | /* | |
3354 | * | |
3355 | * | |
3356 | * 3 2 1 | |
3357 | * 10987654321098765432109876543210 | |
3358 | * 001000 x1110000101 | |
3359 | * rt ----- | |
3360 | * rs ----- | |
3361 | * rd ----- | |
3362 | */ | |
3363 | std::string NMD::BNEC_16_(uint64 instruction) | |
3364 | { | |
89a955e8 AM |
3365 | uint64 rt3_value = extract_rt3_9_8_7(instruction); |
3366 | uint64 rs3_value = extract_rs3_6_5_4(instruction); | |
75199b40 | 3367 | uint64 u_value = extract_u_3_2_1_0__s1(instruction); |
89a955e8 AM |
3368 | |
3369 | std::string rs3 = GPR(encode_rs3_and_check_rs3_ge_rt3(rs3_value)); | |
988d6c89 | 3370 | std::string rt3 = GPR(decode_gpr_gpr3(rt3_value)); |
89a955e8 AM |
3371 | std::string u = ADDRESS(encode_u_from_address(u_value), 2); |
3372 | ||
3373 | return img::format("BNEC %s, %s, %s", rs3, rt3, u); | |
3374 | } | |
3375 | ||
3376 | ||
3377 | /* | |
3378 | * | |
3379 | * | |
3380 | * 3 2 1 | |
3381 | * 10987654321098765432109876543210 | |
3382 | * 001000 x1110000101 | |
3383 | * rt ----- | |
3384 | * rs ----- | |
3385 | * rd ----- | |
3386 | */ | |
3387 | std::string NMD::BNEC_32_(uint64 instruction) | |
3388 | { | |
3389 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 3390 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 3391 | int64 s_value = extract_s__se14_0_13_to_1_s1(instruction); |
89a955e8 AM |
3392 | |
3393 | std::string rs = GPR(copy(rs_value)); | |
3394 | std::string rt = GPR(copy(rt_value)); | |
3395 | std::string s = ADDRESS(encode_s_from_address(s_value), 4); | |
3396 | ||
3397 | return img::format("BNEC %s, %s, %s", rs, rt, s); | |
3398 | } | |
3399 | ||
3400 | ||
3401 | /* | |
3402 | * | |
3403 | * | |
3404 | * 3 2 1 | |
3405 | * 10987654321098765432109876543210 | |
3406 | * 001000 x1110000101 | |
3407 | * rt ----- | |
3408 | * rs ----- | |
3409 | * rd ----- | |
3410 | */ | |
3411 | std::string NMD::BNEIC(uint64 instruction) | |
3412 | { | |
3413 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 3414 | uint64 u_value = extract_u_17_16_15_14_13_12_11(instruction); |
75199b40 | 3415 | int64 s_value = extract_s__se11_0_10_9_8_7_6_5_4_3_2_1_0_s1(instruction); |
89a955e8 AM |
3416 | |
3417 | std::string rt = GPR(copy(rt_value)); | |
3418 | std::string u = IMMEDIATE(copy(u_value)); | |
3419 | std::string s = ADDRESS(encode_s_from_address(s_value), 4); | |
3420 | ||
3421 | return img::format("BNEIC %s, %s, %s", rt, u, s); | |
3422 | } | |
3423 | ||
3424 | ||
3425 | /* | |
3426 | * | |
3427 | * | |
3428 | * 3 2 1 | |
3429 | * 10987654321098765432109876543210 | |
3430 | * 001000 x1110000101 | |
3431 | * rt ----- | |
3432 | * rs ----- | |
3433 | * rd ----- | |
3434 | */ | |
3435 | std::string NMD::BNEZC_16_(uint64 instruction) | |
3436 | { | |
89a955e8 | 3437 | uint64 rt3_value = extract_rt3_9_8_7(instruction); |
75199b40 | 3438 | int64 s_value = extract_s__se7_0_6_5_4_3_2_1_s1(instruction); |
89a955e8 | 3439 | |
988d6c89 | 3440 | std::string rt3 = GPR(decode_gpr_gpr3(rt3_value)); |
89a955e8 AM |
3441 | std::string s = ADDRESS(encode_s_from_address(s_value), 2); |
3442 | ||
3443 | return img::format("BNEZC %s, %s", rt3, s); | |
3444 | } | |
3445 | ||
3446 | ||
3447 | /* | |
3448 | * | |
3449 | * | |
3450 | * 3 2 1 | |
3451 | * 10987654321098765432109876543210 | |
3452 | * 001000 x1110000101 | |
3453 | * rt ----- | |
3454 | * rs ----- | |
3455 | * rd ----- | |
3456 | */ | |
3457 | std::string NMD::BPOSGE32C(uint64 instruction) | |
3458 | { | |
d3605cc0 | 3459 | int64 s_value = extract_s__se14_0_13_to_1_s1(instruction); |
89a955e8 AM |
3460 | |
3461 | std::string s = ADDRESS(encode_s_from_address(s_value), 4); | |
3462 | ||
3463 | return img::format("BPOSGE32C %s", s); | |
3464 | } | |
3465 | ||
3466 | ||
3467 | /* | |
3468 | * | |
3469 | * | |
3470 | * 3 2 1 | |
3471 | * 10987654321098765432109876543210 | |
3472 | * 001000 x1110000101 | |
3473 | * rt ----- | |
3474 | * rs ----- | |
3475 | * rd ----- | |
3476 | */ | |
3477 | std::string NMD::BREAK_16_(uint64 instruction) | |
3478 | { | |
3479 | uint64 code_value = extract_code_2_1_0(instruction); | |
3480 | ||
3481 | std::string code = IMMEDIATE(copy(code_value)); | |
3482 | ||
3483 | return img::format("BREAK %s", code); | |
3484 | } | |
3485 | ||
3486 | ||
3487 | /* | |
3488 | * BREAK code - Break. Cause a Breakpoint exception | |
3489 | * | |
3490 | * 3 2 1 | |
3491 | * 10987654321098765432109876543210 | |
3492 | * 001000 x1110000101 | |
3493 | * rt ----- | |
3494 | * rs ----- | |
3495 | * rd ----- | |
3496 | */ | |
3497 | std::string NMD::BREAK_32_(uint64 instruction) | |
3498 | { | |
3499 | uint64 code_value = extract_code_18_to_0(instruction); | |
3500 | ||
3501 | std::string code = IMMEDIATE(copy(code_value)); | |
3502 | ||
3503 | return img::format("BREAK %s", code); | |
3504 | } | |
3505 | ||
3506 | ||
3507 | /* | |
3508 | * | |
3509 | * | |
3510 | * 3 2 1 | |
3511 | * 10987654321098765432109876543210 | |
3512 | * 001000 x1110000101 | |
3513 | * rt ----- | |
3514 | * rs ----- | |
3515 | * rd ----- | |
3516 | */ | |
3517 | std::string NMD::BRSC(uint64 instruction) | |
3518 | { | |
3519 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
3520 | ||
3521 | std::string rs = GPR(copy(rs_value)); | |
3522 | ||
3523 | return img::format("BRSC %s", rs); | |
3524 | } | |
3525 | ||
3526 | ||
3527 | /* | |
3528 | * | |
3529 | * | |
3530 | * 3 2 1 | |
3531 | * 10987654321098765432109876543210 | |
3532 | * 001000 x1110000101 | |
3533 | * rt ----- | |
3534 | * rs ----- | |
3535 | * rd ----- | |
3536 | */ | |
3537 | std::string NMD::CACHE(uint64 instruction) | |
3538 | { | |
89a955e8 AM |
3539 | uint64 op_value = extract_op_25_24_23_22_21(instruction); |
3540 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
75199b40 | 3541 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
89a955e8 AM |
3542 | |
3543 | std::string op = IMMEDIATE(copy(op_value)); | |
3544 | std::string s = IMMEDIATE(copy(s_value)); | |
3545 | std::string rs = GPR(copy(rs_value)); | |
3546 | ||
3547 | return img::format("CACHE %s, %s(%s)", op, s, rs); | |
3548 | } | |
3549 | ||
3550 | ||
3551 | /* | |
3552 | * | |
3553 | * | |
3554 | * 3 2 1 | |
3555 | * 10987654321098765432109876543210 | |
3556 | * 001000 x1110000101 | |
3557 | * rt ----- | |
3558 | * rs ----- | |
3559 | * rd ----- | |
3560 | */ | |
3561 | std::string NMD::CACHEE(uint64 instruction) | |
3562 | { | |
89a955e8 AM |
3563 | uint64 op_value = extract_op_25_24_23_22_21(instruction); |
3564 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
75199b40 | 3565 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
89a955e8 AM |
3566 | |
3567 | std::string op = IMMEDIATE(copy(op_value)); | |
3568 | std::string s = IMMEDIATE(copy(s_value)); | |
3569 | std::string rs = GPR(copy(rs_value)); | |
3570 | ||
3571 | return img::format("CACHEE %s, %s(%s)", op, s, rs); | |
3572 | } | |
3573 | ||
3574 | ||
3575 | /* | |
3576 | * | |
3577 | * | |
3578 | * 3 2 1 | |
3579 | * 10987654321098765432109876543210 | |
3580 | * 001000 x1110000101 | |
3581 | * rt ----- | |
3582 | * rs ----- | |
3583 | * rd ----- | |
3584 | */ | |
3585 | std::string NMD::CEIL_L_D(uint64 instruction) | |
3586 | { | |
17ce2f00 | 3587 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 3588 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 AM |
3589 | |
3590 | std::string ft = FPR(copy(ft_value)); | |
3591 | std::string fs = FPR(copy(fs_value)); | |
3592 | ||
3593 | return img::format("CEIL.L.D %s, %s", ft, fs); | |
3594 | } | |
3595 | ||
3596 | ||
3597 | /* | |
3598 | * | |
3599 | * | |
3600 | * 3 2 1 | |
3601 | * 10987654321098765432109876543210 | |
3602 | * 001000 x1110000101 | |
3603 | * rt ----- | |
3604 | * rs ----- | |
3605 | * rd ----- | |
3606 | */ | |
3607 | std::string NMD::CEIL_L_S(uint64 instruction) | |
3608 | { | |
17ce2f00 | 3609 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 3610 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 AM |
3611 | |
3612 | std::string ft = FPR(copy(ft_value)); | |
3613 | std::string fs = FPR(copy(fs_value)); | |
3614 | ||
3615 | return img::format("CEIL.L.S %s, %s", ft, fs); | |
3616 | } | |
3617 | ||
3618 | ||
3619 | /* | |
3620 | * | |
3621 | * | |
3622 | * 3 2 1 | |
3623 | * 10987654321098765432109876543210 | |
3624 | * 001000 x1110000101 | |
3625 | * rt ----- | |
3626 | * rs ----- | |
3627 | * rd ----- | |
3628 | */ | |
3629 | std::string NMD::CEIL_W_D(uint64 instruction) | |
3630 | { | |
17ce2f00 | 3631 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 3632 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 AM |
3633 | |
3634 | std::string ft = FPR(copy(ft_value)); | |
3635 | std::string fs = FPR(copy(fs_value)); | |
3636 | ||
3637 | return img::format("CEIL.W.D %s, %s", ft, fs); | |
3638 | } | |
3639 | ||
3640 | ||
3641 | /* | |
3642 | * | |
3643 | * | |
3644 | * 3 2 1 | |
3645 | * 10987654321098765432109876543210 | |
3646 | * 001000 x1110000101 | |
3647 | * rt ----- | |
3648 | * rs ----- | |
3649 | * rd ----- | |
3650 | */ | |
3651 | std::string NMD::CEIL_W_S(uint64 instruction) | |
3652 | { | |
17ce2f00 | 3653 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 3654 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 AM |
3655 | |
3656 | std::string ft = FPR(copy(ft_value)); | |
3657 | std::string fs = FPR(copy(fs_value)); | |
3658 | ||
3659 | return img::format("CEIL.W.S %s, %s", ft, fs); | |
3660 | } | |
3661 | ||
3662 | ||
3663 | /* | |
3664 | * | |
3665 | * | |
3666 | * 3 2 1 | |
3667 | * 10987654321098765432109876543210 | |
3668 | * 001000 x1110000101 | |
3669 | * rt ----- | |
3670 | * rs ----- | |
3671 | * rd ----- | |
3672 | */ | |
3673 | std::string NMD::CFC1(uint64 instruction) | |
3674 | { | |
89a955e8 | 3675 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); |
86b5f803 | 3676 | uint64 cs_value = extract_cs_20_19_18_17_16(instruction); |
89a955e8 AM |
3677 | |
3678 | std::string rt = GPR(copy(rt_value)); | |
3679 | std::string cs = CPR(copy(cs_value)); | |
3680 | ||
3681 | return img::format("CFC1 %s, %s", rt, cs); | |
3682 | } | |
3683 | ||
3684 | ||
3685 | /* | |
3686 | * | |
3687 | * | |
3688 | * 3 2 1 | |
3689 | * 10987654321098765432109876543210 | |
3690 | * 001000 x1110000101 | |
3691 | * rt ----- | |
3692 | * rs ----- | |
3693 | * rd ----- | |
3694 | */ | |
3695 | std::string NMD::CFC2(uint64 instruction) | |
3696 | { | |
89a955e8 | 3697 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); |
86b5f803 | 3698 | uint64 cs_value = extract_cs_20_19_18_17_16(instruction); |
89a955e8 AM |
3699 | |
3700 | std::string rt = GPR(copy(rt_value)); | |
3701 | std::string cs = CPR(copy(cs_value)); | |
3702 | ||
3703 | return img::format("CFC2 %s, %s", rt, cs); | |
3704 | } | |
3705 | ||
3706 | ||
3707 | /* | |
3708 | * | |
3709 | * | |
3710 | * 3 2 1 | |
3711 | * 10987654321098765432109876543210 | |
3712 | * 001000 x1110000101 | |
3713 | * rt ----- | |
3714 | * rs ----- | |
3715 | * rd ----- | |
3716 | */ | |
3717 | std::string NMD::CLASS_D(uint64 instruction) | |
3718 | { | |
17ce2f00 | 3719 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 3720 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 AM |
3721 | |
3722 | std::string ft = FPR(copy(ft_value)); | |
3723 | std::string fs = FPR(copy(fs_value)); | |
3724 | ||
3725 | return img::format("CLASS.D %s, %s", ft, fs); | |
3726 | } | |
3727 | ||
3728 | ||
3729 | /* | |
3730 | * | |
3731 | * | |
3732 | * 3 2 1 | |
3733 | * 10987654321098765432109876543210 | |
3734 | * 001000 x1110000101 | |
3735 | * rt ----- | |
3736 | * rs ----- | |
3737 | * rd ----- | |
3738 | */ | |
3739 | std::string NMD::CLASS_S(uint64 instruction) | |
3740 | { | |
17ce2f00 | 3741 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 3742 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 AM |
3743 | |
3744 | std::string ft = FPR(copy(ft_value)); | |
3745 | std::string fs = FPR(copy(fs_value)); | |
3746 | ||
3747 | return img::format("CLASS.S %s, %s", ft, fs); | |
3748 | } | |
3749 | ||
3750 | ||
3751 | /* | |
3752 | * | |
3753 | * | |
3754 | * 3 2 1 | |
3755 | * 10987654321098765432109876543210 | |
3756 | * 001000 x1110000101 | |
3757 | * rt ----- | |
3758 | * rs ----- | |
3759 | * rd ----- | |
3760 | */ | |
3761 | std::string NMD::CLO(uint64 instruction) | |
3762 | { | |
3763 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
3764 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
3765 | ||
3766 | std::string rt = GPR(copy(rt_value)); | |
3767 | std::string rs = GPR(copy(rs_value)); | |
3768 | ||
3769 | return img::format("CLO %s, %s", rt, rs); | |
3770 | } | |
3771 | ||
3772 | ||
3773 | /* | |
3774 | * | |
3775 | * | |
3776 | * 3 2 1 | |
3777 | * 10987654321098765432109876543210 | |
3778 | * 001000 x1110000101 | |
3779 | * rt ----- | |
3780 | * rs ----- | |
3781 | * rd ----- | |
3782 | */ | |
3783 | std::string NMD::CLZ(uint64 instruction) | |
3784 | { | |
3785 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
3786 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
3787 | ||
3788 | std::string rt = GPR(copy(rt_value)); | |
3789 | std::string rs = GPR(copy(rs_value)); | |
3790 | ||
3791 | return img::format("CLZ %s, %s", rt, rs); | |
3792 | } | |
3793 | ||
3794 | ||
3795 | /* | |
3796 | * | |
3797 | * | |
3798 | * 3 2 1 | |
3799 | * 10987654321098765432109876543210 | |
3800 | * 001000 x1110000101 | |
3801 | * rt ----- | |
3802 | * rs ----- | |
3803 | * rd ----- | |
3804 | */ | |
3805 | std::string NMD::CMP_AF_D(uint64 instruction) | |
3806 | { | |
17ce2f00 | 3807 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 3808 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 3809 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 AM |
3810 | |
3811 | std::string fd = FPR(copy(fd_value)); | |
3812 | std::string fs = FPR(copy(fs_value)); | |
3813 | std::string ft = FPR(copy(ft_value)); | |
3814 | ||
3815 | return img::format("CMP.AF.D %s, %s, %s", fd, fs, ft); | |
3816 | } | |
3817 | ||
3818 | ||
3819 | /* | |
3820 | * | |
3821 | * | |
3822 | * 3 2 1 | |
3823 | * 10987654321098765432109876543210 | |
3824 | * 001000 x1110000101 | |
3825 | * rt ----- | |
3826 | * rs ----- | |
3827 | * rd ----- | |
3828 | */ | |
3829 | std::string NMD::CMP_AF_S(uint64 instruction) | |
3830 | { | |
17ce2f00 | 3831 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 3832 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 3833 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 AM |
3834 | |
3835 | std::string fd = FPR(copy(fd_value)); | |
3836 | std::string fs = FPR(copy(fs_value)); | |
3837 | std::string ft = FPR(copy(ft_value)); | |
3838 | ||
3839 | return img::format("CMP.AF.S %s, %s, %s", fd, fs, ft); | |
3840 | } | |
3841 | ||
3842 | ||
3843 | /* | |
3844 | * | |
3845 | * | |
3846 | * 3 2 1 | |
3847 | * 10987654321098765432109876543210 | |
3848 | * 001000 x1110000101 | |
3849 | * rt ----- | |
3850 | * rs ----- | |
3851 | * rd ----- | |
3852 | */ | |
3853 | std::string NMD::CMP_EQ_D(uint64 instruction) | |
3854 | { | |
17ce2f00 | 3855 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 3856 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 3857 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 AM |
3858 | |
3859 | std::string fd = FPR(copy(fd_value)); | |
3860 | std::string fs = FPR(copy(fs_value)); | |
3861 | std::string ft = FPR(copy(ft_value)); | |
3862 | ||
3863 | return img::format("CMP.EQ.D %s, %s, %s", fd, fs, ft); | |
3864 | } | |
3865 | ||
3866 | ||
3867 | /* | |
3868 | * | |
3869 | * | |
3870 | * 3 2 1 | |
3871 | * 10987654321098765432109876543210 | |
3872 | * 001000 x1110000101 | |
3873 | * rt ----- | |
3874 | * rs ----- | |
3875 | * rd ----- | |
3876 | */ | |
3877 | std::string NMD::CMP_EQ_PH(uint64 instruction) | |
3878 | { | |
3879 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
3880 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
3881 | ||
3882 | std::string rs = GPR(copy(rs_value)); | |
3883 | std::string rt = GPR(copy(rt_value)); | |
3884 | ||
3885 | return img::format("CMP.EQ.PH %s, %s", rs, rt); | |
3886 | } | |
3887 | ||
3888 | ||
3889 | /* | |
3890 | * | |
3891 | * | |
3892 | * 3 2 1 | |
3893 | * 10987654321098765432109876543210 | |
3894 | * 001000 x1110000101 | |
3895 | * rt ----- | |
3896 | * rs ----- | |
3897 | * rd ----- | |
3898 | */ | |
3899 | std::string NMD::CMP_EQ_S(uint64 instruction) | |
3900 | { | |
17ce2f00 | 3901 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 3902 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 3903 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 AM |
3904 | |
3905 | std::string fd = FPR(copy(fd_value)); | |
3906 | std::string fs = FPR(copy(fs_value)); | |
3907 | std::string ft = FPR(copy(ft_value)); | |
3908 | ||
3909 | return img::format("CMP.EQ.S %s, %s, %s", fd, fs, ft); | |
3910 | } | |
3911 | ||
3912 | ||
3913 | /* | |
3914 | * | |
3915 | * | |
3916 | * 3 2 1 | |
3917 | * 10987654321098765432109876543210 | |
3918 | * 001000 x1110000101 | |
3919 | * rt ----- | |
3920 | * rs ----- | |
3921 | * rd ----- | |
3922 | */ | |
3923 | std::string NMD::CMP_LE_D(uint64 instruction) | |
3924 | { | |
17ce2f00 | 3925 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 3926 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 3927 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 AM |
3928 | |
3929 | std::string fd = FPR(copy(fd_value)); | |
3930 | std::string fs = FPR(copy(fs_value)); | |
3931 | std::string ft = FPR(copy(ft_value)); | |
3932 | ||
3933 | return img::format("CMP.LE.D %s, %s, %s", fd, fs, ft); | |
3934 | } | |
3935 | ||
3936 | ||
3937 | /* | |
3938 | * | |
3939 | * | |
3940 | * 3 2 1 | |
3941 | * 10987654321098765432109876543210 | |
3942 | * 001000 x1110000101 | |
3943 | * rt ----- | |
3944 | * rs ----- | |
3945 | * rd ----- | |
3946 | */ | |
3947 | std::string NMD::CMP_LE_PH(uint64 instruction) | |
3948 | { | |
3949 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
3950 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
3951 | ||
3952 | std::string rs = GPR(copy(rs_value)); | |
3953 | std::string rt = GPR(copy(rt_value)); | |
3954 | ||
3955 | return img::format("CMP.LE.PH %s, %s", rs, rt); | |
3956 | } | |
3957 | ||
3958 | ||
3959 | /* | |
3960 | * | |
3961 | * | |
3962 | * 3 2 1 | |
3963 | * 10987654321098765432109876543210 | |
3964 | * 001000 x1110000101 | |
3965 | * rt ----- | |
3966 | * rs ----- | |
3967 | * rd ----- | |
3968 | */ | |
3969 | std::string NMD::CMP_LE_S(uint64 instruction) | |
3970 | { | |
17ce2f00 | 3971 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 3972 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 3973 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 AM |
3974 | |
3975 | std::string fd = FPR(copy(fd_value)); | |
3976 | std::string fs = FPR(copy(fs_value)); | |
3977 | std::string ft = FPR(copy(ft_value)); | |
3978 | ||
3979 | return img::format("CMP.LE.S %s, %s, %s", fd, fs, ft); | |
3980 | } | |
3981 | ||
3982 | ||
3983 | /* | |
3984 | * | |
3985 | * | |
3986 | * 3 2 1 | |
3987 | * 10987654321098765432109876543210 | |
3988 | * 001000 x1110000101 | |
3989 | * rt ----- | |
3990 | * rs ----- | |
3991 | * rd ----- | |
3992 | */ | |
3993 | std::string NMD::CMP_LT_D(uint64 instruction) | |
3994 | { | |
17ce2f00 | 3995 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 3996 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 3997 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 AM |
3998 | |
3999 | std::string fd = FPR(copy(fd_value)); | |
4000 | std::string fs = FPR(copy(fs_value)); | |
4001 | std::string ft = FPR(copy(ft_value)); | |
4002 | ||
4003 | return img::format("CMP.LT.D %s, %s, %s", fd, fs, ft); | |
4004 | } | |
4005 | ||
4006 | ||
4007 | /* | |
4008 | * | |
4009 | * | |
4010 | * 3 2 1 | |
4011 | * 10987654321098765432109876543210 | |
4012 | * 001000 x1110000101 | |
4013 | * rt ----- | |
4014 | * rs ----- | |
4015 | * rd ----- | |
4016 | */ | |
4017 | std::string NMD::CMP_LT_PH(uint64 instruction) | |
4018 | { | |
4019 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
4020 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
4021 | ||
4022 | std::string rs = GPR(copy(rs_value)); | |
4023 | std::string rt = GPR(copy(rt_value)); | |
4024 | ||
4025 | return img::format("CMP.LT.PH %s, %s", rs, rt); | |
4026 | } | |
4027 | ||
4028 | ||
4029 | /* | |
4030 | * | |
4031 | * | |
4032 | * 3 2 1 | |
4033 | * 10987654321098765432109876543210 | |
4034 | * 001000 x1110000101 | |
4035 | * rt ----- | |
4036 | * rs ----- | |
4037 | * rd ----- | |
4038 | */ | |
4039 | std::string NMD::CMP_LT_S(uint64 instruction) | |
4040 | { | |
17ce2f00 | 4041 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 4042 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 4043 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 AM |
4044 | |
4045 | std::string fd = FPR(copy(fd_value)); | |
4046 | std::string fs = FPR(copy(fs_value)); | |
4047 | std::string ft = FPR(copy(ft_value)); | |
4048 | ||
4049 | return img::format("CMP.LT.S %s, %s, %s", fd, fs, ft); | |
4050 | } | |
4051 | ||
4052 | ||
4053 | /* | |
4054 | * | |
4055 | * | |
4056 | * 3 2 1 | |
4057 | * 10987654321098765432109876543210 | |
4058 | * 001000 x1110000101 | |
4059 | * rt ----- | |
4060 | * rs ----- | |
4061 | * rd ----- | |
4062 | */ | |
4063 | std::string NMD::CMP_NE_D(uint64 instruction) | |
4064 | { | |
17ce2f00 | 4065 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 4066 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 4067 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 AM |
4068 | |
4069 | std::string fd = FPR(copy(fd_value)); | |
4070 | std::string fs = FPR(copy(fs_value)); | |
4071 | std::string ft = FPR(copy(ft_value)); | |
4072 | ||
4073 | return img::format("CMP.NE.D %s, %s, %s", fd, fs, ft); | |
4074 | } | |
4075 | ||
4076 | ||
4077 | /* | |
4078 | * | |
4079 | * | |
4080 | * 3 2 1 | |
4081 | * 10987654321098765432109876543210 | |
4082 | * 001000 x1110000101 | |
4083 | * rt ----- | |
4084 | * rs ----- | |
4085 | * rd ----- | |
4086 | */ | |
4087 | std::string NMD::CMP_NE_S(uint64 instruction) | |
4088 | { | |
17ce2f00 | 4089 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 4090 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 4091 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 AM |
4092 | |
4093 | std::string fd = FPR(copy(fd_value)); | |
4094 | std::string fs = FPR(copy(fs_value)); | |
4095 | std::string ft = FPR(copy(ft_value)); | |
4096 | ||
4097 | return img::format("CMP.NE.S %s, %s, %s", fd, fs, ft); | |
4098 | } | |
4099 | ||
4100 | ||
4101 | /* | |
4102 | * | |
4103 | * | |
4104 | * 3 2 1 | |
4105 | * 10987654321098765432109876543210 | |
4106 | * 001000 x1110000101 | |
4107 | * rt ----- | |
4108 | * rs ----- | |
4109 | * rd ----- | |
4110 | */ | |
4111 | std::string NMD::CMP_OR_D(uint64 instruction) | |
4112 | { | |
17ce2f00 | 4113 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 4114 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 4115 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 AM |
4116 | |
4117 | std::string fd = FPR(copy(fd_value)); | |
4118 | std::string fs = FPR(copy(fs_value)); | |
4119 | std::string ft = FPR(copy(ft_value)); | |
4120 | ||
4121 | return img::format("CMP.OR.D %s, %s, %s", fd, fs, ft); | |
4122 | } | |
4123 | ||
4124 | ||
4125 | /* | |
4126 | * | |
4127 | * | |
4128 | * 3 2 1 | |
4129 | * 10987654321098765432109876543210 | |
4130 | * 001000 x1110000101 | |
4131 | * rt ----- | |
4132 | * rs ----- | |
4133 | * rd ----- | |
4134 | */ | |
4135 | std::string NMD::CMP_OR_S(uint64 instruction) | |
4136 | { | |
17ce2f00 | 4137 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 4138 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 4139 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 AM |
4140 | |
4141 | std::string fd = FPR(copy(fd_value)); | |
4142 | std::string fs = FPR(copy(fs_value)); | |
4143 | std::string ft = FPR(copy(ft_value)); | |
4144 | ||
4145 | return img::format("CMP.OR.S %s, %s, %s", fd, fs, ft); | |
4146 | } | |
4147 | ||
4148 | ||
4149 | /* | |
4150 | * | |
4151 | * | |
4152 | * 3 2 1 | |
4153 | * 10987654321098765432109876543210 | |
4154 | * 001000 x1110000101 | |
4155 | * rt ----- | |
4156 | * rs ----- | |
4157 | * rd ----- | |
4158 | */ | |
4159 | std::string NMD::CMP_SAF_D(uint64 instruction) | |
4160 | { | |
17ce2f00 | 4161 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 4162 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 4163 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 AM |
4164 | |
4165 | std::string fd = FPR(copy(fd_value)); | |
4166 | std::string fs = FPR(copy(fs_value)); | |
4167 | std::string ft = FPR(copy(ft_value)); | |
4168 | ||
4169 | return img::format("CMP.SAF.D %s, %s, %s", fd, fs, ft); | |
4170 | } | |
4171 | ||
4172 | ||
4173 | /* | |
4174 | * | |
4175 | * | |
4176 | * 3 2 1 | |
4177 | * 10987654321098765432109876543210 | |
4178 | * 001000 x1110000101 | |
4179 | * rt ----- | |
4180 | * rs ----- | |
4181 | * rd ----- | |
4182 | */ | |
4183 | std::string NMD::CMP_SAF_S(uint64 instruction) | |
4184 | { | |
17ce2f00 | 4185 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 4186 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 4187 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 AM |
4188 | |
4189 | std::string fd = FPR(copy(fd_value)); | |
4190 | std::string fs = FPR(copy(fs_value)); | |
4191 | std::string ft = FPR(copy(ft_value)); | |
4192 | ||
4193 | return img::format("CMP.SAF.S %s, %s, %s", fd, fs, ft); | |
4194 | } | |
4195 | ||
4196 | ||
4197 | /* | |
4198 | * | |
4199 | * | |
4200 | * 3 2 1 | |
4201 | * 10987654321098765432109876543210 | |
4202 | * 001000 x1110000101 | |
4203 | * rt ----- | |
4204 | * rs ----- | |
4205 | * rd ----- | |
4206 | */ | |
4207 | std::string NMD::CMP_SEQ_D(uint64 instruction) | |
4208 | { | |
17ce2f00 | 4209 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 4210 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 4211 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 AM |
4212 | |
4213 | std::string fd = FPR(copy(fd_value)); | |
4214 | std::string fs = FPR(copy(fs_value)); | |
4215 | std::string ft = FPR(copy(ft_value)); | |
4216 | ||
4217 | return img::format("CMP.SEQ.D %s, %s, %s", fd, fs, ft); | |
4218 | } | |
4219 | ||
4220 | ||
4221 | /* | |
4222 | * | |
4223 | * | |
4224 | * 3 2 1 | |
4225 | * 10987654321098765432109876543210 | |
4226 | * 001000 x1110000101 | |
4227 | * rt ----- | |
4228 | * rs ----- | |
4229 | * rd ----- | |
4230 | */ | |
4231 | std::string NMD::CMP_SEQ_S(uint64 instruction) | |
4232 | { | |
17ce2f00 | 4233 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 4234 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 4235 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 AM |
4236 | |
4237 | std::string fd = FPR(copy(fd_value)); | |
4238 | std::string fs = FPR(copy(fs_value)); | |
4239 | std::string ft = FPR(copy(ft_value)); | |
4240 | ||
4241 | return img::format("CMP.SEQ.S %s, %s, %s", fd, fs, ft); | |
4242 | } | |
4243 | ||
4244 | ||
4245 | /* | |
4246 | * | |
4247 | * | |
4248 | * 3 2 1 | |
4249 | * 10987654321098765432109876543210 | |
4250 | * 001000 x1110000101 | |
4251 | * rt ----- | |
4252 | * rs ----- | |
4253 | * rd ----- | |
4254 | */ | |
4255 | std::string NMD::CMP_SLE_D(uint64 instruction) | |
4256 | { | |
17ce2f00 | 4257 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 4258 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 4259 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 AM |
4260 | |
4261 | std::string fd = FPR(copy(fd_value)); | |
4262 | std::string fs = FPR(copy(fs_value)); | |
4263 | std::string ft = FPR(copy(ft_value)); | |
4264 | ||
4265 | return img::format("CMP.SLE.D %s, %s, %s", fd, fs, ft); | |
4266 | } | |
4267 | ||
4268 | ||
4269 | /* | |
4270 | * | |
4271 | * | |
4272 | * 3 2 1 | |
4273 | * 10987654321098765432109876543210 | |
4274 | * 001000 x1110000101 | |
4275 | * rt ----- | |
4276 | * rs ----- | |
4277 | * rd ----- | |
4278 | */ | |
4279 | std::string NMD::CMP_SLE_S(uint64 instruction) | |
4280 | { | |
17ce2f00 | 4281 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 4282 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 4283 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 AM |
4284 | |
4285 | std::string fd = FPR(copy(fd_value)); | |
4286 | std::string fs = FPR(copy(fs_value)); | |
4287 | std::string ft = FPR(copy(ft_value)); | |
4288 | ||
4289 | return img::format("CMP.SLE.S %s, %s, %s", fd, fs, ft); | |
4290 | } | |
4291 | ||
4292 | ||
4293 | /* | |
4294 | * | |
4295 | * | |
4296 | * 3 2 1 | |
4297 | * 10987654321098765432109876543210 | |
4298 | * 001000 x1110000101 | |
4299 | * rt ----- | |
4300 | * rs ----- | |
4301 | * rd ----- | |
4302 | */ | |
4303 | std::string NMD::CMP_SLT_D(uint64 instruction) | |
4304 | { | |
17ce2f00 | 4305 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 4306 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 4307 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 AM |
4308 | |
4309 | std::string fd = FPR(copy(fd_value)); | |
4310 | std::string fs = FPR(copy(fs_value)); | |
4311 | std::string ft = FPR(copy(ft_value)); | |
4312 | ||
4313 | return img::format("CMP.SLT.D %s, %s, %s", fd, fs, ft); | |
4314 | } | |
4315 | ||
4316 | ||
4317 | /* | |
4318 | * | |
4319 | * | |
4320 | * 3 2 1 | |
4321 | * 10987654321098765432109876543210 | |
4322 | * 001000 x1110000101 | |
4323 | * rt ----- | |
4324 | * rs ----- | |
4325 | * rd ----- | |
4326 | */ | |
4327 | std::string NMD::CMP_SLT_S(uint64 instruction) | |
4328 | { | |
17ce2f00 | 4329 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 4330 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 4331 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 AM |
4332 | |
4333 | std::string fd = FPR(copy(fd_value)); | |
4334 | std::string fs = FPR(copy(fs_value)); | |
4335 | std::string ft = FPR(copy(ft_value)); | |
4336 | ||
4337 | return img::format("CMP.SLT.S %s, %s, %s", fd, fs, ft); | |
4338 | } | |
4339 | ||
4340 | ||
4341 | /* | |
4342 | * | |
4343 | * | |
4344 | * 3 2 1 | |
4345 | * 10987654321098765432109876543210 | |
4346 | * 001000 x1110000101 | |
4347 | * rt ----- | |
4348 | * rs ----- | |
4349 | * rd ----- | |
4350 | */ | |
4351 | std::string NMD::CMP_SNE_D(uint64 instruction) | |
4352 | { | |
17ce2f00 | 4353 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 4354 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 4355 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 AM |
4356 | |
4357 | std::string fd = FPR(copy(fd_value)); | |
4358 | std::string fs = FPR(copy(fs_value)); | |
4359 | std::string ft = FPR(copy(ft_value)); | |
4360 | ||
4361 | return img::format("CMP.SNE.D %s, %s, %s", fd, fs, ft); | |
4362 | } | |
4363 | ||
4364 | ||
4365 | /* | |
4366 | * | |
4367 | * | |
4368 | * 3 2 1 | |
4369 | * 10987654321098765432109876543210 | |
4370 | * 001000 x1110000101 | |
4371 | * rt ----- | |
4372 | * rs ----- | |
4373 | * rd ----- | |
4374 | */ | |
4375 | std::string NMD::CMP_SNE_S(uint64 instruction) | |
4376 | { | |
17ce2f00 | 4377 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 4378 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 4379 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 AM |
4380 | |
4381 | std::string fd = FPR(copy(fd_value)); | |
4382 | std::string fs = FPR(copy(fs_value)); | |
4383 | std::string ft = FPR(copy(ft_value)); | |
4384 | ||
4385 | return img::format("CMP.SNE.S %s, %s, %s", fd, fs, ft); | |
4386 | } | |
4387 | ||
4388 | ||
4389 | /* | |
4390 | * | |
4391 | * | |
4392 | * 3 2 1 | |
4393 | * 10987654321098765432109876543210 | |
4394 | * 001000 x1110000101 | |
4395 | * rt ----- | |
4396 | * rs ----- | |
4397 | * rd ----- | |
4398 | */ | |
4399 | std::string NMD::CMP_SOR_D(uint64 instruction) | |
4400 | { | |
17ce2f00 | 4401 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 4402 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 4403 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 AM |
4404 | |
4405 | std::string fd = FPR(copy(fd_value)); | |
4406 | std::string fs = FPR(copy(fs_value)); | |
4407 | std::string ft = FPR(copy(ft_value)); | |
4408 | ||
4409 | return img::format("CMP.SOR.D %s, %s, %s", fd, fs, ft); | |
4410 | } | |
4411 | ||
4412 | ||
4413 | /* | |
4414 | * | |
4415 | * | |
4416 | * 3 2 1 | |
4417 | * 10987654321098765432109876543210 | |
4418 | * 001000 x1110000101 | |
4419 | * rt ----- | |
4420 | * rs ----- | |
4421 | * rd ----- | |
4422 | */ | |
4423 | std::string NMD::CMP_SOR_S(uint64 instruction) | |
4424 | { | |
17ce2f00 | 4425 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 4426 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 4427 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 AM |
4428 | |
4429 | std::string fd = FPR(copy(fd_value)); | |
4430 | std::string fs = FPR(copy(fs_value)); | |
4431 | std::string ft = FPR(copy(ft_value)); | |
4432 | ||
4433 | return img::format("CMP.SOR.S %s, %s, %s", fd, fs, ft); | |
4434 | } | |
4435 | ||
4436 | ||
4437 | /* | |
4438 | * | |
4439 | * | |
4440 | * 3 2 1 | |
4441 | * 10987654321098765432109876543210 | |
4442 | * 001000 x1110000101 | |
4443 | * rt ----- | |
4444 | * rs ----- | |
4445 | * rd ----- | |
4446 | */ | |
4447 | std::string NMD::CMP_SUEQ_D(uint64 instruction) | |
4448 | { | |
17ce2f00 | 4449 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 4450 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 4451 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 AM |
4452 | |
4453 | std::string fd = FPR(copy(fd_value)); | |
4454 | std::string fs = FPR(copy(fs_value)); | |
4455 | std::string ft = FPR(copy(ft_value)); | |
4456 | ||
4457 | return img::format("CMP.SUEQ.D %s, %s, %s", fd, fs, ft); | |
4458 | } | |
4459 | ||
4460 | ||
4461 | /* | |
4462 | * | |
4463 | * | |
4464 | * 3 2 1 | |
4465 | * 10987654321098765432109876543210 | |
4466 | * 001000 x1110000101 | |
4467 | * rt ----- | |
4468 | * rs ----- | |
4469 | * rd ----- | |
4470 | */ | |
4471 | std::string NMD::CMP_SUEQ_S(uint64 instruction) | |
4472 | { | |
17ce2f00 | 4473 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 4474 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 4475 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 AM |
4476 | |
4477 | std::string fd = FPR(copy(fd_value)); | |
4478 | std::string fs = FPR(copy(fs_value)); | |
4479 | std::string ft = FPR(copy(ft_value)); | |
4480 | ||
4481 | return img::format("CMP.SUEQ.S %s, %s, %s", fd, fs, ft); | |
4482 | } | |
4483 | ||
4484 | ||
4485 | /* | |
4486 | * | |
4487 | * | |
4488 | * 3 2 1 | |
4489 | * 10987654321098765432109876543210 | |
4490 | * 001000 x1110000101 | |
4491 | * rt ----- | |
4492 | * rs ----- | |
4493 | * rd ----- | |
4494 | */ | |
4495 | std::string NMD::CMP_SULE_D(uint64 instruction) | |
4496 | { | |
17ce2f00 | 4497 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 4498 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 4499 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 AM |
4500 | |
4501 | std::string fd = FPR(copy(fd_value)); | |
4502 | std::string fs = FPR(copy(fs_value)); | |
4503 | std::string ft = FPR(copy(ft_value)); | |
4504 | ||
4505 | return img::format("CMP.SULE.D %s, %s, %s", fd, fs, ft); | |
4506 | } | |
4507 | ||
4508 | ||
4509 | /* | |
4510 | * | |
4511 | * | |
4512 | * 3 2 1 | |
4513 | * 10987654321098765432109876543210 | |
4514 | * 001000 x1110000101 | |
4515 | * rt ----- | |
4516 | * rs ----- | |
4517 | * rd ----- | |
4518 | */ | |
4519 | std::string NMD::CMP_SULE_S(uint64 instruction) | |
4520 | { | |
17ce2f00 | 4521 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 4522 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 4523 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 AM |
4524 | |
4525 | std::string fd = FPR(copy(fd_value)); | |
4526 | std::string fs = FPR(copy(fs_value)); | |
4527 | std::string ft = FPR(copy(ft_value)); | |
4528 | ||
4529 | return img::format("CMP.SULE.S %s, %s, %s", fd, fs, ft); | |
4530 | } | |
4531 | ||
4532 | ||
4533 | /* | |
4534 | * | |
4535 | * | |
4536 | * 3 2 1 | |
4537 | * 10987654321098765432109876543210 | |
4538 | * 001000 x1110000101 | |
4539 | * rt ----- | |
4540 | * rs ----- | |
4541 | * rd ----- | |
4542 | */ | |
4543 | std::string NMD::CMP_SULT_D(uint64 instruction) | |
4544 | { | |
17ce2f00 | 4545 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 4546 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 4547 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 AM |
4548 | |
4549 | std::string fd = FPR(copy(fd_value)); | |
4550 | std::string fs = FPR(copy(fs_value)); | |
4551 | std::string ft = FPR(copy(ft_value)); | |
4552 | ||
4553 | return img::format("CMP.SULT.D %s, %s, %s", fd, fs, ft); | |
4554 | } | |
4555 | ||
4556 | ||
4557 | /* | |
4558 | * | |
4559 | * | |
4560 | * 3 2 1 | |
4561 | * 10987654321098765432109876543210 | |
4562 | * 001000 x1110000101 | |
4563 | * rt ----- | |
4564 | * rs ----- | |
4565 | * rd ----- | |
4566 | */ | |
4567 | std::string NMD::CMP_SULT_S(uint64 instruction) | |
4568 | { | |
17ce2f00 | 4569 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 4570 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 4571 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 AM |
4572 | |
4573 | std::string fd = FPR(copy(fd_value)); | |
4574 | std::string fs = FPR(copy(fs_value)); | |
4575 | std::string ft = FPR(copy(ft_value)); | |
4576 | ||
4577 | return img::format("CMP.SULT.S %s, %s, %s", fd, fs, ft); | |
4578 | } | |
4579 | ||
4580 | ||
4581 | /* | |
4582 | * | |
4583 | * | |
4584 | * 3 2 1 | |
4585 | * 10987654321098765432109876543210 | |
4586 | * 001000 x1110000101 | |
4587 | * rt ----- | |
4588 | * rs ----- | |
4589 | * rd ----- | |
4590 | */ | |
4591 | std::string NMD::CMP_SUN_D(uint64 instruction) | |
4592 | { | |
17ce2f00 | 4593 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 4594 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 4595 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 AM |
4596 | |
4597 | std::string fd = FPR(copy(fd_value)); | |
4598 | std::string fs = FPR(copy(fs_value)); | |
4599 | std::string ft = FPR(copy(ft_value)); | |
4600 | ||
4601 | return img::format("CMP.SUN.D %s, %s, %s", fd, fs, ft); | |
4602 | } | |
4603 | ||
4604 | ||
4605 | /* | |
4606 | * | |
4607 | * | |
4608 | * 3 2 1 | |
4609 | * 10987654321098765432109876543210 | |
4610 | * 001000 x1110000101 | |
4611 | * rt ----- | |
4612 | * rs ----- | |
4613 | * rd ----- | |
4614 | */ | |
4615 | std::string NMD::CMP_SUNE_D(uint64 instruction) | |
4616 | { | |
17ce2f00 | 4617 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 4618 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 4619 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 AM |
4620 | |
4621 | std::string fd = FPR(copy(fd_value)); | |
4622 | std::string fs = FPR(copy(fs_value)); | |
4623 | std::string ft = FPR(copy(ft_value)); | |
4624 | ||
4625 | return img::format("CMP.SUNE.D %s, %s, %s", fd, fs, ft); | |
4626 | } | |
4627 | ||
4628 | ||
4629 | /* | |
4630 | * | |
4631 | * | |
4632 | * 3 2 1 | |
4633 | * 10987654321098765432109876543210 | |
4634 | * 001000 x1110000101 | |
4635 | * rt ----- | |
4636 | * rs ----- | |
4637 | * rd ----- | |
4638 | */ | |
4639 | std::string NMD::CMP_SUNE_S(uint64 instruction) | |
4640 | { | |
17ce2f00 | 4641 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 4642 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 4643 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 AM |
4644 | |
4645 | std::string fd = FPR(copy(fd_value)); | |
4646 | std::string fs = FPR(copy(fs_value)); | |
4647 | std::string ft = FPR(copy(ft_value)); | |
4648 | ||
4649 | return img::format("CMP.SUNE.S %s, %s, %s", fd, fs, ft); | |
4650 | } | |
4651 | ||
4652 | ||
4653 | /* | |
4654 | * | |
4655 | * | |
4656 | * 3 2 1 | |
4657 | * 10987654321098765432109876543210 | |
4658 | * 001000 x1110000101 | |
4659 | * rt ----- | |
4660 | * rs ----- | |
4661 | * rd ----- | |
4662 | */ | |
4663 | std::string NMD::CMP_SUN_S(uint64 instruction) | |
4664 | { | |
17ce2f00 | 4665 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 4666 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 4667 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 AM |
4668 | |
4669 | std::string fd = FPR(copy(fd_value)); | |
4670 | std::string fs = FPR(copy(fs_value)); | |
4671 | std::string ft = FPR(copy(ft_value)); | |
4672 | ||
4673 | return img::format("CMP.SUN.S %s, %s, %s", fd, fs, ft); | |
4674 | } | |
4675 | ||
4676 | ||
4677 | /* | |
4678 | * | |
4679 | * | |
4680 | * 3 2 1 | |
4681 | * 10987654321098765432109876543210 | |
4682 | * 001000 x1110000101 | |
4683 | * rt ----- | |
4684 | * rs ----- | |
4685 | * rd ----- | |
4686 | */ | |
4687 | std::string NMD::CMP_UEQ_D(uint64 instruction) | |
4688 | { | |
17ce2f00 | 4689 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 4690 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 4691 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 AM |
4692 | |
4693 | std::string fd = FPR(copy(fd_value)); | |
4694 | std::string fs = FPR(copy(fs_value)); | |
4695 | std::string ft = FPR(copy(ft_value)); | |
4696 | ||
4697 | return img::format("CMP.UEQ.D %s, %s, %s", fd, fs, ft); | |
4698 | } | |
4699 | ||
4700 | ||
4701 | /* | |
4702 | * | |
4703 | * | |
4704 | * 3 2 1 | |
4705 | * 10987654321098765432109876543210 | |
4706 | * 001000 x1110000101 | |
4707 | * rt ----- | |
4708 | * rs ----- | |
4709 | * rd ----- | |
4710 | */ | |
4711 | std::string NMD::CMP_UEQ_S(uint64 instruction) | |
4712 | { | |
17ce2f00 | 4713 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 4714 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 4715 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 AM |
4716 | |
4717 | std::string fd = FPR(copy(fd_value)); | |
4718 | std::string fs = FPR(copy(fs_value)); | |
4719 | std::string ft = FPR(copy(ft_value)); | |
4720 | ||
4721 | return img::format("CMP.UEQ.S %s, %s, %s", fd, fs, ft); | |
4722 | } | |
4723 | ||
4724 | ||
4725 | /* | |
4726 | * | |
4727 | * | |
4728 | * 3 2 1 | |
4729 | * 10987654321098765432109876543210 | |
4730 | * 001000 x1110000101 | |
4731 | * rt ----- | |
4732 | * rs ----- | |
4733 | * rd ----- | |
4734 | */ | |
4735 | std::string NMD::CMP_ULE_D(uint64 instruction) | |
4736 | { | |
17ce2f00 | 4737 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 4738 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 4739 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 AM |
4740 | |
4741 | std::string fd = FPR(copy(fd_value)); | |
4742 | std::string fs = FPR(copy(fs_value)); | |
4743 | std::string ft = FPR(copy(ft_value)); | |
4744 | ||
4745 | return img::format("CMP.ULE.D %s, %s, %s", fd, fs, ft); | |
4746 | } | |
4747 | ||
4748 | ||
4749 | /* | |
4750 | * | |
4751 | * | |
4752 | * 3 2 1 | |
4753 | * 10987654321098765432109876543210 | |
4754 | * 001000 x1110000101 | |
4755 | * rt ----- | |
4756 | * rs ----- | |
4757 | * rd ----- | |
4758 | */ | |
4759 | std::string NMD::CMP_ULE_S(uint64 instruction) | |
4760 | { | |
17ce2f00 | 4761 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 4762 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 4763 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 AM |
4764 | |
4765 | std::string fd = FPR(copy(fd_value)); | |
4766 | std::string fs = FPR(copy(fs_value)); | |
4767 | std::string ft = FPR(copy(ft_value)); | |
4768 | ||
4769 | return img::format("CMP.ULE.S %s, %s, %s", fd, fs, ft); | |
4770 | } | |
4771 | ||
4772 | ||
4773 | /* | |
4774 | * | |
4775 | * | |
4776 | * 3 2 1 | |
4777 | * 10987654321098765432109876543210 | |
4778 | * 001000 x1110000101 | |
4779 | * rt ----- | |
4780 | * rs ----- | |
4781 | * rd ----- | |
4782 | */ | |
4783 | std::string NMD::CMP_ULT_D(uint64 instruction) | |
4784 | { | |
17ce2f00 | 4785 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 4786 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 4787 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 AM |
4788 | |
4789 | std::string fd = FPR(copy(fd_value)); | |
4790 | std::string fs = FPR(copy(fs_value)); | |
4791 | std::string ft = FPR(copy(ft_value)); | |
4792 | ||
4793 | return img::format("CMP.ULT.D %s, %s, %s", fd, fs, ft); | |
4794 | } | |
4795 | ||
4796 | ||
4797 | /* | |
4798 | * | |
4799 | * | |
4800 | * 3 2 1 | |
4801 | * 10987654321098765432109876543210 | |
4802 | * 001000 x1110000101 | |
4803 | * rt ----- | |
4804 | * rs ----- | |
4805 | * rd ----- | |
4806 | */ | |
4807 | std::string NMD::CMP_ULT_S(uint64 instruction) | |
4808 | { | |
17ce2f00 | 4809 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 4810 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 4811 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 AM |
4812 | |
4813 | std::string fd = FPR(copy(fd_value)); | |
4814 | std::string fs = FPR(copy(fs_value)); | |
4815 | std::string ft = FPR(copy(ft_value)); | |
4816 | ||
4817 | return img::format("CMP.ULT.S %s, %s, %s", fd, fs, ft); | |
4818 | } | |
4819 | ||
4820 | ||
4821 | /* | |
4822 | * | |
4823 | * | |
4824 | * 3 2 1 | |
4825 | * 10987654321098765432109876543210 | |
4826 | * 001000 x1110000101 | |
4827 | * rt ----- | |
4828 | * rs ----- | |
4829 | * rd ----- | |
4830 | */ | |
4831 | std::string NMD::CMP_UN_D(uint64 instruction) | |
4832 | { | |
17ce2f00 | 4833 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 4834 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 4835 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 AM |
4836 | |
4837 | std::string fd = FPR(copy(fd_value)); | |
4838 | std::string fs = FPR(copy(fs_value)); | |
4839 | std::string ft = FPR(copy(ft_value)); | |
4840 | ||
4841 | return img::format("CMP.UN.D %s, %s, %s", fd, fs, ft); | |
4842 | } | |
4843 | ||
4844 | ||
4845 | /* | |
4846 | * | |
4847 | * | |
4848 | * 3 2 1 | |
4849 | * 10987654321098765432109876543210 | |
4850 | * 001000 x1110000101 | |
4851 | * rt ----- | |
4852 | * rs ----- | |
4853 | * rd ----- | |
4854 | */ | |
4855 | std::string NMD::CMP_UNE_D(uint64 instruction) | |
4856 | { | |
17ce2f00 | 4857 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 4858 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 4859 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 AM |
4860 | |
4861 | std::string fd = FPR(copy(fd_value)); | |
4862 | std::string fs = FPR(copy(fs_value)); | |
4863 | std::string ft = FPR(copy(ft_value)); | |
4864 | ||
4865 | return img::format("CMP.UNE.D %s, %s, %s", fd, fs, ft); | |
4866 | } | |
4867 | ||
4868 | ||
4869 | /* | |
4870 | * | |
4871 | * | |
4872 | * 3 2 1 | |
4873 | * 10987654321098765432109876543210 | |
4874 | * 001000 x1110000101 | |
4875 | * rt ----- | |
4876 | * rs ----- | |
4877 | * rd ----- | |
4878 | */ | |
4879 | std::string NMD::CMP_UNE_S(uint64 instruction) | |
4880 | { | |
17ce2f00 | 4881 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 4882 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 4883 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 AM |
4884 | |
4885 | std::string fd = FPR(copy(fd_value)); | |
4886 | std::string fs = FPR(copy(fs_value)); | |
4887 | std::string ft = FPR(copy(ft_value)); | |
4888 | ||
4889 | return img::format("CMP.UNE.S %s, %s, %s", fd, fs, ft); | |
4890 | } | |
4891 | ||
4892 | ||
4893 | /* | |
4894 | * | |
4895 | * | |
4896 | * 3 2 1 | |
4897 | * 10987654321098765432109876543210 | |
4898 | * 001000 x1110000101 | |
4899 | * rt ----- | |
4900 | * rs ----- | |
4901 | * rd ----- | |
4902 | */ | |
4903 | std::string NMD::CMP_UN_S(uint64 instruction) | |
4904 | { | |
17ce2f00 | 4905 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 4906 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 4907 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 AM |
4908 | |
4909 | std::string fd = FPR(copy(fd_value)); | |
4910 | std::string fs = FPR(copy(fs_value)); | |
4911 | std::string ft = FPR(copy(ft_value)); | |
4912 | ||
4913 | return img::format("CMP.UN.S %s, %s, %s", fd, fs, ft); | |
4914 | } | |
4915 | ||
4916 | ||
4917 | /* | |
4918 | * | |
4919 | * | |
4920 | * 3 2 1 | |
4921 | * 10987654321098765432109876543210 | |
4922 | * 001000 x1110000101 | |
4923 | * rt ----- | |
4924 | * rs ----- | |
4925 | * rd ----- | |
4926 | */ | |
4927 | std::string NMD::CMPGDU_EQ_QB(uint64 instruction) | |
4928 | { | |
4929 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 4930 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 4931 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
4932 | |
4933 | std::string rd = GPR(copy(rd_value)); | |
4934 | std::string rs = GPR(copy(rs_value)); | |
4935 | std::string rt = GPR(copy(rt_value)); | |
4936 | ||
4937 | return img::format("CMPGDU.EQ.QB %s, %s, %s", rd, rs, rt); | |
4938 | } | |
4939 | ||
4940 | ||
4941 | /* | |
4942 | * | |
4943 | * | |
4944 | * 3 2 1 | |
4945 | * 10987654321098765432109876543210 | |
4946 | * 001000 x1110000101 | |
4947 | * rt ----- | |
4948 | * rs ----- | |
4949 | * rd ----- | |
4950 | */ | |
4951 | std::string NMD::CMPGDU_LE_QB(uint64 instruction) | |
4952 | { | |
4953 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 4954 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 4955 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
4956 | |
4957 | std::string rd = GPR(copy(rd_value)); | |
4958 | std::string rs = GPR(copy(rs_value)); | |
4959 | std::string rt = GPR(copy(rt_value)); | |
4960 | ||
4961 | return img::format("CMPGDU.LE.QB %s, %s, %s", rd, rs, rt); | |
4962 | } | |
4963 | ||
4964 | ||
4965 | /* | |
4966 | * | |
4967 | * | |
4968 | * 3 2 1 | |
4969 | * 10987654321098765432109876543210 | |
4970 | * 001000 x1110000101 | |
4971 | * rt ----- | |
4972 | * rs ----- | |
4973 | * rd ----- | |
4974 | */ | |
4975 | std::string NMD::CMPGDU_LT_QB(uint64 instruction) | |
4976 | { | |
4977 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 4978 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 4979 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
4980 | |
4981 | std::string rd = GPR(copy(rd_value)); | |
4982 | std::string rs = GPR(copy(rs_value)); | |
4983 | std::string rt = GPR(copy(rt_value)); | |
4984 | ||
4985 | return img::format("CMPGDU.LT.QB %s, %s, %s", rd, rs, rt); | |
4986 | } | |
4987 | ||
4988 | ||
4989 | /* | |
4990 | * | |
4991 | * | |
4992 | * 3 2 1 | |
4993 | * 10987654321098765432109876543210 | |
4994 | * 001000 x1110000101 | |
4995 | * rt ----- | |
4996 | * rs ----- | |
4997 | * rd ----- | |
4998 | */ | |
4999 | std::string NMD::CMPGU_EQ_QB(uint64 instruction) | |
5000 | { | |
5001 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 5002 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 5003 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
5004 | |
5005 | std::string rd = GPR(copy(rd_value)); | |
5006 | std::string rs = GPR(copy(rs_value)); | |
5007 | std::string rt = GPR(copy(rt_value)); | |
5008 | ||
5009 | return img::format("CMPGU.EQ.QB %s, %s, %s", rd, rs, rt); | |
5010 | } | |
5011 | ||
5012 | ||
5013 | /* | |
5014 | * | |
5015 | * | |
5016 | * 3 2 1 | |
5017 | * 10987654321098765432109876543210 | |
5018 | * 001000 x1110000101 | |
5019 | * rt ----- | |
5020 | * rs ----- | |
5021 | * rd ----- | |
5022 | */ | |
5023 | std::string NMD::CMPGU_LE_QB(uint64 instruction) | |
5024 | { | |
5025 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 5026 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 5027 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
5028 | |
5029 | std::string rd = GPR(copy(rd_value)); | |
5030 | std::string rs = GPR(copy(rs_value)); | |
5031 | std::string rt = GPR(copy(rt_value)); | |
5032 | ||
5033 | return img::format("CMPGU.LE.QB %s, %s, %s", rd, rs, rt); | |
5034 | } | |
5035 | ||
5036 | ||
5037 | /* | |
5038 | * | |
5039 | * | |
5040 | * 3 2 1 | |
5041 | * 10987654321098765432109876543210 | |
5042 | * 001000 x1110000101 | |
5043 | * rt ----- | |
5044 | * rs ----- | |
5045 | * rd ----- | |
5046 | */ | |
5047 | std::string NMD::CMPGU_LT_QB(uint64 instruction) | |
5048 | { | |
5049 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 5050 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 5051 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
5052 | |
5053 | std::string rd = GPR(copy(rd_value)); | |
5054 | std::string rs = GPR(copy(rs_value)); | |
5055 | std::string rt = GPR(copy(rt_value)); | |
5056 | ||
5057 | return img::format("CMPGU.LT.QB %s, %s, %s", rd, rs, rt); | |
5058 | } | |
5059 | ||
5060 | ||
5061 | /* | |
5062 | * | |
5063 | * | |
5064 | * 3 2 1 | |
5065 | * 10987654321098765432109876543210 | |
5066 | * 001000 x1110000101 | |
5067 | * rt ----- | |
5068 | * rs ----- | |
5069 | * rd ----- | |
5070 | */ | |
5071 | std::string NMD::CMPU_EQ_QB(uint64 instruction) | |
5072 | { | |
5073 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
5074 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
5075 | ||
5076 | std::string rs = GPR(copy(rs_value)); | |
5077 | std::string rt = GPR(copy(rt_value)); | |
5078 | ||
5079 | return img::format("CMPU.EQ.QB %s, %s", rs, rt); | |
5080 | } | |
5081 | ||
5082 | ||
5083 | /* | |
5084 | * | |
5085 | * | |
5086 | * 3 2 1 | |
5087 | * 10987654321098765432109876543210 | |
5088 | * 001000 x1110000101 | |
5089 | * rt ----- | |
5090 | * rs ----- | |
5091 | * rd ----- | |
5092 | */ | |
5093 | std::string NMD::CMPU_LE_QB(uint64 instruction) | |
5094 | { | |
5095 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
5096 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
5097 | ||
5098 | std::string rs = GPR(copy(rs_value)); | |
5099 | std::string rt = GPR(copy(rt_value)); | |
5100 | ||
5101 | return img::format("CMPU.LE.QB %s, %s", rs, rt); | |
5102 | } | |
5103 | ||
5104 | ||
5105 | /* | |
5106 | * | |
5107 | * | |
5108 | * 3 2 1 | |
5109 | * 10987654321098765432109876543210 | |
5110 | * 001000 x1110000101 | |
5111 | * rt ----- | |
5112 | * rs ----- | |
5113 | * rd ----- | |
5114 | */ | |
5115 | std::string NMD::CMPU_LT_QB(uint64 instruction) | |
5116 | { | |
5117 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
5118 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
5119 | ||
5120 | std::string rs = GPR(copy(rs_value)); | |
5121 | std::string rt = GPR(copy(rt_value)); | |
5122 | ||
5123 | return img::format("CMPU.LT.QB %s, %s", rs, rt); | |
5124 | } | |
5125 | ||
5126 | ||
5127 | /* | |
5128 | * | |
5129 | * | |
5130 | * 3 2 1 | |
5131 | * 10987654321098765432109876543210 | |
5132 | * 001000 x1110000101 | |
5133 | * rt ----- | |
5134 | * rs ----- | |
5135 | * rd ----- | |
5136 | */ | |
5137 | std::string NMD::COP2_1(uint64 instruction) | |
5138 | { | |
5139 | uint64 cofun_value = extract_cofun_25_24_23(instruction); | |
5140 | ||
5141 | std::string cofun = IMMEDIATE(copy(cofun_value)); | |
5142 | ||
5143 | return img::format("COP2_1 %s", cofun); | |
5144 | } | |
5145 | ||
5146 | ||
5147 | /* | |
5148 | * | |
5149 | * | |
5150 | * 3 2 1 | |
5151 | * 10987654321098765432109876543210 | |
5152 | * 001000 x1110000101 | |
5153 | * rt ----- | |
5154 | * rs ----- | |
5155 | * rd ----- | |
5156 | */ | |
5157 | std::string NMD::CTC1(uint64 instruction) | |
5158 | { | |
89a955e8 | 5159 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); |
86b5f803 | 5160 | uint64 cs_value = extract_cs_20_19_18_17_16(instruction); |
89a955e8 AM |
5161 | |
5162 | std::string rt = GPR(copy(rt_value)); | |
5163 | std::string cs = CPR(copy(cs_value)); | |
5164 | ||
5165 | return img::format("CTC1 %s, %s", rt, cs); | |
5166 | } | |
5167 | ||
5168 | ||
5169 | /* | |
5170 | * | |
5171 | * | |
5172 | * 3 2 1 | |
5173 | * 10987654321098765432109876543210 | |
5174 | * 001000 x1110000101 | |
5175 | * rt ----- | |
5176 | * rs ----- | |
5177 | * rd ----- | |
5178 | */ | |
5179 | std::string NMD::CTC2(uint64 instruction) | |
5180 | { | |
89a955e8 | 5181 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); |
86b5f803 | 5182 | uint64 cs_value = extract_cs_20_19_18_17_16(instruction); |
89a955e8 AM |
5183 | |
5184 | std::string rt = GPR(copy(rt_value)); | |
5185 | std::string cs = CPR(copy(cs_value)); | |
5186 | ||
5187 | return img::format("CTC2 %s, %s", rt, cs); | |
5188 | } | |
5189 | ||
5190 | ||
5191 | /* | |
5192 | * | |
5193 | * | |
5194 | * 3 2 1 | |
5195 | * 10987654321098765432109876543210 | |
5196 | * 001000 x1110000101 | |
5197 | * rt ----- | |
5198 | * rs ----- | |
5199 | * rd ----- | |
5200 | */ | |
5201 | std::string NMD::CVT_D_L(uint64 instruction) | |
5202 | { | |
17ce2f00 | 5203 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 5204 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 AM |
5205 | |
5206 | std::string ft = FPR(copy(ft_value)); | |
5207 | std::string fs = FPR(copy(fs_value)); | |
5208 | ||
5209 | return img::format("CVT.D.L %s, %s", ft, fs); | |
5210 | } | |
5211 | ||
5212 | ||
5213 | /* | |
5214 | * | |
5215 | * | |
5216 | * 3 2 1 | |
5217 | * 10987654321098765432109876543210 | |
5218 | * 001000 x1110000101 | |
5219 | * rt ----- | |
5220 | * rs ----- | |
5221 | * rd ----- | |
5222 | */ | |
5223 | std::string NMD::CVT_D_S(uint64 instruction) | |
5224 | { | |
17ce2f00 | 5225 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 5226 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 AM |
5227 | |
5228 | std::string ft = FPR(copy(ft_value)); | |
5229 | std::string fs = FPR(copy(fs_value)); | |
5230 | ||
5231 | return img::format("CVT.D.S %s, %s", ft, fs); | |
5232 | } | |
5233 | ||
5234 | ||
5235 | /* | |
5236 | * | |
5237 | * | |
5238 | * 3 2 1 | |
5239 | * 10987654321098765432109876543210 | |
5240 | * 001000 x1110000101 | |
5241 | * rt ----- | |
5242 | * rs ----- | |
5243 | * rd ----- | |
5244 | */ | |
5245 | std::string NMD::CVT_D_W(uint64 instruction) | |
5246 | { | |
17ce2f00 | 5247 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 5248 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 AM |
5249 | |
5250 | std::string ft = FPR(copy(ft_value)); | |
5251 | std::string fs = FPR(copy(fs_value)); | |
5252 | ||
5253 | return img::format("CVT.D.W %s, %s", ft, fs); | |
5254 | } | |
5255 | ||
5256 | ||
5257 | /* | |
5258 | * | |
5259 | * | |
5260 | * 3 2 1 | |
5261 | * 10987654321098765432109876543210 | |
5262 | * 001000 x1110000101 | |
5263 | * rt ----- | |
5264 | * rs ----- | |
5265 | * rd ----- | |
5266 | */ | |
5267 | std::string NMD::CVT_L_D(uint64 instruction) | |
5268 | { | |
17ce2f00 | 5269 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 5270 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 AM |
5271 | |
5272 | std::string ft = FPR(copy(ft_value)); | |
5273 | std::string fs = FPR(copy(fs_value)); | |
5274 | ||
5275 | return img::format("CVT.L.D %s, %s", ft, fs); | |
5276 | } | |
5277 | ||
5278 | ||
5279 | /* | |
5280 | * | |
5281 | * | |
5282 | * 3 2 1 | |
5283 | * 10987654321098765432109876543210 | |
5284 | * 001000 x1110000101 | |
5285 | * rt ----- | |
5286 | * rs ----- | |
5287 | * rd ----- | |
5288 | */ | |
5289 | std::string NMD::CVT_L_S(uint64 instruction) | |
5290 | { | |
17ce2f00 | 5291 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 5292 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 AM |
5293 | |
5294 | std::string ft = FPR(copy(ft_value)); | |
5295 | std::string fs = FPR(copy(fs_value)); | |
5296 | ||
5297 | return img::format("CVT.L.S %s, %s", ft, fs); | |
5298 | } | |
5299 | ||
5300 | ||
5301 | /* | |
5302 | * | |
5303 | * | |
5304 | * 3 2 1 | |
5305 | * 10987654321098765432109876543210 | |
5306 | * 001000 x1110000101 | |
5307 | * rt ----- | |
5308 | * rs ----- | |
5309 | * rd ----- | |
5310 | */ | |
5311 | std::string NMD::CVT_S_D(uint64 instruction) | |
5312 | { | |
17ce2f00 | 5313 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 5314 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 AM |
5315 | |
5316 | std::string ft = FPR(copy(ft_value)); | |
5317 | std::string fs = FPR(copy(fs_value)); | |
5318 | ||
5319 | return img::format("CVT.S.D %s, %s", ft, fs); | |
5320 | } | |
5321 | ||
5322 | ||
5323 | /* | |
5324 | * | |
5325 | * | |
5326 | * 3 2 1 | |
5327 | * 10987654321098765432109876543210 | |
5328 | * 001000 x1110000101 | |
5329 | * rt ----- | |
5330 | * rs ----- | |
5331 | * rd ----- | |
5332 | */ | |
5333 | std::string NMD::CVT_S_L(uint64 instruction) | |
5334 | { | |
17ce2f00 | 5335 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 5336 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 AM |
5337 | |
5338 | std::string ft = FPR(copy(ft_value)); | |
5339 | std::string fs = FPR(copy(fs_value)); | |
5340 | ||
5341 | return img::format("CVT.S.L %s, %s", ft, fs); | |
5342 | } | |
5343 | ||
5344 | ||
5345 | /* | |
5346 | * | |
5347 | * | |
5348 | * 3 2 1 | |
5349 | * 10987654321098765432109876543210 | |
5350 | * 001000 x1110000101 | |
5351 | * rt ----- | |
5352 | * rs ----- | |
5353 | * rd ----- | |
5354 | */ | |
5355 | std::string NMD::CVT_S_PL(uint64 instruction) | |
5356 | { | |
17ce2f00 | 5357 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 5358 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 AM |
5359 | |
5360 | std::string ft = FPR(copy(ft_value)); | |
5361 | std::string fs = FPR(copy(fs_value)); | |
5362 | ||
5363 | return img::format("CVT.S.PL %s, %s", ft, fs); | |
5364 | } | |
5365 | ||
5366 | ||
5367 | /* | |
5368 | * | |
5369 | * | |
5370 | * 3 2 1 | |
5371 | * 10987654321098765432109876543210 | |
5372 | * 001000 x1110000101 | |
5373 | * rt ----- | |
5374 | * rs ----- | |
5375 | * rd ----- | |
5376 | */ | |
5377 | std::string NMD::CVT_S_PU(uint64 instruction) | |
5378 | { | |
17ce2f00 | 5379 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 5380 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 AM |
5381 | |
5382 | std::string ft = FPR(copy(ft_value)); | |
5383 | std::string fs = FPR(copy(fs_value)); | |
5384 | ||
5385 | return img::format("CVT.S.PU %s, %s", ft, fs); | |
5386 | } | |
5387 | ||
5388 | ||
5389 | /* | |
5390 | * | |
5391 | * | |
5392 | * 3 2 1 | |
5393 | * 10987654321098765432109876543210 | |
5394 | * 001000 x1110000101 | |
5395 | * rt ----- | |
5396 | * rs ----- | |
5397 | * rd ----- | |
5398 | */ | |
5399 | std::string NMD::CVT_S_W(uint64 instruction) | |
5400 | { | |
17ce2f00 | 5401 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 5402 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 AM |
5403 | |
5404 | std::string ft = FPR(copy(ft_value)); | |
5405 | std::string fs = FPR(copy(fs_value)); | |
5406 | ||
5407 | return img::format("CVT.S.W %s, %s", ft, fs); | |
5408 | } | |
5409 | ||
5410 | ||
5411 | /* | |
5412 | * | |
5413 | * | |
5414 | * 3 2 1 | |
5415 | * 10987654321098765432109876543210 | |
5416 | * 001000 x1110000101 | |
5417 | * rt ----- | |
5418 | * rs ----- | |
5419 | * rd ----- | |
5420 | */ | |
5421 | std::string NMD::CVT_W_D(uint64 instruction) | |
5422 | { | |
17ce2f00 | 5423 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 5424 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 AM |
5425 | |
5426 | std::string ft = FPR(copy(ft_value)); | |
5427 | std::string fs = FPR(copy(fs_value)); | |
5428 | ||
5429 | return img::format("CVT.W.D %s, %s", ft, fs); | |
5430 | } | |
5431 | ||
5432 | ||
5433 | /* | |
5434 | * | |
5435 | * | |
5436 | * 3 2 1 | |
5437 | * 10987654321098765432109876543210 | |
5438 | * 001000 x1110000101 | |
5439 | * rt ----- | |
5440 | * rs ----- | |
5441 | * rd ----- | |
5442 | */ | |
5443 | std::string NMD::CVT_W_S(uint64 instruction) | |
5444 | { | |
17ce2f00 | 5445 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 5446 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 AM |
5447 | |
5448 | std::string ft = FPR(copy(ft_value)); | |
5449 | std::string fs = FPR(copy(fs_value)); | |
5450 | ||
5451 | return img::format("CVT.W.S %s, %s", ft, fs); | |
5452 | } | |
5453 | ||
5454 | ||
5455 | /* | |
5456 | * | |
5457 | * | |
5458 | * 3 2 1 | |
5459 | * 10987654321098765432109876543210 | |
5460 | * 001000 x1110000101 | |
5461 | * rt ----- | |
5462 | * rs ----- | |
5463 | * rd ----- | |
5464 | */ | |
5465 | std::string NMD::DADDIU_48_(uint64 instruction) | |
5466 | { | |
5467 | uint64 rt_value = extract_rt_41_40_39_38_37(instruction); | |
d3605cc0 | 5468 | int64 s_value = extract_s__se31_15_to_0_31_to_16(instruction); |
89a955e8 AM |
5469 | |
5470 | std::string rt = GPR(copy(rt_value)); | |
5471 | std::string s = IMMEDIATE(copy(s_value)); | |
5472 | ||
5473 | return img::format("DADDIU %s, %s", rt, s); | |
5474 | } | |
5475 | ||
5476 | ||
5477 | /* | |
5478 | * | |
5479 | * | |
5480 | * 3 2 1 | |
5481 | * 10987654321098765432109876543210 | |
5482 | * 001000 x1110000101 | |
5483 | * rt ----- | |
5484 | * rs ----- | |
5485 | * rd ----- | |
5486 | */ | |
5487 | std::string NMD::DADDIU_NEG_(uint64 instruction) | |
5488 | { | |
5489 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 5490 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 5491 | uint64 u_value = extract_u_11_10_9_8_7_6_5_4_3_2_1_0(instruction); |
89a955e8 AM |
5492 | |
5493 | std::string rt = GPR(copy(rt_value)); | |
5494 | std::string rs = GPR(copy(rs_value)); | |
5495 | std::string u = IMMEDIATE(neg_copy(u_value)); | |
5496 | ||
5497 | return img::format("DADDIU %s, %s, %s", rt, rs, u); | |
5498 | } | |
5499 | ||
5500 | ||
5501 | /* | |
5502 | * | |
5503 | * | |
5504 | * 3 2 1 | |
5505 | * 10987654321098765432109876543210 | |
5506 | * 001000 x1110000101 | |
5507 | * rt ----- | |
5508 | * rs ----- | |
5509 | * rd ----- | |
5510 | */ | |
5511 | std::string NMD::DADDIU_U12_(uint64 instruction) | |
5512 | { | |
5513 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 5514 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 5515 | uint64 u_value = extract_u_11_10_9_8_7_6_5_4_3_2_1_0(instruction); |
89a955e8 AM |
5516 | |
5517 | std::string rt = GPR(copy(rt_value)); | |
5518 | std::string rs = GPR(copy(rs_value)); | |
5519 | std::string u = IMMEDIATE(copy(u_value)); | |
5520 | ||
5521 | return img::format("DADDIU %s, %s, %s", rt, rs, u); | |
5522 | } | |
5523 | ||
5524 | ||
5525 | /* | |
5526 | * | |
5527 | * | |
5528 | * 3 2 1 | |
5529 | * 10987654321098765432109876543210 | |
5530 | * 001000 x1110000101 | |
5531 | * rt ----- | |
5532 | * rs ----- | |
5533 | * rd ----- | |
5534 | */ | |
5535 | std::string NMD::DADD(uint64 instruction) | |
5536 | { | |
5537 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 5538 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 5539 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
5540 | |
5541 | std::string rd = GPR(copy(rd_value)); | |
5542 | std::string rs = GPR(copy(rs_value)); | |
5543 | std::string rt = GPR(copy(rt_value)); | |
5544 | ||
5545 | return img::format("DADD %s, %s, %s", rd, rs, rt); | |
5546 | } | |
5547 | ||
5548 | ||
5549 | /* | |
5550 | * | |
5551 | * | |
5552 | * 3 2 1 | |
5553 | * 10987654321098765432109876543210 | |
5554 | * 001000 x1110000101 | |
5555 | * rt ----- | |
5556 | * rs ----- | |
5557 | * rd ----- | |
5558 | */ | |
5559 | std::string NMD::DADDU(uint64 instruction) | |
5560 | { | |
5561 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 5562 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 5563 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
5564 | |
5565 | std::string rd = GPR(copy(rd_value)); | |
5566 | std::string rs = GPR(copy(rs_value)); | |
5567 | std::string rt = GPR(copy(rt_value)); | |
5568 | ||
5569 | return img::format("DADDU %s, %s, %s", rd, rs, rt); | |
5570 | } | |
5571 | ||
5572 | ||
5573 | /* | |
5574 | * | |
5575 | * | |
5576 | * 3 2 1 | |
5577 | * 10987654321098765432109876543210 | |
5578 | * 001000 x1110000101 | |
5579 | * rt ----- | |
5580 | * rs ----- | |
5581 | * rd ----- | |
5582 | */ | |
5583 | std::string NMD::DCLO(uint64 instruction) | |
5584 | { | |
5585 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
5586 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
5587 | ||
5588 | std::string rt = GPR(copy(rt_value)); | |
5589 | std::string rs = GPR(copy(rs_value)); | |
5590 | ||
5591 | return img::format("DCLO %s, %s", rt, rs); | |
5592 | } | |
5593 | ||
5594 | ||
5595 | /* | |
5596 | * | |
5597 | * | |
5598 | * 3 2 1 | |
5599 | * 10987654321098765432109876543210 | |
5600 | * 001000 x1110000101 | |
5601 | * rt ----- | |
5602 | * rs ----- | |
5603 | * rd ----- | |
5604 | */ | |
5605 | std::string NMD::DCLZ(uint64 instruction) | |
5606 | { | |
5607 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
5608 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
5609 | ||
5610 | std::string rt = GPR(copy(rt_value)); | |
5611 | std::string rs = GPR(copy(rs_value)); | |
5612 | ||
5613 | return img::format("DCLZ %s, %s", rt, rs); | |
5614 | } | |
5615 | ||
5616 | ||
5617 | /* | |
5618 | * | |
5619 | * | |
5620 | * 3 2 1 | |
5621 | * 10987654321098765432109876543210 | |
5622 | * 001000 x1110000101 | |
5623 | * rt ----- | |
5624 | * rs ----- | |
5625 | * rd ----- | |
5626 | */ | |
5627 | std::string NMD::DDIV(uint64 instruction) | |
5628 | { | |
5629 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 5630 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 5631 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
5632 | |
5633 | std::string rd = GPR(copy(rd_value)); | |
5634 | std::string rs = GPR(copy(rs_value)); | |
5635 | std::string rt = GPR(copy(rt_value)); | |
5636 | ||
5637 | return img::format("DDIV %s, %s, %s", rd, rs, rt); | |
5638 | } | |
5639 | ||
5640 | ||
5641 | /* | |
5642 | * | |
5643 | * | |
5644 | * 3 2 1 | |
5645 | * 10987654321098765432109876543210 | |
5646 | * 001000 x1110000101 | |
5647 | * rt ----- | |
5648 | * rs ----- | |
5649 | * rd ----- | |
5650 | */ | |
5651 | std::string NMD::DDIVU(uint64 instruction) | |
5652 | { | |
5653 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 5654 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 5655 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
5656 | |
5657 | std::string rd = GPR(copy(rd_value)); | |
5658 | std::string rs = GPR(copy(rs_value)); | |
5659 | std::string rt = GPR(copy(rt_value)); | |
5660 | ||
5661 | return img::format("DDIVU %s, %s, %s", rd, rs, rt); | |
5662 | } | |
5663 | ||
5664 | ||
5665 | /* | |
5666 | * | |
5667 | * | |
5668 | * 3 2 1 | |
5669 | * 10987654321098765432109876543210 | |
5670 | * 001000 x1110000101 | |
5671 | * rt ----- | |
5672 | * rs ----- | |
5673 | * rd ----- | |
5674 | */ | |
5675 | std::string NMD::DERET(uint64 instruction) | |
5676 | { | |
5677 | (void)instruction; | |
5678 | ||
5679 | return "DERET "; | |
5680 | } | |
5681 | ||
5682 | ||
5683 | /* | |
5684 | * | |
5685 | * | |
5686 | * 3 2 1 | |
5687 | * 10987654321098765432109876543210 | |
5688 | * 001000 x1110000101 | |
5689 | * rt ----- | |
5690 | * rs ----- | |
5691 | * rd ----- | |
5692 | */ | |
5693 | std::string NMD::DEXTM(uint64 instruction) | |
5694 | { | |
5695 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
86b5f803 | 5696 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
89a955e8 AM |
5697 | uint64 msbd_value = extract_msbt_10_9_8_7_6(instruction); |
5698 | uint64 lsb_value = extract_lsb_4_3_2_1_0(instruction); | |
89a955e8 AM |
5699 | |
5700 | std::string rt = GPR(copy(rt_value)); | |
5701 | std::string rs = GPR(copy(rs_value)); | |
5702 | std::string lsb = IMMEDIATE(copy(lsb_value)); | |
5703 | std::string msbd = IMMEDIATE(encode_msbd_from_size(msbd_value)); | |
5704 | ||
5705 | return img::format("DEXTM %s, %s, %s, %s", rt, rs, lsb, msbd); | |
5706 | } | |
5707 | ||
5708 | ||
5709 | /* | |
5710 | * | |
5711 | * | |
5712 | * 3 2 1 | |
5713 | * 10987654321098765432109876543210 | |
5714 | * 001000 x1110000101 | |
5715 | * rt ----- | |
5716 | * rs ----- | |
5717 | * rd ----- | |
5718 | */ | |
5719 | std::string NMD::DEXT(uint64 instruction) | |
5720 | { | |
5721 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
86b5f803 | 5722 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
89a955e8 AM |
5723 | uint64 msbd_value = extract_msbt_10_9_8_7_6(instruction); |
5724 | uint64 lsb_value = extract_lsb_4_3_2_1_0(instruction); | |
89a955e8 AM |
5725 | |
5726 | std::string rt = GPR(copy(rt_value)); | |
5727 | std::string rs = GPR(copy(rs_value)); | |
5728 | std::string lsb = IMMEDIATE(copy(lsb_value)); | |
5729 | std::string msbd = IMMEDIATE(encode_msbd_from_size(msbd_value)); | |
5730 | ||
5731 | return img::format("DEXT %s, %s, %s, %s", rt, rs, lsb, msbd); | |
5732 | } | |
5733 | ||
5734 | ||
5735 | /* | |
5736 | * | |
5737 | * | |
5738 | * 3 2 1 | |
5739 | * 10987654321098765432109876543210 | |
5740 | * 001000 x1110000101 | |
5741 | * rt ----- | |
5742 | * rs ----- | |
5743 | * rd ----- | |
5744 | */ | |
5745 | std::string NMD::DEXTU(uint64 instruction) | |
5746 | { | |
5747 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
86b5f803 | 5748 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
89a955e8 AM |
5749 | uint64 msbd_value = extract_msbt_10_9_8_7_6(instruction); |
5750 | uint64 lsb_value = extract_lsb_4_3_2_1_0(instruction); | |
89a955e8 AM |
5751 | |
5752 | std::string rt = GPR(copy(rt_value)); | |
5753 | std::string rs = GPR(copy(rs_value)); | |
5754 | std::string lsb = IMMEDIATE(copy(lsb_value)); | |
5755 | std::string msbd = IMMEDIATE(encode_msbd_from_size(msbd_value)); | |
5756 | ||
5757 | return img::format("DEXTU %s, %s, %s, %s", rt, rs, lsb, msbd); | |
5758 | } | |
5759 | ||
5760 | ||
5761 | /* | |
5762 | * | |
5763 | * | |
5764 | * 3 2 1 | |
5765 | * 10987654321098765432109876543210 | |
5766 | * 001000 x1110000101 | |
5767 | * rt ----- | |
5768 | * rs ----- | |
5769 | * rd ----- | |
5770 | */ | |
5771 | std::string NMD::DINSM(uint64 instruction) | |
5772 | { | |
5773 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
86b5f803 | 5774 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
89a955e8 AM |
5775 | uint64 msbd_value = extract_msbt_10_9_8_7_6(instruction); |
5776 | uint64 lsb_value = extract_lsb_4_3_2_1_0(instruction); | |
89a955e8 AM |
5777 | |
5778 | std::string rt = GPR(copy(rt_value)); | |
5779 | std::string rs = GPR(copy(rs_value)); | |
5780 | std::string pos = IMMEDIATE(encode_lsb_from_pos_and_size(lsb_value)); | |
5781 | std::string size = IMMEDIATE(encode_lsb_from_pos_and_size(msbd_value)); | |
5782 | /* !!!!!!!!!! - no conversion function */ | |
5783 | ||
5784 | return img::format("DINSM %s, %s, %s, %s", rt, rs, pos, size); | |
5785 | /* hand edited */ | |
5786 | } | |
5787 | ||
5788 | ||
5789 | /* | |
5790 | * | |
5791 | * | |
5792 | * 3 2 1 | |
5793 | * 10987654321098765432109876543210 | |
5794 | * 001000 x1110000101 | |
5795 | * rt ----- | |
5796 | * rs ----- | |
5797 | * rd ----- | |
5798 | */ | |
5799 | std::string NMD::DINS(uint64 instruction) | |
5800 | { | |
5801 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
86b5f803 | 5802 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
89a955e8 AM |
5803 | uint64 msbd_value = extract_msbt_10_9_8_7_6(instruction); |
5804 | uint64 lsb_value = extract_lsb_4_3_2_1_0(instruction); | |
89a955e8 AM |
5805 | |
5806 | std::string rt = GPR(copy(rt_value)); | |
5807 | std::string rs = GPR(copy(rs_value)); | |
5808 | std::string pos = IMMEDIATE(encode_lsb_from_pos_and_size(lsb_value)); | |
5809 | std::string size = IMMEDIATE(encode_lsb_from_pos_and_size(msbd_value)); | |
5810 | /* !!!!!!!!!! - no conversion function */ | |
5811 | ||
5812 | return img::format("DINS %s, %s, %s, %s", rt, rs, pos, size); | |
5813 | /* hand edited */ | |
5814 | } | |
5815 | ||
5816 | ||
5817 | /* | |
5818 | * | |
5819 | * | |
5820 | * 3 2 1 | |
5821 | * 10987654321098765432109876543210 | |
5822 | * 001000 x1110000101 | |
5823 | * rt ----- | |
5824 | * rs ----- | |
5825 | * rd ----- | |
5826 | */ | |
5827 | std::string NMD::DINSU(uint64 instruction) | |
5828 | { | |
5829 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
86b5f803 | 5830 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
89a955e8 AM |
5831 | uint64 msbd_value = extract_msbt_10_9_8_7_6(instruction); |
5832 | uint64 lsb_value = extract_lsb_4_3_2_1_0(instruction); | |
89a955e8 AM |
5833 | |
5834 | std::string rt = GPR(copy(rt_value)); | |
5835 | std::string rs = GPR(copy(rs_value)); | |
5836 | std::string pos = IMMEDIATE(encode_lsb_from_pos_and_size(lsb_value)); | |
5837 | std::string size = IMMEDIATE(encode_lsb_from_pos_and_size(msbd_value)); | |
5838 | /* !!!!!!!!!! - no conversion function */ | |
5839 | ||
5840 | return img::format("DINSU %s, %s, %s, %s", rt, rs, pos, size); | |
5841 | /* hand edited */ | |
5842 | } | |
5843 | ||
5844 | ||
5845 | /* | |
5846 | * | |
5847 | * | |
5848 | * 3 2 1 | |
5849 | * 10987654321098765432109876543210 | |
5850 | * 001000 x1110000101 | |
5851 | * rt ----- | |
5852 | * rs ----- | |
5853 | * rd ----- | |
5854 | */ | |
5855 | std::string NMD::DI(uint64 instruction) | |
5856 | { | |
5857 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
5858 | ||
5859 | std::string rt = GPR(copy(rt_value)); | |
5860 | ||
5861 | return img::format("DI %s", rt); | |
5862 | } | |
5863 | ||
5864 | ||
5865 | /* | |
5866 | * | |
5867 | * | |
5868 | * 3 2 1 | |
5869 | * 10987654321098765432109876543210 | |
5870 | * 001000 x1110000101 | |
5871 | * rt ----- | |
5872 | * rs ----- | |
5873 | * rd ----- | |
5874 | */ | |
5875 | std::string NMD::DIV(uint64 instruction) | |
5876 | { | |
5877 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 5878 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 5879 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
5880 | |
5881 | std::string rd = GPR(copy(rd_value)); | |
5882 | std::string rs = GPR(copy(rs_value)); | |
5883 | std::string rt = GPR(copy(rt_value)); | |
5884 | ||
5885 | return img::format("DIV %s, %s, %s", rd, rs, rt); | |
5886 | } | |
5887 | ||
5888 | ||
5889 | /* | |
5890 | * | |
5891 | * | |
5892 | * 3 2 1 | |
5893 | * 10987654321098765432109876543210 | |
5894 | * 001000 x1110000101 | |
5895 | * rt ----- | |
5896 | * rs ----- | |
5897 | * rd ----- | |
5898 | */ | |
5899 | std::string NMD::DIV_D(uint64 instruction) | |
5900 | { | |
17ce2f00 | 5901 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 5902 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 5903 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 AM |
5904 | |
5905 | std::string fd = FPR(copy(fd_value)); | |
5906 | std::string fs = FPR(copy(fs_value)); | |
5907 | std::string ft = FPR(copy(ft_value)); | |
5908 | ||
5909 | return img::format("DIV.D %s, %s, %s", fd, fs, ft); | |
5910 | } | |
5911 | ||
5912 | ||
5913 | /* | |
5914 | * | |
5915 | * | |
5916 | * 3 2 1 | |
5917 | * 10987654321098765432109876543210 | |
5918 | * 001000 x1110000101 | |
5919 | * rt ----- | |
5920 | * rs ----- | |
5921 | * rd ----- | |
5922 | */ | |
5923 | std::string NMD::DIV_S(uint64 instruction) | |
5924 | { | |
17ce2f00 | 5925 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 5926 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 5927 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 AM |
5928 | |
5929 | std::string fd = FPR(copy(fd_value)); | |
5930 | std::string fs = FPR(copy(fs_value)); | |
5931 | std::string ft = FPR(copy(ft_value)); | |
5932 | ||
5933 | return img::format("DIV.S %s, %s, %s", fd, fs, ft); | |
5934 | } | |
5935 | ||
5936 | ||
5937 | /* | |
5938 | * | |
5939 | * | |
5940 | * 3 2 1 | |
5941 | * 10987654321098765432109876543210 | |
5942 | * 001000 x1110000101 | |
5943 | * rt ----- | |
5944 | * rs ----- | |
5945 | * rd ----- | |
5946 | */ | |
5947 | std::string NMD::DIVU(uint64 instruction) | |
5948 | { | |
5949 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 5950 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 5951 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
5952 | |
5953 | std::string rd = GPR(copy(rd_value)); | |
5954 | std::string rs = GPR(copy(rs_value)); | |
5955 | std::string rt = GPR(copy(rt_value)); | |
5956 | ||
5957 | return img::format("DIVU %s, %s, %s", rd, rs, rt); | |
5958 | } | |
5959 | ||
5960 | ||
5961 | /* | |
5962 | * | |
5963 | * | |
5964 | * 3 2 1 | |
5965 | * 10987654321098765432109876543210 | |
5966 | * 001000 x1110000101 | |
5967 | * rt ----- | |
5968 | * rs ----- | |
5969 | * rd ----- | |
5970 | */ | |
5971 | std::string NMD::DLSA(uint64 instruction) | |
5972 | { | |
5973 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
86b5f803 | 5974 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
b4c5d21c | 5975 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 5976 | uint64 u2_value = extract_u2_10_9(instruction); |
89a955e8 AM |
5977 | |
5978 | std::string rd = GPR(copy(rd_value)); | |
5979 | std::string rs = GPR(copy(rs_value)); | |
5980 | std::string rt = GPR(copy(rt_value)); | |
5981 | std::string u2 = IMMEDIATE(copy(u2_value)); | |
5982 | ||
5983 | return img::format("DLSA %s, %s, %s, %s", rd, rs, rt, u2); | |
5984 | } | |
5985 | ||
5986 | ||
5987 | /* | |
5988 | * | |
5989 | * | |
5990 | * 3 2 1 | |
5991 | * 10987654321098765432109876543210 | |
5992 | * 001000 x1110000101 | |
5993 | * rt ----- | |
5994 | * rs ----- | |
5995 | * rd ----- | |
5996 | */ | |
5997 | std::string NMD::DLUI_48_(uint64 instruction) | |
5998 | { | |
5999 | uint64 rt_value = extract_rt_41_40_39_38_37(instruction); | |
11b9732a | 6000 | uint64 u_value = extract_u_31_to_0__s32(instruction); |
89a955e8 AM |
6001 | |
6002 | std::string rt = GPR(copy(rt_value)); | |
6003 | std::string u = IMMEDIATE(copy(u_value)); | |
6004 | ||
6005 | return img::format("DLUI %s, %s", rt, u); | |
6006 | } | |
6007 | ||
6008 | ||
6009 | /* | |
6010 | * | |
6011 | * | |
6012 | * 3 2 1 | |
6013 | * 10987654321098765432109876543210 | |
6014 | * 001000 x1110000101 | |
6015 | * rt ----- | |
6016 | * rs ----- | |
6017 | * rd ----- | |
6018 | */ | |
6019 | std::string NMD::DMFC0(uint64 instruction) | |
6020 | { | |
6021 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
6022 | uint64 c0s_value = extract_c0s_20_19_18_17_16(instruction); | |
6023 | uint64 sel_value = extract_sel_15_14_13_12_11(instruction); | |
6024 | ||
6025 | std::string rt = GPR(copy(rt_value)); | |
6026 | std::string c0s = CPR(copy(c0s_value)); | |
6027 | std::string sel = IMMEDIATE(copy(sel_value)); | |
6028 | ||
6029 | return img::format("DMFC0 %s, %s, %s", rt, c0s, sel); | |
6030 | } | |
6031 | ||
6032 | ||
6033 | /* | |
6034 | * | |
6035 | * | |
6036 | * 3 2 1 | |
6037 | * 10987654321098765432109876543210 | |
6038 | * 001000 x1110000101 | |
6039 | * rt ----- | |
6040 | * rs ----- | |
6041 | * rd ----- | |
6042 | */ | |
6043 | std::string NMD::DMFC1(uint64 instruction) | |
6044 | { | |
6045 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
52a96d22 | 6046 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 AM |
6047 | |
6048 | std::string rt = GPR(copy(rt_value)); | |
6049 | std::string fs = FPR(copy(fs_value)); | |
6050 | ||
6051 | return img::format("DMFC1 %s, %s", rt, fs); | |
6052 | } | |
6053 | ||
6054 | ||
6055 | /* | |
6056 | * | |
6057 | * | |
6058 | * 3 2 1 | |
6059 | * 10987654321098765432109876543210 | |
6060 | * 001000 x1110000101 | |
6061 | * rt ----- | |
6062 | * rs ----- | |
6063 | * rd ----- | |
6064 | */ | |
6065 | std::string NMD::DMFC2(uint64 instruction) | |
6066 | { | |
89a955e8 | 6067 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); |
86b5f803 | 6068 | uint64 cs_value = extract_cs_20_19_18_17_16(instruction); |
89a955e8 AM |
6069 | |
6070 | std::string rt = GPR(copy(rt_value)); | |
6071 | std::string cs = CPR(copy(cs_value)); | |
6072 | ||
6073 | return img::format("DMFC2 %s, %s", rt, cs); | |
6074 | } | |
6075 | ||
6076 | ||
6077 | /* | |
6078 | * | |
6079 | * | |
6080 | * 3 2 1 | |
6081 | * 10987654321098765432109876543210 | |
6082 | * 001000 x1110000101 | |
6083 | * rt ----- | |
6084 | * rs ----- | |
6085 | * rd ----- | |
6086 | */ | |
6087 | std::string NMD::DMFGC0(uint64 instruction) | |
6088 | { | |
6089 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
6090 | uint64 c0s_value = extract_c0s_20_19_18_17_16(instruction); | |
6091 | uint64 sel_value = extract_sel_15_14_13_12_11(instruction); | |
6092 | ||
6093 | std::string rt = GPR(copy(rt_value)); | |
6094 | std::string c0s = CPR(copy(c0s_value)); | |
6095 | std::string sel = IMMEDIATE(copy(sel_value)); | |
6096 | ||
6097 | return img::format("DMFGC0 %s, %s, %s", rt, c0s, sel); | |
6098 | } | |
6099 | ||
6100 | ||
6101 | /* | |
6102 | * | |
6103 | * | |
6104 | * 3 2 1 | |
6105 | * 10987654321098765432109876543210 | |
6106 | * 001000 x1110000101 | |
6107 | * rt ----- | |
6108 | * rs ----- | |
6109 | * rd ----- | |
6110 | */ | |
6111 | std::string NMD::DMOD(uint64 instruction) | |
6112 | { | |
6113 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 6114 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 6115 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
6116 | |
6117 | std::string rd = GPR(copy(rd_value)); | |
6118 | std::string rs = GPR(copy(rs_value)); | |
6119 | std::string rt = GPR(copy(rt_value)); | |
6120 | ||
6121 | return img::format("DMOD %s, %s, %s", rd, rs, rt); | |
6122 | } | |
6123 | ||
6124 | ||
6125 | /* | |
6126 | * | |
6127 | * | |
6128 | * 3 2 1 | |
6129 | * 10987654321098765432109876543210 | |
6130 | * 001000 x1110000101 | |
6131 | * rt ----- | |
6132 | * rs ----- | |
6133 | * rd ----- | |
6134 | */ | |
6135 | std::string NMD::DMODU(uint64 instruction) | |
6136 | { | |
6137 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 6138 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 6139 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
6140 | |
6141 | std::string rd = GPR(copy(rd_value)); | |
6142 | std::string rs = GPR(copy(rs_value)); | |
6143 | std::string rt = GPR(copy(rt_value)); | |
6144 | ||
6145 | return img::format("DMODU %s, %s, %s", rd, rs, rt); | |
6146 | } | |
6147 | ||
6148 | ||
6149 | /* | |
6150 | * | |
6151 | * | |
6152 | * 3 2 1 | |
6153 | * 10987654321098765432109876543210 | |
6154 | * 001000 x1110000101 | |
6155 | * rt ----- | |
6156 | * rs ----- | |
6157 | * rd ----- | |
6158 | */ | |
6159 | std::string NMD::DMTC0(uint64 instruction) | |
6160 | { | |
6161 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
6162 | uint64 c0s_value = extract_c0s_20_19_18_17_16(instruction); | |
6163 | uint64 sel_value = extract_sel_15_14_13_12_11(instruction); | |
6164 | ||
6165 | std::string rt = GPR(copy(rt_value)); | |
6166 | std::string c0s = CPR(copy(c0s_value)); | |
6167 | std::string sel = IMMEDIATE(copy(sel_value)); | |
6168 | ||
6169 | return img::format("DMTC0 %s, %s, %s", rt, c0s, sel); | |
6170 | } | |
6171 | ||
6172 | ||
6173 | /* | |
6174 | * | |
6175 | * | |
6176 | * 3 2 1 | |
6177 | * 10987654321098765432109876543210 | |
6178 | * 001000 x1110000101 | |
6179 | * rt ----- | |
6180 | * rs ----- | |
6181 | * rd ----- | |
6182 | */ | |
6183 | std::string NMD::DMTC1(uint64 instruction) | |
6184 | { | |
6185 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
52a96d22 | 6186 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 AM |
6187 | |
6188 | std::string rt = GPR(copy(rt_value)); | |
6189 | std::string fs = FPR(copy(fs_value)); | |
6190 | ||
6191 | return img::format("DMTC1 %s, %s", rt, fs); | |
6192 | } | |
6193 | ||
6194 | ||
6195 | /* | |
6196 | * | |
6197 | * | |
6198 | * 3 2 1 | |
6199 | * 10987654321098765432109876543210 | |
6200 | * 001000 x1110000101 | |
6201 | * rt ----- | |
6202 | * rs ----- | |
6203 | * rd ----- | |
6204 | */ | |
6205 | std::string NMD::DMTC2(uint64 instruction) | |
6206 | { | |
89a955e8 | 6207 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); |
86b5f803 | 6208 | uint64 cs_value = extract_cs_20_19_18_17_16(instruction); |
89a955e8 AM |
6209 | |
6210 | std::string rt = GPR(copy(rt_value)); | |
6211 | std::string cs = CPR(copy(cs_value)); | |
6212 | ||
6213 | return img::format("DMTC2 %s, %s", rt, cs); | |
6214 | } | |
6215 | ||
6216 | ||
6217 | /* | |
6218 | * | |
6219 | * | |
6220 | * 3 2 1 | |
6221 | * 10987654321098765432109876543210 | |
6222 | * 001000 x1110000101 | |
6223 | * rt ----- | |
6224 | * rs ----- | |
6225 | * rd ----- | |
6226 | */ | |
6227 | std::string NMD::DMTGC0(uint64 instruction) | |
6228 | { | |
6229 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
6230 | uint64 c0s_value = extract_c0s_20_19_18_17_16(instruction); | |
6231 | uint64 sel_value = extract_sel_15_14_13_12_11(instruction); | |
6232 | ||
6233 | std::string rt = GPR(copy(rt_value)); | |
6234 | std::string c0s = CPR(copy(c0s_value)); | |
6235 | std::string sel = IMMEDIATE(copy(sel_value)); | |
6236 | ||
6237 | return img::format("DMTGC0 %s, %s, %s", rt, c0s, sel); | |
6238 | } | |
6239 | ||
6240 | ||
6241 | /* | |
6242 | * | |
6243 | * | |
6244 | * 3 2 1 | |
6245 | * 10987654321098765432109876543210 | |
6246 | * 001000 x1110000101 | |
6247 | * rt ----- | |
6248 | * rs ----- | |
6249 | * rd ----- | |
6250 | */ | |
6251 | std::string NMD::DMT(uint64 instruction) | |
6252 | { | |
6253 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
6254 | ||
6255 | std::string rt = GPR(copy(rt_value)); | |
6256 | ||
6257 | return img::format("DMT %s", rt); | |
6258 | } | |
6259 | ||
6260 | ||
6261 | /* | |
6262 | * | |
6263 | * | |
6264 | * 3 2 1 | |
6265 | * 10987654321098765432109876543210 | |
6266 | * 001000 x1110000101 | |
6267 | * rt ----- | |
6268 | * rs ----- | |
6269 | * rd ----- | |
6270 | */ | |
6271 | std::string NMD::DMUH(uint64 instruction) | |
6272 | { | |
6273 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 6274 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 6275 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
6276 | |
6277 | std::string rd = GPR(copy(rd_value)); | |
6278 | std::string rs = GPR(copy(rs_value)); | |
6279 | std::string rt = GPR(copy(rt_value)); | |
6280 | ||
6281 | return img::format("DMUH %s, %s, %s", rd, rs, rt); | |
6282 | } | |
6283 | ||
6284 | ||
6285 | /* | |
6286 | * | |
6287 | * | |
6288 | * 3 2 1 | |
6289 | * 10987654321098765432109876543210 | |
6290 | * 001000 x1110000101 | |
6291 | * rt ----- | |
6292 | * rs ----- | |
6293 | * rd ----- | |
6294 | */ | |
6295 | std::string NMD::DMUHU(uint64 instruction) | |
6296 | { | |
6297 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 6298 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 6299 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
6300 | |
6301 | std::string rd = GPR(copy(rd_value)); | |
6302 | std::string rs = GPR(copy(rs_value)); | |
6303 | std::string rt = GPR(copy(rt_value)); | |
6304 | ||
6305 | return img::format("DMUHU %s, %s, %s", rd, rs, rt); | |
6306 | } | |
6307 | ||
6308 | ||
6309 | /* | |
6310 | * | |
6311 | * | |
6312 | * 3 2 1 | |
6313 | * 10987654321098765432109876543210 | |
6314 | * 001000 x1110000101 | |
6315 | * rt ----- | |
6316 | * rs ----- | |
6317 | * rd ----- | |
6318 | */ | |
6319 | std::string NMD::DMUL(uint64 instruction) | |
6320 | { | |
6321 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 6322 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 6323 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
6324 | |
6325 | std::string rd = GPR(copy(rd_value)); | |
6326 | std::string rs = GPR(copy(rs_value)); | |
6327 | std::string rt = GPR(copy(rt_value)); | |
6328 | ||
6329 | return img::format("DMUL %s, %s, %s", rd, rs, rt); | |
6330 | } | |
6331 | ||
6332 | ||
6333 | /* | |
6334 | * | |
6335 | * | |
6336 | * 3 2 1 | |
6337 | * 10987654321098765432109876543210 | |
6338 | * 001000 x1110000101 | |
6339 | * rt ----- | |
6340 | * rs ----- | |
6341 | * rd ----- | |
6342 | */ | |
6343 | std::string NMD::DMULU(uint64 instruction) | |
6344 | { | |
6345 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 6346 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 6347 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
6348 | |
6349 | std::string rd = GPR(copy(rd_value)); | |
6350 | std::string rs = GPR(copy(rs_value)); | |
6351 | std::string rt = GPR(copy(rt_value)); | |
6352 | ||
6353 | return img::format("DMULU %s, %s, %s", rd, rs, rt); | |
6354 | } | |
6355 | ||
6356 | ||
6357 | /* | |
6358 | * | |
6359 | * | |
6360 | * 3 2 1 | |
6361 | * 10987654321098765432109876543210 | |
6362 | * 001000 x1110000101 | |
6363 | * rt ----- | |
6364 | * rs ----- | |
6365 | * rd ----- | |
6366 | */ | |
6367 | std::string NMD::DPA_W_PH(uint64 instruction) | |
6368 | { | |
6369 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 6370 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 6371 | uint64 ac_value = extract_ac_13_12(instruction); |
89a955e8 AM |
6372 | |
6373 | std::string ac = AC(copy(ac_value)); | |
6374 | std::string rs = GPR(copy(rs_value)); | |
6375 | std::string rt = GPR(copy(rt_value)); | |
6376 | ||
6377 | return img::format("DPA.W.PH %s, %s, %s", ac, rs, rt); | |
6378 | } | |
6379 | ||
6380 | ||
6381 | /* | |
6382 | * | |
6383 | * | |
6384 | * 3 2 1 | |
6385 | * 10987654321098765432109876543210 | |
6386 | * 001000 x1110000101 | |
6387 | * rt ----- | |
6388 | * rs ----- | |
6389 | * rd ----- | |
6390 | */ | |
6391 | std::string NMD::DPAQ_SA_L_W(uint64 instruction) | |
6392 | { | |
6393 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 6394 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 6395 | uint64 ac_value = extract_ac_13_12(instruction); |
89a955e8 AM |
6396 | |
6397 | std::string ac = AC(copy(ac_value)); | |
6398 | std::string rs = GPR(copy(rs_value)); | |
6399 | std::string rt = GPR(copy(rt_value)); | |
6400 | ||
6401 | return img::format("DPAQ_SA.L.W %s, %s, %s", ac, rs, rt); | |
6402 | } | |
6403 | ||
6404 | ||
6405 | /* | |
6406 | * | |
6407 | * | |
6408 | * 3 2 1 | |
6409 | * 10987654321098765432109876543210 | |
6410 | * 001000 x1110000101 | |
6411 | * rt ----- | |
6412 | * rs ----- | |
6413 | * rd ----- | |
6414 | */ | |
6415 | std::string NMD::DPAQ_S_W_PH(uint64 instruction) | |
6416 | { | |
6417 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 6418 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 6419 | uint64 ac_value = extract_ac_13_12(instruction); |
89a955e8 AM |
6420 | |
6421 | std::string ac = AC(copy(ac_value)); | |
6422 | std::string rs = GPR(copy(rs_value)); | |
6423 | std::string rt = GPR(copy(rt_value)); | |
6424 | ||
6425 | return img::format("DPAQ_S.W.PH %s, %s, %s", ac, rs, rt); | |
6426 | } | |
6427 | ||
6428 | ||
6429 | /* | |
6430 | * | |
6431 | * | |
6432 | * 3 2 1 | |
6433 | * 10987654321098765432109876543210 | |
6434 | * 001000 x1110000101 | |
6435 | * rt ----- | |
6436 | * rs ----- | |
6437 | * rd ----- | |
6438 | */ | |
6439 | std::string NMD::DPAQX_SA_W_PH(uint64 instruction) | |
6440 | { | |
6441 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 6442 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 6443 | uint64 ac_value = extract_ac_13_12(instruction); |
89a955e8 AM |
6444 | |
6445 | std::string ac = AC(copy(ac_value)); | |
6446 | std::string rs = GPR(copy(rs_value)); | |
6447 | std::string rt = GPR(copy(rt_value)); | |
6448 | ||
6449 | return img::format("DPAQX_SA.W.PH %s, %s, %s", ac, rs, rt); | |
6450 | } | |
6451 | ||
6452 | ||
6453 | /* | |
6454 | * | |
6455 | * | |
6456 | * 3 2 1 | |
6457 | * 10987654321098765432109876543210 | |
6458 | * 001000 x1110000101 | |
6459 | * rt ----- | |
6460 | * rs ----- | |
6461 | * rd ----- | |
6462 | */ | |
6463 | std::string NMD::DPAQX_S_W_PH(uint64 instruction) | |
6464 | { | |
6465 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 6466 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 6467 | uint64 ac_value = extract_ac_13_12(instruction); |
89a955e8 AM |
6468 | |
6469 | std::string ac = AC(copy(ac_value)); | |
6470 | std::string rs = GPR(copy(rs_value)); | |
6471 | std::string rt = GPR(copy(rt_value)); | |
6472 | ||
6473 | return img::format("DPAQX_S.W.PH %s, %s, %s", ac, rs, rt); | |
6474 | } | |
6475 | ||
6476 | ||
6477 | /* | |
6478 | * | |
6479 | * | |
6480 | * 3 2 1 | |
6481 | * 10987654321098765432109876543210 | |
6482 | * 001000 x1110000101 | |
6483 | * rt ----- | |
6484 | * rs ----- | |
6485 | * rd ----- | |
6486 | */ | |
6487 | std::string NMD::DPAU_H_QBL(uint64 instruction) | |
6488 | { | |
6489 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 6490 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 6491 | uint64 ac_value = extract_ac_13_12(instruction); |
89a955e8 AM |
6492 | |
6493 | std::string ac = AC(copy(ac_value)); | |
6494 | std::string rs = GPR(copy(rs_value)); | |
6495 | std::string rt = GPR(copy(rt_value)); | |
6496 | ||
6497 | return img::format("DPAU.H.QBL %s, %s, %s", ac, rs, rt); | |
6498 | } | |
6499 | ||
6500 | ||
6501 | /* | |
6502 | * | |
6503 | * | |
6504 | * 3 2 1 | |
6505 | * 10987654321098765432109876543210 | |
6506 | * 001000 x1110000101 | |
6507 | * rt ----- | |
6508 | * rs ----- | |
6509 | * rd ----- | |
6510 | */ | |
6511 | std::string NMD::DPAU_H_QBR(uint64 instruction) | |
6512 | { | |
6513 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 6514 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 6515 | uint64 ac_value = extract_ac_13_12(instruction); |
89a955e8 AM |
6516 | |
6517 | std::string ac = AC(copy(ac_value)); | |
6518 | std::string rs = GPR(copy(rs_value)); | |
6519 | std::string rt = GPR(copy(rt_value)); | |
6520 | ||
6521 | return img::format("DPAU.H.QBR %s, %s, %s", ac, rs, rt); | |
6522 | } | |
6523 | ||
6524 | ||
6525 | /* | |
6526 | * | |
6527 | * | |
6528 | * 3 2 1 | |
6529 | * 10987654321098765432109876543210 | |
6530 | * 001000 x1110000101 | |
6531 | * rt ----- | |
6532 | * rs ----- | |
6533 | * rd ----- | |
6534 | */ | |
6535 | std::string NMD::DPAX_W_PH(uint64 instruction) | |
6536 | { | |
6537 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 6538 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 6539 | uint64 ac_value = extract_ac_13_12(instruction); |
89a955e8 AM |
6540 | |
6541 | std::string ac = AC(copy(ac_value)); | |
6542 | std::string rs = GPR(copy(rs_value)); | |
6543 | std::string rt = GPR(copy(rt_value)); | |
6544 | ||
6545 | return img::format("DPAX.W.PH %s, %s, %s", ac, rs, rt); | |
6546 | } | |
6547 | ||
6548 | ||
6549 | /* | |
6550 | * | |
6551 | * | |
6552 | * 3 2 1 | |
6553 | * 10987654321098765432109876543210 | |
6554 | * 001000 x1110000101 | |
6555 | * rt ----- | |
6556 | * rs ----- | |
6557 | * rd ----- | |
6558 | */ | |
6559 | std::string NMD::DPS_W_PH(uint64 instruction) | |
6560 | { | |
6561 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 6562 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 6563 | uint64 ac_value = extract_ac_13_12(instruction); |
89a955e8 AM |
6564 | |
6565 | std::string ac = AC(copy(ac_value)); | |
6566 | std::string rs = GPR(copy(rs_value)); | |
6567 | std::string rt = GPR(copy(rt_value)); | |
6568 | ||
6569 | return img::format("DPS.W.PH %s, %s, %s", ac, rs, rt); | |
6570 | } | |
6571 | ||
6572 | ||
6573 | /* | |
6574 | * | |
6575 | * | |
6576 | * 3 2 1 | |
6577 | * 10987654321098765432109876543210 | |
6578 | * 001000 x1110000101 | |
6579 | * rt ----- | |
6580 | * rs ----- | |
6581 | * rd ----- | |
6582 | */ | |
6583 | std::string NMD::DPSQ_SA_L_W(uint64 instruction) | |
6584 | { | |
6585 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 6586 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 6587 | uint64 ac_value = extract_ac_13_12(instruction); |
89a955e8 AM |
6588 | |
6589 | std::string ac = AC(copy(ac_value)); | |
6590 | std::string rs = GPR(copy(rs_value)); | |
6591 | std::string rt = GPR(copy(rt_value)); | |
6592 | ||
6593 | return img::format("DPSQ_SA.L.W %s, %s, %s", ac, rs, rt); | |
6594 | } | |
6595 | ||
6596 | ||
6597 | /* | |
6598 | * | |
6599 | * | |
6600 | * 3 2 1 | |
6601 | * 10987654321098765432109876543210 | |
6602 | * 001000 x1110000101 | |
6603 | * rt ----- | |
6604 | * rs ----- | |
6605 | * rd ----- | |
6606 | */ | |
6607 | std::string NMD::DPSQ_S_W_PH(uint64 instruction) | |
6608 | { | |
6609 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 6610 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 6611 | uint64 ac_value = extract_ac_13_12(instruction); |
89a955e8 AM |
6612 | |
6613 | std::string ac = AC(copy(ac_value)); | |
6614 | std::string rs = GPR(copy(rs_value)); | |
6615 | std::string rt = GPR(copy(rt_value)); | |
6616 | ||
6617 | return img::format("DPSQ_S.W.PH %s, %s, %s", ac, rs, rt); | |
6618 | } | |
6619 | ||
6620 | ||
6621 | /* | |
6622 | * | |
6623 | * | |
6624 | * 3 2 1 | |
6625 | * 10987654321098765432109876543210 | |
6626 | * 001000 x1110000101 | |
6627 | * rt ----- | |
6628 | * rs ----- | |
6629 | * rd ----- | |
6630 | */ | |
6631 | std::string NMD::DPSQX_SA_W_PH(uint64 instruction) | |
6632 | { | |
6633 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 6634 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 6635 | uint64 ac_value = extract_ac_13_12(instruction); |
89a955e8 AM |
6636 | |
6637 | std::string ac = AC(copy(ac_value)); | |
6638 | std::string rs = GPR(copy(rs_value)); | |
6639 | std::string rt = GPR(copy(rt_value)); | |
6640 | ||
6641 | return img::format("DPSQX_SA.W.PH %s, %s, %s", ac, rs, rt); | |
6642 | } | |
6643 | ||
6644 | ||
6645 | /* | |
6646 | * | |
6647 | * | |
6648 | * 3 2 1 | |
6649 | * 10987654321098765432109876543210 | |
6650 | * 001000 x1110000101 | |
6651 | * rt ----- | |
6652 | * rs ----- | |
6653 | * rd ----- | |
6654 | */ | |
6655 | std::string NMD::DPSQX_S_W_PH(uint64 instruction) | |
6656 | { | |
6657 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 6658 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 6659 | uint64 ac_value = extract_ac_13_12(instruction); |
89a955e8 AM |
6660 | |
6661 | std::string ac = AC(copy(ac_value)); | |
6662 | std::string rs = GPR(copy(rs_value)); | |
6663 | std::string rt = GPR(copy(rt_value)); | |
6664 | ||
6665 | return img::format("DPSQX_S.W.PH %s, %s, %s", ac, rs, rt); | |
6666 | } | |
6667 | ||
6668 | ||
6669 | /* | |
6670 | * | |
6671 | * | |
6672 | * 3 2 1 | |
6673 | * 10987654321098765432109876543210 | |
6674 | * 001000 x1110000101 | |
6675 | * rt ----- | |
6676 | * rs ----- | |
6677 | * rd ----- | |
6678 | */ | |
6679 | std::string NMD::DPSU_H_QBL(uint64 instruction) | |
6680 | { | |
6681 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 6682 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 6683 | uint64 ac_value = extract_ac_13_12(instruction); |
89a955e8 AM |
6684 | |
6685 | std::string ac = AC(copy(ac_value)); | |
6686 | std::string rs = GPR(copy(rs_value)); | |
6687 | std::string rt = GPR(copy(rt_value)); | |
6688 | ||
6689 | return img::format("DPSU.H.QBL %s, %s, %s", ac, rs, rt); | |
6690 | } | |
6691 | ||
6692 | ||
6693 | /* | |
6694 | * | |
6695 | * | |
6696 | * 3 2 1 | |
6697 | * 10987654321098765432109876543210 | |
6698 | * 001000 x1110000101 | |
6699 | * rt ----- | |
6700 | * rs ----- | |
6701 | * rd ----- | |
6702 | */ | |
6703 | std::string NMD::DPSU_H_QBR(uint64 instruction) | |
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 ac_value = extract_ac_13_12(instruction); |
89a955e8 AM |
6708 | |
6709 | std::string ac = AC(copy(ac_value)); | |
6710 | std::string rs = GPR(copy(rs_value)); | |
6711 | std::string rt = GPR(copy(rt_value)); | |
6712 | ||
6713 | return img::format("DPSU.H.QBR %s, %s, %s", ac, rs, rt); | |
6714 | } | |
6715 | ||
6716 | ||
6717 | /* | |
6718 | * | |
6719 | * | |
6720 | * 3 2 1 | |
6721 | * 10987654321098765432109876543210 | |
6722 | * 001000 x1110000101 | |
6723 | * rt ----- | |
6724 | * rs ----- | |
6725 | * rd ----- | |
6726 | */ | |
6727 | std::string NMD::DPSX_W_PH(uint64 instruction) | |
6728 | { | |
6729 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 6730 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 6731 | uint64 ac_value = extract_ac_13_12(instruction); |
89a955e8 AM |
6732 | |
6733 | std::string ac = AC(copy(ac_value)); | |
6734 | std::string rs = GPR(copy(rs_value)); | |
6735 | std::string rt = GPR(copy(rt_value)); | |
6736 | ||
6737 | return img::format("DPSX.W.PH %s, %s, %s", ac, rs, rt); | |
6738 | } | |
6739 | ||
6740 | ||
6741 | /* | |
6742 | * DROTR - | |
6743 | * | |
6744 | * 3 2 1 | |
6745 | * 10987654321098765432109876543210 | |
6746 | * 001000 x1110000101 | |
6747 | * rt ----- | |
6748 | * rs ----- | |
6749 | * rd ----- | |
6750 | */ | |
6751 | std::string NMD::DROTR(uint64 instruction) | |
6752 | { | |
6753 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 6754 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 6755 | uint64 shift_value = extract_shift_4_3_2_1_0(instruction); |
89a955e8 AM |
6756 | |
6757 | std::string rt = GPR(copy(rt_value)); | |
6758 | std::string rs = GPR(copy(rs_value)); | |
6759 | std::string shift = IMMEDIATE(copy(shift_value)); | |
6760 | ||
6761 | return img::format("DROTR %s, %s, %s", rt, rs, shift); | |
6762 | } | |
6763 | ||
6764 | ||
6765 | /* | |
6766 | * DROTR[32] - | |
6767 | * | |
6768 | * 3 2 1 | |
6769 | * 10987654321098765432109876543210 | |
6770 | * 10o000 1100xxx0110 | |
6771 | * rt ----- | |
6772 | * rs ----- | |
6773 | * shift ----- | |
6774 | */ | |
6775 | std::string NMD::DROTR32(uint64 instruction) | |
6776 | { | |
6777 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 6778 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 6779 | uint64 shift_value = extract_shift_4_3_2_1_0(instruction); |
89a955e8 AM |
6780 | |
6781 | std::string rt = GPR(copy(rt_value)); | |
6782 | std::string rs = GPR(copy(rs_value)); | |
6783 | std::string shift = IMMEDIATE(copy(shift_value)); | |
6784 | ||
6785 | return img::format("DROTR32 %s, %s, %s", rt, rs, shift); | |
6786 | } | |
6787 | ||
6788 | ||
6789 | /* | |
6790 | * | |
6791 | * | |
6792 | * 3 2 1 | |
6793 | * 10987654321098765432109876543210 | |
6794 | * 001000 x1110000101 | |
6795 | * rt ----- | |
6796 | * rs ----- | |
6797 | * rd ----- | |
6798 | */ | |
6799 | std::string NMD::DROTRV(uint64 instruction) | |
6800 | { | |
6801 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 6802 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 6803 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
6804 | |
6805 | std::string rd = GPR(copy(rd_value)); | |
6806 | std::string rs = GPR(copy(rs_value)); | |
6807 | std::string rt = GPR(copy(rt_value)); | |
6808 | ||
6809 | return img::format("DROTRV %s, %s, %s", rd, rs, rt); | |
6810 | } | |
6811 | ||
6812 | ||
6813 | /* | |
6814 | * | |
6815 | * | |
6816 | * 3 2 1 | |
6817 | * 10987654321098765432109876543210 | |
6818 | * 001000 x1110000101 | |
6819 | * rt ----- | |
6820 | * rs ----- | |
6821 | * rd ----- | |
6822 | */ | |
6823 | std::string NMD::DROTX(uint64 instruction) | |
6824 | { | |
6825 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 6826 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 AM |
6827 | uint64 shiftx_value = extract_shiftx_11_10_9_8_7_6(instruction); |
6828 | uint64 shift_value = extract_shift_5_4_3_2_1_0(instruction); | |
89a955e8 AM |
6829 | |
6830 | std::string rt = GPR(copy(rt_value)); | |
6831 | std::string rs = GPR(copy(rs_value)); | |
6832 | std::string shift = IMMEDIATE(copy(shift_value)); | |
6833 | std::string shiftx = IMMEDIATE(copy(shiftx_value)); | |
6834 | ||
6835 | return img::format("DROTX %s, %s, %s, %s", rt, rs, shift, shiftx); | |
6836 | } | |
6837 | ||
6838 | ||
6839 | /* | |
6840 | * DSLL - | |
6841 | * | |
6842 | * 3 2 1 | |
6843 | * 10987654321098765432109876543210 | |
6844 | * 10o000 1100xxx0000 | |
6845 | * rt ----- | |
6846 | * rs ----- | |
6847 | * shift ----- | |
6848 | */ | |
6849 | std::string NMD::DSLL(uint64 instruction) | |
6850 | { | |
6851 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 6852 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 6853 | uint64 shift_value = extract_shift_4_3_2_1_0(instruction); |
89a955e8 AM |
6854 | |
6855 | std::string rt = GPR(copy(rt_value)); | |
6856 | std::string rs = GPR(copy(rs_value)); | |
6857 | std::string shift = IMMEDIATE(copy(shift_value)); | |
6858 | ||
6859 | return img::format("DSLL %s, %s, %s", rt, rs, shift); | |
6860 | } | |
6861 | ||
6862 | ||
6863 | /* | |
6864 | * DSLL[32] - | |
6865 | * | |
6866 | * 3 2 1 | |
6867 | * 10987654321098765432109876543210 | |
6868 | * 10o000 1100xxx0000 | |
6869 | * rt ----- | |
6870 | * rs ----- | |
6871 | * shift ----- | |
6872 | */ | |
6873 | std::string NMD::DSLL32(uint64 instruction) | |
6874 | { | |
6875 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 6876 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 6877 | uint64 shift_value = extract_shift_4_3_2_1_0(instruction); |
89a955e8 AM |
6878 | |
6879 | std::string rt = GPR(copy(rt_value)); | |
6880 | std::string rs = GPR(copy(rs_value)); | |
6881 | std::string shift = IMMEDIATE(copy(shift_value)); | |
6882 | ||
6883 | return img::format("DSLL32 %s, %s, %s", rt, rs, shift); | |
6884 | } | |
6885 | ||
6886 | ||
6887 | /* | |
6888 | * | |
6889 | * | |
6890 | * 3 2 1 | |
6891 | * 10987654321098765432109876543210 | |
6892 | * 001000 x1110000101 | |
6893 | * rt ----- | |
6894 | * rs ----- | |
6895 | * rd ----- | |
6896 | */ | |
6897 | std::string NMD::DSLLV(uint64 instruction) | |
6898 | { | |
6899 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 6900 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 6901 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
6902 | |
6903 | std::string rd = GPR(copy(rd_value)); | |
6904 | std::string rs = GPR(copy(rs_value)); | |
6905 | std::string rt = GPR(copy(rt_value)); | |
6906 | ||
6907 | return img::format("DSLLV %s, %s, %s", rd, rs, rt); | |
6908 | } | |
6909 | ||
6910 | ||
6911 | /* | |
6912 | * DSRA - | |
6913 | * | |
6914 | * 3 2 1 | |
6915 | * 10987654321098765432109876543210 | |
6916 | * 10o000 1100xxx0100 | |
6917 | * rt ----- | |
6918 | * rs ----- | |
6919 | * shift ----- | |
6920 | */ | |
6921 | std::string NMD::DSRA(uint64 instruction) | |
6922 | { | |
6923 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 6924 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 6925 | uint64 shift_value = extract_shift_4_3_2_1_0(instruction); |
89a955e8 AM |
6926 | |
6927 | std::string rt = GPR(copy(rt_value)); | |
6928 | std::string rs = GPR(copy(rs_value)); | |
6929 | std::string shift = IMMEDIATE(copy(shift_value)); | |
6930 | ||
6931 | return img::format("DSRA %s, %s, %s", rt, rs, shift); | |
6932 | } | |
6933 | ||
6934 | ||
6935 | /* | |
6936 | * DSRA[32] - | |
6937 | * | |
6938 | * 3 2 1 | |
6939 | * 10987654321098765432109876543210 | |
6940 | * 10o000 1100xxx0100 | |
6941 | * rt ----- | |
6942 | * rs ----- | |
6943 | * shift ----- | |
6944 | */ | |
6945 | std::string NMD::DSRA32(uint64 instruction) | |
6946 | { | |
6947 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 6948 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 6949 | uint64 shift_value = extract_shift_4_3_2_1_0(instruction); |
89a955e8 AM |
6950 | |
6951 | std::string rt = GPR(copy(rt_value)); | |
6952 | std::string rs = GPR(copy(rs_value)); | |
6953 | std::string shift = IMMEDIATE(copy(shift_value)); | |
6954 | ||
6955 | return img::format("DSRA32 %s, %s, %s", rt, rs, shift); | |
6956 | } | |
6957 | ||
6958 | ||
6959 | /* | |
6960 | * | |
6961 | * | |
6962 | * 3 2 1 | |
6963 | * 10987654321098765432109876543210 | |
6964 | * 001000 x1110000101 | |
6965 | * rt ----- | |
6966 | * rs ----- | |
6967 | * rd ----- | |
6968 | */ | |
6969 | std::string NMD::DSRAV(uint64 instruction) | |
6970 | { | |
6971 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 6972 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 6973 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
6974 | |
6975 | std::string rd = GPR(copy(rd_value)); | |
6976 | std::string rs = GPR(copy(rs_value)); | |
6977 | std::string rt = GPR(copy(rt_value)); | |
6978 | ||
6979 | return img::format("DSRAV %s, %s, %s", rd, rs, rt); | |
6980 | } | |
6981 | ||
6982 | ||
6983 | /* | |
6984 | * DSRL - | |
6985 | * | |
6986 | * 3 2 1 | |
6987 | * 10987654321098765432109876543210 | |
6988 | * 10o000 1100xxx0100 | |
6989 | * rt ----- | |
6990 | * rs ----- | |
6991 | * shift ----- | |
6992 | */ | |
6993 | std::string NMD::DSRL(uint64 instruction) | |
6994 | { | |
6995 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 6996 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 6997 | uint64 shift_value = extract_shift_4_3_2_1_0(instruction); |
89a955e8 AM |
6998 | |
6999 | std::string rt = GPR(copy(rt_value)); | |
7000 | std::string rs = GPR(copy(rs_value)); | |
7001 | std::string shift = IMMEDIATE(copy(shift_value)); | |
7002 | ||
7003 | return img::format("DSRL %s, %s, %s", rt, rs, shift); | |
7004 | } | |
7005 | ||
7006 | ||
7007 | /* | |
7008 | * DSRL[32] - | |
7009 | * | |
7010 | * 3 2 1 | |
7011 | * 10987654321098765432109876543210 | |
7012 | * 10o000 1100xxx0010 | |
7013 | * rt ----- | |
7014 | * rs ----- | |
7015 | * shift ----- | |
7016 | */ | |
7017 | std::string NMD::DSRL32(uint64 instruction) | |
7018 | { | |
7019 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 7020 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 7021 | uint64 shift_value = extract_shift_4_3_2_1_0(instruction); |
89a955e8 AM |
7022 | |
7023 | std::string rt = GPR(copy(rt_value)); | |
7024 | std::string rs = GPR(copy(rs_value)); | |
7025 | std::string shift = IMMEDIATE(copy(shift_value)); | |
7026 | ||
7027 | return img::format("DSRL32 %s, %s, %s", rt, rs, shift); | |
7028 | } | |
7029 | ||
7030 | ||
7031 | /* | |
7032 | * | |
7033 | * | |
7034 | * 3 2 1 | |
7035 | * 10987654321098765432109876543210 | |
7036 | * 001000 x1110000101 | |
7037 | * rt ----- | |
7038 | * rs ----- | |
7039 | * rd ----- | |
7040 | */ | |
7041 | std::string NMD::DSRLV(uint64 instruction) | |
7042 | { | |
7043 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 7044 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 7045 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
7046 | |
7047 | std::string rd = GPR(copy(rd_value)); | |
7048 | std::string rs = GPR(copy(rs_value)); | |
7049 | std::string rt = GPR(copy(rt_value)); | |
7050 | ||
7051 | return img::format("DSRLV %s, %s, %s", rd, rs, rt); | |
7052 | } | |
7053 | ||
7054 | ||
7055 | /* | |
7056 | * | |
7057 | * | |
7058 | * 3 2 1 | |
7059 | * 10987654321098765432109876543210 | |
7060 | * 001000 x1110000101 | |
7061 | * rt ----- | |
7062 | * rs ----- | |
7063 | * rd ----- | |
7064 | */ | |
7065 | std::string NMD::DSUB(uint64 instruction) | |
7066 | { | |
7067 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 7068 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 7069 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
7070 | |
7071 | std::string rd = GPR(copy(rd_value)); | |
7072 | std::string rs = GPR(copy(rs_value)); | |
7073 | std::string rt = GPR(copy(rt_value)); | |
7074 | ||
7075 | return img::format("DSUB %s, %s, %s", rd, rs, rt); | |
7076 | } | |
7077 | ||
7078 | ||
7079 | /* | |
7080 | * | |
7081 | * | |
7082 | * 3 2 1 | |
7083 | * 10987654321098765432109876543210 | |
7084 | * 001000 x1110000101 | |
7085 | * rt ----- | |
7086 | * rs ----- | |
7087 | * rd ----- | |
7088 | */ | |
7089 | std::string NMD::DSUBU(uint64 instruction) | |
7090 | { | |
7091 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 7092 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 7093 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
7094 | |
7095 | std::string rd = GPR(copy(rd_value)); | |
7096 | std::string rs = GPR(copy(rs_value)); | |
7097 | std::string rt = GPR(copy(rt_value)); | |
7098 | ||
7099 | return img::format("DSUBU %s, %s, %s", rd, rs, rt); | |
7100 | } | |
7101 | ||
7102 | ||
7103 | /* | |
7104 | * | |
7105 | * | |
7106 | * 3 2 1 | |
7107 | * 10987654321098765432109876543210 | |
7108 | * 001000 x1110000101 | |
7109 | * rt ----- | |
7110 | * rs ----- | |
7111 | * rd ----- | |
7112 | */ | |
7113 | std::string NMD::DVPE(uint64 instruction) | |
7114 | { | |
7115 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
7116 | ||
7117 | std::string rt = GPR(copy(rt_value)); | |
7118 | ||
7119 | return img::format("DVPE %s", rt); | |
7120 | } | |
7121 | ||
7122 | ||
7123 | /* | |
7124 | * | |
7125 | * | |
7126 | * 3 2 1 | |
7127 | * 10987654321098765432109876543210 | |
7128 | * 001000 x1110000101 | |
7129 | * rt ----- | |
7130 | * rs ----- | |
7131 | * rd ----- | |
7132 | */ | |
7133 | std::string NMD::DVP(uint64 instruction) | |
7134 | { | |
7135 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
7136 | ||
7137 | std::string rt = GPR(copy(rt_value)); | |
7138 | ||
7139 | return img::format("DVP %s", rt); | |
7140 | } | |
7141 | ||
7142 | ||
7143 | /* | |
7144 | * | |
7145 | * | |
7146 | * 3 2 1 | |
7147 | * 10987654321098765432109876543210 | |
7148 | * 001000 x1110000101 | |
7149 | * rt ----- | |
7150 | * rs ----- | |
7151 | * rd ----- | |
7152 | */ | |
7153 | std::string NMD::EHB(uint64 instruction) | |
7154 | { | |
7155 | (void)instruction; | |
7156 | ||
7157 | return "EHB "; | |
7158 | } | |
7159 | ||
7160 | ||
7161 | /* | |
7162 | * | |
7163 | * | |
7164 | * 3 2 1 | |
7165 | * 10987654321098765432109876543210 | |
7166 | * 001000 x1110000101 | |
7167 | * rt ----- | |
7168 | * rs ----- | |
7169 | * rd ----- | |
7170 | */ | |
7171 | std::string NMD::EI(uint64 instruction) | |
7172 | { | |
7173 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
7174 | ||
7175 | std::string rt = GPR(copy(rt_value)); | |
7176 | ||
7177 | return img::format("EI %s", rt); | |
7178 | } | |
7179 | ||
7180 | ||
7181 | /* | |
7182 | * | |
7183 | * | |
7184 | * 3 2 1 | |
7185 | * 10987654321098765432109876543210 | |
7186 | * 001000 x1110000101 | |
7187 | * rt ----- | |
7188 | * rs ----- | |
7189 | * rd ----- | |
7190 | */ | |
7191 | std::string NMD::EMT(uint64 instruction) | |
7192 | { | |
7193 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
7194 | ||
7195 | std::string rt = GPR(copy(rt_value)); | |
7196 | ||
7197 | return img::format("EMT %s", rt); | |
7198 | } | |
7199 | ||
7200 | ||
7201 | /* | |
7202 | * | |
7203 | * | |
7204 | * 3 2 1 | |
7205 | * 10987654321098765432109876543210 | |
7206 | * 001000 x1110000101 | |
7207 | * rt ----- | |
7208 | * rs ----- | |
7209 | * rd ----- | |
7210 | */ | |
7211 | std::string NMD::ERET(uint64 instruction) | |
7212 | { | |
7213 | (void)instruction; | |
7214 | ||
7215 | return "ERET "; | |
7216 | } | |
7217 | ||
7218 | ||
7219 | /* | |
7220 | * | |
7221 | * | |
7222 | * 3 2 1 | |
7223 | * 10987654321098765432109876543210 | |
7224 | * 001000 x1110000101 | |
7225 | * rt ----- | |
7226 | * rs ----- | |
7227 | * rd ----- | |
7228 | */ | |
7229 | std::string NMD::ERETNC(uint64 instruction) | |
7230 | { | |
7231 | (void)instruction; | |
7232 | ||
7233 | return "ERETNC "; | |
7234 | } | |
7235 | ||
7236 | ||
7237 | /* | |
7238 | * | |
7239 | * | |
7240 | * 3 2 1 | |
7241 | * 10987654321098765432109876543210 | |
7242 | * 001000 x1110000101 | |
7243 | * rt ----- | |
7244 | * rs ----- | |
7245 | * rd ----- | |
7246 | */ | |
7247 | std::string NMD::EVP(uint64 instruction) | |
7248 | { | |
7249 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
7250 | ||
7251 | std::string rt = GPR(copy(rt_value)); | |
7252 | ||
7253 | return img::format("EVP %s", rt); | |
7254 | } | |
7255 | ||
7256 | ||
7257 | /* | |
7258 | * | |
7259 | * | |
7260 | * 3 2 1 | |
7261 | * 10987654321098765432109876543210 | |
7262 | * 001000 x1110000101 | |
7263 | * rt ----- | |
7264 | * rs ----- | |
7265 | * rd ----- | |
7266 | */ | |
7267 | std::string NMD::EVPE(uint64 instruction) | |
7268 | { | |
7269 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
7270 | ||
7271 | std::string rt = GPR(copy(rt_value)); | |
7272 | ||
7273 | return img::format("EVPE %s", rt); | |
7274 | } | |
7275 | ||
7276 | ||
7277 | /* | |
7278 | * | |
7279 | * | |
7280 | * 3 2 1 | |
7281 | * 10987654321098765432109876543210 | |
7282 | * 001000 x1110000101 | |
7283 | * rt ----- | |
7284 | * rs ----- | |
7285 | * rd ----- | |
7286 | */ | |
7287 | std::string NMD::EXT(uint64 instruction) | |
7288 | { | |
7289 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
75199b40 | 7290 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
89a955e8 AM |
7291 | uint64 msbd_value = extract_msbt_10_9_8_7_6(instruction); |
7292 | uint64 lsb_value = extract_lsb_4_3_2_1_0(instruction); | |
89a955e8 AM |
7293 | |
7294 | std::string rt = GPR(copy(rt_value)); | |
7295 | std::string rs = GPR(copy(rs_value)); | |
7296 | std::string lsb = IMMEDIATE(copy(lsb_value)); | |
7297 | std::string msbd = IMMEDIATE(encode_msbd_from_size(msbd_value)); | |
7298 | ||
7299 | return img::format("EXT %s, %s, %s, %s", rt, rs, lsb, msbd); | |
7300 | } | |
7301 | ||
7302 | ||
7303 | /* | |
7304 | * | |
7305 | * | |
7306 | * 3 2 1 | |
7307 | * 10987654321098765432109876543210 | |
7308 | * 001000 x1110000101 | |
7309 | * rt ----- | |
7310 | * rs ----- | |
7311 | * rd ----- | |
7312 | */ | |
7313 | std::string NMD::EXTD(uint64 instruction) | |
7314 | { | |
7315 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 7316 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 7317 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
75199b40 | 7318 | uint64 shift_value = extract_shift_10_9_8_7_6(instruction); |
89a955e8 AM |
7319 | |
7320 | std::string rd = GPR(copy(rd_value)); | |
7321 | std::string rs = GPR(copy(rs_value)); | |
7322 | std::string rt = GPR(copy(rt_value)); | |
7323 | std::string shift = IMMEDIATE(copy(shift_value)); | |
7324 | ||
7325 | return img::format("EXTD %s, %s, %s, %s", rd, rs, rt, shift); | |
7326 | } | |
7327 | ||
7328 | ||
7329 | /* | |
7330 | * | |
7331 | * | |
7332 | * 3 2 1 | |
7333 | * 10987654321098765432109876543210 | |
7334 | * 001000 x1110000101 | |
7335 | * rt ----- | |
7336 | * rs ----- | |
7337 | * rd ----- | |
7338 | */ | |
7339 | std::string NMD::EXTD32(uint64 instruction) | |
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 AM |
7345 | |
7346 | std::string rd = GPR(copy(rd_value)); | |
7347 | std::string rs = GPR(copy(rs_value)); | |
7348 | std::string rt = GPR(copy(rt_value)); | |
7349 | std::string shift = IMMEDIATE(copy(shift_value)); | |
7350 | ||
7351 | return img::format("EXTD32 %s, %s, %s, %s", rd, rs, rt, shift); | |
7352 | } | |
7353 | ||
7354 | ||
7355 | /* | |
7356 | * | |
7357 | * | |
7358 | * 3 2 1 | |
7359 | * 10987654321098765432109876543210 | |
7360 | * 001000 x1110000101 | |
7361 | * rt ----- | |
7362 | * rs ----- | |
7363 | * rd ----- | |
7364 | */ | |
7365 | std::string NMD::EXTPDP(uint64 instruction) | |
7366 | { | |
7367 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 7368 | uint64 size_value = extract_size_20_19_18_17_16(instruction); |
75199b40 | 7369 | uint64 ac_value = extract_ac_13_12(instruction); |
89a955e8 AM |
7370 | |
7371 | std::string rt = GPR(copy(rt_value)); | |
7372 | std::string ac = AC(copy(ac_value)); | |
7373 | std::string size = IMMEDIATE(copy(size_value)); | |
7374 | ||
7375 | return img::format("EXTPDP %s, %s, %s", rt, ac, size); | |
7376 | } | |
7377 | ||
7378 | ||
7379 | /* | |
7380 | * | |
7381 | * | |
7382 | * 3 2 1 | |
7383 | * 10987654321098765432109876543210 | |
7384 | * 001000 x1110000101 | |
7385 | * rt ----- | |
7386 | * rs ----- | |
7387 | * rd ----- | |
7388 | */ | |
7389 | std::string NMD::EXTPDPV(uint64 instruction) | |
7390 | { | |
7391 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 7392 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 7393 | uint64 ac_value = extract_ac_13_12(instruction); |
89a955e8 AM |
7394 | |
7395 | std::string rt = GPR(copy(rt_value)); | |
7396 | std::string ac = AC(copy(ac_value)); | |
7397 | std::string rs = GPR(copy(rs_value)); | |
7398 | ||
7399 | return img::format("EXTPDPV %s, %s, %s", rt, ac, rs); | |
7400 | } | |
7401 | ||
7402 | ||
7403 | /* | |
7404 | * | |
7405 | * | |
7406 | * 3 2 1 | |
7407 | * 10987654321098765432109876543210 | |
7408 | * 001000 x1110000101 | |
7409 | * rt ----- | |
7410 | * rs ----- | |
7411 | * rd ----- | |
7412 | */ | |
7413 | std::string NMD::EXTP(uint64 instruction) | |
7414 | { | |
7415 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 7416 | uint64 size_value = extract_size_20_19_18_17_16(instruction); |
75199b40 | 7417 | uint64 ac_value = extract_ac_13_12(instruction); |
89a955e8 AM |
7418 | |
7419 | std::string rt = GPR(copy(rt_value)); | |
7420 | std::string ac = AC(copy(ac_value)); | |
7421 | std::string size = IMMEDIATE(copy(size_value)); | |
7422 | ||
7423 | return img::format("EXTP %s, %s, %s", rt, ac, size); | |
7424 | } | |
7425 | ||
7426 | ||
7427 | /* | |
7428 | * | |
7429 | * | |
7430 | * 3 2 1 | |
7431 | * 10987654321098765432109876543210 | |
7432 | * 001000 x1110000101 | |
7433 | * rt ----- | |
7434 | * rs ----- | |
7435 | * rd ----- | |
7436 | */ | |
7437 | std::string NMD::EXTPV(uint64 instruction) | |
7438 | { | |
7439 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 7440 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 7441 | uint64 ac_value = extract_ac_13_12(instruction); |
89a955e8 AM |
7442 | |
7443 | std::string rt = GPR(copy(rt_value)); | |
7444 | std::string ac = AC(copy(ac_value)); | |
7445 | std::string rs = GPR(copy(rs_value)); | |
7446 | ||
7447 | return img::format("EXTPV %s, %s, %s", rt, ac, rs); | |
7448 | } | |
7449 | ||
7450 | ||
7451 | /* | |
7452 | * | |
7453 | * | |
7454 | * 3 2 1 | |
7455 | * 10987654321098765432109876543210 | |
7456 | * 001000 x1110000101 | |
7457 | * rt ----- | |
7458 | * rs ----- | |
7459 | * rd ----- | |
7460 | */ | |
7461 | std::string NMD::EXTR_RS_W(uint64 instruction) | |
7462 | { | |
7463 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
7464 | uint64 shift_value = extract_shift_20_19_18_17_16(instruction); | |
7465 | uint64 ac_value = extract_ac_13_12(instruction); | |
7466 | ||
7467 | std::string rt = GPR(copy(rt_value)); | |
7468 | std::string ac = AC(copy(ac_value)); | |
7469 | std::string shift = IMMEDIATE(copy(shift_value)); | |
7470 | ||
7471 | return img::format("EXTR_RS.W %s, %s, %s", rt, ac, shift); | |
7472 | } | |
7473 | ||
7474 | ||
7475 | /* | |
7476 | * | |
7477 | * | |
7478 | * 3 2 1 | |
7479 | * 10987654321098765432109876543210 | |
7480 | * 001000 x1110000101 | |
7481 | * rt ----- | |
7482 | * rs ----- | |
7483 | * rd ----- | |
7484 | */ | |
7485 | std::string NMD::EXTR_R_W(uint64 instruction) | |
7486 | { | |
7487 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
7488 | uint64 shift_value = extract_shift_20_19_18_17_16(instruction); | |
7489 | uint64 ac_value = extract_ac_13_12(instruction); | |
7490 | ||
7491 | std::string rt = GPR(copy(rt_value)); | |
7492 | std::string ac = AC(copy(ac_value)); | |
7493 | std::string shift = IMMEDIATE(copy(shift_value)); | |
7494 | ||
7495 | return img::format("EXTR_R.W %s, %s, %s", rt, ac, shift); | |
7496 | } | |
7497 | ||
7498 | ||
7499 | /* | |
7500 | * | |
7501 | * | |
7502 | * 3 2 1 | |
7503 | * 10987654321098765432109876543210 | |
7504 | * 001000 x1110000101 | |
7505 | * rt ----- | |
7506 | * rs ----- | |
7507 | * rd ----- | |
7508 | */ | |
7509 | std::string NMD::EXTR_S_H(uint64 instruction) | |
7510 | { | |
7511 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
7512 | uint64 shift_value = extract_shift_20_19_18_17_16(instruction); | |
7513 | uint64 ac_value = extract_ac_13_12(instruction); | |
7514 | ||
7515 | std::string rt = GPR(copy(rt_value)); | |
7516 | std::string ac = AC(copy(ac_value)); | |
7517 | std::string shift = IMMEDIATE(copy(shift_value)); | |
7518 | ||
7519 | return img::format("EXTR_S.H %s, %s, %s", rt, ac, shift); | |
7520 | } | |
7521 | ||
7522 | ||
7523 | /* | |
7524 | * | |
7525 | * | |
7526 | * 3 2 1 | |
7527 | * 10987654321098765432109876543210 | |
7528 | * 001000 x1110000101 | |
7529 | * rt ----- | |
7530 | * rs ----- | |
7531 | * rd ----- | |
7532 | */ | |
7533 | std::string NMD::EXTR_W(uint64 instruction) | |
7534 | { | |
7535 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
7536 | uint64 shift_value = extract_shift_20_19_18_17_16(instruction); | |
7537 | uint64 ac_value = extract_ac_13_12(instruction); | |
7538 | ||
7539 | std::string rt = GPR(copy(rt_value)); | |
7540 | std::string ac = AC(copy(ac_value)); | |
7541 | std::string shift = IMMEDIATE(copy(shift_value)); | |
7542 | ||
7543 | return img::format("EXTR.W %s, %s, %s", rt, ac, shift); | |
7544 | } | |
7545 | ||
7546 | ||
7547 | /* | |
7548 | * | |
7549 | * | |
7550 | * 3 2 1 | |
7551 | * 10987654321098765432109876543210 | |
7552 | * 001000 x1110000101 | |
7553 | * rt ----- | |
7554 | * rs ----- | |
7555 | * rd ----- | |
7556 | */ | |
7557 | std::string NMD::EXTRV_RS_W(uint64 instruction) | |
7558 | { | |
7559 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 7560 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 7561 | uint64 ac_value = extract_ac_13_12(instruction); |
89a955e8 AM |
7562 | |
7563 | std::string rt = GPR(copy(rt_value)); | |
7564 | std::string ac = AC(copy(ac_value)); | |
7565 | std::string rs = GPR(copy(rs_value)); | |
7566 | ||
7567 | return img::format("EXTRV_RS.W %s, %s, %s", rt, ac, rs); | |
7568 | } | |
7569 | ||
7570 | ||
7571 | /* | |
7572 | * | |
7573 | * | |
7574 | * 3 2 1 | |
7575 | * 10987654321098765432109876543210 | |
7576 | * 001000 x1110000101 | |
7577 | * rt ----- | |
7578 | * rs ----- | |
7579 | * rd ----- | |
7580 | */ | |
7581 | std::string NMD::EXTRV_R_W(uint64 instruction) | |
7582 | { | |
7583 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 7584 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 7585 | uint64 ac_value = extract_ac_13_12(instruction); |
89a955e8 AM |
7586 | |
7587 | std::string rt = GPR(copy(rt_value)); | |
7588 | std::string ac = AC(copy(ac_value)); | |
7589 | std::string rs = GPR(copy(rs_value)); | |
7590 | ||
7591 | return img::format("EXTRV_R.W %s, %s, %s", rt, ac, rs); | |
7592 | } | |
7593 | ||
7594 | ||
7595 | /* | |
7596 | * | |
7597 | * | |
7598 | * 3 2 1 | |
7599 | * 10987654321098765432109876543210 | |
7600 | * 001000 x1110000101 | |
7601 | * rt ----- | |
7602 | * rs ----- | |
7603 | * rd ----- | |
7604 | */ | |
7605 | std::string NMD::EXTRV_S_H(uint64 instruction) | |
7606 | { | |
7607 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 7608 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 7609 | uint64 ac_value = extract_ac_13_12(instruction); |
89a955e8 AM |
7610 | |
7611 | std::string rt = GPR(copy(rt_value)); | |
7612 | std::string ac = AC(copy(ac_value)); | |
7613 | std::string rs = GPR(copy(rs_value)); | |
7614 | ||
7615 | return img::format("EXTRV_S.H %s, %s, %s", rt, ac, rs); | |
7616 | } | |
7617 | ||
7618 | ||
7619 | /* | |
7620 | * | |
7621 | * | |
7622 | * 3 2 1 | |
7623 | * 10987654321098765432109876543210 | |
7624 | * 001000 x1110000101 | |
7625 | * rt ----- | |
7626 | * rs ----- | |
7627 | * rd ----- | |
7628 | */ | |
7629 | std::string NMD::EXTRV_W(uint64 instruction) | |
7630 | { | |
7631 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 7632 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 7633 | uint64 ac_value = extract_ac_13_12(instruction); |
89a955e8 AM |
7634 | |
7635 | std::string rt = GPR(copy(rt_value)); | |
7636 | std::string ac = AC(copy(ac_value)); | |
7637 | std::string rs = GPR(copy(rs_value)); | |
7638 | ||
7639 | return img::format("EXTRV.W %s, %s, %s", rt, ac, rs); | |
7640 | } | |
7641 | ||
7642 | ||
7643 | /* | |
7644 | * EXTW - Extract Word | |
7645 | * | |
7646 | * 3 2 1 | |
7647 | * 10987654321098765432109876543210 | |
7648 | * 001000 011111 | |
7649 | * rt ----- | |
7650 | * rs ----- | |
7651 | * rd ----- | |
7652 | * shift ----- | |
7653 | */ | |
7654 | std::string NMD::EXTW(uint64 instruction) | |
7655 | { | |
7656 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 7657 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 7658 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
75199b40 | 7659 | uint64 shift_value = extract_shift_10_9_8_7_6(instruction); |
89a955e8 AM |
7660 | |
7661 | std::string rd = GPR(copy(rd_value)); | |
7662 | std::string rs = GPR(copy(rs_value)); | |
7663 | std::string rt = GPR(copy(rt_value)); | |
7664 | std::string shift = IMMEDIATE(copy(shift_value)); | |
7665 | ||
7666 | return img::format("EXTW %s, %s, %s, %s", rd, rs, rt, shift); | |
7667 | } | |
7668 | ||
7669 | ||
7670 | /* | |
7671 | * | |
7672 | * | |
7673 | * 3 2 1 | |
7674 | * 10987654321098765432109876543210 | |
7675 | * 001000 x1110000101 | |
7676 | * rt ----- | |
7677 | * rs ----- | |
7678 | * rd ----- | |
7679 | */ | |
7680 | std::string NMD::FLOOR_L_D(uint64 instruction) | |
7681 | { | |
17ce2f00 | 7682 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 7683 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 AM |
7684 | |
7685 | std::string ft = FPR(copy(ft_value)); | |
7686 | std::string fs = FPR(copy(fs_value)); | |
7687 | ||
7688 | return img::format("FLOOR.L.D %s, %s", ft, fs); | |
7689 | } | |
7690 | ||
7691 | ||
7692 | /* | |
7693 | * | |
7694 | * | |
7695 | * 3 2 1 | |
7696 | * 10987654321098765432109876543210 | |
7697 | * 001000 x1110000101 | |
7698 | * rt ----- | |
7699 | * rs ----- | |
7700 | * rd ----- | |
7701 | */ | |
7702 | std::string NMD::FLOOR_L_S(uint64 instruction) | |
7703 | { | |
17ce2f00 | 7704 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 7705 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 AM |
7706 | |
7707 | std::string ft = FPR(copy(ft_value)); | |
7708 | std::string fs = FPR(copy(fs_value)); | |
7709 | ||
7710 | return img::format("FLOOR.L.S %s, %s", ft, fs); | |
7711 | } | |
7712 | ||
7713 | ||
7714 | /* | |
7715 | * | |
7716 | * | |
7717 | * 3 2 1 | |
7718 | * 10987654321098765432109876543210 | |
7719 | * 001000 x1110000101 | |
7720 | * rt ----- | |
7721 | * rs ----- | |
7722 | * rd ----- | |
7723 | */ | |
7724 | std::string NMD::FLOOR_W_D(uint64 instruction) | |
7725 | { | |
17ce2f00 | 7726 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 7727 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 AM |
7728 | |
7729 | std::string ft = FPR(copy(ft_value)); | |
7730 | std::string fs = FPR(copy(fs_value)); | |
7731 | ||
7732 | return img::format("FLOOR.W.D %s, %s", ft, fs); | |
7733 | } | |
7734 | ||
7735 | ||
7736 | /* | |
7737 | * | |
7738 | * | |
7739 | * 3 2 1 | |
7740 | * 10987654321098765432109876543210 | |
7741 | * 001000 x1110000101 | |
7742 | * rt ----- | |
7743 | * rs ----- | |
7744 | * rd ----- | |
7745 | */ | |
7746 | std::string NMD::FLOOR_W_S(uint64 instruction) | |
7747 | { | |
17ce2f00 | 7748 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 7749 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 AM |
7750 | |
7751 | std::string ft = FPR(copy(ft_value)); | |
7752 | std::string fs = FPR(copy(fs_value)); | |
7753 | ||
7754 | return img::format("FLOOR.W.S %s, %s", ft, fs); | |
7755 | } | |
7756 | ||
7757 | ||
7758 | /* | |
7759 | * | |
7760 | * | |
7761 | * 3 2 1 | |
7762 | * 10987654321098765432109876543210 | |
7763 | * 001000 x1110000101 | |
7764 | * rt ----- | |
7765 | * rs ----- | |
7766 | * rd ----- | |
7767 | */ | |
7768 | std::string NMD::FORK(uint64 instruction) | |
7769 | { | |
7770 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 7771 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 7772 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
7773 | |
7774 | std::string rd = GPR(copy(rd_value)); | |
7775 | std::string rs = GPR(copy(rs_value)); | |
7776 | std::string rt = GPR(copy(rt_value)); | |
7777 | ||
7778 | return img::format("FORK %s, %s, %s", rd, rs, rt); | |
7779 | } | |
7780 | ||
7781 | ||
7782 | /* | |
7783 | * | |
7784 | * | |
7785 | * 3 2 1 | |
7786 | * 10987654321098765432109876543210 | |
7787 | * 001000 x1110000101 | |
7788 | * rt ----- | |
7789 | * rs ----- | |
7790 | * rd ----- | |
7791 | */ | |
7792 | std::string NMD::HYPCALL(uint64 instruction) | |
7793 | { | |
7794 | uint64 code_value = extract_code_17_to_0(instruction); | |
7795 | ||
7796 | std::string code = IMMEDIATE(copy(code_value)); | |
7797 | ||
7798 | return img::format("HYPCALL %s", code); | |
7799 | } | |
7800 | ||
7801 | ||
7802 | /* | |
7803 | * | |
7804 | * | |
7805 | * 3 2 1 | |
7806 | * 10987654321098765432109876543210 | |
7807 | * 001000 x1110000101 | |
7808 | * rt ----- | |
7809 | * rs ----- | |
7810 | * rd ----- | |
7811 | */ | |
7812 | std::string NMD::HYPCALL_16_(uint64 instruction) | |
7813 | { | |
7814 | uint64 code_value = extract_code_1_0(instruction); | |
7815 | ||
7816 | std::string code = IMMEDIATE(copy(code_value)); | |
7817 | ||
7818 | return img::format("HYPCALL %s", code); | |
7819 | } | |
7820 | ||
7821 | ||
7822 | /* | |
7823 | * | |
7824 | * | |
7825 | * 3 2 1 | |
7826 | * 10987654321098765432109876543210 | |
7827 | * 001000 x1110000101 | |
7828 | * rt ----- | |
7829 | * rs ----- | |
7830 | * rd ----- | |
7831 | */ | |
7832 | std::string NMD::INS(uint64 instruction) | |
7833 | { | |
7834 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
75199b40 | 7835 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
89a955e8 AM |
7836 | uint64 msbd_value = extract_msbt_10_9_8_7_6(instruction); |
7837 | uint64 lsb_value = extract_lsb_4_3_2_1_0(instruction); | |
89a955e8 AM |
7838 | |
7839 | std::string rt = GPR(copy(rt_value)); | |
7840 | std::string rs = GPR(copy(rs_value)); | |
7841 | std::string pos = IMMEDIATE(encode_lsb_from_pos_and_size(lsb_value)); | |
7842 | std::string size = IMMEDIATE(encode_lsb_from_pos_and_size(msbd_value)); | |
7843 | /* !!!!!!!!!! - no conversion function */ | |
7844 | ||
7845 | return img::format("INS %s, %s, %s, %s", rt, rs, pos, size); | |
7846 | /* hand edited */ | |
7847 | } | |
7848 | ||
7849 | ||
7850 | /* | |
7851 | * | |
7852 | * | |
7853 | * 3 2 1 | |
7854 | * 10987654321098765432109876543210 | |
7855 | * 001000 x1110000101 | |
7856 | * rt ----- | |
7857 | * rs ----- | |
7858 | * rd ----- | |
7859 | */ | |
7860 | std::string NMD::INSV(uint64 instruction) | |
7861 | { | |
7862 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
7863 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
7864 | ||
7865 | std::string rt = GPR(copy(rt_value)); | |
7866 | std::string rs = GPR(copy(rs_value)); | |
7867 | ||
7868 | return img::format("INSV %s, %s", rt, rs); | |
7869 | } | |
7870 | ||
7871 | ||
7872 | /* | |
7873 | * | |
7874 | * | |
7875 | * 3 2 1 | |
7876 | * 10987654321098765432109876543210 | |
7877 | * 001000 x1110000101 | |
7878 | * rt ----- | |
7879 | * rs ----- | |
7880 | * rd ----- | |
7881 | */ | |
7882 | std::string NMD::IRET(uint64 instruction) | |
7883 | { | |
7884 | (void)instruction; | |
7885 | ||
7886 | return "IRET "; | |
7887 | } | |
7888 | ||
7889 | ||
7890 | /* | |
7891 | * | |
7892 | * | |
7893 | * 3 2 1 | |
7894 | * 10987654321098765432109876543210 | |
7895 | * 001000 x1110000101 | |
7896 | * rt ----- | |
7897 | * rs ----- | |
7898 | * rd ----- | |
7899 | */ | |
7900 | std::string NMD::JALRC_16_(uint64 instruction) | |
7901 | { | |
7902 | uint64 rt_value = extract_rt_9_8_7_6_5(instruction); | |
7903 | ||
7904 | std::string rt = GPR(copy(rt_value)); | |
7905 | ||
7906 | return img::format("JALRC $%d, %s", 31, rt); | |
7907 | } | |
7908 | ||
7909 | ||
7910 | /* | |
7911 | * | |
7912 | * | |
7913 | * 3 2 1 | |
7914 | * 10987654321098765432109876543210 | |
7915 | * 001000 x1110000101 | |
7916 | * rt ----- | |
7917 | * rs ----- | |
7918 | * rd ----- | |
7919 | */ | |
7920 | std::string NMD::JALRC_32_(uint64 instruction) | |
7921 | { | |
7922 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
7923 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
7924 | ||
7925 | std::string rt = GPR(copy(rt_value)); | |
7926 | std::string rs = GPR(copy(rs_value)); | |
7927 | ||
7928 | return img::format("JALRC %s, %s", rt, rs); | |
7929 | } | |
7930 | ||
7931 | ||
7932 | /* | |
7933 | * | |
7934 | * | |
7935 | * 3 2 1 | |
7936 | * 10987654321098765432109876543210 | |
7937 | * 001000 x1110000101 | |
7938 | * rt ----- | |
7939 | * rs ----- | |
7940 | * rd ----- | |
7941 | */ | |
7942 | std::string NMD::JALRC_HB(uint64 instruction) | |
7943 | { | |
7944 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
7945 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
7946 | ||
7947 | std::string rt = GPR(copy(rt_value)); | |
7948 | std::string rs = GPR(copy(rs_value)); | |
7949 | ||
7950 | return img::format("JALRC.HB %s, %s", rt, rs); | |
7951 | } | |
7952 | ||
7953 | ||
7954 | /* | |
7955 | * | |
7956 | * | |
7957 | * 3 2 1 | |
7958 | * 10987654321098765432109876543210 | |
7959 | * 001000 x1110000101 | |
7960 | * rt ----- | |
7961 | * rs ----- | |
7962 | * rd ----- | |
7963 | */ | |
7964 | std::string NMD::JRC(uint64 instruction) | |
7965 | { | |
7966 | uint64 rt_value = extract_rt_9_8_7_6_5(instruction); | |
7967 | ||
7968 | std::string rt = GPR(copy(rt_value)); | |
7969 | ||
7970 | return img::format("JRC %s", rt); | |
7971 | } | |
7972 | ||
7973 | ||
7974 | /* | |
7975 | * | |
7976 | * | |
7977 | * 3 2 1 | |
7978 | * 10987654321098765432109876543210 | |
7979 | * 001000 x1110000101 | |
7980 | * rt ----- | |
7981 | * rs ----- | |
7982 | * rd ----- | |
7983 | */ | |
7984 | std::string NMD::LB_16_(uint64 instruction) | |
7985 | { | |
89a955e8 AM |
7986 | uint64 rt3_value = extract_rt3_9_8_7(instruction); |
7987 | uint64 rs3_value = extract_rs3_6_5_4(instruction); | |
75199b40 | 7988 | uint64 u_value = extract_u_1_0(instruction); |
89a955e8 | 7989 | |
988d6c89 | 7990 | std::string rt3 = GPR(decode_gpr_gpr3(rt3_value)); |
89a955e8 | 7991 | std::string u = IMMEDIATE(copy(u_value)); |
988d6c89 | 7992 | std::string rs3 = GPR(decode_gpr_gpr3(rs3_value)); |
89a955e8 AM |
7993 | |
7994 | return img::format("LB %s, %s(%s)", rt3, u, rs3); | |
7995 | } | |
7996 | ||
7997 | ||
7998 | /* | |
7999 | * | |
8000 | * | |
8001 | * 3 2 1 | |
8002 | * 10987654321098765432109876543210 | |
8003 | * 001000 x1110000101 | |
8004 | * rt ----- | |
8005 | * rs ----- | |
8006 | * rd ----- | |
8007 | */ | |
8008 | std::string NMD::LB_GP_(uint64 instruction) | |
8009 | { | |
8010 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
8011 | uint64 u_value = extract_u_17_to_0(instruction); | |
8012 | ||
8013 | std::string rt = GPR(copy(rt_value)); | |
8014 | std::string u = IMMEDIATE(copy(u_value)); | |
8015 | ||
8016 | return img::format("LB %s, %s($%d)", rt, u, 28); | |
8017 | } | |
8018 | ||
8019 | ||
8020 | /* | |
8021 | * | |
8022 | * | |
8023 | * 3 2 1 | |
8024 | * 10987654321098765432109876543210 | |
8025 | * 001000 x1110000101 | |
8026 | * rt ----- | |
8027 | * rs ----- | |
8028 | * rd ----- | |
8029 | */ | |
8030 | std::string NMD::LB_S9_(uint64 instruction) | |
8031 | { | |
8032 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 8033 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 8034 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
89a955e8 AM |
8035 | |
8036 | std::string rt = GPR(copy(rt_value)); | |
8037 | std::string s = IMMEDIATE(copy(s_value)); | |
8038 | std::string rs = GPR(copy(rs_value)); | |
8039 | ||
8040 | return img::format("LB %s, %s(%s)", rt, s, rs); | |
8041 | } | |
8042 | ||
8043 | ||
8044 | /* | |
8045 | * | |
8046 | * | |
8047 | * 3 2 1 | |
8048 | * 10987654321098765432109876543210 | |
8049 | * 001000 x1110000101 | |
8050 | * rt ----- | |
8051 | * rs ----- | |
8052 | * rd ----- | |
8053 | */ | |
8054 | std::string NMD::LB_U12_(uint64 instruction) | |
8055 | { | |
8056 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 8057 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 8058 | uint64 u_value = extract_u_11_10_9_8_7_6_5_4_3_2_1_0(instruction); |
89a955e8 AM |
8059 | |
8060 | std::string rt = GPR(copy(rt_value)); | |
8061 | std::string u = IMMEDIATE(copy(u_value)); | |
8062 | std::string rs = GPR(copy(rs_value)); | |
8063 | ||
8064 | return img::format("LB %s, %s(%s)", rt, u, rs); | |
8065 | } | |
8066 | ||
8067 | ||
8068 | /* | |
8069 | * | |
8070 | * | |
8071 | * 3 2 1 | |
8072 | * 10987654321098765432109876543210 | |
8073 | * 001000 x1110000101 | |
8074 | * rt ----- | |
8075 | * rs ----- | |
8076 | * rd ----- | |
8077 | */ | |
8078 | std::string NMD::LBE(uint64 instruction) | |
8079 | { | |
8080 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 8081 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 8082 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
89a955e8 AM |
8083 | |
8084 | std::string rt = GPR(copy(rt_value)); | |
8085 | std::string s = IMMEDIATE(copy(s_value)); | |
8086 | std::string rs = GPR(copy(rs_value)); | |
8087 | ||
8088 | return img::format("LBE %s, %s(%s)", rt, s, rs); | |
8089 | } | |
8090 | ||
8091 | ||
8092 | /* | |
8093 | * | |
8094 | * | |
8095 | * 3 2 1 | |
8096 | * 10987654321098765432109876543210 | |
8097 | * 001000 x1110000101 | |
8098 | * rt ----- | |
8099 | * rs ----- | |
8100 | * rd ----- | |
8101 | */ | |
8102 | std::string NMD::LBU_16_(uint64 instruction) | |
8103 | { | |
89a955e8 AM |
8104 | uint64 rt3_value = extract_rt3_9_8_7(instruction); |
8105 | uint64 rs3_value = extract_rs3_6_5_4(instruction); | |
75199b40 | 8106 | uint64 u_value = extract_u_1_0(instruction); |
89a955e8 | 8107 | |
988d6c89 | 8108 | std::string rt3 = GPR(decode_gpr_gpr3(rt3_value)); |
89a955e8 | 8109 | std::string u = IMMEDIATE(copy(u_value)); |
988d6c89 | 8110 | std::string rs3 = GPR(decode_gpr_gpr3(rs3_value)); |
89a955e8 AM |
8111 | |
8112 | return img::format("LBU %s, %s(%s)", rt3, u, rs3); | |
8113 | } | |
8114 | ||
8115 | ||
8116 | /* | |
8117 | * | |
8118 | * | |
8119 | * 3 2 1 | |
8120 | * 10987654321098765432109876543210 | |
8121 | * 001000 x1110000101 | |
8122 | * rt ----- | |
8123 | * rs ----- | |
8124 | * rd ----- | |
8125 | */ | |
8126 | std::string NMD::LBU_GP_(uint64 instruction) | |
8127 | { | |
8128 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
8129 | uint64 u_value = extract_u_17_to_0(instruction); | |
8130 | ||
8131 | std::string rt = GPR(copy(rt_value)); | |
8132 | std::string u = IMMEDIATE(copy(u_value)); | |
8133 | ||
8134 | return img::format("LBU %s, %s($%d)", rt, u, 28); | |
8135 | } | |
8136 | ||
8137 | ||
8138 | /* | |
8139 | * | |
8140 | * | |
8141 | * 3 2 1 | |
8142 | * 10987654321098765432109876543210 | |
8143 | * 001000 x1110000101 | |
8144 | * rt ----- | |
8145 | * rs ----- | |
8146 | * rd ----- | |
8147 | */ | |
8148 | std::string NMD::LBU_S9_(uint64 instruction) | |
8149 | { | |
8150 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 8151 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 8152 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
89a955e8 AM |
8153 | |
8154 | std::string rt = GPR(copy(rt_value)); | |
8155 | std::string s = IMMEDIATE(copy(s_value)); | |
8156 | std::string rs = GPR(copy(rs_value)); | |
8157 | ||
8158 | return img::format("LBU %s, %s(%s)", rt, s, rs); | |
8159 | } | |
8160 | ||
8161 | ||
8162 | /* | |
8163 | * | |
8164 | * | |
8165 | * 3 2 1 | |
8166 | * 10987654321098765432109876543210 | |
8167 | * 001000 x1110000101 | |
8168 | * rt ----- | |
8169 | * rs ----- | |
8170 | * rd ----- | |
8171 | */ | |
8172 | std::string NMD::LBU_U12_(uint64 instruction) | |
8173 | { | |
8174 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 8175 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 8176 | uint64 u_value = extract_u_11_10_9_8_7_6_5_4_3_2_1_0(instruction); |
89a955e8 AM |
8177 | |
8178 | std::string rt = GPR(copy(rt_value)); | |
8179 | std::string u = IMMEDIATE(copy(u_value)); | |
8180 | std::string rs = GPR(copy(rs_value)); | |
8181 | ||
8182 | return img::format("LBU %s, %s(%s)", rt, u, rs); | |
8183 | } | |
8184 | ||
8185 | ||
8186 | /* | |
8187 | * | |
8188 | * | |
8189 | * 3 2 1 | |
8190 | * 10987654321098765432109876543210 | |
8191 | * 001000 x1110000101 | |
8192 | * rt ----- | |
8193 | * rs ----- | |
8194 | * rd ----- | |
8195 | */ | |
8196 | std::string NMD::LBUE(uint64 instruction) | |
8197 | { | |
8198 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 8199 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 8200 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
89a955e8 AM |
8201 | |
8202 | std::string rt = GPR(copy(rt_value)); | |
8203 | std::string s = IMMEDIATE(copy(s_value)); | |
8204 | std::string rs = GPR(copy(rs_value)); | |
8205 | ||
8206 | return img::format("LBUE %s, %s(%s)", rt, s, rs); | |
8207 | } | |
8208 | ||
8209 | ||
8210 | /* | |
8211 | * | |
8212 | * | |
8213 | * 3 2 1 | |
8214 | * 10987654321098765432109876543210 | |
8215 | * 001000 x1110000101 | |
8216 | * rt ----- | |
8217 | * rs ----- | |
8218 | * rd ----- | |
8219 | */ | |
8220 | std::string NMD::LBUX(uint64 instruction) | |
8221 | { | |
8222 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 8223 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 8224 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
8225 | |
8226 | std::string rd = GPR(copy(rd_value)); | |
8227 | std::string rs = GPR(copy(rs_value)); | |
8228 | std::string rt = GPR(copy(rt_value)); | |
8229 | ||
8230 | return img::format("LBUX %s, %s(%s)", rd, rs, rt); | |
8231 | } | |
8232 | ||
8233 | ||
8234 | /* | |
8235 | * | |
8236 | * | |
8237 | * 3 2 1 | |
8238 | * 10987654321098765432109876543210 | |
8239 | * 001000 x1110000101 | |
8240 | * rt ----- | |
8241 | * rs ----- | |
8242 | * rd ----- | |
8243 | */ | |
8244 | std::string NMD::LBX(uint64 instruction) | |
8245 | { | |
8246 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 8247 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 8248 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
8249 | |
8250 | std::string rd = GPR(copy(rd_value)); | |
8251 | std::string rs = GPR(copy(rs_value)); | |
8252 | std::string rt = GPR(copy(rt_value)); | |
8253 | ||
8254 | return img::format("LBX %s, %s(%s)", rd, rs, rt); | |
8255 | } | |
8256 | ||
8257 | ||
8258 | /* | |
8259 | * | |
8260 | * | |
8261 | * 3 2 1 | |
8262 | * 10987654321098765432109876543210 | |
8263 | * 001000 x1110000101 | |
8264 | * rt ----- | |
8265 | * rs ----- | |
8266 | * rd ----- | |
8267 | */ | |
8268 | std::string NMD::LD_GP_(uint64 instruction) | |
8269 | { | |
8270 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
11b9732a | 8271 | uint64 u_value = extract_u_20_to_3__s3(instruction); |
89a955e8 AM |
8272 | |
8273 | std::string rt = GPR(copy(rt_value)); | |
8274 | std::string u = IMMEDIATE(copy(u_value)); | |
8275 | ||
8276 | return img::format("LD %s, %s($%d)", rt, u, 28); | |
8277 | } | |
8278 | ||
8279 | ||
8280 | /* | |
8281 | * | |
8282 | * | |
8283 | * 3 2 1 | |
8284 | * 10987654321098765432109876543210 | |
8285 | * 001000 x1110000101 | |
8286 | * rt ----- | |
8287 | * rs ----- | |
8288 | * rd ----- | |
8289 | */ | |
8290 | std::string NMD::LD_S9_(uint64 instruction) | |
8291 | { | |
8292 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 8293 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 8294 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
89a955e8 AM |
8295 | |
8296 | std::string rt = GPR(copy(rt_value)); | |
8297 | std::string s = IMMEDIATE(copy(s_value)); | |
8298 | std::string rs = GPR(copy(rs_value)); | |
8299 | ||
8300 | return img::format("LD %s, %s(%s)", rt, s, rs); | |
8301 | } | |
8302 | ||
8303 | ||
8304 | /* | |
8305 | * | |
8306 | * | |
8307 | * 3 2 1 | |
8308 | * 10987654321098765432109876543210 | |
8309 | * 001000 x1110000101 | |
8310 | * rt ----- | |
8311 | * rs ----- | |
8312 | * rd ----- | |
8313 | */ | |
8314 | std::string NMD::LD_U12_(uint64 instruction) | |
8315 | { | |
8316 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 8317 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 8318 | uint64 u_value = extract_u_11_10_9_8_7_6_5_4_3_2_1_0(instruction); |
89a955e8 AM |
8319 | |
8320 | std::string rt = GPR(copy(rt_value)); | |
8321 | std::string u = IMMEDIATE(copy(u_value)); | |
8322 | std::string rs = GPR(copy(rs_value)); | |
8323 | ||
8324 | return img::format("LD %s, %s(%s)", rt, u, rs); | |
8325 | } | |
8326 | ||
8327 | ||
8328 | /* | |
8329 | * | |
8330 | * | |
8331 | * 3 2 1 | |
8332 | * 10987654321098765432109876543210 | |
8333 | * 001000 x1110000101 | |
8334 | * rt ----- | |
8335 | * rs ----- | |
8336 | * rd ----- | |
8337 | */ | |
8338 | std::string NMD::LDC1_GP_(uint64 instruction) | |
8339 | { | |
17ce2f00 | 8340 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
11b9732a | 8341 | uint64 u_value = extract_u_17_to_2__s2(instruction); |
89a955e8 AM |
8342 | |
8343 | std::string ft = FPR(copy(ft_value)); | |
8344 | std::string u = IMMEDIATE(copy(u_value)); | |
8345 | ||
8346 | return img::format("LDC1 %s, %s($%d)", ft, u, 28); | |
8347 | } | |
8348 | ||
8349 | ||
8350 | /* | |
8351 | * | |
8352 | * | |
8353 | * 3 2 1 | |
8354 | * 10987654321098765432109876543210 | |
8355 | * 001000 x1110000101 | |
8356 | * rt ----- | |
8357 | * rs ----- | |
8358 | * rd ----- | |
8359 | */ | |
8360 | std::string NMD::LDC1_S9_(uint64 instruction) | |
8361 | { | |
17ce2f00 | 8362 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
89a955e8 | 8363 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 8364 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
89a955e8 AM |
8365 | |
8366 | std::string ft = FPR(copy(ft_value)); | |
8367 | std::string s = IMMEDIATE(copy(s_value)); | |
8368 | std::string rs = GPR(copy(rs_value)); | |
8369 | ||
8370 | return img::format("LDC1 %s, %s(%s)", ft, s, rs); | |
8371 | } | |
8372 | ||
8373 | ||
8374 | /* | |
8375 | * | |
8376 | * | |
8377 | * 3 2 1 | |
8378 | * 10987654321098765432109876543210 | |
8379 | * 001000 x1110000101 | |
8380 | * rt ----- | |
8381 | * rs ----- | |
8382 | * rd ----- | |
8383 | */ | |
8384 | std::string NMD::LDC1_U12_(uint64 instruction) | |
8385 | { | |
17ce2f00 | 8386 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
89a955e8 | 8387 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 8388 | uint64 u_value = extract_u_11_10_9_8_7_6_5_4_3_2_1_0(instruction); |
89a955e8 AM |
8389 | |
8390 | std::string ft = FPR(copy(ft_value)); | |
8391 | std::string u = IMMEDIATE(copy(u_value)); | |
8392 | std::string rs = GPR(copy(rs_value)); | |
8393 | ||
8394 | return img::format("LDC1 %s, %s(%s)", ft, u, rs); | |
8395 | } | |
8396 | ||
8397 | ||
8398 | /* | |
8399 | * | |
8400 | * | |
8401 | * 3 2 1 | |
8402 | * 10987654321098765432109876543210 | |
8403 | * 001000 x1110000101 | |
8404 | * rt ----- | |
8405 | * rs ----- | |
8406 | * rd ----- | |
8407 | */ | |
8408 | std::string NMD::LDC1XS(uint64 instruction) | |
8409 | { | |
8410 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 8411 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 8412 | uint64 ft_value = extract_ft_15_14_13_12_11(instruction); |
89a955e8 AM |
8413 | |
8414 | std::string ft = FPR(copy(ft_value)); | |
8415 | std::string rs = GPR(copy(rs_value)); | |
8416 | std::string rt = GPR(copy(rt_value)); | |
8417 | ||
8418 | return img::format("LDC1XS %s, %s(%s)", ft, rs, rt); | |
8419 | } | |
8420 | ||
8421 | ||
8422 | /* | |
8423 | * | |
8424 | * | |
8425 | * 3 2 1 | |
8426 | * 10987654321098765432109876543210 | |
8427 | * 001000 x1110000101 | |
8428 | * rt ----- | |
8429 | * rs ----- | |
8430 | * rd ----- | |
8431 | */ | |
8432 | std::string NMD::LDC1X(uint64 instruction) | |
8433 | { | |
8434 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 8435 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 8436 | uint64 ft_value = extract_ft_15_14_13_12_11(instruction); |
89a955e8 AM |
8437 | |
8438 | std::string ft = FPR(copy(ft_value)); | |
8439 | std::string rs = GPR(copy(rs_value)); | |
8440 | std::string rt = GPR(copy(rt_value)); | |
8441 | ||
8442 | return img::format("LDC1X %s, %s(%s)", ft, rs, rt); | |
8443 | } | |
8444 | ||
8445 | ||
8446 | /* | |
8447 | * | |
8448 | * | |
8449 | * 3 2 1 | |
8450 | * 10987654321098765432109876543210 | |
8451 | * 001000 x1110000101 | |
8452 | * rt ----- | |
8453 | * rs ----- | |
8454 | * rd ----- | |
8455 | */ | |
8456 | std::string NMD::LDC2(uint64 instruction) | |
8457 | { | |
89a955e8 AM |
8458 | uint64 ct_value = extract_ct_25_24_23_22_21(instruction); |
8459 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
75199b40 | 8460 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
89a955e8 AM |
8461 | |
8462 | std::string ct = CPR(copy(ct_value)); | |
8463 | std::string s = IMMEDIATE(copy(s_value)); | |
8464 | std::string rs = GPR(copy(rs_value)); | |
8465 | ||
8466 | return img::format("LDC2 %s, %s(%s)", ct, s, rs); | |
8467 | } | |
8468 | ||
8469 | ||
8470 | /* | |
8471 | * | |
8472 | * | |
8473 | * 3 2 1 | |
8474 | * 10987654321098765432109876543210 | |
8475 | * 001000 x1110000101 | |
8476 | * rt ----- | |
8477 | * rs ----- | |
8478 | * rd ----- | |
8479 | */ | |
8480 | std::string NMD::LDM(uint64 instruction) | |
8481 | { | |
8482 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 8483 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 AM |
8484 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
8485 | uint64 count3_value = extract_count3_14_13_12(instruction); | |
89a955e8 AM |
8486 | |
8487 | std::string rt = GPR(copy(rt_value)); | |
8488 | std::string s = IMMEDIATE(copy(s_value)); | |
8489 | std::string rs = GPR(copy(rs_value)); | |
8490 | std::string count3 = IMMEDIATE(encode_count3_from_count(count3_value)); | |
8491 | ||
8492 | return img::format("LDM %s, %s(%s), %s", rt, s, rs, count3); | |
8493 | } | |
8494 | ||
8495 | ||
8496 | /* | |
8497 | * | |
8498 | * | |
8499 | * 3 2 1 | |
8500 | * 10987654321098765432109876543210 | |
8501 | * 001000 x1110000101 | |
8502 | * rt ----- | |
8503 | * rs ----- | |
8504 | * rd ----- | |
8505 | */ | |
8506 | std::string NMD::LDPC_48_(uint64 instruction) | |
8507 | { | |
8508 | uint64 rt_value = extract_rt_41_40_39_38_37(instruction); | |
d3605cc0 | 8509 | int64 s_value = extract_s__se31_15_to_0_31_to_16(instruction); |
89a955e8 AM |
8510 | |
8511 | std::string rt = GPR(copy(rt_value)); | |
8512 | std::string s = ADDRESS(encode_s_from_address(s_value), 6); | |
8513 | ||
8514 | return img::format("LDPC %s, %s", rt, s); | |
8515 | } | |
8516 | ||
8517 | ||
8518 | /* | |
8519 | * | |
8520 | * | |
8521 | * 3 2 1 | |
8522 | * 10987654321098765432109876543210 | |
8523 | * 001000 x1110000101 | |
8524 | * rt ----- | |
8525 | * rs ----- | |
8526 | * rd ----- | |
8527 | */ | |
8528 | std::string NMD::LDX(uint64 instruction) | |
8529 | { | |
8530 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 8531 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 8532 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
8533 | |
8534 | std::string rd = GPR(copy(rd_value)); | |
8535 | std::string rs = GPR(copy(rs_value)); | |
8536 | std::string rt = GPR(copy(rt_value)); | |
8537 | ||
8538 | return img::format("LDX %s, %s(%s)", rd, rs, rt); | |
8539 | } | |
8540 | ||
8541 | ||
8542 | /* | |
8543 | * | |
8544 | * | |
8545 | * 3 2 1 | |
8546 | * 10987654321098765432109876543210 | |
8547 | * 001000 x1110000101 | |
8548 | * rt ----- | |
8549 | * rs ----- | |
8550 | * rd ----- | |
8551 | */ | |
8552 | std::string NMD::LDXS(uint64 instruction) | |
8553 | { | |
8554 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 8555 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 8556 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
8557 | |
8558 | std::string rd = GPR(copy(rd_value)); | |
8559 | std::string rs = GPR(copy(rs_value)); | |
8560 | std::string rt = GPR(copy(rt_value)); | |
8561 | ||
8562 | return img::format("LDXS %s, %s(%s)", rd, rs, rt); | |
8563 | } | |
8564 | ||
8565 | ||
8566 | /* | |
8567 | * | |
8568 | * | |
8569 | * 3 2 1 | |
8570 | * 10987654321098765432109876543210 | |
8571 | * 001000 x1110000101 | |
8572 | * rt ----- | |
8573 | * rs ----- | |
8574 | * rd ----- | |
8575 | */ | |
8576 | std::string NMD::LH_16_(uint64 instruction) | |
8577 | { | |
89a955e8 AM |
8578 | uint64 rt3_value = extract_rt3_9_8_7(instruction); |
8579 | uint64 rs3_value = extract_rs3_6_5_4(instruction); | |
75199b40 | 8580 | uint64 u_value = extract_u_2_1__s1(instruction); |
89a955e8 | 8581 | |
988d6c89 | 8582 | std::string rt3 = GPR(decode_gpr_gpr3(rt3_value)); |
89a955e8 | 8583 | std::string u = IMMEDIATE(copy(u_value)); |
988d6c89 | 8584 | std::string rs3 = GPR(decode_gpr_gpr3(rs3_value)); |
89a955e8 AM |
8585 | |
8586 | return img::format("LH %s, %s(%s)", rt3, u, rs3); | |
8587 | } | |
8588 | ||
8589 | ||
8590 | /* | |
8591 | * | |
8592 | * | |
8593 | * 3 2 1 | |
8594 | * 10987654321098765432109876543210 | |
8595 | * 001000 x1110000101 | |
8596 | * rt ----- | |
8597 | * rs ----- | |
8598 | * rd ----- | |
8599 | */ | |
8600 | std::string NMD::LH_GP_(uint64 instruction) | |
8601 | { | |
8602 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
11b9732a | 8603 | uint64 u_value = extract_u_17_to_1__s1(instruction); |
89a955e8 AM |
8604 | |
8605 | std::string rt = GPR(copy(rt_value)); | |
8606 | std::string u = IMMEDIATE(copy(u_value)); | |
8607 | ||
8608 | return img::format("LH %s, %s($%d)", rt, u, 28); | |
8609 | } | |
8610 | ||
8611 | ||
8612 | /* | |
8613 | * | |
8614 | * | |
8615 | * 3 2 1 | |
8616 | * 10987654321098765432109876543210 | |
8617 | * 001000 x1110000101 | |
8618 | * rt ----- | |
8619 | * rs ----- | |
8620 | * rd ----- | |
8621 | */ | |
8622 | std::string NMD::LH_S9_(uint64 instruction) | |
8623 | { | |
8624 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 8625 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 8626 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
89a955e8 AM |
8627 | |
8628 | std::string rt = GPR(copy(rt_value)); | |
8629 | std::string s = IMMEDIATE(copy(s_value)); | |
8630 | std::string rs = GPR(copy(rs_value)); | |
8631 | ||
8632 | return img::format("LH %s, %s(%s)", rt, s, rs); | |
8633 | } | |
8634 | ||
8635 | ||
8636 | /* | |
8637 | * | |
8638 | * | |
8639 | * 3 2 1 | |
8640 | * 10987654321098765432109876543210 | |
8641 | * 001000 x1110000101 | |
8642 | * rt ----- | |
8643 | * rs ----- | |
8644 | * rd ----- | |
8645 | */ | |
8646 | std::string NMD::LH_U12_(uint64 instruction) | |
8647 | { | |
8648 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 8649 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 8650 | uint64 u_value = extract_u_11_10_9_8_7_6_5_4_3_2_1_0(instruction); |
89a955e8 AM |
8651 | |
8652 | std::string rt = GPR(copy(rt_value)); | |
8653 | std::string u = IMMEDIATE(copy(u_value)); | |
8654 | std::string rs = GPR(copy(rs_value)); | |
8655 | ||
8656 | return img::format("LH %s, %s(%s)", rt, u, rs); | |
8657 | } | |
8658 | ||
8659 | ||
8660 | /* | |
8661 | * | |
8662 | * | |
8663 | * 3 2 1 | |
8664 | * 10987654321098765432109876543210 | |
8665 | * 001000 x1110000101 | |
8666 | * rt ----- | |
8667 | * rs ----- | |
8668 | * rd ----- | |
8669 | */ | |
8670 | std::string NMD::LHE(uint64 instruction) | |
8671 | { | |
8672 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 8673 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 8674 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
89a955e8 AM |
8675 | |
8676 | std::string rt = GPR(copy(rt_value)); | |
8677 | std::string s = IMMEDIATE(copy(s_value)); | |
8678 | std::string rs = GPR(copy(rs_value)); | |
8679 | ||
8680 | return img::format("LHE %s, %s(%s)", rt, s, rs); | |
8681 | } | |
8682 | ||
8683 | ||
8684 | /* | |
8685 | * | |
8686 | * | |
8687 | * 3 2 1 | |
8688 | * 10987654321098765432109876543210 | |
8689 | * 001000 x1110000101 | |
8690 | * rt ----- | |
8691 | * rs ----- | |
8692 | * rd ----- | |
8693 | */ | |
8694 | std::string NMD::LHU_16_(uint64 instruction) | |
8695 | { | |
89a955e8 AM |
8696 | uint64 rt3_value = extract_rt3_9_8_7(instruction); |
8697 | uint64 rs3_value = extract_rs3_6_5_4(instruction); | |
75199b40 | 8698 | uint64 u_value = extract_u_2_1__s1(instruction); |
89a955e8 | 8699 | |
988d6c89 | 8700 | std::string rt3 = GPR(decode_gpr_gpr3(rt3_value)); |
89a955e8 | 8701 | std::string u = IMMEDIATE(copy(u_value)); |
988d6c89 | 8702 | std::string rs3 = GPR(decode_gpr_gpr3(rs3_value)); |
89a955e8 AM |
8703 | |
8704 | return img::format("LHU %s, %s(%s)", rt3, u, rs3); | |
8705 | } | |
8706 | ||
8707 | ||
8708 | /* | |
8709 | * | |
8710 | * | |
8711 | * 3 2 1 | |
8712 | * 10987654321098765432109876543210 | |
8713 | * 001000 x1110000101 | |
8714 | * rt ----- | |
8715 | * rs ----- | |
8716 | * rd ----- | |
8717 | */ | |
8718 | std::string NMD::LHU_GP_(uint64 instruction) | |
8719 | { | |
8720 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
11b9732a | 8721 | uint64 u_value = extract_u_17_to_1__s1(instruction); |
89a955e8 AM |
8722 | |
8723 | std::string rt = GPR(copy(rt_value)); | |
8724 | std::string u = IMMEDIATE(copy(u_value)); | |
8725 | ||
8726 | return img::format("LHU %s, %s($%d)", rt, u, 28); | |
8727 | } | |
8728 | ||
8729 | ||
8730 | /* | |
8731 | * | |
8732 | * | |
8733 | * 3 2 1 | |
8734 | * 10987654321098765432109876543210 | |
8735 | * 001000 x1110000101 | |
8736 | * rt ----- | |
8737 | * rs ----- | |
8738 | * rd ----- | |
8739 | */ | |
8740 | std::string NMD::LHU_S9_(uint64 instruction) | |
8741 | { | |
8742 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 8743 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 8744 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
89a955e8 AM |
8745 | |
8746 | std::string rt = GPR(copy(rt_value)); | |
8747 | std::string s = IMMEDIATE(copy(s_value)); | |
8748 | std::string rs = GPR(copy(rs_value)); | |
8749 | ||
8750 | return img::format("LHU %s, %s(%s)", rt, s, rs); | |
8751 | } | |
8752 | ||
8753 | ||
8754 | /* | |
8755 | * | |
8756 | * | |
8757 | * 3 2 1 | |
8758 | * 10987654321098765432109876543210 | |
8759 | * 001000 x1110000101 | |
8760 | * rt ----- | |
8761 | * rs ----- | |
8762 | * rd ----- | |
8763 | */ | |
8764 | std::string NMD::LHU_U12_(uint64 instruction) | |
8765 | { | |
8766 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 8767 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 8768 | uint64 u_value = extract_u_11_10_9_8_7_6_5_4_3_2_1_0(instruction); |
89a955e8 AM |
8769 | |
8770 | std::string rt = GPR(copy(rt_value)); | |
8771 | std::string u = IMMEDIATE(copy(u_value)); | |
8772 | std::string rs = GPR(copy(rs_value)); | |
8773 | ||
8774 | return img::format("LHU %s, %s(%s)", rt, u, rs); | |
8775 | } | |
8776 | ||
8777 | ||
8778 | /* | |
8779 | * | |
8780 | * | |
8781 | * 3 2 1 | |
8782 | * 10987654321098765432109876543210 | |
8783 | * 001000 x1110000101 | |
8784 | * rt ----- | |
8785 | * rs ----- | |
8786 | * rd ----- | |
8787 | */ | |
8788 | std::string NMD::LHUE(uint64 instruction) | |
8789 | { | |
8790 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 8791 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 8792 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
89a955e8 AM |
8793 | |
8794 | std::string rt = GPR(copy(rt_value)); | |
8795 | std::string s = IMMEDIATE(copy(s_value)); | |
8796 | std::string rs = GPR(copy(rs_value)); | |
8797 | ||
8798 | return img::format("LHUE %s, %s(%s)", rt, s, rs); | |
8799 | } | |
8800 | ||
8801 | ||
8802 | /* | |
8803 | * | |
8804 | * | |
8805 | * 3 2 1 | |
8806 | * 10987654321098765432109876543210 | |
8807 | * 001000 x1110000101 | |
8808 | * rt ----- | |
8809 | * rs ----- | |
8810 | * rd ----- | |
8811 | */ | |
8812 | std::string NMD::LHUX(uint64 instruction) | |
8813 | { | |
8814 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 8815 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 8816 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
8817 | |
8818 | std::string rd = GPR(copy(rd_value)); | |
8819 | std::string rs = GPR(copy(rs_value)); | |
8820 | std::string rt = GPR(copy(rt_value)); | |
8821 | ||
8822 | return img::format("LHUX %s, %s(%s)", rd, rs, rt); | |
8823 | } | |
8824 | ||
8825 | ||
8826 | /* | |
8827 | * | |
8828 | * | |
8829 | * 3 2 1 | |
8830 | * 10987654321098765432109876543210 | |
8831 | * 001000 x1110000101 | |
8832 | * rt ----- | |
8833 | * rs ----- | |
8834 | * rd ----- | |
8835 | */ | |
8836 | std::string NMD::LHUXS(uint64 instruction) | |
8837 | { | |
8838 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 8839 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 8840 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
8841 | |
8842 | std::string rd = GPR(copy(rd_value)); | |
8843 | std::string rs = GPR(copy(rs_value)); | |
8844 | std::string rt = GPR(copy(rt_value)); | |
8845 | ||
8846 | return img::format("LHUXS %s, %s(%s)", rd, rs, rt); | |
8847 | } | |
8848 | ||
8849 | ||
8850 | /* | |
8851 | * | |
8852 | * | |
8853 | * 3 2 1 | |
8854 | * 10987654321098765432109876543210 | |
8855 | * 001000 x1110000101 | |
8856 | * rt ----- | |
8857 | * rs ----- | |
8858 | * rd ----- | |
8859 | */ | |
8860 | std::string NMD::LHXS(uint64 instruction) | |
8861 | { | |
8862 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 8863 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 8864 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
8865 | |
8866 | std::string rd = GPR(copy(rd_value)); | |
8867 | std::string rs = GPR(copy(rs_value)); | |
8868 | std::string rt = GPR(copy(rt_value)); | |
8869 | ||
8870 | return img::format("LHXS %s, %s(%s)", rd, rs, rt); | |
8871 | } | |
8872 | ||
8873 | ||
8874 | /* | |
8875 | * | |
8876 | * | |
8877 | * 3 2 1 | |
8878 | * 10987654321098765432109876543210 | |
8879 | * 001000 x1110000101 | |
8880 | * rt ----- | |
8881 | * rs ----- | |
8882 | * rd ----- | |
8883 | */ | |
8884 | std::string NMD::LHX(uint64 instruction) | |
8885 | { | |
8886 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 8887 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 8888 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
8889 | |
8890 | std::string rd = GPR(copy(rd_value)); | |
8891 | std::string rs = GPR(copy(rs_value)); | |
8892 | std::string rt = GPR(copy(rt_value)); | |
8893 | ||
8894 | return img::format("LHX %s, %s(%s)", rd, rs, rt); | |
8895 | } | |
8896 | ||
8897 | ||
8898 | /* | |
8899 | * | |
8900 | * | |
8901 | * 3 2 1 | |
8902 | * 10987654321098765432109876543210 | |
8903 | * 001000 x1110000101 | |
8904 | * rt ----- | |
8905 | * rs ----- | |
8906 | * rd ----- | |
8907 | */ | |
8908 | std::string NMD::LI_16_(uint64 instruction) | |
8909 | { | |
89a955e8 | 8910 | uint64 rt3_value = extract_rt3_9_8_7(instruction); |
75199b40 | 8911 | uint64 eu_value = extract_eu_6_5_4_3_2_1_0(instruction); |
89a955e8 | 8912 | |
988d6c89 | 8913 | std::string rt3 = GPR(decode_gpr_gpr3(rt3_value)); |
89a955e8 AM |
8914 | std::string eu = IMMEDIATE(encode_eu_from_s_li16(eu_value)); |
8915 | ||
8916 | return img::format("LI %s, %s", rt3, eu); | |
8917 | } | |
8918 | ||
8919 | ||
8920 | /* | |
8921 | * | |
8922 | * | |
8923 | * 3 2 1 | |
8924 | * 10987654321098765432109876543210 | |
8925 | * 001000 x1110000101 | |
8926 | * rt ----- | |
8927 | * rs ----- | |
8928 | * rd ----- | |
8929 | */ | |
8930 | std::string NMD::LI_48_(uint64 instruction) | |
8931 | { | |
8932 | uint64 rt_value = extract_rt_41_40_39_38_37(instruction); | |
d3605cc0 | 8933 | int64 s_value = extract_s__se31_15_to_0_31_to_16(instruction); |
89a955e8 AM |
8934 | |
8935 | std::string rt = GPR(copy(rt_value)); | |
8936 | std::string s = IMMEDIATE(copy(s_value)); | |
8937 | ||
8938 | return img::format("LI %s, %s", rt, s); | |
8939 | } | |
8940 | ||
8941 | ||
8942 | /* | |
8943 | * | |
8944 | * | |
8945 | * 3 2 1 | |
8946 | * 10987654321098765432109876543210 | |
8947 | * 001000 x1110000101 | |
8948 | * rt ----- | |
8949 | * rs ----- | |
8950 | * rd ----- | |
8951 | */ | |
8952 | std::string NMD::LL(uint64 instruction) | |
8953 | { | |
8954 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 8955 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 8956 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_s2(instruction); |
89a955e8 AM |
8957 | |
8958 | std::string rt = GPR(copy(rt_value)); | |
8959 | std::string s = IMMEDIATE(copy(s_value)); | |
8960 | std::string rs = GPR(copy(rs_value)); | |
8961 | ||
8962 | return img::format("LL %s, %s(%s)", rt, s, rs); | |
8963 | } | |
8964 | ||
8965 | ||
8966 | /* | |
8967 | * | |
8968 | * | |
8969 | * 3 2 1 | |
8970 | * 10987654321098765432109876543210 | |
8971 | * 001000 x1110000101 | |
8972 | * rt ----- | |
8973 | * rs ----- | |
8974 | * rd ----- | |
8975 | */ | |
8976 | std::string NMD::LLD(uint64 instruction) | |
8977 | { | |
8978 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 8979 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 8980 | int64 s_value = extract_s__se8_15_7_6_5_4_3_s3(instruction); |
89a955e8 AM |
8981 | |
8982 | std::string rt = GPR(copy(rt_value)); | |
8983 | std::string s = IMMEDIATE(copy(s_value)); | |
8984 | std::string rs = GPR(copy(rs_value)); | |
8985 | ||
8986 | return img::format("LLD %s, %s(%s)", rt, s, rs); | |
8987 | } | |
8988 | ||
8989 | ||
8990 | /* | |
8991 | * | |
8992 | * | |
8993 | * 3 2 1 | |
8994 | * 10987654321098765432109876543210 | |
8995 | * 001000 x1110000101 | |
8996 | * rt ----- | |
8997 | * rs ----- | |
8998 | * rd ----- | |
8999 | */ | |
9000 | std::string NMD::LLDP(uint64 instruction) | |
9001 | { | |
9002 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 9003 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 9004 | uint64 ru_value = extract_ru_7_6_5_4_3(instruction); |
89a955e8 AM |
9005 | |
9006 | std::string rt = GPR(copy(rt_value)); | |
9007 | std::string ru = GPR(copy(ru_value)); | |
9008 | std::string rs = GPR(copy(rs_value)); | |
9009 | ||
9010 | return img::format("LLDP %s, %s, (%s)", rt, ru, rs); | |
9011 | } | |
9012 | ||
9013 | ||
9014 | /* | |
9015 | * | |
9016 | * | |
9017 | * 3 2 1 | |
9018 | * 10987654321098765432109876543210 | |
9019 | * 001000 x1110000101 | |
9020 | * rt ----- | |
9021 | * rs ----- | |
9022 | * rd ----- | |
9023 | */ | |
9024 | std::string NMD::LLE(uint64 instruction) | |
9025 | { | |
9026 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 9027 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 9028 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_s2(instruction); |
89a955e8 AM |
9029 | |
9030 | std::string rt = GPR(copy(rt_value)); | |
9031 | std::string s = IMMEDIATE(copy(s_value)); | |
9032 | std::string rs = GPR(copy(rs_value)); | |
9033 | ||
9034 | return img::format("LLE %s, %s(%s)", rt, s, rs); | |
9035 | } | |
9036 | ||
9037 | ||
9038 | /* | |
9039 | * | |
9040 | * | |
9041 | * 3 2 1 | |
9042 | * 10987654321098765432109876543210 | |
9043 | * 001000 x1110000101 | |
9044 | * rt ----- | |
9045 | * rs ----- | |
9046 | * rd ----- | |
9047 | */ | |
9048 | std::string NMD::LLWP(uint64 instruction) | |
9049 | { | |
9050 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 9051 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 9052 | uint64 ru_value = extract_ru_7_6_5_4_3(instruction); |
89a955e8 AM |
9053 | |
9054 | std::string rt = GPR(copy(rt_value)); | |
9055 | std::string ru = GPR(copy(ru_value)); | |
9056 | std::string rs = GPR(copy(rs_value)); | |
9057 | ||
9058 | return img::format("LLWP %s, %s, (%s)", rt, ru, rs); | |
9059 | } | |
9060 | ||
9061 | ||
9062 | /* | |
9063 | * | |
9064 | * | |
9065 | * 3 2 1 | |
9066 | * 10987654321098765432109876543210 | |
9067 | * 001000 x1110000101 | |
9068 | * rt ----- | |
9069 | * rs ----- | |
9070 | * rd ----- | |
9071 | */ | |
9072 | std::string NMD::LLWPE(uint64 instruction) | |
9073 | { | |
9074 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 9075 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 9076 | uint64 ru_value = extract_ru_7_6_5_4_3(instruction); |
89a955e8 AM |
9077 | |
9078 | std::string rt = GPR(copy(rt_value)); | |
9079 | std::string ru = GPR(copy(ru_value)); | |
9080 | std::string rs = GPR(copy(rs_value)); | |
9081 | ||
9082 | return img::format("LLWPE %s, %s, (%s)", rt, ru, rs); | |
9083 | } | |
9084 | ||
9085 | ||
9086 | /* | |
9087 | * | |
9088 | * | |
9089 | * 3 2 1 | |
9090 | * 10987654321098765432109876543210 | |
9091 | * 001000 x1110000101 | |
9092 | * rt ----- | |
9093 | * rs ----- | |
9094 | * rd ----- | |
9095 | */ | |
9096 | std::string NMD::LSA(uint64 instruction) | |
9097 | { | |
9098 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
75199b40 | 9099 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
b4c5d21c | 9100 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 | 9101 | uint64 u2_value = extract_u2_10_9(instruction); |
89a955e8 AM |
9102 | |
9103 | std::string rd = GPR(copy(rd_value)); | |
9104 | std::string rs = GPR(copy(rs_value)); | |
9105 | std::string rt = GPR(copy(rt_value)); | |
9106 | std::string u2 = IMMEDIATE(copy(u2_value)); | |
9107 | ||
9108 | return img::format("LSA %s, %s, %s, %s", rd, rs, rt, u2); | |
9109 | } | |
9110 | ||
9111 | ||
9112 | /* | |
9113 | * | |
9114 | * | |
9115 | * 3 2 1 | |
9116 | * 10987654321098765432109876543210 | |
9117 | * 001000 x1110000101 | |
9118 | * rt ----- | |
9119 | * rs ----- | |
9120 | * rd ----- | |
9121 | */ | |
9122 | std::string NMD::LUI(uint64 instruction) | |
9123 | { | |
9124 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
d3605cc0 | 9125 | int64 s_value = extract_s__se31_0_11_to_2_20_to_12_s12(instruction); |
89a955e8 AM |
9126 | |
9127 | std::string rt = GPR(copy(rt_value)); | |
9128 | std::string s = IMMEDIATE(copy(s_value)); | |
9129 | ||
9130 | return img::format("LUI %s, %%hi(%s)", rt, s); | |
9131 | } | |
9132 | ||
9133 | ||
9134 | /* | |
9135 | * | |
9136 | * | |
9137 | * 3 2 1 | |
9138 | * 10987654321098765432109876543210 | |
9139 | * 001000 x1110000101 | |
9140 | * rt ----- | |
9141 | * rs ----- | |
9142 | * rd ----- | |
9143 | */ | |
9144 | std::string NMD::LW_16_(uint64 instruction) | |
9145 | { | |
89a955e8 AM |
9146 | uint64 rt3_value = extract_rt3_9_8_7(instruction); |
9147 | uint64 rs3_value = extract_rs3_6_5_4(instruction); | |
75199b40 | 9148 | uint64 u_value = extract_u_3_2_1_0__s2(instruction); |
89a955e8 | 9149 | |
988d6c89 | 9150 | std::string rt3 = GPR(decode_gpr_gpr3(rt3_value)); |
89a955e8 | 9151 | std::string u = IMMEDIATE(copy(u_value)); |
988d6c89 | 9152 | std::string rs3 = GPR(decode_gpr_gpr3(rs3_value)); |
89a955e8 AM |
9153 | |
9154 | return img::format("LW %s, %s(%s)", rt3, u, rs3); | |
9155 | } | |
9156 | ||
9157 | ||
9158 | /* | |
9159 | * | |
9160 | * | |
9161 | * 3 2 1 | |
9162 | * 10987654321098765432109876543210 | |
9163 | * 001000 x1110000101 | |
9164 | * rt ----- | |
9165 | * rs ----- | |
9166 | * rd ----- | |
9167 | */ | |
9168 | std::string NMD::LW_4X4_(uint64 instruction) | |
9169 | { | |
89a955e8 | 9170 | uint64 rt4_value = extract_rt4_9_7_6_5(instruction); |
75199b40 | 9171 | uint64 rs4_value = extract_rs4_4_2_1_0(instruction); |
11b9732a | 9172 | uint64 u_value = extract_u_3_8__s2(instruction); |
89a955e8 | 9173 | |
131e9b92 | 9174 | std::string rt4 = GPR(decode_gpr_gpr4(rt4_value)); |
89a955e8 | 9175 | std::string u = IMMEDIATE(copy(u_value)); |
131e9b92 | 9176 | std::string rs4 = GPR(decode_gpr_gpr4(rs4_value)); |
89a955e8 AM |
9177 | |
9178 | return img::format("LW %s, %s(%s)", rt4, u, rs4); | |
9179 | } | |
9180 | ||
9181 | ||
9182 | /* | |
9183 | * | |
9184 | * | |
9185 | * 3 2 1 | |
9186 | * 10987654321098765432109876543210 | |
9187 | * 001000 x1110000101 | |
9188 | * rt ----- | |
9189 | * rs ----- | |
9190 | * rd ----- | |
9191 | */ | |
9192 | std::string NMD::LW_GP_(uint64 instruction) | |
9193 | { | |
9194 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
11b9732a | 9195 | uint64 u_value = extract_u_20_to_2__s2(instruction); |
89a955e8 AM |
9196 | |
9197 | std::string rt = GPR(copy(rt_value)); | |
9198 | std::string u = IMMEDIATE(copy(u_value)); | |
9199 | ||
9200 | return img::format("LW %s, %s($%d)", rt, u, 28); | |
9201 | } | |
9202 | ||
9203 | ||
9204 | /* | |
9205 | * | |
9206 | * | |
9207 | * 3 2 1 | |
9208 | * 10987654321098765432109876543210 | |
9209 | * 001000 x1110000101 | |
9210 | * rt ----- | |
9211 | * rs ----- | |
9212 | * rd ----- | |
9213 | */ | |
9214 | std::string NMD::LW_GP16_(uint64 instruction) | |
9215 | { | |
89a955e8 | 9216 | uint64 rt3_value = extract_rt3_9_8_7(instruction); |
75199b40 | 9217 | uint64 u_value = extract_u_6_5_4_3_2_1_0__s2(instruction); |
89a955e8 | 9218 | |
988d6c89 | 9219 | std::string rt3 = GPR(decode_gpr_gpr3(rt3_value)); |
89a955e8 AM |
9220 | std::string u = IMMEDIATE(copy(u_value)); |
9221 | ||
9222 | return img::format("LW %s, %s($%d)", rt3, u, 28); | |
9223 | } | |
9224 | ||
9225 | ||
9226 | /* | |
9227 | * | |
9228 | * | |
9229 | * 3 2 1 | |
9230 | * 10987654321098765432109876543210 | |
9231 | * 001000 x1110000101 | |
9232 | * rt ----- | |
9233 | * rs ----- | |
9234 | * rd ----- | |
9235 | */ | |
9236 | std::string NMD::LW_S9_(uint64 instruction) | |
9237 | { | |
9238 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 9239 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 9240 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
89a955e8 AM |
9241 | |
9242 | std::string rt = GPR(copy(rt_value)); | |
9243 | std::string s = IMMEDIATE(copy(s_value)); | |
9244 | std::string rs = GPR(copy(rs_value)); | |
9245 | ||
9246 | return img::format("LW %s, %s(%s)", rt, s, rs); | |
9247 | } | |
9248 | ||
9249 | ||
9250 | /* | |
9251 | * | |
9252 | * | |
9253 | * 3 2 1 | |
9254 | * 10987654321098765432109876543210 | |
9255 | * 001000 x1110000101 | |
9256 | * rt ----- | |
9257 | * rs ----- | |
9258 | * rd ----- | |
9259 | */ | |
9260 | std::string NMD::LW_SP_(uint64 instruction) | |
9261 | { | |
9262 | uint64 rt_value = extract_rt_9_8_7_6_5(instruction); | |
11b9732a | 9263 | uint64 u_value = extract_u_4_3_2_1_0__s2(instruction); |
89a955e8 AM |
9264 | |
9265 | std::string rt = GPR(copy(rt_value)); | |
9266 | std::string u = IMMEDIATE(copy(u_value)); | |
9267 | ||
9268 | return img::format("LW %s, %s($%d)", rt, u, 29); | |
9269 | } | |
9270 | ||
9271 | ||
9272 | /* | |
9273 | * | |
9274 | * | |
9275 | * 3 2 1 | |
9276 | * 10987654321098765432109876543210 | |
9277 | * 001000 x1110000101 | |
9278 | * rt ----- | |
9279 | * rs ----- | |
9280 | * rd ----- | |
9281 | */ | |
9282 | std::string NMD::LW_U12_(uint64 instruction) | |
9283 | { | |
9284 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 9285 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 9286 | uint64 u_value = extract_u_11_10_9_8_7_6_5_4_3_2_1_0(instruction); |
89a955e8 AM |
9287 | |
9288 | std::string rt = GPR(copy(rt_value)); | |
9289 | std::string u = IMMEDIATE(copy(u_value)); | |
9290 | std::string rs = GPR(copy(rs_value)); | |
9291 | ||
9292 | return img::format("LW %s, %s(%s)", rt, u, rs); | |
9293 | } | |
9294 | ||
9295 | ||
9296 | /* | |
9297 | * | |
9298 | * | |
9299 | * 3 2 1 | |
9300 | * 10987654321098765432109876543210 | |
9301 | * 001000 x1110000101 | |
9302 | * rt ----- | |
9303 | * rs ----- | |
9304 | * rd ----- | |
9305 | */ | |
9306 | std::string NMD::LWC1_GP_(uint64 instruction) | |
9307 | { | |
17ce2f00 | 9308 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
11b9732a | 9309 | uint64 u_value = extract_u_17_to_2__s2(instruction); |
89a955e8 AM |
9310 | |
9311 | std::string ft = FPR(copy(ft_value)); | |
9312 | std::string u = IMMEDIATE(copy(u_value)); | |
9313 | ||
9314 | return img::format("LWC1 %s, %s($%d)", ft, u, 28); | |
9315 | } | |
9316 | ||
9317 | ||
9318 | /* | |
9319 | * | |
9320 | * | |
9321 | * 3 2 1 | |
9322 | * 10987654321098765432109876543210 | |
9323 | * 001000 x1110000101 | |
9324 | * rt ----- | |
9325 | * rs ----- | |
9326 | * rd ----- | |
9327 | */ | |
9328 | std::string NMD::LWC1_S9_(uint64 instruction) | |
9329 | { | |
17ce2f00 | 9330 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
89a955e8 | 9331 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 9332 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
89a955e8 AM |
9333 | |
9334 | std::string ft = FPR(copy(ft_value)); | |
9335 | std::string s = IMMEDIATE(copy(s_value)); | |
9336 | std::string rs = GPR(copy(rs_value)); | |
9337 | ||
9338 | return img::format("LWC1 %s, %s(%s)", ft, s, rs); | |
9339 | } | |
9340 | ||
9341 | ||
9342 | /* | |
9343 | * | |
9344 | * | |
9345 | * 3 2 1 | |
9346 | * 10987654321098765432109876543210 | |
9347 | * 001000 x1110000101 | |
9348 | * rt ----- | |
9349 | * rs ----- | |
9350 | * rd ----- | |
9351 | */ | |
9352 | std::string NMD::LWC1_U12_(uint64 instruction) | |
9353 | { | |
17ce2f00 | 9354 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
89a955e8 | 9355 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 9356 | uint64 u_value = extract_u_11_10_9_8_7_6_5_4_3_2_1_0(instruction); |
89a955e8 AM |
9357 | |
9358 | std::string ft = FPR(copy(ft_value)); | |
9359 | std::string u = IMMEDIATE(copy(u_value)); | |
9360 | std::string rs = GPR(copy(rs_value)); | |
9361 | ||
9362 | return img::format("LWC1 %s, %s(%s)", ft, u, rs); | |
9363 | } | |
9364 | ||
9365 | ||
9366 | /* | |
9367 | * | |
9368 | * | |
9369 | * 3 2 1 | |
9370 | * 10987654321098765432109876543210 | |
9371 | * 001000 x1110000101 | |
9372 | * rt ----- | |
9373 | * rs ----- | |
9374 | * rd ----- | |
9375 | */ | |
9376 | std::string NMD::LWC1X(uint64 instruction) | |
9377 | { | |
9378 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 9379 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 9380 | uint64 ft_value = extract_ft_15_14_13_12_11(instruction); |
89a955e8 AM |
9381 | |
9382 | std::string ft = FPR(copy(ft_value)); | |
9383 | std::string rs = GPR(copy(rs_value)); | |
9384 | std::string rt = GPR(copy(rt_value)); | |
9385 | ||
9386 | return img::format("LWC1X %s, %s(%s)", ft, rs, rt); | |
9387 | } | |
9388 | ||
9389 | ||
9390 | /* | |
9391 | * | |
9392 | * | |
9393 | * 3 2 1 | |
9394 | * 10987654321098765432109876543210 | |
9395 | * 001000 x1110000101 | |
9396 | * rt ----- | |
9397 | * rs ----- | |
9398 | * rd ----- | |
9399 | */ | |
9400 | std::string NMD::LWC1XS(uint64 instruction) | |
9401 | { | |
9402 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 9403 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 9404 | uint64 ft_value = extract_ft_15_14_13_12_11(instruction); |
89a955e8 AM |
9405 | |
9406 | std::string ft = FPR(copy(ft_value)); | |
9407 | std::string rs = GPR(copy(rs_value)); | |
9408 | std::string rt = GPR(copy(rt_value)); | |
9409 | ||
9410 | return img::format("LWC1XS %s, %s(%s)", ft, rs, rt); | |
9411 | } | |
9412 | ||
9413 | ||
9414 | /* | |
9415 | * | |
9416 | * | |
9417 | * 3 2 1 | |
9418 | * 10987654321098765432109876543210 | |
9419 | * 001000 x1110000101 | |
9420 | * rt ----- | |
9421 | * rs ----- | |
9422 | * rd ----- | |
9423 | */ | |
9424 | std::string NMD::LWC2(uint64 instruction) | |
9425 | { | |
89a955e8 AM |
9426 | uint64 ct_value = extract_ct_25_24_23_22_21(instruction); |
9427 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
75199b40 | 9428 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
89a955e8 AM |
9429 | |
9430 | std::string ct = CPR(copy(ct_value)); | |
9431 | std::string s = IMMEDIATE(copy(s_value)); | |
9432 | std::string rs = GPR(copy(rs_value)); | |
9433 | ||
9434 | return img::format("LWC2 %s, %s(%s)", ct, s, rs); | |
9435 | } | |
9436 | ||
9437 | ||
9438 | /* | |
9439 | * | |
9440 | * | |
9441 | * 3 2 1 | |
9442 | * 10987654321098765432109876543210 | |
9443 | * 001000 x1110000101 | |
9444 | * rt ----- | |
9445 | * rs ----- | |
9446 | * rd ----- | |
9447 | */ | |
9448 | std::string NMD::LWE(uint64 instruction) | |
9449 | { | |
9450 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 9451 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 9452 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
89a955e8 AM |
9453 | |
9454 | std::string rt = GPR(copy(rt_value)); | |
9455 | std::string s = IMMEDIATE(copy(s_value)); | |
9456 | std::string rs = GPR(copy(rs_value)); | |
9457 | ||
9458 | return img::format("LWE %s, %s(%s)", rt, s, rs); | |
9459 | } | |
9460 | ||
9461 | ||
9462 | /* | |
9463 | * | |
9464 | * | |
9465 | * 3 2 1 | |
9466 | * 10987654321098765432109876543210 | |
9467 | * 001000 x1110000101 | |
9468 | * rt ----- | |
9469 | * rs ----- | |
9470 | * rd ----- | |
9471 | */ | |
9472 | std::string NMD::LWM(uint64 instruction) | |
9473 | { | |
9474 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 9475 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 AM |
9476 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
9477 | uint64 count3_value = extract_count3_14_13_12(instruction); | |
89a955e8 AM |
9478 | |
9479 | std::string rt = GPR(copy(rt_value)); | |
9480 | std::string s = IMMEDIATE(copy(s_value)); | |
9481 | std::string rs = GPR(copy(rs_value)); | |
9482 | std::string count3 = IMMEDIATE(encode_count3_from_count(count3_value)); | |
9483 | ||
9484 | return img::format("LWM %s, %s(%s), %s", rt, s, rs, count3); | |
9485 | } | |
9486 | ||
9487 | ||
9488 | /* | |
9489 | * | |
9490 | * | |
9491 | * 3 2 1 | |
9492 | * 10987654321098765432109876543210 | |
9493 | * 001000 x1110000101 | |
9494 | * rt ----- | |
9495 | * rs ----- | |
9496 | * rd ----- | |
9497 | */ | |
9498 | std::string NMD::LWPC_48_(uint64 instruction) | |
9499 | { | |
9500 | uint64 rt_value = extract_rt_41_40_39_38_37(instruction); | |
d3605cc0 | 9501 | int64 s_value = extract_s__se31_15_to_0_31_to_16(instruction); |
89a955e8 AM |
9502 | |
9503 | std::string rt = GPR(copy(rt_value)); | |
9504 | std::string s = ADDRESS(encode_s_from_address(s_value), 6); | |
9505 | ||
9506 | return img::format("LWPC %s, %s", rt, s); | |
9507 | } | |
9508 | ||
9509 | ||
9510 | /* | |
9511 | * | |
9512 | * | |
9513 | * 3 2 1 | |
9514 | * 10987654321098765432109876543210 | |
9515 | * 001000 x1110000101 | |
9516 | * rt ----- | |
9517 | * rs ----- | |
9518 | * rd ----- | |
9519 | */ | |
9520 | std::string NMD::LWU_GP_(uint64 instruction) | |
9521 | { | |
9522 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
11b9732a | 9523 | uint64 u_value = extract_u_17_to_2__s2(instruction); |
89a955e8 AM |
9524 | |
9525 | std::string rt = GPR(copy(rt_value)); | |
9526 | std::string u = IMMEDIATE(copy(u_value)); | |
9527 | ||
9528 | return img::format("LWU %s, %s($%d)", rt, u, 28); | |
9529 | } | |
9530 | ||
9531 | ||
9532 | /* | |
9533 | * | |
9534 | * | |
9535 | * 3 2 1 | |
9536 | * 10987654321098765432109876543210 | |
9537 | * 001000 x1110000101 | |
9538 | * rt ----- | |
9539 | * rs ----- | |
9540 | * rd ----- | |
9541 | */ | |
9542 | std::string NMD::LWU_S9_(uint64 instruction) | |
9543 | { | |
9544 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 9545 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 9546 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
89a955e8 AM |
9547 | |
9548 | std::string rt = GPR(copy(rt_value)); | |
9549 | std::string s = IMMEDIATE(copy(s_value)); | |
9550 | std::string rs = GPR(copy(rs_value)); | |
9551 | ||
9552 | return img::format("LWU %s, %s(%s)", rt, s, rs); | |
9553 | } | |
9554 | ||
9555 | ||
9556 | /* | |
9557 | * | |
9558 | * | |
9559 | * 3 2 1 | |
9560 | * 10987654321098765432109876543210 | |
9561 | * 001000 x1110000101 | |
9562 | * rt ----- | |
9563 | * rs ----- | |
9564 | * rd ----- | |
9565 | */ | |
9566 | std::string NMD::LWU_U12_(uint64 instruction) | |
9567 | { | |
9568 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 9569 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 9570 | uint64 u_value = extract_u_11_10_9_8_7_6_5_4_3_2_1_0(instruction); |
89a955e8 AM |
9571 | |
9572 | std::string rt = GPR(copy(rt_value)); | |
9573 | std::string u = IMMEDIATE(copy(u_value)); | |
9574 | std::string rs = GPR(copy(rs_value)); | |
9575 | ||
9576 | return img::format("LWU %s, %s(%s)", rt, u, rs); | |
9577 | } | |
9578 | ||
9579 | ||
9580 | /* | |
9581 | * | |
9582 | * | |
9583 | * 3 2 1 | |
9584 | * 10987654321098765432109876543210 | |
9585 | * 001000 x1110000101 | |
9586 | * rt ----- | |
9587 | * rs ----- | |
9588 | * rd ----- | |
9589 | */ | |
9590 | std::string NMD::LWUX(uint64 instruction) | |
9591 | { | |
9592 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 9593 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 9594 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
9595 | |
9596 | std::string rd = GPR(copy(rd_value)); | |
9597 | std::string rs = GPR(copy(rs_value)); | |
9598 | std::string rt = GPR(copy(rt_value)); | |
9599 | ||
9600 | return img::format("LWUX %s, %s(%s)", rd, rs, rt); | |
9601 | } | |
9602 | ||
9603 | ||
9604 | /* | |
9605 | * | |
9606 | * | |
9607 | * 3 2 1 | |
9608 | * 10987654321098765432109876543210 | |
9609 | * 001000 x1110000101 | |
9610 | * rt ----- | |
9611 | * rs ----- | |
9612 | * rd ----- | |
9613 | */ | |
9614 | std::string NMD::LWUXS(uint64 instruction) | |
9615 | { | |
9616 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 9617 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 9618 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
9619 | |
9620 | std::string rd = GPR(copy(rd_value)); | |
9621 | std::string rs = GPR(copy(rs_value)); | |
9622 | std::string rt = GPR(copy(rt_value)); | |
9623 | ||
9624 | return img::format("LWUXS %s, %s(%s)", rd, rs, rt); | |
9625 | } | |
9626 | ||
9627 | ||
9628 | /* | |
9629 | * | |
9630 | * | |
9631 | * 3 2 1 | |
9632 | * 10987654321098765432109876543210 | |
9633 | * 001000 x1110000101 | |
9634 | * rt ----- | |
9635 | * rs ----- | |
9636 | * rd ----- | |
9637 | */ | |
9638 | std::string NMD::LWX(uint64 instruction) | |
9639 | { | |
9640 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 9641 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 9642 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
9643 | |
9644 | std::string rd = GPR(copy(rd_value)); | |
9645 | std::string rs = GPR(copy(rs_value)); | |
9646 | std::string rt = GPR(copy(rt_value)); | |
9647 | ||
9648 | return img::format("LWX %s, %s(%s)", rd, rs, rt); | |
9649 | } | |
9650 | ||
9651 | ||
9652 | /* | |
9653 | * | |
9654 | * | |
9655 | * 3 2 1 | |
9656 | * 10987654321098765432109876543210 | |
9657 | * 001000 x1110000101 | |
9658 | * rt ----- | |
9659 | * rs ----- | |
9660 | * rd ----- | |
9661 | */ | |
9662 | std::string NMD::LWXS_16_(uint64 instruction) | |
9663 | { | |
89a955e8 AM |
9664 | uint64 rt3_value = extract_rt3_9_8_7(instruction); |
9665 | uint64 rs3_value = extract_rs3_6_5_4(instruction); | |
86b5f803 | 9666 | uint64 rd3_value = extract_rd3_3_2_1(instruction); |
89a955e8 | 9667 | |
988d6c89 AM |
9668 | std::string rd3 = GPR(decode_gpr_gpr3(rd3_value)); |
9669 | std::string rs3 = GPR(decode_gpr_gpr3(rs3_value)); | |
9670 | std::string rt3 = IMMEDIATE(decode_gpr_gpr3(rt3_value)); | |
89a955e8 AM |
9671 | |
9672 | return img::format("LWXS %s, %s(%s)", rd3, rs3, rt3); | |
9673 | } | |
9674 | ||
9675 | ||
9676 | /* | |
9677 | * | |
9678 | * | |
9679 | * 3 2 1 | |
9680 | * 10987654321098765432109876543210 | |
9681 | * 001000 x1110000101 | |
9682 | * rt ----- | |
9683 | * rs ----- | |
9684 | * rd ----- | |
9685 | */ | |
9686 | std::string NMD::LWXS_32_(uint64 instruction) | |
9687 | { | |
9688 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 9689 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 9690 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
9691 | |
9692 | std::string rd = GPR(copy(rd_value)); | |
9693 | std::string rs = GPR(copy(rs_value)); | |
9694 | std::string rt = GPR(copy(rt_value)); | |
9695 | ||
9696 | return img::format("LWXS %s, %s(%s)", rd, rs, rt); | |
9697 | } | |
9698 | ||
9699 | ||
9700 | /* | |
9701 | * | |
9702 | * | |
9703 | * 3 2 1 | |
9704 | * 10987654321098765432109876543210 | |
9705 | * 001000 x1110000101 | |
9706 | * rt ----- | |
9707 | * rs ----- | |
9708 | * rd ----- | |
9709 | */ | |
9710 | std::string NMD::MADD_DSP_(uint64 instruction) | |
9711 | { | |
9712 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 9713 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 9714 | uint64 ac_value = extract_ac_13_12(instruction); |
89a955e8 AM |
9715 | |
9716 | std::string ac = AC(copy(ac_value)); | |
9717 | std::string rs = GPR(copy(rs_value)); | |
9718 | std::string rt = GPR(copy(rt_value)); | |
9719 | ||
9720 | return img::format("MADD %s, %s, %s", ac, rs, rt); | |
9721 | } | |
9722 | ||
9723 | ||
9724 | /* | |
9725 | * | |
9726 | * | |
9727 | * 3 2 1 | |
9728 | * 10987654321098765432109876543210 | |
9729 | * 001000 x1110000101 | |
9730 | * rt ----- | |
9731 | * rs ----- | |
9732 | * rd ----- | |
9733 | */ | |
9734 | std::string NMD::MADDF_D(uint64 instruction) | |
9735 | { | |
17ce2f00 | 9736 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 9737 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 9738 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 AM |
9739 | |
9740 | std::string fd = FPR(copy(fd_value)); | |
9741 | std::string fs = FPR(copy(fs_value)); | |
9742 | std::string ft = FPR(copy(ft_value)); | |
9743 | ||
9744 | return img::format("MADDF.D %s, %s, %s", fd, fs, ft); | |
9745 | } | |
9746 | ||
9747 | ||
9748 | /* | |
9749 | * | |
9750 | * | |
9751 | * 3 2 1 | |
9752 | * 10987654321098765432109876543210 | |
9753 | * 001000 x1110000101 | |
9754 | * rt ----- | |
9755 | * rs ----- | |
9756 | * rd ----- | |
9757 | */ | |
9758 | std::string NMD::MADDF_S(uint64 instruction) | |
9759 | { | |
17ce2f00 | 9760 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 9761 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 9762 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 AM |
9763 | |
9764 | std::string fd = FPR(copy(fd_value)); | |
9765 | std::string fs = FPR(copy(fs_value)); | |
9766 | std::string ft = FPR(copy(ft_value)); | |
9767 | ||
9768 | return img::format("MADDF.S %s, %s, %s", fd, fs, ft); | |
9769 | } | |
9770 | ||
9771 | ||
9772 | /* | |
9773 | * | |
9774 | * | |
9775 | * 3 2 1 | |
9776 | * 10987654321098765432109876543210 | |
9777 | * 001000 x1110000101 | |
9778 | * rt ----- | |
9779 | * rs ----- | |
9780 | * rd ----- | |
9781 | */ | |
9782 | std::string NMD::MADDU_DSP_(uint64 instruction) | |
9783 | { | |
9784 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 9785 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 9786 | uint64 ac_value = extract_ac_13_12(instruction); |
89a955e8 AM |
9787 | |
9788 | std::string ac = AC(copy(ac_value)); | |
9789 | std::string rs = GPR(copy(rs_value)); | |
9790 | std::string rt = GPR(copy(rt_value)); | |
9791 | ||
9792 | return img::format("MADDU %s, %s, %s", ac, rs, rt); | |
9793 | } | |
9794 | ||
9795 | ||
9796 | /* | |
9797 | * | |
9798 | * | |
9799 | * 3 2 1 | |
9800 | * 10987654321098765432109876543210 | |
9801 | * 001000 x1110000101 | |
9802 | * rt ----- | |
9803 | * rs ----- | |
9804 | * rd ----- | |
9805 | */ | |
9806 | std::string NMD::MAQ_S_W_PHL(uint64 instruction) | |
9807 | { | |
9808 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 9809 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 9810 | uint64 ac_value = extract_ac_13_12(instruction); |
89a955e8 AM |
9811 | |
9812 | std::string ac = AC(copy(ac_value)); | |
9813 | std::string rs = GPR(copy(rs_value)); | |
9814 | std::string rt = GPR(copy(rt_value)); | |
9815 | ||
9816 | return img::format("MAQ_S.W.PHL %s, %s, %s", ac, rs, rt); | |
9817 | } | |
9818 | ||
9819 | ||
9820 | /* | |
9821 | * | |
9822 | * | |
9823 | * 3 2 1 | |
9824 | * 10987654321098765432109876543210 | |
9825 | * 001000 x1110000101 | |
9826 | * rt ----- | |
9827 | * rs ----- | |
9828 | * rd ----- | |
9829 | */ | |
9830 | std::string NMD::MAQ_S_W_PHR(uint64 instruction) | |
9831 | { | |
9832 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 9833 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 9834 | uint64 ac_value = extract_ac_13_12(instruction); |
89a955e8 AM |
9835 | |
9836 | std::string ac = AC(copy(ac_value)); | |
9837 | std::string rs = GPR(copy(rs_value)); | |
9838 | std::string rt = GPR(copy(rt_value)); | |
9839 | ||
9840 | return img::format("MAQ_S.W.PHR %s, %s, %s", ac, rs, rt); | |
9841 | } | |
9842 | ||
9843 | ||
9844 | /* | |
9845 | * | |
9846 | * | |
9847 | * 3 2 1 | |
9848 | * 10987654321098765432109876543210 | |
9849 | * 001000 x1110000101 | |
9850 | * rt ----- | |
9851 | * rs ----- | |
9852 | * rd ----- | |
9853 | */ | |
9854 | std::string NMD::MAQ_SA_W_PHL(uint64 instruction) | |
9855 | { | |
9856 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 9857 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 9858 | uint64 ac_value = extract_ac_13_12(instruction); |
89a955e8 AM |
9859 | |
9860 | std::string ac = AC(copy(ac_value)); | |
9861 | std::string rs = GPR(copy(rs_value)); | |
9862 | std::string rt = GPR(copy(rt_value)); | |
9863 | ||
9864 | return img::format("MAQ_SA.W.PHL %s, %s, %s", ac, rs, rt); | |
9865 | } | |
9866 | ||
9867 | ||
9868 | /* | |
9869 | * | |
9870 | * | |
9871 | * 3 2 1 | |
9872 | * 10987654321098765432109876543210 | |
9873 | * 001000 x1110000101 | |
9874 | * rt ----- | |
9875 | * rs ----- | |
9876 | * rd ----- | |
9877 | */ | |
9878 | std::string NMD::MAQ_SA_W_PHR(uint64 instruction) | |
9879 | { | |
9880 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 9881 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 9882 | uint64 ac_value = extract_ac_13_12(instruction); |
89a955e8 AM |
9883 | |
9884 | std::string ac = AC(copy(ac_value)); | |
9885 | std::string rs = GPR(copy(rs_value)); | |
9886 | std::string rt = GPR(copy(rt_value)); | |
9887 | ||
9888 | return img::format("MAQ_SA.W.PHR %s, %s, %s", ac, rs, rt); | |
9889 | } | |
9890 | ||
9891 | ||
9892 | /* | |
9893 | * | |
9894 | * | |
9895 | * 3 2 1 | |
9896 | * 10987654321098765432109876543210 | |
9897 | * 001000 x1110000101 | |
9898 | * rt ----- | |
9899 | * rs ----- | |
9900 | * rd ----- | |
9901 | */ | |
9902 | std::string NMD::MAX_D(uint64 instruction) | |
9903 | { | |
17ce2f00 | 9904 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 9905 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 9906 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 AM |
9907 | |
9908 | std::string fd = FPR(copy(fd_value)); | |
9909 | std::string fs = FPR(copy(fs_value)); | |
9910 | std::string ft = FPR(copy(ft_value)); | |
9911 | ||
9912 | return img::format("MAX.D %s, %s, %s", fd, fs, ft); | |
9913 | } | |
9914 | ||
9915 | ||
9916 | /* | |
9917 | * | |
9918 | * | |
9919 | * 3 2 1 | |
9920 | * 10987654321098765432109876543210 | |
9921 | * 001000 x1110000101 | |
9922 | * rt ----- | |
9923 | * rs ----- | |
9924 | * rd ----- | |
9925 | */ | |
9926 | std::string NMD::MAX_S(uint64 instruction) | |
9927 | { | |
17ce2f00 | 9928 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 9929 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 9930 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 AM |
9931 | |
9932 | std::string fd = FPR(copy(fd_value)); | |
9933 | std::string fs = FPR(copy(fs_value)); | |
9934 | std::string ft = FPR(copy(ft_value)); | |
9935 | ||
9936 | return img::format("MAX.S %s, %s, %s", fd, fs, ft); | |
9937 | } | |
9938 | ||
9939 | ||
9940 | /* | |
9941 | * | |
9942 | * | |
9943 | * 3 2 1 | |
9944 | * 10987654321098765432109876543210 | |
9945 | * 001000 x1110000101 | |
9946 | * rt ----- | |
9947 | * rs ----- | |
9948 | * rd ----- | |
9949 | */ | |
9950 | std::string NMD::MAXA_D(uint64 instruction) | |
9951 | { | |
17ce2f00 | 9952 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 9953 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 9954 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 AM |
9955 | |
9956 | std::string fd = FPR(copy(fd_value)); | |
9957 | std::string fs = FPR(copy(fs_value)); | |
9958 | std::string ft = FPR(copy(ft_value)); | |
9959 | ||
9960 | return img::format("MAXA.D %s, %s, %s", fd, fs, ft); | |
9961 | } | |
9962 | ||
9963 | ||
9964 | /* | |
9965 | * | |
9966 | * | |
9967 | * 3 2 1 | |
9968 | * 10987654321098765432109876543210 | |
9969 | * 001000 x1110000101 | |
9970 | * rt ----- | |
9971 | * rs ----- | |
9972 | * rd ----- | |
9973 | */ | |
9974 | std::string NMD::MAXA_S(uint64 instruction) | |
9975 | { | |
17ce2f00 | 9976 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 9977 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 9978 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 AM |
9979 | |
9980 | std::string fd = FPR(copy(fd_value)); | |
9981 | std::string fs = FPR(copy(fs_value)); | |
9982 | std::string ft = FPR(copy(ft_value)); | |
9983 | ||
9984 | return img::format("MAXA.S %s, %s, %s", fd, fs, ft); | |
9985 | } | |
9986 | ||
9987 | ||
9988 | /* | |
9989 | * | |
9990 | * | |
9991 | * 3 2 1 | |
9992 | * 10987654321098765432109876543210 | |
9993 | * 001000 x1110000101 | |
9994 | * rt ----- | |
9995 | * rs ----- | |
9996 | * rd ----- | |
9997 | */ | |
9998 | std::string NMD::MFC0(uint64 instruction) | |
9999 | { | |
10000 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
10001 | uint64 c0s_value = extract_c0s_20_19_18_17_16(instruction); | |
10002 | uint64 sel_value = extract_sel_15_14_13_12_11(instruction); | |
10003 | ||
10004 | std::string rt = GPR(copy(rt_value)); | |
10005 | std::string c0s = CPR(copy(c0s_value)); | |
10006 | std::string sel = IMMEDIATE(copy(sel_value)); | |
10007 | ||
10008 | return img::format("MFC0 %s, %s, %s", rt, c0s, sel); | |
10009 | } | |
10010 | ||
10011 | ||
10012 | /* | |
10013 | * | |
10014 | * | |
10015 | * 3 2 1 | |
10016 | * 10987654321098765432109876543210 | |
10017 | * 001000 x1110000101 | |
10018 | * rt ----- | |
10019 | * rs ----- | |
10020 | * rd ----- | |
10021 | */ | |
10022 | std::string NMD::MFC1(uint64 instruction) | |
10023 | { | |
10024 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
52a96d22 | 10025 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 AM |
10026 | |
10027 | std::string rt = GPR(copy(rt_value)); | |
10028 | std::string fs = FPR(copy(fs_value)); | |
10029 | ||
10030 | return img::format("MFC1 %s, %s", rt, fs); | |
10031 | } | |
10032 | ||
10033 | ||
10034 | /* | |
10035 | * | |
10036 | * | |
10037 | * 3 2 1 | |
10038 | * 10987654321098765432109876543210 | |
10039 | * 001000 x1110000101 | |
10040 | * rt ----- | |
10041 | * rs ----- | |
10042 | * rd ----- | |
10043 | */ | |
10044 | std::string NMD::MFC2(uint64 instruction) | |
10045 | { | |
89a955e8 | 10046 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); |
86b5f803 | 10047 | uint64 cs_value = extract_cs_20_19_18_17_16(instruction); |
89a955e8 AM |
10048 | |
10049 | std::string rt = GPR(copy(rt_value)); | |
10050 | std::string cs = CPR(copy(cs_value)); | |
10051 | ||
10052 | return img::format("MFC2 %s, %s", rt, cs); | |
10053 | } | |
10054 | ||
10055 | ||
10056 | /* | |
10057 | * | |
10058 | * | |
10059 | * 3 2 1 | |
10060 | * 10987654321098765432109876543210 | |
10061 | * 001000 x1110000101 | |
10062 | * rt ----- | |
10063 | * rs ----- | |
10064 | * rd ----- | |
10065 | */ | |
10066 | std::string NMD::MFGC0(uint64 instruction) | |
10067 | { | |
10068 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
10069 | uint64 c0s_value = extract_c0s_20_19_18_17_16(instruction); | |
10070 | uint64 sel_value = extract_sel_15_14_13_12_11(instruction); | |
10071 | ||
10072 | std::string rt = GPR(copy(rt_value)); | |
10073 | std::string c0s = CPR(copy(c0s_value)); | |
10074 | std::string sel = IMMEDIATE(copy(sel_value)); | |
10075 | ||
10076 | return img::format("MFGC0 %s, %s, %s", rt, c0s, sel); | |
10077 | } | |
10078 | ||
10079 | ||
10080 | /* | |
10081 | * | |
10082 | * | |
10083 | * 3 2 1 | |
10084 | * 10987654321098765432109876543210 | |
10085 | * 001000 x1110000101 | |
10086 | * rt ----- | |
10087 | * rs ----- | |
10088 | * rd ----- | |
10089 | */ | |
10090 | std::string NMD::MFHC0(uint64 instruction) | |
10091 | { | |
10092 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
10093 | uint64 c0s_value = extract_c0s_20_19_18_17_16(instruction); | |
10094 | uint64 sel_value = extract_sel_15_14_13_12_11(instruction); | |
10095 | ||
10096 | std::string rt = GPR(copy(rt_value)); | |
10097 | std::string c0s = CPR(copy(c0s_value)); | |
10098 | std::string sel = IMMEDIATE(copy(sel_value)); | |
10099 | ||
10100 | return img::format("MFHC0 %s, %s, %s", rt, c0s, sel); | |
10101 | } | |
10102 | ||
10103 | ||
10104 | /* | |
10105 | * | |
10106 | * | |
10107 | * 3 2 1 | |
10108 | * 10987654321098765432109876543210 | |
10109 | * 001000 x1110000101 | |
10110 | * rt ----- | |
10111 | * rs ----- | |
10112 | * rd ----- | |
10113 | */ | |
10114 | std::string NMD::MFHC1(uint64 instruction) | |
10115 | { | |
10116 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
52a96d22 | 10117 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 AM |
10118 | |
10119 | std::string rt = GPR(copy(rt_value)); | |
10120 | std::string fs = FPR(copy(fs_value)); | |
10121 | ||
10122 | return img::format("MFHC1 %s, %s", rt, fs); | |
10123 | } | |
10124 | ||
10125 | ||
10126 | /* | |
10127 | * | |
10128 | * | |
10129 | * 3 2 1 | |
10130 | * 10987654321098765432109876543210 | |
10131 | * 001000 x1110000101 | |
10132 | * rt ----- | |
10133 | * rs ----- | |
10134 | * rd ----- | |
10135 | */ | |
10136 | std::string NMD::MFHC2(uint64 instruction) | |
10137 | { | |
89a955e8 | 10138 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); |
86b5f803 | 10139 | uint64 cs_value = extract_cs_20_19_18_17_16(instruction); |
89a955e8 AM |
10140 | |
10141 | std::string rt = GPR(copy(rt_value)); | |
10142 | std::string cs = CPR(copy(cs_value)); | |
10143 | ||
10144 | return img::format("MFHC2 %s, %s", rt, cs); | |
10145 | } | |
10146 | ||
10147 | ||
10148 | /* | |
10149 | * | |
10150 | * | |
10151 | * 3 2 1 | |
10152 | * 10987654321098765432109876543210 | |
10153 | * 001000 x1110000101 | |
10154 | * rt ----- | |
10155 | * rs ----- | |
10156 | * rd ----- | |
10157 | */ | |
10158 | std::string NMD::MFHGC0(uint64 instruction) | |
10159 | { | |
10160 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
10161 | uint64 c0s_value = extract_c0s_20_19_18_17_16(instruction); | |
10162 | uint64 sel_value = extract_sel_15_14_13_12_11(instruction); | |
10163 | ||
10164 | std::string rt = GPR(copy(rt_value)); | |
10165 | std::string c0s = CPR(copy(c0s_value)); | |
10166 | std::string sel = IMMEDIATE(copy(sel_value)); | |
10167 | ||
10168 | return img::format("MFHGC0 %s, %s, %s", rt, c0s, sel); | |
10169 | } | |
10170 | ||
10171 | ||
10172 | /* | |
10173 | * | |
10174 | * | |
10175 | * 3 2 1 | |
10176 | * 10987654321098765432109876543210 | |
10177 | * 001000 x1110000101 | |
10178 | * rt ----- | |
10179 | * rs ----- | |
10180 | * rd ----- | |
10181 | */ | |
10182 | std::string NMD::MFHI_DSP_(uint64 instruction) | |
10183 | { | |
10184 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
10185 | uint64 ac_value = extract_ac_13_12(instruction); | |
10186 | ||
10187 | std::string rt = GPR(copy(rt_value)); | |
10188 | std::string ac = AC(copy(ac_value)); | |
10189 | ||
10190 | return img::format("MFHI %s, %s", rt, ac); | |
10191 | } | |
10192 | ||
10193 | ||
10194 | /* | |
10195 | * | |
10196 | * | |
10197 | * 3 2 1 | |
10198 | * 10987654321098765432109876543210 | |
10199 | * 001000 x1110000101 | |
10200 | * rt ----- | |
10201 | * rs ----- | |
10202 | * rd ----- | |
10203 | */ | |
10204 | std::string NMD::MFHTR(uint64 instruction) | |
10205 | { | |
10206 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
10207 | uint64 c0s_value = extract_c0s_20_19_18_17_16(instruction); | |
10208 | uint64 sel_value = extract_sel_15_14_13_12_11(instruction); | |
10209 | uint64 u_value = extract_u_10(instruction); | |
10210 | ||
10211 | std::string rt = GPR(copy(rt_value)); | |
10212 | std::string c0s = IMMEDIATE(copy(c0s_value)); | |
10213 | std::string u = IMMEDIATE(copy(u_value)); | |
10214 | std::string sel = IMMEDIATE(copy(sel_value)); | |
10215 | ||
10216 | return img::format("MFHTR %s, %s, %s, %s", rt, c0s, u, sel); | |
10217 | } | |
10218 | ||
10219 | ||
10220 | /* | |
10221 | * | |
10222 | * | |
10223 | * 3 2 1 | |
10224 | * 10987654321098765432109876543210 | |
10225 | * 001000 x1110000101 | |
10226 | * rt ----- | |
10227 | * rs ----- | |
10228 | * rd ----- | |
10229 | */ | |
10230 | std::string NMD::MFLO_DSP_(uint64 instruction) | |
10231 | { | |
10232 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
10233 | uint64 ac_value = extract_ac_13_12(instruction); | |
10234 | ||
10235 | std::string rt = GPR(copy(rt_value)); | |
10236 | std::string ac = AC(copy(ac_value)); | |
10237 | ||
10238 | return img::format("MFLO %s, %s", rt, ac); | |
10239 | } | |
10240 | ||
10241 | ||
10242 | /* | |
10243 | * | |
10244 | * | |
10245 | * 3 2 1 | |
10246 | * 10987654321098765432109876543210 | |
10247 | * 001000 x1110000101 | |
10248 | * rt ----- | |
10249 | * rs ----- | |
10250 | * rd ----- | |
10251 | */ | |
10252 | std::string NMD::MFTR(uint64 instruction) | |
10253 | { | |
10254 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
10255 | uint64 c0s_value = extract_c0s_20_19_18_17_16(instruction); | |
10256 | uint64 sel_value = extract_sel_15_14_13_12_11(instruction); | |
10257 | uint64 u_value = extract_u_10(instruction); | |
10258 | ||
10259 | std::string rt = GPR(copy(rt_value)); | |
10260 | std::string c0s = IMMEDIATE(copy(c0s_value)); | |
10261 | std::string u = IMMEDIATE(copy(u_value)); | |
10262 | std::string sel = IMMEDIATE(copy(sel_value)); | |
10263 | ||
10264 | return img::format("MFTR %s, %s, %s, %s", rt, c0s, u, sel); | |
10265 | } | |
10266 | ||
10267 | ||
10268 | /* | |
10269 | * | |
10270 | * | |
10271 | * 3 2 1 | |
10272 | * 10987654321098765432109876543210 | |
10273 | * 001000 x1110000101 | |
10274 | * rt ----- | |
10275 | * rs ----- | |
10276 | * rd ----- | |
10277 | */ | |
10278 | std::string NMD::MIN_D(uint64 instruction) | |
10279 | { | |
17ce2f00 | 10280 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 10281 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 10282 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 AM |
10283 | |
10284 | std::string fd = FPR(copy(fd_value)); | |
10285 | std::string fs = FPR(copy(fs_value)); | |
10286 | std::string ft = FPR(copy(ft_value)); | |
10287 | ||
10288 | return img::format("MIN.D %s, %s, %s", fd, fs, ft); | |
10289 | } | |
10290 | ||
10291 | ||
10292 | /* | |
10293 | * | |
10294 | * | |
10295 | * 3 2 1 | |
10296 | * 10987654321098765432109876543210 | |
10297 | * 001000 x1110000101 | |
10298 | * rt ----- | |
10299 | * rs ----- | |
10300 | * rd ----- | |
10301 | */ | |
10302 | std::string NMD::MIN_S(uint64 instruction) | |
10303 | { | |
17ce2f00 | 10304 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 10305 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 10306 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 AM |
10307 | |
10308 | std::string fd = FPR(copy(fd_value)); | |
10309 | std::string fs = FPR(copy(fs_value)); | |
10310 | std::string ft = FPR(copy(ft_value)); | |
10311 | ||
10312 | return img::format("MIN.S %s, %s, %s", fd, fs, ft); | |
10313 | } | |
10314 | ||
10315 | ||
10316 | /* | |
10317 | * | |
10318 | * | |
10319 | * 3 2 1 | |
10320 | * 10987654321098765432109876543210 | |
10321 | * 001000 x1110000101 | |
10322 | * rt ----- | |
10323 | * rs ----- | |
10324 | * rd ----- | |
10325 | */ | |
10326 | std::string NMD::MINA_D(uint64 instruction) | |
10327 | { | |
17ce2f00 | 10328 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 10329 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 10330 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 AM |
10331 | |
10332 | std::string fd = FPR(copy(fd_value)); | |
10333 | std::string fs = FPR(copy(fs_value)); | |
10334 | std::string ft = FPR(copy(ft_value)); | |
10335 | ||
10336 | return img::format("MINA.D %s, %s, %s", fd, fs, ft); | |
10337 | } | |
10338 | ||
10339 | ||
10340 | /* | |
10341 | * | |
10342 | * | |
10343 | * 3 2 1 | |
10344 | * 10987654321098765432109876543210 | |
10345 | * 001000 x1110000101 | |
10346 | * rt ----- | |
10347 | * rs ----- | |
10348 | * rd ----- | |
10349 | */ | |
10350 | std::string NMD::MINA_S(uint64 instruction) | |
10351 | { | |
17ce2f00 | 10352 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 10353 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 10354 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 AM |
10355 | |
10356 | std::string fd = FPR(copy(fd_value)); | |
10357 | std::string fs = FPR(copy(fs_value)); | |
10358 | std::string ft = FPR(copy(ft_value)); | |
10359 | ||
10360 | return img::format("MINA.S %s, %s, %s", fd, fs, ft); | |
10361 | } | |
10362 | ||
10363 | ||
10364 | /* | |
10365 | * | |
10366 | * | |
10367 | * 3 2 1 | |
10368 | * 10987654321098765432109876543210 | |
10369 | * 001000 x1110000101 | |
10370 | * rt ----- | |
10371 | * rs ----- | |
10372 | * rd ----- | |
10373 | */ | |
10374 | std::string NMD::MOD(uint64 instruction) | |
10375 | { | |
10376 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 10377 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 10378 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
10379 | |
10380 | std::string rd = GPR(copy(rd_value)); | |
10381 | std::string rs = GPR(copy(rs_value)); | |
10382 | std::string rt = GPR(copy(rt_value)); | |
10383 | ||
10384 | return img::format("MOD %s, %s, %s", rd, rs, rt); | |
10385 | } | |
10386 | ||
10387 | ||
10388 | /* | |
10389 | * | |
10390 | * | |
10391 | * 3 2 1 | |
10392 | * 10987654321098765432109876543210 | |
10393 | * 001000 x1110000101 | |
10394 | * rt ----- | |
10395 | * rs ----- | |
10396 | * rd ----- | |
10397 | */ | |
10398 | std::string NMD::MODSUB(uint64 instruction) | |
10399 | { | |
10400 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 10401 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 10402 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
10403 | |
10404 | std::string rd = GPR(copy(rd_value)); | |
10405 | std::string rs = GPR(copy(rs_value)); | |
10406 | std::string rt = GPR(copy(rt_value)); | |
10407 | ||
10408 | return img::format("MODSUB %s, %s, %s", rd, rs, rt); | |
10409 | } | |
10410 | ||
10411 | ||
10412 | /* | |
10413 | * | |
10414 | * | |
10415 | * 3 2 1 | |
10416 | * 10987654321098765432109876543210 | |
10417 | * 001000 x1110000101 | |
10418 | * rt ----- | |
10419 | * rs ----- | |
10420 | * rd ----- | |
10421 | */ | |
10422 | std::string NMD::MODU(uint64 instruction) | |
10423 | { | |
10424 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 10425 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 10426 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
10427 | |
10428 | std::string rd = GPR(copy(rd_value)); | |
10429 | std::string rs = GPR(copy(rs_value)); | |
10430 | std::string rt = GPR(copy(rt_value)); | |
10431 | ||
10432 | return img::format("MODU %s, %s, %s", rd, rs, rt); | |
10433 | } | |
10434 | ||
10435 | ||
10436 | /* | |
10437 | * | |
10438 | * | |
10439 | * 3 2 1 | |
10440 | * 10987654321098765432109876543210 | |
10441 | * 001000 x1110000101 | |
10442 | * rt ----- | |
10443 | * rs ----- | |
10444 | * rd ----- | |
10445 | */ | |
10446 | std::string NMD::MOV_D(uint64 instruction) | |
10447 | { | |
17ce2f00 | 10448 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 10449 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 AM |
10450 | |
10451 | std::string ft = FPR(copy(ft_value)); | |
10452 | std::string fs = FPR(copy(fs_value)); | |
10453 | ||
10454 | return img::format("MOV.D %s, %s", ft, fs); | |
10455 | } | |
10456 | ||
10457 | ||
10458 | /* | |
10459 | * | |
10460 | * | |
10461 | * 3 2 1 | |
10462 | * 10987654321098765432109876543210 | |
10463 | * 001000 x1110000101 | |
10464 | * rt ----- | |
10465 | * rs ----- | |
10466 | * rd ----- | |
10467 | */ | |
10468 | std::string NMD::MOV_S(uint64 instruction) | |
10469 | { | |
17ce2f00 | 10470 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 10471 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 AM |
10472 | |
10473 | std::string ft = FPR(copy(ft_value)); | |
10474 | std::string fs = FPR(copy(fs_value)); | |
10475 | ||
10476 | return img::format("MOV.S %s, %s", ft, fs); | |
10477 | } | |
10478 | ||
10479 | ||
10480 | /* | |
10481 | * | |
10482 | * | |
10483 | * 3 2 1 | |
10484 | * 10987654321098765432109876543210 | |
10485 | * 001000 x1110000101 | |
10486 | * rt ----- | |
10487 | * rs ----- | |
10488 | * rd ----- | |
10489 | */ | |
10490 | std::string NMD::MOVE_BALC(uint64 instruction) | |
10491 | { | |
86b5f803 | 10492 | uint64 rtz4_value = extract_rtz4_27_26_25_23_22_21(instruction); |
89a955e8 | 10493 | uint64 rd1_value = extract_rdl_25_24(instruction); |
d3605cc0 | 10494 | int64 s_value = extract_s__se21_0_20_to_1_s1(instruction); |
89a955e8 | 10495 | |
68d80fd5 | 10496 | std::string rd1 = GPR(decode_gpr_gpr1(rd1_value)); |
9980a225 | 10497 | std::string rtz4 = GPR(decode_gpr_gpr4_zero(rtz4_value)); |
89a955e8 AM |
10498 | std::string s = ADDRESS(encode_s_from_address(s_value), 4); |
10499 | ||
10500 | return img::format("MOVE.BALC %s, %s, %s", rd1, rtz4, s); | |
10501 | } | |
10502 | ||
10503 | ||
10504 | /* | |
10505 | * | |
10506 | * | |
10507 | * 3 2 1 | |
10508 | * 10987654321098765432109876543210 | |
10509 | * 001000 x1110000101 | |
10510 | * rt ----- | |
10511 | * rs ----- | |
10512 | * rd ----- | |
10513 | */ | |
10514 | std::string NMD::MOVEP(uint64 instruction) | |
10515 | { | |
89a955e8 AM |
10516 | uint64 rtz4_value = extract_rtz4_9_7_6_5(instruction); |
10517 | uint64 rd2_value = extract_rd2_3_8(instruction); | |
75199b40 | 10518 | uint64 rsz4_value = extract_rsz4_4_2_1_0(instruction); |
89a955e8 | 10519 | |
4671783a | 10520 | std::string rd2 = GPR(decode_gpr_gpr2_reg1(rd2_value)); |
ce0f2617 | 10521 | std::string re2 = GPR(decode_gpr_gpr2_reg2(rd2_value)); |
89a955e8 | 10522 | /* !!!!!!!!!! - no conversion function */ |
9980a225 AM |
10523 | std::string rsz4 = GPR(decode_gpr_gpr4_zero(rsz4_value)); |
10524 | std::string rtz4 = GPR(decode_gpr_gpr4_zero(rtz4_value)); | |
89a955e8 AM |
10525 | |
10526 | return img::format("MOVEP %s, %s, %s, %s", rd2, re2, rsz4, rtz4); | |
10527 | /* hand edited */ | |
10528 | } | |
10529 | ||
10530 | ||
10531 | /* | |
10532 | * | |
10533 | * | |
10534 | * 3 2 1 | |
10535 | * 10987654321098765432109876543210 | |
10536 | * 001000 x1110000101 | |
10537 | * rt ----- | |
10538 | * rs ----- | |
10539 | * rd ----- | |
10540 | */ | |
10541 | std::string NMD::MOVEP_REV_(uint64 instruction) | |
10542 | { | |
89a955e8 AM |
10543 | uint64 rt4_value = extract_rt4_9_7_6_5(instruction); |
10544 | uint64 rd2_value = extract_rd2_3_8(instruction); | |
75199b40 | 10545 | uint64 rs4_value = extract_rs4_4_2_1_0(instruction); |
89a955e8 | 10546 | |
131e9b92 AM |
10547 | std::string rs4 = GPR(decode_gpr_gpr4(rs4_value)); |
10548 | std::string rt4 = GPR(decode_gpr_gpr4(rt4_value)); | |
4671783a | 10549 | std::string rd2 = GPR(decode_gpr_gpr2_reg1(rd2_value)); |
ce0f2617 | 10550 | std::string rs2 = GPR(decode_gpr_gpr2_reg2(rd2_value)); |
89a955e8 AM |
10551 | /* !!!!!!!!!! - no conversion function */ |
10552 | ||
10553 | return img::format("MOVEP %s, %s, %s, %s", rs4, rt4, rd2, rs2); | |
10554 | /* hand edited */ | |
10555 | } | |
10556 | ||
10557 | ||
10558 | /* | |
10559 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
10560 | * | |
10561 | * 3 2 1 | |
10562 | * 10987654321098765432109876543210 | |
10563 | * 001000 00010001101 | |
10564 | * rt ----- | |
10565 | * rs ----- | |
10566 | * rd ----- | |
10567 | */ | |
10568 | std::string NMD::MOVE(uint64 instruction) | |
10569 | { | |
10570 | uint64 rt_value = extract_rt_9_8_7_6_5(instruction); | |
10571 | uint64 rs_value = extract_rs_4_3_2_1_0(instruction); | |
10572 | ||
10573 | std::string rt = GPR(copy(rt_value)); | |
10574 | std::string rs = GPR(copy(rs_value)); | |
10575 | ||
10576 | return img::format("MOVE %s, %s", rt, rs); | |
10577 | } | |
10578 | ||
10579 | ||
10580 | /* | |
10581 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
10582 | * | |
10583 | * 3 2 1 | |
10584 | * 10987654321098765432109876543210 | |
10585 | * 001000 00010001101 | |
10586 | * rt ----- | |
10587 | * rs ----- | |
10588 | * rd ----- | |
10589 | */ | |
10590 | std::string NMD::MOVN(uint64 instruction) | |
10591 | { | |
10592 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 10593 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 10594 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
10595 | |
10596 | std::string rd = GPR(copy(rd_value)); | |
10597 | std::string rs = GPR(copy(rs_value)); | |
10598 | std::string rt = GPR(copy(rt_value)); | |
10599 | ||
10600 | return img::format("MOVN %s, %s, %s", rd, rs, rt); | |
10601 | } | |
10602 | ||
10603 | ||
10604 | /* | |
10605 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
10606 | * | |
10607 | * 3 2 1 | |
10608 | * 10987654321098765432109876543210 | |
10609 | * 001000 00010001101 | |
10610 | * rt ----- | |
10611 | * rs ----- | |
10612 | * rd ----- | |
10613 | */ | |
10614 | std::string NMD::MOVZ(uint64 instruction) | |
10615 | { | |
10616 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 10617 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 10618 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
10619 | |
10620 | std::string rd = GPR(copy(rd_value)); | |
10621 | std::string rs = GPR(copy(rs_value)); | |
10622 | std::string rt = GPR(copy(rt_value)); | |
10623 | ||
10624 | return img::format("MOVZ %s, %s, %s", rd, rs, rt); | |
10625 | } | |
10626 | ||
10627 | ||
10628 | /* | |
10629 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
10630 | * | |
10631 | * 3 2 1 | |
10632 | * 10987654321098765432109876543210 | |
10633 | * 001000 00010001101 | |
10634 | * rt ----- | |
10635 | * rs ----- | |
10636 | * rd ----- | |
10637 | */ | |
10638 | std::string NMD::MSUB_DSP_(uint64 instruction) | |
10639 | { | |
10640 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 10641 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 10642 | uint64 ac_value = extract_ac_13_12(instruction); |
89a955e8 AM |
10643 | |
10644 | std::string ac = AC(copy(ac_value)); | |
10645 | std::string rs = GPR(copy(rs_value)); | |
10646 | std::string rt = GPR(copy(rt_value)); | |
10647 | ||
10648 | return img::format("MSUB %s, %s, %s", ac, rs, rt); | |
10649 | } | |
10650 | ||
10651 | ||
10652 | /* | |
10653 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
10654 | * | |
10655 | * 3 2 1 | |
10656 | * 10987654321098765432109876543210 | |
10657 | * 001000 00010001101 | |
10658 | * rt ----- | |
10659 | * rs ----- | |
10660 | * rd ----- | |
10661 | */ | |
10662 | std::string NMD::MSUBF_D(uint64 instruction) | |
10663 | { | |
17ce2f00 | 10664 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 10665 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 10666 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 AM |
10667 | |
10668 | std::string fd = FPR(copy(fd_value)); | |
10669 | std::string fs = FPR(copy(fs_value)); | |
10670 | std::string ft = FPR(copy(ft_value)); | |
10671 | ||
10672 | return img::format("MSUBF.D %s, %s, %s", fd, fs, ft); | |
10673 | } | |
10674 | ||
10675 | ||
10676 | /* | |
10677 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
10678 | * | |
10679 | * 3 2 1 | |
10680 | * 10987654321098765432109876543210 | |
10681 | * 001000 00010001101 | |
10682 | * rt ----- | |
10683 | * rs ----- | |
10684 | * rd ----- | |
10685 | */ | |
10686 | std::string NMD::MSUBF_S(uint64 instruction) | |
10687 | { | |
17ce2f00 | 10688 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 10689 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 10690 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 AM |
10691 | |
10692 | std::string fd = FPR(copy(fd_value)); | |
10693 | std::string fs = FPR(copy(fs_value)); | |
10694 | std::string ft = FPR(copy(ft_value)); | |
10695 | ||
10696 | return img::format("MSUBF.S %s, %s, %s", fd, fs, ft); | |
10697 | } | |
10698 | ||
10699 | ||
10700 | /* | |
10701 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
10702 | * | |
10703 | * 3 2 1 | |
10704 | * 10987654321098765432109876543210 | |
10705 | * 001000 00010001101 | |
10706 | * rt ----- | |
10707 | * rs ----- | |
10708 | * rd ----- | |
10709 | */ | |
10710 | std::string NMD::MSUBU_DSP_(uint64 instruction) | |
10711 | { | |
10712 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 10713 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 10714 | uint64 ac_value = extract_ac_13_12(instruction); |
89a955e8 AM |
10715 | |
10716 | std::string ac = AC(copy(ac_value)); | |
10717 | std::string rs = GPR(copy(rs_value)); | |
10718 | std::string rt = GPR(copy(rt_value)); | |
10719 | ||
10720 | return img::format("MSUBU %s, %s, %s", ac, rs, rt); | |
10721 | } | |
10722 | ||
10723 | ||
10724 | /* | |
10725 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
10726 | * | |
10727 | * 3 2 1 | |
10728 | * 10987654321098765432109876543210 | |
10729 | * 001000 00010001101 | |
10730 | * rt ----- | |
10731 | * rs ----- | |
10732 | * rd ----- | |
10733 | */ | |
10734 | std::string NMD::MTC0(uint64 instruction) | |
10735 | { | |
10736 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
10737 | uint64 c0s_value = extract_c0s_20_19_18_17_16(instruction); | |
10738 | uint64 sel_value = extract_sel_15_14_13_12_11(instruction); | |
10739 | ||
10740 | std::string rt = GPR(copy(rt_value)); | |
10741 | std::string c0s = CPR(copy(c0s_value)); | |
10742 | std::string sel = IMMEDIATE(copy(sel_value)); | |
10743 | ||
10744 | return img::format("MTC0 %s, %s, %s", rt, c0s, sel); | |
10745 | } | |
10746 | ||
10747 | ||
10748 | /* | |
10749 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
10750 | * | |
10751 | * 3 2 1 | |
10752 | * 10987654321098765432109876543210 | |
10753 | * 001000 00010001101 | |
10754 | * rt ----- | |
10755 | * rs ----- | |
10756 | * rd ----- | |
10757 | */ | |
10758 | std::string NMD::MTC1(uint64 instruction) | |
10759 | { | |
10760 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
52a96d22 | 10761 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 AM |
10762 | |
10763 | std::string rt = GPR(copy(rt_value)); | |
10764 | std::string fs = FPR(copy(fs_value)); | |
10765 | ||
10766 | return img::format("MTC1 %s, %s", rt, fs); | |
10767 | } | |
10768 | ||
10769 | ||
10770 | /* | |
10771 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
10772 | * | |
10773 | * 3 2 1 | |
10774 | * 10987654321098765432109876543210 | |
10775 | * 001000 00010001101 | |
10776 | * rt ----- | |
10777 | * rs ----- | |
10778 | * rd ----- | |
10779 | */ | |
10780 | std::string NMD::MTC2(uint64 instruction) | |
10781 | { | |
89a955e8 | 10782 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); |
86b5f803 | 10783 | uint64 cs_value = extract_cs_20_19_18_17_16(instruction); |
89a955e8 AM |
10784 | |
10785 | std::string rt = GPR(copy(rt_value)); | |
10786 | std::string cs = CPR(copy(cs_value)); | |
10787 | ||
10788 | return img::format("MTC2 %s, %s", rt, cs); | |
10789 | } | |
10790 | ||
10791 | ||
10792 | /* | |
10793 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
10794 | * | |
10795 | * 3 2 1 | |
10796 | * 10987654321098765432109876543210 | |
10797 | * 001000 00010001101 | |
10798 | * rt ----- | |
10799 | * rs ----- | |
10800 | * rd ----- | |
10801 | */ | |
10802 | std::string NMD::MTGC0(uint64 instruction) | |
10803 | { | |
10804 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
10805 | uint64 c0s_value = extract_c0s_20_19_18_17_16(instruction); | |
10806 | uint64 sel_value = extract_sel_15_14_13_12_11(instruction); | |
10807 | ||
10808 | std::string rt = GPR(copy(rt_value)); | |
10809 | std::string c0s = CPR(copy(c0s_value)); | |
10810 | std::string sel = IMMEDIATE(copy(sel_value)); | |
10811 | ||
10812 | return img::format("MTGC0 %s, %s, %s", rt, c0s, sel); | |
10813 | } | |
10814 | ||
10815 | ||
10816 | /* | |
10817 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
10818 | * | |
10819 | * 3 2 1 | |
10820 | * 10987654321098765432109876543210 | |
10821 | * 001000 00010001101 | |
10822 | * rt ----- | |
10823 | * rs ----- | |
10824 | * rd ----- | |
10825 | */ | |
10826 | std::string NMD::MTHC0(uint64 instruction) | |
10827 | { | |
10828 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
10829 | uint64 c0s_value = extract_c0s_20_19_18_17_16(instruction); | |
10830 | uint64 sel_value = extract_sel_15_14_13_12_11(instruction); | |
10831 | ||
10832 | std::string rt = GPR(copy(rt_value)); | |
10833 | std::string c0s = CPR(copy(c0s_value)); | |
10834 | std::string sel = IMMEDIATE(copy(sel_value)); | |
10835 | ||
10836 | return img::format("MTHC0 %s, %s, %s", rt, c0s, sel); | |
10837 | } | |
10838 | ||
10839 | ||
10840 | /* | |
10841 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
10842 | * | |
10843 | * 3 2 1 | |
10844 | * 10987654321098765432109876543210 | |
10845 | * 001000 00010001101 | |
10846 | * rt ----- | |
10847 | * rs ----- | |
10848 | * rd ----- | |
10849 | */ | |
10850 | std::string NMD::MTHC1(uint64 instruction) | |
10851 | { | |
10852 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
52a96d22 | 10853 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 AM |
10854 | |
10855 | std::string rt = GPR(copy(rt_value)); | |
10856 | std::string fs = FPR(copy(fs_value)); | |
10857 | ||
10858 | return img::format("MTHC1 %s, %s", rt, fs); | |
10859 | } | |
10860 | ||
10861 | ||
10862 | /* | |
10863 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
10864 | * | |
10865 | * 3 2 1 | |
10866 | * 10987654321098765432109876543210 | |
10867 | * 001000 00010001101 | |
10868 | * rt ----- | |
10869 | * rs ----- | |
10870 | * rd ----- | |
10871 | */ | |
10872 | std::string NMD::MTHC2(uint64 instruction) | |
10873 | { | |
89a955e8 | 10874 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); |
86b5f803 | 10875 | uint64 cs_value = extract_cs_20_19_18_17_16(instruction); |
89a955e8 AM |
10876 | |
10877 | std::string rt = GPR(copy(rt_value)); | |
10878 | std::string cs = CPR(copy(cs_value)); | |
10879 | ||
10880 | return img::format("MTHC2 %s, %s", rt, cs); | |
10881 | } | |
10882 | ||
10883 | ||
10884 | /* | |
10885 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
10886 | * | |
10887 | * 3 2 1 | |
10888 | * 10987654321098765432109876543210 | |
10889 | * 001000 00010001101 | |
10890 | * rt ----- | |
10891 | * rs ----- | |
10892 | * rd ----- | |
10893 | */ | |
10894 | std::string NMD::MTHGC0(uint64 instruction) | |
10895 | { | |
10896 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
10897 | uint64 c0s_value = extract_c0s_20_19_18_17_16(instruction); | |
10898 | uint64 sel_value = extract_sel_15_14_13_12_11(instruction); | |
10899 | ||
10900 | std::string rt = GPR(copy(rt_value)); | |
10901 | std::string c0s = CPR(copy(c0s_value)); | |
10902 | std::string sel = IMMEDIATE(copy(sel_value)); | |
10903 | ||
10904 | return img::format("MTHGC0 %s, %s, %s", rt, c0s, sel); | |
10905 | } | |
10906 | ||
10907 | ||
10908 | /* | |
10909 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
10910 | * | |
10911 | * 3 2 1 | |
10912 | * 10987654321098765432109876543210 | |
10913 | * 001000 00010001101 | |
10914 | * rt ----- | |
10915 | * rs ----- | |
10916 | * rd ----- | |
10917 | */ | |
10918 | std::string NMD::MTHI_DSP_(uint64 instruction) | |
10919 | { | |
89a955e8 | 10920 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 10921 | uint64 ac_value = extract_ac_13_12(instruction); |
89a955e8 AM |
10922 | |
10923 | std::string rs = GPR(copy(rs_value)); | |
10924 | std::string ac = AC(copy(ac_value)); | |
10925 | ||
10926 | return img::format("MTHI %s, %s", rs, ac); | |
10927 | } | |
10928 | ||
10929 | ||
10930 | /* | |
10931 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
10932 | * | |
10933 | * 3 2 1 | |
10934 | * 10987654321098765432109876543210 | |
10935 | * 001000 00010001101 | |
10936 | * rt ----- | |
10937 | * rs ----- | |
10938 | * rd ----- | |
10939 | */ | |
10940 | std::string NMD::MTHLIP(uint64 instruction) | |
10941 | { | |
89a955e8 | 10942 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 10943 | uint64 ac_value = extract_ac_13_12(instruction); |
89a955e8 AM |
10944 | |
10945 | std::string rs = GPR(copy(rs_value)); | |
10946 | std::string ac = AC(copy(ac_value)); | |
10947 | ||
10948 | return img::format("MTHLIP %s, %s", rs, ac); | |
10949 | } | |
10950 | ||
10951 | ||
10952 | /* | |
10953 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
10954 | * | |
10955 | * 3 2 1 | |
10956 | * 10987654321098765432109876543210 | |
10957 | * 001000 00010001101 | |
10958 | * rt ----- | |
10959 | * rs ----- | |
10960 | * rd ----- | |
10961 | */ | |
10962 | std::string NMD::MTHTR(uint64 instruction) | |
10963 | { | |
10964 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
10965 | uint64 c0s_value = extract_c0s_20_19_18_17_16(instruction); | |
10966 | uint64 sel_value = extract_sel_15_14_13_12_11(instruction); | |
10967 | uint64 u_value = extract_u_10(instruction); | |
10968 | ||
10969 | std::string rt = GPR(copy(rt_value)); | |
10970 | std::string c0s = IMMEDIATE(copy(c0s_value)); | |
10971 | std::string u = IMMEDIATE(copy(u_value)); | |
10972 | std::string sel = IMMEDIATE(copy(sel_value)); | |
10973 | ||
10974 | return img::format("MTHTR %s, %s, %s, %s", rt, c0s, u, sel); | |
10975 | } | |
10976 | ||
10977 | ||
10978 | /* | |
10979 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
10980 | * | |
10981 | * 3 2 1 | |
10982 | * 10987654321098765432109876543210 | |
10983 | * 001000 00010001101 | |
10984 | * rt ----- | |
10985 | * rs ----- | |
10986 | * rd ----- | |
10987 | */ | |
10988 | std::string NMD::MTLO_DSP_(uint64 instruction) | |
10989 | { | |
89a955e8 | 10990 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 10991 | uint64 ac_value = extract_ac_13_12(instruction); |
89a955e8 AM |
10992 | |
10993 | std::string rs = GPR(copy(rs_value)); | |
10994 | std::string ac = AC(copy(ac_value)); | |
10995 | ||
10996 | return img::format("MTLO %s, %s", rs, ac); | |
10997 | } | |
10998 | ||
10999 | ||
11000 | /* | |
11001 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
11002 | * | |
11003 | * 3 2 1 | |
11004 | * 10987654321098765432109876543210 | |
11005 | * 001000 00010001101 | |
11006 | * rt ----- | |
11007 | * rs ----- | |
11008 | * rd ----- | |
11009 | */ | |
11010 | std::string NMD::MTTR(uint64 instruction) | |
11011 | { | |
11012 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
11013 | uint64 c0s_value = extract_c0s_20_19_18_17_16(instruction); | |
11014 | uint64 sel_value = extract_sel_15_14_13_12_11(instruction); | |
11015 | uint64 u_value = extract_u_10(instruction); | |
11016 | ||
11017 | std::string rt = GPR(copy(rt_value)); | |
11018 | std::string c0s = IMMEDIATE(copy(c0s_value)); | |
11019 | std::string u = IMMEDIATE(copy(u_value)); | |
11020 | std::string sel = IMMEDIATE(copy(sel_value)); | |
11021 | ||
11022 | return img::format("MTTR %s, %s, %s, %s", rt, c0s, u, sel); | |
11023 | } | |
11024 | ||
11025 | ||
11026 | /* | |
11027 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
11028 | * | |
11029 | * 3 2 1 | |
11030 | * 10987654321098765432109876543210 | |
11031 | * 001000 00010001101 | |
11032 | * rt ----- | |
11033 | * rs ----- | |
11034 | * rd ----- | |
11035 | */ | |
11036 | std::string NMD::MUH(uint64 instruction) | |
11037 | { | |
11038 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 11039 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 11040 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
11041 | |
11042 | std::string rd = GPR(copy(rd_value)); | |
11043 | std::string rs = GPR(copy(rs_value)); | |
11044 | std::string rt = GPR(copy(rt_value)); | |
11045 | ||
11046 | return img::format("MUH %s, %s, %s", rd, rs, rt); | |
11047 | } | |
11048 | ||
11049 | ||
11050 | /* | |
11051 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
11052 | * | |
11053 | * 3 2 1 | |
11054 | * 10987654321098765432109876543210 | |
11055 | * 001000 00010001101 | |
11056 | * rt ----- | |
11057 | * rs ----- | |
11058 | * rd ----- | |
11059 | */ | |
11060 | std::string NMD::MUHU(uint64 instruction) | |
11061 | { | |
11062 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 11063 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 11064 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
11065 | |
11066 | std::string rd = GPR(copy(rd_value)); | |
11067 | std::string rs = GPR(copy(rs_value)); | |
11068 | std::string rt = GPR(copy(rt_value)); | |
11069 | ||
11070 | return img::format("MUHU %s, %s, %s", rd, rs, rt); | |
11071 | } | |
11072 | ||
11073 | ||
11074 | /* | |
11075 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
11076 | * | |
11077 | * 3 2 1 | |
11078 | * 10987654321098765432109876543210 | |
11079 | * 001000 00010001101 | |
11080 | * rt ----- | |
11081 | * rs ----- | |
11082 | * rd ----- | |
11083 | */ | |
11084 | std::string NMD::MUL_32_(uint64 instruction) | |
11085 | { | |
11086 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 11087 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 11088 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
11089 | |
11090 | std::string rd = GPR(copy(rd_value)); | |
11091 | std::string rs = GPR(copy(rs_value)); | |
11092 | std::string rt = GPR(copy(rt_value)); | |
11093 | ||
11094 | return img::format("MUL %s, %s, %s", rd, rs, rt); | |
11095 | } | |
11096 | ||
11097 | ||
11098 | /* | |
11099 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
11100 | * | |
11101 | * 3 2 1 | |
11102 | * 10987654321098765432109876543210 | |
11103 | * 001000 00010001101 | |
11104 | * rt ----- | |
11105 | * rs ----- | |
11106 | * rd ----- | |
11107 | */ | |
11108 | std::string NMD::MUL_4X4_(uint64 instruction) | |
11109 | { | |
89a955e8 | 11110 | uint64 rt4_value = extract_rt4_9_7_6_5(instruction); |
75199b40 | 11111 | uint64 rs4_value = extract_rs4_4_2_1_0(instruction); |
89a955e8 | 11112 | |
131e9b92 AM |
11113 | std::string rs4 = GPR(decode_gpr_gpr4(rs4_value)); |
11114 | std::string rt4 = GPR(decode_gpr_gpr4(rt4_value)); | |
89a955e8 AM |
11115 | |
11116 | return img::format("MUL %s, %s", rs4, rt4); | |
11117 | } | |
11118 | ||
11119 | ||
11120 | /* | |
11121 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
11122 | * | |
11123 | * 3 2 1 | |
11124 | * 10987654321098765432109876543210 | |
11125 | * 001000 00010001101 | |
11126 | * rt ----- | |
11127 | * rs ----- | |
11128 | * rd ----- | |
11129 | */ | |
11130 | std::string NMD::MUL_D(uint64 instruction) | |
11131 | { | |
17ce2f00 | 11132 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 11133 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 11134 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 AM |
11135 | |
11136 | std::string fd = FPR(copy(fd_value)); | |
11137 | std::string fs = FPR(copy(fs_value)); | |
11138 | std::string ft = FPR(copy(ft_value)); | |
11139 | ||
11140 | return img::format("MUL.D %s, %s, %s", fd, fs, ft); | |
11141 | } | |
11142 | ||
11143 | ||
11144 | /* | |
11145 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
11146 | * | |
11147 | * 3 2 1 | |
11148 | * 10987654321098765432109876543210 | |
11149 | * 001000 00010001101 | |
11150 | * rt ----- | |
11151 | * rs ----- | |
11152 | * rd ----- | |
11153 | */ | |
11154 | std::string NMD::MUL_PH(uint64 instruction) | |
11155 | { | |
11156 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 11157 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 11158 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
11159 | |
11160 | std::string rd = GPR(copy(rd_value)); | |
11161 | std::string rs = GPR(copy(rs_value)); | |
11162 | std::string rt = GPR(copy(rt_value)); | |
11163 | ||
11164 | return img::format("MUL.PH %s, %s, %s", rd, rs, rt); | |
11165 | } | |
11166 | ||
11167 | ||
11168 | /* | |
11169 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
11170 | * | |
11171 | * 3 2 1 | |
11172 | * 10987654321098765432109876543210 | |
11173 | * 001000 00010001101 | |
11174 | * rt ----- | |
11175 | * rs ----- | |
11176 | * rd ----- | |
11177 | */ | |
11178 | std::string NMD::MUL_S_PH(uint64 instruction) | |
11179 | { | |
11180 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 11181 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 11182 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
11183 | |
11184 | std::string rd = GPR(copy(rd_value)); | |
11185 | std::string rs = GPR(copy(rs_value)); | |
11186 | std::string rt = GPR(copy(rt_value)); | |
11187 | ||
11188 | return img::format("MUL_S.PH %s, %s, %s", rd, rs, rt); | |
11189 | } | |
11190 | ||
11191 | ||
11192 | /* | |
11193 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
11194 | * | |
11195 | * 3 2 1 | |
11196 | * 10987654321098765432109876543210 | |
11197 | * 001000 00010001101 | |
11198 | * rt ----- | |
11199 | * rs ----- | |
11200 | * rd ----- | |
11201 | */ | |
11202 | std::string NMD::MUL_S(uint64 instruction) | |
11203 | { | |
17ce2f00 | 11204 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 11205 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 11206 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 AM |
11207 | |
11208 | std::string fd = FPR(copy(fd_value)); | |
11209 | std::string fs = FPR(copy(fs_value)); | |
11210 | std::string ft = FPR(copy(ft_value)); | |
11211 | ||
11212 | return img::format("MUL.S %s, %s, %s", fd, fs, ft); | |
11213 | } | |
11214 | ||
11215 | ||
11216 | /* | |
11217 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
11218 | * | |
11219 | * 3 2 1 | |
11220 | * 10987654321098765432109876543210 | |
11221 | * 001000 00010001101 | |
11222 | * rt ----- | |
11223 | * rs ----- | |
11224 | * rd ----- | |
11225 | */ | |
11226 | std::string NMD::MULEQ_S_W_PHL(uint64 instruction) | |
11227 | { | |
11228 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 11229 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 11230 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
11231 | |
11232 | std::string rd = GPR(copy(rd_value)); | |
11233 | std::string rs = GPR(copy(rs_value)); | |
11234 | std::string rt = GPR(copy(rt_value)); | |
11235 | ||
11236 | return img::format("MULEQ_S.W.PHL %s, %s, %s", rd, rs, rt); | |
11237 | } | |
11238 | ||
11239 | ||
11240 | /* | |
11241 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
11242 | * | |
11243 | * 3 2 1 | |
11244 | * 10987654321098765432109876543210 | |
11245 | * 001000 00010001101 | |
11246 | * rt ----- | |
11247 | * rs ----- | |
11248 | * rd ----- | |
11249 | */ | |
11250 | std::string NMD::MULEQ_S_W_PHR(uint64 instruction) | |
11251 | { | |
11252 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 11253 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 11254 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
11255 | |
11256 | std::string rd = GPR(copy(rd_value)); | |
11257 | std::string rs = GPR(copy(rs_value)); | |
11258 | std::string rt = GPR(copy(rt_value)); | |
11259 | ||
11260 | return img::format("MULEQ_S.W.PHR %s, %s, %s", rd, rs, rt); | |
11261 | } | |
11262 | ||
11263 | ||
11264 | /* | |
11265 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
11266 | * | |
11267 | * 3 2 1 | |
11268 | * 10987654321098765432109876543210 | |
11269 | * 001000 00010001101 | |
11270 | * rt ----- | |
11271 | * rs ----- | |
11272 | * rd ----- | |
11273 | */ | |
11274 | std::string NMD::MULEU_S_PH_QBL(uint64 instruction) | |
11275 | { | |
11276 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 11277 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 11278 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
11279 | |
11280 | std::string rd = GPR(copy(rd_value)); | |
11281 | std::string rs = GPR(copy(rs_value)); | |
11282 | std::string rt = GPR(copy(rt_value)); | |
11283 | ||
11284 | return img::format("MULEU_S.PH.QBL %s, %s, %s", rd, rs, rt); | |
11285 | } | |
11286 | ||
11287 | ||
11288 | /* | |
11289 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
11290 | * | |
11291 | * 3 2 1 | |
11292 | * 10987654321098765432109876543210 | |
11293 | * 001000 00010001101 | |
11294 | * rt ----- | |
11295 | * rs ----- | |
11296 | * rd ----- | |
11297 | */ | |
11298 | std::string NMD::MULEU_S_PH_QBR(uint64 instruction) | |
11299 | { | |
11300 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 11301 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 11302 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
11303 | |
11304 | std::string rd = GPR(copy(rd_value)); | |
11305 | std::string rs = GPR(copy(rs_value)); | |
11306 | std::string rt = GPR(copy(rt_value)); | |
11307 | ||
11308 | return img::format("MULEU_S.PH.QBR %s, %s, %s", rd, rs, rt); | |
11309 | } | |
11310 | ||
11311 | ||
11312 | /* | |
11313 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
11314 | * | |
11315 | * 3 2 1 | |
11316 | * 10987654321098765432109876543210 | |
11317 | * 001000 00010001101 | |
11318 | * rt ----- | |
11319 | * rs ----- | |
11320 | * rd ----- | |
11321 | */ | |
11322 | std::string NMD::MULQ_RS_PH(uint64 instruction) | |
11323 | { | |
11324 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 11325 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 11326 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
11327 | |
11328 | std::string rd = GPR(copy(rd_value)); | |
11329 | std::string rs = GPR(copy(rs_value)); | |
11330 | std::string rt = GPR(copy(rt_value)); | |
11331 | ||
11332 | return img::format("MULQ_RS.PH %s, %s, %s", rd, rs, rt); | |
11333 | } | |
11334 | ||
11335 | ||
11336 | /* | |
11337 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
11338 | * | |
11339 | * 3 2 1 | |
11340 | * 10987654321098765432109876543210 | |
11341 | * 001000 00010001101 | |
11342 | * rt ----- | |
11343 | * rs ----- | |
11344 | * rd ----- | |
11345 | */ | |
11346 | std::string NMD::MULQ_RS_W(uint64 instruction) | |
11347 | { | |
11348 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 11349 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 11350 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
11351 | |
11352 | std::string rd = GPR(copy(rd_value)); | |
11353 | std::string rs = GPR(copy(rs_value)); | |
11354 | std::string rt = GPR(copy(rt_value)); | |
11355 | ||
11356 | return img::format("MULQ_RS.W %s, %s, %s", rd, rs, rt); | |
11357 | } | |
11358 | ||
11359 | ||
11360 | /* | |
11361 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
11362 | * | |
11363 | * 3 2 1 | |
11364 | * 10987654321098765432109876543210 | |
11365 | * 001000 00010001101 | |
11366 | * rt ----- | |
11367 | * rs ----- | |
11368 | * rd ----- | |
11369 | */ | |
11370 | std::string NMD::MULQ_S_PH(uint64 instruction) | |
11371 | { | |
11372 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 11373 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 11374 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
11375 | |
11376 | std::string rd = GPR(copy(rd_value)); | |
11377 | std::string rs = GPR(copy(rs_value)); | |
11378 | std::string rt = GPR(copy(rt_value)); | |
11379 | ||
11380 | return img::format("MULQ_S.PH %s, %s, %s", rd, rs, rt); | |
11381 | } | |
11382 | ||
11383 | ||
11384 | /* | |
11385 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
11386 | * | |
11387 | * 3 2 1 | |
11388 | * 10987654321098765432109876543210 | |
11389 | * 001000 00010001101 | |
11390 | * rt ----- | |
11391 | * rs ----- | |
11392 | * rd ----- | |
11393 | */ | |
11394 | std::string NMD::MULQ_S_W(uint64 instruction) | |
11395 | { | |
11396 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 11397 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 11398 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
11399 | |
11400 | std::string rd = GPR(copy(rd_value)); | |
11401 | std::string rs = GPR(copy(rs_value)); | |
11402 | std::string rt = GPR(copy(rt_value)); | |
11403 | ||
11404 | return img::format("MULQ_S.W %s, %s, %s", rd, rs, rt); | |
11405 | } | |
11406 | ||
11407 | ||
11408 | /* | |
11409 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
11410 | * | |
11411 | * 3 2 1 | |
11412 | * 10987654321098765432109876543210 | |
11413 | * 001000 00010001101 | |
11414 | * rt ----- | |
11415 | * rs ----- | |
11416 | * rd ----- | |
11417 | */ | |
11418 | std::string NMD::MULSA_W_PH(uint64 instruction) | |
11419 | { | |
11420 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 11421 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 11422 | uint64 ac_value = extract_ac_13_12(instruction); |
89a955e8 AM |
11423 | |
11424 | std::string ac = AC(copy(ac_value)); | |
11425 | std::string rs = GPR(copy(rs_value)); | |
11426 | std::string rt = GPR(copy(rt_value)); | |
11427 | ||
11428 | return img::format("MULSA.W.PH %s, %s, %s", ac, rs, rt); | |
11429 | } | |
11430 | ||
11431 | ||
11432 | /* | |
11433 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
11434 | * | |
11435 | * 3 2 1 | |
11436 | * 10987654321098765432109876543210 | |
11437 | * 001000 00010001101 | |
11438 | * rt ----- | |
11439 | * rs ----- | |
11440 | * rd ----- | |
11441 | */ | |
11442 | std::string NMD::MULSAQ_S_W_PH(uint64 instruction) | |
11443 | { | |
11444 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 11445 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 11446 | uint64 ac_value = extract_ac_13_12(instruction); |
89a955e8 AM |
11447 | |
11448 | std::string ac = AC(copy(ac_value)); | |
11449 | std::string rs = GPR(copy(rs_value)); | |
11450 | std::string rt = GPR(copy(rt_value)); | |
11451 | ||
11452 | return img::format("MULSAQ_S.W.PH %s, %s, %s", ac, rs, rt); | |
11453 | } | |
11454 | ||
11455 | ||
11456 | /* | |
11457 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
11458 | * | |
11459 | * 3 2 1 | |
11460 | * 10987654321098765432109876543210 | |
11461 | * 001000 00010001101 | |
11462 | * rt ----- | |
11463 | * rs ----- | |
11464 | * rd ----- | |
11465 | */ | |
11466 | std::string NMD::MULT_DSP_(uint64 instruction) | |
11467 | { | |
11468 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 11469 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 11470 | uint64 ac_value = extract_ac_13_12(instruction); |
89a955e8 AM |
11471 | |
11472 | std::string ac = AC(copy(ac_value)); | |
11473 | std::string rs = GPR(copy(rs_value)); | |
11474 | std::string rt = GPR(copy(rt_value)); | |
11475 | ||
11476 | return img::format("MULT %s, %s, %s", ac, rs, rt); | |
11477 | } | |
11478 | ||
11479 | ||
11480 | /* | |
11481 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
11482 | * | |
11483 | * 3 2 1 | |
11484 | * 10987654321098765432109876543210 | |
11485 | * 001000 00010001101 | |
11486 | * rt ----- | |
11487 | * rs ----- | |
11488 | * rd ----- | |
11489 | */ | |
11490 | std::string NMD::MULTU_DSP_(uint64 instruction) | |
11491 | { | |
11492 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 11493 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 11494 | uint64 ac_value = extract_ac_13_12(instruction); |
89a955e8 AM |
11495 | |
11496 | std::string ac = AC(copy(ac_value)); | |
11497 | std::string rs = GPR(copy(rs_value)); | |
11498 | std::string rt = GPR(copy(rt_value)); | |
11499 | ||
11500 | return img::format("MULTU %s, %s, %s", ac, rs, rt); | |
11501 | } | |
11502 | ||
11503 | ||
11504 | /* | |
11505 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
11506 | * | |
11507 | * 3 2 1 | |
11508 | * 10987654321098765432109876543210 | |
11509 | * 001000 00010001101 | |
11510 | * rt ----- | |
11511 | * rs ----- | |
11512 | * rd ----- | |
11513 | */ | |
11514 | std::string NMD::MULU(uint64 instruction) | |
11515 | { | |
11516 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 11517 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 11518 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
11519 | |
11520 | std::string rd = GPR(copy(rd_value)); | |
11521 | std::string rs = GPR(copy(rs_value)); | |
11522 | std::string rt = GPR(copy(rt_value)); | |
11523 | ||
11524 | return img::format("MULU %s, %s, %s", rd, rs, rt); | |
11525 | } | |
11526 | ||
11527 | ||
11528 | /* | |
11529 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
11530 | * | |
11531 | * 3 2 1 | |
11532 | * 10987654321098765432109876543210 | |
11533 | * 001000 00010001101 | |
11534 | * rt ----- | |
11535 | * rs ----- | |
11536 | * rd ----- | |
11537 | */ | |
11538 | std::string NMD::NEG_D(uint64 instruction) | |
11539 | { | |
17ce2f00 | 11540 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 11541 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 AM |
11542 | |
11543 | std::string ft = FPR(copy(ft_value)); | |
11544 | std::string fs = FPR(copy(fs_value)); | |
11545 | ||
11546 | return img::format("NEG.D %s, %s", ft, fs); | |
11547 | } | |
11548 | ||
11549 | ||
11550 | /* | |
11551 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
11552 | * | |
11553 | * 3 2 1 | |
11554 | * 10987654321098765432109876543210 | |
11555 | * 001000 00010001101 | |
11556 | * rt ----- | |
11557 | * rs ----- | |
11558 | * rd ----- | |
11559 | */ | |
11560 | std::string NMD::NEG_S(uint64 instruction) | |
11561 | { | |
17ce2f00 | 11562 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 11563 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 AM |
11564 | |
11565 | std::string ft = FPR(copy(ft_value)); | |
11566 | std::string fs = FPR(copy(fs_value)); | |
11567 | ||
11568 | return img::format("NEG.S %s, %s", ft, fs); | |
11569 | } | |
11570 | ||
11571 | ||
11572 | /* | |
11573 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
11574 | * | |
11575 | * 3 2 1 | |
11576 | * 10987654321098765432109876543210 | |
11577 | * 001000 00010001101 | |
11578 | * rt ----- | |
11579 | * rs ----- | |
11580 | * rd ----- | |
11581 | */ | |
11582 | std::string NMD::NOP_16_(uint64 instruction) | |
11583 | { | |
11584 | (void)instruction; | |
11585 | ||
11586 | return "NOP "; | |
11587 | } | |
11588 | ||
11589 | ||
11590 | /* | |
11591 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
11592 | * | |
11593 | * 3 2 1 | |
11594 | * 10987654321098765432109876543210 | |
11595 | * 001000 00010001101 | |
11596 | * rt ----- | |
11597 | * rs ----- | |
11598 | * rd ----- | |
11599 | */ | |
11600 | std::string NMD::NOP_32_(uint64 instruction) | |
11601 | { | |
11602 | (void)instruction; | |
11603 | ||
11604 | return "NOP "; | |
11605 | } | |
11606 | ||
11607 | ||
11608 | /* | |
11609 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
11610 | * | |
11611 | * 3 2 1 | |
11612 | * 10987654321098765432109876543210 | |
11613 | * 001000 00010001101 | |
11614 | * rt ----- | |
11615 | * rs ----- | |
11616 | * rd ----- | |
11617 | */ | |
11618 | std::string NMD::NOR(uint64 instruction) | |
11619 | { | |
11620 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 11621 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 11622 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
11623 | |
11624 | std::string rd = GPR(copy(rd_value)); | |
11625 | std::string rs = GPR(copy(rs_value)); | |
11626 | std::string rt = GPR(copy(rt_value)); | |
11627 | ||
11628 | return img::format("NOR %s, %s, %s", rd, rs, rt); | |
11629 | } | |
11630 | ||
11631 | ||
11632 | /* | |
11633 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
11634 | * | |
11635 | * 3 2 1 | |
11636 | * 10987654321098765432109876543210 | |
11637 | * 001000 00010001101 | |
11638 | * rt ----- | |
11639 | * rs ----- | |
11640 | * rd ----- | |
11641 | */ | |
11642 | std::string NMD::NOT_16_(uint64 instruction) | |
11643 | { | |
11644 | uint64 rt3_value = extract_rt3_9_8_7(instruction); | |
11645 | uint64 rs3_value = extract_rs3_6_5_4(instruction); | |
11646 | ||
988d6c89 AM |
11647 | std::string rt3 = GPR(decode_gpr_gpr3(rt3_value)); |
11648 | std::string rs3 = GPR(decode_gpr_gpr3(rs3_value)); | |
89a955e8 AM |
11649 | |
11650 | return img::format("NOT %s, %s", rt3, rs3); | |
11651 | } | |
11652 | ||
11653 | ||
11654 | /* | |
11655 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
11656 | * | |
11657 | * 3 2 1 | |
11658 | * 10987654321098765432109876543210 | |
11659 | * 001000 00010001101 | |
11660 | * rt ----- | |
11661 | * rs ----- | |
11662 | * rd ----- | |
11663 | */ | |
11664 | std::string NMD::OR_16_(uint64 instruction) | |
11665 | { | |
11666 | uint64 rt3_value = extract_rt3_9_8_7(instruction); | |
11667 | uint64 rs3_value = extract_rs3_6_5_4(instruction); | |
11668 | ||
988d6c89 AM |
11669 | std::string rs3 = GPR(decode_gpr_gpr3(rs3_value)); |
11670 | std::string rt3 = GPR(decode_gpr_gpr3(rt3_value)); | |
89a955e8 AM |
11671 | |
11672 | return img::format("OR %s, %s", rs3, rt3); | |
11673 | } | |
11674 | ||
11675 | ||
11676 | /* | |
11677 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
11678 | * | |
11679 | * 3 2 1 | |
11680 | * 10987654321098765432109876543210 | |
11681 | * 001000 00010001101 | |
11682 | * rt ----- | |
11683 | * rs ----- | |
11684 | * rd ----- | |
11685 | */ | |
11686 | std::string NMD::OR_32_(uint64 instruction) | |
11687 | { | |
11688 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 11689 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 11690 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
11691 | |
11692 | std::string rd = GPR(copy(rd_value)); | |
11693 | std::string rs = GPR(copy(rs_value)); | |
11694 | std::string rt = GPR(copy(rt_value)); | |
11695 | ||
11696 | return img::format("OR %s, %s, %s", rd, rs, rt); | |
11697 | } | |
11698 | ||
11699 | ||
11700 | /* | |
11701 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
11702 | * | |
11703 | * 3 2 1 | |
11704 | * 10987654321098765432109876543210 | |
11705 | * 001000 00010001101 | |
11706 | * rt ----- | |
11707 | * rs ----- | |
11708 | * rd ----- | |
11709 | */ | |
11710 | std::string NMD::ORI(uint64 instruction) | |
11711 | { | |
11712 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 11713 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 11714 | uint64 u_value = extract_u_11_10_9_8_7_6_5_4_3_2_1_0(instruction); |
89a955e8 AM |
11715 | |
11716 | std::string rt = GPR(copy(rt_value)); | |
11717 | std::string rs = GPR(copy(rs_value)); | |
11718 | std::string u = IMMEDIATE(copy(u_value)); | |
11719 | ||
11720 | return img::format("ORI %s, %s, %s", rt, rs, u); | |
11721 | } | |
11722 | ||
11723 | ||
11724 | /* | |
11725 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
11726 | * | |
11727 | * 3 2 1 | |
11728 | * 10987654321098765432109876543210 | |
11729 | * 001000 00010001101 | |
11730 | * rt ----- | |
11731 | * rs ----- | |
11732 | * rd ----- | |
11733 | */ | |
11734 | std::string NMD::PACKRL_PH(uint64 instruction) | |
11735 | { | |
11736 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 11737 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 11738 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
11739 | |
11740 | std::string rd = GPR(copy(rd_value)); | |
11741 | std::string rs = GPR(copy(rs_value)); | |
11742 | std::string rt = GPR(copy(rt_value)); | |
11743 | ||
11744 | return img::format("PACKRL.PH %s, %s, %s", rd, rs, rt); | |
11745 | } | |
11746 | ||
11747 | ||
11748 | /* | |
11749 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
11750 | * | |
11751 | * 3 2 1 | |
11752 | * 10987654321098765432109876543210 | |
11753 | * 001000 00010001101 | |
11754 | * rt ----- | |
11755 | * rs ----- | |
11756 | * rd ----- | |
11757 | */ | |
11758 | std::string NMD::PAUSE(uint64 instruction) | |
11759 | { | |
11760 | (void)instruction; | |
11761 | ||
11762 | return "PAUSE "; | |
11763 | } | |
11764 | ||
11765 | ||
11766 | /* | |
11767 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
11768 | * | |
11769 | * 3 2 1 | |
11770 | * 10987654321098765432109876543210 | |
11771 | * 001000 00010001101 | |
11772 | * rt ----- | |
11773 | * rs ----- | |
11774 | * rd ----- | |
11775 | */ | |
11776 | std::string NMD::PICK_PH(uint64 instruction) | |
11777 | { | |
11778 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 11779 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 11780 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
11781 | |
11782 | std::string rd = GPR(copy(rd_value)); | |
11783 | std::string rs = GPR(copy(rs_value)); | |
11784 | std::string rt = GPR(copy(rt_value)); | |
11785 | ||
11786 | return img::format("PICK.PH %s, %s, %s", rd, rs, rt); | |
11787 | } | |
11788 | ||
11789 | ||
11790 | /* | |
11791 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
11792 | * | |
11793 | * 3 2 1 | |
11794 | * 10987654321098765432109876543210 | |
11795 | * 001000 00010001101 | |
11796 | * rt ----- | |
11797 | * rs ----- | |
11798 | * rd ----- | |
11799 | */ | |
11800 | std::string NMD::PICK_QB(uint64 instruction) | |
11801 | { | |
11802 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 11803 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 11804 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
11805 | |
11806 | std::string rd = GPR(copy(rd_value)); | |
11807 | std::string rs = GPR(copy(rs_value)); | |
11808 | std::string rt = GPR(copy(rt_value)); | |
11809 | ||
11810 | return img::format("PICK.QB %s, %s, %s", rd, rs, rt); | |
11811 | } | |
11812 | ||
11813 | ||
11814 | /* | |
11815 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
11816 | * | |
11817 | * 3 2 1 | |
11818 | * 10987654321098765432109876543210 | |
11819 | * 001000 00010001101 | |
11820 | * rt ----- | |
11821 | * rs ----- | |
11822 | * rd ----- | |
11823 | */ | |
11824 | std::string NMD::PRECEQ_W_PHL(uint64 instruction) | |
11825 | { | |
11826 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
11827 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
11828 | ||
11829 | std::string rt = GPR(copy(rt_value)); | |
11830 | std::string rs = GPR(copy(rs_value)); | |
11831 | ||
11832 | return img::format("PRECEQ.W.PHL %s, %s", rt, rs); | |
11833 | } | |
11834 | ||
11835 | ||
11836 | /* | |
11837 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
11838 | * | |
11839 | * 3 2 1 | |
11840 | * 10987654321098765432109876543210 | |
11841 | * 001000 00010001101 | |
11842 | * rt ----- | |
11843 | * rs ----- | |
11844 | * rd ----- | |
11845 | */ | |
11846 | std::string NMD::PRECEQ_W_PHR(uint64 instruction) | |
11847 | { | |
11848 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
11849 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
11850 | ||
11851 | std::string rt = GPR(copy(rt_value)); | |
11852 | std::string rs = GPR(copy(rs_value)); | |
11853 | ||
11854 | return img::format("PRECEQ.W.PHR %s, %s", rt, rs); | |
11855 | } | |
11856 | ||
11857 | ||
11858 | /* | |
11859 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
11860 | * | |
11861 | * 3 2 1 | |
11862 | * 10987654321098765432109876543210 | |
11863 | * 001000 00010001101 | |
11864 | * rt ----- | |
11865 | * rs ----- | |
11866 | * rd ----- | |
11867 | */ | |
11868 | std::string NMD::PRECEQU_PH_QBLA(uint64 instruction) | |
11869 | { | |
11870 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
11871 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
11872 | ||
11873 | std::string rt = GPR(copy(rt_value)); | |
11874 | std::string rs = GPR(copy(rs_value)); | |
11875 | ||
11876 | return img::format("PRECEQU.PH.QBLA %s, %s", rt, rs); | |
11877 | } | |
11878 | ||
11879 | ||
11880 | /* | |
11881 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
11882 | * | |
11883 | * 3 2 1 | |
11884 | * 10987654321098765432109876543210 | |
11885 | * 001000 00010001101 | |
11886 | * rt ----- | |
11887 | * rs ----- | |
11888 | * rd ----- | |
11889 | */ | |
11890 | std::string NMD::PRECEQU_PH_QBL(uint64 instruction) | |
11891 | { | |
11892 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
11893 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
11894 | ||
11895 | std::string rt = GPR(copy(rt_value)); | |
11896 | std::string rs = GPR(copy(rs_value)); | |
11897 | ||
11898 | return img::format("PRECEQU.PH.QBL %s, %s", rt, rs); | |
11899 | } | |
11900 | ||
11901 | ||
11902 | /* | |
11903 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
11904 | * | |
11905 | * 3 2 1 | |
11906 | * 10987654321098765432109876543210 | |
11907 | * 001000 00010001101 | |
11908 | * rt ----- | |
11909 | * rs ----- | |
11910 | * rd ----- | |
11911 | */ | |
11912 | std::string NMD::PRECEQU_PH_QBRA(uint64 instruction) | |
11913 | { | |
11914 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
11915 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
11916 | ||
11917 | std::string rt = GPR(copy(rt_value)); | |
11918 | std::string rs = GPR(copy(rs_value)); | |
11919 | ||
11920 | return img::format("PRECEQU.PH.QBRA %s, %s", rt, rs); | |
11921 | } | |
11922 | ||
11923 | ||
11924 | /* | |
11925 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
11926 | * | |
11927 | * 3 2 1 | |
11928 | * 10987654321098765432109876543210 | |
11929 | * 001000 00010001101 | |
11930 | * rt ----- | |
11931 | * rs ----- | |
11932 | * rd ----- | |
11933 | */ | |
11934 | std::string NMD::PRECEQU_PH_QBR(uint64 instruction) | |
11935 | { | |
11936 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
11937 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
11938 | ||
11939 | std::string rt = GPR(copy(rt_value)); | |
11940 | std::string rs = GPR(copy(rs_value)); | |
11941 | ||
11942 | return img::format("PRECEQU.PH.QBR %s, %s", rt, rs); | |
11943 | } | |
11944 | ||
11945 | ||
11946 | /* | |
11947 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
11948 | * | |
11949 | * 3 2 1 | |
11950 | * 10987654321098765432109876543210 | |
11951 | * 001000 00010001101 | |
11952 | * rt ----- | |
11953 | * rs ----- | |
11954 | * rd ----- | |
11955 | */ | |
11956 | std::string NMD::PRECEU_PH_QBLA(uint64 instruction) | |
11957 | { | |
11958 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
11959 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
11960 | ||
11961 | std::string rt = GPR(copy(rt_value)); | |
11962 | std::string rs = GPR(copy(rs_value)); | |
11963 | ||
11964 | return img::format("PRECEU.PH.QBLA %s, %s", rt, rs); | |
11965 | } | |
11966 | ||
11967 | ||
11968 | /* | |
11969 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
11970 | * | |
11971 | * 3 2 1 | |
11972 | * 10987654321098765432109876543210 | |
11973 | * 001000 00010001101 | |
11974 | * rt ----- | |
11975 | * rs ----- | |
11976 | * rd ----- | |
11977 | */ | |
11978 | std::string NMD::PRECEU_PH_QBL(uint64 instruction) | |
11979 | { | |
11980 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
11981 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
11982 | ||
11983 | std::string rt = GPR(copy(rt_value)); | |
11984 | std::string rs = GPR(copy(rs_value)); | |
11985 | ||
11986 | return img::format("PRECEU.PH.QBL %s, %s", rt, rs); | |
11987 | } | |
11988 | ||
11989 | ||
11990 | /* | |
11991 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
11992 | * | |
11993 | * 3 2 1 | |
11994 | * 10987654321098765432109876543210 | |
11995 | * 001000 00010001101 | |
11996 | * rt ----- | |
11997 | * rs ----- | |
11998 | * rd ----- | |
11999 | */ | |
12000 | std::string NMD::PRECEU_PH_QBRA(uint64 instruction) | |
12001 | { | |
12002 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
12003 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
12004 | ||
12005 | std::string rt = GPR(copy(rt_value)); | |
12006 | std::string rs = GPR(copy(rs_value)); | |
12007 | ||
12008 | return img::format("PRECEU.PH.QBRA %s, %s", rt, rs); | |
12009 | } | |
12010 | ||
12011 | ||
12012 | /* | |
12013 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
12014 | * | |
12015 | * 3 2 1 | |
12016 | * 10987654321098765432109876543210 | |
12017 | * 001000 00010001101 | |
12018 | * rt ----- | |
12019 | * rs ----- | |
12020 | * rd ----- | |
12021 | */ | |
12022 | std::string NMD::PRECEU_PH_QBR(uint64 instruction) | |
12023 | { | |
12024 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
12025 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
12026 | ||
12027 | std::string rt = GPR(copy(rt_value)); | |
12028 | std::string rs = GPR(copy(rs_value)); | |
12029 | ||
12030 | return img::format("PRECEU.PH.QBR %s, %s", rt, rs); | |
12031 | } | |
12032 | ||
12033 | ||
12034 | /* | |
12035 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
12036 | * | |
12037 | * 3 2 1 | |
12038 | * 10987654321098765432109876543210 | |
12039 | * 001000 00010001101 | |
12040 | * rt ----- | |
12041 | * rs ----- | |
12042 | * rd ----- | |
12043 | */ | |
12044 | std::string NMD::PRECR_QB_PH(uint64 instruction) | |
12045 | { | |
12046 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 12047 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 12048 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
12049 | |
12050 | std::string rd = GPR(copy(rd_value)); | |
12051 | std::string rs = GPR(copy(rs_value)); | |
12052 | std::string rt = GPR(copy(rt_value)); | |
12053 | ||
12054 | return img::format("PRECR.QB.PH %s, %s, %s", rd, rs, rt); | |
12055 | } | |
12056 | ||
12057 | ||
12058 | /* | |
12059 | * | |
12060 | * | |
12061 | * 3 2 1 | |
12062 | * 10987654321098765432109876543210 | |
12063 | * 001000 x1110000101 | |
12064 | * rt ----- | |
12065 | * rs ----- | |
12066 | * rd ----- | |
12067 | */ | |
12068 | std::string NMD::PRECR_SRA_PH_W(uint64 instruction) | |
12069 | { | |
12070 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 12071 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 12072 | uint64 sa_value = extract_sa_15_14_13_12_11(instruction); |
89a955e8 AM |
12073 | |
12074 | std::string rt = GPR(copy(rt_value)); | |
12075 | std::string rs = GPR(copy(rs_value)); | |
12076 | std::string sa = IMMEDIATE(copy(sa_value)); | |
12077 | ||
12078 | return img::format("PRECR_SRA.PH.W %s, %s, %s", rt, rs, sa); | |
12079 | } | |
12080 | ||
12081 | ||
12082 | /* | |
12083 | * | |
12084 | * | |
12085 | * 3 2 1 | |
12086 | * 10987654321098765432109876543210 | |
12087 | * 001000 x1110000101 | |
12088 | * rt ----- | |
12089 | * rs ----- | |
12090 | * rd ----- | |
12091 | */ | |
12092 | std::string NMD::PRECR_SRA_R_PH_W(uint64 instruction) | |
12093 | { | |
12094 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 12095 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 12096 | uint64 sa_value = extract_sa_15_14_13_12_11(instruction); |
89a955e8 AM |
12097 | |
12098 | std::string rt = GPR(copy(rt_value)); | |
12099 | std::string rs = GPR(copy(rs_value)); | |
12100 | std::string sa = IMMEDIATE(copy(sa_value)); | |
12101 | ||
12102 | return img::format("PRECR_SRA_R.PH.W %s, %s, %s", rt, rs, sa); | |
12103 | } | |
12104 | ||
12105 | ||
12106 | /* | |
12107 | * | |
12108 | * | |
12109 | * 3 2 1 | |
12110 | * 10987654321098765432109876543210 | |
12111 | * 001000 x1110000101 | |
12112 | * rt ----- | |
12113 | * rs ----- | |
12114 | * rd ----- | |
12115 | */ | |
12116 | std::string NMD::PRECRQ_PH_W(uint64 instruction) | |
12117 | { | |
12118 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 12119 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 12120 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
12121 | |
12122 | std::string rd = GPR(copy(rd_value)); | |
12123 | std::string rs = GPR(copy(rs_value)); | |
12124 | std::string rt = GPR(copy(rt_value)); | |
12125 | ||
12126 | return img::format("PRECRQ.PH.W %s, %s, %s", rd, rs, rt); | |
12127 | } | |
12128 | ||
12129 | ||
12130 | /* | |
12131 | * | |
12132 | * | |
12133 | * 3 2 1 | |
12134 | * 10987654321098765432109876543210 | |
12135 | * 001000 x1110000101 | |
12136 | * rt ----- | |
12137 | * rs ----- | |
12138 | * rd ----- | |
12139 | */ | |
12140 | std::string NMD::PRECRQ_QB_PH(uint64 instruction) | |
12141 | { | |
12142 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 12143 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 12144 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
12145 | |
12146 | std::string rd = GPR(copy(rd_value)); | |
12147 | std::string rs = GPR(copy(rs_value)); | |
12148 | std::string rt = GPR(copy(rt_value)); | |
12149 | ||
12150 | return img::format("PRECRQ.QB.PH %s, %s, %s", rd, rs, rt); | |
12151 | } | |
12152 | ||
12153 | ||
12154 | /* | |
12155 | * | |
12156 | * | |
12157 | * 3 2 1 | |
12158 | * 10987654321098765432109876543210 | |
12159 | * 001000 x1110000101 | |
12160 | * rt ----- | |
12161 | * rs ----- | |
12162 | * rd ----- | |
12163 | */ | |
12164 | std::string NMD::PRECRQ_RS_PH_W(uint64 instruction) | |
12165 | { | |
12166 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 12167 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 12168 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
12169 | |
12170 | std::string rd = GPR(copy(rd_value)); | |
12171 | std::string rs = GPR(copy(rs_value)); | |
12172 | std::string rt = GPR(copy(rt_value)); | |
12173 | ||
12174 | return img::format("PRECRQ_RS.PH.W %s, %s, %s", rd, rs, rt); | |
12175 | } | |
12176 | ||
12177 | ||
12178 | /* | |
12179 | * | |
12180 | * | |
12181 | * 3 2 1 | |
12182 | * 10987654321098765432109876543210 | |
12183 | * 001000 x1110000101 | |
12184 | * rt ----- | |
12185 | * rs ----- | |
12186 | * rd ----- | |
12187 | */ | |
12188 | std::string NMD::PRECRQU_S_QB_PH(uint64 instruction) | |
12189 | { | |
12190 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 12191 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 12192 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
12193 | |
12194 | std::string rd = GPR(copy(rd_value)); | |
12195 | std::string rs = GPR(copy(rs_value)); | |
12196 | std::string rt = GPR(copy(rt_value)); | |
12197 | ||
12198 | return img::format("PRECRQU_S.QB.PH %s, %s, %s", rd, rs, rt); | |
12199 | } | |
12200 | ||
12201 | ||
12202 | /* | |
12203 | * | |
12204 | * | |
12205 | * 3 2 1 | |
12206 | * 10987654321098765432109876543210 | |
12207 | * 001000 x1110000101 | |
12208 | * rt ----- | |
12209 | * rs ----- | |
12210 | * rd ----- | |
12211 | */ | |
12212 | std::string NMD::PREF_S9_(uint64 instruction) | |
12213 | { | |
89a955e8 AM |
12214 | uint64 hint_value = extract_hint_25_24_23_22_21(instruction); |
12215 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
d3605cc0 | 12216 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
89a955e8 AM |
12217 | |
12218 | std::string hint = IMMEDIATE(copy(hint_value)); | |
12219 | std::string s = IMMEDIATE(copy(s_value)); | |
12220 | std::string rs = GPR(copy(rs_value)); | |
12221 | ||
12222 | return img::format("PREF %s, %s(%s)", hint, s, rs); | |
12223 | } | |
12224 | ||
12225 | ||
12226 | /* | |
12227 | * | |
12228 | * | |
12229 | * 3 2 1 | |
12230 | * 10987654321098765432109876543210 | |
12231 | * 001000 x1110000101 | |
12232 | * rt ----- | |
12233 | * rs ----- | |
12234 | * rd ----- | |
12235 | */ | |
12236 | std::string NMD::PREF_U12_(uint64 instruction) | |
12237 | { | |
12238 | uint64 hint_value = extract_hint_25_24_23_22_21(instruction); | |
89a955e8 | 12239 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 12240 | uint64 u_value = extract_u_11_10_9_8_7_6_5_4_3_2_1_0(instruction); |
89a955e8 AM |
12241 | |
12242 | std::string hint = IMMEDIATE(copy(hint_value)); | |
12243 | std::string u = IMMEDIATE(copy(u_value)); | |
12244 | std::string rs = GPR(copy(rs_value)); | |
12245 | ||
12246 | return img::format("PREF %s, %s(%s)", hint, u, rs); | |
12247 | } | |
12248 | ||
12249 | ||
12250 | /* | |
12251 | * | |
12252 | * | |
12253 | * 3 2 1 | |
12254 | * 10987654321098765432109876543210 | |
12255 | * 001000 x1110000101 | |
12256 | * rt ----- | |
12257 | * rs ----- | |
12258 | * rd ----- | |
12259 | */ | |
12260 | std::string NMD::PREFE(uint64 instruction) | |
12261 | { | |
89a955e8 AM |
12262 | uint64 hint_value = extract_hint_25_24_23_22_21(instruction); |
12263 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
75199b40 | 12264 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
89a955e8 AM |
12265 | |
12266 | std::string hint = IMMEDIATE(copy(hint_value)); | |
12267 | std::string s = IMMEDIATE(copy(s_value)); | |
12268 | std::string rs = GPR(copy(rs_value)); | |
12269 | ||
12270 | return img::format("PREFE %s, %s(%s)", hint, s, rs); | |
12271 | } | |
12272 | ||
12273 | ||
12274 | /* | |
12275 | * | |
12276 | * | |
12277 | * 3 2 1 | |
12278 | * 10987654321098765432109876543210 | |
12279 | * 001000 x1110000101 | |
12280 | * rt ----- | |
12281 | * rs ----- | |
12282 | * rd ----- | |
12283 | */ | |
12284 | std::string NMD::PREPEND(uint64 instruction) | |
12285 | { | |
12286 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 12287 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 12288 | uint64 sa_value = extract_sa_15_14_13_12_11(instruction); |
89a955e8 AM |
12289 | |
12290 | std::string rt = GPR(copy(rt_value)); | |
12291 | std::string rs = GPR(copy(rs_value)); | |
12292 | std::string sa = IMMEDIATE(copy(sa_value)); | |
12293 | ||
12294 | return img::format("PREPEND %s, %s, %s", rt, rs, sa); | |
12295 | } | |
12296 | ||
12297 | ||
12298 | /* | |
12299 | * | |
12300 | * | |
12301 | * 3 2 1 | |
12302 | * 10987654321098765432109876543210 | |
12303 | * 001000 x1110000101 | |
12304 | * rt ----- | |
12305 | * rs ----- | |
12306 | * rd ----- | |
12307 | */ | |
12308 | std::string NMD::RADDU_W_QB(uint64 instruction) | |
12309 | { | |
12310 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
12311 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
12312 | ||
12313 | std::string rt = GPR(copy(rt_value)); | |
12314 | std::string rs = GPR(copy(rs_value)); | |
12315 | ||
12316 | return img::format("RADDU.W.QB %s, %s", rt, rs); | |
12317 | } | |
12318 | ||
12319 | ||
12320 | /* | |
12321 | * | |
12322 | * | |
12323 | * 3 2 1 | |
12324 | * 10987654321098765432109876543210 | |
12325 | * 001000 x1110000101 | |
12326 | * rt ----- | |
12327 | * rs ----- | |
12328 | * rd ----- | |
12329 | */ | |
12330 | std::string NMD::RDDSP(uint64 instruction) | |
12331 | { | |
12332 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
12333 | uint64 mask_value = extract_mask_20_19_18_17_16_15_14(instruction); | |
12334 | ||
12335 | std::string rt = GPR(copy(rt_value)); | |
12336 | std::string mask = IMMEDIATE(copy(mask_value)); | |
12337 | ||
12338 | return img::format("RDDSP %s, %s", rt, mask); | |
12339 | } | |
12340 | ||
12341 | ||
12342 | /* | |
12343 | * | |
12344 | * | |
12345 | * 3 2 1 | |
12346 | * 10987654321098765432109876543210 | |
12347 | * 001000 x1110000101 | |
12348 | * rt ----- | |
12349 | * rs ----- | |
12350 | * rd ----- | |
12351 | */ | |
12352 | std::string NMD::RDHWR(uint64 instruction) | |
12353 | { | |
12354 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
12355 | uint64 hs_value = extract_hs_20_19_18_17_16(instruction); | |
12356 | uint64 sel_value = extract_sel_13_12_11(instruction); | |
12357 | ||
12358 | std::string rt = GPR(copy(rt_value)); | |
12359 | std::string hs = CPR(copy(hs_value)); | |
12360 | std::string sel = IMMEDIATE(copy(sel_value)); | |
12361 | ||
12362 | return img::format("RDHWR %s, %s, %s", rt, hs, sel); | |
12363 | } | |
12364 | ||
12365 | ||
12366 | /* | |
12367 | * | |
12368 | * | |
12369 | * 3 2 1 | |
12370 | * 10987654321098765432109876543210 | |
12371 | * 001000 x1110000101 | |
12372 | * rt ----- | |
12373 | * rs ----- | |
12374 | * rd ----- | |
12375 | */ | |
12376 | std::string NMD::RDPGPR(uint64 instruction) | |
12377 | { | |
12378 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
12379 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
12380 | ||
12381 | std::string rt = GPR(copy(rt_value)); | |
12382 | std::string rs = GPR(copy(rs_value)); | |
12383 | ||
12384 | return img::format("RDPGPR %s, %s", rt, rs); | |
12385 | } | |
12386 | ||
12387 | ||
12388 | /* | |
12389 | * | |
12390 | * | |
12391 | * 3 2 1 | |
12392 | * 10987654321098765432109876543210 | |
12393 | * 001000 x1110000101 | |
12394 | * rt ----- | |
12395 | * rs ----- | |
12396 | * rd ----- | |
12397 | */ | |
12398 | std::string NMD::RECIP_D(uint64 instruction) | |
12399 | { | |
17ce2f00 | 12400 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 12401 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 AM |
12402 | |
12403 | std::string ft = FPR(copy(ft_value)); | |
12404 | std::string fs = FPR(copy(fs_value)); | |
12405 | ||
12406 | return img::format("RECIP.D %s, %s", ft, fs); | |
12407 | } | |
12408 | ||
12409 | ||
12410 | /* | |
12411 | * | |
12412 | * | |
12413 | * 3 2 1 | |
12414 | * 10987654321098765432109876543210 | |
12415 | * 001000 x1110000101 | |
12416 | * rt ----- | |
12417 | * rs ----- | |
12418 | * rd ----- | |
12419 | */ | |
12420 | std::string NMD::RECIP_S(uint64 instruction) | |
12421 | { | |
17ce2f00 | 12422 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 12423 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 AM |
12424 | |
12425 | std::string ft = FPR(copy(ft_value)); | |
12426 | std::string fs = FPR(copy(fs_value)); | |
12427 | ||
12428 | return img::format("RECIP.S %s, %s", ft, fs); | |
12429 | } | |
12430 | ||
12431 | ||
12432 | /* | |
12433 | * | |
12434 | * | |
12435 | * 3 2 1 | |
12436 | * 10987654321098765432109876543210 | |
12437 | * 001000 x1110000101 | |
12438 | * rt ----- | |
12439 | * rs ----- | |
12440 | * rd ----- | |
12441 | */ | |
12442 | std::string NMD::REPL_PH(uint64 instruction) | |
12443 | { | |
12444 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
d3605cc0 | 12445 | int64 s_value = extract_s__se9_20_19_18_17_16_15_14_13_12_11(instruction); |
89a955e8 AM |
12446 | |
12447 | std::string rt = GPR(copy(rt_value)); | |
12448 | std::string s = IMMEDIATE(copy(s_value)); | |
12449 | ||
12450 | return img::format("REPL.PH %s, %s", rt, s); | |
12451 | } | |
12452 | ||
12453 | ||
12454 | /* | |
12455 | * | |
12456 | * | |
12457 | * 3 2 1 | |
12458 | * 10987654321098765432109876543210 | |
12459 | * 001000 x1110000101 | |
12460 | * rt ----- | |
12461 | * rs ----- | |
12462 | * rd ----- | |
12463 | */ | |
12464 | std::string NMD::REPL_QB(uint64 instruction) | |
12465 | { | |
12466 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
12467 | uint64 u_value = extract_u_20_19_18_17_16_15_14_13(instruction); | |
12468 | ||
12469 | std::string rt = GPR(copy(rt_value)); | |
12470 | std::string u = IMMEDIATE(copy(u_value)); | |
12471 | ||
12472 | return img::format("REPL.QB %s, %s", rt, u); | |
12473 | } | |
12474 | ||
12475 | ||
12476 | /* | |
12477 | * | |
12478 | * | |
12479 | * 3 2 1 | |
12480 | * 10987654321098765432109876543210 | |
12481 | * 001000 x1110000101 | |
12482 | * rt ----- | |
12483 | * rs ----- | |
12484 | * rd ----- | |
12485 | */ | |
12486 | std::string NMD::REPLV_PH(uint64 instruction) | |
12487 | { | |
12488 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
12489 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
12490 | ||
12491 | std::string rt = GPR(copy(rt_value)); | |
12492 | std::string rs = GPR(copy(rs_value)); | |
12493 | ||
12494 | return img::format("REPLV.PH %s, %s", rt, rs); | |
12495 | } | |
12496 | ||
12497 | ||
12498 | /* | |
12499 | * | |
12500 | * | |
12501 | * 3 2 1 | |
12502 | * 10987654321098765432109876543210 | |
12503 | * 001000 x1110000101 | |
12504 | * rt ----- | |
12505 | * rs ----- | |
12506 | * rd ----- | |
12507 | */ | |
12508 | std::string NMD::REPLV_QB(uint64 instruction) | |
12509 | { | |
12510 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
12511 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
12512 | ||
12513 | std::string rt = GPR(copy(rt_value)); | |
12514 | std::string rs = GPR(copy(rs_value)); | |
12515 | ||
12516 | return img::format("REPLV.QB %s, %s", rt, rs); | |
12517 | } | |
12518 | ||
12519 | ||
12520 | /* | |
12521 | * | |
12522 | * | |
12523 | * 3 2 1 | |
12524 | * 10987654321098765432109876543210 | |
12525 | * 001000 x1110000101 | |
12526 | * rt ----- | |
12527 | * rs ----- | |
12528 | * rd ----- | |
12529 | */ | |
12530 | std::string NMD::RESTORE_32_(uint64 instruction) | |
12531 | { | |
89a955e8 | 12532 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); |
75199b40 | 12533 | uint64 count_value = extract_count_19_18_17_16(instruction); |
11b9732a | 12534 | uint64 u_value = extract_u_11_10_9_8_7_6_5_4_3__s3(instruction); |
89a955e8 AM |
12535 | uint64 gp_value = extract_gp_2(instruction); |
12536 | ||
12537 | std::string u = IMMEDIATE(copy(u_value)); | |
12538 | return img::format("RESTORE %s%s", u, | |
12539 | save_restore_list(rt_value, count_value, gp_value)); | |
12540 | } | |
12541 | ||
12542 | ||
12543 | /* | |
12544 | * | |
12545 | * | |
12546 | * 3 2 1 | |
12547 | * 10987654321098765432109876543210 | |
12548 | * 001000 x1110000101 | |
12549 | * rt ----- | |
12550 | * rs ----- | |
12551 | * rd ----- | |
12552 | */ | |
12553 | std::string NMD::RESTORE_JRC_16_(uint64 instruction) | |
12554 | { | |
89a955e8 | 12555 | uint64 rt1_value = extract_rtl_11(instruction); |
11b9732a | 12556 | uint64 u_value = extract_u_7_6_5_4__s4(instruction); |
75199b40 | 12557 | uint64 count_value = extract_count_3_2_1_0(instruction); |
89a955e8 AM |
12558 | |
12559 | std::string u = IMMEDIATE(copy(u_value)); | |
12560 | return img::format("RESTORE.JRC %s%s", u, | |
12561 | save_restore_list(encode_rt1_from_rt(rt1_value), count_value, 0)); | |
12562 | } | |
12563 | ||
12564 | ||
12565 | /* | |
12566 | * | |
12567 | * | |
12568 | * 3 2 1 | |
12569 | * 10987654321098765432109876543210 | |
12570 | * 001000 x1110000101 | |
12571 | * rt ----- | |
12572 | * rs ----- | |
12573 | * rd ----- | |
12574 | */ | |
12575 | std::string NMD::RESTORE_JRC_32_(uint64 instruction) | |
12576 | { | |
89a955e8 | 12577 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); |
86b5f803 | 12578 | uint64 count_value = extract_count_19_18_17_16(instruction); |
11b9732a | 12579 | uint64 u_value = extract_u_11_10_9_8_7_6_5_4_3__s3(instruction); |
89a955e8 AM |
12580 | uint64 gp_value = extract_gp_2(instruction); |
12581 | ||
12582 | std::string u = IMMEDIATE(copy(u_value)); | |
12583 | return img::format("RESTORE.JRC %s%s", u, | |
12584 | save_restore_list(rt_value, count_value, gp_value)); | |
12585 | } | |
12586 | ||
12587 | ||
12588 | /* | |
12589 | * | |
12590 | * | |
12591 | * 3 2 1 | |
12592 | * 10987654321098765432109876543210 | |
12593 | * 001000 x1110000101 | |
12594 | * rt ----- | |
12595 | * rs ----- | |
12596 | * rd ----- | |
12597 | */ | |
12598 | std::string NMD::RESTOREF(uint64 instruction) | |
12599 | { | |
12600 | uint64 count_value = extract_count_19_18_17_16(instruction); | |
11b9732a | 12601 | uint64 u_value = extract_u_11_10_9_8_7_6_5_4_3__s3(instruction); |
89a955e8 AM |
12602 | |
12603 | std::string u = IMMEDIATE(copy(u_value)); | |
12604 | std::string count = IMMEDIATE(copy(count_value)); | |
12605 | ||
12606 | return img::format("RESTOREF %s, %s", u, count); | |
12607 | } | |
12608 | ||
12609 | ||
12610 | /* | |
12611 | * | |
12612 | * | |
12613 | * 3 2 1 | |
12614 | * 10987654321098765432109876543210 | |
12615 | * 001000 x1110000101 | |
12616 | * rt ----- | |
12617 | * rs ----- | |
12618 | * rd ----- | |
12619 | */ | |
12620 | std::string NMD::RINT_D(uint64 instruction) | |
12621 | { | |
17ce2f00 | 12622 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 12623 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 AM |
12624 | |
12625 | std::string ft = FPR(copy(ft_value)); | |
12626 | std::string fs = FPR(copy(fs_value)); | |
12627 | ||
12628 | return img::format("RINT.D %s, %s", ft, fs); | |
12629 | } | |
12630 | ||
12631 | ||
12632 | /* | |
12633 | * | |
12634 | * | |
12635 | * 3 2 1 | |
12636 | * 10987654321098765432109876543210 | |
12637 | * 001000 x1110000101 | |
12638 | * rt ----- | |
12639 | * rs ----- | |
12640 | * rd ----- | |
12641 | */ | |
12642 | std::string NMD::RINT_S(uint64 instruction) | |
12643 | { | |
17ce2f00 | 12644 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 12645 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 AM |
12646 | |
12647 | std::string ft = FPR(copy(ft_value)); | |
12648 | std::string fs = FPR(copy(fs_value)); | |
12649 | ||
12650 | return img::format("RINT.S %s, %s", ft, fs); | |
12651 | } | |
12652 | ||
12653 | ||
12654 | /* | |
12655 | * | |
12656 | * | |
12657 | * 3 2 1 | |
12658 | * 10987654321098765432109876543210 | |
12659 | * 001000 x1110000101 | |
12660 | * rt ----- | |
12661 | * rs ----- | |
12662 | * rd ----- | |
12663 | */ | |
12664 | std::string NMD::ROTR(uint64 instruction) | |
12665 | { | |
12666 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 12667 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 12668 | uint64 shift_value = extract_shift_4_3_2_1_0(instruction); |
89a955e8 AM |
12669 | |
12670 | std::string rt = GPR(copy(rt_value)); | |
12671 | std::string rs = GPR(copy(rs_value)); | |
12672 | std::string shift = IMMEDIATE(copy(shift_value)); | |
12673 | ||
12674 | return img::format("ROTR %s, %s, %s", rt, rs, shift); | |
12675 | } | |
12676 | ||
12677 | ||
12678 | /* | |
12679 | * | |
12680 | * | |
12681 | * 3 2 1 | |
12682 | * 10987654321098765432109876543210 | |
12683 | * 001000 x1110000101 | |
12684 | * rt ----- | |
12685 | * rs ----- | |
12686 | * rd ----- | |
12687 | */ | |
12688 | std::string NMD::ROTRV(uint64 instruction) | |
12689 | { | |
12690 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 12691 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 12692 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
12693 | |
12694 | std::string rd = GPR(copy(rd_value)); | |
12695 | std::string rs = GPR(copy(rs_value)); | |
12696 | std::string rt = GPR(copy(rt_value)); | |
12697 | ||
12698 | return img::format("ROTRV %s, %s, %s", rd, rs, rt); | |
12699 | } | |
12700 | ||
12701 | ||
12702 | /* | |
12703 | * | |
12704 | * | |
12705 | * 3 2 1 | |
12706 | * 10987654321098765432109876543210 | |
12707 | * 001000 x1110000101 | |
12708 | * rt ----- | |
12709 | * rs ----- | |
12710 | * rd ----- | |
12711 | */ | |
12712 | std::string NMD::ROTX(uint64 instruction) | |
12713 | { | |
12714 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
86b5f803 | 12715 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
11b9732a | 12716 | uint64 shiftx_value = extract_shiftx_10_9_8_7__s1(instruction); |
89a955e8 | 12717 | uint64 stripe_value = extract_stripe_6(instruction); |
86b5f803 | 12718 | uint64 shift_value = extract_shift_4_3_2_1_0(instruction); |
89a955e8 AM |
12719 | |
12720 | std::string rt = GPR(copy(rt_value)); | |
12721 | std::string rs = GPR(copy(rs_value)); | |
12722 | std::string shift = IMMEDIATE(copy(shift_value)); | |
12723 | std::string shiftx = IMMEDIATE(copy(shiftx_value)); | |
12724 | std::string stripe = IMMEDIATE(copy(stripe_value)); | |
12725 | ||
12726 | return img::format("ROTX %s, %s, %s, %s, %s", | |
12727 | rt, rs, shift, shiftx, stripe); | |
12728 | } | |
12729 | ||
12730 | ||
12731 | /* | |
12732 | * | |
12733 | * | |
12734 | * 3 2 1 | |
12735 | * 10987654321098765432109876543210 | |
12736 | * 001000 x1110000101 | |
12737 | * rt ----- | |
12738 | * rs ----- | |
12739 | * rd ----- | |
12740 | */ | |
12741 | std::string NMD::ROUND_L_D(uint64 instruction) | |
12742 | { | |
17ce2f00 | 12743 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 12744 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 AM |
12745 | |
12746 | std::string ft = FPR(copy(ft_value)); | |
12747 | std::string fs = FPR(copy(fs_value)); | |
12748 | ||
12749 | return img::format("ROUND.L.D %s, %s", ft, fs); | |
12750 | } | |
12751 | ||
12752 | ||
12753 | /* | |
12754 | * | |
12755 | * | |
12756 | * 3 2 1 | |
12757 | * 10987654321098765432109876543210 | |
12758 | * 001000 x1110000101 | |
12759 | * rt ----- | |
12760 | * rs ----- | |
12761 | * rd ----- | |
12762 | */ | |
12763 | std::string NMD::ROUND_L_S(uint64 instruction) | |
12764 | { | |
17ce2f00 | 12765 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 12766 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 AM |
12767 | |
12768 | std::string ft = FPR(copy(ft_value)); | |
12769 | std::string fs = FPR(copy(fs_value)); | |
12770 | ||
12771 | return img::format("ROUND.L.S %s, %s", ft, fs); | |
12772 | } | |
12773 | ||
12774 | ||
12775 | /* | |
12776 | * | |
12777 | * | |
12778 | * 3 2 1 | |
12779 | * 10987654321098765432109876543210 | |
12780 | * 001000 x1110000101 | |
12781 | * rt ----- | |
12782 | * rs ----- | |
12783 | * rd ----- | |
12784 | */ | |
12785 | std::string NMD::ROUND_W_D(uint64 instruction) | |
12786 | { | |
17ce2f00 | 12787 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 12788 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 AM |
12789 | |
12790 | std::string ft = FPR(copy(ft_value)); | |
12791 | std::string fs = FPR(copy(fs_value)); | |
12792 | ||
12793 | return img::format("ROUND.W.D %s, %s", ft, fs); | |
12794 | } | |
12795 | ||
12796 | ||
12797 | /* | |
12798 | * | |
12799 | * | |
12800 | * 3 2 1 | |
12801 | * 10987654321098765432109876543210 | |
12802 | * 001000 x1110000101 | |
12803 | * rt ----- | |
12804 | * rs ----- | |
12805 | * rd ----- | |
12806 | */ | |
12807 | std::string NMD::ROUND_W_S(uint64 instruction) | |
12808 | { | |
17ce2f00 | 12809 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 12810 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 AM |
12811 | |
12812 | std::string ft = FPR(copy(ft_value)); | |
12813 | std::string fs = FPR(copy(fs_value)); | |
12814 | ||
12815 | return img::format("ROUND.W.S %s, %s", ft, fs); | |
12816 | } | |
12817 | ||
12818 | ||
12819 | /* | |
12820 | * | |
12821 | * | |
12822 | * 3 2 1 | |
12823 | * 10987654321098765432109876543210 | |
12824 | * 001000 x1110000101 | |
12825 | * rt ----- | |
12826 | * rs ----- | |
12827 | * rd ----- | |
12828 | */ | |
12829 | std::string NMD::RSQRT_D(uint64 instruction) | |
12830 | { | |
17ce2f00 | 12831 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 12832 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 AM |
12833 | |
12834 | std::string ft = FPR(copy(ft_value)); | |
12835 | std::string fs = FPR(copy(fs_value)); | |
12836 | ||
12837 | return img::format("RSQRT.D %s, %s", ft, fs); | |
12838 | } | |
12839 | ||
12840 | ||
12841 | /* | |
12842 | * | |
12843 | * | |
12844 | * 3 2 1 | |
12845 | * 10987654321098765432109876543210 | |
12846 | * 001000 x1110000101 | |
12847 | * rt ----- | |
12848 | * rs ----- | |
12849 | * rd ----- | |
12850 | */ | |
12851 | std::string NMD::RSQRT_S(uint64 instruction) | |
12852 | { | |
17ce2f00 | 12853 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 12854 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 AM |
12855 | |
12856 | std::string ft = FPR(copy(ft_value)); | |
12857 | std::string fs = FPR(copy(fs_value)); | |
12858 | ||
12859 | return img::format("RSQRT.S %s, %s", ft, fs); | |
12860 | } | |
12861 | ||
12862 | ||
12863 | /* | |
12864 | * | |
12865 | * | |
12866 | * 3 2 1 | |
12867 | * 10987654321098765432109876543210 | |
12868 | * 001000 01001001101 | |
12869 | * rt ----- | |
12870 | * rs ----- | |
12871 | * rd ----- | |
12872 | */ | |
12873 | std::string NMD::SAVE_16_(uint64 instruction) | |
12874 | { | |
89a955e8 | 12875 | uint64 rt1_value = extract_rtl_11(instruction); |
11b9732a | 12876 | uint64 u_value = extract_u_7_6_5_4__s4(instruction); |
75199b40 | 12877 | uint64 count_value = extract_count_3_2_1_0(instruction); |
89a955e8 AM |
12878 | |
12879 | std::string u = IMMEDIATE(copy(u_value)); | |
12880 | return img::format("SAVE %s%s", u, | |
12881 | save_restore_list(encode_rt1_from_rt(rt1_value), count_value, 0)); | |
12882 | } | |
12883 | ||
12884 | ||
12885 | /* | |
12886 | * | |
12887 | * | |
12888 | * 3 2 1 | |
12889 | * 10987654321098765432109876543210 | |
12890 | * 001000 01001001101 | |
12891 | * rt ----- | |
12892 | * rs ----- | |
12893 | * rd ----- | |
12894 | */ | |
12895 | std::string NMD::SAVE_32_(uint64 instruction) | |
12896 | { | |
12897 | uint64 count_value = extract_count_19_18_17_16(instruction); | |
12898 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
11b9732a | 12899 | uint64 u_value = extract_u_11_10_9_8_7_6_5_4_3__s3(instruction); |
89a955e8 AM |
12900 | uint64 gp_value = extract_gp_2(instruction); |
12901 | ||
12902 | std::string u = IMMEDIATE(copy(u_value)); | |
12903 | return img::format("SAVE %s%s", u, | |
12904 | save_restore_list(rt_value, count_value, gp_value)); | |
12905 | } | |
12906 | ||
12907 | ||
12908 | /* | |
12909 | * | |
12910 | * | |
12911 | * 3 2 1 | |
12912 | * 10987654321098765432109876543210 | |
12913 | * 001000 01001001101 | |
12914 | * rt ----- | |
12915 | * rs ----- | |
12916 | * rd ----- | |
12917 | */ | |
12918 | std::string NMD::SAVEF(uint64 instruction) | |
12919 | { | |
12920 | uint64 count_value = extract_count_19_18_17_16(instruction); | |
11b9732a | 12921 | uint64 u_value = extract_u_11_10_9_8_7_6_5_4_3__s3(instruction); |
89a955e8 AM |
12922 | |
12923 | std::string u = IMMEDIATE(copy(u_value)); | |
12924 | std::string count = IMMEDIATE(copy(count_value)); | |
12925 | ||
12926 | return img::format("SAVEF %s, %s", u, count); | |
12927 | } | |
12928 | ||
12929 | ||
12930 | /* | |
12931 | * | |
12932 | * | |
12933 | * 3 2 1 | |
12934 | * 10987654321098765432109876543210 | |
12935 | * 001000 01001001101 | |
12936 | * rt ----- | |
12937 | * rs ----- | |
12938 | * rd ----- | |
12939 | */ | |
12940 | std::string NMD::SB_16_(uint64 instruction) | |
12941 | { | |
12942 | uint64 rtz3_value = extract_rtz3_9_8_7(instruction); | |
89a955e8 | 12943 | uint64 rs3_value = extract_rs3_6_5_4(instruction); |
75199b40 | 12944 | uint64 u_value = extract_u_1_0(instruction); |
89a955e8 | 12945 | |
8191856b | 12946 | std::string rtz3 = GPR(decode_gpr_gpr3_src_store(rtz3_value)); |
89a955e8 | 12947 | std::string u = IMMEDIATE(copy(u_value)); |
988d6c89 | 12948 | std::string rs3 = GPR(decode_gpr_gpr3(rs3_value)); |
89a955e8 AM |
12949 | |
12950 | return img::format("SB %s, %s(%s)", rtz3, u, rs3); | |
12951 | } | |
12952 | ||
12953 | ||
12954 | /* | |
12955 | * | |
12956 | * | |
12957 | * 3 2 1 | |
12958 | * 10987654321098765432109876543210 | |
12959 | * 001000 01001001101 | |
12960 | * rt ----- | |
12961 | * rs ----- | |
12962 | * rd ----- | |
12963 | */ | |
12964 | std::string NMD::SB_GP_(uint64 instruction) | |
12965 | { | |
12966 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
12967 | uint64 u_value = extract_u_17_to_0(instruction); | |
12968 | ||
12969 | std::string rt = GPR(copy(rt_value)); | |
12970 | std::string u = IMMEDIATE(copy(u_value)); | |
12971 | ||
12972 | return img::format("SB %s, %s($%d)", rt, u, 28); | |
12973 | } | |
12974 | ||
12975 | ||
12976 | /* | |
12977 | * | |
12978 | * | |
12979 | * 3 2 1 | |
12980 | * 10987654321098765432109876543210 | |
12981 | * 001000 01001001101 | |
12982 | * rt ----- | |
12983 | * rs ----- | |
12984 | * rd ----- | |
12985 | */ | |
12986 | std::string NMD::SB_S9_(uint64 instruction) | |
12987 | { | |
12988 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 12989 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 12990 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
89a955e8 AM |
12991 | |
12992 | std::string rt = GPR(copy(rt_value)); | |
12993 | std::string s = IMMEDIATE(copy(s_value)); | |
12994 | std::string rs = GPR(copy(rs_value)); | |
12995 | ||
12996 | return img::format("SB %s, %s(%s)", rt, s, rs); | |
12997 | } | |
12998 | ||
12999 | ||
13000 | /* | |
13001 | * | |
13002 | * | |
13003 | * 3 2 1 | |
13004 | * 10987654321098765432109876543210 | |
13005 | * 001000 01001001101 | |
13006 | * rt ----- | |
13007 | * rs ----- | |
13008 | * rd ----- | |
13009 | */ | |
13010 | std::string NMD::SB_U12_(uint64 instruction) | |
13011 | { | |
13012 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 13013 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 13014 | uint64 u_value = extract_u_11_10_9_8_7_6_5_4_3_2_1_0(instruction); |
89a955e8 AM |
13015 | |
13016 | std::string rt = GPR(copy(rt_value)); | |
13017 | std::string u = IMMEDIATE(copy(u_value)); | |
13018 | std::string rs = GPR(copy(rs_value)); | |
13019 | ||
13020 | return img::format("SB %s, %s(%s)", rt, u, rs); | |
13021 | } | |
13022 | ||
13023 | ||
13024 | /* | |
13025 | * | |
13026 | * | |
13027 | * 3 2 1 | |
13028 | * 10987654321098765432109876543210 | |
13029 | * 001000 01001001101 | |
13030 | * rt ----- | |
13031 | * rs ----- | |
13032 | * rd ----- | |
13033 | */ | |
13034 | std::string NMD::SBE(uint64 instruction) | |
13035 | { | |
13036 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 13037 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 13038 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
89a955e8 AM |
13039 | |
13040 | std::string rt = GPR(copy(rt_value)); | |
13041 | std::string s = IMMEDIATE(copy(s_value)); | |
13042 | std::string rs = GPR(copy(rs_value)); | |
13043 | ||
13044 | return img::format("SBE %s, %s(%s)", rt, s, rs); | |
13045 | } | |
13046 | ||
13047 | ||
13048 | /* | |
13049 | * | |
13050 | * | |
13051 | * 3 2 1 | |
13052 | * 10987654321098765432109876543210 | |
13053 | * 001000 01001001101 | |
13054 | * rt ----- | |
13055 | * rs ----- | |
13056 | * rd ----- | |
13057 | */ | |
13058 | std::string NMD::SBX(uint64 instruction) | |
13059 | { | |
13060 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 13061 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 13062 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
13063 | |
13064 | std::string rd = GPR(copy(rd_value)); | |
13065 | std::string rs = GPR(copy(rs_value)); | |
13066 | std::string rt = GPR(copy(rt_value)); | |
13067 | ||
13068 | return img::format("SBX %s, %s(%s)", rd, rs, rt); | |
13069 | } | |
13070 | ||
13071 | ||
13072 | /* | |
13073 | * | |
13074 | * | |
13075 | * 3 2 1 | |
13076 | * 10987654321098765432109876543210 | |
13077 | * 001000 01001001101 | |
13078 | * rt ----- | |
13079 | * rs ----- | |
13080 | * rd ----- | |
13081 | */ | |
13082 | std::string NMD::SC(uint64 instruction) | |
13083 | { | |
13084 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 13085 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 13086 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_s2(instruction); |
89a955e8 AM |
13087 | |
13088 | std::string rt = GPR(copy(rt_value)); | |
13089 | std::string s = IMMEDIATE(copy(s_value)); | |
13090 | std::string rs = GPR(copy(rs_value)); | |
13091 | ||
13092 | return img::format("SC %s, %s(%s)", rt, s, rs); | |
13093 | } | |
13094 | ||
13095 | ||
13096 | /* | |
13097 | * | |
13098 | * | |
13099 | * 3 2 1 | |
13100 | * 10987654321098765432109876543210 | |
13101 | * 001000 01001001101 | |
13102 | * rt ----- | |
13103 | * rs ----- | |
13104 | * rd ----- | |
13105 | */ | |
13106 | std::string NMD::SCD(uint64 instruction) | |
13107 | { | |
13108 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 13109 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 13110 | int64 s_value = extract_s__se8_15_7_6_5_4_3_s3(instruction); |
89a955e8 AM |
13111 | |
13112 | std::string rt = GPR(copy(rt_value)); | |
13113 | std::string s = IMMEDIATE(copy(s_value)); | |
13114 | std::string rs = GPR(copy(rs_value)); | |
13115 | ||
13116 | return img::format("SCD %s, %s(%s)", rt, s, rs); | |
13117 | } | |
13118 | ||
13119 | ||
13120 | /* | |
13121 | * | |
13122 | * | |
13123 | * 3 2 1 | |
13124 | * 10987654321098765432109876543210 | |
13125 | * 001000 01001001101 | |
13126 | * rt ----- | |
13127 | * rs ----- | |
13128 | * rd ----- | |
13129 | */ | |
13130 | std::string NMD::SCDP(uint64 instruction) | |
13131 | { | |
13132 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 13133 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 13134 | uint64 ru_value = extract_ru_7_6_5_4_3(instruction); |
89a955e8 AM |
13135 | |
13136 | std::string rt = GPR(copy(rt_value)); | |
13137 | std::string ru = GPR(copy(ru_value)); | |
13138 | std::string rs = GPR(copy(rs_value)); | |
13139 | ||
13140 | return img::format("SCDP %s, %s, (%s)", rt, ru, rs); | |
13141 | } | |
13142 | ||
13143 | ||
13144 | /* | |
13145 | * | |
13146 | * | |
13147 | * 3 2 1 | |
13148 | * 10987654321098765432109876543210 | |
13149 | * 001000 01001001101 | |
13150 | * rt ----- | |
13151 | * rs ----- | |
13152 | * rd ----- | |
13153 | */ | |
13154 | std::string NMD::SCE(uint64 instruction) | |
13155 | { | |
13156 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 13157 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 13158 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_s2(instruction); |
89a955e8 AM |
13159 | |
13160 | std::string rt = GPR(copy(rt_value)); | |
13161 | std::string s = IMMEDIATE(copy(s_value)); | |
13162 | std::string rs = GPR(copy(rs_value)); | |
13163 | ||
13164 | return img::format("SCE %s, %s(%s)", rt, s, rs); | |
13165 | } | |
13166 | ||
13167 | ||
13168 | /* | |
13169 | * | |
13170 | * | |
13171 | * 3 2 1 | |
13172 | * 10987654321098765432109876543210 | |
13173 | * 001000 01001001101 | |
13174 | * rt ----- | |
13175 | * rs ----- | |
13176 | * rd ----- | |
13177 | */ | |
13178 | std::string NMD::SCWP(uint64 instruction) | |
13179 | { | |
13180 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 13181 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 13182 | uint64 ru_value = extract_ru_7_6_5_4_3(instruction); |
89a955e8 AM |
13183 | |
13184 | std::string rt = GPR(copy(rt_value)); | |
13185 | std::string ru = GPR(copy(ru_value)); | |
13186 | std::string rs = GPR(copy(rs_value)); | |
13187 | ||
13188 | return img::format("SCWP %s, %s, (%s)", rt, ru, rs); | |
13189 | } | |
13190 | ||
13191 | ||
13192 | /* | |
13193 | * | |
13194 | * | |
13195 | * 3 2 1 | |
13196 | * 10987654321098765432109876543210 | |
13197 | * 001000 01001001101 | |
13198 | * rt ----- | |
13199 | * rs ----- | |
13200 | * rd ----- | |
13201 | */ | |
13202 | std::string NMD::SCWPE(uint64 instruction) | |
13203 | { | |
13204 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 13205 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 13206 | uint64 ru_value = extract_ru_7_6_5_4_3(instruction); |
89a955e8 AM |
13207 | |
13208 | std::string rt = GPR(copy(rt_value)); | |
13209 | std::string ru = GPR(copy(ru_value)); | |
13210 | std::string rs = GPR(copy(rs_value)); | |
13211 | ||
13212 | return img::format("SCWPE %s, %s, (%s)", rt, ru, rs); | |
13213 | } | |
13214 | ||
13215 | ||
13216 | /* | |
13217 | * | |
13218 | * | |
13219 | * 3 2 1 | |
13220 | * 10987654321098765432109876543210 | |
13221 | * 001000 01001001101 | |
13222 | * rt ----- | |
13223 | * rs ----- | |
13224 | * rd ----- | |
13225 | */ | |
13226 | std::string NMD::SD_GP_(uint64 instruction) | |
13227 | { | |
13228 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
11b9732a | 13229 | uint64 u_value = extract_u_20_to_3__s3(instruction); |
89a955e8 AM |
13230 | |
13231 | std::string rt = GPR(copy(rt_value)); | |
13232 | std::string u = IMMEDIATE(copy(u_value)); | |
13233 | ||
13234 | return img::format("SD %s, %s($%d)", rt, u, 28); | |
13235 | } | |
13236 | ||
13237 | ||
13238 | /* | |
13239 | * | |
13240 | * | |
13241 | * 3 2 1 | |
13242 | * 10987654321098765432109876543210 | |
13243 | * 001000 01001001101 | |
13244 | * rt ----- | |
13245 | * rs ----- | |
13246 | * rd ----- | |
13247 | */ | |
13248 | std::string NMD::SD_S9_(uint64 instruction) | |
13249 | { | |
13250 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 13251 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 13252 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
89a955e8 AM |
13253 | |
13254 | std::string rt = GPR(copy(rt_value)); | |
13255 | std::string s = IMMEDIATE(copy(s_value)); | |
13256 | std::string rs = GPR(copy(rs_value)); | |
13257 | ||
13258 | return img::format("SD %s, %s(%s)", rt, s, rs); | |
13259 | } | |
13260 | ||
13261 | ||
13262 | /* | |
13263 | * | |
13264 | * | |
13265 | * 3 2 1 | |
13266 | * 10987654321098765432109876543210 | |
13267 | * 001000 01001001101 | |
13268 | * rt ----- | |
13269 | * rs ----- | |
13270 | * rd ----- | |
13271 | */ | |
13272 | std::string NMD::SD_U12_(uint64 instruction) | |
13273 | { | |
13274 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 13275 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 13276 | uint64 u_value = extract_u_11_10_9_8_7_6_5_4_3_2_1_0(instruction); |
89a955e8 AM |
13277 | |
13278 | std::string rt = GPR(copy(rt_value)); | |
13279 | std::string u = IMMEDIATE(copy(u_value)); | |
13280 | std::string rs = GPR(copy(rs_value)); | |
13281 | ||
13282 | return img::format("SD %s, %s(%s)", rt, u, rs); | |
13283 | } | |
13284 | ||
13285 | ||
13286 | /* | |
13287 | * | |
13288 | * | |
13289 | * 3 2 1 | |
13290 | * 10987654321098765432109876543210 | |
13291 | * 001000 01001001101 | |
13292 | * rt ----- | |
13293 | * rs ----- | |
13294 | * rd ----- | |
13295 | */ | |
13296 | std::string NMD::SDBBP_16_(uint64 instruction) | |
13297 | { | |
13298 | uint64 code_value = extract_code_2_1_0(instruction); | |
13299 | ||
13300 | std::string code = IMMEDIATE(copy(code_value)); | |
13301 | ||
13302 | return img::format("SDBBP %s", code); | |
13303 | } | |
13304 | ||
13305 | ||
13306 | /* | |
13307 | * | |
13308 | * | |
13309 | * 3 2 1 | |
13310 | * 10987654321098765432109876543210 | |
13311 | * 001000 01001001101 | |
13312 | * rt ----- | |
13313 | * rs ----- | |
13314 | * rd ----- | |
13315 | */ | |
13316 | std::string NMD::SDBBP_32_(uint64 instruction) | |
13317 | { | |
13318 | uint64 code_value = extract_code_18_to_0(instruction); | |
13319 | ||
13320 | std::string code = IMMEDIATE(copy(code_value)); | |
13321 | ||
13322 | return img::format("SDBBP %s", code); | |
13323 | } | |
13324 | ||
13325 | ||
13326 | /* | |
13327 | * | |
13328 | * | |
13329 | * 3 2 1 | |
13330 | * 10987654321098765432109876543210 | |
13331 | * 001000 01001001101 | |
13332 | * rt ----- | |
13333 | * rs ----- | |
13334 | * rd ----- | |
13335 | */ | |
13336 | std::string NMD::SDC1_GP_(uint64 instruction) | |
13337 | { | |
17ce2f00 | 13338 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
11b9732a | 13339 | uint64 u_value = extract_u_17_to_2__s2(instruction); |
89a955e8 AM |
13340 | |
13341 | std::string ft = FPR(copy(ft_value)); | |
13342 | std::string u = IMMEDIATE(copy(u_value)); | |
13343 | ||
13344 | return img::format("SDC1 %s, %s($%d)", ft, u, 28); | |
13345 | } | |
13346 | ||
13347 | ||
13348 | /* | |
13349 | * | |
13350 | * | |
13351 | * 3 2 1 | |
13352 | * 10987654321098765432109876543210 | |
13353 | * 001000 01001001101 | |
13354 | * rt ----- | |
13355 | * rs ----- | |
13356 | * rd ----- | |
13357 | */ | |
13358 | std::string NMD::SDC1_S9_(uint64 instruction) | |
13359 | { | |
17ce2f00 | 13360 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
89a955e8 | 13361 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 13362 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
89a955e8 AM |
13363 | |
13364 | std::string ft = FPR(copy(ft_value)); | |
13365 | std::string s = IMMEDIATE(copy(s_value)); | |
13366 | std::string rs = GPR(copy(rs_value)); | |
13367 | ||
13368 | return img::format("SDC1 %s, %s(%s)", ft, s, rs); | |
13369 | } | |
13370 | ||
13371 | ||
13372 | /* | |
13373 | * | |
13374 | * | |
13375 | * 3 2 1 | |
13376 | * 10987654321098765432109876543210 | |
13377 | * 001000 01001001101 | |
13378 | * rt ----- | |
13379 | * rs ----- | |
13380 | * rd ----- | |
13381 | */ | |
13382 | std::string NMD::SDC1_U12_(uint64 instruction) | |
13383 | { | |
17ce2f00 | 13384 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
89a955e8 | 13385 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 13386 | uint64 u_value = extract_u_11_10_9_8_7_6_5_4_3_2_1_0(instruction); |
89a955e8 AM |
13387 | |
13388 | std::string ft = FPR(copy(ft_value)); | |
13389 | std::string u = IMMEDIATE(copy(u_value)); | |
13390 | std::string rs = GPR(copy(rs_value)); | |
13391 | ||
13392 | return img::format("SDC1 %s, %s(%s)", ft, u, rs); | |
13393 | } | |
13394 | ||
13395 | ||
13396 | /* | |
13397 | * | |
13398 | * | |
13399 | * 3 2 1 | |
13400 | * 10987654321098765432109876543210 | |
13401 | * 001000 01001001101 | |
13402 | * rt ----- | |
13403 | * rs ----- | |
13404 | * rd ----- | |
13405 | */ | |
13406 | std::string NMD::SDC1X(uint64 instruction) | |
13407 | { | |
13408 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 13409 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 13410 | uint64 ft_value = extract_ft_15_14_13_12_11(instruction); |
89a955e8 AM |
13411 | |
13412 | std::string ft = FPR(copy(ft_value)); | |
13413 | std::string rs = GPR(copy(rs_value)); | |
13414 | std::string rt = GPR(copy(rt_value)); | |
13415 | ||
13416 | return img::format("SDC1X %s, %s(%s)", ft, rs, rt); | |
13417 | } | |
13418 | ||
13419 | ||
13420 | /* | |
13421 | * | |
13422 | * | |
13423 | * 3 2 1 | |
13424 | * 10987654321098765432109876543210 | |
13425 | * 001000 01001001101 | |
13426 | * rt ----- | |
13427 | * rs ----- | |
13428 | * rd ----- | |
13429 | */ | |
13430 | std::string NMD::SDC1XS(uint64 instruction) | |
13431 | { | |
13432 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 13433 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 13434 | uint64 ft_value = extract_ft_15_14_13_12_11(instruction); |
89a955e8 AM |
13435 | |
13436 | std::string ft = FPR(copy(ft_value)); | |
13437 | std::string rs = GPR(copy(rs_value)); | |
13438 | std::string rt = GPR(copy(rt_value)); | |
13439 | ||
13440 | return img::format("SDC1XS %s, %s(%s)", ft, rs, rt); | |
13441 | } | |
13442 | ||
13443 | ||
13444 | /* | |
13445 | * | |
13446 | * | |
13447 | * 3 2 1 | |
13448 | * 10987654321098765432109876543210 | |
13449 | * 001000 01001001101 | |
13450 | * rt ----- | |
13451 | * rs ----- | |
13452 | * rd ----- | |
13453 | */ | |
13454 | std::string NMD::SDC2(uint64 instruction) | |
13455 | { | |
13456 | uint64 cs_value = extract_cs_25_24_23_22_21(instruction); | |
89a955e8 | 13457 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 13458 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
89a955e8 AM |
13459 | |
13460 | std::string cs = CPR(copy(cs_value)); | |
13461 | std::string s = IMMEDIATE(copy(s_value)); | |
13462 | std::string rs = GPR(copy(rs_value)); | |
13463 | ||
13464 | return img::format("SDC2 %s, %s(%s)", cs, s, rs); | |
13465 | } | |
13466 | ||
13467 | ||
13468 | /* | |
13469 | * | |
13470 | * | |
13471 | * 3 2 1 | |
13472 | * 10987654321098765432109876543210 | |
13473 | * 001000 01001001101 | |
13474 | * rt ----- | |
13475 | * rs ----- | |
13476 | * rd ----- | |
13477 | */ | |
13478 | std::string NMD::SDM(uint64 instruction) | |
13479 | { | |
13480 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 13481 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 AM |
13482 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
13483 | uint64 count3_value = extract_count3_14_13_12(instruction); | |
89a955e8 AM |
13484 | |
13485 | std::string rt = GPR(copy(rt_value)); | |
13486 | std::string s = IMMEDIATE(copy(s_value)); | |
13487 | std::string rs = GPR(copy(rs_value)); | |
13488 | std::string count3 = IMMEDIATE(encode_count3_from_count(count3_value)); | |
13489 | ||
13490 | return img::format("SDM %s, %s(%s), %s", rt, s, rs, count3); | |
13491 | } | |
13492 | ||
13493 | ||
13494 | /* | |
13495 | * | |
13496 | * | |
13497 | * 3 2 1 | |
13498 | * 10987654321098765432109876543210 | |
13499 | * 001000 01001001101 | |
13500 | * rt ----- | |
13501 | * rs ----- | |
13502 | * rd ----- | |
13503 | */ | |
13504 | std::string NMD::SDPC_48_(uint64 instruction) | |
13505 | { | |
13506 | uint64 rt_value = extract_rt_41_40_39_38_37(instruction); | |
d3605cc0 | 13507 | int64 s_value = extract_s__se31_15_to_0_31_to_16(instruction); |
89a955e8 AM |
13508 | |
13509 | std::string rt = GPR(copy(rt_value)); | |
13510 | std::string s = ADDRESS(encode_s_from_address(s_value), 6); | |
13511 | ||
13512 | return img::format("SDPC %s, %s", rt, s); | |
13513 | } | |
13514 | ||
13515 | ||
13516 | /* | |
13517 | * | |
13518 | * | |
13519 | * 3 2 1 | |
13520 | * 10987654321098765432109876543210 | |
13521 | * 001000 01001001101 | |
13522 | * rt ----- | |
13523 | * rs ----- | |
13524 | * rd ----- | |
13525 | */ | |
13526 | std::string NMD::SDXS(uint64 instruction) | |
13527 | { | |
13528 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 13529 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 13530 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
13531 | |
13532 | std::string rd = GPR(copy(rd_value)); | |
13533 | std::string rs = GPR(copy(rs_value)); | |
13534 | std::string rt = GPR(copy(rt_value)); | |
13535 | ||
13536 | return img::format("SDXS %s, %s(%s)", rd, rs, rt); | |
13537 | } | |
13538 | ||
13539 | ||
13540 | /* | |
13541 | * | |
13542 | * | |
13543 | * 3 2 1 | |
13544 | * 10987654321098765432109876543210 | |
13545 | * 001000 01001001101 | |
13546 | * rt ----- | |
13547 | * rs ----- | |
13548 | * rd ----- | |
13549 | */ | |
13550 | std::string NMD::SDX(uint64 instruction) | |
13551 | { | |
13552 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 13553 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 13554 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
13555 | |
13556 | std::string rd = GPR(copy(rd_value)); | |
13557 | std::string rs = GPR(copy(rs_value)); | |
13558 | std::string rt = GPR(copy(rt_value)); | |
13559 | ||
13560 | return img::format("SDX %s, %s(%s)", rd, rs, rt); | |
13561 | } | |
13562 | ||
13563 | ||
13564 | /* | |
13565 | * | |
13566 | * | |
13567 | * 3 2 1 | |
13568 | * 10987654321098765432109876543210 | |
13569 | * 001000 01001001101 | |
13570 | * rt ----- | |
13571 | * rs ----- | |
13572 | * rd ----- | |
13573 | */ | |
13574 | std::string NMD::SEB(uint64 instruction) | |
13575 | { | |
13576 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
13577 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
13578 | ||
13579 | std::string rt = GPR(copy(rt_value)); | |
13580 | std::string rs = GPR(copy(rs_value)); | |
13581 | ||
13582 | return img::format("SEB %s, %s", rt, rs); | |
13583 | } | |
13584 | ||
13585 | ||
13586 | /* | |
13587 | * | |
13588 | * | |
13589 | * 3 2 1 | |
13590 | * 10987654321098765432109876543210 | |
13591 | * 001000 01001001101 | |
13592 | * rt ----- | |
13593 | * rs ----- | |
13594 | * rd ----- | |
13595 | */ | |
13596 | std::string NMD::SEH(uint64 instruction) | |
13597 | { | |
13598 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
13599 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
13600 | ||
13601 | std::string rt = GPR(copy(rt_value)); | |
13602 | std::string rs = GPR(copy(rs_value)); | |
13603 | ||
13604 | return img::format("SEH %s, %s", rt, rs); | |
13605 | } | |
13606 | ||
13607 | ||
13608 | /* | |
13609 | * | |
13610 | * | |
13611 | * 3 2 1 | |
13612 | * 10987654321098765432109876543210 | |
13613 | * 001000 01001001101 | |
13614 | * rt ----- | |
13615 | * rs ----- | |
13616 | * rd ----- | |
13617 | */ | |
13618 | std::string NMD::SEL_D(uint64 instruction) | |
13619 | { | |
17ce2f00 | 13620 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 13621 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 13622 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 AM |
13623 | |
13624 | std::string fd = FPR(copy(fd_value)); | |
13625 | std::string fs = FPR(copy(fs_value)); | |
13626 | std::string ft = FPR(copy(ft_value)); | |
13627 | ||
13628 | return img::format("SEL.D %s, %s, %s", fd, fs, ft); | |
13629 | } | |
13630 | ||
13631 | ||
13632 | /* | |
13633 | * | |
13634 | * | |
13635 | * 3 2 1 | |
13636 | * 10987654321098765432109876543210 | |
13637 | * 001000 01001001101 | |
13638 | * rt ----- | |
13639 | * rs ----- | |
13640 | * rd ----- | |
13641 | */ | |
13642 | std::string NMD::SEL_S(uint64 instruction) | |
13643 | { | |
17ce2f00 | 13644 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 13645 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 13646 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 AM |
13647 | |
13648 | std::string fd = FPR(copy(fd_value)); | |
13649 | std::string fs = FPR(copy(fs_value)); | |
13650 | std::string ft = FPR(copy(ft_value)); | |
13651 | ||
13652 | return img::format("SEL.S %s, %s, %s", fd, fs, ft); | |
13653 | } | |
13654 | ||
13655 | ||
13656 | /* | |
13657 | * | |
13658 | * | |
13659 | * 3 2 1 | |
13660 | * 10987654321098765432109876543210 | |
13661 | * 001000 01001001101 | |
13662 | * rt ----- | |
13663 | * rs ----- | |
13664 | * rd ----- | |
13665 | */ | |
13666 | std::string NMD::SELEQZ_D(uint64 instruction) | |
13667 | { | |
17ce2f00 | 13668 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 13669 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 13670 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 AM |
13671 | |
13672 | std::string fd = FPR(copy(fd_value)); | |
13673 | std::string fs = FPR(copy(fs_value)); | |
13674 | std::string ft = FPR(copy(ft_value)); | |
13675 | ||
13676 | return img::format("SELEQZ.D %s, %s, %s", fd, fs, ft); | |
13677 | } | |
13678 | ||
13679 | ||
13680 | /* | |
13681 | * | |
13682 | * | |
13683 | * 3 2 1 | |
13684 | * 10987654321098765432109876543210 | |
13685 | * 001000 01001001101 | |
13686 | * rt ----- | |
13687 | * rs ----- | |
13688 | * rd ----- | |
13689 | */ | |
13690 | std::string NMD::SELEQZ_S(uint64 instruction) | |
13691 | { | |
17ce2f00 | 13692 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 13693 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 13694 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 AM |
13695 | |
13696 | std::string fd = FPR(copy(fd_value)); | |
13697 | std::string fs = FPR(copy(fs_value)); | |
13698 | std::string ft = FPR(copy(ft_value)); | |
13699 | ||
13700 | return img::format("SELEQZ.S %s, %s, %s", fd, fs, ft); | |
13701 | } | |
13702 | ||
13703 | ||
13704 | /* | |
13705 | * | |
13706 | * | |
13707 | * 3 2 1 | |
13708 | * 10987654321098765432109876543210 | |
13709 | * 001000 01001001101 | |
13710 | * rt ----- | |
13711 | * rs ----- | |
13712 | * rd ----- | |
13713 | */ | |
13714 | std::string NMD::SELNEZ_D(uint64 instruction) | |
13715 | { | |
17ce2f00 | 13716 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 13717 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 13718 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 AM |
13719 | |
13720 | std::string fd = FPR(copy(fd_value)); | |
13721 | std::string fs = FPR(copy(fs_value)); | |
13722 | std::string ft = FPR(copy(ft_value)); | |
13723 | ||
13724 | return img::format("SELNEZ.D %s, %s, %s", fd, fs, ft); | |
13725 | } | |
13726 | ||
13727 | ||
13728 | /* | |
13729 | * | |
13730 | * | |
13731 | * 3 2 1 | |
13732 | * 10987654321098765432109876543210 | |
13733 | * 001000 01001001101 | |
13734 | * rt ----- | |
13735 | * rs ----- | |
13736 | * rd ----- | |
13737 | */ | |
13738 | std::string NMD::SELNEZ_S(uint64 instruction) | |
13739 | { | |
17ce2f00 | 13740 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 13741 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 13742 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 AM |
13743 | |
13744 | std::string fd = FPR(copy(fd_value)); | |
13745 | std::string fs = FPR(copy(fs_value)); | |
13746 | std::string ft = FPR(copy(ft_value)); | |
13747 | ||
13748 | return img::format("SELNEZ.S %s, %s, %s", fd, fs, ft); | |
13749 | } | |
13750 | ||
13751 | ||
13752 | /* | |
13753 | * | |
13754 | * | |
13755 | * 3 2 1 | |
13756 | * 10987654321098765432109876543210 | |
13757 | * 001000 01001001101 | |
13758 | * rt ----- | |
13759 | * rs ----- | |
13760 | * rd ----- | |
13761 | */ | |
13762 | std::string NMD::SEQI(uint64 instruction) | |
13763 | { | |
13764 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 13765 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 13766 | uint64 u_value = extract_u_11_10_9_8_7_6_5_4_3_2_1_0(instruction); |
89a955e8 AM |
13767 | |
13768 | std::string rt = GPR(copy(rt_value)); | |
13769 | std::string rs = GPR(copy(rs_value)); | |
13770 | std::string u = IMMEDIATE(copy(u_value)); | |
13771 | ||
13772 | return img::format("SEQI %s, %s, %s", rt, rs, u); | |
13773 | } | |
13774 | ||
13775 | ||
13776 | /* | |
13777 | * | |
13778 | * | |
13779 | * 3 2 1 | |
13780 | * 10987654321098765432109876543210 | |
13781 | * 001000 01001001101 | |
13782 | * rt ----- | |
13783 | * rs ----- | |
13784 | * rd ----- | |
13785 | */ | |
13786 | std::string NMD::SH_16_(uint64 instruction) | |
13787 | { | |
13788 | uint64 rtz3_value = extract_rtz3_9_8_7(instruction); | |
89a955e8 | 13789 | uint64 rs3_value = extract_rs3_6_5_4(instruction); |
75199b40 | 13790 | uint64 u_value = extract_u_2_1__s1(instruction); |
89a955e8 | 13791 | |
8191856b | 13792 | std::string rtz3 = GPR(decode_gpr_gpr3_src_store(rtz3_value)); |
89a955e8 | 13793 | std::string u = IMMEDIATE(copy(u_value)); |
988d6c89 | 13794 | std::string rs3 = GPR(decode_gpr_gpr3(rs3_value)); |
89a955e8 AM |
13795 | |
13796 | return img::format("SH %s, %s(%s)", rtz3, u, rs3); | |
13797 | } | |
13798 | ||
13799 | ||
13800 | /* | |
13801 | * | |
13802 | * | |
13803 | * 3 2 1 | |
13804 | * 10987654321098765432109876543210 | |
13805 | * 001000 01001001101 | |
13806 | * rt ----- | |
13807 | * rs ----- | |
13808 | * rd ----- | |
13809 | */ | |
13810 | std::string NMD::SH_GP_(uint64 instruction) | |
13811 | { | |
13812 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
11b9732a | 13813 | uint64 u_value = extract_u_17_to_1__s1(instruction); |
89a955e8 AM |
13814 | |
13815 | std::string rt = GPR(copy(rt_value)); | |
13816 | std::string u = IMMEDIATE(copy(u_value)); | |
13817 | ||
13818 | return img::format("SH %s, %s($%d)", rt, u, 28); | |
13819 | } | |
13820 | ||
13821 | ||
13822 | /* | |
13823 | * | |
13824 | * | |
13825 | * 3 2 1 | |
13826 | * 10987654321098765432109876543210 | |
13827 | * 001000 01001001101 | |
13828 | * rt ----- | |
13829 | * rs ----- | |
13830 | * rd ----- | |
13831 | */ | |
13832 | std::string NMD::SH_S9_(uint64 instruction) | |
13833 | { | |
13834 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 13835 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 13836 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
89a955e8 AM |
13837 | |
13838 | std::string rt = GPR(copy(rt_value)); | |
13839 | std::string s = IMMEDIATE(copy(s_value)); | |
13840 | std::string rs = GPR(copy(rs_value)); | |
13841 | ||
13842 | return img::format("SH %s, %s(%s)", rt, s, rs); | |
13843 | } | |
13844 | ||
13845 | ||
13846 | /* | |
13847 | * | |
13848 | * | |
13849 | * 3 2 1 | |
13850 | * 10987654321098765432109876543210 | |
13851 | * 001000 01001001101 | |
13852 | * rt ----- | |
13853 | * rs ----- | |
13854 | * rd ----- | |
13855 | */ | |
13856 | std::string NMD::SH_U12_(uint64 instruction) | |
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 u_value = extract_u_11_10_9_8_7_6_5_4_3_2_1_0(instruction); |
89a955e8 AM |
13861 | |
13862 | std::string rt = GPR(copy(rt_value)); | |
13863 | std::string u = IMMEDIATE(copy(u_value)); | |
13864 | std::string rs = GPR(copy(rs_value)); | |
13865 | ||
13866 | return img::format("SH %s, %s(%s)", rt, u, rs); | |
13867 | } | |
13868 | ||
13869 | ||
13870 | /* | |
13871 | * | |
13872 | * | |
13873 | * 3 2 1 | |
13874 | * 10987654321098765432109876543210 | |
13875 | * 001000 01001001101 | |
13876 | * rt ----- | |
13877 | * rs ----- | |
13878 | * rd ----- | |
13879 | */ | |
13880 | std::string NMD::SHE(uint64 instruction) | |
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); |
75199b40 | 13884 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
89a955e8 AM |
13885 | |
13886 | std::string rt = GPR(copy(rt_value)); | |
13887 | std::string s = IMMEDIATE(copy(s_value)); | |
13888 | std::string rs = GPR(copy(rs_value)); | |
13889 | ||
13890 | return img::format("SHE %s, %s(%s)", rt, s, rs); | |
13891 | } | |
13892 | ||
13893 | ||
13894 | /* | |
13895 | * SHILO ac, shift - Shift an Accumulator Value Leaving the Result in the Same | |
13896 | * Accumulator | |
13897 | * | |
13898 | * 3 2 1 | |
13899 | * 10987654321098765432109876543210 | |
13900 | * 001000xxxx xxxx0000011101 | |
13901 | * shift ------ | |
13902 | * ac -- | |
13903 | */ | |
13904 | std::string NMD::SHILO(uint64 instruction) | |
13905 | { | |
d3605cc0 | 13906 | int64 shift_value = extract_shift__se5_21_20_19_18_17_16(instruction); |
89a955e8 AM |
13907 | uint64 ac_value = extract_ac_13_12(instruction); |
13908 | ||
13909 | std::string shift = IMMEDIATE(copy(shift_value)); | |
13910 | std::string ac = AC(copy(ac_value)); | |
13911 | ||
13912 | return img::format("SHILO %s, %s", ac, shift); | |
13913 | } | |
13914 | ||
13915 | ||
13916 | /* | |
13917 | * SHILOV ac, rs - Variable Shift of Accumulator Value Leaving the Result in | |
13918 | * the Same Accumulator | |
13919 | * | |
13920 | * 3 2 1 | |
13921 | * 10987654321098765432109876543210 | |
13922 | * 001000xxxxx 01001001111111 | |
13923 | * rs ----- | |
13924 | * ac -- | |
13925 | */ | |
13926 | std::string NMD::SHILOV(uint64 instruction) | |
13927 | { | |
13928 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
13929 | uint64 ac_value = extract_ac_13_12(instruction); | |
13930 | ||
13931 | std::string rs = GPR(copy(rs_value)); | |
13932 | std::string ac = AC(copy(ac_value)); | |
13933 | ||
13934 | return img::format("SHILOV %s, %s", ac, rs); | |
13935 | } | |
13936 | ||
13937 | ||
13938 | /* | |
13939 | * SHLL.PH rt, rs, sa - Shift Left Logical Vector Pair Halfwords | |
13940 | * | |
13941 | * 3 2 1 | |
13942 | * 10987654321098765432109876543210 | |
13943 | * 001000 001110110101 | |
13944 | * rt ----- | |
13945 | * rs ----- | |
13946 | * sa ---- | |
13947 | */ | |
13948 | std::string NMD::SHLL_PH(uint64 instruction) | |
13949 | { | |
13950 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
13951 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
13952 | uint64 sa_value = extract_sa_15_14_13_12(instruction); | |
13953 | ||
13954 | std::string rt = GPR(copy(rt_value)); | |
13955 | std::string rs = GPR(copy(rs_value)); | |
13956 | std::string sa = IMMEDIATE(copy(sa_value)); | |
13957 | ||
13958 | return img::format("SHLL.PH %s, %s, %s", rt, rs, sa); | |
13959 | } | |
13960 | ||
13961 | ||
13962 | /* | |
13963 | * SHLL.QB rt, rs, sa - Shift Left Logical Vector Quad Bytes | |
13964 | * | |
13965 | * 3 2 1 | |
13966 | * 10987654321098765432109876543210 | |
13967 | * 001000 0100001111111 | |
13968 | * rt ----- | |
13969 | * rs ----- | |
13970 | * sa --- | |
13971 | */ | |
13972 | std::string NMD::SHLL_QB(uint64 instruction) | |
13973 | { | |
13974 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
13975 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
13976 | uint64 sa_value = extract_sa_15_14_13(instruction); | |
13977 | ||
13978 | std::string rt = GPR(copy(rt_value)); | |
13979 | std::string rs = GPR(copy(rs_value)); | |
13980 | std::string sa = IMMEDIATE(copy(sa_value)); | |
13981 | ||
13982 | return img::format("SHLL.QB %s, %s, %s", rt, rs, sa); | |
13983 | } | |
13984 | ||
13985 | ||
13986 | /* | |
13987 | * SHLL_S.PH rt, rs, sa - Shift Left Logical Vector Pair Halfwords (saturated) | |
13988 | * | |
13989 | * 3 2 1 | |
13990 | * 10987654321098765432109876543210 | |
13991 | * 001000 001110110101 | |
13992 | * rt ----- | |
13993 | * rs ----- | |
13994 | * sa ---- | |
13995 | */ | |
13996 | std::string NMD::SHLL_S_PH(uint64 instruction) | |
13997 | { | |
13998 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
13999 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
14000 | uint64 sa_value = extract_sa_15_14_13_12(instruction); | |
14001 | ||
14002 | std::string rt = GPR(copy(rt_value)); | |
14003 | std::string rs = GPR(copy(rs_value)); | |
14004 | std::string sa = IMMEDIATE(copy(sa_value)); | |
14005 | ||
14006 | return img::format("SHLL_S.PH %s, %s, %s", rt, rs, sa); | |
14007 | } | |
14008 | ||
14009 | ||
14010 | /* | |
14011 | * | |
14012 | * | |
14013 | * 3 2 1 | |
14014 | * 10987654321098765432109876543210 | |
14015 | * 001000 01001001101 | |
14016 | * rt ----- | |
14017 | * rs ----- | |
14018 | * rd ----- | |
14019 | */ | |
14020 | std::string NMD::SHLL_S_W(uint64 instruction) | |
14021 | { | |
14022 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 14023 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 14024 | uint64 sa_value = extract_sa_15_14_13_12_11(instruction); |
89a955e8 AM |
14025 | |
14026 | std::string rt = GPR(copy(rt_value)); | |
14027 | std::string rs = GPR(copy(rs_value)); | |
14028 | std::string sa = IMMEDIATE(copy(sa_value)); | |
14029 | ||
14030 | return img::format("SHLL_S.W %s, %s, %s", rt, rs, sa); | |
14031 | } | |
14032 | ||
14033 | ||
14034 | /* | |
14035 | * | |
14036 | * | |
14037 | * 3 2 1 | |
14038 | * 10987654321098765432109876543210 | |
14039 | * 001000 01001001101 | |
14040 | * rt ----- | |
14041 | * rs ----- | |
14042 | * rd ----- | |
14043 | */ | |
14044 | std::string NMD::SHLLV_PH(uint64 instruction) | |
14045 | { | |
14046 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 14047 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 14048 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
14049 | |
14050 | std::string rd = GPR(copy(rd_value)); | |
14051 | std::string rt = GPR(copy(rt_value)); | |
14052 | std::string rs = GPR(copy(rs_value)); | |
14053 | ||
14054 | return img::format("SHLLV.PH %s, %s, %s", rd, rt, rs); | |
14055 | } | |
14056 | ||
14057 | ||
14058 | /* | |
14059 | * | |
14060 | * | |
14061 | * 3 2 1 | |
14062 | * 10987654321098765432109876543210 | |
14063 | * 001000 01001001101 | |
14064 | * rt ----- | |
14065 | * rs ----- | |
14066 | * rd ----- | |
14067 | */ | |
14068 | std::string NMD::SHLLV_QB(uint64 instruction) | |
14069 | { | |
14070 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 14071 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 14072 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
14073 | |
14074 | std::string rd = GPR(copy(rd_value)); | |
14075 | std::string rt = GPR(copy(rt_value)); | |
14076 | std::string rs = GPR(copy(rs_value)); | |
14077 | ||
14078 | return img::format("SHLLV.QB %s, %s, %s", rd, rt, rs); | |
14079 | } | |
14080 | ||
14081 | ||
14082 | /* | |
14083 | * | |
14084 | * | |
14085 | * 3 2 1 | |
14086 | * 10987654321098765432109876543210 | |
14087 | * 001000 01001001101 | |
14088 | * rt ----- | |
14089 | * rs ----- | |
14090 | * rd ----- | |
14091 | */ | |
14092 | std::string NMD::SHLLV_S_PH(uint64 instruction) | |
14093 | { | |
14094 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 14095 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 14096 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
14097 | |
14098 | std::string rd = GPR(copy(rd_value)); | |
14099 | std::string rt = GPR(copy(rt_value)); | |
14100 | std::string rs = GPR(copy(rs_value)); | |
14101 | ||
14102 | return img::format("SHLLV_S.PH %s, %s, %s", rd, rt, rs); | |
14103 | } | |
14104 | ||
14105 | ||
14106 | /* | |
14107 | * | |
14108 | * | |
14109 | * 3 2 1 | |
14110 | * 10987654321098765432109876543210 | |
14111 | * 001000 01001001101 | |
14112 | * rt ----- | |
14113 | * rs ----- | |
14114 | * rd ----- | |
14115 | */ | |
14116 | std::string NMD::SHLLV_S_W(uint64 instruction) | |
14117 | { | |
14118 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 14119 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 14120 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
14121 | |
14122 | std::string rd = GPR(copy(rd_value)); | |
14123 | std::string rt = GPR(copy(rt_value)); | |
14124 | std::string rs = GPR(copy(rs_value)); | |
14125 | ||
14126 | return img::format("SHLLV_S.W %s, %s, %s", rd, rt, rs); | |
14127 | } | |
14128 | ||
14129 | ||
14130 | /* | |
14131 | * | |
14132 | * | |
14133 | * 3 2 1 | |
14134 | * 10987654321098765432109876543210 | |
14135 | * 001000 01001001101 | |
14136 | * rt ----- | |
14137 | * rs ----- | |
14138 | * rd ----- | |
14139 | */ | |
14140 | std::string NMD::SHRA_PH(uint64 instruction) | |
14141 | { | |
14142 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 14143 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 14144 | uint64 sa_value = extract_sa_15_14_13_12(instruction); |
89a955e8 AM |
14145 | |
14146 | std::string rt = GPR(copy(rt_value)); | |
14147 | std::string rs = GPR(copy(rs_value)); | |
14148 | std::string sa = IMMEDIATE(copy(sa_value)); | |
14149 | ||
14150 | return img::format("SHRA.PH %s, %s, %s", rt, rs, sa); | |
14151 | } | |
14152 | ||
14153 | ||
14154 | /* | |
14155 | * | |
14156 | * | |
14157 | * 3 2 1 | |
14158 | * 10987654321098765432109876543210 | |
14159 | * 001000 01001001101 | |
14160 | * rt ----- | |
14161 | * rs ----- | |
14162 | * rd ----- | |
14163 | */ | |
14164 | std::string NMD::SHRA_QB(uint64 instruction) | |
14165 | { | |
14166 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 14167 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 14168 | uint64 sa_value = extract_sa_15_14_13(instruction); |
89a955e8 AM |
14169 | |
14170 | std::string rt = GPR(copy(rt_value)); | |
14171 | std::string rs = GPR(copy(rs_value)); | |
14172 | std::string sa = IMMEDIATE(copy(sa_value)); | |
14173 | ||
14174 | return img::format("SHRA.QB %s, %s, %s", rt, rs, sa); | |
14175 | } | |
14176 | ||
14177 | ||
14178 | /* | |
14179 | * | |
14180 | * | |
14181 | * 3 2 1 | |
14182 | * 10987654321098765432109876543210 | |
14183 | * 001000 01001001101 | |
14184 | * rt ----- | |
14185 | * rs ----- | |
14186 | * rd ----- | |
14187 | */ | |
14188 | std::string NMD::SHRA_R_PH(uint64 instruction) | |
14189 | { | |
14190 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 14191 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 14192 | uint64 sa_value = extract_sa_15_14_13_12(instruction); |
89a955e8 AM |
14193 | |
14194 | std::string rt = GPR(copy(rt_value)); | |
14195 | std::string rs = GPR(copy(rs_value)); | |
14196 | std::string sa = IMMEDIATE(copy(sa_value)); | |
14197 | ||
14198 | return img::format("SHRA_R.PH %s, %s, %s", rt, rs, sa); | |
14199 | } | |
14200 | ||
14201 | ||
14202 | /* | |
14203 | * | |
14204 | * | |
14205 | * 3 2 1 | |
14206 | * 10987654321098765432109876543210 | |
14207 | * 001000 01001001101 | |
14208 | * rt ----- | |
14209 | * rs ----- | |
14210 | * rd ----- | |
14211 | */ | |
14212 | std::string NMD::SHRA_R_QB(uint64 instruction) | |
14213 | { | |
14214 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 14215 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 14216 | uint64 sa_value = extract_sa_15_14_13(instruction); |
89a955e8 AM |
14217 | |
14218 | std::string rt = GPR(copy(rt_value)); | |
14219 | std::string rs = GPR(copy(rs_value)); | |
14220 | std::string sa = IMMEDIATE(copy(sa_value)); | |
14221 | ||
14222 | return img::format("SHRA_R.QB %s, %s, %s", rt, rs, sa); | |
14223 | } | |
14224 | ||
14225 | ||
14226 | /* | |
14227 | * | |
14228 | * | |
14229 | * 3 2 1 | |
14230 | * 10987654321098765432109876543210 | |
14231 | * 001000 01001001101 | |
14232 | * rt ----- | |
14233 | * rs ----- | |
14234 | * rd ----- | |
14235 | */ | |
14236 | std::string NMD::SHRA_R_W(uint64 instruction) | |
14237 | { | |
14238 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 14239 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 14240 | uint64 sa_value = extract_sa_15_14_13_12_11(instruction); |
89a955e8 AM |
14241 | |
14242 | std::string rt = GPR(copy(rt_value)); | |
14243 | std::string rs = GPR(copy(rs_value)); | |
14244 | std::string sa = IMMEDIATE(copy(sa_value)); | |
14245 | ||
14246 | return img::format("SHRA_R.W %s, %s, %s", rt, rs, sa); | |
14247 | } | |
14248 | ||
14249 | ||
14250 | /* | |
14251 | * | |
14252 | * | |
14253 | * 3 2 1 | |
14254 | * 10987654321098765432109876543210 | |
14255 | * 001000 01001001101 | |
14256 | * rt ----- | |
14257 | * rs ----- | |
14258 | * rd ----- | |
14259 | */ | |
14260 | std::string NMD::SHRAV_PH(uint64 instruction) | |
14261 | { | |
14262 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 14263 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 14264 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
14265 | |
14266 | std::string rd = GPR(copy(rd_value)); | |
14267 | std::string rt = GPR(copy(rt_value)); | |
14268 | std::string rs = GPR(copy(rs_value)); | |
14269 | ||
14270 | return img::format("SHRAV.PH %s, %s, %s", rd, rt, rs); | |
14271 | } | |
14272 | ||
14273 | ||
14274 | /* | |
14275 | * | |
14276 | * | |
14277 | * 3 2 1 | |
14278 | * 10987654321098765432109876543210 | |
14279 | * 001000 01001001101 | |
14280 | * rt ----- | |
14281 | * rs ----- | |
14282 | * rd ----- | |
14283 | */ | |
14284 | std::string NMD::SHRAV_QB(uint64 instruction) | |
14285 | { | |
14286 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 14287 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 14288 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
14289 | |
14290 | std::string rd = GPR(copy(rd_value)); | |
14291 | std::string rt = GPR(copy(rt_value)); | |
14292 | std::string rs = GPR(copy(rs_value)); | |
14293 | ||
14294 | return img::format("SHRAV.QB %s, %s, %s", rd, rt, rs); | |
14295 | } | |
14296 | ||
14297 | ||
14298 | /* | |
14299 | * | |
14300 | * | |
14301 | * 3 2 1 | |
14302 | * 10987654321098765432109876543210 | |
14303 | * 001000 01001001101 | |
14304 | * rt ----- | |
14305 | * rs ----- | |
14306 | * rd ----- | |
14307 | */ | |
14308 | std::string NMD::SHRAV_R_PH(uint64 instruction) | |
14309 | { | |
14310 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 14311 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 14312 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
14313 | |
14314 | std::string rd = GPR(copy(rd_value)); | |
14315 | std::string rt = GPR(copy(rt_value)); | |
14316 | std::string rs = GPR(copy(rs_value)); | |
14317 | ||
14318 | return img::format("SHRAV_R.PH %s, %s, %s", rd, rt, rs); | |
14319 | } | |
14320 | ||
14321 | ||
14322 | /* | |
14323 | * | |
14324 | * | |
14325 | * 3 2 1 | |
14326 | * 10987654321098765432109876543210 | |
14327 | * 001000 01001001101 | |
14328 | * rt ----- | |
14329 | * rs ----- | |
14330 | * rd ----- | |
14331 | */ | |
14332 | std::string NMD::SHRAV_R_QB(uint64 instruction) | |
14333 | { | |
14334 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 14335 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 14336 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
14337 | |
14338 | std::string rd = GPR(copy(rd_value)); | |
14339 | std::string rt = GPR(copy(rt_value)); | |
14340 | std::string rs = GPR(copy(rs_value)); | |
14341 | ||
14342 | return img::format("SHRAV_R.QB %s, %s, %s", rd, rt, rs); | |
14343 | } | |
14344 | ||
14345 | ||
14346 | /* | |
14347 | * | |
14348 | * | |
14349 | * 3 2 1 | |
14350 | * 10987654321098765432109876543210 | |
14351 | * 001000 01001001101 | |
14352 | * rt ----- | |
14353 | * rs ----- | |
14354 | * rd ----- | |
14355 | */ | |
14356 | std::string NMD::SHRAV_R_W(uint64 instruction) | |
14357 | { | |
14358 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 14359 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 14360 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
14361 | |
14362 | std::string rd = GPR(copy(rd_value)); | |
14363 | std::string rt = GPR(copy(rt_value)); | |
14364 | std::string rs = GPR(copy(rs_value)); | |
14365 | ||
14366 | return img::format("SHRAV_R.W %s, %s, %s", rd, rt, rs); | |
14367 | } | |
14368 | ||
14369 | ||
14370 | /* | |
14371 | * | |
14372 | * | |
14373 | * 3 2 1 | |
14374 | * 10987654321098765432109876543210 | |
14375 | * 001000 01001001101 | |
14376 | * rt ----- | |
14377 | * rs ----- | |
14378 | * rd ----- | |
14379 | */ | |
14380 | std::string NMD::SHRL_PH(uint64 instruction) | |
14381 | { | |
14382 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 14383 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 14384 | uint64 sa_value = extract_sa_15_14_13_12(instruction); |
89a955e8 AM |
14385 | |
14386 | std::string rt = GPR(copy(rt_value)); | |
14387 | std::string rs = GPR(copy(rs_value)); | |
14388 | std::string sa = IMMEDIATE(copy(sa_value)); | |
14389 | ||
14390 | return img::format("SHRL.PH %s, %s, %s", rt, rs, sa); | |
14391 | } | |
14392 | ||
14393 | ||
14394 | /* | |
14395 | * | |
14396 | * | |
14397 | * 3 2 1 | |
14398 | * 10987654321098765432109876543210 | |
14399 | * 001000 01001001101 | |
14400 | * rt ----- | |
14401 | * rs ----- | |
14402 | * rd ----- | |
14403 | */ | |
14404 | std::string NMD::SHRL_QB(uint64 instruction) | |
14405 | { | |
14406 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 14407 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 14408 | uint64 sa_value = extract_sa_15_14_13(instruction); |
89a955e8 AM |
14409 | |
14410 | std::string rt = GPR(copy(rt_value)); | |
14411 | std::string rs = GPR(copy(rs_value)); | |
14412 | std::string sa = IMMEDIATE(copy(sa_value)); | |
14413 | ||
14414 | return img::format("SHRL.QB %s, %s, %s", rt, rs, sa); | |
14415 | } | |
14416 | ||
14417 | ||
14418 | /* | |
14419 | * | |
14420 | * | |
14421 | * 3 2 1 | |
14422 | * 10987654321098765432109876543210 | |
14423 | * 001000 01001001101 | |
14424 | * rt ----- | |
14425 | * rs ----- | |
14426 | * rd ----- | |
14427 | */ | |
14428 | std::string NMD::SHRLV_PH(uint64 instruction) | |
14429 | { | |
14430 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 14431 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 14432 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
14433 | |
14434 | std::string rd = GPR(copy(rd_value)); | |
14435 | std::string rt = GPR(copy(rt_value)); | |
14436 | std::string rs = GPR(copy(rs_value)); | |
14437 | ||
14438 | return img::format("SHRLV.PH %s, %s, %s", rd, rt, rs); | |
14439 | } | |
14440 | ||
14441 | ||
14442 | /* | |
14443 | * | |
14444 | * | |
14445 | * 3 2 1 | |
14446 | * 10987654321098765432109876543210 | |
14447 | * 001000 01001001101 | |
14448 | * rt ----- | |
14449 | * rs ----- | |
14450 | * rd ----- | |
14451 | */ | |
14452 | std::string NMD::SHRLV_QB(uint64 instruction) | |
14453 | { | |
14454 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 14455 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 14456 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
14457 | |
14458 | std::string rd = GPR(copy(rd_value)); | |
14459 | std::string rt = GPR(copy(rt_value)); | |
14460 | std::string rs = GPR(copy(rs_value)); | |
14461 | ||
14462 | return img::format("SHRLV.QB %s, %s, %s", rd, rt, rs); | |
14463 | } | |
14464 | ||
14465 | ||
14466 | /* | |
14467 | * | |
14468 | * | |
14469 | * 3 2 1 | |
14470 | * 10987654321098765432109876543210 | |
14471 | * 001000 01001001101 | |
14472 | * rt ----- | |
14473 | * rs ----- | |
14474 | * rd ----- | |
14475 | */ | |
14476 | std::string NMD::SHX(uint64 instruction) | |
14477 | { | |
14478 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 14479 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 14480 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
14481 | |
14482 | std::string rd = GPR(copy(rd_value)); | |
14483 | std::string rs = GPR(copy(rs_value)); | |
14484 | std::string rt = GPR(copy(rt_value)); | |
14485 | ||
14486 | return img::format("SHX %s, %s(%s)", rd, rs, rt); | |
14487 | } | |
14488 | ||
14489 | ||
14490 | /* | |
14491 | * | |
14492 | * | |
14493 | * 3 2 1 | |
14494 | * 10987654321098765432109876543210 | |
14495 | * 001000 01001001101 | |
14496 | * rt ----- | |
14497 | * rs ----- | |
14498 | * rd ----- | |
14499 | */ | |
14500 | std::string NMD::SHXS(uint64 instruction) | |
14501 | { | |
14502 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 14503 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 14504 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
14505 | |
14506 | std::string rd = GPR(copy(rd_value)); | |
14507 | std::string rs = GPR(copy(rs_value)); | |
14508 | std::string rt = GPR(copy(rt_value)); | |
14509 | ||
14510 | return img::format("SHXS %s, %s(%s)", rd, rs, rt); | |
14511 | } | |
14512 | ||
14513 | ||
14514 | /* | |
14515 | * | |
14516 | * | |
14517 | * 3 2 1 | |
14518 | * 10987654321098765432109876543210 | |
14519 | * 001000 01001001101 | |
14520 | * rt ----- | |
14521 | * rs ----- | |
14522 | * rd ----- | |
14523 | */ | |
14524 | std::string NMD::SIGRIE(uint64 instruction) | |
14525 | { | |
14526 | uint64 code_value = extract_code_18_to_0(instruction); | |
14527 | ||
14528 | std::string code = IMMEDIATE(copy(code_value)); | |
14529 | ||
14530 | return img::format("SIGRIE %s", code); | |
14531 | } | |
14532 | ||
14533 | ||
14534 | /* | |
14535 | * | |
14536 | * | |
14537 | * 3 2 1 | |
14538 | * 10987654321098765432109876543210 | |
14539 | * 001000 01001001101 | |
14540 | * rt ----- | |
14541 | * rs ----- | |
14542 | * rd ----- | |
14543 | */ | |
14544 | std::string NMD::SLL_16_(uint64 instruction) | |
14545 | { | |
89a955e8 AM |
14546 | uint64 rt3_value = extract_rt3_9_8_7(instruction); |
14547 | uint64 rs3_value = extract_rs3_6_5_4(instruction); | |
75199b40 | 14548 | uint64 shift3_value = extract_shift3_2_1_0(instruction); |
89a955e8 | 14549 | |
988d6c89 AM |
14550 | std::string rt3 = GPR(decode_gpr_gpr3(rt3_value)); |
14551 | std::string rs3 = GPR(decode_gpr_gpr3(rs3_value)); | |
89a955e8 AM |
14552 | std::string shift3 = IMMEDIATE(encode_shift3_from_shift(shift3_value)); |
14553 | ||
14554 | return img::format("SLL %s, %s, %s", rt3, rs3, shift3); | |
14555 | } | |
14556 | ||
14557 | ||
14558 | /* | |
14559 | * | |
14560 | * | |
14561 | * 3 2 1 | |
14562 | * 10987654321098765432109876543210 | |
14563 | * 001000 01001001101 | |
14564 | * rt ----- | |
14565 | * rs ----- | |
14566 | * rd ----- | |
14567 | */ | |
14568 | std::string NMD::SLL_32_(uint64 instruction) | |
14569 | { | |
14570 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 14571 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 14572 | uint64 shift_value = extract_shift_4_3_2_1_0(instruction); |
89a955e8 AM |
14573 | |
14574 | std::string rt = GPR(copy(rt_value)); | |
14575 | std::string rs = GPR(copy(rs_value)); | |
14576 | std::string shift = IMMEDIATE(copy(shift_value)); | |
14577 | ||
14578 | return img::format("SLL %s, %s, %s", rt, rs, shift); | |
14579 | } | |
14580 | ||
14581 | ||
14582 | /* | |
14583 | * | |
14584 | * | |
14585 | * 3 2 1 | |
14586 | * 10987654321098765432109876543210 | |
14587 | * 001000 01001001101 | |
14588 | * rt ----- | |
14589 | * rs ----- | |
14590 | * rd ----- | |
14591 | */ | |
14592 | std::string NMD::SLLV(uint64 instruction) | |
14593 | { | |
14594 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 14595 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 14596 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
14597 | |
14598 | std::string rd = GPR(copy(rd_value)); | |
14599 | std::string rs = GPR(copy(rs_value)); | |
14600 | std::string rt = GPR(copy(rt_value)); | |
14601 | ||
14602 | return img::format("SLLV %s, %s, %s", rd, rs, rt); | |
14603 | } | |
14604 | ||
14605 | ||
14606 | /* | |
14607 | * | |
14608 | * | |
14609 | * 3 2 1 | |
14610 | * 10987654321098765432109876543210 | |
14611 | * 001000 01001001101 | |
14612 | * rt ----- | |
14613 | * rs ----- | |
14614 | * rd ----- | |
14615 | */ | |
14616 | std::string NMD::SLT(uint64 instruction) | |
14617 | { | |
14618 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 14619 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 14620 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
14621 | |
14622 | std::string rd = GPR(copy(rd_value)); | |
14623 | std::string rs = GPR(copy(rs_value)); | |
14624 | std::string rt = GPR(copy(rt_value)); | |
14625 | ||
14626 | return img::format("SLT %s, %s, %s", rd, rs, rt); | |
14627 | } | |
14628 | ||
14629 | ||
14630 | /* | |
14631 | * | |
14632 | * | |
14633 | * 3 2 1 | |
14634 | * 10987654321098765432109876543210 | |
14635 | * 001000 01001001101 | |
14636 | * rt ----- | |
14637 | * rs ----- | |
14638 | * rd ----- | |
14639 | */ | |
14640 | std::string NMD::SLTI(uint64 instruction) | |
14641 | { | |
14642 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 14643 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 14644 | uint64 u_value = extract_u_11_10_9_8_7_6_5_4_3_2_1_0(instruction); |
89a955e8 AM |
14645 | |
14646 | std::string rt = GPR(copy(rt_value)); | |
14647 | std::string rs = GPR(copy(rs_value)); | |
14648 | std::string u = IMMEDIATE(copy(u_value)); | |
14649 | ||
14650 | return img::format("SLTI %s, %s, %s", rt, rs, u); | |
14651 | } | |
14652 | ||
14653 | ||
14654 | /* | |
14655 | * | |
14656 | * | |
14657 | * 3 2 1 | |
14658 | * 10987654321098765432109876543210 | |
14659 | * 001000 01001001101 | |
14660 | * rt ----- | |
14661 | * rs ----- | |
14662 | * rd ----- | |
14663 | */ | |
14664 | std::string NMD::SLTIU(uint64 instruction) | |
14665 | { | |
14666 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 14667 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 14668 | uint64 u_value = extract_u_11_10_9_8_7_6_5_4_3_2_1_0(instruction); |
89a955e8 AM |
14669 | |
14670 | std::string rt = GPR(copy(rt_value)); | |
14671 | std::string rs = GPR(copy(rs_value)); | |
14672 | std::string u = IMMEDIATE(copy(u_value)); | |
14673 | ||
14674 | return img::format("SLTIU %s, %s, %s", rt, rs, u); | |
14675 | } | |
14676 | ||
14677 | ||
14678 | /* | |
14679 | * | |
14680 | * | |
14681 | * 3 2 1 | |
14682 | * 10987654321098765432109876543210 | |
14683 | * 001000 01001001101 | |
14684 | * rt ----- | |
14685 | * rs ----- | |
14686 | * rd ----- | |
14687 | */ | |
14688 | std::string NMD::SLTU(uint64 instruction) | |
14689 | { | |
14690 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 14691 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 14692 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
14693 | |
14694 | std::string rd = GPR(copy(rd_value)); | |
14695 | std::string rs = GPR(copy(rs_value)); | |
14696 | std::string rt = GPR(copy(rt_value)); | |
14697 | ||
14698 | return img::format("SLTU %s, %s, %s", rd, rs, rt); | |
14699 | } | |
14700 | ||
14701 | ||
14702 | /* | |
14703 | * | |
14704 | * | |
14705 | * 3 2 1 | |
14706 | * 10987654321098765432109876543210 | |
14707 | * 001000 01001001101 | |
14708 | * rt ----- | |
14709 | * rs ----- | |
14710 | * rd ----- | |
14711 | */ | |
14712 | std::string NMD::SOV(uint64 instruction) | |
14713 | { | |
14714 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 14715 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 14716 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
14717 | |
14718 | std::string rd = GPR(copy(rd_value)); | |
14719 | std::string rs = GPR(copy(rs_value)); | |
14720 | std::string rt = GPR(copy(rt_value)); | |
14721 | ||
14722 | return img::format("SOV %s, %s, %s", rd, rs, rt); | |
14723 | } | |
14724 | ||
14725 | ||
14726 | /* | |
14727 | * | |
14728 | * | |
14729 | * 3 2 1 | |
14730 | * 10987654321098765432109876543210 | |
14731 | * 001000 01001001101 | |
14732 | * rt ----- | |
14733 | * rs ----- | |
14734 | * rd ----- | |
14735 | */ | |
14736 | std::string NMD::SPECIAL2(uint64 instruction) | |
14737 | { | |
14738 | uint64 op_value = extract_op_25_to_3(instruction); | |
14739 | ||
14740 | std::string op = IMMEDIATE(copy(op_value)); | |
14741 | ||
14742 | return img::format("SPECIAL2 %s", op); | |
14743 | } | |
14744 | ||
14745 | ||
14746 | /* | |
14747 | * | |
14748 | * | |
14749 | * 3 2 1 | |
14750 | * 10987654321098765432109876543210 | |
14751 | * 001000 01001001101 | |
14752 | * rt ----- | |
14753 | * rs ----- | |
14754 | * rd ----- | |
14755 | */ | |
14756 | std::string NMD::SQRT_D(uint64 instruction) | |
14757 | { | |
17ce2f00 | 14758 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 14759 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 AM |
14760 | |
14761 | std::string ft = FPR(copy(ft_value)); | |
14762 | std::string fs = FPR(copy(fs_value)); | |
14763 | ||
14764 | return img::format("SQRT.D %s, %s", ft, fs); | |
14765 | } | |
14766 | ||
14767 | ||
14768 | /* | |
14769 | * | |
14770 | * | |
14771 | * 3 2 1 | |
14772 | * 10987654321098765432109876543210 | |
14773 | * 001000 01001001101 | |
14774 | * rt ----- | |
14775 | * rs ----- | |
14776 | * rd ----- | |
14777 | */ | |
14778 | std::string NMD::SQRT_S(uint64 instruction) | |
14779 | { | |
17ce2f00 | 14780 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 14781 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 AM |
14782 | |
14783 | std::string ft = FPR(copy(ft_value)); | |
14784 | std::string fs = FPR(copy(fs_value)); | |
14785 | ||
14786 | return img::format("SQRT.S %s, %s", ft, fs); | |
14787 | } | |
14788 | ||
14789 | ||
14790 | /* | |
14791 | * SRA rd, rt, sa - Shift Word Right Arithmetic | |
14792 | * | |
14793 | * 3 2 1 | |
14794 | * 10987654321098765432109876543210 | |
14795 | * 00000000000 000011 | |
14796 | * rt ----- | |
14797 | * rd ----- | |
14798 | * sa ----- | |
14799 | */ | |
14800 | std::string NMD::SRA(uint64 instruction) | |
14801 | { | |
14802 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
14803 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
14804 | uint64 shift_value = extract_shift_4_3_2_1_0(instruction); | |
14805 | ||
14806 | std::string rt = GPR(copy(rt_value)); | |
14807 | std::string rs = GPR(copy(rs_value)); | |
14808 | std::string shift = IMMEDIATE(copy(shift_value)); | |
14809 | ||
14810 | return img::format("SRA %s, %s, %s", rt, rs, shift); | |
14811 | } | |
14812 | ||
14813 | ||
14814 | /* | |
14815 | * SRAV rd, rt, rs - Shift Word Right Arithmetic Variable | |
14816 | * | |
14817 | * 3 2 1 | |
14818 | * 10987654321098765432109876543210 | |
14819 | * 001000 00000000111 | |
14820 | * rs ----- | |
14821 | * rt ----- | |
14822 | * rd ----- | |
14823 | */ | |
14824 | std::string NMD::SRAV(uint64 instruction) | |
14825 | { | |
14826 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 14827 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 14828 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
14829 | |
14830 | std::string rd = GPR(copy(rd_value)); | |
14831 | std::string rs = GPR(copy(rs_value)); | |
14832 | std::string rt = GPR(copy(rt_value)); | |
14833 | ||
14834 | return img::format("SRAV %s, %s, %s", rd, rs, rt); | |
14835 | } | |
14836 | ||
14837 | ||
14838 | /* | |
14839 | * | |
14840 | * | |
14841 | * 3 2 1 | |
14842 | * 10987654321098765432109876543210 | |
14843 | * 001000 00000000111 | |
14844 | * rs ----- | |
14845 | * rt ----- | |
14846 | * rd ----- | |
14847 | */ | |
14848 | std::string NMD::SRL_16_(uint64 instruction) | |
14849 | { | |
89a955e8 AM |
14850 | uint64 rt3_value = extract_rt3_9_8_7(instruction); |
14851 | uint64 rs3_value = extract_rs3_6_5_4(instruction); | |
75199b40 | 14852 | uint64 shift3_value = extract_shift3_2_1_0(instruction); |
89a955e8 | 14853 | |
988d6c89 AM |
14854 | std::string rt3 = GPR(decode_gpr_gpr3(rt3_value)); |
14855 | std::string rs3 = GPR(decode_gpr_gpr3(rs3_value)); | |
89a955e8 AM |
14856 | std::string shift3 = IMMEDIATE(encode_shift3_from_shift(shift3_value)); |
14857 | ||
14858 | return img::format("SRL %s, %s, %s", rt3, rs3, shift3); | |
14859 | } | |
14860 | ||
14861 | ||
14862 | /* | |
14863 | * | |
14864 | * | |
14865 | * 3 2 1 | |
14866 | * 10987654321098765432109876543210 | |
14867 | * 001000 01001001101 | |
14868 | * rt ----- | |
14869 | * rs ----- | |
14870 | * rd ----- | |
14871 | */ | |
14872 | std::string NMD::SRL_32_(uint64 instruction) | |
14873 | { | |
14874 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 14875 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 14876 | uint64 shift_value = extract_shift_4_3_2_1_0(instruction); |
89a955e8 AM |
14877 | |
14878 | std::string rt = GPR(copy(rt_value)); | |
14879 | std::string rs = GPR(copy(rs_value)); | |
14880 | std::string shift = IMMEDIATE(copy(shift_value)); | |
14881 | ||
14882 | return img::format("SRL %s, %s, %s", rt, rs, shift); | |
14883 | } | |
14884 | ||
14885 | ||
14886 | /* | |
14887 | * | |
14888 | * | |
14889 | * 3 2 1 | |
14890 | * 10987654321098765432109876543210 | |
14891 | * 001000 01001001101 | |
14892 | * rt ----- | |
14893 | * rs ----- | |
14894 | * rd ----- | |
14895 | */ | |
14896 | std::string NMD::SRLV(uint64 instruction) | |
14897 | { | |
14898 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 14899 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 14900 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
14901 | |
14902 | std::string rd = GPR(copy(rd_value)); | |
14903 | std::string rs = GPR(copy(rs_value)); | |
14904 | std::string rt = GPR(copy(rt_value)); | |
14905 | ||
14906 | return img::format("SRLV %s, %s, %s", rd, rs, rt); | |
14907 | } | |
14908 | ||
14909 | ||
14910 | /* | |
14911 | * | |
14912 | * | |
14913 | * 3 2 1 | |
14914 | * 10987654321098765432109876543210 | |
14915 | * 001000 01001001101 | |
14916 | * rt ----- | |
14917 | * rs ----- | |
14918 | * rd ----- | |
14919 | */ | |
14920 | std::string NMD::SUB(uint64 instruction) | |
14921 | { | |
14922 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 14923 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 14924 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
14925 | |
14926 | std::string rd = GPR(copy(rd_value)); | |
14927 | std::string rs = GPR(copy(rs_value)); | |
14928 | std::string rt = GPR(copy(rt_value)); | |
14929 | ||
14930 | return img::format("SUB %s, %s, %s", rd, rs, rt); | |
14931 | } | |
14932 | ||
14933 | ||
14934 | /* | |
14935 | * | |
14936 | * | |
14937 | * 3 2 1 | |
14938 | * 10987654321098765432109876543210 | |
14939 | * 001000 01001001101 | |
14940 | * rt ----- | |
14941 | * rs ----- | |
14942 | * rd ----- | |
14943 | */ | |
14944 | std::string NMD::SUB_D(uint64 instruction) | |
14945 | { | |
17ce2f00 | 14946 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 14947 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 14948 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 AM |
14949 | |
14950 | std::string fd = FPR(copy(fd_value)); | |
14951 | std::string fs = FPR(copy(fs_value)); | |
14952 | std::string ft = FPR(copy(ft_value)); | |
14953 | ||
14954 | return img::format("SUB.D %s, %s, %s", fd, fs, ft); | |
14955 | } | |
14956 | ||
14957 | ||
14958 | /* | |
14959 | * | |
14960 | * | |
14961 | * 3 2 1 | |
14962 | * 10987654321098765432109876543210 | |
14963 | * 001000 01001001101 | |
14964 | * rt ----- | |
14965 | * rs ----- | |
14966 | * rd ----- | |
14967 | */ | |
14968 | std::string NMD::SUB_S(uint64 instruction) | |
14969 | { | |
17ce2f00 | 14970 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 14971 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
d0c60abd | 14972 | uint64 fd_value = extract_fd_15_14_13_12_11(instruction); |
89a955e8 AM |
14973 | |
14974 | std::string fd = FPR(copy(fd_value)); | |
14975 | std::string fs = FPR(copy(fs_value)); | |
14976 | std::string ft = FPR(copy(ft_value)); | |
14977 | ||
14978 | return img::format("SUB.S %s, %s, %s", fd, fs, ft); | |
14979 | } | |
14980 | ||
14981 | ||
14982 | /* | |
14983 | * | |
14984 | * | |
14985 | * 3 2 1 | |
14986 | * 10987654321098765432109876543210 | |
14987 | * 001000 01001001101 | |
14988 | * rt ----- | |
14989 | * rs ----- | |
14990 | * rd ----- | |
14991 | */ | |
14992 | std::string NMD::SUBQ_PH(uint64 instruction) | |
14993 | { | |
14994 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 14995 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 14996 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
14997 | |
14998 | std::string rd = GPR(copy(rd_value)); | |
14999 | std::string rs = GPR(copy(rs_value)); | |
15000 | std::string rt = GPR(copy(rt_value)); | |
15001 | ||
15002 | return img::format("SUBQ.PH %s, %s, %s", rd, rs, rt); | |
15003 | } | |
15004 | ||
15005 | ||
15006 | /* | |
15007 | * SUBQH.PH rd, rt, rs - Subtract Fractional Halfword Vectors And Shift Right | |
15008 | * to Halve Results | |
15009 | * | |
15010 | * 3 2 1 | |
15011 | * 10987654321098765432109876543210 | |
15012 | * 001000 01001001101 | |
15013 | * rt ----- | |
15014 | * rs ----- | |
15015 | * rd ----- | |
15016 | */ | |
15017 | std::string NMD::SUBQ_S_PH(uint64 instruction) | |
15018 | { | |
15019 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 15020 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 15021 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
15022 | |
15023 | std::string rd = GPR(copy(rd_value)); | |
15024 | std::string rs = GPR(copy(rs_value)); | |
15025 | std::string rt = GPR(copy(rt_value)); | |
15026 | ||
15027 | return img::format("SUBQ_S.PH %s, %s, %s", rd, rs, rt); | |
15028 | } | |
15029 | ||
15030 | ||
15031 | /* | |
15032 | * SUBQH.PH rd, rt, rs - Subtract Fractional Halfword Vectors And Shift Right | |
15033 | * to Halve Results | |
15034 | * | |
15035 | * 3 2 1 | |
15036 | * 10987654321098765432109876543210 | |
15037 | * 001000 01001001101 | |
15038 | * rt ----- | |
15039 | * rs ----- | |
15040 | * rd ----- | |
15041 | */ | |
15042 | std::string NMD::SUBQ_S_W(uint64 instruction) | |
15043 | { | |
15044 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 15045 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 15046 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
15047 | |
15048 | std::string rd = GPR(copy(rd_value)); | |
15049 | std::string rs = GPR(copy(rs_value)); | |
15050 | std::string rt = GPR(copy(rt_value)); | |
15051 | ||
15052 | return img::format("SUBQ_S.W %s, %s, %s", rd, rs, rt); | |
15053 | } | |
15054 | ||
15055 | ||
15056 | /* | |
15057 | * SUBQH.PH rd, rt, rs - Subtract Fractional Halfword Vectors And Shift Right | |
15058 | * to Halve Results | |
15059 | * | |
15060 | * 3 2 1 | |
15061 | * 10987654321098765432109876543210 | |
15062 | * 001000 01001001101 | |
15063 | * rt ----- | |
15064 | * rs ----- | |
15065 | * rd ----- | |
15066 | */ | |
15067 | std::string NMD::SUBQH_PH(uint64 instruction) | |
15068 | { | |
15069 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 15070 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 15071 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
15072 | |
15073 | std::string rd = GPR(copy(rd_value)); | |
15074 | std::string rs = GPR(copy(rs_value)); | |
15075 | std::string rt = GPR(copy(rt_value)); | |
15076 | ||
15077 | return img::format("SUBQH.PH %s, %s, %s", rd, rs, rt); | |
15078 | } | |
15079 | ||
15080 | ||
15081 | /* | |
15082 | * SUBQH.PH rd, rt, rs - Subtract Fractional Halfword Vectors And Shift Right | |
15083 | * to Halve Results | |
15084 | * | |
15085 | * 3 2 1 | |
15086 | * 10987654321098765432109876543210 | |
15087 | * 001000 01001001101 | |
15088 | * rt ----- | |
15089 | * rs ----- | |
15090 | * rd ----- | |
15091 | */ | |
15092 | std::string NMD::SUBQH_R_PH(uint64 instruction) | |
15093 | { | |
15094 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 15095 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 15096 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
15097 | |
15098 | std::string rd = GPR(copy(rd_value)); | |
15099 | std::string rs = GPR(copy(rs_value)); | |
15100 | std::string rt = GPR(copy(rt_value)); | |
15101 | ||
15102 | return img::format("SUBQH_R.PH %s, %s, %s", rd, rs, rt); | |
15103 | } | |
15104 | ||
15105 | ||
15106 | /* | |
15107 | * SUBQH_R.PH rd, rt, rs - Subtract Fractional Halfword Vectors And Shift Right | |
15108 | * to Halve Results (rounding) | |
15109 | * | |
15110 | * 3 2 1 | |
15111 | * 10987654321098765432109876543210 | |
15112 | * 001000 11001001101 | |
15113 | * rt ----- | |
15114 | * rs ----- | |
15115 | * rd ----- | |
15116 | */ | |
15117 | std::string NMD::SUBQH_R_W(uint64 instruction) | |
15118 | { | |
15119 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 15120 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 15121 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
15122 | |
15123 | std::string rd = GPR(copy(rd_value)); | |
15124 | std::string rs = GPR(copy(rs_value)); | |
15125 | std::string rt = GPR(copy(rt_value)); | |
15126 | ||
15127 | return img::format("SUBQH_R.W %s, %s, %s", rd, rs, rt); | |
15128 | } | |
15129 | ||
15130 | ||
15131 | /* | |
15132 | * SUBQH.W rd, rs, rt - Subtract Fractional Words And Shift Right to Halve | |
15133 | * Results | |
15134 | * | |
15135 | * 3 2 1 | |
15136 | * 10987654321098765432109876543210 | |
15137 | * 001000 01010001101 | |
15138 | * rt ----- | |
15139 | * rs ----- | |
15140 | * rd ----- | |
15141 | */ | |
15142 | std::string NMD::SUBQH_W(uint64 instruction) | |
15143 | { | |
15144 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 15145 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 15146 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
15147 | |
15148 | std::string rd = GPR(copy(rd_value)); | |
15149 | std::string rs = GPR(copy(rs_value)); | |
15150 | std::string rt = GPR(copy(rt_value)); | |
15151 | ||
15152 | return img::format("SUBQH.W %s, %s, %s", rd, rs, rt); | |
15153 | } | |
15154 | ||
15155 | ||
15156 | /* | |
15157 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
15158 | * | |
15159 | * 3 2 1 | |
15160 | * 10987654321098765432109876543210 | |
15161 | * 001000 00010001101 | |
15162 | * rt ----- | |
15163 | * rs ----- | |
15164 | * rd ----- | |
15165 | */ | |
15166 | std::string NMD::SUBU_16_(uint64 instruction) | |
15167 | { | |
89a955e8 AM |
15168 | uint64 rt3_value = extract_rt3_9_8_7(instruction); |
15169 | uint64 rs3_value = extract_rs3_6_5_4(instruction); | |
86b5f803 | 15170 | uint64 rd3_value = extract_rd3_3_2_1(instruction); |
89a955e8 | 15171 | |
988d6c89 AM |
15172 | std::string rd3 = GPR(decode_gpr_gpr3(rd3_value)); |
15173 | std::string rs3 = GPR(decode_gpr_gpr3(rs3_value)); | |
15174 | std::string rt3 = GPR(decode_gpr_gpr3(rt3_value)); | |
89a955e8 AM |
15175 | |
15176 | return img::format("SUBU %s, %s, %s", rd3, rs3, rt3); | |
15177 | } | |
15178 | ||
15179 | ||
15180 | /* | |
15181 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
15182 | * | |
15183 | * 3 2 1 | |
15184 | * 10987654321098765432109876543210 | |
15185 | * 001000 00010001101 | |
15186 | * rt ----- | |
15187 | * rs ----- | |
15188 | * rd ----- | |
15189 | */ | |
15190 | std::string NMD::SUBU_32_(uint64 instruction) | |
15191 | { | |
15192 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 15193 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 15194 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
15195 | |
15196 | std::string rd = GPR(copy(rd_value)); | |
15197 | std::string rs = GPR(copy(rs_value)); | |
15198 | std::string rt = GPR(copy(rt_value)); | |
15199 | ||
15200 | return img::format("SUBU %s, %s, %s", rd, rs, rt); | |
15201 | } | |
15202 | ||
15203 | ||
15204 | /* | |
15205 | * SUBU.PH rd, rs, rt - Subtract Unsigned Integer Halfwords | |
15206 | * | |
15207 | * 3 2 1 | |
15208 | * 10987654321098765432109876543210 | |
15209 | * 001000 01100001101 | |
15210 | * rt ----- | |
15211 | * rs ----- | |
15212 | * rd ----- | |
15213 | */ | |
15214 | std::string NMD::SUBU_PH(uint64 instruction) | |
15215 | { | |
15216 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 15217 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 15218 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
15219 | |
15220 | std::string rd = GPR(copy(rd_value)); | |
15221 | std::string rs = GPR(copy(rs_value)); | |
15222 | std::string rt = GPR(copy(rt_value)); | |
15223 | ||
15224 | return img::format("SUBU.PH %s, %s, %s", rd, rs, rt); | |
15225 | } | |
15226 | ||
15227 | ||
15228 | /* | |
15229 | * SUBU.QB rd, rs, rt - Subtract Unsigned Quad Byte Vector | |
15230 | * | |
15231 | * 3 2 1 | |
15232 | * 10987654321098765432109876543210 | |
15233 | * 001000 01011001101 | |
15234 | * rt ----- | |
15235 | * rs ----- | |
15236 | * rd ----- | |
15237 | */ | |
15238 | std::string NMD::SUBU_QB(uint64 instruction) | |
15239 | { | |
15240 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 15241 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 15242 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
15243 | |
15244 | std::string rd = GPR(copy(rd_value)); | |
15245 | std::string rs = GPR(copy(rs_value)); | |
15246 | std::string rt = GPR(copy(rt_value)); | |
15247 | ||
15248 | return img::format("SUBU.QB %s, %s, %s", rd, rs, rt); | |
15249 | } | |
15250 | ||
15251 | ||
15252 | /* | |
15253 | * SUBU_S.PH rd, rs, rt - Subtract Unsigned Integer Halfwords (saturating) | |
15254 | * | |
15255 | * 3 2 1 | |
15256 | * 10987654321098765432109876543210 | |
15257 | * 001000 11100001101 | |
15258 | * rt ----- | |
15259 | * rs ----- | |
15260 | * rd ----- | |
15261 | */ | |
15262 | std::string NMD::SUBU_S_PH(uint64 instruction) | |
15263 | { | |
15264 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 15265 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 15266 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
15267 | |
15268 | std::string rd = GPR(copy(rd_value)); | |
15269 | std::string rs = GPR(copy(rs_value)); | |
15270 | std::string rt = GPR(copy(rt_value)); | |
15271 | ||
15272 | return img::format("SUBU_S.PH %s, %s, %s", rd, rs, rt); | |
15273 | } | |
15274 | ||
15275 | ||
15276 | /* | |
15277 | * SUBU_S.QB rd, rs, rt - Subtract Unsigned Quad Byte Vector (saturating) | |
15278 | * | |
15279 | * 3 2 1 | |
15280 | * 10987654321098765432109876543210 | |
15281 | * 001000 11011001101 | |
15282 | * rt ----- | |
15283 | * rs ----- | |
15284 | * rd ----- | |
15285 | */ | |
15286 | std::string NMD::SUBU_S_QB(uint64 instruction) | |
15287 | { | |
15288 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 15289 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 15290 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
15291 | |
15292 | std::string rd = GPR(copy(rd_value)); | |
15293 | std::string rs = GPR(copy(rs_value)); | |
15294 | std::string rt = GPR(copy(rt_value)); | |
15295 | ||
15296 | return img::format("SUBU_S.QB %s, %s, %s", rd, rs, rt); | |
15297 | } | |
15298 | ||
15299 | ||
15300 | /* | |
15301 | * SUBUH.QB rd, rs, rt - Subtract Unsigned Bytes And Right Shift to Halve | |
15302 | * Results | |
15303 | * | |
15304 | * 3 2 1 | |
15305 | * 10987654321098765432109876543210 | |
15306 | * 001000 01101001101 | |
15307 | * rt ----- | |
15308 | * rs ----- | |
15309 | * rd ----- | |
15310 | */ | |
15311 | std::string NMD::SUBUH_QB(uint64 instruction) | |
15312 | { | |
15313 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 15314 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 15315 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
15316 | |
15317 | std::string rd = GPR(copy(rd_value)); | |
15318 | std::string rs = GPR(copy(rs_value)); | |
15319 | std::string rt = GPR(copy(rt_value)); | |
15320 | ||
15321 | return img::format("SUBUH.QB %s, %s, %s", rd, rs, rt); | |
15322 | } | |
15323 | ||
15324 | ||
15325 | /* | |
15326 | * SUBUH_R.QB rd, rs, rt - Subtract Unsigned Bytes And Right Shift to Halve | |
15327 | * Results (rounding) | |
15328 | * | |
15329 | * 3 2 1 | |
15330 | * 10987654321098765432109876543210 | |
15331 | * 001000 11101001101 | |
15332 | * rt ----- | |
15333 | * rs ----- | |
15334 | * rd ----- | |
15335 | */ | |
15336 | std::string NMD::SUBUH_R_QB(uint64 instruction) | |
15337 | { | |
15338 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 15339 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 15340 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
15341 | |
15342 | std::string rd = GPR(copy(rd_value)); | |
15343 | std::string rs = GPR(copy(rs_value)); | |
15344 | std::string rt = GPR(copy(rt_value)); | |
15345 | ||
15346 | return img::format("SUBUH_R.QB %s, %s, %s", rd, rs, rt); | |
15347 | } | |
15348 | ||
15349 | ||
15350 | /* | |
15351 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
15352 | * | |
15353 | * 3 2 1 | |
15354 | * 10987654321098765432109876543210 | |
15355 | * 001000 00010001101 | |
15356 | * rt ----- | |
15357 | * rs ----- | |
15358 | * rd ----- | |
15359 | */ | |
15360 | std::string NMD::SW_16_(uint64 instruction) | |
15361 | { | |
15362 | uint64 rtz3_value = extract_rtz3_9_8_7(instruction); | |
89a955e8 | 15363 | uint64 rs3_value = extract_rs3_6_5_4(instruction); |
75199b40 | 15364 | uint64 u_value = extract_u_3_2_1_0__s2(instruction); |
89a955e8 | 15365 | |
8191856b | 15366 | std::string rtz3 = GPR(decode_gpr_gpr3_src_store(rtz3_value)); |
89a955e8 | 15367 | std::string u = IMMEDIATE(copy(u_value)); |
988d6c89 | 15368 | std::string rs3 = GPR(decode_gpr_gpr3(rs3_value)); |
89a955e8 AM |
15369 | |
15370 | return img::format("SW %s, %s(%s)", rtz3, u, rs3); | |
15371 | } | |
15372 | ||
15373 | ||
15374 | /* | |
15375 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
15376 | * | |
15377 | * 3 2 1 | |
15378 | * 10987654321098765432109876543210 | |
15379 | * 001000 00010001101 | |
15380 | * rt ----- | |
15381 | * rs ----- | |
15382 | * rd ----- | |
15383 | */ | |
15384 | std::string NMD::SW_4X4_(uint64 instruction) | |
15385 | { | |
89a955e8 | 15386 | uint64 rtz4_value = extract_rtz4_9_7_6_5(instruction); |
75199b40 | 15387 | uint64 rs4_value = extract_rs4_4_2_1_0(instruction); |
11b9732a | 15388 | uint64 u_value = extract_u_3_8__s2(instruction); |
89a955e8 | 15389 | |
9980a225 | 15390 | std::string rtz4 = GPR(decode_gpr_gpr4_zero(rtz4_value)); |
89a955e8 | 15391 | std::string u = IMMEDIATE(copy(u_value)); |
131e9b92 | 15392 | std::string rs4 = GPR(decode_gpr_gpr4(rs4_value)); |
89a955e8 AM |
15393 | |
15394 | return img::format("SW %s, %s(%s)", rtz4, u, rs4); | |
15395 | } | |
15396 | ||
15397 | ||
15398 | /* | |
15399 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
15400 | * | |
15401 | * 3 2 1 | |
15402 | * 10987654321098765432109876543210 | |
15403 | * 001000 00010001101 | |
15404 | * rt ----- | |
15405 | * rs ----- | |
15406 | * rd ----- | |
15407 | */ | |
15408 | std::string NMD::SW_GP16_(uint64 instruction) | |
15409 | { | |
11b9732a | 15410 | uint64 u_value = extract_u_6_5_4_3_2_1_0__s2(instruction); |
75199b40 | 15411 | uint64 rtz3_value = extract_rtz3_9_8_7(instruction); |
89a955e8 | 15412 | |
8191856b | 15413 | std::string rtz3 = GPR(decode_gpr_gpr3_src_store(rtz3_value)); |
89a955e8 AM |
15414 | std::string u = IMMEDIATE(copy(u_value)); |
15415 | ||
15416 | return img::format("SW %s, %s($%d)", rtz3, u, 28); | |
15417 | } | |
15418 | ||
15419 | ||
15420 | /* | |
15421 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
15422 | * | |
15423 | * 3 2 1 | |
15424 | * 10987654321098765432109876543210 | |
15425 | * 001000 00010001101 | |
15426 | * rt ----- | |
15427 | * rs ----- | |
15428 | * rd ----- | |
15429 | */ | |
15430 | std::string NMD::SW_GP_(uint64 instruction) | |
15431 | { | |
15432 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
11b9732a | 15433 | uint64 u_value = extract_u_20_to_2__s2(instruction); |
89a955e8 AM |
15434 | |
15435 | std::string rt = GPR(copy(rt_value)); | |
15436 | std::string u = IMMEDIATE(copy(u_value)); | |
15437 | ||
15438 | return img::format("SW %s, %s($%d)", rt, u, 28); | |
15439 | } | |
15440 | ||
15441 | ||
15442 | /* | |
15443 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
15444 | * | |
15445 | * 3 2 1 | |
15446 | * 10987654321098765432109876543210 | |
15447 | * 001000 00010001101 | |
15448 | * rt ----- | |
15449 | * rs ----- | |
15450 | * rd ----- | |
15451 | */ | |
15452 | std::string NMD::SW_S9_(uint64 instruction) | |
15453 | { | |
15454 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
d3605cc0 | 15455 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
89a955e8 AM |
15456 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
15457 | ||
15458 | std::string rt = GPR(copy(rt_value)); | |
15459 | std::string s = IMMEDIATE(copy(s_value)); | |
15460 | std::string rs = GPR(copy(rs_value)); | |
15461 | ||
15462 | return img::format("SW %s, %s(%s)", rt, s, rs); | |
15463 | } | |
15464 | ||
15465 | ||
15466 | /* | |
15467 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
15468 | * | |
15469 | * 3 2 1 | |
15470 | * 10987654321098765432109876543210 | |
15471 | * 001000 00010001101 | |
15472 | * rt ----- | |
15473 | * rs ----- | |
15474 | * rd ----- | |
15475 | */ | |
15476 | std::string NMD::SW_SP_(uint64 instruction) | |
15477 | { | |
15478 | uint64 rt_value = extract_rt_9_8_7_6_5(instruction); | |
11b9732a | 15479 | uint64 u_value = extract_u_4_3_2_1_0__s2(instruction); |
89a955e8 AM |
15480 | |
15481 | std::string rt = GPR(copy(rt_value)); | |
15482 | std::string u = IMMEDIATE(copy(u_value)); | |
15483 | ||
15484 | return img::format("SW %s, %s($%d)", rt, u, 29); | |
15485 | } | |
15486 | ||
15487 | ||
15488 | /* | |
15489 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
15490 | * | |
15491 | * 3 2 1 | |
15492 | * 10987654321098765432109876543210 | |
15493 | * 001000 00010001101 | |
15494 | * rt ----- | |
15495 | * rs ----- | |
15496 | * rd ----- | |
15497 | */ | |
15498 | std::string NMD::SW_U12_(uint64 instruction) | |
15499 | { | |
15500 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 15501 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 15502 | uint64 u_value = extract_u_11_10_9_8_7_6_5_4_3_2_1_0(instruction); |
89a955e8 AM |
15503 | |
15504 | std::string rt = GPR(copy(rt_value)); | |
15505 | std::string u = IMMEDIATE(copy(u_value)); | |
15506 | std::string rs = GPR(copy(rs_value)); | |
15507 | ||
15508 | return img::format("SW %s, %s(%s)", rt, u, rs); | |
15509 | } | |
15510 | ||
15511 | ||
15512 | /* | |
15513 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
15514 | * | |
15515 | * 3 2 1 | |
15516 | * 10987654321098765432109876543210 | |
15517 | * 001000 00010001101 | |
15518 | * rt ----- | |
15519 | * rs ----- | |
15520 | * rd ----- | |
15521 | */ | |
15522 | std::string NMD::SWC1_GP_(uint64 instruction) | |
15523 | { | |
17ce2f00 | 15524 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
11b9732a | 15525 | uint64 u_value = extract_u_17_to_2__s2(instruction); |
89a955e8 AM |
15526 | |
15527 | std::string ft = FPR(copy(ft_value)); | |
15528 | std::string u = IMMEDIATE(copy(u_value)); | |
15529 | ||
15530 | return img::format("SWC1 %s, %s($%d)", ft, u, 28); | |
15531 | } | |
15532 | ||
15533 | ||
15534 | /* | |
15535 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
15536 | * | |
15537 | * 3 2 1 | |
15538 | * 10987654321098765432109876543210 | |
15539 | * 001000 00010001101 | |
15540 | * rt ----- | |
15541 | * rs ----- | |
15542 | * rd ----- | |
15543 | */ | |
15544 | std::string NMD::SWC1_S9_(uint64 instruction) | |
15545 | { | |
17ce2f00 | 15546 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
89a955e8 | 15547 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 15548 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
89a955e8 AM |
15549 | |
15550 | std::string ft = FPR(copy(ft_value)); | |
15551 | std::string s = IMMEDIATE(copy(s_value)); | |
15552 | std::string rs = GPR(copy(rs_value)); | |
15553 | ||
15554 | return img::format("SWC1 %s, %s(%s)", ft, s, rs); | |
15555 | } | |
15556 | ||
15557 | ||
15558 | /* | |
15559 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
15560 | * | |
15561 | * 3 2 1 | |
15562 | * 10987654321098765432109876543210 | |
15563 | * 001000 00010001101 | |
15564 | * rt ----- | |
15565 | * rs ----- | |
15566 | * rd ----- | |
15567 | */ | |
15568 | std::string NMD::SWC1_U12_(uint64 instruction) | |
15569 | { | |
17ce2f00 | 15570 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
89a955e8 | 15571 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 15572 | uint64 u_value = extract_u_11_10_9_8_7_6_5_4_3_2_1_0(instruction); |
89a955e8 AM |
15573 | |
15574 | std::string ft = FPR(copy(ft_value)); | |
15575 | std::string u = IMMEDIATE(copy(u_value)); | |
15576 | std::string rs = GPR(copy(rs_value)); | |
15577 | ||
15578 | return img::format("SWC1 %s, %s(%s)", ft, u, rs); | |
15579 | } | |
15580 | ||
15581 | ||
15582 | /* | |
15583 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
15584 | * | |
15585 | * 3 2 1 | |
15586 | * 10987654321098765432109876543210 | |
15587 | * 001000 00010001101 | |
15588 | * rt ----- | |
15589 | * rs ----- | |
15590 | * rd ----- | |
15591 | */ | |
15592 | std::string NMD::SWC1X(uint64 instruction) | |
15593 | { | |
15594 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 15595 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 15596 | uint64 ft_value = extract_ft_15_14_13_12_11(instruction); |
89a955e8 AM |
15597 | |
15598 | std::string ft = FPR(copy(ft_value)); | |
15599 | std::string rs = GPR(copy(rs_value)); | |
15600 | std::string rt = GPR(copy(rt_value)); | |
15601 | ||
15602 | return img::format("SWC1X %s, %s(%s)", ft, rs, rt); | |
15603 | } | |
15604 | ||
15605 | ||
15606 | /* | |
15607 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
15608 | * | |
15609 | * 3 2 1 | |
15610 | * 10987654321098765432109876543210 | |
15611 | * 001000 00010001101 | |
15612 | * rt ----- | |
15613 | * rs ----- | |
15614 | * rd ----- | |
15615 | */ | |
15616 | std::string NMD::SWC1XS(uint64 instruction) | |
15617 | { | |
15618 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 15619 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 15620 | uint64 ft_value = extract_ft_15_14_13_12_11(instruction); |
89a955e8 AM |
15621 | |
15622 | std::string ft = FPR(copy(ft_value)); | |
15623 | std::string rs = GPR(copy(rs_value)); | |
15624 | std::string rt = GPR(copy(rt_value)); | |
15625 | ||
15626 | return img::format("SWC1XS %s, %s(%s)", ft, rs, rt); | |
15627 | } | |
15628 | ||
15629 | ||
15630 | /* | |
15631 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
15632 | * | |
15633 | * 3 2 1 | |
15634 | * 10987654321098765432109876543210 | |
15635 | * 001000 00010001101 | |
15636 | * rt ----- | |
15637 | * rs ----- | |
15638 | * rd ----- | |
15639 | */ | |
15640 | std::string NMD::SWC2(uint64 instruction) | |
15641 | { | |
15642 | uint64 cs_value = extract_cs_25_24_23_22_21(instruction); | |
89a955e8 | 15643 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 15644 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
89a955e8 AM |
15645 | |
15646 | std::string cs = CPR(copy(cs_value)); | |
15647 | std::string s = IMMEDIATE(copy(s_value)); | |
15648 | std::string rs = GPR(copy(rs_value)); | |
15649 | ||
15650 | return img::format("SWC2 %s, %s(%s)", cs, s, rs); | |
15651 | } | |
15652 | ||
15653 | ||
15654 | /* | |
15655 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
15656 | * | |
15657 | * 3 2 1 | |
15658 | * 10987654321098765432109876543210 | |
15659 | * 001000 00010001101 | |
15660 | * rt ----- | |
15661 | * rs ----- | |
15662 | * rd ----- | |
15663 | */ | |
15664 | std::string NMD::SWE(uint64 instruction) | |
15665 | { | |
15666 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 15667 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 15668 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
89a955e8 AM |
15669 | |
15670 | std::string rt = GPR(copy(rt_value)); | |
15671 | std::string s = IMMEDIATE(copy(s_value)); | |
15672 | std::string rs = GPR(copy(rs_value)); | |
15673 | ||
15674 | return img::format("SWE %s, %s(%s)", rt, s, rs); | |
15675 | } | |
15676 | ||
15677 | ||
15678 | /* | |
15679 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
15680 | * | |
15681 | * 3 2 1 | |
15682 | * 10987654321098765432109876543210 | |
15683 | * 001000 00010001101 | |
15684 | * rt ----- | |
15685 | * rs ----- | |
15686 | * rd ----- | |
15687 | */ | |
15688 | std::string NMD::SWM(uint64 instruction) | |
15689 | { | |
15690 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 15691 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 AM |
15692 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
15693 | uint64 count3_value = extract_count3_14_13_12(instruction); | |
89a955e8 AM |
15694 | |
15695 | std::string rt = GPR(copy(rt_value)); | |
15696 | std::string s = IMMEDIATE(copy(s_value)); | |
15697 | std::string rs = GPR(copy(rs_value)); | |
15698 | std::string count3 = IMMEDIATE(encode_count3_from_count(count3_value)); | |
15699 | ||
15700 | return img::format("SWM %s, %s(%s), %s", rt, s, rs, count3); | |
15701 | } | |
15702 | ||
15703 | ||
15704 | /* | |
15705 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
15706 | * | |
15707 | * 3 2 1 | |
15708 | * 10987654321098765432109876543210 | |
15709 | * 001000 00010001101 | |
15710 | * rt ----- | |
15711 | * rs ----- | |
15712 | * rd ----- | |
15713 | */ | |
15714 | std::string NMD::SWPC_48_(uint64 instruction) | |
15715 | { | |
15716 | uint64 rt_value = extract_rt_41_40_39_38_37(instruction); | |
d3605cc0 | 15717 | int64 s_value = extract_s__se31_15_to_0_31_to_16(instruction); |
89a955e8 AM |
15718 | |
15719 | std::string rt = GPR(copy(rt_value)); | |
15720 | std::string s = ADDRESS(encode_s_from_address(s_value), 6); | |
15721 | ||
15722 | return img::format("SWPC %s, %s", rt, s); | |
15723 | } | |
15724 | ||
15725 | ||
15726 | /* | |
15727 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
15728 | * | |
15729 | * 3 2 1 | |
15730 | * 10987654321098765432109876543210 | |
15731 | * 001000 00010001101 | |
15732 | * rt ----- | |
15733 | * rs ----- | |
15734 | * rd ----- | |
15735 | */ | |
15736 | std::string NMD::SWX(uint64 instruction) | |
15737 | { | |
15738 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 15739 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 15740 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
15741 | |
15742 | std::string rd = GPR(copy(rd_value)); | |
15743 | std::string rs = GPR(copy(rs_value)); | |
15744 | std::string rt = GPR(copy(rt_value)); | |
15745 | ||
15746 | return img::format("SWX %s, %s(%s)", rd, rs, rt); | |
15747 | } | |
15748 | ||
15749 | ||
15750 | /* | |
15751 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
15752 | * | |
15753 | * 3 2 1 | |
15754 | * 10987654321098765432109876543210 | |
15755 | * 001000 00010001101 | |
15756 | * rt ----- | |
15757 | * rs ----- | |
15758 | * rd ----- | |
15759 | */ | |
15760 | std::string NMD::SWXS(uint64 instruction) | |
15761 | { | |
15762 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 15763 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 15764 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
15765 | |
15766 | std::string rd = GPR(copy(rd_value)); | |
15767 | std::string rs = GPR(copy(rs_value)); | |
15768 | std::string rt = GPR(copy(rt_value)); | |
15769 | ||
15770 | return img::format("SWXS %s, %s(%s)", rd, rs, rt); | |
15771 | } | |
15772 | ||
15773 | ||
15774 | /* | |
15775 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
15776 | * | |
15777 | * 3 2 1 | |
15778 | * 10987654321098765432109876543210 | |
15779 | * 001000 00010001101 | |
15780 | * rt ----- | |
15781 | * rs ----- | |
15782 | * rd ----- | |
15783 | */ | |
15784 | std::string NMD::SYNC(uint64 instruction) | |
15785 | { | |
15786 | uint64 stype_value = extract_stype_20_19_18_17_16(instruction); | |
15787 | ||
15788 | std::string stype = IMMEDIATE(copy(stype_value)); | |
15789 | ||
15790 | return img::format("SYNC %s", stype); | |
15791 | } | |
15792 | ||
15793 | ||
15794 | /* | |
15795 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
15796 | * | |
15797 | * 3 2 1 | |
15798 | * 10987654321098765432109876543210 | |
15799 | * 001000 00010001101 | |
15800 | * rt ----- | |
15801 | * rs ----- | |
15802 | * rd ----- | |
15803 | */ | |
15804 | std::string NMD::SYNCI(uint64 instruction) | |
15805 | { | |
89a955e8 | 15806 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 15807 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
89a955e8 AM |
15808 | |
15809 | std::string s = IMMEDIATE(copy(s_value)); | |
15810 | std::string rs = GPR(copy(rs_value)); | |
15811 | ||
15812 | return img::format("SYNCI %s(%s)", s, rs); | |
15813 | } | |
15814 | ||
15815 | ||
15816 | /* | |
15817 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
15818 | * | |
15819 | * 3 2 1 | |
15820 | * 10987654321098765432109876543210 | |
15821 | * 001000 00010001101 | |
15822 | * rt ----- | |
15823 | * rs ----- | |
15824 | * rd ----- | |
15825 | */ | |
15826 | std::string NMD::SYNCIE(uint64 instruction) | |
15827 | { | |
89a955e8 | 15828 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 15829 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
89a955e8 AM |
15830 | |
15831 | std::string s = IMMEDIATE(copy(s_value)); | |
15832 | std::string rs = GPR(copy(rs_value)); | |
15833 | ||
15834 | return img::format("SYNCIE %s(%s)", s, rs); | |
15835 | } | |
15836 | ||
15837 | ||
15838 | /* | |
15839 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
15840 | * | |
15841 | * 3 2 1 | |
15842 | * 10987654321098765432109876543210 | |
15843 | * 001000 00010001101 | |
15844 | * rt ----- | |
15845 | * rs ----- | |
15846 | * rd ----- | |
15847 | */ | |
15848 | std::string NMD::SYSCALL_16_(uint64 instruction) | |
15849 | { | |
15850 | uint64 code_value = extract_code_1_0(instruction); | |
15851 | ||
15852 | std::string code = IMMEDIATE(copy(code_value)); | |
15853 | ||
15854 | return img::format("SYSCALL %s", code); | |
15855 | } | |
15856 | ||
15857 | ||
15858 | /* | |
15859 | * SYSCALL code - System Call. Cause a System Call Exception | |
15860 | * | |
15861 | * 3 2 1 | |
15862 | * 10987654321098765432109876543210 | |
15863 | * 00000000000010 | |
15864 | * code ------------------ | |
15865 | */ | |
15866 | std::string NMD::SYSCALL_32_(uint64 instruction) | |
15867 | { | |
15868 | uint64 code_value = extract_code_17_to_0(instruction); | |
15869 | ||
15870 | std::string code = IMMEDIATE(copy(code_value)); | |
15871 | ||
15872 | return img::format("SYSCALL %s", code); | |
15873 | } | |
15874 | ||
15875 | ||
15876 | /* | |
15877 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
15878 | * | |
15879 | * 3 2 1 | |
15880 | * 10987654321098765432109876543210 | |
15881 | * 001000 00010001101 | |
15882 | * rt ----- | |
15883 | * rs ----- | |
15884 | * rd ----- | |
15885 | */ | |
15886 | std::string NMD::TEQ(uint64 instruction) | |
15887 | { | |
15888 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
15889 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
15890 | ||
15891 | std::string rs = GPR(copy(rs_value)); | |
15892 | std::string rt = GPR(copy(rt_value)); | |
15893 | ||
15894 | return img::format("TEQ %s, %s", rs, rt); | |
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 | */ | |
15908 | std::string NMD::TLBGINV(uint64 instruction) | |
15909 | { | |
15910 | (void)instruction; | |
15911 | ||
15912 | return "TLBGINV "; | |
15913 | } | |
15914 | ||
15915 | ||
15916 | /* | |
15917 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
15918 | * | |
15919 | * 3 2 1 | |
15920 | * 10987654321098765432109876543210 | |
15921 | * 001000 00010001101 | |
15922 | * rt ----- | |
15923 | * rs ----- | |
15924 | * rd ----- | |
15925 | */ | |
15926 | std::string NMD::TLBGINVF(uint64 instruction) | |
15927 | { | |
15928 | (void)instruction; | |
15929 | ||
15930 | return "TLBGINVF "; | |
15931 | } | |
15932 | ||
15933 | ||
15934 | /* | |
15935 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
15936 | * | |
15937 | * 3 2 1 | |
15938 | * 10987654321098765432109876543210 | |
15939 | * 001000 00010001101 | |
15940 | * rt ----- | |
15941 | * rs ----- | |
15942 | * rd ----- | |
15943 | */ | |
15944 | std::string NMD::TLBGP(uint64 instruction) | |
15945 | { | |
15946 | (void)instruction; | |
15947 | ||
15948 | return "TLBGP "; | |
15949 | } | |
15950 | ||
15951 | ||
15952 | /* | |
15953 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
15954 | * | |
15955 | * 3 2 1 | |
15956 | * 10987654321098765432109876543210 | |
15957 | * 001000 00010001101 | |
15958 | * rt ----- | |
15959 | * rs ----- | |
15960 | * rd ----- | |
15961 | */ | |
15962 | std::string NMD::TLBGR(uint64 instruction) | |
15963 | { | |
15964 | (void)instruction; | |
15965 | ||
15966 | return "TLBGR "; | |
15967 | } | |
15968 | ||
15969 | ||
15970 | /* | |
15971 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
15972 | * | |
15973 | * 3 2 1 | |
15974 | * 10987654321098765432109876543210 | |
15975 | * 001000 00010001101 | |
15976 | * rt ----- | |
15977 | * rs ----- | |
15978 | * rd ----- | |
15979 | */ | |
15980 | std::string NMD::TLBGWI(uint64 instruction) | |
15981 | { | |
15982 | (void)instruction; | |
15983 | ||
15984 | return "TLBGWI "; | |
15985 | } | |
15986 | ||
15987 | ||
15988 | /* | |
15989 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
15990 | * | |
15991 | * 3 2 1 | |
15992 | * 10987654321098765432109876543210 | |
15993 | * 001000 00010001101 | |
15994 | * rt ----- | |
15995 | * rs ----- | |
15996 | * rd ----- | |
15997 | */ | |
15998 | std::string NMD::TLBGWR(uint64 instruction) | |
15999 | { | |
16000 | (void)instruction; | |
16001 | ||
16002 | return "TLBGWR "; | |
16003 | } | |
16004 | ||
16005 | ||
16006 | /* | |
16007 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
16008 | * | |
16009 | * 3 2 1 | |
16010 | * 10987654321098765432109876543210 | |
16011 | * 001000 00010001101 | |
16012 | * rt ----- | |
16013 | * rs ----- | |
16014 | * rd ----- | |
16015 | */ | |
16016 | std::string NMD::TLBINV(uint64 instruction) | |
16017 | { | |
16018 | (void)instruction; | |
16019 | ||
16020 | return "TLBINV "; | |
16021 | } | |
16022 | ||
16023 | ||
16024 | /* | |
16025 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
16026 | * | |
16027 | * 3 2 1 | |
16028 | * 10987654321098765432109876543210 | |
16029 | * 001000 00010001101 | |
16030 | * rt ----- | |
16031 | * rs ----- | |
16032 | * rd ----- | |
16033 | */ | |
16034 | std::string NMD::TLBINVF(uint64 instruction) | |
16035 | { | |
16036 | (void)instruction; | |
16037 | ||
16038 | return "TLBINVF "; | |
16039 | } | |
16040 | ||
16041 | ||
16042 | /* | |
16043 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
16044 | * | |
16045 | * 3 2 1 | |
16046 | * 10987654321098765432109876543210 | |
16047 | * 001000 00010001101 | |
16048 | * rt ----- | |
16049 | * rs ----- | |
16050 | * rd ----- | |
16051 | */ | |
16052 | std::string NMD::TLBP(uint64 instruction) | |
16053 | { | |
16054 | (void)instruction; | |
16055 | ||
16056 | return "TLBP "; | |
16057 | } | |
16058 | ||
16059 | ||
16060 | /* | |
16061 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
16062 | * | |
16063 | * 3 2 1 | |
16064 | * 10987654321098765432109876543210 | |
16065 | * 001000 00010001101 | |
16066 | * rt ----- | |
16067 | * rs ----- | |
16068 | * rd ----- | |
16069 | */ | |
16070 | std::string NMD::TLBR(uint64 instruction) | |
16071 | { | |
16072 | (void)instruction; | |
16073 | ||
16074 | return "TLBR "; | |
16075 | } | |
16076 | ||
16077 | ||
16078 | /* | |
16079 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
16080 | * | |
16081 | * 3 2 1 | |
16082 | * 10987654321098765432109876543210 | |
16083 | * 001000 00010001101 | |
16084 | * rt ----- | |
16085 | * rs ----- | |
16086 | * rd ----- | |
16087 | */ | |
16088 | std::string NMD::TLBWI(uint64 instruction) | |
16089 | { | |
16090 | (void)instruction; | |
16091 | ||
16092 | return "TLBWI "; | |
16093 | } | |
16094 | ||
16095 | ||
16096 | /* | |
16097 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
16098 | * | |
16099 | * 3 2 1 | |
16100 | * 10987654321098765432109876543210 | |
16101 | * 001000 00010001101 | |
16102 | * rt ----- | |
16103 | * rs ----- | |
16104 | * rd ----- | |
16105 | */ | |
16106 | std::string NMD::TLBWR(uint64 instruction) | |
16107 | { | |
16108 | (void)instruction; | |
16109 | ||
16110 | return "TLBWR "; | |
16111 | } | |
16112 | ||
16113 | ||
16114 | /* | |
16115 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
16116 | * | |
16117 | * 3 2 1 | |
16118 | * 10987654321098765432109876543210 | |
16119 | * 001000 00010001101 | |
16120 | * rt ----- | |
16121 | * rs ----- | |
16122 | * rd ----- | |
16123 | */ | |
16124 | std::string NMD::TNE(uint64 instruction) | |
16125 | { | |
16126 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
16127 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
16128 | ||
16129 | std::string rs = GPR(copy(rs_value)); | |
16130 | std::string rt = GPR(copy(rt_value)); | |
16131 | ||
16132 | return img::format("TNE %s, %s", rs, rt); | |
16133 | } | |
16134 | ||
16135 | ||
16136 | /* | |
16137 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
16138 | * | |
16139 | * 3 2 1 | |
16140 | * 10987654321098765432109876543210 | |
16141 | * 001000 00010001101 | |
16142 | * rt ----- | |
16143 | * rs ----- | |
16144 | * rd ----- | |
16145 | */ | |
16146 | std::string NMD::TRUNC_L_D(uint64 instruction) | |
16147 | { | |
17ce2f00 | 16148 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 16149 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 AM |
16150 | |
16151 | std::string ft = FPR(copy(ft_value)); | |
16152 | std::string fs = FPR(copy(fs_value)); | |
16153 | ||
16154 | return img::format("TRUNC.L.D %s, %s", ft, fs); | |
16155 | } | |
16156 | ||
16157 | ||
16158 | /* | |
16159 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
16160 | * | |
16161 | * 3 2 1 | |
16162 | * 10987654321098765432109876543210 | |
16163 | * 001000 00010001101 | |
16164 | * rt ----- | |
16165 | * rs ----- | |
16166 | * rd ----- | |
16167 | */ | |
16168 | std::string NMD::TRUNC_L_S(uint64 instruction) | |
16169 | { | |
17ce2f00 | 16170 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 16171 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 AM |
16172 | |
16173 | std::string ft = FPR(copy(ft_value)); | |
16174 | std::string fs = FPR(copy(fs_value)); | |
16175 | ||
16176 | return img::format("TRUNC.L.S %s, %s", ft, fs); | |
16177 | } | |
16178 | ||
16179 | ||
16180 | /* | |
16181 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
16182 | * | |
16183 | * 3 2 1 | |
16184 | * 10987654321098765432109876543210 | |
16185 | * 001000 00010001101 | |
16186 | * rt ----- | |
16187 | * rs ----- | |
16188 | * rd ----- | |
16189 | */ | |
16190 | std::string NMD::TRUNC_W_D(uint64 instruction) | |
16191 | { | |
17ce2f00 | 16192 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 16193 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 AM |
16194 | |
16195 | std::string ft = FPR(copy(ft_value)); | |
16196 | std::string fs = FPR(copy(fs_value)); | |
16197 | ||
16198 | return img::format("TRUNC.W.D %s, %s", ft, fs); | |
16199 | } | |
16200 | ||
16201 | ||
16202 | /* | |
16203 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
16204 | * | |
16205 | * 3 2 1 | |
16206 | * 10987654321098765432109876543210 | |
16207 | * 001000 00010001101 | |
16208 | * rt ----- | |
16209 | * rs ----- | |
16210 | * rd ----- | |
16211 | */ | |
16212 | std::string NMD::TRUNC_W_S(uint64 instruction) | |
16213 | { | |
17ce2f00 | 16214 | uint64 ft_value = extract_ft_25_24_23_22_21(instruction); |
52a96d22 | 16215 | uint64 fs_value = extract_fs_20_19_18_17_16(instruction); |
89a955e8 AM |
16216 | |
16217 | std::string ft = FPR(copy(ft_value)); | |
16218 | std::string fs = FPR(copy(fs_value)); | |
16219 | ||
16220 | return img::format("TRUNC.W.S %s, %s", ft, fs); | |
16221 | } | |
16222 | ||
16223 | ||
16224 | /* | |
16225 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
16226 | * | |
16227 | * 3 2 1 | |
16228 | * 10987654321098765432109876543210 | |
16229 | * 001000 00010001101 | |
16230 | * rt ----- | |
16231 | * rs ----- | |
16232 | * rd ----- | |
16233 | */ | |
16234 | std::string NMD::UALDM(uint64 instruction) | |
16235 | { | |
16236 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 16237 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 AM |
16238 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
16239 | uint64 count3_value = extract_count3_14_13_12(instruction); | |
89a955e8 AM |
16240 | |
16241 | std::string rt = GPR(copy(rt_value)); | |
16242 | std::string s = IMMEDIATE(copy(s_value)); | |
16243 | std::string rs = GPR(copy(rs_value)); | |
16244 | std::string count3 = IMMEDIATE(encode_count3_from_count(count3_value)); | |
16245 | ||
16246 | return img::format("UALDM %s, %s(%s), %s", rt, s, rs, count3); | |
16247 | } | |
16248 | ||
16249 | ||
16250 | /* | |
16251 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
16252 | * | |
16253 | * 3 2 1 | |
16254 | * 10987654321098765432109876543210 | |
16255 | * 001000 00010001101 | |
16256 | * rt ----- | |
16257 | * rs ----- | |
16258 | * rd ----- | |
16259 | */ | |
16260 | std::string NMD::UALH(uint64 instruction) | |
16261 | { | |
16262 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 16263 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 16264 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
89a955e8 AM |
16265 | |
16266 | std::string rt = GPR(copy(rt_value)); | |
16267 | std::string s = IMMEDIATE(copy(s_value)); | |
16268 | std::string rs = GPR(copy(rs_value)); | |
16269 | ||
16270 | return img::format("UALH %s, %s(%s)", rt, s, rs); | |
16271 | } | |
16272 | ||
16273 | ||
16274 | /* | |
16275 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
16276 | * | |
16277 | * 3 2 1 | |
16278 | * 10987654321098765432109876543210 | |
16279 | * 001000 00010001101 | |
16280 | * rt ----- | |
16281 | * rs ----- | |
16282 | * rd ----- | |
16283 | */ | |
16284 | std::string NMD::UALWM(uint64 instruction) | |
16285 | { | |
16286 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 16287 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 AM |
16288 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
16289 | uint64 count3_value = extract_count3_14_13_12(instruction); | |
89a955e8 AM |
16290 | |
16291 | std::string rt = GPR(copy(rt_value)); | |
16292 | std::string s = IMMEDIATE(copy(s_value)); | |
16293 | std::string rs = GPR(copy(rs_value)); | |
16294 | std::string count3 = IMMEDIATE(encode_count3_from_count(count3_value)); | |
16295 | ||
16296 | return img::format("UALWM %s, %s(%s), %s", rt, s, rs, count3); | |
16297 | } | |
16298 | ||
16299 | ||
16300 | /* | |
16301 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
16302 | * | |
16303 | * 3 2 1 | |
16304 | * 10987654321098765432109876543210 | |
16305 | * 001000 00010001101 | |
16306 | * rt ----- | |
16307 | * rs ----- | |
16308 | * rd ----- | |
16309 | */ | |
16310 | std::string NMD::UASDM(uint64 instruction) | |
16311 | { | |
16312 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 16313 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 AM |
16314 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
16315 | uint64 count3_value = extract_count3_14_13_12(instruction); | |
89a955e8 AM |
16316 | |
16317 | std::string rt = GPR(copy(rt_value)); | |
16318 | std::string s = IMMEDIATE(copy(s_value)); | |
16319 | std::string rs = GPR(copy(rs_value)); | |
16320 | std::string count3 = IMMEDIATE(encode_count3_from_count(count3_value)); | |
16321 | ||
16322 | return img::format("UASDM %s, %s(%s), %s", rt, s, rs, count3); | |
16323 | } | |
16324 | ||
16325 | ||
16326 | /* | |
16327 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
16328 | * | |
16329 | * 3 2 1 | |
16330 | * 10987654321098765432109876543210 | |
16331 | * 001000 00010001101 | |
16332 | * rt ----- | |
16333 | * rs ----- | |
16334 | * rd ----- | |
16335 | */ | |
16336 | std::string NMD::UASH(uint64 instruction) | |
16337 | { | |
16338 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 16339 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 | 16340 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
89a955e8 AM |
16341 | |
16342 | std::string rt = GPR(copy(rt_value)); | |
16343 | std::string s = IMMEDIATE(copy(s_value)); | |
16344 | std::string rs = GPR(copy(rs_value)); | |
16345 | ||
16346 | return img::format("UASH %s, %s(%s)", rt, s, rs); | |
16347 | } | |
16348 | ||
16349 | ||
16350 | /* | |
16351 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
16352 | * | |
16353 | * 3 2 1 | |
16354 | * 10987654321098765432109876543210 | |
16355 | * 001000 00010001101 | |
16356 | * rt ----- | |
16357 | * rs ----- | |
16358 | * rd ----- | |
16359 | */ | |
16360 | std::string NMD::UASWM(uint64 instruction) | |
16361 | { | |
16362 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 16363 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
75199b40 AM |
16364 | int64 s_value = extract_s__se8_15_7_6_5_4_3_2_1_0(instruction); |
16365 | uint64 count3_value = extract_count3_14_13_12(instruction); | |
89a955e8 AM |
16366 | |
16367 | std::string rt = GPR(copy(rt_value)); | |
16368 | std::string s = IMMEDIATE(copy(s_value)); | |
16369 | std::string rs = GPR(copy(rs_value)); | |
16370 | std::string count3 = IMMEDIATE(encode_count3_from_count(count3_value)); | |
16371 | ||
16372 | return img::format("UASWM %s, %s(%s), %s", rt, s, rs, count3); | |
16373 | } | |
16374 | ||
16375 | ||
16376 | /* | |
16377 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
16378 | * | |
16379 | * 3 2 1 | |
16380 | * 10987654321098765432109876543210 | |
16381 | * 001000 00010001101 | |
16382 | * rt ----- | |
16383 | * rs ----- | |
16384 | * rd ----- | |
16385 | */ | |
16386 | std::string NMD::UDI(uint64 instruction) | |
16387 | { | |
16388 | uint64 op_value = extract_op_25_to_3(instruction); | |
16389 | ||
16390 | std::string op = IMMEDIATE(copy(op_value)); | |
16391 | ||
16392 | return img::format("UDI %s", op); | |
16393 | } | |
16394 | ||
16395 | ||
16396 | /* | |
16397 | * WAIT code - Enter Wait State | |
16398 | * | |
16399 | * 3 2 1 | |
16400 | * 10987654321098765432109876543210 | |
16401 | * 001000 1100001101111111 | |
16402 | * code ---------- | |
16403 | */ | |
16404 | std::string NMD::WAIT(uint64 instruction) | |
16405 | { | |
16406 | uint64 code_value = extract_code_25_24_23_22_21_20_19_18_17_16(instruction); | |
16407 | ||
16408 | std::string code = IMMEDIATE(copy(code_value)); | |
16409 | ||
16410 | return img::format("WAIT %s", code); | |
16411 | } | |
16412 | ||
16413 | ||
16414 | /* | |
16415 | * WRDSP rt, mask - Write Fields to DSPControl Register from a GPR | |
16416 | * | |
16417 | * 3 2 1 | |
16418 | * 10987654321098765432109876543210 | |
16419 | * 001000 01011001111111 | |
16420 | * rt ----- | |
16421 | * mask ------- | |
16422 | */ | |
16423 | std::string NMD::WRDSP(uint64 instruction) | |
16424 | { | |
16425 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
16426 | uint64 mask_value = extract_mask_20_19_18_17_16_15_14(instruction); | |
16427 | ||
16428 | std::string rt = GPR(copy(rt_value)); | |
16429 | std::string mask = IMMEDIATE(copy(mask_value)); | |
16430 | ||
16431 | return img::format("WRDSP %s, %s", rt, mask); | |
16432 | } | |
16433 | ||
16434 | ||
16435 | /* | |
16436 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
16437 | * | |
16438 | * 3 2 1 | |
16439 | * 10987654321098765432109876543210 | |
16440 | * 001000 00010001101 | |
16441 | * rt ----- | |
16442 | * rs ----- | |
16443 | * rd ----- | |
16444 | */ | |
16445 | std::string NMD::WRPGPR(uint64 instruction) | |
16446 | { | |
16447 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
16448 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
16449 | ||
16450 | std::string rt = GPR(copy(rt_value)); | |
16451 | std::string rs = GPR(copy(rs_value)); | |
16452 | ||
16453 | return img::format("WRPGPR %s, %s", rt, rs); | |
16454 | } | |
16455 | ||
16456 | ||
16457 | /* | |
16458 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
16459 | * | |
16460 | * 3 2 1 | |
16461 | * 10987654321098765432109876543210 | |
16462 | * 001000 00010001101 | |
16463 | * rt ----- | |
16464 | * rs ----- | |
16465 | * rd ----- | |
16466 | */ | |
16467 | std::string NMD::XOR_16_(uint64 instruction) | |
16468 | { | |
16469 | uint64 rt3_value = extract_rt3_9_8_7(instruction); | |
16470 | uint64 rs3_value = extract_rs3_6_5_4(instruction); | |
16471 | ||
988d6c89 AM |
16472 | std::string rs3 = GPR(decode_gpr_gpr3(rs3_value)); |
16473 | std::string rt3 = GPR(decode_gpr_gpr3(rt3_value)); | |
89a955e8 AM |
16474 | |
16475 | return img::format("XOR %s, %s", rs3, rt3); | |
16476 | } | |
16477 | ||
16478 | ||
16479 | /* | |
16480 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
16481 | * | |
16482 | * 3 2 1 | |
16483 | * 10987654321098765432109876543210 | |
16484 | * 001000 00010001101 | |
16485 | * rt ----- | |
16486 | * rs ----- | |
16487 | * rd ----- | |
16488 | */ | |
16489 | std::string NMD::XOR_32_(uint64 instruction) | |
16490 | { | |
16491 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 16492 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 16493 | uint64 rd_value = extract_rd_15_14_13_12_11(instruction); |
89a955e8 AM |
16494 | |
16495 | std::string rd = GPR(copy(rd_value)); | |
16496 | std::string rs = GPR(copy(rs_value)); | |
16497 | std::string rt = GPR(copy(rt_value)); | |
16498 | ||
16499 | return img::format("XOR %s, %s, %s", rd, rs, rt); | |
16500 | } | |
16501 | ||
16502 | ||
16503 | /* | |
16504 | * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results | |
16505 | * | |
16506 | * 3 2 1 | |
16507 | * 10987654321098765432109876543210 | |
16508 | * 001000 00010001101 | |
16509 | * rt ----- | |
16510 | * rs ----- | |
16511 | * rd ----- | |
16512 | */ | |
16513 | std::string NMD::XORI(uint64 instruction) | |
16514 | { | |
16515 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
89a955e8 | 16516 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); |
86b5f803 | 16517 | uint64 u_value = extract_u_11_10_9_8_7_6_5_4_3_2_1_0(instruction); |
89a955e8 AM |
16518 | |
16519 | std::string rt = GPR(copy(rt_value)); | |
16520 | std::string rs = GPR(copy(rs_value)); | |
16521 | std::string u = IMMEDIATE(copy(u_value)); | |
16522 | ||
16523 | return img::format("XORI %s, %s, %s", rt, rs, u); | |
16524 | } | |
16525 | ||
16526 | ||
16527 | /* | |
16528 | * YIELD rt, rs - | |
16529 | * | |
16530 | * 3 2 1 | |
16531 | * 10987654321098765432109876543210 | |
16532 | * 001000 00010001101 | |
16533 | * rt ----- | |
16534 | * rs ----- | |
16535 | */ | |
16536 | std::string NMD::YIELD(uint64 instruction) | |
16537 | { | |
16538 | uint64 rt_value = extract_rt_25_24_23_22_21(instruction); | |
16539 | uint64 rs_value = extract_rs_20_19_18_17_16(instruction); | |
16540 | ||
16541 | std::string rt = GPR(copy(rt_value)); | |
16542 | std::string rs = GPR(copy(rs_value)); | |
16543 | ||
16544 | return img::format("YIELD %s, %s", rt, rs); | |
16545 | } | |
16546 | ||
16547 | ||
16548 | ||
16549 | NMD::Pool NMD::P_SYSCALL[2] = { | |
16550 | { instruction , 0 , 0 , 32, | |
16551 | 0xfffc0000, 0x00080000, &NMD::SYSCALL_32_ , 0, | |
16552 | 0x0 }, /* SYSCALL[32] */ | |
16553 | { instruction , 0 , 0 , 32, | |
16554 | 0xfffc0000, 0x000c0000, &NMD::HYPCALL , 0, | |
16555 | CP0_ | VZ_ }, /* HYPCALL */ | |
16556 | }; | |
16557 | ||
16558 | ||
16559 | NMD::Pool NMD::P_RI[4] = { | |
16560 | { instruction , 0 , 0 , 32, | |
16561 | 0xfff80000, 0x00000000, &NMD::SIGRIE , 0, | |
16562 | 0x0 }, /* SIGRIE */ | |
16563 | { pool , P_SYSCALL , 2 , 32, | |
16564 | 0xfff80000, 0x00080000, 0 , 0, | |
16565 | 0x0 }, /* P.SYSCALL */ | |
16566 | { instruction , 0 , 0 , 32, | |
16567 | 0xfff80000, 0x00100000, &NMD::BREAK_32_ , 0, | |
16568 | 0x0 }, /* BREAK[32] */ | |
16569 | { instruction , 0 , 0 , 32, | |
16570 | 0xfff80000, 0x00180000, &NMD::SDBBP_32_ , 0, | |
16571 | EJTAG_ }, /* SDBBP[32] */ | |
16572 | }; | |
16573 | ||
16574 | ||
16575 | NMD::Pool NMD::P_ADDIU[2] = { | |
16576 | { pool , P_RI , 4 , 32, | |
16577 | 0xffe00000, 0x00000000, 0 , 0, | |
16578 | 0x0 }, /* P.RI */ | |
16579 | { instruction , 0 , 0 , 32, | |
16580 | 0xfc000000, 0x00000000, &NMD::ADDIU_32_ , &NMD::ADDIU_32__cond , | |
16581 | 0x0 }, /* ADDIU[32] */ | |
16582 | }; | |
16583 | ||
16584 | ||
16585 | NMD::Pool NMD::P_TRAP[2] = { | |
16586 | { instruction , 0 , 0 , 32, | |
16587 | 0xfc0007ff, 0x20000000, &NMD::TEQ , 0, | |
16588 | XMMS_ }, /* TEQ */ | |
16589 | { instruction , 0 , 0 , 32, | |
16590 | 0xfc0007ff, 0x20000400, &NMD::TNE , 0, | |
16591 | XMMS_ }, /* TNE */ | |
16592 | }; | |
16593 | ||
16594 | ||
16595 | NMD::Pool NMD::P_CMOVE[2] = { | |
16596 | { instruction , 0 , 0 , 32, | |
16597 | 0xfc0007ff, 0x20000210, &NMD::MOVZ , 0, | |
16598 | 0x0 }, /* MOVZ */ | |
16599 | { instruction , 0 , 0 , 32, | |
16600 | 0xfc0007ff, 0x20000610, &NMD::MOVN , 0, | |
16601 | 0x0 }, /* MOVN */ | |
16602 | }; | |
16603 | ||
16604 | ||
16605 | NMD::Pool NMD::P_D_MT_VPE[2] = { | |
16606 | { instruction , 0 , 0 , 32, | |
16607 | 0xfc1f3fff, 0x20010ab0, &NMD::DMT , 0, | |
16608 | MT_ }, /* DMT */ | |
16609 | { instruction , 0 , 0 , 32, | |
16610 | 0xfc1f3fff, 0x20000ab0, &NMD::DVPE , 0, | |
16611 | MT_ }, /* DVPE */ | |
16612 | }; | |
16613 | ||
16614 | ||
16615 | NMD::Pool NMD::P_E_MT_VPE[2] = { | |
16616 | { instruction , 0 , 0 , 32, | |
16617 | 0xfc1f3fff, 0x20010eb0, &NMD::EMT , 0, | |
16618 | MT_ }, /* EMT */ | |
16619 | { instruction , 0 , 0 , 32, | |
16620 | 0xfc1f3fff, 0x20000eb0, &NMD::EVPE , 0, | |
16621 | MT_ }, /* EVPE */ | |
16622 | }; | |
16623 | ||
16624 | ||
16625 | NMD::Pool NMD::_P_MT_VPE[2] = { | |
16626 | { pool , P_D_MT_VPE , 2 , 32, | |
16627 | 0xfc003fff, 0x20000ab0, 0 , 0, | |
16628 | 0x0 }, /* P.D_MT_VPE */ | |
16629 | { pool , P_E_MT_VPE , 2 , 32, | |
16630 | 0xfc003fff, 0x20000eb0, 0 , 0, | |
16631 | 0x0 }, /* P.E_MT_VPE */ | |
16632 | }; | |
16633 | ||
16634 | ||
16635 | NMD::Pool NMD::P_MT_VPE[8] = { | |
16636 | { reserved_block , 0 , 0 , 32, | |
16637 | 0xfc003bff, 0x200002b0, 0 , 0, | |
16638 | 0x0 }, /* P.MT_VPE~*(0) */ | |
16639 | { pool , _P_MT_VPE , 2 , 32, | |
16640 | 0xfc003bff, 0x20000ab0, 0 , 0, | |
16641 | 0x0 }, /* _P.MT_VPE */ | |
16642 | { reserved_block , 0 , 0 , 32, | |
16643 | 0xfc003bff, 0x200012b0, 0 , 0, | |
16644 | 0x0 }, /* P.MT_VPE~*(2) */ | |
16645 | { reserved_block , 0 , 0 , 32, | |
16646 | 0xfc003bff, 0x20001ab0, 0 , 0, | |
16647 | 0x0 }, /* P.MT_VPE~*(3) */ | |
16648 | { reserved_block , 0 , 0 , 32, | |
16649 | 0xfc003bff, 0x200022b0, 0 , 0, | |
16650 | 0x0 }, /* P.MT_VPE~*(4) */ | |
16651 | { reserved_block , 0 , 0 , 32, | |
16652 | 0xfc003bff, 0x20002ab0, 0 , 0, | |
16653 | 0x0 }, /* P.MT_VPE~*(5) */ | |
16654 | { reserved_block , 0 , 0 , 32, | |
16655 | 0xfc003bff, 0x200032b0, 0 , 0, | |
16656 | 0x0 }, /* P.MT_VPE~*(6) */ | |
16657 | { reserved_block , 0 , 0 , 32, | |
16658 | 0xfc003bff, 0x20003ab0, 0 , 0, | |
16659 | 0x0 }, /* P.MT_VPE~*(7) */ | |
16660 | }; | |
16661 | ||
16662 | ||
16663 | NMD::Pool NMD::P_DVP[2] = { | |
16664 | { instruction , 0 , 0 , 32, | |
16665 | 0xfc00ffff, 0x20000390, &NMD::DVP , 0, | |
16666 | 0x0 }, /* DVP */ | |
16667 | { instruction , 0 , 0 , 32, | |
16668 | 0xfc00ffff, 0x20000790, &NMD::EVP , 0, | |
16669 | 0x0 }, /* EVP */ | |
16670 | }; | |
16671 | ||
16672 | ||
16673 | NMD::Pool NMD::P_SLTU[2] = { | |
16674 | { pool , P_DVP , 2 , 32, | |
16675 | 0xfc00fbff, 0x20000390, 0 , 0, | |
16676 | 0x0 }, /* P.DVP */ | |
16677 | { instruction , 0 , 0 , 32, | |
16678 | 0xfc0003ff, 0x20000390, &NMD::SLTU , &NMD::SLTU_cond , | |
16679 | 0x0 }, /* SLTU */ | |
16680 | }; | |
16681 | ||
16682 | ||
16683 | NMD::Pool NMD::_POOL32A0[128] = { | |
16684 | { pool , P_TRAP , 2 , 32, | |
16685 | 0xfc0003ff, 0x20000000, 0 , 0, | |
16686 | 0x0 }, /* P.TRAP */ | |
16687 | { instruction , 0 , 0 , 32, | |
16688 | 0xfc0003ff, 0x20000008, &NMD::SEB , 0, | |
16689 | XMMS_ }, /* SEB */ | |
16690 | { instruction , 0 , 0 , 32, | |
16691 | 0xfc0003ff, 0x20000010, &NMD::SLLV , 0, | |
16692 | 0x0 }, /* SLLV */ | |
16693 | { instruction , 0 , 0 , 32, | |
16694 | 0xfc0003ff, 0x20000018, &NMD::MUL_32_ , 0, | |
16695 | 0x0 }, /* MUL[32] */ | |
16696 | { reserved_block , 0 , 0 , 32, | |
16697 | 0xfc0003ff, 0x20000020, 0 , 0, | |
16698 | 0x0 }, /* _POOL32A0~*(4) */ | |
16699 | { reserved_block , 0 , 0 , 32, | |
16700 | 0xfc0003ff, 0x20000028, 0 , 0, | |
16701 | 0x0 }, /* _POOL32A0~*(5) */ | |
16702 | { instruction , 0 , 0 , 32, | |
16703 | 0xfc0003ff, 0x20000030, &NMD::MFC0 , 0, | |
16704 | 0x0 }, /* MFC0 */ | |
16705 | { instruction , 0 , 0 , 32, | |
16706 | 0xfc0003ff, 0x20000038, &NMD::MFHC0 , 0, | |
16707 | CP0_ | MVH_ }, /* MFHC0 */ | |
16708 | { reserved_block , 0 , 0 , 32, | |
16709 | 0xfc0003ff, 0x20000040, 0 , 0, | |
16710 | 0x0 }, /* _POOL32A0~*(8) */ | |
16711 | { instruction , 0 , 0 , 32, | |
16712 | 0xfc0003ff, 0x20000048, &NMD::SEH , 0, | |
16713 | 0x0 }, /* SEH */ | |
16714 | { instruction , 0 , 0 , 32, | |
16715 | 0xfc0003ff, 0x20000050, &NMD::SRLV , 0, | |
16716 | 0x0 }, /* SRLV */ | |
16717 | { instruction , 0 , 0 , 32, | |
16718 | 0xfc0003ff, 0x20000058, &NMD::MUH , 0, | |
16719 | 0x0 }, /* MUH */ | |
16720 | { reserved_block , 0 , 0 , 32, | |
16721 | 0xfc0003ff, 0x20000060, 0 , 0, | |
16722 | 0x0 }, /* _POOL32A0~*(12) */ | |
16723 | { reserved_block , 0 , 0 , 32, | |
16724 | 0xfc0003ff, 0x20000068, 0 , 0, | |
16725 | 0x0 }, /* _POOL32A0~*(13) */ | |
16726 | { instruction , 0 , 0 , 32, | |
16727 | 0xfc0003ff, 0x20000070, &NMD::MTC0 , 0, | |
16728 | CP0_ }, /* MTC0 */ | |
16729 | { instruction , 0 , 0 , 32, | |
16730 | 0xfc0003ff, 0x20000078, &NMD::MTHC0 , 0, | |
16731 | CP0_ | MVH_ }, /* MTHC0 */ | |
16732 | { reserved_block , 0 , 0 , 32, | |
16733 | 0xfc0003ff, 0x20000080, 0 , 0, | |
16734 | 0x0 }, /* _POOL32A0~*(16) */ | |
16735 | { reserved_block , 0 , 0 , 32, | |
16736 | 0xfc0003ff, 0x20000088, 0 , 0, | |
16737 | 0x0 }, /* _POOL32A0~*(17) */ | |
16738 | { instruction , 0 , 0 , 32, | |
16739 | 0xfc0003ff, 0x20000090, &NMD::SRAV , 0, | |
16740 | 0x0 }, /* SRAV */ | |
16741 | { instruction , 0 , 0 , 32, | |
16742 | 0xfc0003ff, 0x20000098, &NMD::MULU , 0, | |
16743 | 0x0 }, /* MULU */ | |
16744 | { reserved_block , 0 , 0 , 32, | |
16745 | 0xfc0003ff, 0x200000a0, 0 , 0, | |
16746 | 0x0 }, /* _POOL32A0~*(20) */ | |
16747 | { reserved_block , 0 , 0 , 32, | |
16748 | 0xfc0003ff, 0x200000a8, 0 , 0, | |
16749 | 0x0 }, /* _POOL32A0~*(21) */ | |
16750 | { instruction , 0 , 0 , 32, | |
16751 | 0xfc0003ff, 0x200000b0, &NMD::MFGC0 , 0, | |
16752 | CP0_ | VZ_ }, /* MFGC0 */ | |
16753 | { instruction , 0 , 0 , 32, | |
16754 | 0xfc0003ff, 0x200000b8, &NMD::MFHGC0 , 0, | |
16755 | CP0_ | VZ_ | MVH_ }, /* MFHGC0 */ | |
16756 | { reserved_block , 0 , 0 , 32, | |
16757 | 0xfc0003ff, 0x200000c0, 0 , 0, | |
16758 | 0x0 }, /* _POOL32A0~*(24) */ | |
16759 | { reserved_block , 0 , 0 , 32, | |
16760 | 0xfc0003ff, 0x200000c8, 0 , 0, | |
16761 | 0x0 }, /* _POOL32A0~*(25) */ | |
16762 | { instruction , 0 , 0 , 32, | |
16763 | 0xfc0003ff, 0x200000d0, &NMD::ROTRV , 0, | |
16764 | 0x0 }, /* ROTRV */ | |
16765 | { instruction , 0 , 0 , 32, | |
16766 | 0xfc0003ff, 0x200000d8, &NMD::MUHU , 0, | |
16767 | 0x0 }, /* MUHU */ | |
16768 | { reserved_block , 0 , 0 , 32, | |
16769 | 0xfc0003ff, 0x200000e0, 0 , 0, | |
16770 | 0x0 }, /* _POOL32A0~*(28) */ | |
16771 | { reserved_block , 0 , 0 , 32, | |
16772 | 0xfc0003ff, 0x200000e8, 0 , 0, | |
16773 | 0x0 }, /* _POOL32A0~*(29) */ | |
16774 | { instruction , 0 , 0 , 32, | |
16775 | 0xfc0003ff, 0x200000f0, &NMD::MTGC0 , 0, | |
16776 | CP0_ | VZ_ }, /* MTGC0 */ | |
16777 | { instruction , 0 , 0 , 32, | |
16778 | 0xfc0003ff, 0x200000f8, &NMD::MTHGC0 , 0, | |
16779 | CP0_ | VZ_ | MVH_ }, /* MTHGC0 */ | |
16780 | { reserved_block , 0 , 0 , 32, | |
16781 | 0xfc0003ff, 0x20000100, 0 , 0, | |
16782 | 0x0 }, /* _POOL32A0~*(32) */ | |
16783 | { reserved_block , 0 , 0 , 32, | |
16784 | 0xfc0003ff, 0x20000108, 0 , 0, | |
16785 | 0x0 }, /* _POOL32A0~*(33) */ | |
16786 | { instruction , 0 , 0 , 32, | |
16787 | 0xfc0003ff, 0x20000110, &NMD::ADD , 0, | |
16788 | XMMS_ }, /* ADD */ | |
16789 | { instruction , 0 , 0 , 32, | |
16790 | 0xfc0003ff, 0x20000118, &NMD::DIV , 0, | |
16791 | 0x0 }, /* DIV */ | |
16792 | { reserved_block , 0 , 0 , 32, | |
16793 | 0xfc0003ff, 0x20000120, 0 , 0, | |
16794 | 0x0 }, /* _POOL32A0~*(36) */ | |
16795 | { reserved_block , 0 , 0 , 32, | |
16796 | 0xfc0003ff, 0x20000128, 0 , 0, | |
16797 | 0x0 }, /* _POOL32A0~*(37) */ | |
16798 | { instruction , 0 , 0 , 32, | |
16799 | 0xfc0003ff, 0x20000130, &NMD::DMFC0 , 0, | |
16800 | CP0_ | MIPS64_ }, /* DMFC0 */ | |
16801 | { reserved_block , 0 , 0 , 32, | |
16802 | 0xfc0003ff, 0x20000138, 0 , 0, | |
16803 | 0x0 }, /* _POOL32A0~*(39) */ | |
16804 | { reserved_block , 0 , 0 , 32, | |
16805 | 0xfc0003ff, 0x20000140, 0 , 0, | |
16806 | 0x0 }, /* _POOL32A0~*(40) */ | |
16807 | { reserved_block , 0 , 0 , 32, | |
16808 | 0xfc0003ff, 0x20000148, 0 , 0, | |
16809 | 0x0 }, /* _POOL32A0~*(41) */ | |
16810 | { instruction , 0 , 0 , 32, | |
16811 | 0xfc0003ff, 0x20000150, &NMD::ADDU_32_ , 0, | |
16812 | 0x0 }, /* ADDU[32] */ | |
16813 | { instruction , 0 , 0 , 32, | |
16814 | 0xfc0003ff, 0x20000158, &NMD::MOD , 0, | |
16815 | 0x0 }, /* MOD */ | |
16816 | { reserved_block , 0 , 0 , 32, | |
16817 | 0xfc0003ff, 0x20000160, 0 , 0, | |
16818 | 0x0 }, /* _POOL32A0~*(44) */ | |
16819 | { reserved_block , 0 , 0 , 32, | |
16820 | 0xfc0003ff, 0x20000168, 0 , 0, | |
16821 | 0x0 }, /* _POOL32A0~*(45) */ | |
16822 | { instruction , 0 , 0 , 32, | |
16823 | 0xfc0003ff, 0x20000170, &NMD::DMTC0 , 0, | |
16824 | CP0_ | MIPS64_ }, /* DMTC0 */ | |
16825 | { reserved_block , 0 , 0 , 32, | |
16826 | 0xfc0003ff, 0x20000178, 0 , 0, | |
16827 | 0x0 }, /* _POOL32A0~*(47) */ | |
16828 | { reserved_block , 0 , 0 , 32, | |
16829 | 0xfc0003ff, 0x20000180, 0 , 0, | |
16830 | 0x0 }, /* _POOL32A0~*(48) */ | |
16831 | { reserved_block , 0 , 0 , 32, | |
16832 | 0xfc0003ff, 0x20000188, 0 , 0, | |
16833 | 0x0 }, /* _POOL32A0~*(49) */ | |
16834 | { instruction , 0 , 0 , 32, | |
16835 | 0xfc0003ff, 0x20000190, &NMD::SUB , 0, | |
16836 | XMMS_ }, /* SUB */ | |
16837 | { instruction , 0 , 0 , 32, | |
16838 | 0xfc0003ff, 0x20000198, &NMD::DIVU , 0, | |
16839 | 0x0 }, /* DIVU */ | |
16840 | { reserved_block , 0 , 0 , 32, | |
16841 | 0xfc0003ff, 0x200001a0, 0 , 0, | |
16842 | 0x0 }, /* _POOL32A0~*(52) */ | |
16843 | { reserved_block , 0 , 0 , 32, | |
16844 | 0xfc0003ff, 0x200001a8, 0 , 0, | |
16845 | 0x0 }, /* _POOL32A0~*(53) */ | |
16846 | { instruction , 0 , 0 , 32, | |
16847 | 0xfc0003ff, 0x200001b0, &NMD::DMFGC0 , 0, | |
16848 | CP0_ | MIPS64_ | VZ_}, /* DMFGC0 */ | |
16849 | { reserved_block , 0 , 0 , 32, | |
16850 | 0xfc0003ff, 0x200001b8, 0 , 0, | |
16851 | 0x0 }, /* _POOL32A0~*(55) */ | |
16852 | { instruction , 0 , 0 , 32, | |
16853 | 0xfc0003ff, 0x200001c0, &NMD::RDHWR , 0, | |
16854 | XMMS_ }, /* RDHWR */ | |
16855 | { reserved_block , 0 , 0 , 32, | |
16856 | 0xfc0003ff, 0x200001c8, 0 , 0, | |
16857 | 0x0 }, /* _POOL32A0~*(57) */ | |
16858 | { instruction , 0 , 0 , 32, | |
16859 | 0xfc0003ff, 0x200001d0, &NMD::SUBU_32_ , 0, | |
16860 | 0x0 }, /* SUBU[32] */ | |
16861 | { instruction , 0 , 0 , 32, | |
16862 | 0xfc0003ff, 0x200001d8, &NMD::MODU , 0, | |
16863 | 0x0 }, /* MODU */ | |
16864 | { reserved_block , 0 , 0 , 32, | |
16865 | 0xfc0003ff, 0x200001e0, 0 , 0, | |
16866 | 0x0 }, /* _POOL32A0~*(60) */ | |
16867 | { reserved_block , 0 , 0 , 32, | |
16868 | 0xfc0003ff, 0x200001e8, 0 , 0, | |
16869 | 0x0 }, /* _POOL32A0~*(61) */ | |
16870 | { instruction , 0 , 0 , 32, | |
16871 | 0xfc0003ff, 0x200001f0, &NMD::DMTGC0 , 0, | |
16872 | CP0_ | MIPS64_ | VZ_}, /* DMTGC0 */ | |
16873 | { reserved_block , 0 , 0 , 32, | |
16874 | 0xfc0003ff, 0x200001f8, 0 , 0, | |
16875 | 0x0 }, /* _POOL32A0~*(63) */ | |
16876 | { reserved_block , 0 , 0 , 32, | |
16877 | 0xfc0003ff, 0x20000200, 0 , 0, | |
16878 | 0x0 }, /* _POOL32A0~*(64) */ | |
16879 | { reserved_block , 0 , 0 , 32, | |
16880 | 0xfc0003ff, 0x20000208, 0 , 0, | |
16881 | 0x0 }, /* _POOL32A0~*(65) */ | |
16882 | { pool , P_CMOVE , 2 , 32, | |
16883 | 0xfc0003ff, 0x20000210, 0 , 0, | |
16884 | 0x0 }, /* P.CMOVE */ | |
16885 | { reserved_block , 0 , 0 , 32, | |
16886 | 0xfc0003ff, 0x20000218, 0 , 0, | |
16887 | 0x0 }, /* _POOL32A0~*(67) */ | |
16888 | { reserved_block , 0 , 0 , 32, | |
16889 | 0xfc0003ff, 0x20000220, 0 , 0, | |
16890 | 0x0 }, /* _POOL32A0~*(68) */ | |
16891 | { instruction , 0 , 0 , 32, | |
16892 | 0xfc0003ff, 0x20000228, &NMD::FORK , 0, | |
16893 | MT_ }, /* FORK */ | |
16894 | { instruction , 0 , 0 , 32, | |
16895 | 0xfc0003ff, 0x20000230, &NMD::MFTR , 0, | |
16896 | MT_ }, /* MFTR */ | |
16897 | { instruction , 0 , 0 , 32, | |
16898 | 0xfc0003ff, 0x20000238, &NMD::MFHTR , 0, | |
16899 | MT_ }, /* MFHTR */ | |
16900 | { reserved_block , 0 , 0 , 32, | |
16901 | 0xfc0003ff, 0x20000240, 0 , 0, | |
16902 | 0x0 }, /* _POOL32A0~*(72) */ | |
16903 | { reserved_block , 0 , 0 , 32, | |
16904 | 0xfc0003ff, 0x20000248, 0 , 0, | |
16905 | 0x0 }, /* _POOL32A0~*(73) */ | |
16906 | { instruction , 0 , 0 , 32, | |
16907 | 0xfc0003ff, 0x20000250, &NMD::AND_32_ , 0, | |
16908 | 0x0 }, /* AND[32] */ | |
16909 | { reserved_block , 0 , 0 , 32, | |
16910 | 0xfc0003ff, 0x20000258, 0 , 0, | |
16911 | 0x0 }, /* _POOL32A0~*(75) */ | |
16912 | { reserved_block , 0 , 0 , 32, | |
16913 | 0xfc0003ff, 0x20000260, 0 , 0, | |
16914 | 0x0 }, /* _POOL32A0~*(76) */ | |
16915 | { instruction , 0 , 0 , 32, | |
16916 | 0xfc0003ff, 0x20000268, &NMD::YIELD , 0, | |
16917 | MT_ }, /* YIELD */ | |
16918 | { instruction , 0 , 0 , 32, | |
16919 | 0xfc0003ff, 0x20000270, &NMD::MTTR , 0, | |
16920 | MT_ }, /* MTTR */ | |
16921 | { instruction , 0 , 0 , 32, | |
16922 | 0xfc0003ff, 0x20000278, &NMD::MTHTR , 0, | |
16923 | MT_ }, /* MTHTR */ | |
16924 | { reserved_block , 0 , 0 , 32, | |
16925 | 0xfc0003ff, 0x20000280, 0 , 0, | |
16926 | 0x0 }, /* _POOL32A0~*(80) */ | |
16927 | { reserved_block , 0 , 0 , 32, | |
16928 | 0xfc0003ff, 0x20000288, 0 , 0, | |
16929 | 0x0 }, /* _POOL32A0~*(81) */ | |
16930 | { instruction , 0 , 0 , 32, | |
16931 | 0xfc0003ff, 0x20000290, &NMD::OR_32_ , 0, | |
16932 | 0x0 }, /* OR[32] */ | |
16933 | { reserved_block , 0 , 0 , 32, | |
16934 | 0xfc0003ff, 0x20000298, 0 , 0, | |
16935 | 0x0 }, /* _POOL32A0~*(83) */ | |
16936 | { reserved_block , 0 , 0 , 32, | |
16937 | 0xfc0003ff, 0x200002a0, 0 , 0, | |
16938 | 0x0 }, /* _POOL32A0~*(84) */ | |
16939 | { reserved_block , 0 , 0 , 32, | |
16940 | 0xfc0003ff, 0x200002a8, 0 , 0, | |
16941 | 0x0 }, /* _POOL32A0~*(85) */ | |
16942 | { pool , P_MT_VPE , 8 , 32, | |
16943 | 0xfc0003ff, 0x200002b0, 0 , 0, | |
16944 | 0x0 }, /* P.MT_VPE */ | |
16945 | { reserved_block , 0 , 0 , 32, | |
16946 | 0xfc0003ff, 0x200002b8, 0 , 0, | |
16947 | 0x0 }, /* _POOL32A0~*(87) */ | |
16948 | { reserved_block , 0 , 0 , 32, | |
16949 | 0xfc0003ff, 0x200002c0, 0 , 0, | |
16950 | 0x0 }, /* _POOL32A0~*(88) */ | |
16951 | { reserved_block , 0 , 0 , 32, | |
16952 | 0xfc0003ff, 0x200002c8, 0 , 0, | |
16953 | 0x0 }, /* _POOL32A0~*(89) */ | |
16954 | { instruction , 0 , 0 , 32, | |
16955 | 0xfc0003ff, 0x200002d0, &NMD::NOR , 0, | |
16956 | 0x0 }, /* NOR */ | |
16957 | { reserved_block , 0 , 0 , 32, | |
16958 | 0xfc0003ff, 0x200002d8, 0 , 0, | |
16959 | 0x0 }, /* _POOL32A0~*(91) */ | |
16960 | { reserved_block , 0 , 0 , 32, | |
16961 | 0xfc0003ff, 0x200002e0, 0 , 0, | |
16962 | 0x0 }, /* _POOL32A0~*(92) */ | |
16963 | { reserved_block , 0 , 0 , 32, | |
16964 | 0xfc0003ff, 0x200002e8, 0 , 0, | |
16965 | 0x0 }, /* _POOL32A0~*(93) */ | |
16966 | { reserved_block , 0 , 0 , 32, | |
16967 | 0xfc0003ff, 0x200002f0, 0 , 0, | |
16968 | 0x0 }, /* _POOL32A0~*(94) */ | |
16969 | { reserved_block , 0 , 0 , 32, | |
16970 | 0xfc0003ff, 0x200002f8, 0 , 0, | |
16971 | 0x0 }, /* _POOL32A0~*(95) */ | |
16972 | { reserved_block , 0 , 0 , 32, | |
16973 | 0xfc0003ff, 0x20000300, 0 , 0, | |
16974 | 0x0 }, /* _POOL32A0~*(96) */ | |
16975 | { reserved_block , 0 , 0 , 32, | |
16976 | 0xfc0003ff, 0x20000308, 0 , 0, | |
16977 | 0x0 }, /* _POOL32A0~*(97) */ | |
16978 | { instruction , 0 , 0 , 32, | |
16979 | 0xfc0003ff, 0x20000310, &NMD::XOR_32_ , 0, | |
16980 | 0x0 }, /* XOR[32] */ | |
16981 | { reserved_block , 0 , 0 , 32, | |
16982 | 0xfc0003ff, 0x20000318, 0 , 0, | |
16983 | 0x0 }, /* _POOL32A0~*(99) */ | |
16984 | { reserved_block , 0 , 0 , 32, | |
16985 | 0xfc0003ff, 0x20000320, 0 , 0, | |
16986 | 0x0 }, /* _POOL32A0~*(100) */ | |
16987 | { reserved_block , 0 , 0 , 32, | |
16988 | 0xfc0003ff, 0x20000328, 0 , 0, | |
16989 | 0x0 }, /* _POOL32A0~*(101) */ | |
16990 | { reserved_block , 0 , 0 , 32, | |
16991 | 0xfc0003ff, 0x20000330, 0 , 0, | |
16992 | 0x0 }, /* _POOL32A0~*(102) */ | |
16993 | { reserved_block , 0 , 0 , 32, | |
16994 | 0xfc0003ff, 0x20000338, 0 , 0, | |
16995 | 0x0 }, /* _POOL32A0~*(103) */ | |
16996 | { reserved_block , 0 , 0 , 32, | |
16997 | 0xfc0003ff, 0x20000340, 0 , 0, | |
16998 | 0x0 }, /* _POOL32A0~*(104) */ | |
16999 | { reserved_block , 0 , 0 , 32, | |
17000 | 0xfc0003ff, 0x20000348, 0 , 0, | |
17001 | 0x0 }, /* _POOL32A0~*(105) */ | |
17002 | { instruction , 0 , 0 , 32, | |
17003 | 0xfc0003ff, 0x20000350, &NMD::SLT , 0, | |
17004 | 0x0 }, /* SLT */ | |
17005 | { reserved_block , 0 , 0 , 32, | |
17006 | 0xfc0003ff, 0x20000358, 0 , 0, | |
17007 | 0x0 }, /* _POOL32A0~*(107) */ | |
17008 | { reserved_block , 0 , 0 , 32, | |
17009 | 0xfc0003ff, 0x20000360, 0 , 0, | |
17010 | 0x0 }, /* _POOL32A0~*(108) */ | |
17011 | { reserved_block , 0 , 0 , 32, | |
17012 | 0xfc0003ff, 0x20000368, 0 , 0, | |
17013 | 0x0 }, /* _POOL32A0~*(109) */ | |
17014 | { reserved_block , 0 , 0 , 32, | |
17015 | 0xfc0003ff, 0x20000370, 0 , 0, | |
17016 | 0x0 }, /* _POOL32A0~*(110) */ | |
17017 | { reserved_block , 0 , 0 , 32, | |
17018 | 0xfc0003ff, 0x20000378, 0 , 0, | |
17019 | 0x0 }, /* _POOL32A0~*(111) */ | |
17020 | { reserved_block , 0 , 0 , 32, | |
17021 | 0xfc0003ff, 0x20000380, 0 , 0, | |
17022 | 0x0 }, /* _POOL32A0~*(112) */ | |
17023 | { reserved_block , 0 , 0 , 32, | |
17024 | 0xfc0003ff, 0x20000388, 0 , 0, | |
17025 | 0x0 }, /* _POOL32A0~*(113) */ | |
17026 | { pool , P_SLTU , 2 , 32, | |
17027 | 0xfc0003ff, 0x20000390, 0 , 0, | |
17028 | 0x0 }, /* P.SLTU */ | |
17029 | { reserved_block , 0 , 0 , 32, | |
17030 | 0xfc0003ff, 0x20000398, 0 , 0, | |
17031 | 0x0 }, /* _POOL32A0~*(115) */ | |
17032 | { reserved_block , 0 , 0 , 32, | |
17033 | 0xfc0003ff, 0x200003a0, 0 , 0, | |
17034 | 0x0 }, /* _POOL32A0~*(116) */ | |
17035 | { reserved_block , 0 , 0 , 32, | |
17036 | 0xfc0003ff, 0x200003a8, 0 , 0, | |
17037 | 0x0 }, /* _POOL32A0~*(117) */ | |
17038 | { reserved_block , 0 , 0 , 32, | |
17039 | 0xfc0003ff, 0x200003b0, 0 , 0, | |
17040 | 0x0 }, /* _POOL32A0~*(118) */ | |
17041 | { reserved_block , 0 , 0 , 32, | |
17042 | 0xfc0003ff, 0x200003b8, 0 , 0, | |
17043 | 0x0 }, /* _POOL32A0~*(119) */ | |
17044 | { reserved_block , 0 , 0 , 32, | |
17045 | 0xfc0003ff, 0x200003c0, 0 , 0, | |
17046 | 0x0 }, /* _POOL32A0~*(120) */ | |
17047 | { reserved_block , 0 , 0 , 32, | |
17048 | 0xfc0003ff, 0x200003c8, 0 , 0, | |
17049 | 0x0 }, /* _POOL32A0~*(121) */ | |
17050 | { instruction , 0 , 0 , 32, | |
17051 | 0xfc0003ff, 0x200003d0, &NMD::SOV , 0, | |
17052 | 0x0 }, /* SOV */ | |
17053 | { reserved_block , 0 , 0 , 32, | |
17054 | 0xfc0003ff, 0x200003d8, 0 , 0, | |
17055 | 0x0 }, /* _POOL32A0~*(123) */ | |
17056 | { reserved_block , 0 , 0 , 32, | |
17057 | 0xfc0003ff, 0x200003e0, 0 , 0, | |
17058 | 0x0 }, /* _POOL32A0~*(124) */ | |
17059 | { reserved_block , 0 , 0 , 32, | |
17060 | 0xfc0003ff, 0x200003e8, 0 , 0, | |
17061 | 0x0 }, /* _POOL32A0~*(125) */ | |
17062 | { reserved_block , 0 , 0 , 32, | |
17063 | 0xfc0003ff, 0x200003f0, 0 , 0, | |
17064 | 0x0 }, /* _POOL32A0~*(126) */ | |
17065 | { reserved_block , 0 , 0 , 32, | |
17066 | 0xfc0003ff, 0x200003f8, 0 , 0, | |
17067 | 0x0 }, /* _POOL32A0~*(127) */ | |
17068 | }; | |
17069 | ||
17070 | ||
17071 | NMD::Pool NMD::ADDQ__S__PH[2] = { | |
17072 | { instruction , 0 , 0 , 32, | |
17073 | 0xfc0007ff, 0x2000000d, &NMD::ADDQ_PH , 0, | |
17074 | DSP_ }, /* ADDQ.PH */ | |
17075 | { instruction , 0 , 0 , 32, | |
17076 | 0xfc0007ff, 0x2000040d, &NMD::ADDQ_S_PH , 0, | |
17077 | DSP_ }, /* ADDQ_S.PH */ | |
17078 | }; | |
17079 | ||
17080 | ||
17081 | NMD::Pool NMD::MUL__S__PH[2] = { | |
17082 | { instruction , 0 , 0 , 32, | |
17083 | 0xfc0007ff, 0x2000002d, &NMD::MUL_PH , 0, | |
17084 | DSP_ }, /* MUL.PH */ | |
17085 | { instruction , 0 , 0 , 32, | |
17086 | 0xfc0007ff, 0x2000042d, &NMD::MUL_S_PH , 0, | |
17087 | DSP_ }, /* MUL_S.PH */ | |
17088 | }; | |
17089 | ||
17090 | ||
17091 | NMD::Pool NMD::ADDQH__R__PH[2] = { | |
17092 | { instruction , 0 , 0 , 32, | |
17093 | 0xfc0007ff, 0x2000004d, &NMD::ADDQH_PH , 0, | |
17094 | DSP_ }, /* ADDQH.PH */ | |
17095 | { instruction , 0 , 0 , 32, | |
17096 | 0xfc0007ff, 0x2000044d, &NMD::ADDQH_R_PH , 0, | |
17097 | DSP_ }, /* ADDQH_R.PH */ | |
17098 | }; | |
17099 | ||
17100 | ||
17101 | NMD::Pool NMD::ADDQH__R__W[2] = { | |
17102 | { instruction , 0 , 0 , 32, | |
17103 | 0xfc0007ff, 0x2000008d, &NMD::ADDQH_W , 0, | |
17104 | DSP_ }, /* ADDQH.W */ | |
17105 | { instruction , 0 , 0 , 32, | |
17106 | 0xfc0007ff, 0x2000048d, &NMD::ADDQH_R_W , 0, | |
17107 | DSP_ }, /* ADDQH_R.W */ | |
17108 | }; | |
17109 | ||
17110 | ||
17111 | NMD::Pool NMD::ADDU__S__QB[2] = { | |
17112 | { instruction , 0 , 0 , 32, | |
17113 | 0xfc0007ff, 0x200000cd, &NMD::ADDU_QB , 0, | |
17114 | DSP_ }, /* ADDU.QB */ | |
17115 | { instruction , 0 , 0 , 32, | |
17116 | 0xfc0007ff, 0x200004cd, &NMD::ADDU_S_QB , 0, | |
17117 | DSP_ }, /* ADDU_S.QB */ | |
17118 | }; | |
17119 | ||
17120 | ||
17121 | NMD::Pool NMD::ADDU__S__PH[2] = { | |
17122 | { instruction , 0 , 0 , 32, | |
17123 | 0xfc0007ff, 0x2000010d, &NMD::ADDU_PH , 0, | |
17124 | DSP_ }, /* ADDU.PH */ | |
17125 | { instruction , 0 , 0 , 32, | |
17126 | 0xfc0007ff, 0x2000050d, &NMD::ADDU_S_PH , 0, | |
17127 | DSP_ }, /* ADDU_S.PH */ | |
17128 | }; | |
17129 | ||
17130 | ||
17131 | NMD::Pool NMD::ADDUH__R__QB[2] = { | |
17132 | { instruction , 0 , 0 , 32, | |
17133 | 0xfc0007ff, 0x2000014d, &NMD::ADDUH_QB , 0, | |
17134 | DSP_ }, /* ADDUH.QB */ | |
17135 | { instruction , 0 , 0 , 32, | |
17136 | 0xfc0007ff, 0x2000054d, &NMD::ADDUH_R_QB , 0, | |
17137 | DSP_ }, /* ADDUH_R.QB */ | |
17138 | }; | |
17139 | ||
17140 | ||
17141 | NMD::Pool NMD::SHRAV__R__PH[2] = { | |
17142 | { instruction , 0 , 0 , 32, | |
17143 | 0xfc0007ff, 0x2000018d, &NMD::SHRAV_PH , 0, | |
17144 | DSP_ }, /* SHRAV.PH */ | |
17145 | { instruction , 0 , 0 , 32, | |
17146 | 0xfc0007ff, 0x2000058d, &NMD::SHRAV_R_PH , 0, | |
17147 | DSP_ }, /* SHRAV_R.PH */ | |
17148 | }; | |
17149 | ||
17150 | ||
17151 | NMD::Pool NMD::SHRAV__R__QB[2] = { | |
17152 | { instruction , 0 , 0 , 32, | |
17153 | 0xfc0007ff, 0x200001cd, &NMD::SHRAV_QB , 0, | |
17154 | DSP_ }, /* SHRAV.QB */ | |
17155 | { instruction , 0 , 0 , 32, | |
17156 | 0xfc0007ff, 0x200005cd, &NMD::SHRAV_R_QB , 0, | |
17157 | DSP_ }, /* SHRAV_R.QB */ | |
17158 | }; | |
17159 | ||
17160 | ||
17161 | NMD::Pool NMD::SUBQ__S__PH[2] = { | |
17162 | { instruction , 0 , 0 , 32, | |
17163 | 0xfc0007ff, 0x2000020d, &NMD::SUBQ_PH , 0, | |
17164 | DSP_ }, /* SUBQ.PH */ | |
17165 | { instruction , 0 , 0 , 32, | |
17166 | 0xfc0007ff, 0x2000060d, &NMD::SUBQ_S_PH , 0, | |
17167 | DSP_ }, /* SUBQ_S.PH */ | |
17168 | }; | |
17169 | ||
17170 | ||
17171 | NMD::Pool NMD::SUBQH__R__PH[2] = { | |
17172 | { instruction , 0 , 0 , 32, | |
17173 | 0xfc0007ff, 0x2000024d, &NMD::SUBQH_PH , 0, | |
17174 | DSP_ }, /* SUBQH.PH */ | |
17175 | { instruction , 0 , 0 , 32, | |
17176 | 0xfc0007ff, 0x2000064d, &NMD::SUBQH_R_PH , 0, | |
17177 | DSP_ }, /* SUBQH_R.PH */ | |
17178 | }; | |
17179 | ||
17180 | ||
17181 | NMD::Pool NMD::SUBQH__R__W[2] = { | |
17182 | { instruction , 0 , 0 , 32, | |
17183 | 0xfc0007ff, 0x2000028d, &NMD::SUBQH_W , 0, | |
17184 | DSP_ }, /* SUBQH.W */ | |
17185 | { instruction , 0 , 0 , 32, | |
17186 | 0xfc0007ff, 0x2000068d, &NMD::SUBQH_R_W , 0, | |
17187 | DSP_ }, /* SUBQH_R.W */ | |
17188 | }; | |
17189 | ||
17190 | ||
17191 | NMD::Pool NMD::SUBU__S__QB[2] = { | |
17192 | { instruction , 0 , 0 , 32, | |
17193 | 0xfc0007ff, 0x200002cd, &NMD::SUBU_QB , 0, | |
17194 | DSP_ }, /* SUBU.QB */ | |
17195 | { instruction , 0 , 0 , 32, | |
17196 | 0xfc0007ff, 0x200006cd, &NMD::SUBU_S_QB , 0, | |
17197 | DSP_ }, /* SUBU_S.QB */ | |
17198 | }; | |
17199 | ||
17200 | ||
17201 | NMD::Pool NMD::SUBU__S__PH[2] = { | |
17202 | { instruction , 0 , 0 , 32, | |
17203 | 0xfc0007ff, 0x2000030d, &NMD::SUBU_PH , 0, | |
17204 | DSP_ }, /* SUBU.PH */ | |
17205 | { instruction , 0 , 0 , 32, | |
17206 | 0xfc0007ff, 0x2000070d, &NMD::SUBU_S_PH , 0, | |
17207 | DSP_ }, /* SUBU_S.PH */ | |
17208 | }; | |
17209 | ||
17210 | ||
17211 | NMD::Pool NMD::SHRA__R__PH[2] = { | |
17212 | { instruction , 0 , 0 , 32, | |
17213 | 0xfc0007ff, 0x20000335, &NMD::SHRA_PH , 0, | |
17214 | DSP_ }, /* SHRA.PH */ | |
17215 | { instruction , 0 , 0 , 32, | |
17216 | 0xfc0007ff, 0x20000735, &NMD::SHRA_R_PH , 0, | |
17217 | DSP_ }, /* SHRA_R.PH */ | |
17218 | }; | |
17219 | ||
17220 | ||
17221 | NMD::Pool NMD::SUBUH__R__QB[2] = { | |
17222 | { instruction , 0 , 0 , 32, | |
17223 | 0xfc0007ff, 0x2000034d, &NMD::SUBUH_QB , 0, | |
17224 | DSP_ }, /* SUBUH.QB */ | |
17225 | { instruction , 0 , 0 , 32, | |
17226 | 0xfc0007ff, 0x2000074d, &NMD::SUBUH_R_QB , 0, | |
17227 | DSP_ }, /* SUBUH_R.QB */ | |
17228 | }; | |
17229 | ||
17230 | ||
17231 | NMD::Pool NMD::SHLLV__S__PH[2] = { | |
17232 | { instruction , 0 , 0 , 32, | |
17233 | 0xfc0007ff, 0x2000038d, &NMD::SHLLV_PH , 0, | |
17234 | DSP_ }, /* SHLLV.PH */ | |
17235 | { instruction , 0 , 0 , 32, | |
17236 | 0xfc0007ff, 0x2000078d, &NMD::SHLLV_S_PH , 0, | |
17237 | DSP_ }, /* SHLLV_S.PH */ | |
17238 | }; | |
17239 | ||
17240 | ||
17241 | NMD::Pool NMD::SHLL__S__PH[4] = { | |
17242 | { instruction , 0 , 0 , 32, | |
17243 | 0xfc000fff, 0x200003b5, &NMD::SHLL_PH , 0, | |
17244 | DSP_ }, /* SHLL.PH */ | |
17245 | { reserved_block , 0 , 0 , 32, | |
17246 | 0xfc000fff, 0x200007b5, 0 , 0, | |
17247 | 0x0 }, /* SHLL[_S].PH~*(1) */ | |
17248 | { instruction , 0 , 0 , 32, | |
17249 | 0xfc000fff, 0x20000bb5, &NMD::SHLL_S_PH , 0, | |
17250 | DSP_ }, /* SHLL_S.PH */ | |
17251 | { reserved_block , 0 , 0 , 32, | |
17252 | 0xfc000fff, 0x20000fb5, 0 , 0, | |
17253 | 0x0 }, /* SHLL[_S].PH~*(3) */ | |
17254 | }; | |
17255 | ||
17256 | ||
17257 | NMD::Pool NMD::PRECR_SRA__R__PH_W[2] = { | |
17258 | { instruction , 0 , 0 , 32, | |
17259 | 0xfc0007ff, 0x200003cd, &NMD::PRECR_SRA_PH_W , 0, | |
17260 | DSP_ }, /* PRECR_SRA.PH.W */ | |
17261 | { instruction , 0 , 0 , 32, | |
17262 | 0xfc0007ff, 0x200007cd, &NMD::PRECR_SRA_R_PH_W , 0, | |
17263 | DSP_ }, /* PRECR_SRA_R.PH.W */ | |
17264 | }; | |
17265 | ||
17266 | ||
17267 | NMD::Pool NMD::_POOL32A5[128] = { | |
17268 | { instruction , 0 , 0 , 32, | |
17269 | 0xfc0003ff, 0x20000005, &NMD::CMP_EQ_PH , 0, | |
17270 | DSP_ }, /* CMP.EQ.PH */ | |
17271 | { pool , ADDQ__S__PH , 2 , 32, | |
17272 | 0xfc0003ff, 0x2000000d, 0 , 0, | |
17273 | 0x0 }, /* ADDQ[_S].PH */ | |
17274 | { reserved_block , 0 , 0 , 32, | |
17275 | 0xfc0003ff, 0x20000015, 0 , 0, | |
17276 | 0x0 }, /* _POOL32A5~*(2) */ | |
17277 | { instruction , 0 , 0 , 32, | |
17278 | 0xfc0003ff, 0x2000001d, &NMD::SHILO , 0, | |
17279 | DSP_ }, /* SHILO */ | |
17280 | { instruction , 0 , 0 , 32, | |
17281 | 0xfc0003ff, 0x20000025, &NMD::MULEQ_S_W_PHL , 0, | |
17282 | DSP_ }, /* MULEQ_S.W.PHL */ | |
17283 | { pool , MUL__S__PH , 2 , 32, | |
17284 | 0xfc0003ff, 0x2000002d, 0 , 0, | |
17285 | 0x0 }, /* MUL[_S].PH */ | |
17286 | { reserved_block , 0 , 0 , 32, | |
17287 | 0xfc0003ff, 0x20000035, 0 , 0, | |
17288 | 0x0 }, /* _POOL32A5~*(6) */ | |
17289 | { instruction , 0 , 0 , 32, | |
17290 | 0xfc0003ff, 0x2000003d, &NMD::REPL_PH , 0, | |
17291 | DSP_ }, /* REPL.PH */ | |
17292 | { instruction , 0 , 0 , 32, | |
17293 | 0xfc0003ff, 0x20000045, &NMD::CMP_LT_PH , 0, | |
17294 | DSP_ }, /* CMP.LT.PH */ | |
17295 | { pool , ADDQH__R__PH , 2 , 32, | |
17296 | 0xfc0003ff, 0x2000004d, 0 , 0, | |
17297 | 0x0 }, /* ADDQH[_R].PH */ | |
17298 | { reserved_block , 0 , 0 , 32, | |
17299 | 0xfc0003ff, 0x20000055, 0 , 0, | |
17300 | 0x0 }, /* _POOL32A5~*(10) */ | |
17301 | { reserved_block , 0 , 0 , 32, | |
17302 | 0xfc0003ff, 0x2000005d, 0 , 0, | |
17303 | 0x0 }, /* _POOL32A5~*(11) */ | |
17304 | { instruction , 0 , 0 , 32, | |
17305 | 0xfc0003ff, 0x20000065, &NMD::MULEQ_S_W_PHR , 0, | |
17306 | DSP_ }, /* MULEQ_S.W.PHR */ | |
17307 | { instruction , 0 , 0 , 32, | |
17308 | 0xfc0003ff, 0x2000006d, &NMD::PRECR_QB_PH , 0, | |
17309 | DSP_ }, /* PRECR.QB.PH */ | |
17310 | { reserved_block , 0 , 0 , 32, | |
17311 | 0xfc0003ff, 0x20000075, 0 , 0, | |
17312 | 0x0 }, /* _POOL32A5~*(14) */ | |
17313 | { reserved_block , 0 , 0 , 32, | |
17314 | 0xfc0003ff, 0x2000007d, 0 , 0, | |
17315 | 0x0 }, /* _POOL32A5~*(15) */ | |
17316 | { instruction , 0 , 0 , 32, | |
17317 | 0xfc0003ff, 0x20000085, &NMD::CMP_LE_PH , 0, | |
17318 | DSP_ }, /* CMP.LE.PH */ | |
17319 | { pool , ADDQH__R__W , 2 , 32, | |
17320 | 0xfc0003ff, 0x2000008d, 0 , 0, | |
17321 | 0x0 }, /* ADDQH[_R].W */ | |
17322 | { instruction , 0 , 0 , 32, | |
17323 | 0xfc0003ff, 0x20000095, &NMD::MULEU_S_PH_QBL , 0, | |
17324 | DSP_ }, /* MULEU_S.PH.QBL */ | |
17325 | { reserved_block , 0 , 0 , 32, | |
17326 | 0xfc0003ff, 0x2000009d, 0 , 0, | |
17327 | 0x0 }, /* _POOL32A5~*(19) */ | |
17328 | { reserved_block , 0 , 0 , 32, | |
17329 | 0xfc0003ff, 0x200000a5, 0 , 0, | |
17330 | 0x0 }, /* _POOL32A5~*(20) */ | |
17331 | { instruction , 0 , 0 , 32, | |
17332 | 0xfc0003ff, 0x200000ad, &NMD::PRECRQ_QB_PH , 0, | |
17333 | DSP_ }, /* PRECRQ.QB.PH */ | |
17334 | { reserved_block , 0 , 0 , 32, | |
17335 | 0xfc0003ff, 0x200000b5, 0 , 0, | |
17336 | 0x0 }, /* _POOL32A5~*(22) */ | |
17337 | { reserved_block , 0 , 0 , 32, | |
17338 | 0xfc0003ff, 0x200000bd, 0 , 0, | |
17339 | 0x0 }, /* _POOL32A5~*(23) */ | |
17340 | { instruction , 0 , 0 , 32, | |
17341 | 0xfc0003ff, 0x200000c5, &NMD::CMPGU_EQ_QB , 0, | |
17342 | DSP_ }, /* CMPGU.EQ.QB */ | |
17343 | { pool , ADDU__S__QB , 2 , 32, | |
17344 | 0xfc0003ff, 0x200000cd, 0 , 0, | |
17345 | 0x0 }, /* ADDU[_S].QB */ | |
17346 | { instruction , 0 , 0 , 32, | |
17347 | 0xfc0003ff, 0x200000d5, &NMD::MULEU_S_PH_QBR , 0, | |
17348 | DSP_ }, /* MULEU_S.PH.QBR */ | |
17349 | { reserved_block , 0 , 0 , 32, | |
17350 | 0xfc0003ff, 0x200000dd, 0 , 0, | |
17351 | 0x0 }, /* _POOL32A5~*(27) */ | |
17352 | { reserved_block , 0 , 0 , 32, | |
17353 | 0xfc0003ff, 0x200000e5, 0 , 0, | |
17354 | 0x0 }, /* _POOL32A5~*(28) */ | |
17355 | { instruction , 0 , 0 , 32, | |
17356 | 0xfc0003ff, 0x200000ed, &NMD::PRECRQ_PH_W , 0, | |
17357 | DSP_ }, /* PRECRQ.PH.W */ | |
17358 | { reserved_block , 0 , 0 , 32, | |
17359 | 0xfc0003ff, 0x200000f5, 0 , 0, | |
17360 | 0x0 }, /* _POOL32A5~*(30) */ | |
17361 | { reserved_block , 0 , 0 , 32, | |
17362 | 0xfc0003ff, 0x200000fd, 0 , 0, | |
17363 | 0x0 }, /* _POOL32A5~*(31) */ | |
17364 | { instruction , 0 , 0 , 32, | |
17365 | 0xfc0003ff, 0x20000105, &NMD::CMPGU_LT_QB , 0, | |
17366 | DSP_ }, /* CMPGU.LT.QB */ | |
17367 | { pool , ADDU__S__PH , 2 , 32, | |
17368 | 0xfc0003ff, 0x2000010d, 0 , 0, | |
17369 | 0x0 }, /* ADDU[_S].PH */ | |
17370 | { instruction , 0 , 0 , 32, | |
17371 | 0xfc0003ff, 0x20000115, &NMD::MULQ_RS_PH , 0, | |
17372 | DSP_ }, /* MULQ_RS.PH */ | |
17373 | { reserved_block , 0 , 0 , 32, | |
17374 | 0xfc0003ff, 0x2000011d, 0 , 0, | |
17375 | 0x0 }, /* _POOL32A5~*(35) */ | |
17376 | { reserved_block , 0 , 0 , 32, | |
17377 | 0xfc0003ff, 0x20000125, 0 , 0, | |
17378 | 0x0 }, /* _POOL32A5~*(36) */ | |
17379 | { instruction , 0 , 0 , 32, | |
17380 | 0xfc0003ff, 0x2000012d, &NMD::PRECRQ_RS_PH_W , 0, | |
17381 | DSP_ }, /* PRECRQ_RS.PH.W */ | |
17382 | { reserved_block , 0 , 0 , 32, | |
17383 | 0xfc0003ff, 0x20000135, 0 , 0, | |
17384 | 0x0 }, /* _POOL32A5~*(38) */ | |
17385 | { reserved_block , 0 , 0 , 32, | |
17386 | 0xfc0003ff, 0x2000013d, 0 , 0, | |
17387 | 0x0 }, /* _POOL32A5~*(39) */ | |
17388 | { instruction , 0 , 0 , 32, | |
17389 | 0xfc0003ff, 0x20000145, &NMD::CMPGU_LE_QB , 0, | |
17390 | DSP_ }, /* CMPGU.LE.QB */ | |
17391 | { pool , ADDUH__R__QB , 2 , 32, | |
17392 | 0xfc0003ff, 0x2000014d, 0 , 0, | |
17393 | 0x0 }, /* ADDUH[_R].QB */ | |
17394 | { instruction , 0 , 0 , 32, | |
17395 | 0xfc0003ff, 0x20000155, &NMD::MULQ_S_PH , 0, | |
17396 | DSP_ }, /* MULQ_S.PH */ | |
17397 | { reserved_block , 0 , 0 , 32, | |
17398 | 0xfc0003ff, 0x2000015d, 0 , 0, | |
17399 | 0x0 }, /* _POOL32A5~*(43) */ | |
17400 | { reserved_block , 0 , 0 , 32, | |
17401 | 0xfc0003ff, 0x20000165, 0 , 0, | |
17402 | 0x0 }, /* _POOL32A5~*(44) */ | |
17403 | { instruction , 0 , 0 , 32, | |
17404 | 0xfc0003ff, 0x2000016d, &NMD::PRECRQU_S_QB_PH , 0, | |
17405 | DSP_ }, /* PRECRQU_S.QB.PH */ | |
17406 | { reserved_block , 0 , 0 , 32, | |
17407 | 0xfc0003ff, 0x20000175, 0 , 0, | |
17408 | 0x0 }, /* _POOL32A5~*(46) */ | |
17409 | { reserved_block , 0 , 0 , 32, | |
17410 | 0xfc0003ff, 0x2000017d, 0 , 0, | |
17411 | 0x0 }, /* _POOL32A5~*(47) */ | |
17412 | { instruction , 0 , 0 , 32, | |
17413 | 0xfc0003ff, 0x20000185, &NMD::CMPGDU_EQ_QB , 0, | |
17414 | DSP_ }, /* CMPGDU.EQ.QB */ | |
17415 | { pool , SHRAV__R__PH , 2 , 32, | |
17416 | 0xfc0003ff, 0x2000018d, 0 , 0, | |
17417 | 0x0 }, /* SHRAV[_R].PH */ | |
17418 | { instruction , 0 , 0 , 32, | |
17419 | 0xfc0003ff, 0x20000195, &NMD::MULQ_RS_W , 0, | |
17420 | DSP_ }, /* MULQ_RS.W */ | |
17421 | { reserved_block , 0 , 0 , 32, | |
17422 | 0xfc0003ff, 0x2000019d, 0 , 0, | |
17423 | 0x0 }, /* _POOL32A5~*(51) */ | |
17424 | { reserved_block , 0 , 0 , 32, | |
17425 | 0xfc0003ff, 0x200001a5, 0 , 0, | |
17426 | 0x0 }, /* _POOL32A5~*(52) */ | |
17427 | { instruction , 0 , 0 , 32, | |
17428 | 0xfc0003ff, 0x200001ad, &NMD::PACKRL_PH , 0, | |
17429 | DSP_ }, /* PACKRL.PH */ | |
17430 | { reserved_block , 0 , 0 , 32, | |
17431 | 0xfc0003ff, 0x200001b5, 0 , 0, | |
17432 | 0x0 }, /* _POOL32A5~*(54) */ | |
17433 | { reserved_block , 0 , 0 , 32, | |
17434 | 0xfc0003ff, 0x200001bd, 0 , 0, | |
17435 | 0x0 }, /* _POOL32A5~*(55) */ | |
17436 | { instruction , 0 , 0 , 32, | |
17437 | 0xfc0003ff, 0x200001c5, &NMD::CMPGDU_LT_QB , 0, | |
17438 | DSP_ }, /* CMPGDU.LT.QB */ | |
17439 | { pool , SHRAV__R__QB , 2 , 32, | |
17440 | 0xfc0003ff, 0x200001cd, 0 , 0, | |
17441 | 0x0 }, /* SHRAV[_R].QB */ | |
17442 | { instruction , 0 , 0 , 32, | |
17443 | 0xfc0003ff, 0x200001d5, &NMD::MULQ_S_W , 0, | |
17444 | DSP_ }, /* MULQ_S.W */ | |
17445 | { reserved_block , 0 , 0 , 32, | |
17446 | 0xfc0003ff, 0x200001dd, 0 , 0, | |
17447 | 0x0 }, /* _POOL32A5~*(59) */ | |
17448 | { reserved_block , 0 , 0 , 32, | |
17449 | 0xfc0003ff, 0x200001e5, 0 , 0, | |
17450 | 0x0 }, /* _POOL32A5~*(60) */ | |
17451 | { instruction , 0 , 0 , 32, | |
17452 | 0xfc0003ff, 0x200001ed, &NMD::PICK_QB , 0, | |
17453 | DSP_ }, /* PICK.QB */ | |
17454 | { reserved_block , 0 , 0 , 32, | |
17455 | 0xfc0003ff, 0x200001f5, 0 , 0, | |
17456 | 0x0 }, /* _POOL32A5~*(62) */ | |
17457 | { reserved_block , 0 , 0 , 32, | |
17458 | 0xfc0003ff, 0x200001fd, 0 , 0, | |
17459 | 0x0 }, /* _POOL32A5~*(63) */ | |
17460 | { instruction , 0 , 0 , 32, | |
17461 | 0xfc0003ff, 0x20000205, &NMD::CMPGDU_LE_QB , 0, | |
17462 | DSP_ }, /* CMPGDU.LE.QB */ | |
17463 | { pool , SUBQ__S__PH , 2 , 32, | |
17464 | 0xfc0003ff, 0x2000020d, 0 , 0, | |
17465 | 0x0 }, /* SUBQ[_S].PH */ | |
17466 | { instruction , 0 , 0 , 32, | |
17467 | 0xfc0003ff, 0x20000215, &NMD::APPEND , 0, | |
17468 | DSP_ }, /* APPEND */ | |
17469 | { reserved_block , 0 , 0 , 32, | |
17470 | 0xfc0003ff, 0x2000021d, 0 , 0, | |
17471 | 0x0 }, /* _POOL32A5~*(67) */ | |
17472 | { reserved_block , 0 , 0 , 32, | |
17473 | 0xfc0003ff, 0x20000225, 0 , 0, | |
17474 | 0x0 }, /* _POOL32A5~*(68) */ | |
17475 | { instruction , 0 , 0 , 32, | |
17476 | 0xfc0003ff, 0x2000022d, &NMD::PICK_PH , 0, | |
17477 | DSP_ }, /* PICK.PH */ | |
17478 | { reserved_block , 0 , 0 , 32, | |
17479 | 0xfc0003ff, 0x20000235, 0 , 0, | |
17480 | 0x0 }, /* _POOL32A5~*(70) */ | |
17481 | { reserved_block , 0 , 0 , 32, | |
17482 | 0xfc0003ff, 0x2000023d, 0 , 0, | |
17483 | 0x0 }, /* _POOL32A5~*(71) */ | |
17484 | { instruction , 0 , 0 , 32, | |
17485 | 0xfc0003ff, 0x20000245, &NMD::CMPU_EQ_QB , 0, | |
17486 | DSP_ }, /* CMPU.EQ.QB */ | |
17487 | { pool , SUBQH__R__PH , 2 , 32, | |
17488 | 0xfc0003ff, 0x2000024d, 0 , 0, | |
17489 | 0x0 }, /* SUBQH[_R].PH */ | |
17490 | { instruction , 0 , 0 , 32, | |
17491 | 0xfc0003ff, 0x20000255, &NMD::PREPEND , 0, | |
17492 | DSP_ }, /* PREPEND */ | |
17493 | { reserved_block , 0 , 0 , 32, | |
17494 | 0xfc0003ff, 0x2000025d, 0 , 0, | |
17495 | 0x0 }, /* _POOL32A5~*(75) */ | |
17496 | { reserved_block , 0 , 0 , 32, | |
17497 | 0xfc0003ff, 0x20000265, 0 , 0, | |
17498 | 0x0 }, /* _POOL32A5~*(76) */ | |
17499 | { reserved_block , 0 , 0 , 32, | |
17500 | 0xfc0003ff, 0x2000026d, 0 , 0, | |
17501 | 0x0 }, /* _POOL32A5~*(77) */ | |
17502 | { reserved_block , 0 , 0 , 32, | |
17503 | 0xfc0003ff, 0x20000275, 0 , 0, | |
17504 | 0x0 }, /* _POOL32A5~*(78) */ | |
17505 | { reserved_block , 0 , 0 , 32, | |
17506 | 0xfc0003ff, 0x2000027d, 0 , 0, | |
17507 | 0x0 }, /* _POOL32A5~*(79) */ | |
17508 | { instruction , 0 , 0 , 32, | |
17509 | 0xfc0003ff, 0x20000285, &NMD::CMPU_LT_QB , 0, | |
17510 | DSP_ }, /* CMPU.LT.QB */ | |
17511 | { pool , SUBQH__R__W , 2 , 32, | |
17512 | 0xfc0003ff, 0x2000028d, 0 , 0, | |
17513 | 0x0 }, /* SUBQH[_R].W */ | |
17514 | { instruction , 0 , 0 , 32, | |
17515 | 0xfc0003ff, 0x20000295, &NMD::MODSUB , 0, | |
17516 | DSP_ }, /* MODSUB */ | |
17517 | { reserved_block , 0 , 0 , 32, | |
17518 | 0xfc0003ff, 0x2000029d, 0 , 0, | |
17519 | 0x0 }, /* _POOL32A5~*(83) */ | |
17520 | { reserved_block , 0 , 0 , 32, | |
17521 | 0xfc0003ff, 0x200002a5, 0 , 0, | |
17522 | 0x0 }, /* _POOL32A5~*(84) */ | |
17523 | { reserved_block , 0 , 0 , 32, | |
17524 | 0xfc0003ff, 0x200002ad, 0 , 0, | |
17525 | 0x0 }, /* _POOL32A5~*(85) */ | |
17526 | { reserved_block , 0 , 0 , 32, | |
17527 | 0xfc0003ff, 0x200002b5, 0 , 0, | |
17528 | 0x0 }, /* _POOL32A5~*(86) */ | |
17529 | { reserved_block , 0 , 0 , 32, | |
17530 | 0xfc0003ff, 0x200002bd, 0 , 0, | |
17531 | 0x0 }, /* _POOL32A5~*(87) */ | |
17532 | { instruction , 0 , 0 , 32, | |
17533 | 0xfc0003ff, 0x200002c5, &NMD::CMPU_LE_QB , 0, | |
17534 | DSP_ }, /* CMPU.LE.QB */ | |
17535 | { pool , SUBU__S__QB , 2 , 32, | |
17536 | 0xfc0003ff, 0x200002cd, 0 , 0, | |
17537 | 0x0 }, /* SUBU[_S].QB */ | |
17538 | { instruction , 0 , 0 , 32, | |
17539 | 0xfc0003ff, 0x200002d5, &NMD::SHRAV_R_W , 0, | |
17540 | DSP_ }, /* SHRAV_R.W */ | |
17541 | { reserved_block , 0 , 0 , 32, | |
17542 | 0xfc0003ff, 0x200002dd, 0 , 0, | |
17543 | 0x0 }, /* _POOL32A5~*(91) */ | |
17544 | { reserved_block , 0 , 0 , 32, | |
17545 | 0xfc0003ff, 0x200002e5, 0 , 0, | |
17546 | 0x0 }, /* _POOL32A5~*(92) */ | |
17547 | { reserved_block , 0 , 0 , 32, | |
17548 | 0xfc0003ff, 0x200002ed, 0 , 0, | |
17549 | 0x0 }, /* _POOL32A5~*(93) */ | |
17550 | { instruction , 0 , 0 , 32, | |
17551 | 0xfc0003ff, 0x200002f5, &NMD::SHRA_R_W , 0, | |
17552 | DSP_ }, /* SHRA_R.W */ | |
17553 | { reserved_block , 0 , 0 , 32, | |
17554 | 0xfc0003ff, 0x200002fd, 0 , 0, | |
17555 | 0x0 }, /* _POOL32A5~*(95) */ | |
17556 | { instruction , 0 , 0 , 32, | |
17557 | 0xfc0003ff, 0x20000305, &NMD::ADDQ_S_W , 0, | |
17558 | DSP_ }, /* ADDQ_S.W */ | |
17559 | { pool , SUBU__S__PH , 2 , 32, | |
17560 | 0xfc0003ff, 0x2000030d, 0 , 0, | |
17561 | 0x0 }, /* SUBU[_S].PH */ | |
17562 | { instruction , 0 , 0 , 32, | |
17563 | 0xfc0003ff, 0x20000315, &NMD::SHRLV_PH , 0, | |
17564 | DSP_ }, /* SHRLV.PH */ | |
17565 | { reserved_block , 0 , 0 , 32, | |
17566 | 0xfc0003ff, 0x2000031d, 0 , 0, | |
17567 | 0x0 }, /* _POOL32A5~*(99) */ | |
17568 | { reserved_block , 0 , 0 , 32, | |
17569 | 0xfc0003ff, 0x20000325, 0 , 0, | |
17570 | 0x0 }, /* _POOL32A5~*(100) */ | |
17571 | { reserved_block , 0 , 0 , 32, | |
17572 | 0xfc0003ff, 0x2000032d, 0 , 0, | |
17573 | 0x0 }, /* _POOL32A5~*(101) */ | |
17574 | { pool , SHRA__R__PH , 2 , 32, | |
17575 | 0xfc0003ff, 0x20000335, 0 , 0, | |
17576 | 0x0 }, /* SHRA[_R].PH */ | |
17577 | { reserved_block , 0 , 0 , 32, | |
17578 | 0xfc0003ff, 0x2000033d, 0 , 0, | |
17579 | 0x0 }, /* _POOL32A5~*(103) */ | |
17580 | { instruction , 0 , 0 , 32, | |
17581 | 0xfc0003ff, 0x20000345, &NMD::SUBQ_S_W , 0, | |
17582 | DSP_ }, /* SUBQ_S.W */ | |
17583 | { pool , SUBUH__R__QB , 2 , 32, | |
17584 | 0xfc0003ff, 0x2000034d, 0 , 0, | |
17585 | 0x0 }, /* SUBUH[_R].QB */ | |
17586 | { instruction , 0 , 0 , 32, | |
17587 | 0xfc0003ff, 0x20000355, &NMD::SHRLV_QB , 0, | |
17588 | DSP_ }, /* SHRLV.QB */ | |
17589 | { reserved_block , 0 , 0 , 32, | |
17590 | 0xfc0003ff, 0x2000035d, 0 , 0, | |
17591 | 0x0 }, /* _POOL32A5~*(107) */ | |
17592 | { reserved_block , 0 , 0 , 32, | |
17593 | 0xfc0003ff, 0x20000365, 0 , 0, | |
17594 | 0x0 }, /* _POOL32A5~*(108) */ | |
17595 | { reserved_block , 0 , 0 , 32, | |
17596 | 0xfc0003ff, 0x2000036d, 0 , 0, | |
17597 | 0x0 }, /* _POOL32A5~*(109) */ | |
17598 | { reserved_block , 0 , 0 , 32, | |
17599 | 0xfc0003ff, 0x20000375, 0 , 0, | |
17600 | 0x0 }, /* _POOL32A5~*(110) */ | |
17601 | { reserved_block , 0 , 0 , 32, | |
17602 | 0xfc0003ff, 0x2000037d, 0 , 0, | |
17603 | 0x0 }, /* _POOL32A5~*(111) */ | |
17604 | { instruction , 0 , 0 , 32, | |
17605 | 0xfc0003ff, 0x20000385, &NMD::ADDSC , 0, | |
17606 | DSP_ }, /* ADDSC */ | |
17607 | { pool , SHLLV__S__PH , 2 , 32, | |
17608 | 0xfc0003ff, 0x2000038d, 0 , 0, | |
17609 | 0x0 }, /* SHLLV[_S].PH */ | |
17610 | { instruction , 0 , 0 , 32, | |
17611 | 0xfc0003ff, 0x20000395, &NMD::SHLLV_QB , 0, | |
17612 | DSP_ }, /* SHLLV.QB */ | |
17613 | { reserved_block , 0 , 0 , 32, | |
17614 | 0xfc0003ff, 0x2000039d, 0 , 0, | |
17615 | 0x0 }, /* _POOL32A5~*(115) */ | |
17616 | { reserved_block , 0 , 0 , 32, | |
17617 | 0xfc0003ff, 0x200003a5, 0 , 0, | |
17618 | 0x0 }, /* _POOL32A5~*(116) */ | |
17619 | { reserved_block , 0 , 0 , 32, | |
17620 | 0xfc0003ff, 0x200003ad, 0 , 0, | |
17621 | 0x0 }, /* _POOL32A5~*(117) */ | |
17622 | { pool , SHLL__S__PH , 4 , 32, | |
17623 | 0xfc0003ff, 0x200003b5, 0 , 0, | |
17624 | 0x0 }, /* SHLL[_S].PH */ | |
17625 | { reserved_block , 0 , 0 , 32, | |
17626 | 0xfc0003ff, 0x200003bd, 0 , 0, | |
17627 | 0x0 }, /* _POOL32A5~*(119) */ | |
17628 | { instruction , 0 , 0 , 32, | |
17629 | 0xfc0003ff, 0x200003c5, &NMD::ADDWC , 0, | |
17630 | DSP_ }, /* ADDWC */ | |
17631 | { pool , PRECR_SRA__R__PH_W , 2 , 32, | |
17632 | 0xfc0003ff, 0x200003cd, 0 , 0, | |
17633 | 0x0 }, /* PRECR_SRA[_R].PH.W */ | |
17634 | { instruction , 0 , 0 , 32, | |
17635 | 0xfc0003ff, 0x200003d5, &NMD::SHLLV_S_W , 0, | |
17636 | DSP_ }, /* SHLLV_S.W */ | |
17637 | { reserved_block , 0 , 0 , 32, | |
17638 | 0xfc0003ff, 0x200003dd, 0 , 0, | |
17639 | 0x0 }, /* _POOL32A5~*(123) */ | |
17640 | { reserved_block , 0 , 0 , 32, | |
17641 | 0xfc0003ff, 0x200003e5, 0 , 0, | |
17642 | 0x0 }, /* _POOL32A5~*(124) */ | |
17643 | { reserved_block , 0 , 0 , 32, | |
17644 | 0xfc0003ff, 0x200003ed, 0 , 0, | |
17645 | 0x0 }, /* _POOL32A5~*(125) */ | |
17646 | { instruction , 0 , 0 , 32, | |
17647 | 0xfc0003ff, 0x200003f5, &NMD::SHLL_S_W , 0, | |
17648 | DSP_ }, /* SHLL_S.W */ | |
17649 | { reserved_block , 0 , 0 , 32, | |
17650 | 0xfc0003ff, 0x200003fd, 0 , 0, | |
17651 | 0x0 }, /* _POOL32A5~*(127) */ | |
17652 | }; | |
17653 | ||
17654 | ||
17655 | NMD::Pool NMD::PP_LSX[16] = { | |
17656 | { instruction , 0 , 0 , 32, | |
17657 | 0xfc0007ff, 0x20000007, &NMD::LBX , 0, | |
17658 | 0x0 }, /* LBX */ | |
17659 | { instruction , 0 , 0 , 32, | |
17660 | 0xfc0007ff, 0x20000087, &NMD::SBX , 0, | |
17661 | XMMS_ }, /* SBX */ | |
17662 | { instruction , 0 , 0 , 32, | |
17663 | 0xfc0007ff, 0x20000107, &NMD::LBUX , 0, | |
17664 | 0x0 }, /* LBUX */ | |
17665 | { reserved_block , 0 , 0 , 32, | |
17666 | 0xfc0007ff, 0x20000187, 0 , 0, | |
17667 | 0x0 }, /* PP.LSX~*(3) */ | |
17668 | { instruction , 0 , 0 , 32, | |
17669 | 0xfc0007ff, 0x20000207, &NMD::LHX , 0, | |
17670 | 0x0 }, /* LHX */ | |
17671 | { instruction , 0 , 0 , 32, | |
17672 | 0xfc0007ff, 0x20000287, &NMD::SHX , 0, | |
17673 | XMMS_ }, /* SHX */ | |
17674 | { instruction , 0 , 0 , 32, | |
17675 | 0xfc0007ff, 0x20000307, &NMD::LHUX , 0, | |
17676 | 0x0 }, /* LHUX */ | |
17677 | { instruction , 0 , 0 , 32, | |
17678 | 0xfc0007ff, 0x20000387, &NMD::LWUX , 0, | |
17679 | MIPS64_ }, /* LWUX */ | |
17680 | { instruction , 0 , 0 , 32, | |
17681 | 0xfc0007ff, 0x20000407, &NMD::LWX , 0, | |
17682 | 0x0 }, /* LWX */ | |
17683 | { instruction , 0 , 0 , 32, | |
17684 | 0xfc0007ff, 0x20000487, &NMD::SWX , 0, | |
17685 | XMMS_ }, /* SWX */ | |
17686 | { instruction , 0 , 0 , 32, | |
17687 | 0xfc0007ff, 0x20000507, &NMD::LWC1X , 0, | |
17688 | CP1_ }, /* LWC1X */ | |
17689 | { instruction , 0 , 0 , 32, | |
17690 | 0xfc0007ff, 0x20000587, &NMD::SWC1X , 0, | |
17691 | CP1_ }, /* SWC1X */ | |
17692 | { instruction , 0 , 0 , 32, | |
17693 | 0xfc0007ff, 0x20000607, &NMD::LDX , 0, | |
17694 | MIPS64_ }, /* LDX */ | |
17695 | { instruction , 0 , 0 , 32, | |
17696 | 0xfc0007ff, 0x20000687, &NMD::SDX , 0, | |
17697 | MIPS64_ }, /* SDX */ | |
17698 | { instruction , 0 , 0 , 32, | |
17699 | 0xfc0007ff, 0x20000707, &NMD::LDC1X , 0, | |
17700 | CP1_ }, /* LDC1X */ | |
17701 | { instruction , 0 , 0 , 32, | |
17702 | 0xfc0007ff, 0x20000787, &NMD::SDC1X , 0, | |
17703 | CP1_ }, /* SDC1X */ | |
17704 | }; | |
17705 | ||
17706 | ||
17707 | NMD::Pool NMD::PP_LSXS[16] = { | |
17708 | { reserved_block , 0 , 0 , 32, | |
17709 | 0xfc0007ff, 0x20000047, 0 , 0, | |
17710 | 0x0 }, /* PP.LSXS~*(0) */ | |
17711 | { reserved_block , 0 , 0 , 32, | |
17712 | 0xfc0007ff, 0x200000c7, 0 , 0, | |
17713 | 0x0 }, /* PP.LSXS~*(1) */ | |
17714 | { reserved_block , 0 , 0 , 32, | |
17715 | 0xfc0007ff, 0x20000147, 0 , 0, | |
17716 | 0x0 }, /* PP.LSXS~*(2) */ | |
17717 | { reserved_block , 0 , 0 , 32, | |
17718 | 0xfc0007ff, 0x200001c7, 0 , 0, | |
17719 | 0x0 }, /* PP.LSXS~*(3) */ | |
17720 | { instruction , 0 , 0 , 32, | |
17721 | 0xfc0007ff, 0x20000247, &NMD::LHXS , 0, | |
17722 | 0x0 }, /* LHXS */ | |
17723 | { instruction , 0 , 0 , 32, | |
17724 | 0xfc0007ff, 0x200002c7, &NMD::SHXS , 0, | |
17725 | XMMS_ }, /* SHXS */ | |
17726 | { instruction , 0 , 0 , 32, | |
17727 | 0xfc0007ff, 0x20000347, &NMD::LHUXS , 0, | |
17728 | 0x0 }, /* LHUXS */ | |
17729 | { instruction , 0 , 0 , 32, | |
17730 | 0xfc0007ff, 0x200003c7, &NMD::LWUXS , 0, | |
17731 | MIPS64_ }, /* LWUXS */ | |
17732 | { instruction , 0 , 0 , 32, | |
17733 | 0xfc0007ff, 0x20000447, &NMD::LWXS_32_ , 0, | |
17734 | 0x0 }, /* LWXS[32] */ | |
17735 | { instruction , 0 , 0 , 32, | |
17736 | 0xfc0007ff, 0x200004c7, &NMD::SWXS , 0, | |
17737 | XMMS_ }, /* SWXS */ | |
17738 | { instruction , 0 , 0 , 32, | |
17739 | 0xfc0007ff, 0x20000547, &NMD::LWC1XS , 0, | |
17740 | CP1_ }, /* LWC1XS */ | |
17741 | { instruction , 0 , 0 , 32, | |
17742 | 0xfc0007ff, 0x200005c7, &NMD::SWC1XS , 0, | |
17743 | CP1_ }, /* SWC1XS */ | |
17744 | { instruction , 0 , 0 , 32, | |
17745 | 0xfc0007ff, 0x20000647, &NMD::LDXS , 0, | |
17746 | MIPS64_ }, /* LDXS */ | |
17747 | { instruction , 0 , 0 , 32, | |
17748 | 0xfc0007ff, 0x200006c7, &NMD::SDXS , 0, | |
17749 | MIPS64_ }, /* SDXS */ | |
17750 | { instruction , 0 , 0 , 32, | |
17751 | 0xfc0007ff, 0x20000747, &NMD::LDC1XS , 0, | |
17752 | CP1_ }, /* LDC1XS */ | |
17753 | { instruction , 0 , 0 , 32, | |
17754 | 0xfc0007ff, 0x200007c7, &NMD::SDC1XS , 0, | |
17755 | CP1_ }, /* SDC1XS */ | |
17756 | }; | |
17757 | ||
17758 | ||
17759 | NMD::Pool NMD::P_LSX[2] = { | |
17760 | { pool , PP_LSX , 16 , 32, | |
17761 | 0xfc00007f, 0x20000007, 0 , 0, | |
17762 | 0x0 }, /* PP.LSX */ | |
17763 | { pool , PP_LSXS , 16 , 32, | |
17764 | 0xfc00007f, 0x20000047, 0 , 0, | |
17765 | 0x0 }, /* PP.LSXS */ | |
17766 | }; | |
17767 | ||
17768 | ||
17769 | NMD::Pool NMD::POOL32Axf_1_0[4] = { | |
17770 | { instruction , 0 , 0 , 32, | |
17771 | 0xfc003fff, 0x2000007f, &NMD::MFHI_DSP_ , 0, | |
17772 | DSP_ }, /* MFHI[DSP] */ | |
17773 | { instruction , 0 , 0 , 32, | |
17774 | 0xfc003fff, 0x2000107f, &NMD::MFLO_DSP_ , 0, | |
17775 | DSP_ }, /* MFLO[DSP] */ | |
17776 | { instruction , 0 , 0 , 32, | |
17777 | 0xfc003fff, 0x2000207f, &NMD::MTHI_DSP_ , 0, | |
17778 | DSP_ }, /* MTHI[DSP] */ | |
17779 | { instruction , 0 , 0 , 32, | |
17780 | 0xfc003fff, 0x2000307f, &NMD::MTLO_DSP_ , 0, | |
17781 | DSP_ }, /* MTLO[DSP] */ | |
17782 | }; | |
17783 | ||
17784 | ||
17785 | NMD::Pool NMD::POOL32Axf_1_1[4] = { | |
17786 | { instruction , 0 , 0 , 32, | |
17787 | 0xfc003fff, 0x2000027f, &NMD::MTHLIP , 0, | |
17788 | DSP_ }, /* MTHLIP */ | |
17789 | { instruction , 0 , 0 , 32, | |
17790 | 0xfc003fff, 0x2000127f, &NMD::SHILOV , 0, | |
17791 | DSP_ }, /* SHILOV */ | |
17792 | { reserved_block , 0 , 0 , 32, | |
17793 | 0xfc003fff, 0x2000227f, 0 , 0, | |
17794 | 0x0 }, /* POOL32Axf_1_1~*(2) */ | |
17795 | { reserved_block , 0 , 0 , 32, | |
17796 | 0xfc003fff, 0x2000327f, 0 , 0, | |
17797 | 0x0 }, /* POOL32Axf_1_1~*(3) */ | |
17798 | }; | |
17799 | ||
17800 | ||
17801 | NMD::Pool NMD::POOL32Axf_1_3[4] = { | |
17802 | { instruction , 0 , 0 , 32, | |
17803 | 0xfc003fff, 0x2000067f, &NMD::RDDSP , 0, | |
17804 | DSP_ }, /* RDDSP */ | |
17805 | { instruction , 0 , 0 , 32, | |
17806 | 0xfc003fff, 0x2000167f, &NMD::WRDSP , 0, | |
17807 | DSP_ }, /* WRDSP */ | |
17808 | { instruction , 0 , 0 , 32, | |
17809 | 0xfc003fff, 0x2000267f, &NMD::EXTP , 0, | |
17810 | DSP_ }, /* EXTP */ | |
17811 | { instruction , 0 , 0 , 32, | |
17812 | 0xfc003fff, 0x2000367f, &NMD::EXTPDP , 0, | |
17813 | DSP_ }, /* EXTPDP */ | |
17814 | }; | |
17815 | ||
17816 | ||
17817 | NMD::Pool NMD::POOL32Axf_1_4[2] = { | |
17818 | { instruction , 0 , 0 , 32, | |
17819 | 0xfc001fff, 0x2000087f, &NMD::SHLL_QB , 0, | |
17820 | DSP_ }, /* SHLL.QB */ | |
17821 | { instruction , 0 , 0 , 32, | |
17822 | 0xfc001fff, 0x2000187f, &NMD::SHRL_QB , 0, | |
17823 | DSP_ }, /* SHRL.QB */ | |
17824 | }; | |
17825 | ||
17826 | ||
17827 | NMD::Pool NMD::MAQ_S_A__W_PHR[2] = { | |
17828 | { instruction , 0 , 0 , 32, | |
17829 | 0xfc003fff, 0x20000a7f, &NMD::MAQ_S_W_PHR , 0, | |
17830 | DSP_ }, /* MAQ_S.W.PHR */ | |
17831 | { instruction , 0 , 0 , 32, | |
17832 | 0xfc003fff, 0x20002a7f, &NMD::MAQ_SA_W_PHR , 0, | |
17833 | DSP_ }, /* MAQ_SA.W.PHR */ | |
17834 | }; | |
17835 | ||
17836 | ||
17837 | NMD::Pool NMD::MAQ_S_A__W_PHL[2] = { | |
17838 | { instruction , 0 , 0 , 32, | |
17839 | 0xfc003fff, 0x20001a7f, &NMD::MAQ_S_W_PHL , 0, | |
17840 | DSP_ }, /* MAQ_S.W.PHL */ | |
17841 | { instruction , 0 , 0 , 32, | |
17842 | 0xfc003fff, 0x20003a7f, &NMD::MAQ_SA_W_PHL , 0, | |
17843 | DSP_ }, /* MAQ_SA.W.PHL */ | |
17844 | }; | |
17845 | ||
17846 | ||
17847 | NMD::Pool NMD::POOL32Axf_1_5[2] = { | |
17848 | { pool , MAQ_S_A__W_PHR , 2 , 32, | |
17849 | 0xfc001fff, 0x20000a7f, 0 , 0, | |
17850 | 0x0 }, /* MAQ_S[A].W.PHR */ | |
17851 | { pool , MAQ_S_A__W_PHL , 2 , 32, | |
17852 | 0xfc001fff, 0x20001a7f, 0 , 0, | |
17853 | 0x0 }, /* MAQ_S[A].W.PHL */ | |
17854 | }; | |
17855 | ||
17856 | ||
17857 | NMD::Pool NMD::POOL32Axf_1_7[4] = { | |
17858 | { instruction , 0 , 0 , 32, | |
17859 | 0xfc003fff, 0x20000e7f, &NMD::EXTR_W , 0, | |
17860 | DSP_ }, /* EXTR.W */ | |
17861 | { instruction , 0 , 0 , 32, | |
17862 | 0xfc003fff, 0x20001e7f, &NMD::EXTR_R_W , 0, | |
17863 | DSP_ }, /* EXTR_R.W */ | |
17864 | { instruction , 0 , 0 , 32, | |
17865 | 0xfc003fff, 0x20002e7f, &NMD::EXTR_RS_W , 0, | |
17866 | DSP_ }, /* EXTR_RS.W */ | |
17867 | { instruction , 0 , 0 , 32, | |
17868 | 0xfc003fff, 0x20003e7f, &NMD::EXTR_S_H , 0, | |
17869 | DSP_ }, /* EXTR_S.H */ | |
17870 | }; | |
17871 | ||
17872 | ||
17873 | NMD::Pool NMD::POOL32Axf_1[8] = { | |
17874 | { pool , POOL32Axf_1_0 , 4 , 32, | |
17875 | 0xfc000fff, 0x2000007f, 0 , 0, | |
17876 | 0x0 }, /* POOL32Axf_1_0 */ | |
17877 | { pool , POOL32Axf_1_1 , 4 , 32, | |
17878 | 0xfc000fff, 0x2000027f, 0 , 0, | |
17879 | 0x0 }, /* POOL32Axf_1_1 */ | |
17880 | { reserved_block , 0 , 0 , 32, | |
17881 | 0xfc000fff, 0x2000047f, 0 , 0, | |
17882 | 0x0 }, /* POOL32Axf_1~*(2) */ | |
17883 | { pool , POOL32Axf_1_3 , 4 , 32, | |
17884 | 0xfc000fff, 0x2000067f, 0 , 0, | |
17885 | 0x0 }, /* POOL32Axf_1_3 */ | |
17886 | { pool , POOL32Axf_1_4 , 2 , 32, | |
17887 | 0xfc000fff, 0x2000087f, 0 , 0, | |
17888 | 0x0 }, /* POOL32Axf_1_4 */ | |
17889 | { pool , POOL32Axf_1_5 , 2 , 32, | |
17890 | 0xfc000fff, 0x20000a7f, 0 , 0, | |
17891 | 0x0 }, /* POOL32Axf_1_5 */ | |
17892 | { reserved_block , 0 , 0 , 32, | |
17893 | 0xfc000fff, 0x20000c7f, 0 , 0, | |
17894 | 0x0 }, /* POOL32Axf_1~*(6) */ | |
17895 | { pool , POOL32Axf_1_7 , 4 , 32, | |
17896 | 0xfc000fff, 0x20000e7f, 0 , 0, | |
17897 | 0x0 }, /* POOL32Axf_1_7 */ | |
17898 | }; | |
17899 | ||
17900 | ||
17901 | NMD::Pool NMD::POOL32Axf_2_DSP__0_7[8] = { | |
17902 | { instruction , 0 , 0 , 32, | |
17903 | 0xfc003fff, 0x200000bf, &NMD::DPA_W_PH , 0, | |
17904 | DSP_ }, /* DPA.W.PH */ | |
17905 | { instruction , 0 , 0 , 32, | |
17906 | 0xfc003fff, 0x200002bf, &NMD::DPAQ_S_W_PH , 0, | |
17907 | DSP_ }, /* DPAQ_S.W.PH */ | |
17908 | { instruction , 0 , 0 , 32, | |
17909 | 0xfc003fff, 0x200004bf, &NMD::DPS_W_PH , 0, | |
17910 | DSP_ }, /* DPS.W.PH */ | |
17911 | { instruction , 0 , 0 , 32, | |
17912 | 0xfc003fff, 0x200006bf, &NMD::DPSQ_S_W_PH , 0, | |
17913 | DSP_ }, /* DPSQ_S.W.PH */ | |
17914 | { reserved_block , 0 , 0 , 32, | |
17915 | 0xfc003fff, 0x200008bf, 0 , 0, | |
17916 | 0x0 }, /* POOL32Axf_2(DSP)_0_7~*(4) */ | |
17917 | { instruction , 0 , 0 , 32, | |
17918 | 0xfc003fff, 0x20000abf, &NMD::MADD_DSP_ , 0, | |
17919 | DSP_ }, /* MADD[DSP] */ | |
17920 | { instruction , 0 , 0 , 32, | |
17921 | 0xfc003fff, 0x20000cbf, &NMD::MULT_DSP_ , 0, | |
17922 | DSP_ }, /* MULT[DSP] */ | |
17923 | { instruction , 0 , 0 , 32, | |
17924 | 0xfc003fff, 0x20000ebf, &NMD::EXTRV_W , 0, | |
17925 | DSP_ }, /* EXTRV.W */ | |
17926 | }; | |
17927 | ||
17928 | ||
17929 | NMD::Pool NMD::POOL32Axf_2_DSP__8_15[8] = { | |
17930 | { instruction , 0 , 0 , 32, | |
17931 | 0xfc003fff, 0x200010bf, &NMD::DPAX_W_PH , 0, | |
17932 | DSP_ }, /* DPAX.W.PH */ | |
17933 | { instruction , 0 , 0 , 32, | |
17934 | 0xfc003fff, 0x200012bf, &NMD::DPAQ_SA_L_W , 0, | |
17935 | DSP_ }, /* DPAQ_SA.L.W */ | |
17936 | { instruction , 0 , 0 , 32, | |
17937 | 0xfc003fff, 0x200014bf, &NMD::DPSX_W_PH , 0, | |
17938 | DSP_ }, /* DPSX.W.PH */ | |
17939 | { instruction , 0 , 0 , 32, | |
17940 | 0xfc003fff, 0x200016bf, &NMD::DPSQ_SA_L_W , 0, | |
17941 | DSP_ }, /* DPSQ_SA.L.W */ | |
17942 | { reserved_block , 0 , 0 , 32, | |
17943 | 0xfc003fff, 0x200018bf, 0 , 0, | |
17944 | 0x0 }, /* POOL32Axf_2(DSP)_8_15~*(4) */ | |
17945 | { instruction , 0 , 0 , 32, | |
17946 | 0xfc003fff, 0x20001abf, &NMD::MADDU_DSP_ , 0, | |
17947 | DSP_ }, /* MADDU[DSP] */ | |
17948 | { instruction , 0 , 0 , 32, | |
17949 | 0xfc003fff, 0x20001cbf, &NMD::MULTU_DSP_ , 0, | |
17950 | DSP_ }, /* MULTU[DSP] */ | |
17951 | { instruction , 0 , 0 , 32, | |
17952 | 0xfc003fff, 0x20001ebf, &NMD::EXTRV_R_W , 0, | |
17953 | DSP_ }, /* EXTRV_R.W */ | |
17954 | }; | |
17955 | ||
17956 | ||
17957 | NMD::Pool NMD::POOL32Axf_2_DSP__16_23[8] = { | |
17958 | { instruction , 0 , 0 , 32, | |
17959 | 0xfc003fff, 0x200020bf, &NMD::DPAU_H_QBL , 0, | |
17960 | DSP_ }, /* DPAU.H.QBL */ | |
17961 | { instruction , 0 , 0 , 32, | |
17962 | 0xfc003fff, 0x200022bf, &NMD::DPAQX_S_W_PH , 0, | |
17963 | DSP_ }, /* DPAQX_S.W.PH */ | |
17964 | { instruction , 0 , 0 , 32, | |
17965 | 0xfc003fff, 0x200024bf, &NMD::DPSU_H_QBL , 0, | |
17966 | DSP_ }, /* DPSU.H.QBL */ | |
17967 | { instruction , 0 , 0 , 32, | |
17968 | 0xfc003fff, 0x200026bf, &NMD::DPSQX_S_W_PH , 0, | |
17969 | DSP_ }, /* DPSQX_S.W.PH */ | |
17970 | { instruction , 0 , 0 , 32, | |
17971 | 0xfc003fff, 0x200028bf, &NMD::EXTPV , 0, | |
17972 | DSP_ }, /* EXTPV */ | |
17973 | { instruction , 0 , 0 , 32, | |
17974 | 0xfc003fff, 0x20002abf, &NMD::MSUB_DSP_ , 0, | |
17975 | DSP_ }, /* MSUB[DSP] */ | |
17976 | { instruction , 0 , 0 , 32, | |
17977 | 0xfc003fff, 0x20002cbf, &NMD::MULSA_W_PH , 0, | |
17978 | DSP_ }, /* MULSA.W.PH */ | |
17979 | { instruction , 0 , 0 , 32, | |
17980 | 0xfc003fff, 0x20002ebf, &NMD::EXTRV_RS_W , 0, | |
17981 | DSP_ }, /* EXTRV_RS.W */ | |
17982 | }; | |
17983 | ||
17984 | ||
17985 | NMD::Pool NMD::POOL32Axf_2_DSP__24_31[8] = { | |
17986 | { instruction , 0 , 0 , 32, | |
17987 | 0xfc003fff, 0x200030bf, &NMD::DPAU_H_QBR , 0, | |
17988 | DSP_ }, /* DPAU.H.QBR */ | |
17989 | { instruction , 0 , 0 , 32, | |
17990 | 0xfc003fff, 0x200032bf, &NMD::DPAQX_SA_W_PH , 0, | |
17991 | DSP_ }, /* DPAQX_SA.W.PH */ | |
17992 | { instruction , 0 , 0 , 32, | |
17993 | 0xfc003fff, 0x200034bf, &NMD::DPSU_H_QBR , 0, | |
17994 | DSP_ }, /* DPSU.H.QBR */ | |
17995 | { instruction , 0 , 0 , 32, | |
17996 | 0xfc003fff, 0x200036bf, &NMD::DPSQX_SA_W_PH , 0, | |
17997 | DSP_ }, /* DPSQX_SA.W.PH */ | |
17998 | { instruction , 0 , 0 , 32, | |
17999 | 0xfc003fff, 0x200038bf, &NMD::EXTPDPV , 0, | |
18000 | DSP_ }, /* EXTPDPV */ | |
18001 | { instruction , 0 , 0 , 32, | |
18002 | 0xfc003fff, 0x20003abf, &NMD::MSUBU_DSP_ , 0, | |
18003 | DSP_ }, /* MSUBU[DSP] */ | |
18004 | { instruction , 0 , 0 , 32, | |
18005 | 0xfc003fff, 0x20003cbf, &NMD::MULSAQ_S_W_PH , 0, | |
18006 | DSP_ }, /* MULSAQ_S.W.PH */ | |
18007 | { instruction , 0 , 0 , 32, | |
18008 | 0xfc003fff, 0x20003ebf, &NMD::EXTRV_S_H , 0, | |
18009 | DSP_ }, /* EXTRV_S.H */ | |
18010 | }; | |
18011 | ||
18012 | ||
18013 | NMD::Pool NMD::POOL32Axf_2[4] = { | |
18014 | { pool , POOL32Axf_2_DSP__0_7, 8 , 32, | |
18015 | 0xfc0031ff, 0x200000bf, 0 , 0, | |
18016 | 0x0 }, /* POOL32Axf_2(DSP)_0_7 */ | |
18017 | { pool , POOL32Axf_2_DSP__8_15, 8 , 32, | |
18018 | 0xfc0031ff, 0x200010bf, 0 , 0, | |
18019 | 0x0 }, /* POOL32Axf_2(DSP)_8_15 */ | |
18020 | { pool , POOL32Axf_2_DSP__16_23, 8 , 32, | |
18021 | 0xfc0031ff, 0x200020bf, 0 , 0, | |
18022 | 0x0 }, /* POOL32Axf_2(DSP)_16_23 */ | |
18023 | { pool , POOL32Axf_2_DSP__24_31, 8 , 32, | |
18024 | 0xfc0031ff, 0x200030bf, 0 , 0, | |
18025 | 0x0 }, /* POOL32Axf_2(DSP)_24_31 */ | |
18026 | }; | |
18027 | ||
18028 | ||
18029 | NMD::Pool NMD::POOL32Axf_4[128] = { | |
18030 | { instruction , 0 , 0 , 32, | |
18031 | 0xfc00ffff, 0x2000013f, &NMD::ABSQ_S_QB , 0, | |
18032 | DSP_ }, /* ABSQ_S.QB */ | |
18033 | { instruction , 0 , 0 , 32, | |
18034 | 0xfc00ffff, 0x2000033f, &NMD::REPLV_PH , 0, | |
18035 | DSP_ }, /* REPLV.PH */ | |
18036 | { reserved_block , 0 , 0 , 32, | |
18037 | 0xfc00ffff, 0x2000053f, 0 , 0, | |
18038 | 0x0 }, /* POOL32Axf_4~*(2) */ | |
18039 | { reserved_block , 0 , 0 , 32, | |
18040 | 0xfc00ffff, 0x2000073f, 0 , 0, | |
18041 | 0x0 }, /* POOL32Axf_4~*(3) */ | |
18042 | { reserved_block , 0 , 0 , 32, | |
18043 | 0xfc00ffff, 0x2000093f, 0 , 0, | |
18044 | 0x0 }, /* POOL32Axf_4~*(4) */ | |
18045 | { reserved_block , 0 , 0 , 32, | |
18046 | 0xfc00ffff, 0x20000b3f, 0 , 0, | |
18047 | 0x0 }, /* POOL32Axf_4~*(5) */ | |
18048 | { reserved_block , 0 , 0 , 32, | |
18049 | 0xfc00ffff, 0x20000d3f, 0 , 0, | |
18050 | 0x0 }, /* POOL32Axf_4~*(6) */ | |
18051 | { reserved_block , 0 , 0 , 32, | |
18052 | 0xfc00ffff, 0x20000f3f, 0 , 0, | |
18053 | 0x0 }, /* POOL32Axf_4~*(7) */ | |
18054 | { instruction , 0 , 0 , 32, | |
18055 | 0xfc00ffff, 0x2000113f, &NMD::ABSQ_S_PH , 0, | |
18056 | DSP_ }, /* ABSQ_S.PH */ | |
18057 | { instruction , 0 , 0 , 32, | |
18058 | 0xfc00ffff, 0x2000133f, &NMD::REPLV_QB , 0, | |
18059 | DSP_ }, /* REPLV.QB */ | |
18060 | { reserved_block , 0 , 0 , 32, | |
18061 | 0xfc00ffff, 0x2000153f, 0 , 0, | |
18062 | 0x0 }, /* POOL32Axf_4~*(10) */ | |
18063 | { reserved_block , 0 , 0 , 32, | |
18064 | 0xfc00ffff, 0x2000173f, 0 , 0, | |
18065 | 0x0 }, /* POOL32Axf_4~*(11) */ | |
18066 | { reserved_block , 0 , 0 , 32, | |
18067 | 0xfc00ffff, 0x2000193f, 0 , 0, | |
18068 | 0x0 }, /* POOL32Axf_4~*(12) */ | |
18069 | { reserved_block , 0 , 0 , 32, | |
18070 | 0xfc00ffff, 0x20001b3f, 0 , 0, | |
18071 | 0x0 }, /* POOL32Axf_4~*(13) */ | |
18072 | { reserved_block , 0 , 0 , 32, | |
18073 | 0xfc00ffff, 0x20001d3f, 0 , 0, | |
18074 | 0x0 }, /* POOL32Axf_4~*(14) */ | |
18075 | { reserved_block , 0 , 0 , 32, | |
18076 | 0xfc00ffff, 0x20001f3f, 0 , 0, | |
18077 | 0x0 }, /* POOL32Axf_4~*(15) */ | |
18078 | { instruction , 0 , 0 , 32, | |
18079 | 0xfc00ffff, 0x2000213f, &NMD::ABSQ_S_W , 0, | |
18080 | DSP_ }, /* ABSQ_S.W */ | |
18081 | { reserved_block , 0 , 0 , 32, | |
18082 | 0xfc00ffff, 0x2000233f, 0 , 0, | |
18083 | 0x0 }, /* POOL32Axf_4~*(17) */ | |
18084 | { reserved_block , 0 , 0 , 32, | |
18085 | 0xfc00ffff, 0x2000253f, 0 , 0, | |
18086 | 0x0 }, /* POOL32Axf_4~*(18) */ | |
18087 | { reserved_block , 0 , 0 , 32, | |
18088 | 0xfc00ffff, 0x2000273f, 0 , 0, | |
18089 | 0x0 }, /* POOL32Axf_4~*(19) */ | |
18090 | { reserved_block , 0 , 0 , 32, | |
18091 | 0xfc00ffff, 0x2000293f, 0 , 0, | |
18092 | 0x0 }, /* POOL32Axf_4~*(20) */ | |
18093 | { reserved_block , 0 , 0 , 32, | |
18094 | 0xfc00ffff, 0x20002b3f, 0 , 0, | |
18095 | 0x0 }, /* POOL32Axf_4~*(21) */ | |
18096 | { reserved_block , 0 , 0 , 32, | |
18097 | 0xfc00ffff, 0x20002d3f, 0 , 0, | |
18098 | 0x0 }, /* POOL32Axf_4~*(22) */ | |
18099 | { reserved_block , 0 , 0 , 32, | |
18100 | 0xfc00ffff, 0x20002f3f, 0 , 0, | |
18101 | 0x0 }, /* POOL32Axf_4~*(23) */ | |
18102 | { reserved_block , 0 , 0 , 32, | |
18103 | 0xfc00ffff, 0x2000313f, 0 , 0, | |
18104 | 0x0 }, /* POOL32Axf_4~*(24) */ | |
18105 | { reserved_block , 0 , 0 , 32, | |
18106 | 0xfc00ffff, 0x2000333f, 0 , 0, | |
18107 | 0x0 }, /* POOL32Axf_4~*(25) */ | |
18108 | { reserved_block , 0 , 0 , 32, | |
18109 | 0xfc00ffff, 0x2000353f, 0 , 0, | |
18110 | 0x0 }, /* POOL32Axf_4~*(26) */ | |
18111 | { reserved_block , 0 , 0 , 32, | |
18112 | 0xfc00ffff, 0x2000373f, 0 , 0, | |
18113 | 0x0 }, /* POOL32Axf_4~*(27) */ | |
18114 | { reserved_block , 0 , 0 , 32, | |
18115 | 0xfc00ffff, 0x2000393f, 0 , 0, | |
18116 | 0x0 }, /* POOL32Axf_4~*(28) */ | |
18117 | { reserved_block , 0 , 0 , 32, | |
18118 | 0xfc00ffff, 0x20003b3f, 0 , 0, | |
18119 | 0x0 }, /* POOL32Axf_4~*(29) */ | |
18120 | { reserved_block , 0 , 0 , 32, | |
18121 | 0xfc00ffff, 0x20003d3f, 0 , 0, | |
18122 | 0x0 }, /* POOL32Axf_4~*(30) */ | |
18123 | { reserved_block , 0 , 0 , 32, | |
18124 | 0xfc00ffff, 0x20003f3f, 0 , 0, | |
18125 | 0x0 }, /* POOL32Axf_4~*(31) */ | |
18126 | { instruction , 0 , 0 , 32, | |
18127 | 0xfc00ffff, 0x2000413f, &NMD::INSV , 0, | |
18128 | DSP_ }, /* INSV */ | |
18129 | { reserved_block , 0 , 0 , 32, | |
18130 | 0xfc00ffff, 0x2000433f, 0 , 0, | |
18131 | 0x0 }, /* POOL32Axf_4~*(33) */ | |
18132 | { reserved_block , 0 , 0 , 32, | |
18133 | 0xfc00ffff, 0x2000453f, 0 , 0, | |
18134 | 0x0 }, /* POOL32Axf_4~*(34) */ | |
18135 | { reserved_block , 0 , 0 , 32, | |
18136 | 0xfc00ffff, 0x2000473f, 0 , 0, | |
18137 | 0x0 }, /* POOL32Axf_4~*(35) */ | |
18138 | { reserved_block , 0 , 0 , 32, | |
18139 | 0xfc00ffff, 0x2000493f, 0 , 0, | |
18140 | 0x0 }, /* POOL32Axf_4~*(36) */ | |
18141 | { instruction , 0 , 0 , 32, | |
18142 | 0xfc00ffff, 0x20004b3f, &NMD::CLO , 0, | |
18143 | XMMS_ }, /* CLO */ | |
18144 | { instruction , 0 , 0 , 32, | |
18145 | 0xfc00ffff, 0x20004d3f, &NMD::MFC2 , 0, | |
18146 | CP2_ }, /* MFC2 */ | |
18147 | { reserved_block , 0 , 0 , 32, | |
18148 | 0xfc00ffff, 0x20004f3f, 0 , 0, | |
18149 | 0x0 }, /* POOL32Axf_4~*(39) */ | |
18150 | { instruction , 0 , 0 , 32, | |
18151 | 0xfc00ffff, 0x2000513f, &NMD::PRECEQ_W_PHL , 0, | |
18152 | DSP_ }, /* PRECEQ.W.PHL */ | |
18153 | { reserved_block , 0 , 0 , 32, | |
18154 | 0xfc00ffff, 0x2000533f, 0 , 0, | |
18155 | 0x0 }, /* POOL32Axf_4~*(41) */ | |
18156 | { reserved_block , 0 , 0 , 32, | |
18157 | 0xfc00ffff, 0x2000553f, 0 , 0, | |
18158 | 0x0 }, /* POOL32Axf_4~*(42) */ | |
18159 | { reserved_block , 0 , 0 , 32, | |
18160 | 0xfc00ffff, 0x2000573f, 0 , 0, | |
18161 | 0x0 }, /* POOL32Axf_4~*(43) */ | |
18162 | { reserved_block , 0 , 0 , 32, | |
18163 | 0xfc00ffff, 0x2000593f, 0 , 0, | |
18164 | 0x0 }, /* POOL32Axf_4~*(44) */ | |
18165 | { instruction , 0 , 0 , 32, | |
18166 | 0xfc00ffff, 0x20005b3f, &NMD::CLZ , 0, | |
18167 | XMMS_ }, /* CLZ */ | |
18168 | { instruction , 0 , 0 , 32, | |
18169 | 0xfc00ffff, 0x20005d3f, &NMD::MTC2 , 0, | |
18170 | CP2_ }, /* MTC2 */ | |
18171 | { reserved_block , 0 , 0 , 32, | |
18172 | 0xfc00ffff, 0x20005f3f, 0 , 0, | |
18173 | 0x0 }, /* POOL32Axf_4~*(47) */ | |
18174 | { instruction , 0 , 0 , 32, | |
18175 | 0xfc00ffff, 0x2000613f, &NMD::PRECEQ_W_PHR , 0, | |
18176 | DSP_ }, /* PRECEQ.W.PHR */ | |
18177 | { reserved_block , 0 , 0 , 32, | |
18178 | 0xfc00ffff, 0x2000633f, 0 , 0, | |
18179 | 0x0 }, /* POOL32Axf_4~*(49) */ | |
18180 | { reserved_block , 0 , 0 , 32, | |
18181 | 0xfc00ffff, 0x2000653f, 0 , 0, | |
18182 | 0x0 }, /* POOL32Axf_4~*(50) */ | |
18183 | { reserved_block , 0 , 0 , 32, | |
18184 | 0xfc00ffff, 0x2000673f, 0 , 0, | |
18185 | 0x0 }, /* POOL32Axf_4~*(51) */ | |
18186 | { reserved_block , 0 , 0 , 32, | |
18187 | 0xfc00ffff, 0x2000693f, 0 , 0, | |
18188 | 0x0 }, /* POOL32Axf_4~*(52) */ | |
18189 | { reserved_block , 0 , 0 , 32, | |
18190 | 0xfc00ffff, 0x20006b3f, 0 , 0, | |
18191 | 0x0 }, /* POOL32Axf_4~*(53) */ | |
18192 | { instruction , 0 , 0 , 32, | |
18193 | 0xfc00ffff, 0x20006d3f, &NMD::DMFC2 , 0, | |
18194 | CP2_ }, /* DMFC2 */ | |
18195 | { reserved_block , 0 , 0 , 32, | |
18196 | 0xfc00ffff, 0x20006f3f, 0 , 0, | |
18197 | 0x0 }, /* POOL32Axf_4~*(55) */ | |
18198 | { instruction , 0 , 0 , 32, | |
18199 | 0xfc00ffff, 0x2000713f, &NMD::PRECEQU_PH_QBL , 0, | |
18200 | DSP_ }, /* PRECEQU.PH.QBL */ | |
18201 | { instruction , 0 , 0 , 32, | |
18202 | 0xfc00ffff, 0x2000733f, &NMD::PRECEQU_PH_QBLA , 0, | |
18203 | DSP_ }, /* PRECEQU.PH.QBLA */ | |
18204 | { reserved_block , 0 , 0 , 32, | |
18205 | 0xfc00ffff, 0x2000753f, 0 , 0, | |
18206 | 0x0 }, /* POOL32Axf_4~*(58) */ | |
18207 | { reserved_block , 0 , 0 , 32, | |
18208 | 0xfc00ffff, 0x2000773f, 0 , 0, | |
18209 | 0x0 }, /* POOL32Axf_4~*(59) */ | |
18210 | { reserved_block , 0 , 0 , 32, | |
18211 | 0xfc00ffff, 0x2000793f, 0 , 0, | |
18212 | 0x0 }, /* POOL32Axf_4~*(60) */ | |
18213 | { reserved_block , 0 , 0 , 32, | |
18214 | 0xfc00ffff, 0x20007b3f, 0 , 0, | |
18215 | 0x0 }, /* POOL32Axf_4~*(61) */ | |
18216 | { instruction , 0 , 0 , 32, | |
18217 | 0xfc00ffff, 0x20007d3f, &NMD::DMTC2 , 0, | |
18218 | CP2_ }, /* DMTC2 */ | |
18219 | { reserved_block , 0 , 0 , 32, | |
18220 | 0xfc00ffff, 0x20007f3f, 0 , 0, | |
18221 | 0x0 }, /* POOL32Axf_4~*(63) */ | |
18222 | { reserved_block , 0 , 0 , 32, | |
18223 | 0xfc00ffff, 0x2000813f, 0 , 0, | |
18224 | 0x0 }, /* POOL32Axf_4~*(64) */ | |
18225 | { reserved_block , 0 , 0 , 32, | |
18226 | 0xfc00ffff, 0x2000833f, 0 , 0, | |
18227 | 0x0 }, /* POOL32Axf_4~*(65) */ | |
18228 | { reserved_block , 0 , 0 , 32, | |
18229 | 0xfc00ffff, 0x2000853f, 0 , 0, | |
18230 | 0x0 }, /* POOL32Axf_4~*(66) */ | |
18231 | { reserved_block , 0 , 0 , 32, | |
18232 | 0xfc00ffff, 0x2000873f, 0 , 0, | |
18233 | 0x0 }, /* POOL32Axf_4~*(67) */ | |
18234 | { reserved_block , 0 , 0 , 32, | |
18235 | 0xfc00ffff, 0x2000893f, 0 , 0, | |
18236 | 0x0 }, /* POOL32Axf_4~*(68) */ | |
18237 | { reserved_block , 0 , 0 , 32, | |
18238 | 0xfc00ffff, 0x20008b3f, 0 , 0, | |
18239 | 0x0 }, /* POOL32Axf_4~*(69) */ | |
18240 | { instruction , 0 , 0 , 32, | |
18241 | 0xfc00ffff, 0x20008d3f, &NMD::MFHC2 , 0, | |
18242 | CP2_ }, /* MFHC2 */ | |
18243 | { reserved_block , 0 , 0 , 32, | |
18244 | 0xfc00ffff, 0x20008f3f, 0 , 0, | |
18245 | 0x0 }, /* POOL32Axf_4~*(71) */ | |
18246 | { instruction , 0 , 0 , 32, | |
18247 | 0xfc00ffff, 0x2000913f, &NMD::PRECEQU_PH_QBR , 0, | |
18248 | DSP_ }, /* PRECEQU.PH.QBR */ | |
18249 | { instruction , 0 , 0 , 32, | |
18250 | 0xfc00ffff, 0x2000933f, &NMD::PRECEQU_PH_QBRA , 0, | |
18251 | DSP_ }, /* PRECEQU.PH.QBRA */ | |
18252 | { reserved_block , 0 , 0 , 32, | |
18253 | 0xfc00ffff, 0x2000953f, 0 , 0, | |
18254 | 0x0 }, /* POOL32Axf_4~*(74) */ | |
18255 | { reserved_block , 0 , 0 , 32, | |
18256 | 0xfc00ffff, 0x2000973f, 0 , 0, | |
18257 | 0x0 }, /* POOL32Axf_4~*(75) */ | |
18258 | { reserved_block , 0 , 0 , 32, | |
18259 | 0xfc00ffff, 0x2000993f, 0 , 0, | |
18260 | 0x0 }, /* POOL32Axf_4~*(76) */ | |
18261 | { reserved_block , 0 , 0 , 32, | |
18262 | 0xfc00ffff, 0x20009b3f, 0 , 0, | |
18263 | 0x0 }, /* POOL32Axf_4~*(77) */ | |
18264 | { instruction , 0 , 0 , 32, | |
18265 | 0xfc00ffff, 0x20009d3f, &NMD::MTHC2 , 0, | |
18266 | CP2_ }, /* MTHC2 */ | |
18267 | { reserved_block , 0 , 0 , 32, | |
18268 | 0xfc00ffff, 0x20009f3f, 0 , 0, | |
18269 | 0x0 }, /* POOL32Axf_4~*(79) */ | |
18270 | { reserved_block , 0 , 0 , 32, | |
18271 | 0xfc00ffff, 0x2000a13f, 0 , 0, | |
18272 | 0x0 }, /* POOL32Axf_4~*(80) */ | |
18273 | { reserved_block , 0 , 0 , 32, | |
18274 | 0xfc00ffff, 0x2000a33f, 0 , 0, | |
18275 | 0x0 }, /* POOL32Axf_4~*(81) */ | |
18276 | { reserved_block , 0 , 0 , 32, | |
18277 | 0xfc00ffff, 0x2000a53f, 0 , 0, | |
18278 | 0x0 }, /* POOL32Axf_4~*(82) */ | |
18279 | { reserved_block , 0 , 0 , 32, | |
18280 | 0xfc00ffff, 0x2000a73f, 0 , 0, | |
18281 | 0x0 }, /* POOL32Axf_4~*(83) */ | |
18282 | { reserved_block , 0 , 0 , 32, | |
18283 | 0xfc00ffff, 0x2000a93f, 0 , 0, | |
18284 | 0x0 }, /* POOL32Axf_4~*(84) */ | |
18285 | { reserved_block , 0 , 0 , 32, | |
18286 | 0xfc00ffff, 0x2000ab3f, 0 , 0, | |
18287 | 0x0 }, /* POOL32Axf_4~*(85) */ | |
18288 | { reserved_block , 0 , 0 , 32, | |
18289 | 0xfc00ffff, 0x2000ad3f, 0 , 0, | |
18290 | 0x0 }, /* POOL32Axf_4~*(86) */ | |
18291 | { reserved_block , 0 , 0 , 32, | |
18292 | 0xfc00ffff, 0x2000af3f, 0 , 0, | |
18293 | 0x0 }, /* POOL32Axf_4~*(87) */ | |
18294 | { instruction , 0 , 0 , 32, | |
18295 | 0xfc00ffff, 0x2000b13f, &NMD::PRECEU_PH_QBL , 0, | |
18296 | DSP_ }, /* PRECEU.PH.QBL */ | |
18297 | { instruction , 0 , 0 , 32, | |
18298 | 0xfc00ffff, 0x2000b33f, &NMD::PRECEU_PH_QBLA , 0, | |
18299 | DSP_ }, /* PRECEU.PH.QBLA */ | |
18300 | { reserved_block , 0 , 0 , 32, | |
18301 | 0xfc00ffff, 0x2000b53f, 0 , 0, | |
18302 | 0x0 }, /* POOL32Axf_4~*(90) */ | |
18303 | { reserved_block , 0 , 0 , 32, | |
18304 | 0xfc00ffff, 0x2000b73f, 0 , 0, | |
18305 | 0x0 }, /* POOL32Axf_4~*(91) */ | |
18306 | { reserved_block , 0 , 0 , 32, | |
18307 | 0xfc00ffff, 0x2000b93f, 0 , 0, | |
18308 | 0x0 }, /* POOL32Axf_4~*(92) */ | |
18309 | { reserved_block , 0 , 0 , 32, | |
18310 | 0xfc00ffff, 0x2000bb3f, 0 , 0, | |
18311 | 0x0 }, /* POOL32Axf_4~*(93) */ | |
18312 | { reserved_block , 0 , 0 , 32, | |
18313 | 0xfc00ffff, 0x2000bd3f, 0 , 0, | |
18314 | 0x0 }, /* POOL32Axf_4~*(94) */ | |
18315 | { reserved_block , 0 , 0 , 32, | |
18316 | 0xfc00ffff, 0x2000bf3f, 0 , 0, | |
18317 | 0x0 }, /* POOL32Axf_4~*(95) */ | |
18318 | { reserved_block , 0 , 0 , 32, | |
18319 | 0xfc00ffff, 0x2000c13f, 0 , 0, | |
18320 | 0x0 }, /* POOL32Axf_4~*(96) */ | |
18321 | { reserved_block , 0 , 0 , 32, | |
18322 | 0xfc00ffff, 0x2000c33f, 0 , 0, | |
18323 | 0x0 }, /* POOL32Axf_4~*(97) */ | |
18324 | { reserved_block , 0 , 0 , 32, | |
18325 | 0xfc00ffff, 0x2000c53f, 0 , 0, | |
18326 | 0x0 }, /* POOL32Axf_4~*(98) */ | |
18327 | { reserved_block , 0 , 0 , 32, | |
18328 | 0xfc00ffff, 0x2000c73f, 0 , 0, | |
18329 | 0x0 }, /* POOL32Axf_4~*(99) */ | |
18330 | { reserved_block , 0 , 0 , 32, | |
18331 | 0xfc00ffff, 0x2000c93f, 0 , 0, | |
18332 | 0x0 }, /* POOL32Axf_4~*(100) */ | |
18333 | { reserved_block , 0 , 0 , 32, | |
18334 | 0xfc00ffff, 0x2000cb3f, 0 , 0, | |
18335 | 0x0 }, /* POOL32Axf_4~*(101) */ | |
18336 | { instruction , 0 , 0 , 32, | |
18337 | 0xfc00ffff, 0x2000cd3f, &NMD::CFC2 , 0, | |
18338 | CP2_ }, /* CFC2 */ | |
18339 | { reserved_block , 0 , 0 , 32, | |
18340 | 0xfc00ffff, 0x2000cf3f, 0 , 0, | |
18341 | 0x0 }, /* POOL32Axf_4~*(103) */ | |
18342 | { instruction , 0 , 0 , 32, | |
18343 | 0xfc00ffff, 0x2000d13f, &NMD::PRECEU_PH_QBR , 0, | |
18344 | DSP_ }, /* PRECEU.PH.QBR */ | |
18345 | { instruction , 0 , 0 , 32, | |
18346 | 0xfc00ffff, 0x2000d33f, &NMD::PRECEU_PH_QBRA , 0, | |
18347 | DSP_ }, /* PRECEU.PH.QBRA */ | |
18348 | { reserved_block , 0 , 0 , 32, | |
18349 | 0xfc00ffff, 0x2000d53f, 0 , 0, | |
18350 | 0x0 }, /* POOL32Axf_4~*(106) */ | |
18351 | { reserved_block , 0 , 0 , 32, | |
18352 | 0xfc00ffff, 0x2000d73f, 0 , 0, | |
18353 | 0x0 }, /* POOL32Axf_4~*(107) */ | |
18354 | { reserved_block , 0 , 0 , 32, | |
18355 | 0xfc00ffff, 0x2000d93f, 0 , 0, | |
18356 | 0x0 }, /* POOL32Axf_4~*(108) */ | |
18357 | { reserved_block , 0 , 0 , 32, | |
18358 | 0xfc00ffff, 0x2000db3f, 0 , 0, | |
18359 | 0x0 }, /* POOL32Axf_4~*(109) */ | |
18360 | { instruction , 0 , 0 , 32, | |
18361 | 0xfc00ffff, 0x2000dd3f, &NMD::CTC2 , 0, | |
18362 | CP2_ }, /* CTC2 */ | |
18363 | { reserved_block , 0 , 0 , 32, | |
18364 | 0xfc00ffff, 0x2000df3f, 0 , 0, | |
18365 | 0x0 }, /* POOL32Axf_4~*(111) */ | |
18366 | { reserved_block , 0 , 0 , 32, | |
18367 | 0xfc00ffff, 0x2000e13f, 0 , 0, | |
18368 | 0x0 }, /* POOL32Axf_4~*(112) */ | |
18369 | { reserved_block , 0 , 0 , 32, | |
18370 | 0xfc00ffff, 0x2000e33f, 0 , 0, | |
18371 | 0x0 }, /* POOL32Axf_4~*(113) */ | |
18372 | { reserved_block , 0 , 0 , 32, | |
18373 | 0xfc00ffff, 0x2000e53f, 0 , 0, | |
18374 | 0x0 }, /* POOL32Axf_4~*(114) */ | |
18375 | { reserved_block , 0 , 0 , 32, | |
18376 | 0xfc00ffff, 0x2000e73f, 0 , 0, | |
18377 | 0x0 }, /* POOL32Axf_4~*(115) */ | |
18378 | { reserved_block , 0 , 0 , 32, | |
18379 | 0xfc00ffff, 0x2000e93f, 0 , 0, | |
18380 | 0x0 }, /* POOL32Axf_4~*(116) */ | |
18381 | { reserved_block , 0 , 0 , 32, | |
18382 | 0xfc00ffff, 0x2000eb3f, 0 , 0, | |
18383 | 0x0 }, /* POOL32Axf_4~*(117) */ | |
18384 | { reserved_block , 0 , 0 , 32, | |
18385 | 0xfc00ffff, 0x2000ed3f, 0 , 0, | |
18386 | 0x0 }, /* POOL32Axf_4~*(118) */ | |
18387 | { reserved_block , 0 , 0 , 32, | |
18388 | 0xfc00ffff, 0x2000ef3f, 0 , 0, | |
18389 | 0x0 }, /* POOL32Axf_4~*(119) */ | |
18390 | { instruction , 0 , 0 , 32, | |
18391 | 0xfc00ffff, 0x2000f13f, &NMD::RADDU_W_QB , 0, | |
18392 | DSP_ }, /* RADDU.W.QB */ | |
18393 | { reserved_block , 0 , 0 , 32, | |
18394 | 0xfc00ffff, 0x2000f33f, 0 , 0, | |
18395 | 0x0 }, /* POOL32Axf_4~*(121) */ | |
18396 | { reserved_block , 0 , 0 , 32, | |
18397 | 0xfc00ffff, 0x2000f53f, 0 , 0, | |
18398 | 0x0 }, /* POOL32Axf_4~*(122) */ | |
18399 | { reserved_block , 0 , 0 , 32, | |
18400 | 0xfc00ffff, 0x2000f73f, 0 , 0, | |
18401 | 0x0 }, /* POOL32Axf_4~*(123) */ | |
18402 | { reserved_block , 0 , 0 , 32, | |
18403 | 0xfc00ffff, 0x2000f93f, 0 , 0, | |
18404 | 0x0 }, /* POOL32Axf_4~*(124) */ | |
18405 | { reserved_block , 0 , 0 , 32, | |
18406 | 0xfc00ffff, 0x2000fb3f, 0 , 0, | |
18407 | 0x0 }, /* POOL32Axf_4~*(125) */ | |
18408 | { reserved_block , 0 , 0 , 32, | |
18409 | 0xfc00ffff, 0x2000fd3f, 0 , 0, | |
18410 | 0x0 }, /* POOL32Axf_4~*(126) */ | |
18411 | { reserved_block , 0 , 0 , 32, | |
18412 | 0xfc00ffff, 0x2000ff3f, 0 , 0, | |
18413 | 0x0 }, /* POOL32Axf_4~*(127) */ | |
18414 | }; | |
18415 | ||
18416 | ||
18417 | NMD::Pool NMD::POOL32Axf_5_group0[32] = { | |
18418 | { instruction , 0 , 0 , 32, | |
18419 | 0xfc00ffff, 0x2000017f, &NMD::TLBGP , 0, | |
18420 | CP0_ | VZ_ | TLB_ }, /* TLBGP */ | |
18421 | { instruction , 0 , 0 , 32, | |
18422 | 0xfc00ffff, 0x2000037f, &NMD::TLBP , 0, | |
18423 | CP0_ | TLB_ }, /* TLBP */ | |
18424 | { instruction , 0 , 0 , 32, | |
18425 | 0xfc00ffff, 0x2000057f, &NMD::TLBGINV , 0, | |
18426 | CP0_ | VZ_ | TLB_ | TLBINV_}, /* TLBGINV */ | |
18427 | { instruction , 0 , 0 , 32, | |
18428 | 0xfc00ffff, 0x2000077f, &NMD::TLBINV , 0, | |
18429 | CP0_ | TLB_ | TLBINV_}, /* TLBINV */ | |
18430 | { reserved_block , 0 , 0 , 32, | |
18431 | 0xfc00ffff, 0x2000097f, 0 , 0, | |
18432 | 0x0 }, /* POOL32Axf_5_group0~*(4) */ | |
18433 | { reserved_block , 0 , 0 , 32, | |
18434 | 0xfc00ffff, 0x20000b7f, 0 , 0, | |
18435 | 0x0 }, /* POOL32Axf_5_group0~*(5) */ | |
18436 | { reserved_block , 0 , 0 , 32, | |
18437 | 0xfc00ffff, 0x20000d7f, 0 , 0, | |
18438 | 0x0 }, /* POOL32Axf_5_group0~*(6) */ | |
18439 | { reserved_block , 0 , 0 , 32, | |
18440 | 0xfc00ffff, 0x20000f7f, 0 , 0, | |
18441 | 0x0 }, /* POOL32Axf_5_group0~*(7) */ | |
18442 | { instruction , 0 , 0 , 32, | |
18443 | 0xfc00ffff, 0x2000117f, &NMD::TLBGR , 0, | |
18444 | CP0_ | VZ_ | TLB_ }, /* TLBGR */ | |
18445 | { instruction , 0 , 0 , 32, | |
18446 | 0xfc00ffff, 0x2000137f, &NMD::TLBR , 0, | |
18447 | CP0_ | TLB_ }, /* TLBR */ | |
18448 | { instruction , 0 , 0 , 32, | |
18449 | 0xfc00ffff, 0x2000157f, &NMD::TLBGINVF , 0, | |
18450 | CP0_ | VZ_ | TLB_ | TLBINV_}, /* TLBGINVF */ | |
18451 | { instruction , 0 , 0 , 32, | |
18452 | 0xfc00ffff, 0x2000177f, &NMD::TLBINVF , 0, | |
18453 | CP0_ | TLB_ | TLBINV_}, /* TLBINVF */ | |
18454 | { reserved_block , 0 , 0 , 32, | |
18455 | 0xfc00ffff, 0x2000197f, 0 , 0, | |
18456 | 0x0 }, /* POOL32Axf_5_group0~*(12) */ | |
18457 | { reserved_block , 0 , 0 , 32, | |
18458 | 0xfc00ffff, 0x20001b7f, 0 , 0, | |
18459 | 0x0 }, /* POOL32Axf_5_group0~*(13) */ | |
18460 | { reserved_block , 0 , 0 , 32, | |
18461 | 0xfc00ffff, 0x20001d7f, 0 , 0, | |
18462 | 0x0 }, /* POOL32Axf_5_group0~*(14) */ | |
18463 | { reserved_block , 0 , 0 , 32, | |
18464 | 0xfc00ffff, 0x20001f7f, 0 , 0, | |
18465 | 0x0 }, /* POOL32Axf_5_group0~*(15) */ | |
18466 | { instruction , 0 , 0 , 32, | |
18467 | 0xfc00ffff, 0x2000217f, &NMD::TLBGWI , 0, | |
18468 | CP0_ | VZ_ | TLB_ }, /* TLBGWI */ | |
18469 | { instruction , 0 , 0 , 32, | |
18470 | 0xfc00ffff, 0x2000237f, &NMD::TLBWI , 0, | |
18471 | CP0_ | TLB_ }, /* TLBWI */ | |
18472 | { reserved_block , 0 , 0 , 32, | |
18473 | 0xfc00ffff, 0x2000257f, 0 , 0, | |
18474 | 0x0 }, /* POOL32Axf_5_group0~*(18) */ | |
18475 | { reserved_block , 0 , 0 , 32, | |
18476 | 0xfc00ffff, 0x2000277f, 0 , 0, | |
18477 | 0x0 }, /* POOL32Axf_5_group0~*(19) */ | |
18478 | { reserved_block , 0 , 0 , 32, | |
18479 | 0xfc00ffff, 0x2000297f, 0 , 0, | |
18480 | 0x0 }, /* POOL32Axf_5_group0~*(20) */ | |
18481 | { reserved_block , 0 , 0 , 32, | |
18482 | 0xfc00ffff, 0x20002b7f, 0 , 0, | |
18483 | 0x0 }, /* POOL32Axf_5_group0~*(21) */ | |
18484 | { reserved_block , 0 , 0 , 32, | |
18485 | 0xfc00ffff, 0x20002d7f, 0 , 0, | |
18486 | 0x0 }, /* POOL32Axf_5_group0~*(22) */ | |
18487 | { reserved_block , 0 , 0 , 32, | |
18488 | 0xfc00ffff, 0x20002f7f, 0 , 0, | |
18489 | 0x0 }, /* POOL32Axf_5_group0~*(23) */ | |
18490 | { instruction , 0 , 0 , 32, | |
18491 | 0xfc00ffff, 0x2000317f, &NMD::TLBGWR , 0, | |
18492 | CP0_ | VZ_ | TLB_ }, /* TLBGWR */ | |
18493 | { instruction , 0 , 0 , 32, | |
18494 | 0xfc00ffff, 0x2000337f, &NMD::TLBWR , 0, | |
18495 | CP0_ | TLB_ }, /* TLBWR */ | |
18496 | { reserved_block , 0 , 0 , 32, | |
18497 | 0xfc00ffff, 0x2000357f, 0 , 0, | |
18498 | 0x0 }, /* POOL32Axf_5_group0~*(26) */ | |
18499 | { reserved_block , 0 , 0 , 32, | |
18500 | 0xfc00ffff, 0x2000377f, 0 , 0, | |
18501 | 0x0 }, /* POOL32Axf_5_group0~*(27) */ | |
18502 | { reserved_block , 0 , 0 , 32, | |
18503 | 0xfc00ffff, 0x2000397f, 0 , 0, | |
18504 | 0x0 }, /* POOL32Axf_5_group0~*(28) */ | |
18505 | { reserved_block , 0 , 0 , 32, | |
18506 | 0xfc00ffff, 0x20003b7f, 0 , 0, | |
18507 | 0x0 }, /* POOL32Axf_5_group0~*(29) */ | |
18508 | { reserved_block , 0 , 0 , 32, | |
18509 | 0xfc00ffff, 0x20003d7f, 0 , 0, | |
18510 | 0x0 }, /* POOL32Axf_5_group0~*(30) */ | |
18511 | { reserved_block , 0 , 0 , 32, | |
18512 | 0xfc00ffff, 0x20003f7f, 0 , 0, | |
18513 | 0x0 }, /* POOL32Axf_5_group0~*(31) */ | |
18514 | }; | |
18515 | ||
18516 | ||
18517 | NMD::Pool NMD::POOL32Axf_5_group1[32] = { | |
18518 | { reserved_block , 0 , 0 , 32, | |
18519 | 0xfc00ffff, 0x2000417f, 0 , 0, | |
18520 | 0x0 }, /* POOL32Axf_5_group1~*(0) */ | |
18521 | { reserved_block , 0 , 0 , 32, | |
18522 | 0xfc00ffff, 0x2000437f, 0 , 0, | |
18523 | 0x0 }, /* POOL32Axf_5_group1~*(1) */ | |
18524 | { reserved_block , 0 , 0 , 32, | |
18525 | 0xfc00ffff, 0x2000457f, 0 , 0, | |
18526 | 0x0 }, /* POOL32Axf_5_group1~*(2) */ | |
18527 | { instruction , 0 , 0 , 32, | |
18528 | 0xfc00ffff, 0x2000477f, &NMD::DI , 0, | |
18529 | 0x0 }, /* DI */ | |
18530 | { reserved_block , 0 , 0 , 32, | |
18531 | 0xfc00ffff, 0x2000497f, 0 , 0, | |
18532 | 0x0 }, /* POOL32Axf_5_group1~*(4) */ | |
18533 | { reserved_block , 0 , 0 , 32, | |
18534 | 0xfc00ffff, 0x20004b7f, 0 , 0, | |
18535 | 0x0 }, /* POOL32Axf_5_group1~*(5) */ | |
18536 | { reserved_block , 0 , 0 , 32, | |
18537 | 0xfc00ffff, 0x20004d7f, 0 , 0, | |
18538 | 0x0 }, /* POOL32Axf_5_group1~*(6) */ | |
18539 | { reserved_block , 0 , 0 , 32, | |
18540 | 0xfc00ffff, 0x20004f7f, 0 , 0, | |
18541 | 0x0 }, /* POOL32Axf_5_group1~*(7) */ | |
18542 | { reserved_block , 0 , 0 , 32, | |
18543 | 0xfc00ffff, 0x2000517f, 0 , 0, | |
18544 | 0x0 }, /* POOL32Axf_5_group1~*(8) */ | |
18545 | { reserved_block , 0 , 0 , 32, | |
18546 | 0xfc00ffff, 0x2000537f, 0 , 0, | |
18547 | 0x0 }, /* POOL32Axf_5_group1~*(9) */ | |
18548 | { reserved_block , 0 , 0 , 32, | |
18549 | 0xfc00ffff, 0x2000557f, 0 , 0, | |
18550 | 0x0 }, /* POOL32Axf_5_group1~*(10) */ | |
18551 | { instruction , 0 , 0 , 32, | |
18552 | 0xfc00ffff, 0x2000577f, &NMD::EI , 0, | |
18553 | 0x0 }, /* EI */ | |
18554 | { reserved_block , 0 , 0 , 32, | |
18555 | 0xfc00ffff, 0x2000597f, 0 , 0, | |
18556 | 0x0 }, /* POOL32Axf_5_group1~*(12) */ | |
18557 | { reserved_block , 0 , 0 , 32, | |
18558 | 0xfc00ffff, 0x20005b7f, 0 , 0, | |
18559 | 0x0 }, /* POOL32Axf_5_group1~*(13) */ | |
18560 | { reserved_block , 0 , 0 , 32, | |
18561 | 0xfc00ffff, 0x20005d7f, 0 , 0, | |
18562 | 0x0 }, /* POOL32Axf_5_group1~*(14) */ | |
18563 | { reserved_block , 0 , 0 , 32, | |
18564 | 0xfc00ffff, 0x20005f7f, 0 , 0, | |
18565 | 0x0 }, /* POOL32Axf_5_group1~*(15) */ | |
18566 | { reserved_block , 0 , 0 , 32, | |
18567 | 0xfc00ffff, 0x2000617f, 0 , 0, | |
18568 | 0x0 }, /* POOL32Axf_5_group1~*(16) */ | |
18569 | { reserved_block , 0 , 0 , 32, | |
18570 | 0xfc00ffff, 0x2000637f, 0 , 0, | |
18571 | 0x0 }, /* POOL32Axf_5_group1~*(17) */ | |
18572 | { reserved_block , 0 , 0 , 32, | |
18573 | 0xfc00ffff, 0x2000657f, 0 , 0, | |
18574 | 0x0 }, /* POOL32Axf_5_group1~*(18) */ | |
18575 | { reserved_block , 0 , 0 , 32, | |
18576 | 0xfc00ffff, 0x2000677f, 0 , 0, | |
18577 | 0x0 }, /* POOL32Axf_5_group1~*(19) */ | |
18578 | { reserved_block , 0 , 0 , 32, | |
18579 | 0xfc00ffff, 0x2000697f, 0 , 0, | |
18580 | 0x0 }, /* POOL32Axf_5_group1~*(20) */ | |
18581 | { reserved_block , 0 , 0 , 32, | |
18582 | 0xfc00ffff, 0x20006b7f, 0 , 0, | |
18583 | 0x0 }, /* POOL32Axf_5_group1~*(21) */ | |
18584 | { reserved_block , 0 , 0 , 32, | |
18585 | 0xfc00ffff, 0x20006d7f, 0 , 0, | |
18586 | 0x0 }, /* POOL32Axf_5_group1~*(22) */ | |
18587 | { reserved_block , 0 , 0 , 32, | |
18588 | 0xfc00ffff, 0x20006f7f, 0 , 0, | |
18589 | 0x0 }, /* POOL32Axf_5_group1~*(23) */ | |
18590 | { reserved_block , 0 , 0 , 32, | |
18591 | 0xfc00ffff, 0x2000717f, 0 , 0, | |
18592 | 0x0 }, /* POOL32Axf_5_group1~*(24) */ | |
18593 | { reserved_block , 0 , 0 , 32, | |
18594 | 0xfc00ffff, 0x2000737f, 0 , 0, | |
18595 | 0x0 }, /* POOL32Axf_5_group1~*(25) */ | |
18596 | { reserved_block , 0 , 0 , 32, | |
18597 | 0xfc00ffff, 0x2000757f, 0 , 0, | |
18598 | 0x0 }, /* POOL32Axf_5_group1~*(26) */ | |
18599 | { reserved_block , 0 , 0 , 32, | |
18600 | 0xfc00ffff, 0x2000777f, 0 , 0, | |
18601 | 0x0 }, /* POOL32Axf_5_group1~*(27) */ | |
18602 | { reserved_block , 0 , 0 , 32, | |
18603 | 0xfc00ffff, 0x2000797f, 0 , 0, | |
18604 | 0x0 }, /* POOL32Axf_5_group1~*(28) */ | |
18605 | { reserved_block , 0 , 0 , 32, | |
18606 | 0xfc00ffff, 0x20007b7f, 0 , 0, | |
18607 | 0x0 }, /* POOL32Axf_5_group1~*(29) */ | |
18608 | { reserved_block , 0 , 0 , 32, | |
18609 | 0xfc00ffff, 0x20007d7f, 0 , 0, | |
18610 | 0x0 }, /* POOL32Axf_5_group1~*(30) */ | |
18611 | { reserved_block , 0 , 0 , 32, | |
18612 | 0xfc00ffff, 0x20007f7f, 0 , 0, | |
18613 | 0x0 }, /* POOL32Axf_5_group1~*(31) */ | |
18614 | }; | |
18615 | ||
18616 | ||
18617 | NMD::Pool NMD::ERETx[2] = { | |
18618 | { instruction , 0 , 0 , 32, | |
18619 | 0xfc01ffff, 0x2000f37f, &NMD::ERET , 0, | |
18620 | 0x0 }, /* ERET */ | |
18621 | { instruction , 0 , 0 , 32, | |
18622 | 0xfc01ffff, 0x2001f37f, &NMD::ERETNC , 0, | |
18623 | 0x0 }, /* ERETNC */ | |
18624 | }; | |
18625 | ||
18626 | ||
18627 | NMD::Pool NMD::POOL32Axf_5_group3[32] = { | |
18628 | { reserved_block , 0 , 0 , 32, | |
18629 | 0xfc00ffff, 0x2000c17f, 0 , 0, | |
18630 | 0x0 }, /* POOL32Axf_5_group3~*(0) */ | |
18631 | { instruction , 0 , 0 , 32, | |
18632 | 0xfc00ffff, 0x2000c37f, &NMD::WAIT , 0, | |
18633 | 0x0 }, /* WAIT */ | |
18634 | { reserved_block , 0 , 0 , 32, | |
18635 | 0xfc00ffff, 0x2000c57f, 0 , 0, | |
18636 | 0x0 }, /* POOL32Axf_5_group3~*(2) */ | |
18637 | { reserved_block , 0 , 0 , 32, | |
18638 | 0xfc00ffff, 0x2000c77f, 0 , 0, | |
18639 | 0x0 }, /* POOL32Axf_5_group3~*(3) */ | |
18640 | { reserved_block , 0 , 0 , 32, | |
18641 | 0xfc00ffff, 0x2000c97f, 0 , 0, | |
18642 | 0x0 }, /* POOL32Axf_5_group3~*(4) */ | |
18643 | { reserved_block , 0 , 0 , 32, | |
18644 | 0xfc00ffff, 0x2000cb7f, 0 , 0, | |
18645 | 0x0 }, /* POOL32Axf_5_group3~*(5) */ | |
18646 | { reserved_block , 0 , 0 , 32, | |
18647 | 0xfc00ffff, 0x2000cd7f, 0 , 0, | |
18648 | 0x0 }, /* POOL32Axf_5_group3~*(6) */ | |
18649 | { reserved_block , 0 , 0 , 32, | |
18650 | 0xfc00ffff, 0x2000cf7f, 0 , 0, | |
18651 | 0x0 }, /* POOL32Axf_5_group3~*(7) */ | |
18652 | { reserved_block , 0 , 0 , 32, | |
18653 | 0xfc00ffff, 0x2000d17f, 0 , 0, | |
18654 | 0x0 }, /* POOL32Axf_5_group3~*(8) */ | |
18655 | { instruction , 0 , 0 , 32, | |
18656 | 0xfc00ffff, 0x2000d37f, &NMD::IRET , 0, | |
18657 | MCU_ }, /* IRET */ | |
18658 | { reserved_block , 0 , 0 , 32, | |
18659 | 0xfc00ffff, 0x2000d57f, 0 , 0, | |
18660 | 0x0 }, /* POOL32Axf_5_group3~*(10) */ | |
18661 | { reserved_block , 0 , 0 , 32, | |
18662 | 0xfc00ffff, 0x2000d77f, 0 , 0, | |
18663 | 0x0 }, /* POOL32Axf_5_group3~*(11) */ | |
18664 | { reserved_block , 0 , 0 , 32, | |
18665 | 0xfc00ffff, 0x2000d97f, 0 , 0, | |
18666 | 0x0 }, /* POOL32Axf_5_group3~*(12) */ | |
18667 | { reserved_block , 0 , 0 , 32, | |
18668 | 0xfc00ffff, 0x2000db7f, 0 , 0, | |
18669 | 0x0 }, /* POOL32Axf_5_group3~*(13) */ | |
18670 | { reserved_block , 0 , 0 , 32, | |
18671 | 0xfc00ffff, 0x2000dd7f, 0 , 0, | |
18672 | 0x0 }, /* POOL32Axf_5_group3~*(14) */ | |
18673 | { reserved_block , 0 , 0 , 32, | |
18674 | 0xfc00ffff, 0x2000df7f, 0 , 0, | |
18675 | 0x0 }, /* POOL32Axf_5_group3~*(15) */ | |
18676 | { instruction , 0 , 0 , 32, | |
18677 | 0xfc00ffff, 0x2000e17f, &NMD::RDPGPR , 0, | |
18678 | CP0_ }, /* RDPGPR */ | |
18679 | { instruction , 0 , 0 , 32, | |
18680 | 0xfc00ffff, 0x2000e37f, &NMD::DERET , 0, | |
18681 | EJTAG_ }, /* DERET */ | |
18682 | { reserved_block , 0 , 0 , 32, | |
18683 | 0xfc00ffff, 0x2000e57f, 0 , 0, | |
18684 | 0x0 }, /* POOL32Axf_5_group3~*(18) */ | |
18685 | { reserved_block , 0 , 0 , 32, | |
18686 | 0xfc00ffff, 0x2000e77f, 0 , 0, | |
18687 | 0x0 }, /* POOL32Axf_5_group3~*(19) */ | |
18688 | { reserved_block , 0 , 0 , 32, | |
18689 | 0xfc00ffff, 0x2000e97f, 0 , 0, | |
18690 | 0x0 }, /* POOL32Axf_5_group3~*(20) */ | |
18691 | { reserved_block , 0 , 0 , 32, | |
18692 | 0xfc00ffff, 0x2000eb7f, 0 , 0, | |
18693 | 0x0 }, /* POOL32Axf_5_group3~*(21) */ | |
18694 | { reserved_block , 0 , 0 , 32, | |
18695 | 0xfc00ffff, 0x2000ed7f, 0 , 0, | |
18696 | 0x0 }, /* POOL32Axf_5_group3~*(22) */ | |
18697 | { reserved_block , 0 , 0 , 32, | |
18698 | 0xfc00ffff, 0x2000ef7f, 0 , 0, | |
18699 | 0x0 }, /* POOL32Axf_5_group3~*(23) */ | |
18700 | { instruction , 0 , 0 , 32, | |
18701 | 0xfc00ffff, 0x2000f17f, &NMD::WRPGPR , 0, | |
18702 | CP0_ }, /* WRPGPR */ | |
18703 | { pool , ERETx , 2 , 32, | |
18704 | 0xfc00ffff, 0x2000f37f, 0 , 0, | |
18705 | 0x0 }, /* ERETx */ | |
18706 | { reserved_block , 0 , 0 , 32, | |
18707 | 0xfc00ffff, 0x2000f57f, 0 , 0, | |
18708 | 0x0 }, /* POOL32Axf_5_group3~*(26) */ | |
18709 | { reserved_block , 0 , 0 , 32, | |
18710 | 0xfc00ffff, 0x2000f77f, 0 , 0, | |
18711 | 0x0 }, /* POOL32Axf_5_group3~*(27) */ | |
18712 | { reserved_block , 0 , 0 , 32, | |
18713 | 0xfc00ffff, 0x2000f97f, 0 , 0, | |
18714 | 0x0 }, /* POOL32Axf_5_group3~*(28) */ | |
18715 | { reserved_block , 0 , 0 , 32, | |
18716 | 0xfc00ffff, 0x2000fb7f, 0 , 0, | |
18717 | 0x0 }, /* POOL32Axf_5_group3~*(29) */ | |
18718 | { reserved_block , 0 , 0 , 32, | |
18719 | 0xfc00ffff, 0x2000fd7f, 0 , 0, | |
18720 | 0x0 }, /* POOL32Axf_5_group3~*(30) */ | |
18721 | { reserved_block , 0 , 0 , 32, | |
18722 | 0xfc00ffff, 0x2000ff7f, 0 , 0, | |
18723 | 0x0 }, /* POOL32Axf_5_group3~*(31) */ | |
18724 | }; | |
18725 | ||
18726 | ||
18727 | NMD::Pool NMD::POOL32Axf_5[4] = { | |
18728 | { pool , POOL32Axf_5_group0 , 32 , 32, | |
18729 | 0xfc00c1ff, 0x2000017f, 0 , 0, | |
18730 | 0x0 }, /* POOL32Axf_5_group0 */ | |
18731 | { pool , POOL32Axf_5_group1 , 32 , 32, | |
18732 | 0xfc00c1ff, 0x2000417f, 0 , 0, | |
18733 | 0x0 }, /* POOL32Axf_5_group1 */ | |
18734 | { reserved_block , 0 , 0 , 32, | |
18735 | 0xfc00c1ff, 0x2000817f, 0 , 0, | |
18736 | 0x0 }, /* POOL32Axf_5~*(2) */ | |
18737 | { pool , POOL32Axf_5_group3 , 32 , 32, | |
18738 | 0xfc00c1ff, 0x2000c17f, 0 , 0, | |
18739 | 0x0 }, /* POOL32Axf_5_group3 */ | |
18740 | }; | |
18741 | ||
18742 | ||
18743 | NMD::Pool NMD::SHRA__R__QB[2] = { | |
18744 | { instruction , 0 , 0 , 32, | |
18745 | 0xfc001fff, 0x200001ff, &NMD::SHRA_QB , 0, | |
18746 | DSP_ }, /* SHRA.QB */ | |
18747 | { instruction , 0 , 0 , 32, | |
18748 | 0xfc001fff, 0x200011ff, &NMD::SHRA_R_QB , 0, | |
18749 | DSP_ }, /* SHRA_R.QB */ | |
18750 | }; | |
18751 | ||
18752 | ||
18753 | NMD::Pool NMD::POOL32Axf_7[8] = { | |
18754 | { pool , SHRA__R__QB , 2 , 32, | |
18755 | 0xfc000fff, 0x200001ff, 0 , 0, | |
18756 | 0x0 }, /* SHRA[_R].QB */ | |
18757 | { instruction , 0 , 0 , 32, | |
18758 | 0xfc000fff, 0x200003ff, &NMD::SHRL_PH , 0, | |
18759 | DSP_ }, /* SHRL.PH */ | |
18760 | { instruction , 0 , 0 , 32, | |
18761 | 0xfc000fff, 0x200005ff, &NMD::REPL_QB , 0, | |
18762 | DSP_ }, /* REPL.QB */ | |
18763 | { reserved_block , 0 , 0 , 32, | |
18764 | 0xfc000fff, 0x200007ff, 0 , 0, | |
18765 | 0x0 }, /* POOL32Axf_7~*(3) */ | |
18766 | { reserved_block , 0 , 0 , 32, | |
18767 | 0xfc000fff, 0x200009ff, 0 , 0, | |
18768 | 0x0 }, /* POOL32Axf_7~*(4) */ | |
18769 | { reserved_block , 0 , 0 , 32, | |
18770 | 0xfc000fff, 0x20000bff, 0 , 0, | |
18771 | 0x0 }, /* POOL32Axf_7~*(5) */ | |
18772 | { reserved_block , 0 , 0 , 32, | |
18773 | 0xfc000fff, 0x20000dff, 0 , 0, | |
18774 | 0x0 }, /* POOL32Axf_7~*(6) */ | |
18775 | { reserved_block , 0 , 0 , 32, | |
18776 | 0xfc000fff, 0x20000fff, 0 , 0, | |
18777 | 0x0 }, /* POOL32Axf_7~*(7) */ | |
18778 | }; | |
18779 | ||
18780 | ||
18781 | NMD::Pool NMD::POOL32Axf[8] = { | |
18782 | { reserved_block , 0 , 0 , 32, | |
18783 | 0xfc0001ff, 0x2000003f, 0 , 0, | |
18784 | 0x0 }, /* POOL32Axf~*(0) */ | |
18785 | { pool , POOL32Axf_1 , 8 , 32, | |
18786 | 0xfc0001ff, 0x2000007f, 0 , 0, | |
18787 | 0x0 }, /* POOL32Axf_1 */ | |
18788 | { pool , POOL32Axf_2 , 4 , 32, | |
18789 | 0xfc0001ff, 0x200000bf, 0 , 0, | |
18790 | 0x0 }, /* POOL32Axf_2 */ | |
18791 | { reserved_block , 0 , 0 , 32, | |
18792 | 0xfc0001ff, 0x200000ff, 0 , 0, | |
18793 | 0x0 }, /* POOL32Axf~*(3) */ | |
18794 | { pool , POOL32Axf_4 , 128 , 32, | |
18795 | 0xfc0001ff, 0x2000013f, 0 , 0, | |
18796 | 0x0 }, /* POOL32Axf_4 */ | |
18797 | { pool , POOL32Axf_5 , 4 , 32, | |
18798 | 0xfc0001ff, 0x2000017f, 0 , 0, | |
18799 | 0x0 }, /* POOL32Axf_5 */ | |
18800 | { reserved_block , 0 , 0 , 32, | |
18801 | 0xfc0001ff, 0x200001bf, 0 , 0, | |
18802 | 0x0 }, /* POOL32Axf~*(6) */ | |
18803 | { pool , POOL32Axf_7 , 8 , 32, | |
18804 | 0xfc0001ff, 0x200001ff, 0 , 0, | |
18805 | 0x0 }, /* POOL32Axf_7 */ | |
18806 | }; | |
18807 | ||
18808 | ||
18809 | NMD::Pool NMD::_POOL32A7[8] = { | |
18810 | { pool , P_LSX , 2 , 32, | |
18811 | 0xfc00003f, 0x20000007, 0 , 0, | |
18812 | 0x0 }, /* P.LSX */ | |
18813 | { instruction , 0 , 0 , 32, | |
18814 | 0xfc00003f, 0x2000000f, &NMD::LSA , 0, | |
18815 | 0x0 }, /* LSA */ | |
18816 | { reserved_block , 0 , 0 , 32, | |
18817 | 0xfc00003f, 0x20000017, 0 , 0, | |
18818 | 0x0 }, /* _POOL32A7~*(2) */ | |
18819 | { instruction , 0 , 0 , 32, | |
18820 | 0xfc00003f, 0x2000001f, &NMD::EXTW , 0, | |
18821 | 0x0 }, /* EXTW */ | |
18822 | { reserved_block , 0 , 0 , 32, | |
18823 | 0xfc00003f, 0x20000027, 0 , 0, | |
18824 | 0x0 }, /* _POOL32A7~*(4) */ | |
18825 | { reserved_block , 0 , 0 , 32, | |
18826 | 0xfc00003f, 0x2000002f, 0 , 0, | |
18827 | 0x0 }, /* _POOL32A7~*(5) */ | |
18828 | { reserved_block , 0 , 0 , 32, | |
18829 | 0xfc00003f, 0x20000037, 0 , 0, | |
18830 | 0x0 }, /* _POOL32A7~*(6) */ | |
18831 | { pool , POOL32Axf , 8 , 32, | |
18832 | 0xfc00003f, 0x2000003f, 0 , 0, | |
18833 | 0x0 }, /* POOL32Axf */ | |
18834 | }; | |
18835 | ||
18836 | ||
18837 | NMD::Pool NMD::P32A[8] = { | |
18838 | { pool , _POOL32A0 , 128 , 32, | |
18839 | 0xfc000007, 0x20000000, 0 , 0, | |
18840 | 0x0 }, /* _POOL32A0 */ | |
18841 | { instruction , 0 , 0 , 32, | |
18842 | 0xfc000007, 0x20000001, &NMD::SPECIAL2 , 0, | |
18843 | UDI_ }, /* SPECIAL2 */ | |
18844 | { instruction , 0 , 0 , 32, | |
18845 | 0xfc000007, 0x20000002, &NMD::COP2_1 , 0, | |
18846 | CP2_ }, /* COP2_1 */ | |
18847 | { instruction , 0 , 0 , 32, | |
18848 | 0xfc000007, 0x20000003, &NMD::UDI , 0, | |
18849 | UDI_ }, /* UDI */ | |
18850 | { reserved_block , 0 , 0 , 32, | |
18851 | 0xfc000007, 0x20000004, 0 , 0, | |
18852 | 0x0 }, /* P32A~*(4) */ | |
18853 | { pool , _POOL32A5 , 128 , 32, | |
18854 | 0xfc000007, 0x20000005, 0 , 0, | |
18855 | 0x0 }, /* _POOL32A5 */ | |
18856 | { reserved_block , 0 , 0 , 32, | |
18857 | 0xfc000007, 0x20000006, 0 , 0, | |
18858 | 0x0 }, /* P32A~*(6) */ | |
18859 | { pool , _POOL32A7 , 8 , 32, | |
18860 | 0xfc000007, 0x20000007, 0 , 0, | |
18861 | 0x0 }, /* _POOL32A7 */ | |
18862 | }; | |
18863 | ||
18864 | ||
18865 | NMD::Pool NMD::P_GP_D[2] = { | |
18866 | { instruction , 0 , 0 , 32, | |
18867 | 0xfc000007, 0x40000001, &NMD::LD_GP_ , 0, | |
18868 | MIPS64_ }, /* LD[GP] */ | |
18869 | { instruction , 0 , 0 , 32, | |
18870 | 0xfc000007, 0x40000005, &NMD::SD_GP_ , 0, | |
18871 | MIPS64_ }, /* SD[GP] */ | |
18872 | }; | |
18873 | ||
18874 | ||
18875 | NMD::Pool NMD::P_GP_W[4] = { | |
18876 | { instruction , 0 , 0 , 32, | |
18877 | 0xfc000003, 0x40000000, &NMD::ADDIU_GP_W_ , 0, | |
18878 | 0x0 }, /* ADDIU[GP.W] */ | |
18879 | { pool , P_GP_D , 2 , 32, | |
18880 | 0xfc000003, 0x40000001, 0 , 0, | |
18881 | 0x0 }, /* P.GP.D */ | |
18882 | { instruction , 0 , 0 , 32, | |
18883 | 0xfc000003, 0x40000002, &NMD::LW_GP_ , 0, | |
18884 | 0x0 }, /* LW[GP] */ | |
18885 | { instruction , 0 , 0 , 32, | |
18886 | 0xfc000003, 0x40000003, &NMD::SW_GP_ , 0, | |
18887 | 0x0 }, /* SW[GP] */ | |
18888 | }; | |
18889 | ||
18890 | ||
18891 | NMD::Pool NMD::POOL48I[32] = { | |
18892 | { instruction , 0 , 0 , 48, | |
18893 | 0xfc1f00000000ull, 0x600000000000ull, &NMD::LI_48_ , 0, | |
18894 | XMMS_ }, /* LI[48] */ | |
18895 | { instruction , 0 , 0 , 48, | |
18896 | 0xfc1f00000000ull, 0x600100000000ull, &NMD::ADDIU_48_ , 0, | |
18897 | XMMS_ }, /* ADDIU[48] */ | |
18898 | { instruction , 0 , 0 , 48, | |
18899 | 0xfc1f00000000ull, 0x600200000000ull, &NMD::ADDIU_GP48_ , 0, | |
18900 | XMMS_ }, /* ADDIU[GP48] */ | |
18901 | { instruction , 0 , 0 , 48, | |
18902 | 0xfc1f00000000ull, 0x600300000000ull, &NMD::ADDIUPC_48_ , 0, | |
18903 | XMMS_ }, /* ADDIUPC[48] */ | |
18904 | { reserved_block , 0 , 0 , 48, | |
18905 | 0xfc1f00000000ull, 0x600400000000ull, 0 , 0, | |
18906 | 0x0 }, /* POOL48I~*(4) */ | |
18907 | { reserved_block , 0 , 0 , 48, | |
18908 | 0xfc1f00000000ull, 0x600500000000ull, 0 , 0, | |
18909 | 0x0 }, /* POOL48I~*(5) */ | |
18910 | { reserved_block , 0 , 0 , 48, | |
18911 | 0xfc1f00000000ull, 0x600600000000ull, 0 , 0, | |
18912 | 0x0 }, /* POOL48I~*(6) */ | |
18913 | { reserved_block , 0 , 0 , 48, | |
18914 | 0xfc1f00000000ull, 0x600700000000ull, 0 , 0, | |
18915 | 0x0 }, /* POOL48I~*(7) */ | |
18916 | { reserved_block , 0 , 0 , 48, | |
18917 | 0xfc1f00000000ull, 0x600800000000ull, 0 , 0, | |
18918 | 0x0 }, /* POOL48I~*(8) */ | |
18919 | { reserved_block , 0 , 0 , 48, | |
18920 | 0xfc1f00000000ull, 0x600900000000ull, 0 , 0, | |
18921 | 0x0 }, /* POOL48I~*(9) */ | |
18922 | { reserved_block , 0 , 0 , 48, | |
18923 | 0xfc1f00000000ull, 0x600a00000000ull, 0 , 0, | |
18924 | 0x0 }, /* POOL48I~*(10) */ | |
18925 | { instruction , 0 , 0 , 48, | |
18926 | 0xfc1f00000000ull, 0x600b00000000ull, &NMD::LWPC_48_ , 0, | |
18927 | XMMS_ }, /* LWPC[48] */ | |
18928 | { reserved_block , 0 , 0 , 48, | |
18929 | 0xfc1f00000000ull, 0x600c00000000ull, 0 , 0, | |
18930 | 0x0 }, /* POOL48I~*(12) */ | |
18931 | { reserved_block , 0 , 0 , 48, | |
18932 | 0xfc1f00000000ull, 0x600d00000000ull, 0 , 0, | |
18933 | 0x0 }, /* POOL48I~*(13) */ | |
18934 | { reserved_block , 0 , 0 , 48, | |
18935 | 0xfc1f00000000ull, 0x600e00000000ull, 0 , 0, | |
18936 | 0x0 }, /* POOL48I~*(14) */ | |
18937 | { instruction , 0 , 0 , 48, | |
18938 | 0xfc1f00000000ull, 0x600f00000000ull, &NMD::SWPC_48_ , 0, | |
18939 | XMMS_ }, /* SWPC[48] */ | |
18940 | { reserved_block , 0 , 0 , 48, | |
18941 | 0xfc1f00000000ull, 0x601000000000ull, 0 , 0, | |
18942 | 0x0 }, /* POOL48I~*(16) */ | |
18943 | { instruction , 0 , 0 , 48, | |
18944 | 0xfc1f00000000ull, 0x601100000000ull, &NMD::DADDIU_48_ , 0, | |
18945 | MIPS64_ }, /* DADDIU[48] */ | |
18946 | { reserved_block , 0 , 0 , 48, | |
18947 | 0xfc1f00000000ull, 0x601200000000ull, 0 , 0, | |
18948 | 0x0 }, /* POOL48I~*(18) */ | |
18949 | { reserved_block , 0 , 0 , 48, | |
18950 | 0xfc1f00000000ull, 0x601300000000ull, 0 , 0, | |
18951 | 0x0 }, /* POOL48I~*(19) */ | |
18952 | { instruction , 0 , 0 , 48, | |
18953 | 0xfc1f00000000ull, 0x601400000000ull, &NMD::DLUI_48_ , 0, | |
18954 | MIPS64_ }, /* DLUI[48] */ | |
18955 | { reserved_block , 0 , 0 , 48, | |
18956 | 0xfc1f00000000ull, 0x601500000000ull, 0 , 0, | |
18957 | 0x0 }, /* POOL48I~*(21) */ | |
18958 | { reserved_block , 0 , 0 , 48, | |
18959 | 0xfc1f00000000ull, 0x601600000000ull, 0 , 0, | |
18960 | 0x0 }, /* POOL48I~*(22) */ | |
18961 | { reserved_block , 0 , 0 , 48, | |
18962 | 0xfc1f00000000ull, 0x601700000000ull, 0 , 0, | |
18963 | 0x0 }, /* POOL48I~*(23) */ | |
18964 | { reserved_block , 0 , 0 , 48, | |
18965 | 0xfc1f00000000ull, 0x601800000000ull, 0 , 0, | |
18966 | 0x0 }, /* POOL48I~*(24) */ | |
18967 | { reserved_block , 0 , 0 , 48, | |
18968 | 0xfc1f00000000ull, 0x601900000000ull, 0 , 0, | |
18969 | 0x0 }, /* POOL48I~*(25) */ | |
18970 | { reserved_block , 0 , 0 , 48, | |
18971 | 0xfc1f00000000ull, 0x601a00000000ull, 0 , 0, | |
18972 | 0x0 }, /* POOL48I~*(26) */ | |
18973 | { instruction , 0 , 0 , 48, | |
18974 | 0xfc1f00000000ull, 0x601b00000000ull, &NMD::LDPC_48_ , 0, | |
18975 | MIPS64_ }, /* LDPC[48] */ | |
18976 | { reserved_block , 0 , 0 , 48, | |
18977 | 0xfc1f00000000ull, 0x601c00000000ull, 0 , 0, | |
18978 | 0x0 }, /* POOL48I~*(28) */ | |
18979 | { reserved_block , 0 , 0 , 48, | |
18980 | 0xfc1f00000000ull, 0x601d00000000ull, 0 , 0, | |
18981 | 0x0 }, /* POOL48I~*(29) */ | |
18982 | { reserved_block , 0 , 0 , 48, | |
18983 | 0xfc1f00000000ull, 0x601e00000000ull, 0 , 0, | |
18984 | 0x0 }, /* POOL48I~*(30) */ | |
18985 | { instruction , 0 , 0 , 48, | |
18986 | 0xfc1f00000000ull, 0x601f00000000ull, &NMD::SDPC_48_ , 0, | |
18987 | MIPS64_ }, /* SDPC[48] */ | |
18988 | }; | |
18989 | ||
18990 | ||
18991 | NMD::Pool NMD::PP_SR[4] = { | |
18992 | { instruction , 0 , 0 , 32, | |
18993 | 0xfc10f003, 0x80003000, &NMD::SAVE_32_ , 0, | |
18994 | 0x0 }, /* SAVE[32] */ | |
18995 | { reserved_block , 0 , 0 , 32, | |
18996 | 0xfc10f003, 0x80003001, 0 , 0, | |
18997 | 0x0 }, /* PP.SR~*(1) */ | |
18998 | { instruction , 0 , 0 , 32, | |
18999 | 0xfc10f003, 0x80003002, &NMD::RESTORE_32_ , 0, | |
19000 | 0x0 }, /* RESTORE[32] */ | |
19001 | { return_instruction , 0 , 0 , 32, | |
19002 | 0xfc10f003, 0x80003003, &NMD::RESTORE_JRC_32_ , 0, | |
19003 | 0x0 }, /* RESTORE.JRC[32] */ | |
19004 | }; | |
19005 | ||
19006 | ||
19007 | NMD::Pool NMD::P_SR_F[8] = { | |
19008 | { instruction , 0 , 0 , 32, | |
19009 | 0xfc10f007, 0x80103000, &NMD::SAVEF , 0, | |
19010 | CP1_ }, /* SAVEF */ | |
19011 | { instruction , 0 , 0 , 32, | |
19012 | 0xfc10f007, 0x80103001, &NMD::RESTOREF , 0, | |
19013 | CP1_ }, /* RESTOREF */ | |
19014 | { reserved_block , 0 , 0 , 32, | |
19015 | 0xfc10f007, 0x80103002, 0 , 0, | |
19016 | 0x0 }, /* P.SR.F~*(2) */ | |
19017 | { reserved_block , 0 , 0 , 32, | |
19018 | 0xfc10f007, 0x80103003, 0 , 0, | |
19019 | 0x0 }, /* P.SR.F~*(3) */ | |
19020 | { reserved_block , 0 , 0 , 32, | |
19021 | 0xfc10f007, 0x80103004, 0 , 0, | |
19022 | 0x0 }, /* P.SR.F~*(4) */ | |
19023 | { reserved_block , 0 , 0 , 32, | |
19024 | 0xfc10f007, 0x80103005, 0 , 0, | |
19025 | 0x0 }, /* P.SR.F~*(5) */ | |
19026 | { reserved_block , 0 , 0 , 32, | |
19027 | 0xfc10f007, 0x80103006, 0 , 0, | |
19028 | 0x0 }, /* P.SR.F~*(6) */ | |
19029 | { reserved_block , 0 , 0 , 32, | |
19030 | 0xfc10f007, 0x80103007, 0 , 0, | |
19031 | 0x0 }, /* P.SR.F~*(7) */ | |
19032 | }; | |
19033 | ||
19034 | ||
19035 | NMD::Pool NMD::P_SR[2] = { | |
19036 | { pool , PP_SR , 4 , 32, | |
19037 | 0xfc10f000, 0x80003000, 0 , 0, | |
19038 | 0x0 }, /* PP.SR */ | |
19039 | { pool , P_SR_F , 8 , 32, | |
19040 | 0xfc10f000, 0x80103000, 0 , 0, | |
19041 | 0x0 }, /* P.SR.F */ | |
19042 | }; | |
19043 | ||
19044 | ||
19045 | NMD::Pool NMD::P_SLL[5] = { | |
19046 | { instruction , 0 , 0 , 32, | |
19047 | 0xffe0f1ff, 0x8000c000, &NMD::NOP_32_ , 0, | |
19048 | 0x0 }, /* NOP[32] */ | |
19049 | { instruction , 0 , 0 , 32, | |
19050 | 0xffe0f1ff, 0x8000c003, &NMD::EHB , 0, | |
19051 | 0x0 }, /* EHB */ | |
19052 | { instruction , 0 , 0 , 32, | |
19053 | 0xffe0f1ff, 0x8000c005, &NMD::PAUSE , 0, | |
19054 | 0x0 }, /* PAUSE */ | |
19055 | { instruction , 0 , 0 , 32, | |
19056 | 0xffe0f1ff, 0x8000c006, &NMD::SYNC , 0, | |
19057 | 0x0 }, /* SYNC */ | |
19058 | { instruction , 0 , 0 , 32, | |
19059 | 0xfc00f1e0, 0x8000c000, &NMD::SLL_32_ , 0, | |
19060 | 0x0 }, /* SLL[32] */ | |
19061 | }; | |
19062 | ||
19063 | ||
19064 | NMD::Pool NMD::P_SHIFT[16] = { | |
19065 | { pool , P_SLL , 5 , 32, | |
19066 | 0xfc00f1e0, 0x8000c000, 0 , 0, | |
19067 | 0x0 }, /* P.SLL */ | |
19068 | { reserved_block , 0 , 0 , 32, | |
19069 | 0xfc00f1e0, 0x8000c020, 0 , 0, | |
19070 | 0x0 }, /* P.SHIFT~*(1) */ | |
19071 | { instruction , 0 , 0 , 32, | |
19072 | 0xfc00f1e0, 0x8000c040, &NMD::SRL_32_ , 0, | |
19073 | 0x0 }, /* SRL[32] */ | |
19074 | { reserved_block , 0 , 0 , 32, | |
19075 | 0xfc00f1e0, 0x8000c060, 0 , 0, | |
19076 | 0x0 }, /* P.SHIFT~*(3) */ | |
19077 | { instruction , 0 , 0 , 32, | |
19078 | 0xfc00f1e0, 0x8000c080, &NMD::SRA , 0, | |
19079 | 0x0 }, /* SRA */ | |
19080 | { reserved_block , 0 , 0 , 32, | |
19081 | 0xfc00f1e0, 0x8000c0a0, 0 , 0, | |
19082 | 0x0 }, /* P.SHIFT~*(5) */ | |
19083 | { instruction , 0 , 0 , 32, | |
19084 | 0xfc00f1e0, 0x8000c0c0, &NMD::ROTR , 0, | |
19085 | 0x0 }, /* ROTR */ | |
19086 | { reserved_block , 0 , 0 , 32, | |
19087 | 0xfc00f1e0, 0x8000c0e0, 0 , 0, | |
19088 | 0x0 }, /* P.SHIFT~*(7) */ | |
19089 | { instruction , 0 , 0 , 32, | |
19090 | 0xfc00f1e0, 0x8000c100, &NMD::DSLL , 0, | |
19091 | MIPS64_ }, /* DSLL */ | |
19092 | { instruction , 0 , 0 , 32, | |
19093 | 0xfc00f1e0, 0x8000c120, &NMD::DSLL32 , 0, | |
19094 | MIPS64_ }, /* DSLL32 */ | |
19095 | { instruction , 0 , 0 , 32, | |
19096 | 0xfc00f1e0, 0x8000c140, &NMD::DSRL , 0, | |
19097 | MIPS64_ }, /* DSRL */ | |
19098 | { instruction , 0 , 0 , 32, | |
19099 | 0xfc00f1e0, 0x8000c160, &NMD::DSRL32 , 0, | |
19100 | MIPS64_ }, /* DSRL32 */ | |
19101 | { instruction , 0 , 0 , 32, | |
19102 | 0xfc00f1e0, 0x8000c180, &NMD::DSRA , 0, | |
19103 | MIPS64_ }, /* DSRA */ | |
19104 | { instruction , 0 , 0 , 32, | |
19105 | 0xfc00f1e0, 0x8000c1a0, &NMD::DSRA32 , 0, | |
19106 | MIPS64_ }, /* DSRA32 */ | |
19107 | { instruction , 0 , 0 , 32, | |
19108 | 0xfc00f1e0, 0x8000c1c0, &NMD::DROTR , 0, | |
19109 | MIPS64_ }, /* DROTR */ | |
19110 | { instruction , 0 , 0 , 32, | |
19111 | 0xfc00f1e0, 0x8000c1e0, &NMD::DROTR32 , 0, | |
19112 | MIPS64_ }, /* DROTR32 */ | |
19113 | }; | |
19114 | ||
19115 | ||
19116 | NMD::Pool NMD::P_ROTX[4] = { | |
19117 | { instruction , 0 , 0 , 32, | |
19118 | 0xfc00f820, 0x8000d000, &NMD::ROTX , 0, | |
19119 | XMMS_ }, /* ROTX */ | |
19120 | { reserved_block , 0 , 0 , 32, | |
19121 | 0xfc00f820, 0x8000d020, 0 , 0, | |
19122 | 0x0 }, /* P.ROTX~*(1) */ | |
19123 | { reserved_block , 0 , 0 , 32, | |
19124 | 0xfc00f820, 0x8000d800, 0 , 0, | |
19125 | 0x0 }, /* P.ROTX~*(2) */ | |
19126 | { reserved_block , 0 , 0 , 32, | |
19127 | 0xfc00f820, 0x8000d820, 0 , 0, | |
19128 | 0x0 }, /* P.ROTX~*(3) */ | |
19129 | }; | |
19130 | ||
19131 | ||
19132 | NMD::Pool NMD::P_INS[4] = { | |
19133 | { instruction , 0 , 0 , 32, | |
19134 | 0xfc00f820, 0x8000e000, &NMD::INS , 0, | |
19135 | XMMS_ }, /* INS */ | |
19136 | { instruction , 0 , 0 , 32, | |
19137 | 0xfc00f820, 0x8000e020, &NMD::DINSU , 0, | |
19138 | MIPS64_ }, /* DINSU */ | |
19139 | { instruction , 0 , 0 , 32, | |
19140 | 0xfc00f820, 0x8000e800, &NMD::DINSM , 0, | |
19141 | MIPS64_ }, /* DINSM */ | |
19142 | { instruction , 0 , 0 , 32, | |
19143 | 0xfc00f820, 0x8000e820, &NMD::DINS , 0, | |
19144 | MIPS64_ }, /* DINS */ | |
19145 | }; | |
19146 | ||
19147 | ||
19148 | NMD::Pool NMD::P_EXT[4] = { | |
19149 | { instruction , 0 , 0 , 32, | |
19150 | 0xfc00f820, 0x8000f000, &NMD::EXT , 0, | |
19151 | XMMS_ }, /* EXT */ | |
19152 | { instruction , 0 , 0 , 32, | |
19153 | 0xfc00f820, 0x8000f020, &NMD::DEXTU , 0, | |
19154 | MIPS64_ }, /* DEXTU */ | |
19155 | { instruction , 0 , 0 , 32, | |
19156 | 0xfc00f820, 0x8000f800, &NMD::DEXTM , 0, | |
19157 | MIPS64_ }, /* DEXTM */ | |
19158 | { instruction , 0 , 0 , 32, | |
19159 | 0xfc00f820, 0x8000f820, &NMD::DEXT , 0, | |
19160 | MIPS64_ }, /* DEXT */ | |
19161 | }; | |
19162 | ||
19163 | ||
19164 | NMD::Pool NMD::P_U12[16] = { | |
19165 | { instruction , 0 , 0 , 32, | |
19166 | 0xfc00f000, 0x80000000, &NMD::ORI , 0, | |
19167 | 0x0 }, /* ORI */ | |
19168 | { instruction , 0 , 0 , 32, | |
19169 | 0xfc00f000, 0x80001000, &NMD::XORI , 0, | |
19170 | 0x0 }, /* XORI */ | |
19171 | { instruction , 0 , 0 , 32, | |
19172 | 0xfc00f000, 0x80002000, &NMD::ANDI_32_ , 0, | |
19173 | 0x0 }, /* ANDI[32] */ | |
19174 | { pool , P_SR , 2 , 32, | |
19175 | 0xfc00f000, 0x80003000, 0 , 0, | |
19176 | 0x0 }, /* P.SR */ | |
19177 | { instruction , 0 , 0 , 32, | |
19178 | 0xfc00f000, 0x80004000, &NMD::SLTI , 0, | |
19179 | 0x0 }, /* SLTI */ | |
19180 | { instruction , 0 , 0 , 32, | |
19181 | 0xfc00f000, 0x80005000, &NMD::SLTIU , 0, | |
19182 | 0x0 }, /* SLTIU */ | |
19183 | { instruction , 0 , 0 , 32, | |
19184 | 0xfc00f000, 0x80006000, &NMD::SEQI , 0, | |
19185 | 0x0 }, /* SEQI */ | |
19186 | { reserved_block , 0 , 0 , 32, | |
19187 | 0xfc00f000, 0x80007000, 0 , 0, | |
19188 | 0x0 }, /* P.U12~*(7) */ | |
19189 | { instruction , 0 , 0 , 32, | |
19190 | 0xfc00f000, 0x80008000, &NMD::ADDIU_NEG_ , 0, | |
19191 | 0x0 }, /* ADDIU[NEG] */ | |
19192 | { instruction , 0 , 0 , 32, | |
19193 | 0xfc00f000, 0x80009000, &NMD::DADDIU_U12_ , 0, | |
19194 | MIPS64_ }, /* DADDIU[U12] */ | |
19195 | { instruction , 0 , 0 , 32, | |
19196 | 0xfc00f000, 0x8000a000, &NMD::DADDIU_NEG_ , 0, | |
19197 | MIPS64_ }, /* DADDIU[NEG] */ | |
19198 | { instruction , 0 , 0 , 32, | |
19199 | 0xfc00f000, 0x8000b000, &NMD::DROTX , 0, | |
19200 | MIPS64_ }, /* DROTX */ | |
19201 | { pool , P_SHIFT , 16 , 32, | |
19202 | 0xfc00f000, 0x8000c000, 0 , 0, | |
19203 | 0x0 }, /* P.SHIFT */ | |
19204 | { pool , P_ROTX , 4 , 32, | |
19205 | 0xfc00f000, 0x8000d000, 0 , 0, | |
19206 | 0x0 }, /* P.ROTX */ | |
19207 | { pool , P_INS , 4 , 32, | |
19208 | 0xfc00f000, 0x8000e000, 0 , 0, | |
19209 | 0x0 }, /* P.INS */ | |
19210 | { pool , P_EXT , 4 , 32, | |
19211 | 0xfc00f000, 0x8000f000, 0 , 0, | |
19212 | 0x0 }, /* P.EXT */ | |
19213 | }; | |
19214 | ||
19215 | ||
19216 | NMD::Pool NMD::RINT_fmt[2] = { | |
19217 | { instruction , 0 , 0 , 32, | |
19218 | 0xfc0003ff, 0xa0000020, &NMD::RINT_S , 0, | |
19219 | CP1_ }, /* RINT.S */ | |
19220 | { instruction , 0 , 0 , 32, | |
19221 | 0xfc0003ff, 0xa0000220, &NMD::RINT_D , 0, | |
19222 | CP1_ }, /* RINT.D */ | |
19223 | }; | |
19224 | ||
19225 | ||
19226 | NMD::Pool NMD::ADD_fmt0[2] = { | |
19227 | { instruction , 0 , 0 , 32, | |
19228 | 0xfc0003ff, 0xa0000030, &NMD::ADD_S , 0, | |
19229 | CP1_ }, /* ADD.S */ | |
19230 | { reserved_block , 0 , 0 , 32, | |
19231 | 0xfc0003ff, 0xa0000230, 0 , 0, | |
19232 | CP1_ }, /* ADD.fmt0~*(1) */ | |
19233 | }; | |
19234 | ||
19235 | ||
19236 | NMD::Pool NMD::SELEQZ_fmt[2] = { | |
19237 | { instruction , 0 , 0 , 32, | |
19238 | 0xfc0003ff, 0xa0000038, &NMD::SELEQZ_S , 0, | |
19239 | CP1_ }, /* SELEQZ.S */ | |
19240 | { instruction , 0 , 0 , 32, | |
19241 | 0xfc0003ff, 0xa0000238, &NMD::SELEQZ_D , 0, | |
19242 | CP1_ }, /* SELEQZ.D */ | |
19243 | }; | |
19244 | ||
19245 | ||
19246 | NMD::Pool NMD::CLASS_fmt[2] = { | |
19247 | { instruction , 0 , 0 , 32, | |
19248 | 0xfc0003ff, 0xa0000060, &NMD::CLASS_S , 0, | |
19249 | CP1_ }, /* CLASS.S */ | |
19250 | { instruction , 0 , 0 , 32, | |
19251 | 0xfc0003ff, 0xa0000260, &NMD::CLASS_D , 0, | |
19252 | CP1_ }, /* CLASS.D */ | |
19253 | }; | |
19254 | ||
19255 | ||
19256 | NMD::Pool NMD::SUB_fmt0[2] = { | |
19257 | { instruction , 0 , 0 , 32, | |
19258 | 0xfc0003ff, 0xa0000070, &NMD::SUB_S , 0, | |
19259 | CP1_ }, /* SUB.S */ | |
19260 | { reserved_block , 0 , 0 , 32, | |
19261 | 0xfc0003ff, 0xa0000270, 0 , 0, | |
19262 | CP1_ }, /* SUB.fmt0~*(1) */ | |
19263 | }; | |
19264 | ||
19265 | ||
19266 | NMD::Pool NMD::SELNEZ_fmt[2] = { | |
19267 | { instruction , 0 , 0 , 32, | |
19268 | 0xfc0003ff, 0xa0000078, &NMD::SELNEZ_S , 0, | |
19269 | CP1_ }, /* SELNEZ.S */ | |
19270 | { instruction , 0 , 0 , 32, | |
19271 | 0xfc0003ff, 0xa0000278, &NMD::SELNEZ_D , 0, | |
19272 | CP1_ }, /* SELNEZ.D */ | |
19273 | }; | |
19274 | ||
19275 | ||
19276 | NMD::Pool NMD::MUL_fmt0[2] = { | |
19277 | { instruction , 0 , 0 , 32, | |
19278 | 0xfc0003ff, 0xa00000b0, &NMD::MUL_S , 0, | |
19279 | CP1_ }, /* MUL.S */ | |
19280 | { reserved_block , 0 , 0 , 32, | |
19281 | 0xfc0003ff, 0xa00002b0, 0 , 0, | |
19282 | CP1_ }, /* MUL.fmt0~*(1) */ | |
19283 | }; | |
19284 | ||
19285 | ||
19286 | NMD::Pool NMD::SEL_fmt[2] = { | |
19287 | { instruction , 0 , 0 , 32, | |
19288 | 0xfc0003ff, 0xa00000b8, &NMD::SEL_S , 0, | |
19289 | CP1_ }, /* SEL.S */ | |
19290 | { instruction , 0 , 0 , 32, | |
19291 | 0xfc0003ff, 0xa00002b8, &NMD::SEL_D , 0, | |
19292 | CP1_ }, /* SEL.D */ | |
19293 | }; | |
19294 | ||
19295 | ||
19296 | NMD::Pool NMD::DIV_fmt0[2] = { | |
19297 | { instruction , 0 , 0 , 32, | |
19298 | 0xfc0003ff, 0xa00000f0, &NMD::DIV_S , 0, | |
19299 | CP1_ }, /* DIV.S */ | |
19300 | { reserved_block , 0 , 0 , 32, | |
19301 | 0xfc0003ff, 0xa00002f0, 0 , 0, | |
19302 | CP1_ }, /* DIV.fmt0~*(1) */ | |
19303 | }; | |
19304 | ||
19305 | ||
19306 | NMD::Pool NMD::ADD_fmt1[2] = { | |
19307 | { instruction , 0 , 0 , 32, | |
19308 | 0xfc0003ff, 0xa0000130, &NMD::ADD_D , 0, | |
19309 | CP1_ }, /* ADD.D */ | |
19310 | { reserved_block , 0 , 0 , 32, | |
19311 | 0xfc0003ff, 0xa0000330, 0 , 0, | |
19312 | CP1_ }, /* ADD.fmt1~*(1) */ | |
19313 | }; | |
19314 | ||
19315 | ||
19316 | NMD::Pool NMD::SUB_fmt1[2] = { | |
19317 | { instruction , 0 , 0 , 32, | |
19318 | 0xfc0003ff, 0xa0000170, &NMD::SUB_D , 0, | |
19319 | CP1_ }, /* SUB.D */ | |
19320 | { reserved_block , 0 , 0 , 32, | |
19321 | 0xfc0003ff, 0xa0000370, 0 , 0, | |
19322 | CP1_ }, /* SUB.fmt1~*(1) */ | |
19323 | }; | |
19324 | ||
19325 | ||
19326 | NMD::Pool NMD::MUL_fmt1[2] = { | |
19327 | { instruction , 0 , 0 , 32, | |
19328 | 0xfc0003ff, 0xa00001b0, &NMD::MUL_D , 0, | |
19329 | CP1_ }, /* MUL.D */ | |
19330 | { reserved_block , 0 , 0 , 32, | |
19331 | 0xfc0003ff, 0xa00003b0, 0 , 0, | |
19332 | CP1_ }, /* MUL.fmt1~*(1) */ | |
19333 | }; | |
19334 | ||
19335 | ||
19336 | NMD::Pool NMD::MADDF_fmt[2] = { | |
19337 | { instruction , 0 , 0 , 32, | |
19338 | 0xfc0003ff, 0xa00001b8, &NMD::MADDF_S , 0, | |
19339 | CP1_ }, /* MADDF.S */ | |
19340 | { instruction , 0 , 0 , 32, | |
19341 | 0xfc0003ff, 0xa00003b8, &NMD::MADDF_D , 0, | |
19342 | CP1_ }, /* MADDF.D */ | |
19343 | }; | |
19344 | ||
19345 | ||
19346 | NMD::Pool NMD::DIV_fmt1[2] = { | |
19347 | { instruction , 0 , 0 , 32, | |
19348 | 0xfc0003ff, 0xa00001f0, &NMD::DIV_D , 0, | |
19349 | CP1_ }, /* DIV.D */ | |
19350 | { reserved_block , 0 , 0 , 32, | |
19351 | 0xfc0003ff, 0xa00003f0, 0 , 0, | |
19352 | CP1_ }, /* DIV.fmt1~*(1) */ | |
19353 | }; | |
19354 | ||
19355 | ||
19356 | NMD::Pool NMD::MSUBF_fmt[2] = { | |
19357 | { instruction , 0 , 0 , 32, | |
19358 | 0xfc0003ff, 0xa00001f8, &NMD::MSUBF_S , 0, | |
19359 | CP1_ }, /* MSUBF.S */ | |
19360 | { instruction , 0 , 0 , 32, | |
19361 | 0xfc0003ff, 0xa00003f8, &NMD::MSUBF_D , 0, | |
19362 | CP1_ }, /* MSUBF.D */ | |
19363 | }; | |
19364 | ||
19365 | ||
19366 | NMD::Pool NMD::POOL32F_0[64] = { | |
19367 | { reserved_block , 0 , 0 , 32, | |
19368 | 0xfc0001ff, 0xa0000000, 0 , 0, | |
19369 | CP1_ }, /* POOL32F_0~*(0) */ | |
19370 | { reserved_block , 0 , 0 , 32, | |
19371 | 0xfc0001ff, 0xa0000008, 0 , 0, | |
19372 | CP1_ }, /* POOL32F_0~*(1) */ | |
19373 | { reserved_block , 0 , 0 , 32, | |
19374 | 0xfc0001ff, 0xa0000010, 0 , 0, | |
19375 | CP1_ }, /* POOL32F_0~*(2) */ | |
19376 | { reserved_block , 0 , 0 , 32, | |
19377 | 0xfc0001ff, 0xa0000018, 0 , 0, | |
19378 | CP1_ }, /* POOL32F_0~*(3) */ | |
19379 | { pool , RINT_fmt , 2 , 32, | |
19380 | 0xfc0001ff, 0xa0000020, 0 , 0, | |
19381 | CP1_ }, /* RINT.fmt */ | |
19382 | { reserved_block , 0 , 0 , 32, | |
19383 | 0xfc0001ff, 0xa0000028, 0 , 0, | |
19384 | CP1_ }, /* POOL32F_0~*(5) */ | |
19385 | { pool , ADD_fmt0 , 2 , 32, | |
19386 | 0xfc0001ff, 0xa0000030, 0 , 0, | |
19387 | CP1_ }, /* ADD.fmt0 */ | |
19388 | { pool , SELEQZ_fmt , 2 , 32, | |
19389 | 0xfc0001ff, 0xa0000038, 0 , 0, | |
19390 | CP1_ }, /* SELEQZ.fmt */ | |
19391 | { reserved_block , 0 , 0 , 32, | |
19392 | 0xfc0001ff, 0xa0000040, 0 , 0, | |
19393 | CP1_ }, /* POOL32F_0~*(8) */ | |
19394 | { reserved_block , 0 , 0 , 32, | |
19395 | 0xfc0001ff, 0xa0000048, 0 , 0, | |
19396 | CP1_ }, /* POOL32F_0~*(9) */ | |
19397 | { reserved_block , 0 , 0 , 32, | |
19398 | 0xfc0001ff, 0xa0000050, 0 , 0, | |
19399 | CP1_ }, /* POOL32F_0~*(10) */ | |
19400 | { reserved_block , 0 , 0 , 32, | |
19401 | 0xfc0001ff, 0xa0000058, 0 , 0, | |
19402 | CP1_ }, /* POOL32F_0~*(11) */ | |
19403 | { pool , CLASS_fmt , 2 , 32, | |
19404 | 0xfc0001ff, 0xa0000060, 0 , 0, | |
19405 | CP1_ }, /* CLASS.fmt */ | |
19406 | { reserved_block , 0 , 0 , 32, | |
19407 | 0xfc0001ff, 0xa0000068, 0 , 0, | |
19408 | CP1_ }, /* POOL32F_0~*(13) */ | |
19409 | { pool , SUB_fmt0 , 2 , 32, | |
19410 | 0xfc0001ff, 0xa0000070, 0 , 0, | |
19411 | CP1_ }, /* SUB.fmt0 */ | |
19412 | { pool , SELNEZ_fmt , 2 , 32, | |
19413 | 0xfc0001ff, 0xa0000078, 0 , 0, | |
19414 | CP1_ }, /* SELNEZ.fmt */ | |
19415 | { reserved_block , 0 , 0 , 32, | |
19416 | 0xfc0001ff, 0xa0000080, 0 , 0, | |
19417 | CP1_ }, /* POOL32F_0~*(16) */ | |
19418 | { reserved_block , 0 , 0 , 32, | |
19419 | 0xfc0001ff, 0xa0000088, 0 , 0, | |
19420 | CP1_ }, /* POOL32F_0~*(17) */ | |
19421 | { reserved_block , 0 , 0 , 32, | |
19422 | 0xfc0001ff, 0xa0000090, 0 , 0, | |
19423 | CP1_ }, /* POOL32F_0~*(18) */ | |
19424 | { reserved_block , 0 , 0 , 32, | |
19425 | 0xfc0001ff, 0xa0000098, 0 , 0, | |
19426 | CP1_ }, /* POOL32F_0~*(19) */ | |
19427 | { reserved_block , 0 , 0 , 32, | |
19428 | 0xfc0001ff, 0xa00000a0, 0 , 0, | |
19429 | CP1_ }, /* POOL32F_0~*(20) */ | |
19430 | { reserved_block , 0 , 0 , 32, | |
19431 | 0xfc0001ff, 0xa00000a8, 0 , 0, | |
19432 | CP1_ }, /* POOL32F_0~*(21) */ | |
19433 | { pool , MUL_fmt0 , 2 , 32, | |
19434 | 0xfc0001ff, 0xa00000b0, 0 , 0, | |
19435 | CP1_ }, /* MUL.fmt0 */ | |
19436 | { pool , SEL_fmt , 2 , 32, | |
19437 | 0xfc0001ff, 0xa00000b8, 0 , 0, | |
19438 | CP1_ }, /* SEL.fmt */ | |
19439 | { reserved_block , 0 , 0 , 32, | |
19440 | 0xfc0001ff, 0xa00000c0, 0 , 0, | |
19441 | CP1_ }, /* POOL32F_0~*(24) */ | |
19442 | { reserved_block , 0 , 0 , 32, | |
19443 | 0xfc0001ff, 0xa00000c8, 0 , 0, | |
19444 | CP1_ }, /* POOL32F_0~*(25) */ | |
19445 | { reserved_block , 0 , 0 , 32, | |
19446 | 0xfc0001ff, 0xa00000d0, 0 , 0, | |
19447 | CP1_ }, /* POOL32F_0~*(26) */ | |
19448 | { reserved_block , 0 , 0 , 32, | |
19449 | 0xfc0001ff, 0xa00000d8, 0 , 0, | |
19450 | CP1_ }, /* POOL32F_0~*(27) */ | |
19451 | { reserved_block , 0 , 0 , 32, | |
19452 | 0xfc0001ff, 0xa00000e0, 0 , 0, | |
19453 | CP1_ }, /* POOL32F_0~*(28) */ | |
19454 | { reserved_block , 0 , 0 , 32, | |
19455 | 0xfc0001ff, 0xa00000e8, 0 , 0, | |
19456 | CP1_ }, /* POOL32F_0~*(29) */ | |
19457 | { pool , DIV_fmt0 , 2 , 32, | |
19458 | 0xfc0001ff, 0xa00000f0, 0 , 0, | |
19459 | CP1_ }, /* DIV.fmt0 */ | |
19460 | { reserved_block , 0 , 0 , 32, | |
19461 | 0xfc0001ff, 0xa00000f8, 0 , 0, | |
19462 | CP1_ }, /* POOL32F_0~*(31) */ | |
19463 | { reserved_block , 0 , 0 , 32, | |
19464 | 0xfc0001ff, 0xa0000100, 0 , 0, | |
19465 | CP1_ }, /* POOL32F_0~*(32) */ | |
19466 | { reserved_block , 0 , 0 , 32, | |
19467 | 0xfc0001ff, 0xa0000108, 0 , 0, | |
19468 | CP1_ }, /* POOL32F_0~*(33) */ | |
19469 | { reserved_block , 0 , 0 , 32, | |
19470 | 0xfc0001ff, 0xa0000110, 0 , 0, | |
19471 | CP1_ }, /* POOL32F_0~*(34) */ | |
19472 | { reserved_block , 0 , 0 , 32, | |
19473 | 0xfc0001ff, 0xa0000118, 0 , 0, | |
19474 | CP1_ }, /* POOL32F_0~*(35) */ | |
19475 | { reserved_block , 0 , 0 , 32, | |
19476 | 0xfc0001ff, 0xa0000120, 0 , 0, | |
19477 | CP1_ }, /* POOL32F_0~*(36) */ | |
19478 | { reserved_block , 0 , 0 , 32, | |
19479 | 0xfc0001ff, 0xa0000128, 0 , 0, | |
19480 | CP1_ }, /* POOL32F_0~*(37) */ | |
19481 | { pool , ADD_fmt1 , 2 , 32, | |
19482 | 0xfc0001ff, 0xa0000130, 0 , 0, | |
19483 | CP1_ }, /* ADD.fmt1 */ | |
19484 | { reserved_block , 0 , 0 , 32, | |
19485 | 0xfc0001ff, 0xa0000138, 0 , 0, | |
19486 | CP1_ }, /* POOL32F_0~*(39) */ | |
19487 | { reserved_block , 0 , 0 , 32, | |
19488 | 0xfc0001ff, 0xa0000140, 0 , 0, | |
19489 | CP1_ }, /* POOL32F_0~*(40) */ | |
19490 | { reserved_block , 0 , 0 , 32, | |
19491 | 0xfc0001ff, 0xa0000148, 0 , 0, | |
19492 | CP1_ }, /* POOL32F_0~*(41) */ | |
19493 | { reserved_block , 0 , 0 , 32, | |
19494 | 0xfc0001ff, 0xa0000150, 0 , 0, | |
19495 | CP1_ }, /* POOL32F_0~*(42) */ | |
19496 | { reserved_block , 0 , 0 , 32, | |
19497 | 0xfc0001ff, 0xa0000158, 0 , 0, | |
19498 | CP1_ }, /* POOL32F_0~*(43) */ | |
19499 | { reserved_block , 0 , 0 , 32, | |
19500 | 0xfc0001ff, 0xa0000160, 0 , 0, | |
19501 | CP1_ }, /* POOL32F_0~*(44) */ | |
19502 | { reserved_block , 0 , 0 , 32, | |
19503 | 0xfc0001ff, 0xa0000168, 0 , 0, | |
19504 | CP1_ }, /* POOL32F_0~*(45) */ | |
19505 | { pool , SUB_fmt1 , 2 , 32, | |
19506 | 0xfc0001ff, 0xa0000170, 0 , 0, | |
19507 | CP1_ }, /* SUB.fmt1 */ | |
19508 | { reserved_block , 0 , 0 , 32, | |
19509 | 0xfc0001ff, 0xa0000178, 0 , 0, | |
19510 | CP1_ }, /* POOL32F_0~*(47) */ | |
19511 | { reserved_block , 0 , 0 , 32, | |
19512 | 0xfc0001ff, 0xa0000180, 0 , 0, | |
19513 | CP1_ }, /* POOL32F_0~*(48) */ | |
19514 | { reserved_block , 0 , 0 , 32, | |
19515 | 0xfc0001ff, 0xa0000188, 0 , 0, | |
19516 | CP1_ }, /* POOL32F_0~*(49) */ | |
19517 | { reserved_block , 0 , 0 , 32, | |
19518 | 0xfc0001ff, 0xa0000190, 0 , 0, | |
19519 | CP1_ }, /* POOL32F_0~*(50) */ | |
19520 | { reserved_block , 0 , 0 , 32, | |
19521 | 0xfc0001ff, 0xa0000198, 0 , 0, | |
19522 | CP1_ }, /* POOL32F_0~*(51) */ | |
19523 | { reserved_block , 0 , 0 , 32, | |
19524 | 0xfc0001ff, 0xa00001a0, 0 , 0, | |
19525 | CP1_ }, /* POOL32F_0~*(52) */ | |
19526 | { reserved_block , 0 , 0 , 32, | |
19527 | 0xfc0001ff, 0xa00001a8, 0 , 0, | |
19528 | CP1_ }, /* POOL32F_0~*(53) */ | |
19529 | { pool , MUL_fmt1 , 2 , 32, | |
19530 | 0xfc0001ff, 0xa00001b0, 0 , 0, | |
19531 | CP1_ }, /* MUL.fmt1 */ | |
19532 | { pool , MADDF_fmt , 2 , 32, | |
19533 | 0xfc0001ff, 0xa00001b8, 0 , 0, | |
19534 | CP1_ }, /* MADDF.fmt */ | |
19535 | { reserved_block , 0 , 0 , 32, | |
19536 | 0xfc0001ff, 0xa00001c0, 0 , 0, | |
19537 | CP1_ }, /* POOL32F_0~*(56) */ | |
19538 | { reserved_block , 0 , 0 , 32, | |
19539 | 0xfc0001ff, 0xa00001c8, 0 , 0, | |
19540 | CP1_ }, /* POOL32F_0~*(57) */ | |
19541 | { reserved_block , 0 , 0 , 32, | |
19542 | 0xfc0001ff, 0xa00001d0, 0 , 0, | |
19543 | CP1_ }, /* POOL32F_0~*(58) */ | |
19544 | { reserved_block , 0 , 0 , 32, | |
19545 | 0xfc0001ff, 0xa00001d8, 0 , 0, | |
19546 | CP1_ }, /* POOL32F_0~*(59) */ | |
19547 | { reserved_block , 0 , 0 , 32, | |
19548 | 0xfc0001ff, 0xa00001e0, 0 , 0, | |
19549 | CP1_ }, /* POOL32F_0~*(60) */ | |
19550 | { reserved_block , 0 , 0 , 32, | |
19551 | 0xfc0001ff, 0xa00001e8, 0 , 0, | |
19552 | CP1_ }, /* POOL32F_0~*(61) */ | |
19553 | { pool , DIV_fmt1 , 2 , 32, | |
19554 | 0xfc0001ff, 0xa00001f0, 0 , 0, | |
19555 | CP1_ }, /* DIV.fmt1 */ | |
19556 | { pool , MSUBF_fmt , 2 , 32, | |
19557 | 0xfc0001ff, 0xa00001f8, 0 , 0, | |
19558 | CP1_ }, /* MSUBF.fmt */ | |
19559 | }; | |
19560 | ||
19561 | ||
19562 | NMD::Pool NMD::MIN_fmt[2] = { | |
19563 | { instruction , 0 , 0 , 32, | |
19564 | 0xfc00023f, 0xa0000003, &NMD::MIN_S , 0, | |
19565 | CP1_ }, /* MIN.S */ | |
19566 | { instruction , 0 , 0 , 32, | |
19567 | 0xfc00023f, 0xa0000203, &NMD::MIN_D , 0, | |
19568 | CP1_ }, /* MIN.D */ | |
19569 | }; | |
19570 | ||
19571 | ||
19572 | NMD::Pool NMD::MAX_fmt[2] = { | |
19573 | { instruction , 0 , 0 , 32, | |
19574 | 0xfc00023f, 0xa000000b, &NMD::MAX_S , 0, | |
19575 | CP1_ }, /* MAX.S */ | |
19576 | { instruction , 0 , 0 , 32, | |
19577 | 0xfc00023f, 0xa000020b, &NMD::MAX_D , 0, | |
19578 | CP1_ }, /* MAX.D */ | |
19579 | }; | |
19580 | ||
19581 | ||
19582 | NMD::Pool NMD::MINA_fmt[2] = { | |
19583 | { instruction , 0 , 0 , 32, | |
19584 | 0xfc00023f, 0xa0000023, &NMD::MINA_S , 0, | |
19585 | CP1_ }, /* MINA.S */ | |
19586 | { instruction , 0 , 0 , 32, | |
19587 | 0xfc00023f, 0xa0000223, &NMD::MINA_D , 0, | |
19588 | CP1_ }, /* MINA.D */ | |
19589 | }; | |
19590 | ||
19591 | ||
19592 | NMD::Pool NMD::MAXA_fmt[2] = { | |
19593 | { instruction , 0 , 0 , 32, | |
19594 | 0xfc00023f, 0xa000002b, &NMD::MAXA_S , 0, | |
19595 | CP1_ }, /* MAXA.S */ | |
19596 | { instruction , 0 , 0 , 32, | |
19597 | 0xfc00023f, 0xa000022b, &NMD::MAXA_D , 0, | |
19598 | CP1_ }, /* MAXA.D */ | |
19599 | }; | |
19600 | ||
19601 | ||
19602 | NMD::Pool NMD::CVT_L_fmt[2] = { | |
19603 | { instruction , 0 , 0 , 32, | |
19604 | 0xfc007fff, 0xa000013b, &NMD::CVT_L_S , 0, | |
19605 | CP1_ }, /* CVT.L.S */ | |
19606 | { instruction , 0 , 0 , 32, | |
19607 | 0xfc007fff, 0xa000413b, &NMD::CVT_L_D , 0, | |
19608 | CP1_ }, /* CVT.L.D */ | |
19609 | }; | |
19610 | ||
19611 | ||
19612 | NMD::Pool NMD::RSQRT_fmt[2] = { | |
19613 | { instruction , 0 , 0 , 32, | |
19614 | 0xfc007fff, 0xa000023b, &NMD::RSQRT_S , 0, | |
19615 | CP1_ }, /* RSQRT.S */ | |
19616 | { instruction , 0 , 0 , 32, | |
19617 | 0xfc007fff, 0xa000423b, &NMD::RSQRT_D , 0, | |
19618 | CP1_ }, /* RSQRT.D */ | |
19619 | }; | |
19620 | ||
19621 | ||
19622 | NMD::Pool NMD::FLOOR_L_fmt[2] = { | |
19623 | { instruction , 0 , 0 , 32, | |
19624 | 0xfc007fff, 0xa000033b, &NMD::FLOOR_L_S , 0, | |
19625 | CP1_ }, /* FLOOR.L.S */ | |
19626 | { instruction , 0 , 0 , 32, | |
19627 | 0xfc007fff, 0xa000433b, &NMD::FLOOR_L_D , 0, | |
19628 | CP1_ }, /* FLOOR.L.D */ | |
19629 | }; | |
19630 | ||
19631 | ||
19632 | NMD::Pool NMD::CVT_W_fmt[2] = { | |
19633 | { instruction , 0 , 0 , 32, | |
19634 | 0xfc007fff, 0xa000093b, &NMD::CVT_W_S , 0, | |
19635 | CP1_ }, /* CVT.W.S */ | |
19636 | { instruction , 0 , 0 , 32, | |
19637 | 0xfc007fff, 0xa000493b, &NMD::CVT_W_D , 0, | |
19638 | CP1_ }, /* CVT.W.D */ | |
19639 | }; | |
19640 | ||
19641 | ||
19642 | NMD::Pool NMD::SQRT_fmt[2] = { | |
19643 | { instruction , 0 , 0 , 32, | |
19644 | 0xfc007fff, 0xa0000a3b, &NMD::SQRT_S , 0, | |
19645 | CP1_ }, /* SQRT.S */ | |
19646 | { instruction , 0 , 0 , 32, | |
19647 | 0xfc007fff, 0xa0004a3b, &NMD::SQRT_D , 0, | |
19648 | CP1_ }, /* SQRT.D */ | |
19649 | }; | |
19650 | ||
19651 | ||
19652 | NMD::Pool NMD::FLOOR_W_fmt[2] = { | |
19653 | { instruction , 0 , 0 , 32, | |
19654 | 0xfc007fff, 0xa0000b3b, &NMD::FLOOR_W_S , 0, | |
19655 | CP1_ }, /* FLOOR.W.S */ | |
19656 | { instruction , 0 , 0 , 32, | |
19657 | 0xfc007fff, 0xa0004b3b, &NMD::FLOOR_W_D , 0, | |
19658 | CP1_ }, /* FLOOR.W.D */ | |
19659 | }; | |
19660 | ||
19661 | ||
19662 | NMD::Pool NMD::RECIP_fmt[2] = { | |
19663 | { instruction , 0 , 0 , 32, | |
19664 | 0xfc007fff, 0xa000123b, &NMD::RECIP_S , 0, | |
19665 | CP1_ }, /* RECIP.S */ | |
19666 | { instruction , 0 , 0 , 32, | |
19667 | 0xfc007fff, 0xa000523b, &NMD::RECIP_D , 0, | |
19668 | CP1_ }, /* RECIP.D */ | |
19669 | }; | |
19670 | ||
19671 | ||
19672 | NMD::Pool NMD::CEIL_L_fmt[2] = { | |
19673 | { instruction , 0 , 0 , 32, | |
19674 | 0xfc007fff, 0xa000133b, &NMD::CEIL_L_S , 0, | |
19675 | CP1_ }, /* CEIL.L.S */ | |
19676 | { instruction , 0 , 0 , 32, | |
19677 | 0xfc007fff, 0xa000533b, &NMD::CEIL_L_D , 0, | |
19678 | CP1_ }, /* CEIL.L.D */ | |
19679 | }; | |
19680 | ||
19681 | ||
19682 | NMD::Pool NMD::CEIL_W_fmt[2] = { | |
19683 | { instruction , 0 , 0 , 32, | |
19684 | 0xfc007fff, 0xa0001b3b, &NMD::CEIL_W_S , 0, | |
19685 | CP1_ }, /* CEIL.W.S */ | |
19686 | { instruction , 0 , 0 , 32, | |
19687 | 0xfc007fff, 0xa0005b3b, &NMD::CEIL_W_D , 0, | |
19688 | CP1_ }, /* CEIL.W.D */ | |
19689 | }; | |
19690 | ||
19691 | ||
19692 | NMD::Pool NMD::TRUNC_L_fmt[2] = { | |
19693 | { instruction , 0 , 0 , 32, | |
19694 | 0xfc007fff, 0xa000233b, &NMD::TRUNC_L_S , 0, | |
19695 | CP1_ }, /* TRUNC.L.S */ | |
19696 | { instruction , 0 , 0 , 32, | |
19697 | 0xfc007fff, 0xa000633b, &NMD::TRUNC_L_D , 0, | |
19698 | CP1_ }, /* TRUNC.L.D */ | |
19699 | }; | |
19700 | ||
19701 | ||
19702 | NMD::Pool NMD::TRUNC_W_fmt[2] = { | |
19703 | { instruction , 0 , 0 , 32, | |
19704 | 0xfc007fff, 0xa0002b3b, &NMD::TRUNC_W_S , 0, | |
19705 | CP1_ }, /* TRUNC.W.S */ | |
19706 | { instruction , 0 , 0 , 32, | |
19707 | 0xfc007fff, 0xa0006b3b, &NMD::TRUNC_W_D , 0, | |
19708 | CP1_ }, /* TRUNC.W.D */ | |
19709 | }; | |
19710 | ||
19711 | ||
19712 | NMD::Pool NMD::ROUND_L_fmt[2] = { | |
19713 | { instruction , 0 , 0 , 32, | |
19714 | 0xfc007fff, 0xa000333b, &NMD::ROUND_L_S , 0, | |
19715 | CP1_ }, /* ROUND.L.S */ | |
19716 | { instruction , 0 , 0 , 32, | |
19717 | 0xfc007fff, 0xa000733b, &NMD::ROUND_L_D , 0, | |
19718 | CP1_ }, /* ROUND.L.D */ | |
19719 | }; | |
19720 | ||
19721 | ||
19722 | NMD::Pool NMD::ROUND_W_fmt[2] = { | |
19723 | { instruction , 0 , 0 , 32, | |
19724 | 0xfc007fff, 0xa0003b3b, &NMD::ROUND_W_S , 0, | |
19725 | CP1_ }, /* ROUND.W.S */ | |
19726 | { instruction , 0 , 0 , 32, | |
19727 | 0xfc007fff, 0xa0007b3b, &NMD::ROUND_W_D , 0, | |
19728 | CP1_ }, /* ROUND.W.D */ | |
19729 | }; | |
19730 | ||
19731 | ||
19732 | NMD::Pool NMD::POOL32Fxf_0[64] = { | |
19733 | { reserved_block , 0 , 0 , 32, | |
19734 | 0xfc003fff, 0xa000003b, 0 , 0, | |
19735 | CP1_ }, /* POOL32Fxf_0~*(0) */ | |
19736 | { pool , CVT_L_fmt , 2 , 32, | |
19737 | 0xfc003fff, 0xa000013b, 0 , 0, | |
19738 | CP1_ }, /* CVT.L.fmt */ | |
19739 | { pool , RSQRT_fmt , 2 , 32, | |
19740 | 0xfc003fff, 0xa000023b, 0 , 0, | |
19741 | CP1_ }, /* RSQRT.fmt */ | |
19742 | { pool , FLOOR_L_fmt , 2 , 32, | |
19743 | 0xfc003fff, 0xa000033b, 0 , 0, | |
19744 | CP1_ }, /* FLOOR.L.fmt */ | |
19745 | { reserved_block , 0 , 0 , 32, | |
19746 | 0xfc003fff, 0xa000043b, 0 , 0, | |
19747 | CP1_ }, /* POOL32Fxf_0~*(4) */ | |
19748 | { reserved_block , 0 , 0 , 32, | |
19749 | 0xfc003fff, 0xa000053b, 0 , 0, | |
19750 | CP1_ }, /* POOL32Fxf_0~*(5) */ | |
19751 | { reserved_block , 0 , 0 , 32, | |
19752 | 0xfc003fff, 0xa000063b, 0 , 0, | |
19753 | CP1_ }, /* POOL32Fxf_0~*(6) */ | |
19754 | { reserved_block , 0 , 0 , 32, | |
19755 | 0xfc003fff, 0xa000073b, 0 , 0, | |
19756 | CP1_ }, /* POOL32Fxf_0~*(7) */ | |
19757 | { reserved_block , 0 , 0 , 32, | |
19758 | 0xfc003fff, 0xa000083b, 0 , 0, | |
19759 | CP1_ }, /* POOL32Fxf_0~*(8) */ | |
19760 | { pool , CVT_W_fmt , 2 , 32, | |
19761 | 0xfc003fff, 0xa000093b, 0 , 0, | |
19762 | CP1_ }, /* CVT.W.fmt */ | |
19763 | { pool , SQRT_fmt , 2 , 32, | |
19764 | 0xfc003fff, 0xa0000a3b, 0 , 0, | |
19765 | CP1_ }, /* SQRT.fmt */ | |
19766 | { pool , FLOOR_W_fmt , 2 , 32, | |
19767 | 0xfc003fff, 0xa0000b3b, 0 , 0, | |
19768 | CP1_ }, /* FLOOR.W.fmt */ | |
19769 | { reserved_block , 0 , 0 , 32, | |
19770 | 0xfc003fff, 0xa0000c3b, 0 , 0, | |
19771 | CP1_ }, /* POOL32Fxf_0~*(12) */ | |
19772 | { reserved_block , 0 , 0 , 32, | |
19773 | 0xfc003fff, 0xa0000d3b, 0 , 0, | |
19774 | CP1_ }, /* POOL32Fxf_0~*(13) */ | |
19775 | { reserved_block , 0 , 0 , 32, | |
19776 | 0xfc003fff, 0xa0000e3b, 0 , 0, | |
19777 | CP1_ }, /* POOL32Fxf_0~*(14) */ | |
19778 | { reserved_block , 0 , 0 , 32, | |
19779 | 0xfc003fff, 0xa0000f3b, 0 , 0, | |
19780 | CP1_ }, /* POOL32Fxf_0~*(15) */ | |
19781 | { instruction , 0 , 0 , 32, | |
19782 | 0xfc003fff, 0xa000103b, &NMD::CFC1 , 0, | |
19783 | CP1_ }, /* CFC1 */ | |
19784 | { reserved_block , 0 , 0 , 32, | |
19785 | 0xfc003fff, 0xa000113b, 0 , 0, | |
19786 | CP1_ }, /* POOL32Fxf_0~*(17) */ | |
19787 | { pool , RECIP_fmt , 2 , 32, | |
19788 | 0xfc003fff, 0xa000123b, 0 , 0, | |
19789 | CP1_ }, /* RECIP.fmt */ | |
19790 | { pool , CEIL_L_fmt , 2 , 32, | |
19791 | 0xfc003fff, 0xa000133b, 0 , 0, | |
19792 | CP1_ }, /* CEIL.L.fmt */ | |
19793 | { reserved_block , 0 , 0 , 32, | |
19794 | 0xfc003fff, 0xa000143b, 0 , 0, | |
19795 | CP1_ }, /* POOL32Fxf_0~*(20) */ | |
19796 | { reserved_block , 0 , 0 , 32, | |
19797 | 0xfc003fff, 0xa000153b, 0 , 0, | |
19798 | CP1_ }, /* POOL32Fxf_0~*(21) */ | |
19799 | { reserved_block , 0 , 0 , 32, | |
19800 | 0xfc003fff, 0xa000163b, 0 , 0, | |
19801 | CP1_ }, /* POOL32Fxf_0~*(22) */ | |
19802 | { reserved_block , 0 , 0 , 32, | |
19803 | 0xfc003fff, 0xa000173b, 0 , 0, | |
19804 | CP1_ }, /* POOL32Fxf_0~*(23) */ | |
19805 | { instruction , 0 , 0 , 32, | |
19806 | 0xfc003fff, 0xa000183b, &NMD::CTC1 , 0, | |
19807 | CP1_ }, /* CTC1 */ | |
19808 | { reserved_block , 0 , 0 , 32, | |
19809 | 0xfc003fff, 0xa000193b, 0 , 0, | |
19810 | CP1_ }, /* POOL32Fxf_0~*(25) */ | |
19811 | { reserved_block , 0 , 0 , 32, | |
19812 | 0xfc003fff, 0xa0001a3b, 0 , 0, | |
19813 | CP1_ }, /* POOL32Fxf_0~*(26) */ | |
19814 | { pool , CEIL_W_fmt , 2 , 32, | |
19815 | 0xfc003fff, 0xa0001b3b, 0 , 0, | |
19816 | CP1_ }, /* CEIL.W.fmt */ | |
19817 | { reserved_block , 0 , 0 , 32, | |
19818 | 0xfc003fff, 0xa0001c3b, 0 , 0, | |
19819 | CP1_ }, /* POOL32Fxf_0~*(28) */ | |
19820 | { reserved_block , 0 , 0 , 32, | |
19821 | 0xfc003fff, 0xa0001d3b, 0 , 0, | |
19822 | CP1_ }, /* POOL32Fxf_0~*(29) */ | |
19823 | { reserved_block , 0 , 0 , 32, | |
19824 | 0xfc003fff, 0xa0001e3b, 0 , 0, | |
19825 | CP1_ }, /* POOL32Fxf_0~*(30) */ | |
19826 | { reserved_block , 0 , 0 , 32, | |
19827 | 0xfc003fff, 0xa0001f3b, 0 , 0, | |
19828 | CP1_ }, /* POOL32Fxf_0~*(31) */ | |
19829 | { instruction , 0 , 0 , 32, | |
19830 | 0xfc003fff, 0xa000203b, &NMD::MFC1 , 0, | |
19831 | CP1_ }, /* MFC1 */ | |
19832 | { instruction , 0 , 0 , 32, | |
19833 | 0xfc003fff, 0xa000213b, &NMD::CVT_S_PL , 0, | |
19834 | CP1_ }, /* CVT.S.PL */ | |
19835 | { reserved_block , 0 , 0 , 32, | |
19836 | 0xfc003fff, 0xa000223b, 0 , 0, | |
19837 | CP1_ }, /* POOL32Fxf_0~*(34) */ | |
19838 | { pool , TRUNC_L_fmt , 2 , 32, | |
19839 | 0xfc003fff, 0xa000233b, 0 , 0, | |
19840 | CP1_ }, /* TRUNC.L.fmt */ | |
19841 | { instruction , 0 , 0 , 32, | |
19842 | 0xfc003fff, 0xa000243b, &NMD::DMFC1 , 0, | |
19843 | CP1_ | MIPS64_ }, /* DMFC1 */ | |
19844 | { reserved_block , 0 , 0 , 32, | |
19845 | 0xfc003fff, 0xa000253b, 0 , 0, | |
19846 | CP1_ }, /* POOL32Fxf_0~*(37) */ | |
19847 | { reserved_block , 0 , 0 , 32, | |
19848 | 0xfc003fff, 0xa000263b, 0 , 0, | |
19849 | CP1_ }, /* POOL32Fxf_0~*(38) */ | |
19850 | { reserved_block , 0 , 0 , 32, | |
19851 | 0xfc003fff, 0xa000273b, 0 , 0, | |
19852 | CP1_ }, /* POOL32Fxf_0~*(39) */ | |
19853 | { instruction , 0 , 0 , 32, | |
19854 | 0xfc003fff, 0xa000283b, &NMD::MTC1 , 0, | |
19855 | CP1_ }, /* MTC1 */ | |
19856 | { instruction , 0 , 0 , 32, | |
19857 | 0xfc003fff, 0xa000293b, &NMD::CVT_S_PU , 0, | |
19858 | CP1_ }, /* CVT.S.PU */ | |
19859 | { reserved_block , 0 , 0 , 32, | |
19860 | 0xfc003fff, 0xa0002a3b, 0 , 0, | |
19861 | CP1_ }, /* POOL32Fxf_0~*(42) */ | |
19862 | { pool , TRUNC_W_fmt , 2 , 32, | |
19863 | 0xfc003fff, 0xa0002b3b, 0 , 0, | |
19864 | CP1_ }, /* TRUNC.W.fmt */ | |
19865 | { instruction , 0 , 0 , 32, | |
19866 | 0xfc003fff, 0xa0002c3b, &NMD::DMTC1 , 0, | |
19867 | CP1_ | MIPS64_ }, /* DMTC1 */ | |
19868 | { reserved_block , 0 , 0 , 32, | |
19869 | 0xfc003fff, 0xa0002d3b, 0 , 0, | |
19870 | CP1_ }, /* POOL32Fxf_0~*(45) */ | |
19871 | { reserved_block , 0 , 0 , 32, | |
19872 | 0xfc003fff, 0xa0002e3b, 0 , 0, | |
19873 | CP1_ }, /* POOL32Fxf_0~*(46) */ | |
19874 | { reserved_block , 0 , 0 , 32, | |
19875 | 0xfc003fff, 0xa0002f3b, 0 , 0, | |
19876 | CP1_ }, /* POOL32Fxf_0~*(47) */ | |
19877 | { instruction , 0 , 0 , 32, | |
19878 | 0xfc003fff, 0xa000303b, &NMD::MFHC1 , 0, | |
19879 | CP1_ }, /* MFHC1 */ | |
19880 | { reserved_block , 0 , 0 , 32, | |
19881 | 0xfc003fff, 0xa000313b, 0 , 0, | |
19882 | CP1_ }, /* POOL32Fxf_0~*(49) */ | |
19883 | { reserved_block , 0 , 0 , 32, | |
19884 | 0xfc003fff, 0xa000323b, 0 , 0, | |
19885 | CP1_ }, /* POOL32Fxf_0~*(50) */ | |
19886 | { pool , ROUND_L_fmt , 2 , 32, | |
19887 | 0xfc003fff, 0xa000333b, 0 , 0, | |
19888 | CP1_ }, /* ROUND.L.fmt */ | |
19889 | { reserved_block , 0 , 0 , 32, | |
19890 | 0xfc003fff, 0xa000343b, 0 , 0, | |
19891 | CP1_ }, /* POOL32Fxf_0~*(52) */ | |
19892 | { reserved_block , 0 , 0 , 32, | |
19893 | 0xfc003fff, 0xa000353b, 0 , 0, | |
19894 | CP1_ }, /* POOL32Fxf_0~*(53) */ | |
19895 | { reserved_block , 0 , 0 , 32, | |
19896 | 0xfc003fff, 0xa000363b, 0 , 0, | |
19897 | CP1_ }, /* POOL32Fxf_0~*(54) */ | |
19898 | { reserved_block , 0 , 0 , 32, | |
19899 | 0xfc003fff, 0xa000373b, 0 , 0, | |
19900 | CP1_ }, /* POOL32Fxf_0~*(55) */ | |
19901 | { instruction , 0 , 0 , 32, | |
19902 | 0xfc003fff, 0xa000383b, &NMD::MTHC1 , 0, | |
19903 | CP1_ }, /* MTHC1 */ | |
19904 | { reserved_block , 0 , 0 , 32, | |
19905 | 0xfc003fff, 0xa000393b, 0 , 0, | |
19906 | CP1_ }, /* POOL32Fxf_0~*(57) */ | |
19907 | { reserved_block , 0 , 0 , 32, | |
19908 | 0xfc003fff, 0xa0003a3b, 0 , 0, | |
19909 | CP1_ }, /* POOL32Fxf_0~*(58) */ | |
19910 | { pool , ROUND_W_fmt , 2 , 32, | |
19911 | 0xfc003fff, 0xa0003b3b, 0 , 0, | |
19912 | CP1_ }, /* ROUND.W.fmt */ | |
19913 | { reserved_block , 0 , 0 , 32, | |
19914 | 0xfc003fff, 0xa0003c3b, 0 , 0, | |
19915 | CP1_ }, /* POOL32Fxf_0~*(60) */ | |
19916 | { reserved_block , 0 , 0 , 32, | |
19917 | 0xfc003fff, 0xa0003d3b, 0 , 0, | |
19918 | CP1_ }, /* POOL32Fxf_0~*(61) */ | |
19919 | { reserved_block , 0 , 0 , 32, | |
19920 | 0xfc003fff, 0xa0003e3b, 0 , 0, | |
19921 | CP1_ }, /* POOL32Fxf_0~*(62) */ | |
19922 | { reserved_block , 0 , 0 , 32, | |
19923 | 0xfc003fff, 0xa0003f3b, 0 , 0, | |
19924 | CP1_ }, /* POOL32Fxf_0~*(63) */ | |
19925 | }; | |
19926 | ||
19927 | ||
19928 | NMD::Pool NMD::MOV_fmt[4] = { | |
19929 | { instruction , 0 , 0 , 32, | |
19930 | 0xfc007fff, 0xa000007b, &NMD::MOV_S , 0, | |
19931 | CP1_ }, /* MOV.S */ | |
19932 | { instruction , 0 , 0 , 32, | |
19933 | 0xfc007fff, 0xa000207b, &NMD::MOV_D , 0, | |
19934 | CP1_ }, /* MOV.D */ | |
19935 | { reserved_block , 0 , 0 , 32, | |
19936 | 0xfc007fff, 0xa000407b, 0 , 0, | |
19937 | CP1_ }, /* MOV.fmt~*(2) */ | |
19938 | { reserved_block , 0 , 0 , 32, | |
19939 | 0xfc007fff, 0xa000607b, 0 , 0, | |
19940 | CP1_ }, /* MOV.fmt~*(3) */ | |
19941 | }; | |
19942 | ||
19943 | ||
19944 | NMD::Pool NMD::ABS_fmt[4] = { | |
19945 | { instruction , 0 , 0 , 32, | |
19946 | 0xfc007fff, 0xa000037b, &NMD::ABS_S , 0, | |
19947 | CP1_ }, /* ABS.S */ | |
19948 | { instruction , 0 , 0 , 32, | |
19949 | 0xfc007fff, 0xa000237b, &NMD::ABS_D , 0, | |
19950 | CP1_ }, /* ABS.D */ | |
19951 | { reserved_block , 0 , 0 , 32, | |
19952 | 0xfc007fff, 0xa000437b, 0 , 0, | |
19953 | CP1_ }, /* ABS.fmt~*(2) */ | |
19954 | { reserved_block , 0 , 0 , 32, | |
19955 | 0xfc007fff, 0xa000637b, 0 , 0, | |
19956 | CP1_ }, /* ABS.fmt~*(3) */ | |
19957 | }; | |
19958 | ||
19959 | ||
19960 | NMD::Pool NMD::NEG_fmt[4] = { | |
19961 | { instruction , 0 , 0 , 32, | |
19962 | 0xfc007fff, 0xa0000b7b, &NMD::NEG_S , 0, | |
19963 | CP1_ }, /* NEG.S */ | |
19964 | { instruction , 0 , 0 , 32, | |
19965 | 0xfc007fff, 0xa0002b7b, &NMD::NEG_D , 0, | |
19966 | CP1_ }, /* NEG.D */ | |
19967 | { reserved_block , 0 , 0 , 32, | |
19968 | 0xfc007fff, 0xa0004b7b, 0 , 0, | |
19969 | CP1_ }, /* NEG.fmt~*(2) */ | |
19970 | { reserved_block , 0 , 0 , 32, | |
19971 | 0xfc007fff, 0xa0006b7b, 0 , 0, | |
19972 | CP1_ }, /* NEG.fmt~*(3) */ | |
19973 | }; | |
19974 | ||
19975 | ||
19976 | NMD::Pool NMD::CVT_D_fmt[4] = { | |
19977 | { instruction , 0 , 0 , 32, | |
19978 | 0xfc007fff, 0xa000137b, &NMD::CVT_D_S , 0, | |
19979 | CP1_ }, /* CVT.D.S */ | |
19980 | { instruction , 0 , 0 , 32, | |
19981 | 0xfc007fff, 0xa000337b, &NMD::CVT_D_W , 0, | |
19982 | CP1_ }, /* CVT.D.W */ | |
19983 | { instruction , 0 , 0 , 32, | |
19984 | 0xfc007fff, 0xa000537b, &NMD::CVT_D_L , 0, | |
19985 | CP1_ }, /* CVT.D.L */ | |
19986 | { reserved_block , 0 , 0 , 32, | |
19987 | 0xfc007fff, 0xa000737b, 0 , 0, | |
19988 | CP1_ }, /* CVT.D.fmt~*(3) */ | |
19989 | }; | |
19990 | ||
19991 | ||
19992 | NMD::Pool NMD::CVT_S_fmt[4] = { | |
19993 | { instruction , 0 , 0 , 32, | |
19994 | 0xfc007fff, 0xa0001b7b, &NMD::CVT_S_D , 0, | |
19995 | CP1_ }, /* CVT.S.D */ | |
19996 | { instruction , 0 , 0 , 32, | |
19997 | 0xfc007fff, 0xa0003b7b, &NMD::CVT_S_W , 0, | |
19998 | CP1_ }, /* CVT.S.W */ | |
19999 | { instruction , 0 , 0 , 32, | |
20000 | 0xfc007fff, 0xa0005b7b, &NMD::CVT_S_L , 0, | |
20001 | CP1_ }, /* CVT.S.L */ | |
20002 | { reserved_block , 0 , 0 , 32, | |
20003 | 0xfc007fff, 0xa0007b7b, 0 , 0, | |
20004 | CP1_ }, /* CVT.S.fmt~*(3) */ | |
20005 | }; | |
20006 | ||
20007 | ||
20008 | NMD::Pool NMD::POOL32Fxf_1[32] = { | |
20009 | { pool , MOV_fmt , 4 , 32, | |
20010 | 0xfc001fff, 0xa000007b, 0 , 0, | |
20011 | CP1_ }, /* MOV.fmt */ | |
20012 | { reserved_block , 0 , 0 , 32, | |
20013 | 0xfc001fff, 0xa000017b, 0 , 0, | |
20014 | CP1_ }, /* POOL32Fxf_1~*(1) */ | |
20015 | { reserved_block , 0 , 0 , 32, | |
20016 | 0xfc001fff, 0xa000027b, 0 , 0, | |
20017 | CP1_ }, /* POOL32Fxf_1~*(2) */ | |
20018 | { pool , ABS_fmt , 4 , 32, | |
20019 | 0xfc001fff, 0xa000037b, 0 , 0, | |
20020 | CP1_ }, /* ABS.fmt */ | |
20021 | { reserved_block , 0 , 0 , 32, | |
20022 | 0xfc001fff, 0xa000047b, 0 , 0, | |
20023 | CP1_ }, /* POOL32Fxf_1~*(4) */ | |
20024 | { reserved_block , 0 , 0 , 32, | |
20025 | 0xfc001fff, 0xa000057b, 0 , 0, | |
20026 | CP1_ }, /* POOL32Fxf_1~*(5) */ | |
20027 | { reserved_block , 0 , 0 , 32, | |
20028 | 0xfc001fff, 0xa000067b, 0 , 0, | |
20029 | CP1_ }, /* POOL32Fxf_1~*(6) */ | |
20030 | { reserved_block , 0 , 0 , 32, | |
20031 | 0xfc001fff, 0xa000077b, 0 , 0, | |
20032 | CP1_ }, /* POOL32Fxf_1~*(7) */ | |
20033 | { reserved_block , 0 , 0 , 32, | |
20034 | 0xfc001fff, 0xa000087b, 0 , 0, | |
20035 | CP1_ }, /* POOL32Fxf_1~*(8) */ | |
20036 | { reserved_block , 0 , 0 , 32, | |
20037 | 0xfc001fff, 0xa000097b, 0 , 0, | |
20038 | CP1_ }, /* POOL32Fxf_1~*(9) */ | |
20039 | { reserved_block , 0 , 0 , 32, | |
20040 | 0xfc001fff, 0xa0000a7b, 0 , 0, | |
20041 | CP1_ }, /* POOL32Fxf_1~*(10) */ | |
20042 | { pool , NEG_fmt , 4 , 32, | |
20043 | 0xfc001fff, 0xa0000b7b, 0 , 0, | |
20044 | CP1_ }, /* NEG.fmt */ | |
20045 | { reserved_block , 0 , 0 , 32, | |
20046 | 0xfc001fff, 0xa0000c7b, 0 , 0, | |
20047 | CP1_ }, /* POOL32Fxf_1~*(12) */ | |
20048 | { reserved_block , 0 , 0 , 32, | |
20049 | 0xfc001fff, 0xa0000d7b, 0 , 0, | |
20050 | CP1_ }, /* POOL32Fxf_1~*(13) */ | |
20051 | { reserved_block , 0 , 0 , 32, | |
20052 | 0xfc001fff, 0xa0000e7b, 0 , 0, | |
20053 | CP1_ }, /* POOL32Fxf_1~*(14) */ | |
20054 | { reserved_block , 0 , 0 , 32, | |
20055 | 0xfc001fff, 0xa0000f7b, 0 , 0, | |
20056 | CP1_ }, /* POOL32Fxf_1~*(15) */ | |
20057 | { reserved_block , 0 , 0 , 32, | |
20058 | 0xfc001fff, 0xa000107b, 0 , 0, | |
20059 | CP1_ }, /* POOL32Fxf_1~*(16) */ | |
20060 | { reserved_block , 0 , 0 , 32, | |
20061 | 0xfc001fff, 0xa000117b, 0 , 0, | |
20062 | CP1_ }, /* POOL32Fxf_1~*(17) */ | |
20063 | { reserved_block , 0 , 0 , 32, | |
20064 | 0xfc001fff, 0xa000127b, 0 , 0, | |
20065 | CP1_ }, /* POOL32Fxf_1~*(18) */ | |
20066 | { pool , CVT_D_fmt , 4 , 32, | |
20067 | 0xfc001fff, 0xa000137b, 0 , 0, | |
20068 | CP1_ }, /* CVT.D.fmt */ | |
20069 | { reserved_block , 0 , 0 , 32, | |
20070 | 0xfc001fff, 0xa000147b, 0 , 0, | |
20071 | CP1_ }, /* POOL32Fxf_1~*(20) */ | |
20072 | { reserved_block , 0 , 0 , 32, | |
20073 | 0xfc001fff, 0xa000157b, 0 , 0, | |
20074 | CP1_ }, /* POOL32Fxf_1~*(21) */ | |
20075 | { reserved_block , 0 , 0 , 32, | |
20076 | 0xfc001fff, 0xa000167b, 0 , 0, | |
20077 | CP1_ }, /* POOL32Fxf_1~*(22) */ | |
20078 | { reserved_block , 0 , 0 , 32, | |
20079 | 0xfc001fff, 0xa000177b, 0 , 0, | |
20080 | CP1_ }, /* POOL32Fxf_1~*(23) */ | |
20081 | { reserved_block , 0 , 0 , 32, | |
20082 | 0xfc001fff, 0xa000187b, 0 , 0, | |
20083 | CP1_ }, /* POOL32Fxf_1~*(24) */ | |
20084 | { reserved_block , 0 , 0 , 32, | |
20085 | 0xfc001fff, 0xa000197b, 0 , 0, | |
20086 | CP1_ }, /* POOL32Fxf_1~*(25) */ | |
20087 | { reserved_block , 0 , 0 , 32, | |
20088 | 0xfc001fff, 0xa0001a7b, 0 , 0, | |
20089 | CP1_ }, /* POOL32Fxf_1~*(26) */ | |
20090 | { pool , CVT_S_fmt , 4 , 32, | |
20091 | 0xfc001fff, 0xa0001b7b, 0 , 0, | |
20092 | CP1_ }, /* CVT.S.fmt */ | |
20093 | { reserved_block , 0 , 0 , 32, | |
20094 | 0xfc001fff, 0xa0001c7b, 0 , 0, | |
20095 | CP1_ }, /* POOL32Fxf_1~*(28) */ | |
20096 | { reserved_block , 0 , 0 , 32, | |
20097 | 0xfc001fff, 0xa0001d7b, 0 , 0, | |
20098 | CP1_ }, /* POOL32Fxf_1~*(29) */ | |
20099 | { reserved_block , 0 , 0 , 32, | |
20100 | 0xfc001fff, 0xa0001e7b, 0 , 0, | |
20101 | CP1_ }, /* POOL32Fxf_1~*(30) */ | |
20102 | { reserved_block , 0 , 0 , 32, | |
20103 | 0xfc001fff, 0xa0001f7b, 0 , 0, | |
20104 | CP1_ }, /* POOL32Fxf_1~*(31) */ | |
20105 | }; | |
20106 | ||
20107 | ||
20108 | NMD::Pool NMD::POOL32Fxf[4] = { | |
20109 | { pool , POOL32Fxf_0 , 64 , 32, | |
20110 | 0xfc0000ff, 0xa000003b, 0 , 0, | |
20111 | CP1_ }, /* POOL32Fxf_0 */ | |
20112 | { pool , POOL32Fxf_1 , 32 , 32, | |
20113 | 0xfc0000ff, 0xa000007b, 0 , 0, | |
20114 | CP1_ }, /* POOL32Fxf_1 */ | |
20115 | { reserved_block , 0 , 0 , 32, | |
20116 | 0xfc0000ff, 0xa00000bb, 0 , 0, | |
20117 | CP1_ }, /* POOL32Fxf~*(2) */ | |
20118 | { reserved_block , 0 , 0 , 32, | |
20119 | 0xfc0000ff, 0xa00000fb, 0 , 0, | |
20120 | CP1_ }, /* POOL32Fxf~*(3) */ | |
20121 | }; | |
20122 | ||
20123 | ||
20124 | NMD::Pool NMD::POOL32F_3[8] = { | |
20125 | { pool , MIN_fmt , 2 , 32, | |
20126 | 0xfc00003f, 0xa0000003, 0 , 0, | |
20127 | CP1_ }, /* MIN.fmt */ | |
20128 | { pool , MAX_fmt , 2 , 32, | |
20129 | 0xfc00003f, 0xa000000b, 0 , 0, | |
20130 | CP1_ }, /* MAX.fmt */ | |
20131 | { reserved_block , 0 , 0 , 32, | |
20132 | 0xfc00003f, 0xa0000013, 0 , 0, | |
20133 | CP1_ }, /* POOL32F_3~*(2) */ | |
20134 | { reserved_block , 0 , 0 , 32, | |
20135 | 0xfc00003f, 0xa000001b, 0 , 0, | |
20136 | CP1_ }, /* POOL32F_3~*(3) */ | |
20137 | { pool , MINA_fmt , 2 , 32, | |
20138 | 0xfc00003f, 0xa0000023, 0 , 0, | |
20139 | CP1_ }, /* MINA.fmt */ | |
20140 | { pool , MAXA_fmt , 2 , 32, | |
20141 | 0xfc00003f, 0xa000002b, 0 , 0, | |
20142 | CP1_ }, /* MAXA.fmt */ | |
20143 | { reserved_block , 0 , 0 , 32, | |
20144 | 0xfc00003f, 0xa0000033, 0 , 0, | |
20145 | CP1_ }, /* POOL32F_3~*(6) */ | |
20146 | { pool , POOL32Fxf , 4 , 32, | |
20147 | 0xfc00003f, 0xa000003b, 0 , 0, | |
20148 | CP1_ }, /* POOL32Fxf */ | |
20149 | }; | |
20150 | ||
20151 | ||
20152 | NMD::Pool NMD::CMP_condn_S[32] = { | |
20153 | { instruction , 0 , 0 , 32, | |
20154 | 0xfc0007ff, 0xa0000005, &NMD::CMP_AF_S , 0, | |
20155 | CP1_ }, /* CMP.AF.S */ | |
20156 | { instruction , 0 , 0 , 32, | |
20157 | 0xfc0007ff, 0xa0000045, &NMD::CMP_UN_S , 0, | |
20158 | CP1_ }, /* CMP.UN.S */ | |
20159 | { instruction , 0 , 0 , 32, | |
20160 | 0xfc0007ff, 0xa0000085, &NMD::CMP_EQ_S , 0, | |
20161 | CP1_ }, /* CMP.EQ.S */ | |
20162 | { instruction , 0 , 0 , 32, | |
20163 | 0xfc0007ff, 0xa00000c5, &NMD::CMP_UEQ_S , 0, | |
20164 | CP1_ }, /* CMP.UEQ.S */ | |
20165 | { instruction , 0 , 0 , 32, | |
20166 | 0xfc0007ff, 0xa0000105, &NMD::CMP_LT_S , 0, | |
20167 | CP1_ }, /* CMP.LT.S */ | |
20168 | { instruction , 0 , 0 , 32, | |
20169 | 0xfc0007ff, 0xa0000145, &NMD::CMP_ULT_S , 0, | |
20170 | CP1_ }, /* CMP.ULT.S */ | |
20171 | { instruction , 0 , 0 , 32, | |
20172 | 0xfc0007ff, 0xa0000185, &NMD::CMP_LE_S , 0, | |
20173 | CP1_ }, /* CMP.LE.S */ | |
20174 | { instruction , 0 , 0 , 32, | |
20175 | 0xfc0007ff, 0xa00001c5, &NMD::CMP_ULE_S , 0, | |
20176 | CP1_ }, /* CMP.ULE.S */ | |
20177 | { instruction , 0 , 0 , 32, | |
20178 | 0xfc0007ff, 0xa0000205, &NMD::CMP_SAF_S , 0, | |
20179 | CP1_ }, /* CMP.SAF.S */ | |
20180 | { instruction , 0 , 0 , 32, | |
20181 | 0xfc0007ff, 0xa0000245, &NMD::CMP_SUN_S , 0, | |
20182 | CP1_ }, /* CMP.SUN.S */ | |
20183 | { instruction , 0 , 0 , 32, | |
20184 | 0xfc0007ff, 0xa0000285, &NMD::CMP_SEQ_S , 0, | |
20185 | CP1_ }, /* CMP.SEQ.S */ | |
20186 | { instruction , 0 , 0 , 32, | |
20187 | 0xfc0007ff, 0xa00002c5, &NMD::CMP_SUEQ_S , 0, | |
20188 | CP1_ }, /* CMP.SUEQ.S */ | |
20189 | { instruction , 0 , 0 , 32, | |
20190 | 0xfc0007ff, 0xa0000305, &NMD::CMP_SLT_S , 0, | |
20191 | CP1_ }, /* CMP.SLT.S */ | |
20192 | { instruction , 0 , 0 , 32, | |
20193 | 0xfc0007ff, 0xa0000345, &NMD::CMP_SULT_S , 0, | |
20194 | CP1_ }, /* CMP.SULT.S */ | |
20195 | { instruction , 0 , 0 , 32, | |
20196 | 0xfc0007ff, 0xa0000385, &NMD::CMP_SLE_S , 0, | |
20197 | CP1_ }, /* CMP.SLE.S */ | |
20198 | { instruction , 0 , 0 , 32, | |
20199 | 0xfc0007ff, 0xa00003c5, &NMD::CMP_SULE_S , 0, | |
20200 | CP1_ }, /* CMP.SULE.S */ | |
20201 | { reserved_block , 0 , 0 , 32, | |
20202 | 0xfc0007ff, 0xa0000405, 0 , 0, | |
20203 | CP1_ }, /* CMP.condn.S~*(16) */ | |
20204 | { instruction , 0 , 0 , 32, | |
20205 | 0xfc0007ff, 0xa0000445, &NMD::CMP_OR_S , 0, | |
20206 | CP1_ }, /* CMP.OR.S */ | |
20207 | { instruction , 0 , 0 , 32, | |
20208 | 0xfc0007ff, 0xa0000485, &NMD::CMP_UNE_S , 0, | |
20209 | CP1_ }, /* CMP.UNE.S */ | |
20210 | { instruction , 0 , 0 , 32, | |
20211 | 0xfc0007ff, 0xa00004c5, &NMD::CMP_NE_S , 0, | |
20212 | CP1_ }, /* CMP.NE.S */ | |
20213 | { reserved_block , 0 , 0 , 32, | |
20214 | 0xfc0007ff, 0xa0000505, 0 , 0, | |
20215 | CP1_ }, /* CMP.condn.S~*(20) */ | |
20216 | { reserved_block , 0 , 0 , 32, | |
20217 | 0xfc0007ff, 0xa0000545, 0 , 0, | |
20218 | CP1_ }, /* CMP.condn.S~*(21) */ | |
20219 | { reserved_block , 0 , 0 , 32, | |
20220 | 0xfc0007ff, 0xa0000585, 0 , 0, | |
20221 | CP1_ }, /* CMP.condn.S~*(22) */ | |
20222 | { reserved_block , 0 , 0 , 32, | |
20223 | 0xfc0007ff, 0xa00005c5, 0 , 0, | |
20224 | CP1_ }, /* CMP.condn.S~*(23) */ | |
20225 | { reserved_block , 0 , 0 , 32, | |
20226 | 0xfc0007ff, 0xa0000605, 0 , 0, | |
20227 | CP1_ }, /* CMP.condn.S~*(24) */ | |
20228 | { instruction , 0 , 0 , 32, | |
20229 | 0xfc0007ff, 0xa0000645, &NMD::CMP_SOR_S , 0, | |
20230 | CP1_ }, /* CMP.SOR.S */ | |
20231 | { instruction , 0 , 0 , 32, | |
20232 | 0xfc0007ff, 0xa0000685, &NMD::CMP_SUNE_S , 0, | |
20233 | CP1_ }, /* CMP.SUNE.S */ | |
20234 | { instruction , 0 , 0 , 32, | |
20235 | 0xfc0007ff, 0xa00006c5, &NMD::CMP_SNE_S , 0, | |
20236 | CP1_ }, /* CMP.SNE.S */ | |
20237 | { reserved_block , 0 , 0 , 32, | |
20238 | 0xfc0007ff, 0xa0000705, 0 , 0, | |
20239 | CP1_ }, /* CMP.condn.S~*(28) */ | |
20240 | { reserved_block , 0 , 0 , 32, | |
20241 | 0xfc0007ff, 0xa0000745, 0 , 0, | |
20242 | CP1_ }, /* CMP.condn.S~*(29) */ | |
20243 | { reserved_block , 0 , 0 , 32, | |
20244 | 0xfc0007ff, 0xa0000785, 0 , 0, | |
20245 | CP1_ }, /* CMP.condn.S~*(30) */ | |
20246 | { reserved_block , 0 , 0 , 32, | |
20247 | 0xfc0007ff, 0xa00007c5, 0 , 0, | |
20248 | CP1_ }, /* CMP.condn.S~*(31) */ | |
20249 | }; | |
20250 | ||
20251 | ||
20252 | NMD::Pool NMD::CMP_condn_D[32] = { | |
20253 | { instruction , 0 , 0 , 32, | |
20254 | 0xfc0007ff, 0xa0000015, &NMD::CMP_AF_D , 0, | |
20255 | CP1_ }, /* CMP.AF.D */ | |
20256 | { instruction , 0 , 0 , 32, | |
20257 | 0xfc0007ff, 0xa0000055, &NMD::CMP_UN_D , 0, | |
20258 | CP1_ }, /* CMP.UN.D */ | |
20259 | { instruction , 0 , 0 , 32, | |
20260 | 0xfc0007ff, 0xa0000095, &NMD::CMP_EQ_D , 0, | |
20261 | CP1_ }, /* CMP.EQ.D */ | |
20262 | { instruction , 0 , 0 , 32, | |
20263 | 0xfc0007ff, 0xa00000d5, &NMD::CMP_UEQ_D , 0, | |
20264 | CP1_ }, /* CMP.UEQ.D */ | |
20265 | { instruction , 0 , 0 , 32, | |
20266 | 0xfc0007ff, 0xa0000115, &NMD::CMP_LT_D , 0, | |
20267 | CP1_ }, /* CMP.LT.D */ | |
20268 | { instruction , 0 , 0 , 32, | |
20269 | 0xfc0007ff, 0xa0000155, &NMD::CMP_ULT_D , 0, | |
20270 | CP1_ }, /* CMP.ULT.D */ | |
20271 | { instruction , 0 , 0 , 32, | |
20272 | 0xfc0007ff, 0xa0000195, &NMD::CMP_LE_D , 0, | |
20273 | CP1_ }, /* CMP.LE.D */ | |
20274 | { instruction , 0 , 0 , 32, | |
20275 | 0xfc0007ff, 0xa00001d5, &NMD::CMP_ULE_D , 0, | |
20276 | CP1_ }, /* CMP.ULE.D */ | |
20277 | { instruction , 0 , 0 , 32, | |
20278 | 0xfc0007ff, 0xa0000215, &NMD::CMP_SAF_D , 0, | |
20279 | CP1_ }, /* CMP.SAF.D */ | |
20280 | { instruction , 0 , 0 , 32, | |
20281 | 0xfc0007ff, 0xa0000255, &NMD::CMP_SUN_D , 0, | |
20282 | CP1_ }, /* CMP.SUN.D */ | |
20283 | { instruction , 0 , 0 , 32, | |
20284 | 0xfc0007ff, 0xa0000295, &NMD::CMP_SEQ_D , 0, | |
20285 | CP1_ }, /* CMP.SEQ.D */ | |
20286 | { instruction , 0 , 0 , 32, | |
20287 | 0xfc0007ff, 0xa00002d5, &NMD::CMP_SUEQ_D , 0, | |
20288 | CP1_ }, /* CMP.SUEQ.D */ | |
20289 | { instruction , 0 , 0 , 32, | |
20290 | 0xfc0007ff, 0xa0000315, &NMD::CMP_SLT_D , 0, | |
20291 | CP1_ }, /* CMP.SLT.D */ | |
20292 | { instruction , 0 , 0 , 32, | |
20293 | 0xfc0007ff, 0xa0000355, &NMD::CMP_SULT_D , 0, | |
20294 | CP1_ }, /* CMP.SULT.D */ | |
20295 | { instruction , 0 , 0 , 32, | |
20296 | 0xfc0007ff, 0xa0000395, &NMD::CMP_SLE_D , 0, | |
20297 | CP1_ }, /* CMP.SLE.D */ | |
20298 | { instruction , 0 , 0 , 32, | |
20299 | 0xfc0007ff, 0xa00003d5, &NMD::CMP_SULE_D , 0, | |
20300 | CP1_ }, /* CMP.SULE.D */ | |
20301 | { reserved_block , 0 , 0 , 32, | |
20302 | 0xfc0007ff, 0xa0000415, 0 , 0, | |
20303 | CP1_ }, /* CMP.condn.D~*(16) */ | |
20304 | { instruction , 0 , 0 , 32, | |
20305 | 0xfc0007ff, 0xa0000455, &NMD::CMP_OR_D , 0, | |
20306 | CP1_ }, /* CMP.OR.D */ | |
20307 | { instruction , 0 , 0 , 32, | |
20308 | 0xfc0007ff, 0xa0000495, &NMD::CMP_UNE_D , 0, | |
20309 | CP1_ }, /* CMP.UNE.D */ | |
20310 | { instruction , 0 , 0 , 32, | |
20311 | 0xfc0007ff, 0xa00004d5, &NMD::CMP_NE_D , 0, | |
20312 | CP1_ }, /* CMP.NE.D */ | |
20313 | { reserved_block , 0 , 0 , 32, | |
20314 | 0xfc0007ff, 0xa0000515, 0 , 0, | |
20315 | CP1_ }, /* CMP.condn.D~*(20) */ | |
20316 | { reserved_block , 0 , 0 , 32, | |
20317 | 0xfc0007ff, 0xa0000555, 0 , 0, | |
20318 | CP1_ }, /* CMP.condn.D~*(21) */ | |
20319 | { reserved_block , 0 , 0 , 32, | |
20320 | 0xfc0007ff, 0xa0000595, 0 , 0, | |
20321 | CP1_ }, /* CMP.condn.D~*(22) */ | |
20322 | { reserved_block , 0 , 0 , 32, | |
20323 | 0xfc0007ff, 0xa00005d5, 0 , 0, | |
20324 | CP1_ }, /* CMP.condn.D~*(23) */ | |
20325 | { reserved_block , 0 , 0 , 32, | |
20326 | 0xfc0007ff, 0xa0000615, 0 , 0, | |
20327 | CP1_ }, /* CMP.condn.D~*(24) */ | |
20328 | { instruction , 0 , 0 , 32, | |
20329 | 0xfc0007ff, 0xa0000655, &NMD::CMP_SOR_D , 0, | |
20330 | CP1_ }, /* CMP.SOR.D */ | |
20331 | { instruction , 0 , 0 , 32, | |
20332 | 0xfc0007ff, 0xa0000695, &NMD::CMP_SUNE_D , 0, | |
20333 | CP1_ }, /* CMP.SUNE.D */ | |
20334 | { instruction , 0 , 0 , 32, | |
20335 | 0xfc0007ff, 0xa00006d5, &NMD::CMP_SNE_D , 0, | |
20336 | CP1_ }, /* CMP.SNE.D */ | |
20337 | { reserved_block , 0 , 0 , 32, | |
20338 | 0xfc0007ff, 0xa0000715, 0 , 0, | |
20339 | CP1_ }, /* CMP.condn.D~*(28) */ | |
20340 | { reserved_block , 0 , 0 , 32, | |
20341 | 0xfc0007ff, 0xa0000755, 0 , 0, | |
20342 | CP1_ }, /* CMP.condn.D~*(29) */ | |
20343 | { reserved_block , 0 , 0 , 32, | |
20344 | 0xfc0007ff, 0xa0000795, 0 , 0, | |
20345 | CP1_ }, /* CMP.condn.D~*(30) */ | |
20346 | { reserved_block , 0 , 0 , 32, | |
20347 | 0xfc0007ff, 0xa00007d5, 0 , 0, | |
20348 | CP1_ }, /* CMP.condn.D~*(31) */ | |
20349 | }; | |
20350 | ||
20351 | ||
20352 | NMD::Pool NMD::POOL32F_5[8] = { | |
20353 | { pool , CMP_condn_S , 32 , 32, | |
20354 | 0xfc00003f, 0xa0000005, 0 , 0, | |
20355 | CP1_ }, /* CMP.condn.S */ | |
20356 | { reserved_block , 0 , 0 , 32, | |
20357 | 0xfc00003f, 0xa000000d, 0 , 0, | |
20358 | CP1_ }, /* POOL32F_5~*(1) */ | |
20359 | { pool , CMP_condn_D , 32 , 32, | |
20360 | 0xfc00003f, 0xa0000015, 0 , 0, | |
20361 | CP1_ }, /* CMP.condn.D */ | |
20362 | { reserved_block , 0 , 0 , 32, | |
20363 | 0xfc00003f, 0xa000001d, 0 , 0, | |
20364 | CP1_ }, /* POOL32F_5~*(3) */ | |
20365 | { reserved_block , 0 , 0 , 32, | |
20366 | 0xfc00003f, 0xa0000025, 0 , 0, | |
20367 | CP1_ }, /* POOL32F_5~*(4) */ | |
20368 | { reserved_block , 0 , 0 , 32, | |
20369 | 0xfc00003f, 0xa000002d, 0 , 0, | |
20370 | CP1_ }, /* POOL32F_5~*(5) */ | |
20371 | { reserved_block , 0 , 0 , 32, | |
20372 | 0xfc00003f, 0xa0000035, 0 , 0, | |
20373 | CP1_ }, /* POOL32F_5~*(6) */ | |
20374 | { reserved_block , 0 , 0 , 32, | |
20375 | 0xfc00003f, 0xa000003d, 0 , 0, | |
20376 | CP1_ }, /* POOL32F_5~*(7) */ | |
20377 | }; | |
20378 | ||
20379 | ||
20380 | NMD::Pool NMD::POOL32F[8] = { | |
20381 | { pool , POOL32F_0 , 64 , 32, | |
20382 | 0xfc000007, 0xa0000000, 0 , 0, | |
20383 | CP1_ }, /* POOL32F_0 */ | |
20384 | { reserved_block , 0 , 0 , 32, | |
20385 | 0xfc000007, 0xa0000001, 0 , 0, | |
20386 | CP1_ }, /* POOL32F~*(1) */ | |
20387 | { reserved_block , 0 , 0 , 32, | |
20388 | 0xfc000007, 0xa0000002, 0 , 0, | |
20389 | CP1_ }, /* POOL32F~*(2) */ | |
20390 | { pool , POOL32F_3 , 8 , 32, | |
20391 | 0xfc000007, 0xa0000003, 0 , 0, | |
20392 | CP1_ }, /* POOL32F_3 */ | |
20393 | { reserved_block , 0 , 0 , 32, | |
20394 | 0xfc000007, 0xa0000004, 0 , 0, | |
20395 | CP1_ }, /* POOL32F~*(4) */ | |
20396 | { pool , POOL32F_5 , 8 , 32, | |
20397 | 0xfc000007, 0xa0000005, 0 , 0, | |
20398 | CP1_ }, /* POOL32F_5 */ | |
20399 | { reserved_block , 0 , 0 , 32, | |
20400 | 0xfc000007, 0xa0000006, 0 , 0, | |
20401 | CP1_ }, /* POOL32F~*(6) */ | |
20402 | { reserved_block , 0 , 0 , 32, | |
20403 | 0xfc000007, 0xa0000007, 0 , 0, | |
20404 | CP1_ }, /* POOL32F~*(7) */ | |
20405 | }; | |
20406 | ||
20407 | ||
20408 | NMD::Pool NMD::POOL32S_0[64] = { | |
20409 | { reserved_block , 0 , 0 , 32, | |
20410 | 0xfc0001ff, 0xc0000000, 0 , 0, | |
20411 | 0x0 }, /* POOL32S_0~*(0) */ | |
20412 | { instruction , 0 , 0 , 32, | |
20413 | 0xfc0001ff, 0xc0000008, &NMD::DLSA , 0, | |
20414 | MIPS64_ }, /* DLSA */ | |
20415 | { instruction , 0 , 0 , 32, | |
20416 | 0xfc0001ff, 0xc0000010, &NMD::DSLLV , 0, | |
20417 | MIPS64_ }, /* DSLLV */ | |
20418 | { instruction , 0 , 0 , 32, | |
20419 | 0xfc0001ff, 0xc0000018, &NMD::DMUL , 0, | |
20420 | MIPS64_ }, /* DMUL */ | |
20421 | { reserved_block , 0 , 0 , 32, | |
20422 | 0xfc0001ff, 0xc0000020, 0 , 0, | |
20423 | 0x0 }, /* POOL32S_0~*(4) */ | |
20424 | { reserved_block , 0 , 0 , 32, | |
20425 | 0xfc0001ff, 0xc0000028, 0 , 0, | |
20426 | 0x0 }, /* POOL32S_0~*(5) */ | |
20427 | { reserved_block , 0 , 0 , 32, | |
20428 | 0xfc0001ff, 0xc0000030, 0 , 0, | |
20429 | 0x0 }, /* POOL32S_0~*(6) */ | |
20430 | { reserved_block , 0 , 0 , 32, | |
20431 | 0xfc0001ff, 0xc0000038, 0 , 0, | |
20432 | 0x0 }, /* POOL32S_0~*(7) */ | |
20433 | { reserved_block , 0 , 0 , 32, | |
20434 | 0xfc0001ff, 0xc0000040, 0 , 0, | |
20435 | 0x0 }, /* POOL32S_0~*(8) */ | |
20436 | { reserved_block , 0 , 0 , 32, | |
20437 | 0xfc0001ff, 0xc0000048, 0 , 0, | |
20438 | 0x0 }, /* POOL32S_0~*(9) */ | |
20439 | { instruction , 0 , 0 , 32, | |
20440 | 0xfc0001ff, 0xc0000050, &NMD::DSRLV , 0, | |
20441 | MIPS64_ }, /* DSRLV */ | |
20442 | { instruction , 0 , 0 , 32, | |
20443 | 0xfc0001ff, 0xc0000058, &NMD::DMUH , 0, | |
20444 | MIPS64_ }, /* DMUH */ | |
20445 | { reserved_block , 0 , 0 , 32, | |
20446 | 0xfc0001ff, 0xc0000060, 0 , 0, | |
20447 | 0x0 }, /* POOL32S_0~*(12) */ | |
20448 | { reserved_block , 0 , 0 , 32, | |
20449 | 0xfc0001ff, 0xc0000068, 0 , 0, | |
20450 | 0x0 }, /* POOL32S_0~*(13) */ | |
20451 | { reserved_block , 0 , 0 , 32, | |
20452 | 0xfc0001ff, 0xc0000070, 0 , 0, | |
20453 | 0x0 }, /* POOL32S_0~*(14) */ | |
20454 | { reserved_block , 0 , 0 , 32, | |
20455 | 0xfc0001ff, 0xc0000078, 0 , 0, | |
20456 | 0x0 }, /* POOL32S_0~*(15) */ | |
20457 | { reserved_block , 0 , 0 , 32, | |
20458 | 0xfc0001ff, 0xc0000080, 0 , 0, | |
20459 | 0x0 }, /* POOL32S_0~*(16) */ | |
20460 | { reserved_block , 0 , 0 , 32, | |
20461 | 0xfc0001ff, 0xc0000088, 0 , 0, | |
20462 | 0x0 }, /* POOL32S_0~*(17) */ | |
20463 | { instruction , 0 , 0 , 32, | |
20464 | 0xfc0001ff, 0xc0000090, &NMD::DSRAV , 0, | |
20465 | MIPS64_ }, /* DSRAV */ | |
20466 | { instruction , 0 , 0 , 32, | |
20467 | 0xfc0001ff, 0xc0000098, &NMD::DMULU , 0, | |
20468 | MIPS64_ }, /* DMULU */ | |
20469 | { reserved_block , 0 , 0 , 32, | |
20470 | 0xfc0001ff, 0xc00000a0, 0 , 0, | |
20471 | 0x0 }, /* POOL32S_0~*(20) */ | |
20472 | { reserved_block , 0 , 0 , 32, | |
20473 | 0xfc0001ff, 0xc00000a8, 0 , 0, | |
20474 | 0x0 }, /* POOL32S_0~*(21) */ | |
20475 | { reserved_block , 0 , 0 , 32, | |
20476 | 0xfc0001ff, 0xc00000b0, 0 , 0, | |
20477 | 0x0 }, /* POOL32S_0~*(22) */ | |
20478 | { reserved_block , 0 , 0 , 32, | |
20479 | 0xfc0001ff, 0xc00000b8, 0 , 0, | |
20480 | 0x0 }, /* POOL32S_0~*(23) */ | |
20481 | { reserved_block , 0 , 0 , 32, | |
20482 | 0xfc0001ff, 0xc00000c0, 0 , 0, | |
20483 | 0x0 }, /* POOL32S_0~*(24) */ | |
20484 | { reserved_block , 0 , 0 , 32, | |
20485 | 0xfc0001ff, 0xc00000c8, 0 , 0, | |
20486 | 0x0 }, /* POOL32S_0~*(25) */ | |
20487 | { instruction , 0 , 0 , 32, | |
20488 | 0xfc0001ff, 0xc00000d0, &NMD::DROTRV , 0, | |
20489 | MIPS64_ }, /* DROTRV */ | |
20490 | { instruction , 0 , 0 , 32, | |
20491 | 0xfc0001ff, 0xc00000d8, &NMD::DMUHU , 0, | |
20492 | MIPS64_ }, /* DMUHU */ | |
20493 | { reserved_block , 0 , 0 , 32, | |
20494 | 0xfc0001ff, 0xc00000e0, 0 , 0, | |
20495 | 0x0 }, /* POOL32S_0~*(28) */ | |
20496 | { reserved_block , 0 , 0 , 32, | |
20497 | 0xfc0001ff, 0xc00000e8, 0 , 0, | |
20498 | 0x0 }, /* POOL32S_0~*(29) */ | |
20499 | { reserved_block , 0 , 0 , 32, | |
20500 | 0xfc0001ff, 0xc00000f0, 0 , 0, | |
20501 | 0x0 }, /* POOL32S_0~*(30) */ | |
20502 | { reserved_block , 0 , 0 , 32, | |
20503 | 0xfc0001ff, 0xc00000f8, 0 , 0, | |
20504 | 0x0 }, /* POOL32S_0~*(31) */ | |
20505 | { reserved_block , 0 , 0 , 32, | |
20506 | 0xfc0001ff, 0xc0000100, 0 , 0, | |
20507 | 0x0 }, /* POOL32S_0~*(32) */ | |
20508 | { reserved_block , 0 , 0 , 32, | |
20509 | 0xfc0001ff, 0xc0000108, 0 , 0, | |
20510 | 0x0 }, /* POOL32S_0~*(33) */ | |
20511 | { instruction , 0 , 0 , 32, | |
20512 | 0xfc0001ff, 0xc0000110, &NMD::DADD , 0, | |
20513 | MIPS64_ }, /* DADD */ | |
20514 | { instruction , 0 , 0 , 32, | |
20515 | 0xfc0001ff, 0xc0000118, &NMD::DDIV , 0, | |
20516 | MIPS64_ }, /* DDIV */ | |
20517 | { reserved_block , 0 , 0 , 32, | |
20518 | 0xfc0001ff, 0xc0000120, 0 , 0, | |
20519 | 0x0 }, /* POOL32S_0~*(36) */ | |
20520 | { reserved_block , 0 , 0 , 32, | |
20521 | 0xfc0001ff, 0xc0000128, 0 , 0, | |
20522 | 0x0 }, /* POOL32S_0~*(37) */ | |
20523 | { reserved_block , 0 , 0 , 32, | |
20524 | 0xfc0001ff, 0xc0000130, 0 , 0, | |
20525 | 0x0 }, /* POOL32S_0~*(38) */ | |
20526 | { reserved_block , 0 , 0 , 32, | |
20527 | 0xfc0001ff, 0xc0000138, 0 , 0, | |
20528 | 0x0 }, /* POOL32S_0~*(39) */ | |
20529 | { reserved_block , 0 , 0 , 32, | |
20530 | 0xfc0001ff, 0xc0000140, 0 , 0, | |
20531 | 0x0 }, /* POOL32S_0~*(40) */ | |
20532 | { reserved_block , 0 , 0 , 32, | |
20533 | 0xfc0001ff, 0xc0000148, 0 , 0, | |
20534 | 0x0 }, /* POOL32S_0~*(41) */ | |
20535 | { instruction , 0 , 0 , 32, | |
20536 | 0xfc0001ff, 0xc0000150, &NMD::DADDU , 0, | |
20537 | MIPS64_ }, /* DADDU */ | |
20538 | { instruction , 0 , 0 , 32, | |
20539 | 0xfc0001ff, 0xc0000158, &NMD::DMOD , 0, | |
20540 | MIPS64_ }, /* DMOD */ | |
20541 | { reserved_block , 0 , 0 , 32, | |
20542 | 0xfc0001ff, 0xc0000160, 0 , 0, | |
20543 | 0x0 }, /* POOL32S_0~*(44) */ | |
20544 | { reserved_block , 0 , 0 , 32, | |
20545 | 0xfc0001ff, 0xc0000168, 0 , 0, | |
20546 | 0x0 }, /* POOL32S_0~*(45) */ | |
20547 | { reserved_block , 0 , 0 , 32, | |
20548 | 0xfc0001ff, 0xc0000170, 0 , 0, | |
20549 | 0x0 }, /* POOL32S_0~*(46) */ | |
20550 | { reserved_block , 0 , 0 , 32, | |
20551 | 0xfc0001ff, 0xc0000178, 0 , 0, | |
20552 | 0x0 }, /* POOL32S_0~*(47) */ | |
20553 | { reserved_block , 0 , 0 , 32, | |
20554 | 0xfc0001ff, 0xc0000180, 0 , 0, | |
20555 | 0x0 }, /* POOL32S_0~*(48) */ | |
20556 | { reserved_block , 0 , 0 , 32, | |
20557 | 0xfc0001ff, 0xc0000188, 0 , 0, | |
20558 | 0x0 }, /* POOL32S_0~*(49) */ | |
20559 | { instruction , 0 , 0 , 32, | |
20560 | 0xfc0001ff, 0xc0000190, &NMD::DSUB , 0, | |
20561 | MIPS64_ }, /* DSUB */ | |
20562 | { instruction , 0 , 0 , 32, | |
20563 | 0xfc0001ff, 0xc0000198, &NMD::DDIVU , 0, | |
20564 | MIPS64_ }, /* DDIVU */ | |
20565 | { reserved_block , 0 , 0 , 32, | |
20566 | 0xfc0001ff, 0xc00001a0, 0 , 0, | |
20567 | 0x0 }, /* POOL32S_0~*(52) */ | |
20568 | { reserved_block , 0 , 0 , 32, | |
20569 | 0xfc0001ff, 0xc00001a8, 0 , 0, | |
20570 | 0x0 }, /* POOL32S_0~*(53) */ | |
20571 | { reserved_block , 0 , 0 , 32, | |
20572 | 0xfc0001ff, 0xc00001b0, 0 , 0, | |
20573 | 0x0 }, /* POOL32S_0~*(54) */ | |
20574 | { reserved_block , 0 , 0 , 32, | |
20575 | 0xfc0001ff, 0xc00001b8, 0 , 0, | |
20576 | 0x0 }, /* POOL32S_0~*(55) */ | |
20577 | { reserved_block , 0 , 0 , 32, | |
20578 | 0xfc0001ff, 0xc00001c0, 0 , 0, | |
20579 | 0x0 }, /* POOL32S_0~*(56) */ | |
20580 | { reserved_block , 0 , 0 , 32, | |
20581 | 0xfc0001ff, 0xc00001c8, 0 , 0, | |
20582 | 0x0 }, /* POOL32S_0~*(57) */ | |
20583 | { instruction , 0 , 0 , 32, | |
20584 | 0xfc0001ff, 0xc00001d0, &NMD::DSUBU , 0, | |
20585 | MIPS64_ }, /* DSUBU */ | |
20586 | { instruction , 0 , 0 , 32, | |
20587 | 0xfc0001ff, 0xc00001d8, &NMD::DMODU , 0, | |
20588 | MIPS64_ }, /* DMODU */ | |
20589 | { reserved_block , 0 , 0 , 32, | |
20590 | 0xfc0001ff, 0xc00001e0, 0 , 0, | |
20591 | 0x0 }, /* POOL32S_0~*(60) */ | |
20592 | { reserved_block , 0 , 0 , 32, | |
20593 | 0xfc0001ff, 0xc00001e8, 0 , 0, | |
20594 | 0x0 }, /* POOL32S_0~*(61) */ | |
20595 | { reserved_block , 0 , 0 , 32, | |
20596 | 0xfc0001ff, 0xc00001f0, 0 , 0, | |
20597 | 0x0 }, /* POOL32S_0~*(62) */ | |
20598 | { reserved_block , 0 , 0 , 32, | |
20599 | 0xfc0001ff, 0xc00001f8, 0 , 0, | |
20600 | 0x0 }, /* POOL32S_0~*(63) */ | |
20601 | }; | |
20602 | ||
20603 | ||
20604 | NMD::Pool NMD::POOL32Sxf_4[128] = { | |
20605 | { reserved_block , 0 , 0 , 32, | |
20606 | 0xfc00ffff, 0xc000013c, 0 , 0, | |
20607 | 0x0 }, /* POOL32Sxf_4~*(0) */ | |
20608 | { reserved_block , 0 , 0 , 32, | |
20609 | 0xfc00ffff, 0xc000033c, 0 , 0, | |
20610 | 0x0 }, /* POOL32Sxf_4~*(1) */ | |
20611 | { reserved_block , 0 , 0 , 32, | |
20612 | 0xfc00ffff, 0xc000053c, 0 , 0, | |
20613 | 0x0 }, /* POOL32Sxf_4~*(2) */ | |
20614 | { reserved_block , 0 , 0 , 32, | |
20615 | 0xfc00ffff, 0xc000073c, 0 , 0, | |
20616 | 0x0 }, /* POOL32Sxf_4~*(3) */ | |
20617 | { reserved_block , 0 , 0 , 32, | |
20618 | 0xfc00ffff, 0xc000093c, 0 , 0, | |
20619 | 0x0 }, /* POOL32Sxf_4~*(4) */ | |
20620 | { reserved_block , 0 , 0 , 32, | |
20621 | 0xfc00ffff, 0xc0000b3c, 0 , 0, | |
20622 | 0x0 }, /* POOL32Sxf_4~*(5) */ | |
20623 | { reserved_block , 0 , 0 , 32, | |
20624 | 0xfc00ffff, 0xc0000d3c, 0 , 0, | |
20625 | 0x0 }, /* POOL32Sxf_4~*(6) */ | |
20626 | { reserved_block , 0 , 0 , 32, | |
20627 | 0xfc00ffff, 0xc0000f3c, 0 , 0, | |
20628 | 0x0 }, /* POOL32Sxf_4~*(7) */ | |
20629 | { reserved_block , 0 , 0 , 32, | |
20630 | 0xfc00ffff, 0xc000113c, 0 , 0, | |
20631 | 0x0 }, /* POOL32Sxf_4~*(8) */ | |
20632 | { reserved_block , 0 , 0 , 32, | |
20633 | 0xfc00ffff, 0xc000133c, 0 , 0, | |
20634 | 0x0 }, /* POOL32Sxf_4~*(9) */ | |
20635 | { reserved_block , 0 , 0 , 32, | |
20636 | 0xfc00ffff, 0xc000153c, 0 , 0, | |
20637 | 0x0 }, /* POOL32Sxf_4~*(10) */ | |
20638 | { reserved_block , 0 , 0 , 32, | |
20639 | 0xfc00ffff, 0xc000173c, 0 , 0, | |
20640 | 0x0 }, /* POOL32Sxf_4~*(11) */ | |
20641 | { reserved_block , 0 , 0 , 32, | |
20642 | 0xfc00ffff, 0xc000193c, 0 , 0, | |
20643 | 0x0 }, /* POOL32Sxf_4~*(12) */ | |
20644 | { reserved_block , 0 , 0 , 32, | |
20645 | 0xfc00ffff, 0xc0001b3c, 0 , 0, | |
20646 | 0x0 }, /* POOL32Sxf_4~*(13) */ | |
20647 | { reserved_block , 0 , 0 , 32, | |
20648 | 0xfc00ffff, 0xc0001d3c, 0 , 0, | |
20649 | 0x0 }, /* POOL32Sxf_4~*(14) */ | |
20650 | { reserved_block , 0 , 0 , 32, | |
20651 | 0xfc00ffff, 0xc0001f3c, 0 , 0, | |
20652 | 0x0 }, /* POOL32Sxf_4~*(15) */ | |
20653 | { reserved_block , 0 , 0 , 32, | |
20654 | 0xfc00ffff, 0xc000213c, 0 , 0, | |
20655 | 0x0 }, /* POOL32Sxf_4~*(16) */ | |
20656 | { reserved_block , 0 , 0 , 32, | |
20657 | 0xfc00ffff, 0xc000233c, 0 , 0, | |
20658 | 0x0 }, /* POOL32Sxf_4~*(17) */ | |
20659 | { reserved_block , 0 , 0 , 32, | |
20660 | 0xfc00ffff, 0xc000253c, 0 , 0, | |
20661 | 0x0 }, /* POOL32Sxf_4~*(18) */ | |
20662 | { reserved_block , 0 , 0 , 32, | |
20663 | 0xfc00ffff, 0xc000273c, 0 , 0, | |
20664 | 0x0 }, /* POOL32Sxf_4~*(19) */ | |
20665 | { reserved_block , 0 , 0 , 32, | |
20666 | 0xfc00ffff, 0xc000293c, 0 , 0, | |
20667 | 0x0 }, /* POOL32Sxf_4~*(20) */ | |
20668 | { reserved_block , 0 , 0 , 32, | |
20669 | 0xfc00ffff, 0xc0002b3c, 0 , 0, | |
20670 | 0x0 }, /* POOL32Sxf_4~*(21) */ | |
20671 | { reserved_block , 0 , 0 , 32, | |
20672 | 0xfc00ffff, 0xc0002d3c, 0 , 0, | |
20673 | 0x0 }, /* POOL32Sxf_4~*(22) */ | |
20674 | { reserved_block , 0 , 0 , 32, | |
20675 | 0xfc00ffff, 0xc0002f3c, 0 , 0, | |
20676 | 0x0 }, /* POOL32Sxf_4~*(23) */ | |
20677 | { reserved_block , 0 , 0 , 32, | |
20678 | 0xfc00ffff, 0xc000313c, 0 , 0, | |
20679 | 0x0 }, /* POOL32Sxf_4~*(24) */ | |
20680 | { reserved_block , 0 , 0 , 32, | |
20681 | 0xfc00ffff, 0xc000333c, 0 , 0, | |
20682 | 0x0 }, /* POOL32Sxf_4~*(25) */ | |
20683 | { reserved_block , 0 , 0 , 32, | |
20684 | 0xfc00ffff, 0xc000353c, 0 , 0, | |
20685 | 0x0 }, /* POOL32Sxf_4~*(26) */ | |
20686 | { reserved_block , 0 , 0 , 32, | |
20687 | 0xfc00ffff, 0xc000373c, 0 , 0, | |
20688 | 0x0 }, /* POOL32Sxf_4~*(27) */ | |
20689 | { reserved_block , 0 , 0 , 32, | |
20690 | 0xfc00ffff, 0xc000393c, 0 , 0, | |
20691 | 0x0 }, /* POOL32Sxf_4~*(28) */ | |
20692 | { reserved_block , 0 , 0 , 32, | |
20693 | 0xfc00ffff, 0xc0003b3c, 0 , 0, | |
20694 | 0x0 }, /* POOL32Sxf_4~*(29) */ | |
20695 | { reserved_block , 0 , 0 , 32, | |
20696 | 0xfc00ffff, 0xc0003d3c, 0 , 0, | |
20697 | 0x0 }, /* POOL32Sxf_4~*(30) */ | |
20698 | { reserved_block , 0 , 0 , 32, | |
20699 | 0xfc00ffff, 0xc0003f3c, 0 , 0, | |
20700 | 0x0 }, /* POOL32Sxf_4~*(31) */ | |
20701 | { reserved_block , 0 , 0 , 32, | |
20702 | 0xfc00ffff, 0xc000413c, 0 , 0, | |
20703 | 0x0 }, /* POOL32Sxf_4~*(32) */ | |
20704 | { reserved_block , 0 , 0 , 32, | |
20705 | 0xfc00ffff, 0xc000433c, 0 , 0, | |
20706 | 0x0 }, /* POOL32Sxf_4~*(33) */ | |
20707 | { reserved_block , 0 , 0 , 32, | |
20708 | 0xfc00ffff, 0xc000453c, 0 , 0, | |
20709 | 0x0 }, /* POOL32Sxf_4~*(34) */ | |
20710 | { reserved_block , 0 , 0 , 32, | |
20711 | 0xfc00ffff, 0xc000473c, 0 , 0, | |
20712 | 0x0 }, /* POOL32Sxf_4~*(35) */ | |
20713 | { reserved_block , 0 , 0 , 32, | |
20714 | 0xfc00ffff, 0xc000493c, 0 , 0, | |
20715 | 0x0 }, /* POOL32Sxf_4~*(36) */ | |
20716 | { instruction , 0 , 0 , 32, | |
20717 | 0xfc00ffff, 0xc0004b3c, &NMD::DCLO , 0, | |
20718 | MIPS64_ }, /* DCLO */ | |
20719 | { reserved_block , 0 , 0 , 32, | |
20720 | 0xfc00ffff, 0xc0004d3c, 0 , 0, | |
20721 | 0x0 }, /* POOL32Sxf_4~*(38) */ | |
20722 | { reserved_block , 0 , 0 , 32, | |
20723 | 0xfc00ffff, 0xc0004f3c, 0 , 0, | |
20724 | 0x0 }, /* POOL32Sxf_4~*(39) */ | |
20725 | { reserved_block , 0 , 0 , 32, | |
20726 | 0xfc00ffff, 0xc000513c, 0 , 0, | |
20727 | 0x0 }, /* POOL32Sxf_4~*(40) */ | |
20728 | { reserved_block , 0 , 0 , 32, | |
20729 | 0xfc00ffff, 0xc000533c, 0 , 0, | |
20730 | 0x0 }, /* POOL32Sxf_4~*(41) */ | |
20731 | { reserved_block , 0 , 0 , 32, | |
20732 | 0xfc00ffff, 0xc000553c, 0 , 0, | |
20733 | 0x0 }, /* POOL32Sxf_4~*(42) */ | |
20734 | { reserved_block , 0 , 0 , 32, | |
20735 | 0xfc00ffff, 0xc000573c, 0 , 0, | |
20736 | 0x0 }, /* POOL32Sxf_4~*(43) */ | |
20737 | { reserved_block , 0 , 0 , 32, | |
20738 | 0xfc00ffff, 0xc000593c, 0 , 0, | |
20739 | 0x0 }, /* POOL32Sxf_4~*(44) */ | |
20740 | { instruction , 0 , 0 , 32, | |
20741 | 0xfc00ffff, 0xc0005b3c, &NMD::DCLZ , 0, | |
20742 | MIPS64_ }, /* DCLZ */ | |
20743 | { reserved_block , 0 , 0 , 32, | |
20744 | 0xfc00ffff, 0xc0005d3c, 0 , 0, | |
20745 | 0x0 }, /* POOL32Sxf_4~*(46) */ | |
20746 | { reserved_block , 0 , 0 , 32, | |
20747 | 0xfc00ffff, 0xc0005f3c, 0 , 0, | |
20748 | 0x0 }, /* POOL32Sxf_4~*(47) */ | |
20749 | { reserved_block , 0 , 0 , 32, | |
20750 | 0xfc00ffff, 0xc000613c, 0 , 0, | |
20751 | 0x0 }, /* POOL32Sxf_4~*(48) */ | |
20752 | { reserved_block , 0 , 0 , 32, | |
20753 | 0xfc00ffff, 0xc000633c, 0 , 0, | |
20754 | 0x0 }, /* POOL32Sxf_4~*(49) */ | |
20755 | { reserved_block , 0 , 0 , 32, | |
20756 | 0xfc00ffff, 0xc000653c, 0 , 0, | |
20757 | 0x0 }, /* POOL32Sxf_4~*(50) */ | |
20758 | { reserved_block , 0 , 0 , 32, | |
20759 | 0xfc00ffff, 0xc000673c, 0 , 0, | |
20760 | 0x0 }, /* POOL32Sxf_4~*(51) */ | |
20761 | { reserved_block , 0 , 0 , 32, | |
20762 | 0xfc00ffff, 0xc000693c, 0 , 0, | |
20763 | 0x0 }, /* POOL32Sxf_4~*(52) */ | |
20764 | { reserved_block , 0 , 0 , 32, | |
20765 | 0xfc00ffff, 0xc0006b3c, 0 , 0, | |
20766 | 0x0 }, /* POOL32Sxf_4~*(53) */ | |
20767 | { reserved_block , 0 , 0 , 32, | |
20768 | 0xfc00ffff, 0xc0006d3c, 0 , 0, | |
20769 | 0x0 }, /* POOL32Sxf_4~*(54) */ | |
20770 | { reserved_block , 0 , 0 , 32, | |
20771 | 0xfc00ffff, 0xc0006f3c, 0 , 0, | |
20772 | 0x0 }, /* POOL32Sxf_4~*(55) */ | |
20773 | { reserved_block , 0 , 0 , 32, | |
20774 | 0xfc00ffff, 0xc000713c, 0 , 0, | |
20775 | 0x0 }, /* POOL32Sxf_4~*(56) */ | |
20776 | { reserved_block , 0 , 0 , 32, | |
20777 | 0xfc00ffff, 0xc000733c, 0 , 0, | |
20778 | 0x0 }, /* POOL32Sxf_4~*(57) */ | |
20779 | { reserved_block , 0 , 0 , 32, | |
20780 | 0xfc00ffff, 0xc000753c, 0 , 0, | |
20781 | 0x0 }, /* POOL32Sxf_4~*(58) */ | |
20782 | { reserved_block , 0 , 0 , 32, | |
20783 | 0xfc00ffff, 0xc000773c, 0 , 0, | |
20784 | 0x0 }, /* POOL32Sxf_4~*(59) */ | |
20785 | { reserved_block , 0 , 0 , 32, | |
20786 | 0xfc00ffff, 0xc000793c, 0 , 0, | |
20787 | 0x0 }, /* POOL32Sxf_4~*(60) */ | |
20788 | { reserved_block , 0 , 0 , 32, | |
20789 | 0xfc00ffff, 0xc0007b3c, 0 , 0, | |
20790 | 0x0 }, /* POOL32Sxf_4~*(61) */ | |
20791 | { reserved_block , 0 , 0 , 32, | |
20792 | 0xfc00ffff, 0xc0007d3c, 0 , 0, | |
20793 | 0x0 }, /* POOL32Sxf_4~*(62) */ | |
20794 | { reserved_block , 0 , 0 , 32, | |
20795 | 0xfc00ffff, 0xc0007f3c, 0 , 0, | |
20796 | 0x0 }, /* POOL32Sxf_4~*(63) */ | |
20797 | { reserved_block , 0 , 0 , 32, | |
20798 | 0xfc00ffff, 0xc000813c, 0 , 0, | |
20799 | 0x0 }, /* POOL32Sxf_4~*(64) */ | |
20800 | { reserved_block , 0 , 0 , 32, | |
20801 | 0xfc00ffff, 0xc000833c, 0 , 0, | |
20802 | 0x0 }, /* POOL32Sxf_4~*(65) */ | |
20803 | { reserved_block , 0 , 0 , 32, | |
20804 | 0xfc00ffff, 0xc000853c, 0 , 0, | |
20805 | 0x0 }, /* POOL32Sxf_4~*(66) */ | |
20806 | { reserved_block , 0 , 0 , 32, | |
20807 | 0xfc00ffff, 0xc000873c, 0 , 0, | |
20808 | 0x0 }, /* POOL32Sxf_4~*(67) */ | |
20809 | { reserved_block , 0 , 0 , 32, | |
20810 | 0xfc00ffff, 0xc000893c, 0 , 0, | |
20811 | 0x0 }, /* POOL32Sxf_4~*(68) */ | |
20812 | { reserved_block , 0 , 0 , 32, | |
20813 | 0xfc00ffff, 0xc0008b3c, 0 , 0, | |
20814 | 0x0 }, /* POOL32Sxf_4~*(69) */ | |
20815 | { reserved_block , 0 , 0 , 32, | |
20816 | 0xfc00ffff, 0xc0008d3c, 0 , 0, | |
20817 | 0x0 }, /* POOL32Sxf_4~*(70) */ | |
20818 | { reserved_block , 0 , 0 , 32, | |
20819 | 0xfc00ffff, 0xc0008f3c, 0 , 0, | |
20820 | 0x0 }, /* POOL32Sxf_4~*(71) */ | |
20821 | { reserved_block , 0 , 0 , 32, | |
20822 | 0xfc00ffff, 0xc000913c, 0 , 0, | |
20823 | 0x0 }, /* POOL32Sxf_4~*(72) */ | |
20824 | { reserved_block , 0 , 0 , 32, | |
20825 | 0xfc00ffff, 0xc000933c, 0 , 0, | |
20826 | 0x0 }, /* POOL32Sxf_4~*(73) */ | |
20827 | { reserved_block , 0 , 0 , 32, | |
20828 | 0xfc00ffff, 0xc000953c, 0 , 0, | |
20829 | 0x0 }, /* POOL32Sxf_4~*(74) */ | |
20830 | { reserved_block , 0 , 0 , 32, | |
20831 | 0xfc00ffff, 0xc000973c, 0 , 0, | |
20832 | 0x0 }, /* POOL32Sxf_4~*(75) */ | |
20833 | { reserved_block , 0 , 0 , 32, | |
20834 | 0xfc00ffff, 0xc000993c, 0 , 0, | |
20835 | 0x0 }, /* POOL32Sxf_4~*(76) */ | |
20836 | { reserved_block , 0 , 0 , 32, | |
20837 | 0xfc00ffff, 0xc0009b3c, 0 , 0, | |
20838 | 0x0 }, /* POOL32Sxf_4~*(77) */ | |
20839 | { reserved_block , 0 , 0 , 32, | |
20840 | 0xfc00ffff, 0xc0009d3c, 0 , 0, | |
20841 | 0x0 }, /* POOL32Sxf_4~*(78) */ | |
20842 | { reserved_block , 0 , 0 , 32, | |
20843 | 0xfc00ffff, 0xc0009f3c, 0 , 0, | |
20844 | 0x0 }, /* POOL32Sxf_4~*(79) */ | |
20845 | { reserved_block , 0 , 0 , 32, | |
20846 | 0xfc00ffff, 0xc000a13c, 0 , 0, | |
20847 | 0x0 }, /* POOL32Sxf_4~*(80) */ | |
20848 | { reserved_block , 0 , 0 , 32, | |
20849 | 0xfc00ffff, 0xc000a33c, 0 , 0, | |
20850 | 0x0 }, /* POOL32Sxf_4~*(81) */ | |
20851 | { reserved_block , 0 , 0 , 32, | |
20852 | 0xfc00ffff, 0xc000a53c, 0 , 0, | |
20853 | 0x0 }, /* POOL32Sxf_4~*(82) */ | |
20854 | { reserved_block , 0 , 0 , 32, | |
20855 | 0xfc00ffff, 0xc000a73c, 0 , 0, | |
20856 | 0x0 }, /* POOL32Sxf_4~*(83) */ | |
20857 | { reserved_block , 0 , 0 , 32, | |
20858 | 0xfc00ffff, 0xc000a93c, 0 , 0, | |
20859 | 0x0 }, /* POOL32Sxf_4~*(84) */ | |
20860 | { reserved_block , 0 , 0 , 32, | |
20861 | 0xfc00ffff, 0xc000ab3c, 0 , 0, | |
20862 | 0x0 }, /* POOL32Sxf_4~*(85) */ | |
20863 | { reserved_block , 0 , 0 , 32, | |
20864 | 0xfc00ffff, 0xc000ad3c, 0 , 0, | |
20865 | 0x0 }, /* POOL32Sxf_4~*(86) */ | |
20866 | { reserved_block , 0 , 0 , 32, | |
20867 | 0xfc00ffff, 0xc000af3c, 0 , 0, | |
20868 | 0x0 }, /* POOL32Sxf_4~*(87) */ | |
20869 | { reserved_block , 0 , 0 , 32, | |
20870 | 0xfc00ffff, 0xc000b13c, 0 , 0, | |
20871 | 0x0 }, /* POOL32Sxf_4~*(88) */ | |
20872 | { reserved_block , 0 , 0 , 32, | |
20873 | 0xfc00ffff, 0xc000b33c, 0 , 0, | |
20874 | 0x0 }, /* POOL32Sxf_4~*(89) */ | |
20875 | { reserved_block , 0 , 0 , 32, | |
20876 | 0xfc00ffff, 0xc000b53c, 0 , 0, | |
20877 | 0x0 }, /* POOL32Sxf_4~*(90) */ | |
20878 | { reserved_block , 0 , 0 , 32, | |
20879 | 0xfc00ffff, 0xc000b73c, 0 , 0, | |
20880 | 0x0 }, /* POOL32Sxf_4~*(91) */ | |
20881 | { reserved_block , 0 , 0 , 32, | |
20882 | 0xfc00ffff, 0xc000b93c, 0 , 0, | |
20883 | 0x0 }, /* POOL32Sxf_4~*(92) */ | |
20884 | { reserved_block , 0 , 0 , 32, | |
20885 | 0xfc00ffff, 0xc000bb3c, 0 , 0, | |
20886 | 0x0 }, /* POOL32Sxf_4~*(93) */ | |
20887 | { reserved_block , 0 , 0 , 32, | |
20888 | 0xfc00ffff, 0xc000bd3c, 0 , 0, | |
20889 | 0x0 }, /* POOL32Sxf_4~*(94) */ | |
20890 | { reserved_block , 0 , 0 , 32, | |
20891 | 0xfc00ffff, 0xc000bf3c, 0 , 0, | |
20892 | 0x0 }, /* POOL32Sxf_4~*(95) */ | |
20893 | { reserved_block , 0 , 0 , 32, | |
20894 | 0xfc00ffff, 0xc000c13c, 0 , 0, | |
20895 | 0x0 }, /* POOL32Sxf_4~*(96) */ | |
20896 | { reserved_block , 0 , 0 , 32, | |
20897 | 0xfc00ffff, 0xc000c33c, 0 , 0, | |
20898 | 0x0 }, /* POOL32Sxf_4~*(97) */ | |
20899 | { reserved_block , 0 , 0 , 32, | |
20900 | 0xfc00ffff, 0xc000c53c, 0 , 0, | |
20901 | 0x0 }, /* POOL32Sxf_4~*(98) */ | |
20902 | { reserved_block , 0 , 0 , 32, | |
20903 | 0xfc00ffff, 0xc000c73c, 0 , 0, | |
20904 | 0x0 }, /* POOL32Sxf_4~*(99) */ | |
20905 | { reserved_block , 0 , 0 , 32, | |
20906 | 0xfc00ffff, 0xc000c93c, 0 , 0, | |
20907 | 0x0 }, /* POOL32Sxf_4~*(100) */ | |
20908 | { reserved_block , 0 , 0 , 32, | |
20909 | 0xfc00ffff, 0xc000cb3c, 0 , 0, | |
20910 | 0x0 }, /* POOL32Sxf_4~*(101) */ | |
20911 | { reserved_block , 0 , 0 , 32, | |
20912 | 0xfc00ffff, 0xc000cd3c, 0 , 0, | |
20913 | 0x0 }, /* POOL32Sxf_4~*(102) */ | |
20914 | { reserved_block , 0 , 0 , 32, | |
20915 | 0xfc00ffff, 0xc000cf3c, 0 , 0, | |
20916 | 0x0 }, /* POOL32Sxf_4~*(103) */ | |
20917 | { reserved_block , 0 , 0 , 32, | |
20918 | 0xfc00ffff, 0xc000d13c, 0 , 0, | |
20919 | 0x0 }, /* POOL32Sxf_4~*(104) */ | |
20920 | { reserved_block , 0 , 0 , 32, | |
20921 | 0xfc00ffff, 0xc000d33c, 0 , 0, | |
20922 | 0x0 }, /* POOL32Sxf_4~*(105) */ | |
20923 | { reserved_block , 0 , 0 , 32, | |
20924 | 0xfc00ffff, 0xc000d53c, 0 , 0, | |
20925 | 0x0 }, /* POOL32Sxf_4~*(106) */ | |
20926 | { reserved_block , 0 , 0 , 32, | |
20927 | 0xfc00ffff, 0xc000d73c, 0 , 0, | |
20928 | 0x0 }, /* POOL32Sxf_4~*(107) */ | |
20929 | { reserved_block , 0 , 0 , 32, | |
20930 | 0xfc00ffff, 0xc000d93c, 0 , 0, | |
20931 | 0x0 }, /* POOL32Sxf_4~*(108) */ | |
20932 | { reserved_block , 0 , 0 , 32, | |
20933 | 0xfc00ffff, 0xc000db3c, 0 , 0, | |
20934 | 0x0 }, /* POOL32Sxf_4~*(109) */ | |
20935 | { reserved_block , 0 , 0 , 32, | |
20936 | 0xfc00ffff, 0xc000dd3c, 0 , 0, | |
20937 | 0x0 }, /* POOL32Sxf_4~*(110) */ | |
20938 | { reserved_block , 0 , 0 , 32, | |
20939 | 0xfc00ffff, 0xc000df3c, 0 , 0, | |
20940 | 0x0 }, /* POOL32Sxf_4~*(111) */ | |
20941 | { reserved_block , 0 , 0 , 32, | |
20942 | 0xfc00ffff, 0xc000e13c, 0 , 0, | |
20943 | 0x0 }, /* POOL32Sxf_4~*(112) */ | |
20944 | { reserved_block , 0 , 0 , 32, | |
20945 | 0xfc00ffff, 0xc000e33c, 0 , 0, | |
20946 | 0x0 }, /* POOL32Sxf_4~*(113) */ | |
20947 | { reserved_block , 0 , 0 , 32, | |
20948 | 0xfc00ffff, 0xc000e53c, 0 , 0, | |
20949 | 0x0 }, /* POOL32Sxf_4~*(114) */ | |
20950 | { reserved_block , 0 , 0 , 32, | |
20951 | 0xfc00ffff, 0xc000e73c, 0 , 0, | |
20952 | 0x0 }, /* POOL32Sxf_4~*(115) */ | |
20953 | { reserved_block , 0 , 0 , 32, | |
20954 | 0xfc00ffff, 0xc000e93c, 0 , 0, | |
20955 | 0x0 }, /* POOL32Sxf_4~*(116) */ | |
20956 | { reserved_block , 0 , 0 , 32, | |
20957 | 0xfc00ffff, 0xc000eb3c, 0 , 0, | |
20958 | 0x0 }, /* POOL32Sxf_4~*(117) */ | |
20959 | { reserved_block , 0 , 0 , 32, | |
20960 | 0xfc00ffff, 0xc000ed3c, 0 , 0, | |
20961 | 0x0 }, /* POOL32Sxf_4~*(118) */ | |
20962 | { reserved_block , 0 , 0 , 32, | |
20963 | 0xfc00ffff, 0xc000ef3c, 0 , 0, | |
20964 | 0x0 }, /* POOL32Sxf_4~*(119) */ | |
20965 | { reserved_block , 0 , 0 , 32, | |
20966 | 0xfc00ffff, 0xc000f13c, 0 , 0, | |
20967 | 0x0 }, /* POOL32Sxf_4~*(120) */ | |
20968 | { reserved_block , 0 , 0 , 32, | |
20969 | 0xfc00ffff, 0xc000f33c, 0 , 0, | |
20970 | 0x0 }, /* POOL32Sxf_4~*(121) */ | |
20971 | { reserved_block , 0 , 0 , 32, | |
20972 | 0xfc00ffff, 0xc000f53c, 0 , 0, | |
20973 | 0x0 }, /* POOL32Sxf_4~*(122) */ | |
20974 | { reserved_block , 0 , 0 , 32, | |
20975 | 0xfc00ffff, 0xc000f73c, 0 , 0, | |
20976 | 0x0 }, /* POOL32Sxf_4~*(123) */ | |
20977 | { reserved_block , 0 , 0 , 32, | |
20978 | 0xfc00ffff, 0xc000f93c, 0 , 0, | |
20979 | 0x0 }, /* POOL32Sxf_4~*(124) */ | |
20980 | { reserved_block , 0 , 0 , 32, | |
20981 | 0xfc00ffff, 0xc000fb3c, 0 , 0, | |
20982 | 0x0 }, /* POOL32Sxf_4~*(125) */ | |
20983 | { reserved_block , 0 , 0 , 32, | |
20984 | 0xfc00ffff, 0xc000fd3c, 0 , 0, | |
20985 | 0x0 }, /* POOL32Sxf_4~*(126) */ | |
20986 | { reserved_block , 0 , 0 , 32, | |
20987 | 0xfc00ffff, 0xc000ff3c, 0 , 0, | |
20988 | 0x0 }, /* POOL32Sxf_4~*(127) */ | |
20989 | }; | |
20990 | ||
20991 | ||
20992 | NMD::Pool NMD::POOL32Sxf[8] = { | |
20993 | { reserved_block , 0 , 0 , 32, | |
20994 | 0xfc0001ff, 0xc000003c, 0 , 0, | |
20995 | 0x0 }, /* POOL32Sxf~*(0) */ | |
20996 | { reserved_block , 0 , 0 , 32, | |
20997 | 0xfc0001ff, 0xc000007c, 0 , 0, | |
20998 | 0x0 }, /* POOL32Sxf~*(1) */ | |
20999 | { reserved_block , 0 , 0 , 32, | |
21000 | 0xfc0001ff, 0xc00000bc, 0 , 0, | |
21001 | 0x0 }, /* POOL32Sxf~*(2) */ | |
21002 | { reserved_block , 0 , 0 , 32, | |
21003 | 0xfc0001ff, 0xc00000fc, 0 , 0, | |
21004 | 0x0 }, /* POOL32Sxf~*(3) */ | |
21005 | { pool , POOL32Sxf_4 , 128 , 32, | |
21006 | 0xfc0001ff, 0xc000013c, 0 , 0, | |
21007 | 0x0 }, /* POOL32Sxf_4 */ | |
21008 | { reserved_block , 0 , 0 , 32, | |
21009 | 0xfc0001ff, 0xc000017c, 0 , 0, | |
21010 | 0x0 }, /* POOL32Sxf~*(5) */ | |
21011 | { reserved_block , 0 , 0 , 32, | |
21012 | 0xfc0001ff, 0xc00001bc, 0 , 0, | |
21013 | 0x0 }, /* POOL32Sxf~*(6) */ | |
21014 | { reserved_block , 0 , 0 , 32, | |
21015 | 0xfc0001ff, 0xc00001fc, 0 , 0, | |
21016 | 0x0 }, /* POOL32Sxf~*(7) */ | |
21017 | }; | |
21018 | ||
21019 | ||
21020 | NMD::Pool NMD::POOL32S_4[8] = { | |
21021 | { instruction , 0 , 0 , 32, | |
21022 | 0xfc00003f, 0xc0000004, &NMD::EXTD , 0, | |
21023 | MIPS64_ }, /* EXTD */ | |
21024 | { instruction , 0 , 0 , 32, | |
21025 | 0xfc00003f, 0xc000000c, &NMD::EXTD32 , 0, | |
21026 | MIPS64_ }, /* EXTD32 */ | |
21027 | { reserved_block , 0 , 0 , 32, | |
21028 | 0xfc00003f, 0xc0000014, 0 , 0, | |
21029 | 0x0 }, /* POOL32S_4~*(2) */ | |
21030 | { reserved_block , 0 , 0 , 32, | |
21031 | 0xfc00003f, 0xc000001c, 0 , 0, | |
21032 | 0x0 }, /* POOL32S_4~*(3) */ | |
21033 | { reserved_block , 0 , 0 , 32, | |
21034 | 0xfc00003f, 0xc0000024, 0 , 0, | |
21035 | 0x0 }, /* POOL32S_4~*(4) */ | |
21036 | { reserved_block , 0 , 0 , 32, | |
21037 | 0xfc00003f, 0xc000002c, 0 , 0, | |
21038 | 0x0 }, /* POOL32S_4~*(5) */ | |
21039 | { reserved_block , 0 , 0 , 32, | |
21040 | 0xfc00003f, 0xc0000034, 0 , 0, | |
21041 | 0x0 }, /* POOL32S_4~*(6) */ | |
21042 | { pool , POOL32Sxf , 8 , 32, | |
21043 | 0xfc00003f, 0xc000003c, 0 , 0, | |
21044 | 0x0 }, /* POOL32Sxf */ | |
21045 | }; | |
21046 | ||
21047 | ||
21048 | NMD::Pool NMD::POOL32S[8] = { | |
21049 | { pool , POOL32S_0 , 64 , 32, | |
21050 | 0xfc000007, 0xc0000000, 0 , 0, | |
21051 | 0x0 }, /* POOL32S_0 */ | |
21052 | { reserved_block , 0 , 0 , 32, | |
21053 | 0xfc000007, 0xc0000001, 0 , 0, | |
21054 | 0x0 }, /* POOL32S~*(1) */ | |
21055 | { reserved_block , 0 , 0 , 32, | |
21056 | 0xfc000007, 0xc0000002, 0 , 0, | |
21057 | 0x0 }, /* POOL32S~*(2) */ | |
21058 | { reserved_block , 0 , 0 , 32, | |
21059 | 0xfc000007, 0xc0000003, 0 , 0, | |
21060 | 0x0 }, /* POOL32S~*(3) */ | |
21061 | { pool , POOL32S_4 , 8 , 32, | |
21062 | 0xfc000007, 0xc0000004, 0 , 0, | |
21063 | 0x0 }, /* POOL32S_4 */ | |
21064 | { reserved_block , 0 , 0 , 32, | |
21065 | 0xfc000007, 0xc0000005, 0 , 0, | |
21066 | 0x0 }, /* POOL32S~*(5) */ | |
21067 | { reserved_block , 0 , 0 , 32, | |
21068 | 0xfc000007, 0xc0000006, 0 , 0, | |
21069 | 0x0 }, /* POOL32S~*(6) */ | |
21070 | { reserved_block , 0 , 0 , 32, | |
21071 | 0xfc000007, 0xc0000007, 0 , 0, | |
21072 | 0x0 }, /* POOL32S~*(7) */ | |
21073 | }; | |
21074 | ||
21075 | ||
21076 | NMD::Pool NMD::P_LUI[2] = { | |
21077 | { instruction , 0 , 0 , 32, | |
21078 | 0xfc000002, 0xe0000000, &NMD::LUI , 0, | |
21079 | 0x0 }, /* LUI */ | |
21080 | { instruction , 0 , 0 , 32, | |
21081 | 0xfc000002, 0xe0000002, &NMD::ALUIPC , 0, | |
21082 | 0x0 }, /* ALUIPC */ | |
21083 | }; | |
21084 | ||
21085 | ||
21086 | NMD::Pool NMD::P_GP_LH[2] = { | |
21087 | { instruction , 0 , 0 , 32, | |
21088 | 0xfc1c0001, 0x44100000, &NMD::LH_GP_ , 0, | |
21089 | 0x0 }, /* LH[GP] */ | |
21090 | { instruction , 0 , 0 , 32, | |
21091 | 0xfc1c0001, 0x44100001, &NMD::LHU_GP_ , 0, | |
21092 | 0x0 }, /* LHU[GP] */ | |
21093 | }; | |
21094 | ||
21095 | ||
21096 | NMD::Pool NMD::P_GP_SH[2] = { | |
21097 | { instruction , 0 , 0 , 32, | |
21098 | 0xfc1c0001, 0x44140000, &NMD::SH_GP_ , 0, | |
21099 | 0x0 }, /* SH[GP] */ | |
21100 | { reserved_block , 0 , 0 , 32, | |
21101 | 0xfc1c0001, 0x44140001, 0 , 0, | |
21102 | 0x0 }, /* P.GP.SH~*(1) */ | |
21103 | }; | |
21104 | ||
21105 | ||
21106 | NMD::Pool NMD::P_GP_CP1[4] = { | |
21107 | { instruction , 0 , 0 , 32, | |
21108 | 0xfc1c0003, 0x44180000, &NMD::LWC1_GP_ , 0, | |
21109 | CP1_ }, /* LWC1[GP] */ | |
21110 | { instruction , 0 , 0 , 32, | |
21111 | 0xfc1c0003, 0x44180001, &NMD::SWC1_GP_ , 0, | |
21112 | CP1_ }, /* SWC1[GP] */ | |
21113 | { instruction , 0 , 0 , 32, | |
21114 | 0xfc1c0003, 0x44180002, &NMD::LDC1_GP_ , 0, | |
21115 | CP1_ }, /* LDC1[GP] */ | |
21116 | { instruction , 0 , 0 , 32, | |
21117 | 0xfc1c0003, 0x44180003, &NMD::SDC1_GP_ , 0, | |
21118 | CP1_ }, /* SDC1[GP] */ | |
21119 | }; | |
21120 | ||
21121 | ||
21122 | NMD::Pool NMD::P_GP_M64[4] = { | |
21123 | { instruction , 0 , 0 , 32, | |
21124 | 0xfc1c0003, 0x441c0000, &NMD::LWU_GP_ , 0, | |
21125 | MIPS64_ }, /* LWU[GP] */ | |
21126 | { reserved_block , 0 , 0 , 32, | |
21127 | 0xfc1c0003, 0x441c0001, 0 , 0, | |
21128 | 0x0 }, /* P.GP.M64~*(1) */ | |
21129 | { reserved_block , 0 , 0 , 32, | |
21130 | 0xfc1c0003, 0x441c0002, 0 , 0, | |
21131 | 0x0 }, /* P.GP.M64~*(2) */ | |
21132 | { reserved_block , 0 , 0 , 32, | |
21133 | 0xfc1c0003, 0x441c0003, 0 , 0, | |
21134 | 0x0 }, /* P.GP.M64~*(3) */ | |
21135 | }; | |
21136 | ||
21137 | ||
21138 | NMD::Pool NMD::P_GP_BH[8] = { | |
21139 | { instruction , 0 , 0 , 32, | |
21140 | 0xfc1c0000, 0x44000000, &NMD::LB_GP_ , 0, | |
21141 | 0x0 }, /* LB[GP] */ | |
21142 | { instruction , 0 , 0 , 32, | |
21143 | 0xfc1c0000, 0x44040000, &NMD::SB_GP_ , 0, | |
21144 | 0x0 }, /* SB[GP] */ | |
21145 | { instruction , 0 , 0 , 32, | |
21146 | 0xfc1c0000, 0x44080000, &NMD::LBU_GP_ , 0, | |
21147 | 0x0 }, /* LBU[GP] */ | |
21148 | { instruction , 0 , 0 , 32, | |
21149 | 0xfc1c0000, 0x440c0000, &NMD::ADDIU_GP_B_ , 0, | |
21150 | 0x0 }, /* ADDIU[GP.B] */ | |
21151 | { pool , P_GP_LH , 2 , 32, | |
21152 | 0xfc1c0000, 0x44100000, 0 , 0, | |
21153 | 0x0 }, /* P.GP.LH */ | |
21154 | { pool , P_GP_SH , 2 , 32, | |
21155 | 0xfc1c0000, 0x44140000, 0 , 0, | |
21156 | 0x0 }, /* P.GP.SH */ | |
21157 | { pool , P_GP_CP1 , 4 , 32, | |
21158 | 0xfc1c0000, 0x44180000, 0 , 0, | |
21159 | 0x0 }, /* P.GP.CP1 */ | |
21160 | { pool , P_GP_M64 , 4 , 32, | |
21161 | 0xfc1c0000, 0x441c0000, 0 , 0, | |
21162 | 0x0 }, /* P.GP.M64 */ | |
21163 | }; | |
21164 | ||
21165 | ||
21166 | NMD::Pool NMD::P_LS_U12[16] = { | |
21167 | { instruction , 0 , 0 , 32, | |
21168 | 0xfc00f000, 0x84000000, &NMD::LB_U12_ , 0, | |
21169 | 0x0 }, /* LB[U12] */ | |
21170 | { instruction , 0 , 0 , 32, | |
21171 | 0xfc00f000, 0x84001000, &NMD::SB_U12_ , 0, | |
21172 | 0x0 }, /* SB[U12] */ | |
21173 | { instruction , 0 , 0 , 32, | |
21174 | 0xfc00f000, 0x84002000, &NMD::LBU_U12_ , 0, | |
21175 | 0x0 }, /* LBU[U12] */ | |
21176 | { instruction , 0 , 0 , 32, | |
21177 | 0xfc00f000, 0x84003000, &NMD::PREF_U12_ , 0, | |
21178 | 0x0 }, /* PREF[U12] */ | |
21179 | { instruction , 0 , 0 , 32, | |
21180 | 0xfc00f000, 0x84004000, &NMD::LH_U12_ , 0, | |
21181 | 0x0 }, /* LH[U12] */ | |
21182 | { instruction , 0 , 0 , 32, | |
21183 | 0xfc00f000, 0x84005000, &NMD::SH_U12_ , 0, | |
21184 | 0x0 }, /* SH[U12] */ | |
21185 | { instruction , 0 , 0 , 32, | |
21186 | 0xfc00f000, 0x84006000, &NMD::LHU_U12_ , 0, | |
21187 | 0x0 }, /* LHU[U12] */ | |
21188 | { instruction , 0 , 0 , 32, | |
21189 | 0xfc00f000, 0x84007000, &NMD::LWU_U12_ , 0, | |
21190 | MIPS64_ }, /* LWU[U12] */ | |
21191 | { instruction , 0 , 0 , 32, | |
21192 | 0xfc00f000, 0x84008000, &NMD::LW_U12_ , 0, | |
21193 | 0x0 }, /* LW[U12] */ | |
21194 | { instruction , 0 , 0 , 32, | |
21195 | 0xfc00f000, 0x84009000, &NMD::SW_U12_ , 0, | |
21196 | 0x0 }, /* SW[U12] */ | |
21197 | { instruction , 0 , 0 , 32, | |
21198 | 0xfc00f000, 0x8400a000, &NMD::LWC1_U12_ , 0, | |
21199 | CP1_ }, /* LWC1[U12] */ | |
21200 | { instruction , 0 , 0 , 32, | |
21201 | 0xfc00f000, 0x8400b000, &NMD::SWC1_U12_ , 0, | |
21202 | CP1_ }, /* SWC1[U12] */ | |
21203 | { instruction , 0 , 0 , 32, | |
21204 | 0xfc00f000, 0x8400c000, &NMD::LD_U12_ , 0, | |
21205 | MIPS64_ }, /* LD[U12] */ | |
21206 | { instruction , 0 , 0 , 32, | |
21207 | 0xfc00f000, 0x8400d000, &NMD::SD_U12_ , 0, | |
21208 | MIPS64_ }, /* SD[U12] */ | |
21209 | { instruction , 0 , 0 , 32, | |
21210 | 0xfc00f000, 0x8400e000, &NMD::LDC1_U12_ , 0, | |
21211 | CP1_ }, /* LDC1[U12] */ | |
21212 | { instruction , 0 , 0 , 32, | |
21213 | 0xfc00f000, 0x8400f000, &NMD::SDC1_U12_ , 0, | |
21214 | CP1_ }, /* SDC1[U12] */ | |
21215 | }; | |
21216 | ||
21217 | ||
21218 | NMD::Pool NMD::P_PREF_S9_[2] = { | |
21219 | { instruction , 0 , 0 , 32, | |
21220 | 0xffe07f00, 0xa7e01800, &NMD::SYNCI , 0, | |
21221 | 0x0 }, /* SYNCI */ | |
21222 | { instruction , 0 , 0 , 32, | |
21223 | 0xfc007f00, 0xa4001800, &NMD::PREF_S9_ , &NMD::PREF_S9__cond , | |
21224 | 0x0 }, /* PREF[S9] */ | |
21225 | }; | |
21226 | ||
21227 | ||
21228 | NMD::Pool NMD::P_LS_S0[16] = { | |
21229 | { instruction , 0 , 0 , 32, | |
21230 | 0xfc007f00, 0xa4000000, &NMD::LB_S9_ , 0, | |
21231 | 0x0 }, /* LB[S9] */ | |
21232 | { instruction , 0 , 0 , 32, | |
21233 | 0xfc007f00, 0xa4000800, &NMD::SB_S9_ , 0, | |
21234 | 0x0 }, /* SB[S9] */ | |
21235 | { instruction , 0 , 0 , 32, | |
21236 | 0xfc007f00, 0xa4001000, &NMD::LBU_S9_ , 0, | |
21237 | 0x0 }, /* LBU[S9] */ | |
21238 | { pool , P_PREF_S9_ , 2 , 32, | |
21239 | 0xfc007f00, 0xa4001800, 0 , 0, | |
21240 | 0x0 }, /* P.PREF[S9] */ | |
21241 | { instruction , 0 , 0 , 32, | |
21242 | 0xfc007f00, 0xa4002000, &NMD::LH_S9_ , 0, | |
21243 | 0x0 }, /* LH[S9] */ | |
21244 | { instruction , 0 , 0 , 32, | |
21245 | 0xfc007f00, 0xa4002800, &NMD::SH_S9_ , 0, | |
21246 | 0x0 }, /* SH[S9] */ | |
21247 | { instruction , 0 , 0 , 32, | |
21248 | 0xfc007f00, 0xa4003000, &NMD::LHU_S9_ , 0, | |
21249 | 0x0 }, /* LHU[S9] */ | |
21250 | { instruction , 0 , 0 , 32, | |
21251 | 0xfc007f00, 0xa4003800, &NMD::LWU_S9_ , 0, | |
21252 | MIPS64_ }, /* LWU[S9] */ | |
21253 | { instruction , 0 , 0 , 32, | |
21254 | 0xfc007f00, 0xa4004000, &NMD::LW_S9_ , 0, | |
21255 | 0x0 }, /* LW[S9] */ | |
21256 | { instruction , 0 , 0 , 32, | |
21257 | 0xfc007f00, 0xa4004800, &NMD::SW_S9_ , 0, | |
21258 | 0x0 }, /* SW[S9] */ | |
21259 | { instruction , 0 , 0 , 32, | |
21260 | 0xfc007f00, 0xa4005000, &NMD::LWC1_S9_ , 0, | |
21261 | CP1_ }, /* LWC1[S9] */ | |
21262 | { instruction , 0 , 0 , 32, | |
21263 | 0xfc007f00, 0xa4005800, &NMD::SWC1_S9_ , 0, | |
21264 | CP1_ }, /* SWC1[S9] */ | |
21265 | { instruction , 0 , 0 , 32, | |
21266 | 0xfc007f00, 0xa4006000, &NMD::LD_S9_ , 0, | |
21267 | MIPS64_ }, /* LD[S9] */ | |
21268 | { instruction , 0 , 0 , 32, | |
21269 | 0xfc007f00, 0xa4006800, &NMD::SD_S9_ , 0, | |
21270 | MIPS64_ }, /* SD[S9] */ | |
21271 | { instruction , 0 , 0 , 32, | |
21272 | 0xfc007f00, 0xa4007000, &NMD::LDC1_S9_ , 0, | |
21273 | CP1_ }, /* LDC1[S9] */ | |
21274 | { instruction , 0 , 0 , 32, | |
21275 | 0xfc007f00, 0xa4007800, &NMD::SDC1_S9_ , 0, | |
21276 | CP1_ }, /* SDC1[S9] */ | |
21277 | }; | |
21278 | ||
21279 | ||
21280 | NMD::Pool NMD::ASET_ACLR[2] = { | |
21281 | { instruction , 0 , 0 , 32, | |
21282 | 0xfe007f00, 0xa4001100, &NMD::ASET , 0, | |
21283 | MCU_ }, /* ASET */ | |
21284 | { instruction , 0 , 0 , 32, | |
21285 | 0xfe007f00, 0xa6001100, &NMD::ACLR , 0, | |
21286 | MCU_ }, /* ACLR */ | |
21287 | }; | |
21288 | ||
21289 | ||
21290 | NMD::Pool NMD::P_LL[4] = { | |
21291 | { instruction , 0 , 0 , 32, | |
21292 | 0xfc007f03, 0xa4005100, &NMD::LL , 0, | |
21293 | 0x0 }, /* LL */ | |
21294 | { instruction , 0 , 0 , 32, | |
21295 | 0xfc007f03, 0xa4005101, &NMD::LLWP , 0, | |
21296 | XNP_ }, /* LLWP */ | |
21297 | { reserved_block , 0 , 0 , 32, | |
21298 | 0xfc007f03, 0xa4005102, 0 , 0, | |
21299 | 0x0 }, /* P.LL~*(2) */ | |
21300 | { reserved_block , 0 , 0 , 32, | |
21301 | 0xfc007f03, 0xa4005103, 0 , 0, | |
21302 | 0x0 }, /* P.LL~*(3) */ | |
21303 | }; | |
21304 | ||
21305 | ||
21306 | NMD::Pool NMD::P_SC[4] = { | |
21307 | { instruction , 0 , 0 , 32, | |
21308 | 0xfc007f03, 0xa4005900, &NMD::SC , 0, | |
21309 | 0x0 }, /* SC */ | |
21310 | { instruction , 0 , 0 , 32, | |
21311 | 0xfc007f03, 0xa4005901, &NMD::SCWP , 0, | |
21312 | XNP_ }, /* SCWP */ | |
21313 | { reserved_block , 0 , 0 , 32, | |
21314 | 0xfc007f03, 0xa4005902, 0 , 0, | |
21315 | 0x0 }, /* P.SC~*(2) */ | |
21316 | { reserved_block , 0 , 0 , 32, | |
21317 | 0xfc007f03, 0xa4005903, 0 , 0, | |
21318 | 0x0 }, /* P.SC~*(3) */ | |
21319 | }; | |
21320 | ||
21321 | ||
21322 | NMD::Pool NMD::P_LLD[8] = { | |
21323 | { instruction , 0 , 0 , 32, | |
21324 | 0xfc007f07, 0xa4007100, &NMD::LLD , 0, | |
21325 | MIPS64_ }, /* LLD */ | |
21326 | { instruction , 0 , 0 , 32, | |
21327 | 0xfc007f07, 0xa4007101, &NMD::LLDP , 0, | |
21328 | MIPS64_ }, /* LLDP */ | |
21329 | { reserved_block , 0 , 0 , 32, | |
21330 | 0xfc007f07, 0xa4007102, 0 , 0, | |
21331 | 0x0 }, /* P.LLD~*(2) */ | |
21332 | { reserved_block , 0 , 0 , 32, | |
21333 | 0xfc007f07, 0xa4007103, 0 , 0, | |
21334 | 0x0 }, /* P.LLD~*(3) */ | |
21335 | { reserved_block , 0 , 0 , 32, | |
21336 | 0xfc007f07, 0xa4007104, 0 , 0, | |
21337 | 0x0 }, /* P.LLD~*(4) */ | |
21338 | { reserved_block , 0 , 0 , 32, | |
21339 | 0xfc007f07, 0xa4007105, 0 , 0, | |
21340 | 0x0 }, /* P.LLD~*(5) */ | |
21341 | { reserved_block , 0 , 0 , 32, | |
21342 | 0xfc007f07, 0xa4007106, 0 , 0, | |
21343 | 0x0 }, /* P.LLD~*(6) */ | |
21344 | { reserved_block , 0 , 0 , 32, | |
21345 | 0xfc007f07, 0xa4007107, 0 , 0, | |
21346 | 0x0 }, /* P.LLD~*(7) */ | |
21347 | }; | |
21348 | ||
21349 | ||
21350 | NMD::Pool NMD::P_SCD[8] = { | |
21351 | { instruction , 0 , 0 , 32, | |
21352 | 0xfc007f07, 0xa4007900, &NMD::SCD , 0, | |
21353 | MIPS64_ }, /* SCD */ | |
21354 | { instruction , 0 , 0 , 32, | |
21355 | 0xfc007f07, 0xa4007901, &NMD::SCDP , 0, | |
21356 | MIPS64_ }, /* SCDP */ | |
21357 | { reserved_block , 0 , 0 , 32, | |
21358 | 0xfc007f07, 0xa4007902, 0 , 0, | |
21359 | 0x0 }, /* P.SCD~*(2) */ | |
21360 | { reserved_block , 0 , 0 , 32, | |
21361 | 0xfc007f07, 0xa4007903, 0 , 0, | |
21362 | 0x0 }, /* P.SCD~*(3) */ | |
21363 | { reserved_block , 0 , 0 , 32, | |
21364 | 0xfc007f07, 0xa4007904, 0 , 0, | |
21365 | 0x0 }, /* P.SCD~*(4) */ | |
21366 | { reserved_block , 0 , 0 , 32, | |
21367 | 0xfc007f07, 0xa4007905, 0 , 0, | |
21368 | 0x0 }, /* P.SCD~*(5) */ | |
21369 | { reserved_block , 0 , 0 , 32, | |
21370 | 0xfc007f07, 0xa4007906, 0 , 0, | |
21371 | 0x0 }, /* P.SCD~*(6) */ | |
21372 | { reserved_block , 0 , 0 , 32, | |
21373 | 0xfc007f07, 0xa4007907, 0 , 0, | |
21374 | 0x0 }, /* P.SCD~*(7) */ | |
21375 | }; | |
21376 | ||
21377 | ||
21378 | NMD::Pool NMD::P_LS_S1[16] = { | |
21379 | { reserved_block , 0 , 0 , 32, | |
21380 | 0xfc007f00, 0xa4000100, 0 , 0, | |
21381 | 0x0 }, /* P.LS.S1~*(0) */ | |
21382 | { reserved_block , 0 , 0 , 32, | |
21383 | 0xfc007f00, 0xa4000900, 0 , 0, | |
21384 | 0x0 }, /* P.LS.S1~*(1) */ | |
21385 | { pool , ASET_ACLR , 2 , 32, | |
21386 | 0xfc007f00, 0xa4001100, 0 , 0, | |
21387 | 0x0 }, /* ASET_ACLR */ | |
21388 | { reserved_block , 0 , 0 , 32, | |
21389 | 0xfc007f00, 0xa4001900, 0 , 0, | |
21390 | 0x0 }, /* P.LS.S1~*(3) */ | |
21391 | { instruction , 0 , 0 , 32, | |
21392 | 0xfc007f00, 0xa4002100, &NMD::UALH , 0, | |
21393 | XMMS_ }, /* UALH */ | |
21394 | { instruction , 0 , 0 , 32, | |
21395 | 0xfc007f00, 0xa4002900, &NMD::UASH , 0, | |
21396 | XMMS_ }, /* UASH */ | |
21397 | { reserved_block , 0 , 0 , 32, | |
21398 | 0xfc007f00, 0xa4003100, 0 , 0, | |
21399 | 0x0 }, /* P.LS.S1~*(6) */ | |
21400 | { instruction , 0 , 0 , 32, | |
21401 | 0xfc007f00, 0xa4003900, &NMD::CACHE , 0, | |
21402 | CP0_ }, /* CACHE */ | |
21403 | { instruction , 0 , 0 , 32, | |
21404 | 0xfc007f00, 0xa4004100, &NMD::LWC2 , 0, | |
21405 | CP2_ }, /* LWC2 */ | |
21406 | { instruction , 0 , 0 , 32, | |
21407 | 0xfc007f00, 0xa4004900, &NMD::SWC2 , 0, | |
21408 | CP2_ }, /* SWC2 */ | |
21409 | { pool , P_LL , 4 , 32, | |
21410 | 0xfc007f00, 0xa4005100, 0 , 0, | |
21411 | 0x0 }, /* P.LL */ | |
21412 | { pool , P_SC , 4 , 32, | |
21413 | 0xfc007f00, 0xa4005900, 0 , 0, | |
21414 | 0x0 }, /* P.SC */ | |
21415 | { instruction , 0 , 0 , 32, | |
21416 | 0xfc007f00, 0xa4006100, &NMD::LDC2 , 0, | |
21417 | CP2_ }, /* LDC2 */ | |
21418 | { instruction , 0 , 0 , 32, | |
21419 | 0xfc007f00, 0xa4006900, &NMD::SDC2 , 0, | |
21420 | CP2_ }, /* SDC2 */ | |
21421 | { pool , P_LLD , 8 , 32, | |
21422 | 0xfc007f00, 0xa4007100, 0 , 0, | |
21423 | 0x0 }, /* P.LLD */ | |
21424 | { pool , P_SCD , 8 , 32, | |
21425 | 0xfc007f00, 0xa4007900, 0 , 0, | |
21426 | 0x0 }, /* P.SCD */ | |
21427 | }; | |
21428 | ||
21429 | ||
21430 | NMD::Pool NMD::P_PREFE[2] = { | |
21431 | { instruction , 0 , 0 , 32, | |
21432 | 0xffe07f00, 0xa7e01a00, &NMD::SYNCIE , 0, | |
21433 | CP0_ | EVA_ }, /* SYNCIE */ | |
21434 | { instruction , 0 , 0 , 32, | |
21435 | 0xfc007f00, 0xa4001a00, &NMD::PREFE , &NMD::PREFE_cond , | |
21436 | CP0_ | EVA_ }, /* PREFE */ | |
21437 | }; | |
21438 | ||
21439 | ||
21440 | NMD::Pool NMD::P_LLE[4] = { | |
21441 | { instruction , 0 , 0 , 32, | |
21442 | 0xfc007f03, 0xa4005200, &NMD::LLE , 0, | |
21443 | CP0_ | EVA_ }, /* LLE */ | |
21444 | { instruction , 0 , 0 , 32, | |
21445 | 0xfc007f03, 0xa4005201, &NMD::LLWPE , 0, | |
21446 | CP0_ | EVA_ }, /* LLWPE */ | |
21447 | { reserved_block , 0 , 0 , 32, | |
21448 | 0xfc007f03, 0xa4005202, 0 , 0, | |
21449 | 0x0 }, /* P.LLE~*(2) */ | |
21450 | { reserved_block , 0 , 0 , 32, | |
21451 | 0xfc007f03, 0xa4005203, 0 , 0, | |
21452 | 0x0 }, /* P.LLE~*(3) */ | |
21453 | }; | |
21454 | ||
21455 | ||
21456 | NMD::Pool NMD::P_SCE[4] = { | |
21457 | { instruction , 0 , 0 , 32, | |
21458 | 0xfc007f03, 0xa4005a00, &NMD::SCE , 0, | |
21459 | CP0_ | EVA_ }, /* SCE */ | |
21460 | { instruction , 0 , 0 , 32, | |
21461 | 0xfc007f03, 0xa4005a01, &NMD::SCWPE , 0, | |
21462 | CP0_ | EVA_ }, /* SCWPE */ | |
21463 | { reserved_block , 0 , 0 , 32, | |
21464 | 0xfc007f03, 0xa4005a02, 0 , 0, | |
21465 | 0x0 }, /* P.SCE~*(2) */ | |
21466 | { reserved_block , 0 , 0 , 32, | |
21467 | 0xfc007f03, 0xa4005a03, 0 , 0, | |
21468 | 0x0 }, /* P.SCE~*(3) */ | |
21469 | }; | |
21470 | ||
21471 | ||
21472 | NMD::Pool NMD::P_LS_E0[16] = { | |
21473 | { instruction , 0 , 0 , 32, | |
21474 | 0xfc007f00, 0xa4000200, &NMD::LBE , 0, | |
21475 | CP0_ | EVA_ }, /* LBE */ | |
21476 | { instruction , 0 , 0 , 32, | |
21477 | 0xfc007f00, 0xa4000a00, &NMD::SBE , 0, | |
21478 | CP0_ | EVA_ }, /* SBE */ | |
21479 | { instruction , 0 , 0 , 32, | |
21480 | 0xfc007f00, 0xa4001200, &NMD::LBUE , 0, | |
21481 | CP0_ | EVA_ }, /* LBUE */ | |
21482 | { pool , P_PREFE , 2 , 32, | |
21483 | 0xfc007f00, 0xa4001a00, 0 , 0, | |
21484 | 0x0 }, /* P.PREFE */ | |
21485 | { instruction , 0 , 0 , 32, | |
21486 | 0xfc007f00, 0xa4002200, &NMD::LHE , 0, | |
21487 | CP0_ | EVA_ }, /* LHE */ | |
21488 | { instruction , 0 , 0 , 32, | |
21489 | 0xfc007f00, 0xa4002a00, &NMD::SHE , 0, | |
21490 | CP0_ | EVA_ }, /* SHE */ | |
21491 | { instruction , 0 , 0 , 32, | |
21492 | 0xfc007f00, 0xa4003200, &NMD::LHUE , 0, | |
21493 | CP0_ | EVA_ }, /* LHUE */ | |
21494 | { instruction , 0 , 0 , 32, | |
21495 | 0xfc007f00, 0xa4003a00, &NMD::CACHEE , 0, | |
21496 | CP0_ | EVA_ }, /* CACHEE */ | |
21497 | { instruction , 0 , 0 , 32, | |
21498 | 0xfc007f00, 0xa4004200, &NMD::LWE , 0, | |
21499 | CP0_ | EVA_ }, /* LWE */ | |
21500 | { instruction , 0 , 0 , 32, | |
21501 | 0xfc007f00, 0xa4004a00, &NMD::SWE , 0, | |
21502 | CP0_ | EVA_ }, /* SWE */ | |
21503 | { pool , P_LLE , 4 , 32, | |
21504 | 0xfc007f00, 0xa4005200, 0 , 0, | |
21505 | 0x0 }, /* P.LLE */ | |
21506 | { pool , P_SCE , 4 , 32, | |
21507 | 0xfc007f00, 0xa4005a00, 0 , 0, | |
21508 | 0x0 }, /* P.SCE */ | |
21509 | { reserved_block , 0 , 0 , 32, | |
21510 | 0xfc007f00, 0xa4006200, 0 , 0, | |
21511 | 0x0 }, /* P.LS.E0~*(12) */ | |
21512 | { reserved_block , 0 , 0 , 32, | |
21513 | 0xfc007f00, 0xa4006a00, 0 , 0, | |
21514 | 0x0 }, /* P.LS.E0~*(13) */ | |
21515 | { reserved_block , 0 , 0 , 32, | |
21516 | 0xfc007f00, 0xa4007200, 0 , 0, | |
21517 | 0x0 }, /* P.LS.E0~*(14) */ | |
21518 | { reserved_block , 0 , 0 , 32, | |
21519 | 0xfc007f00, 0xa4007a00, 0 , 0, | |
21520 | 0x0 }, /* P.LS.E0~*(15) */ | |
21521 | }; | |
21522 | ||
21523 | ||
21524 | NMD::Pool NMD::P_LS_WM[2] = { | |
21525 | { instruction , 0 , 0 , 32, | |
21526 | 0xfc000f00, 0xa4000400, &NMD::LWM , 0, | |
21527 | XMMS_ }, /* LWM */ | |
21528 | { instruction , 0 , 0 , 32, | |
21529 | 0xfc000f00, 0xa4000c00, &NMD::SWM , 0, | |
21530 | XMMS_ }, /* SWM */ | |
21531 | }; | |
21532 | ||
21533 | ||
21534 | NMD::Pool NMD::P_LS_UAWM[2] = { | |
21535 | { instruction , 0 , 0 , 32, | |
21536 | 0xfc000f00, 0xa4000500, &NMD::UALWM , 0, | |
21537 | XMMS_ }, /* UALWM */ | |
21538 | { instruction , 0 , 0 , 32, | |
21539 | 0xfc000f00, 0xa4000d00, &NMD::UASWM , 0, | |
21540 | XMMS_ }, /* UASWM */ | |
21541 | }; | |
21542 | ||
21543 | ||
21544 | NMD::Pool NMD::P_LS_DM[2] = { | |
21545 | { instruction , 0 , 0 , 32, | |
21546 | 0xfc000f00, 0xa4000600, &NMD::LDM , 0, | |
21547 | MIPS64_ }, /* LDM */ | |
21548 | { instruction , 0 , 0 , 32, | |
21549 | 0xfc000f00, 0xa4000e00, &NMD::SDM , 0, | |
21550 | MIPS64_ }, /* SDM */ | |
21551 | }; | |
21552 | ||
21553 | ||
21554 | NMD::Pool NMD::P_LS_UADM[2] = { | |
21555 | { instruction , 0 , 0 , 32, | |
21556 | 0xfc000f00, 0xa4000700, &NMD::UALDM , 0, | |
21557 | MIPS64_ }, /* UALDM */ | |
21558 | { instruction , 0 , 0 , 32, | |
21559 | 0xfc000f00, 0xa4000f00, &NMD::UASDM , 0, | |
21560 | MIPS64_ }, /* UASDM */ | |
21561 | }; | |
21562 | ||
21563 | ||
21564 | NMD::Pool NMD::P_LS_S9[8] = { | |
21565 | { pool , P_LS_S0 , 16 , 32, | |
21566 | 0xfc000700, 0xa4000000, 0 , 0, | |
21567 | 0x0 }, /* P.LS.S0 */ | |
21568 | { pool , P_LS_S1 , 16 , 32, | |
21569 | 0xfc000700, 0xa4000100, 0 , 0, | |
21570 | 0x0 }, /* P.LS.S1 */ | |
21571 | { pool , P_LS_E0 , 16 , 32, | |
21572 | 0xfc000700, 0xa4000200, 0 , 0, | |
21573 | 0x0 }, /* P.LS.E0 */ | |
21574 | { reserved_block , 0 , 0 , 32, | |
21575 | 0xfc000700, 0xa4000300, 0 , 0, | |
21576 | 0x0 }, /* P.LS.S9~*(3) */ | |
21577 | { pool , P_LS_WM , 2 , 32, | |
21578 | 0xfc000700, 0xa4000400, 0 , 0, | |
21579 | 0x0 }, /* P.LS.WM */ | |
21580 | { pool , P_LS_UAWM , 2 , 32, | |
21581 | 0xfc000700, 0xa4000500, 0 , 0, | |
21582 | 0x0 }, /* P.LS.UAWM */ | |
21583 | { pool , P_LS_DM , 2 , 32, | |
21584 | 0xfc000700, 0xa4000600, 0 , 0, | |
21585 | 0x0 }, /* P.LS.DM */ | |
21586 | { pool , P_LS_UADM , 2 , 32, | |
21587 | 0xfc000700, 0xa4000700, 0 , 0, | |
21588 | 0x0 }, /* P.LS.UADM */ | |
21589 | }; | |
21590 | ||
21591 | ||
21592 | NMD::Pool NMD::P_BAL[2] = { | |
21593 | { branch_instruction , 0 , 0 , 32, | |
21594 | 0xfe000000, 0x28000000, &NMD::BC_32_ , 0, | |
21595 | 0x0 }, /* BC[32] */ | |
21596 | { call_instruction , 0 , 0 , 32, | |
21597 | 0xfe000000, 0x2a000000, &NMD::BALC_32_ , 0, | |
21598 | 0x0 }, /* BALC[32] */ | |
21599 | }; | |
21600 | ||
21601 | ||
21602 | NMD::Pool NMD::P_BALRSC[2] = { | |
21603 | { branch_instruction , 0 , 0 , 32, | |
21604 | 0xffe0f000, 0x48008000, &NMD::BRSC , 0, | |
21605 | 0x0 }, /* BRSC */ | |
21606 | { call_instruction , 0 , 0 , 32, | |
21607 | 0xfc00f000, 0x48008000, &NMD::BALRSC , &NMD::BALRSC_cond , | |
21608 | 0x0 }, /* BALRSC */ | |
21609 | }; | |
21610 | ||
21611 | ||
21612 | NMD::Pool NMD::P_J[16] = { | |
21613 | { call_instruction , 0 , 0 , 32, | |
21614 | 0xfc00f000, 0x48000000, &NMD::JALRC_32_ , 0, | |
21615 | 0x0 }, /* JALRC[32] */ | |
21616 | { call_instruction , 0 , 0 , 32, | |
21617 | 0xfc00f000, 0x48001000, &NMD::JALRC_HB , 0, | |
21618 | 0x0 }, /* JALRC.HB */ | |
21619 | { reserved_block , 0 , 0 , 32, | |
21620 | 0xfc00f000, 0x48002000, 0 , 0, | |
21621 | 0x0 }, /* P.J~*(2) */ | |
21622 | { reserved_block , 0 , 0 , 32, | |
21623 | 0xfc00f000, 0x48003000, 0 , 0, | |
21624 | 0x0 }, /* P.J~*(3) */ | |
21625 | { reserved_block , 0 , 0 , 32, | |
21626 | 0xfc00f000, 0x48004000, 0 , 0, | |
21627 | 0x0 }, /* P.J~*(4) */ | |
21628 | { reserved_block , 0 , 0 , 32, | |
21629 | 0xfc00f000, 0x48005000, 0 , 0, | |
21630 | 0x0 }, /* P.J~*(5) */ | |
21631 | { reserved_block , 0 , 0 , 32, | |
21632 | 0xfc00f000, 0x48006000, 0 , 0, | |
21633 | 0x0 }, /* P.J~*(6) */ | |
21634 | { reserved_block , 0 , 0 , 32, | |
21635 | 0xfc00f000, 0x48007000, 0 , 0, | |
21636 | 0x0 }, /* P.J~*(7) */ | |
21637 | { pool , P_BALRSC , 2 , 32, | |
21638 | 0xfc00f000, 0x48008000, 0 , 0, | |
21639 | 0x0 }, /* P.BALRSC */ | |
21640 | { reserved_block , 0 , 0 , 32, | |
21641 | 0xfc00f000, 0x48009000, 0 , 0, | |
21642 | 0x0 }, /* P.J~*(9) */ | |
21643 | { reserved_block , 0 , 0 , 32, | |
21644 | 0xfc00f000, 0x4800a000, 0 , 0, | |
21645 | 0x0 }, /* P.J~*(10) */ | |
21646 | { reserved_block , 0 , 0 , 32, | |
21647 | 0xfc00f000, 0x4800b000, 0 , 0, | |
21648 | 0x0 }, /* P.J~*(11) */ | |
21649 | { reserved_block , 0 , 0 , 32, | |
21650 | 0xfc00f000, 0x4800c000, 0 , 0, | |
21651 | 0x0 }, /* P.J~*(12) */ | |
21652 | { reserved_block , 0 , 0 , 32, | |
21653 | 0xfc00f000, 0x4800d000, 0 , 0, | |
21654 | 0x0 }, /* P.J~*(13) */ | |
21655 | { reserved_block , 0 , 0 , 32, | |
21656 | 0xfc00f000, 0x4800e000, 0 , 0, | |
21657 | 0x0 }, /* P.J~*(14) */ | |
21658 | { reserved_block , 0 , 0 , 32, | |
21659 | 0xfc00f000, 0x4800f000, 0 , 0, | |
21660 | 0x0 }, /* P.J~*(15) */ | |
21661 | }; | |
21662 | ||
21663 | ||
21664 | NMD::Pool NMD::P_BR3A[32] = { | |
21665 | { branch_instruction , 0 , 0 , 32, | |
21666 | 0xfc1fc000, 0x88004000, &NMD::BC1EQZC , 0, | |
21667 | CP1_ }, /* BC1EQZC */ | |
21668 | { branch_instruction , 0 , 0 , 32, | |
21669 | 0xfc1fc000, 0x88014000, &NMD::BC1NEZC , 0, | |
21670 | CP1_ }, /* BC1NEZC */ | |
21671 | { branch_instruction , 0 , 0 , 32, | |
21672 | 0xfc1fc000, 0x88024000, &NMD::BC2EQZC , 0, | |
21673 | CP2_ }, /* BC2EQZC */ | |
21674 | { branch_instruction , 0 , 0 , 32, | |
21675 | 0xfc1fc000, 0x88034000, &NMD::BC2NEZC , 0, | |
21676 | CP2_ }, /* BC2NEZC */ | |
21677 | { branch_instruction , 0 , 0 , 32, | |
21678 | 0xfc1fc000, 0x88044000, &NMD::BPOSGE32C , 0, | |
21679 | DSP_ }, /* BPOSGE32C */ | |
21680 | { reserved_block , 0 , 0 , 32, | |
21681 | 0xfc1fc000, 0x88054000, 0 , 0, | |
21682 | 0x0 }, /* P.BR3A~*(5) */ | |
21683 | { reserved_block , 0 , 0 , 32, | |
21684 | 0xfc1fc000, 0x88064000, 0 , 0, | |
21685 | 0x0 }, /* P.BR3A~*(6) */ | |
21686 | { reserved_block , 0 , 0 , 32, | |
21687 | 0xfc1fc000, 0x88074000, 0 , 0, | |
21688 | 0x0 }, /* P.BR3A~*(7) */ | |
21689 | { reserved_block , 0 , 0 , 32, | |
21690 | 0xfc1fc000, 0x88084000, 0 , 0, | |
21691 | 0x0 }, /* P.BR3A~*(8) */ | |
21692 | { reserved_block , 0 , 0 , 32, | |
21693 | 0xfc1fc000, 0x88094000, 0 , 0, | |
21694 | 0x0 }, /* P.BR3A~*(9) */ | |
21695 | { reserved_block , 0 , 0 , 32, | |
21696 | 0xfc1fc000, 0x880a4000, 0 , 0, | |
21697 | 0x0 }, /* P.BR3A~*(10) */ | |
21698 | { reserved_block , 0 , 0 , 32, | |
21699 | 0xfc1fc000, 0x880b4000, 0 , 0, | |
21700 | 0x0 }, /* P.BR3A~*(11) */ | |
21701 | { reserved_block , 0 , 0 , 32, | |
21702 | 0xfc1fc000, 0x880c4000, 0 , 0, | |
21703 | 0x0 }, /* P.BR3A~*(12) */ | |
21704 | { reserved_block , 0 , 0 , 32, | |
21705 | 0xfc1fc000, 0x880d4000, 0 , 0, | |
21706 | 0x0 }, /* P.BR3A~*(13) */ | |
21707 | { reserved_block , 0 , 0 , 32, | |
21708 | 0xfc1fc000, 0x880e4000, 0 , 0, | |
21709 | 0x0 }, /* P.BR3A~*(14) */ | |
21710 | { reserved_block , 0 , 0 , 32, | |
21711 | 0xfc1fc000, 0x880f4000, 0 , 0, | |
21712 | 0x0 }, /* P.BR3A~*(15) */ | |
21713 | { reserved_block , 0 , 0 , 32, | |
21714 | 0xfc1fc000, 0x88104000, 0 , 0, | |
21715 | 0x0 }, /* P.BR3A~*(16) */ | |
21716 | { reserved_block , 0 , 0 , 32, | |
21717 | 0xfc1fc000, 0x88114000, 0 , 0, | |
21718 | 0x0 }, /* P.BR3A~*(17) */ | |
21719 | { reserved_block , 0 , 0 , 32, | |
21720 | 0xfc1fc000, 0x88124000, 0 , 0, | |
21721 | 0x0 }, /* P.BR3A~*(18) */ | |
21722 | { reserved_block , 0 , 0 , 32, | |
21723 | 0xfc1fc000, 0x88134000, 0 , 0, | |
21724 | 0x0 }, /* P.BR3A~*(19) */ | |
21725 | { reserved_block , 0 , 0 , 32, | |
21726 | 0xfc1fc000, 0x88144000, 0 , 0, | |
21727 | 0x0 }, /* P.BR3A~*(20) */ | |
21728 | { reserved_block , 0 , 0 , 32, | |
21729 | 0xfc1fc000, 0x88154000, 0 , 0, | |
21730 | 0x0 }, /* P.BR3A~*(21) */ | |
21731 | { reserved_block , 0 , 0 , 32, | |
21732 | 0xfc1fc000, 0x88164000, 0 , 0, | |
21733 | 0x0 }, /* P.BR3A~*(22) */ | |
21734 | { reserved_block , 0 , 0 , 32, | |
21735 | 0xfc1fc000, 0x88174000, 0 , 0, | |
21736 | 0x0 }, /* P.BR3A~*(23) */ | |
21737 | { reserved_block , 0 , 0 , 32, | |
21738 | 0xfc1fc000, 0x88184000, 0 , 0, | |
21739 | 0x0 }, /* P.BR3A~*(24) */ | |
21740 | { reserved_block , 0 , 0 , 32, | |
21741 | 0xfc1fc000, 0x88194000, 0 , 0, | |
21742 | 0x0 }, /* P.BR3A~*(25) */ | |
21743 | { reserved_block , 0 , 0 , 32, | |
21744 | 0xfc1fc000, 0x881a4000, 0 , 0, | |
21745 | 0x0 }, /* P.BR3A~*(26) */ | |
21746 | { reserved_block , 0 , 0 , 32, | |
21747 | 0xfc1fc000, 0x881b4000, 0 , 0, | |
21748 | 0x0 }, /* P.BR3A~*(27) */ | |
21749 | { reserved_block , 0 , 0 , 32, | |
21750 | 0xfc1fc000, 0x881c4000, 0 , 0, | |
21751 | 0x0 }, /* P.BR3A~*(28) */ | |
21752 | { reserved_block , 0 , 0 , 32, | |
21753 | 0xfc1fc000, 0x881d4000, 0 , 0, | |
21754 | 0x0 }, /* P.BR3A~*(29) */ | |
21755 | { reserved_block , 0 , 0 , 32, | |
21756 | 0xfc1fc000, 0x881e4000, 0 , 0, | |
21757 | 0x0 }, /* P.BR3A~*(30) */ | |
21758 | { reserved_block , 0 , 0 , 32, | |
21759 | 0xfc1fc000, 0x881f4000, 0 , 0, | |
21760 | 0x0 }, /* P.BR3A~*(31) */ | |
21761 | }; | |
21762 | ||
21763 | ||
21764 | NMD::Pool NMD::P_BR1[4] = { | |
21765 | { branch_instruction , 0 , 0 , 32, | |
21766 | 0xfc00c000, 0x88000000, &NMD::BEQC_32_ , 0, | |
21767 | 0x0 }, /* BEQC[32] */ | |
21768 | { pool , P_BR3A , 32 , 32, | |
21769 | 0xfc00c000, 0x88004000, 0 , 0, | |
21770 | 0x0 }, /* P.BR3A */ | |
21771 | { branch_instruction , 0 , 0 , 32, | |
21772 | 0xfc00c000, 0x88008000, &NMD::BGEC , 0, | |
21773 | 0x0 }, /* BGEC */ | |
21774 | { branch_instruction , 0 , 0 , 32, | |
21775 | 0xfc00c000, 0x8800c000, &NMD::BGEUC , 0, | |
21776 | 0x0 }, /* BGEUC */ | |
21777 | }; | |
21778 | ||
21779 | ||
21780 | NMD::Pool NMD::P_BR2[4] = { | |
21781 | { branch_instruction , 0 , 0 , 32, | |
21782 | 0xfc00c000, 0xa8000000, &NMD::BNEC_32_ , 0, | |
21783 | 0x0 }, /* BNEC[32] */ | |
21784 | { reserved_block , 0 , 0 , 32, | |
21785 | 0xfc00c000, 0xa8004000, 0 , 0, | |
21786 | 0x0 }, /* P.BR2~*(1) */ | |
21787 | { branch_instruction , 0 , 0 , 32, | |
21788 | 0xfc00c000, 0xa8008000, &NMD::BLTC , 0, | |
21789 | 0x0 }, /* BLTC */ | |
21790 | { branch_instruction , 0 , 0 , 32, | |
21791 | 0xfc00c000, 0xa800c000, &NMD::BLTUC , 0, | |
21792 | 0x0 }, /* BLTUC */ | |
21793 | }; | |
21794 | ||
21795 | ||
21796 | NMD::Pool NMD::P_BRI[8] = { | |
21797 | { branch_instruction , 0 , 0 , 32, | |
21798 | 0xfc1c0000, 0xc8000000, &NMD::BEQIC , 0, | |
21799 | 0x0 }, /* BEQIC */ | |
21800 | { branch_instruction , 0 , 0 , 32, | |
21801 | 0xfc1c0000, 0xc8040000, &NMD::BBEQZC , 0, | |
21802 | XMMS_ }, /* BBEQZC */ | |
21803 | { branch_instruction , 0 , 0 , 32, | |
21804 | 0xfc1c0000, 0xc8080000, &NMD::BGEIC , 0, | |
21805 | 0x0 }, /* BGEIC */ | |
21806 | { branch_instruction , 0 , 0 , 32, | |
21807 | 0xfc1c0000, 0xc80c0000, &NMD::BGEIUC , 0, | |
21808 | 0x0 }, /* BGEIUC */ | |
21809 | { branch_instruction , 0 , 0 , 32, | |
21810 | 0xfc1c0000, 0xc8100000, &NMD::BNEIC , 0, | |
21811 | 0x0 }, /* BNEIC */ | |
21812 | { branch_instruction , 0 , 0 , 32, | |
21813 | 0xfc1c0000, 0xc8140000, &NMD::BBNEZC , 0, | |
21814 | XMMS_ }, /* BBNEZC */ | |
21815 | { branch_instruction , 0 , 0 , 32, | |
21816 | 0xfc1c0000, 0xc8180000, &NMD::BLTIC , 0, | |
21817 | 0x0 }, /* BLTIC */ | |
21818 | { branch_instruction , 0 , 0 , 32, | |
21819 | 0xfc1c0000, 0xc81c0000, &NMD::BLTIUC , 0, | |
21820 | 0x0 }, /* BLTIUC */ | |
21821 | }; | |
21822 | ||
21823 | ||
21824 | NMD::Pool NMD::P32[32] = { | |
21825 | { pool , P_ADDIU , 2 , 32, | |
21826 | 0xfc000000, 0x00000000, 0 , 0, | |
21827 | 0x0 }, /* P.ADDIU */ | |
21828 | { pool , P32A , 8 , 32, | |
21829 | 0xfc000000, 0x20000000, 0 , 0, | |
21830 | 0x0 }, /* P32A */ | |
21831 | { pool , P_GP_W , 4 , 32, | |
21832 | 0xfc000000, 0x40000000, 0 , 0, | |
21833 | 0x0 }, /* P.GP.W */ | |
21834 | { pool , POOL48I , 32 , 48, | |
21835 | 0xfc0000000000ull, 0x600000000000ull, 0 , 0, | |
21836 | 0x0 }, /* POOL48I */ | |
21837 | { pool , P_U12 , 16 , 32, | |
21838 | 0xfc000000, 0x80000000, 0 , 0, | |
21839 | 0x0 }, /* P.U12 */ | |
21840 | { pool , POOL32F , 8 , 32, | |
21841 | 0xfc000000, 0xa0000000, 0 , 0, | |
21842 | CP1_ }, /* POOL32F */ | |
21843 | { pool , POOL32S , 8 , 32, | |
21844 | 0xfc000000, 0xc0000000, 0 , 0, | |
21845 | 0x0 }, /* POOL32S */ | |
21846 | { pool , P_LUI , 2 , 32, | |
21847 | 0xfc000000, 0xe0000000, 0 , 0, | |
21848 | 0x0 }, /* P.LUI */ | |
21849 | { instruction , 0 , 0 , 32, | |
21850 | 0xfc000000, 0x04000000, &NMD::ADDIUPC_32_ , 0, | |
21851 | 0x0 }, /* ADDIUPC[32] */ | |
21852 | { reserved_block , 0 , 0 , 32, | |
21853 | 0xfc000000, 0x24000000, 0 , 0, | |
21854 | 0x0 }, /* P32~*(5) */ | |
21855 | { pool , P_GP_BH , 8 , 32, | |
21856 | 0xfc000000, 0x44000000, 0 , 0, | |
21857 | 0x0 }, /* P.GP.BH */ | |
21858 | { reserved_block , 0 , 0 , 32, | |
21859 | 0xfc000000, 0x64000000, 0 , 0, | |
21860 | 0x0 }, /* P32~*(13) */ | |
21861 | { pool , P_LS_U12 , 16 , 32, | |
21862 | 0xfc000000, 0x84000000, 0 , 0, | |
21863 | 0x0 }, /* P.LS.U12 */ | |
21864 | { pool , P_LS_S9 , 8 , 32, | |
21865 | 0xfc000000, 0xa4000000, 0 , 0, | |
21866 | 0x0 }, /* P.LS.S9 */ | |
21867 | { reserved_block , 0 , 0 , 32, | |
21868 | 0xfc000000, 0xc4000000, 0 , 0, | |
21869 | 0x0 }, /* P32~*(25) */ | |
21870 | { reserved_block , 0 , 0 , 32, | |
21871 | 0xfc000000, 0xe4000000, 0 , 0, | |
21872 | 0x0 }, /* P32~*(29) */ | |
21873 | { call_instruction , 0 , 0 , 32, | |
21874 | 0xfc000000, 0x08000000, &NMD::MOVE_BALC , 0, | |
21875 | XMMS_ }, /* MOVE.BALC */ | |
21876 | { pool , P_BAL , 2 , 32, | |
21877 | 0xfc000000, 0x28000000, 0 , 0, | |
21878 | 0x0 }, /* P.BAL */ | |
21879 | { pool , P_J , 16 , 32, | |
21880 | 0xfc000000, 0x48000000, 0 , 0, | |
21881 | 0x0 }, /* P.J */ | |
21882 | { reserved_block , 0 , 0 , 32, | |
21883 | 0xfc000000, 0x68000000, 0 , 0, | |
21884 | 0x0 }, /* P32~*(14) */ | |
21885 | { pool , P_BR1 , 4 , 32, | |
21886 | 0xfc000000, 0x88000000, 0 , 0, | |
21887 | 0x0 }, /* P.BR1 */ | |
21888 | { pool , P_BR2 , 4 , 32, | |
21889 | 0xfc000000, 0xa8000000, 0 , 0, | |
21890 | 0x0 }, /* P.BR2 */ | |
21891 | { pool , P_BRI , 8 , 32, | |
21892 | 0xfc000000, 0xc8000000, 0 , 0, | |
21893 | 0x0 }, /* P.BRI */ | |
21894 | { reserved_block , 0 , 0 , 32, | |
21895 | 0xfc000000, 0xe8000000, 0 , 0, | |
21896 | 0x0 }, /* P32~*(30) */ | |
21897 | { reserved_block , 0 , 0 , 32, | |
21898 | 0xfc000000, 0x0c000000, 0 , 0, | |
21899 | 0x0 }, /* P32~*(3) */ | |
21900 | { reserved_block , 0 , 0 , 32, | |
21901 | 0xfc000000, 0x2c000000, 0 , 0, | |
21902 | 0x0 }, /* P32~*(7) */ | |
21903 | { reserved_block , 0 , 0 , 32, | |
21904 | 0xfc000000, 0x4c000000, 0 , 0, | |
21905 | 0x0 }, /* P32~*(11) */ | |
21906 | { reserved_block , 0 , 0 , 32, | |
21907 | 0xfc000000, 0x6c000000, 0 , 0, | |
21908 | 0x0 }, /* P32~*(15) */ | |
21909 | { reserved_block , 0 , 0 , 32, | |
21910 | 0xfc000000, 0x8c000000, 0 , 0, | |
21911 | 0x0 }, /* P32~*(19) */ | |
21912 | { reserved_block , 0 , 0 , 32, | |
21913 | 0xfc000000, 0xac000000, 0 , 0, | |
21914 | 0x0 }, /* P32~*(23) */ | |
21915 | { reserved_block , 0 , 0 , 32, | |
21916 | 0xfc000000, 0xcc000000, 0 , 0, | |
21917 | 0x0 }, /* P32~*(27) */ | |
21918 | { reserved_block , 0 , 0 , 32, | |
21919 | 0xfc000000, 0xec000000, 0 , 0, | |
21920 | 0x0 }, /* P32~*(31) */ | |
21921 | }; | |
21922 | ||
21923 | ||
21924 | NMD::Pool NMD::P16_SYSCALL[2] = { | |
21925 | { instruction , 0 , 0 , 16, | |
21926 | 0xfffc , 0x1008 , &NMD::SYSCALL_16_ , 0, | |
21927 | 0x0 }, /* SYSCALL[16] */ | |
21928 | { instruction , 0 , 0 , 16, | |
21929 | 0xfffc , 0x100c , &NMD::HYPCALL_16_ , 0, | |
21930 | CP0_ | VZ_ }, /* HYPCALL[16] */ | |
21931 | }; | |
21932 | ||
21933 | ||
21934 | NMD::Pool NMD::P16_RI[4] = { | |
21935 | { reserved_block , 0 , 0 , 16, | |
21936 | 0xfff8 , 0x1000 , 0 , 0, | |
21937 | 0x0 }, /* P16.RI~*(0) */ | |
21938 | { pool , P16_SYSCALL , 2 , 16, | |
21939 | 0xfff8 , 0x1008 , 0 , 0, | |
21940 | 0x0 }, /* P16.SYSCALL */ | |
21941 | { instruction , 0 , 0 , 16, | |
21942 | 0xfff8 , 0x1010 , &NMD::BREAK_16_ , 0, | |
21943 | 0x0 }, /* BREAK[16] */ | |
21944 | { instruction , 0 , 0 , 16, | |
21945 | 0xfff8 , 0x1018 , &NMD::SDBBP_16_ , 0, | |
21946 | EJTAG_ }, /* SDBBP[16] */ | |
21947 | }; | |
21948 | ||
21949 | ||
21950 | NMD::Pool NMD::P16_MV[2] = { | |
21951 | { pool , P16_RI , 4 , 16, | |
21952 | 0xffe0 , 0x1000 , 0 , 0, | |
21953 | 0x0 }, /* P16.RI */ | |
21954 | { instruction , 0 , 0 , 16, | |
21955 | 0xfc00 , 0x1000 , &NMD::MOVE , &NMD::MOVE_cond , | |
21956 | 0x0 }, /* MOVE */ | |
21957 | }; | |
21958 | ||
21959 | ||
21960 | NMD::Pool NMD::P16_SHIFT[2] = { | |
21961 | { instruction , 0 , 0 , 16, | |
21962 | 0xfc08 , 0x3000 , &NMD::SLL_16_ , 0, | |
21963 | 0x0 }, /* SLL[16] */ | |
21964 | { instruction , 0 , 0 , 16, | |
21965 | 0xfc08 , 0x3008 , &NMD::SRL_16_ , 0, | |
21966 | 0x0 }, /* SRL[16] */ | |
21967 | }; | |
21968 | ||
21969 | ||
21970 | NMD::Pool NMD::POOL16C_00[4] = { | |
21971 | { instruction , 0 , 0 , 16, | |
21972 | 0xfc0f , 0x5000 , &NMD::NOT_16_ , 0, | |
21973 | 0x0 }, /* NOT[16] */ | |
21974 | { instruction , 0 , 0 , 16, | |
21975 | 0xfc0f , 0x5004 , &NMD::XOR_16_ , 0, | |
21976 | 0x0 }, /* XOR[16] */ | |
21977 | { instruction , 0 , 0 , 16, | |
21978 | 0xfc0f , 0x5008 , &NMD::AND_16_ , 0, | |
21979 | 0x0 }, /* AND[16] */ | |
21980 | { instruction , 0 , 0 , 16, | |
21981 | 0xfc0f , 0x500c , &NMD::OR_16_ , 0, | |
21982 | 0x0 }, /* OR[16] */ | |
21983 | }; | |
21984 | ||
21985 | ||
21986 | NMD::Pool NMD::POOL16C_0[2] = { | |
21987 | { pool , POOL16C_00 , 4 , 16, | |
21988 | 0xfc03 , 0x5000 , 0 , 0, | |
21989 | 0x0 }, /* POOL16C_00 */ | |
21990 | { reserved_block , 0 , 0 , 16, | |
21991 | 0xfc03 , 0x5002 , 0 , 0, | |
21992 | 0x0 }, /* POOL16C_0~*(1) */ | |
21993 | }; | |
21994 | ||
21995 | ||
21996 | NMD::Pool NMD::P16C[2] = { | |
21997 | { pool , POOL16C_0 , 2 , 16, | |
21998 | 0xfc01 , 0x5000 , 0 , 0, | |
21999 | 0x0 }, /* POOL16C_0 */ | |
22000 | { instruction , 0 , 0 , 16, | |
22001 | 0xfc01 , 0x5001 , &NMD::LWXS_16_ , 0, | |
22002 | 0x0 }, /* LWXS[16] */ | |
22003 | }; | |
22004 | ||
22005 | ||
22006 | NMD::Pool NMD::P16_A1[2] = { | |
22007 | { reserved_block , 0 , 0 , 16, | |
22008 | 0xfc40 , 0x7000 , 0 , 0, | |
22009 | 0x0 }, /* P16.A1~*(0) */ | |
22010 | { instruction , 0 , 0 , 16, | |
22011 | 0xfc40 , 0x7040 , &NMD::ADDIU_R1_SP_ , 0, | |
22012 | 0x0 }, /* ADDIU[R1.SP] */ | |
22013 | }; | |
22014 | ||
22015 | ||
22016 | NMD::Pool NMD::P_ADDIU_RS5_[2] = { | |
22017 | { instruction , 0 , 0 , 16, | |
22018 | 0xffe8 , 0x9008 , &NMD::NOP_16_ , 0, | |
22019 | 0x0 }, /* NOP[16] */ | |
22020 | { instruction , 0 , 0 , 16, | |
22021 | 0xfc08 , 0x9008 , &NMD::ADDIU_RS5_ , &NMD::ADDIU_RS5__cond , | |
22022 | 0x0 }, /* ADDIU[RS5] */ | |
22023 | }; | |
22024 | ||
22025 | ||
22026 | NMD::Pool NMD::P16_A2[2] = { | |
22027 | { instruction , 0 , 0 , 16, | |
22028 | 0xfc08 , 0x9000 , &NMD::ADDIU_R2_ , 0, | |
22029 | 0x0 }, /* ADDIU[R2] */ | |
22030 | { pool , P_ADDIU_RS5_ , 2 , 16, | |
22031 | 0xfc08 , 0x9008 , 0 , 0, | |
22032 | 0x0 }, /* P.ADDIU[RS5] */ | |
22033 | }; | |
22034 | ||
22035 | ||
22036 | NMD::Pool NMD::P16_ADDU[2] = { | |
22037 | { instruction , 0 , 0 , 16, | |
22038 | 0xfc01 , 0xb000 , &NMD::ADDU_16_ , 0, | |
22039 | 0x0 }, /* ADDU[16] */ | |
22040 | { instruction , 0 , 0 , 16, | |
22041 | 0xfc01 , 0xb001 , &NMD::SUBU_16_ , 0, | |
22042 | 0x0 }, /* SUBU[16] */ | |
22043 | }; | |
22044 | ||
22045 | ||
22046 | NMD::Pool NMD::P16_JRC[2] = { | |
22047 | { branch_instruction , 0 , 0 , 16, | |
22048 | 0xfc1f , 0xd800 , &NMD::JRC , 0, | |
22049 | 0x0 }, /* JRC */ | |
22050 | { call_instruction , 0 , 0 , 16, | |
22051 | 0xfc1f , 0xd810 , &NMD::JALRC_16_ , 0, | |
22052 | 0x0 }, /* JALRC[16] */ | |
22053 | }; | |
22054 | ||
22055 | ||
22056 | NMD::Pool NMD::P16_BR1[2] = { | |
22057 | { branch_instruction , 0 , 0 , 16, | |
22058 | 0xfc00 , 0xd800 , &NMD::BEQC_16_ , &NMD::BEQC_16__cond , | |
22059 | XMMS_ }, /* BEQC[16] */ | |
22060 | { branch_instruction , 0 , 0 , 16, | |
22061 | 0xfc00 , 0xd800 , &NMD::BNEC_16_ , &NMD::BNEC_16__cond , | |
22062 | XMMS_ }, /* BNEC[16] */ | |
22063 | }; | |
22064 | ||
22065 | ||
22066 | NMD::Pool NMD::P16_BR[2] = { | |
22067 | { pool , P16_JRC , 2 , 16, | |
22068 | 0xfc0f , 0xd800 , 0 , 0, | |
22069 | 0x0 }, /* P16.JRC */ | |
22070 | { pool , P16_BR1 , 2 , 16, | |
22071 | 0xfc00 , 0xd800 , 0 , &NMD::P16_BR1_cond , | |
22072 | 0x0 }, /* P16.BR1 */ | |
22073 | }; | |
22074 | ||
22075 | ||
22076 | NMD::Pool NMD::P16_SR[2] = { | |
22077 | { instruction , 0 , 0 , 16, | |
22078 | 0xfd00 , 0x1c00 , &NMD::SAVE_16_ , 0, | |
22079 | 0x0 }, /* SAVE[16] */ | |
22080 | { return_instruction , 0 , 0 , 16, | |
22081 | 0xfd00 , 0x1d00 , &NMD::RESTORE_JRC_16_ , 0, | |
22082 | 0x0 }, /* RESTORE.JRC[16] */ | |
22083 | }; | |
22084 | ||
22085 | ||
22086 | NMD::Pool NMD::P16_4X4[4] = { | |
22087 | { instruction , 0 , 0 , 16, | |
22088 | 0xfd08 , 0x3c00 , &NMD::ADDU_4X4_ , 0, | |
22089 | XMMS_ }, /* ADDU[4X4] */ | |
22090 | { instruction , 0 , 0 , 16, | |
22091 | 0xfd08 , 0x3c08 , &NMD::MUL_4X4_ , 0, | |
22092 | XMMS_ }, /* MUL[4X4] */ | |
22093 | { reserved_block , 0 , 0 , 16, | |
22094 | 0xfd08 , 0x3d00 , 0 , 0, | |
22095 | 0x0 }, /* P16.4X4~*(2) */ | |
22096 | { reserved_block , 0 , 0 , 16, | |
22097 | 0xfd08 , 0x3d08 , 0 , 0, | |
22098 | 0x0 }, /* P16.4X4~*(3) */ | |
22099 | }; | |
22100 | ||
22101 | ||
22102 | NMD::Pool NMD::P16_LB[4] = { | |
22103 | { instruction , 0 , 0 , 16, | |
22104 | 0xfc0c , 0x5c00 , &NMD::LB_16_ , 0, | |
22105 | 0x0 }, /* LB[16] */ | |
22106 | { instruction , 0 , 0 , 16, | |
22107 | 0xfc0c , 0x5c04 , &NMD::SB_16_ , 0, | |
22108 | 0x0 }, /* SB[16] */ | |
22109 | { instruction , 0 , 0 , 16, | |
22110 | 0xfc0c , 0x5c08 , &NMD::LBU_16_ , 0, | |
22111 | 0x0 }, /* LBU[16] */ | |
22112 | { reserved_block , 0 , 0 , 16, | |
22113 | 0xfc0c , 0x5c0c , 0 , 0, | |
22114 | 0x0 }, /* P16.LB~*(3) */ | |
22115 | }; | |
22116 | ||
22117 | ||
22118 | NMD::Pool NMD::P16_LH[4] = { | |
22119 | { instruction , 0 , 0 , 16, | |
22120 | 0xfc09 , 0x7c00 , &NMD::LH_16_ , 0, | |
22121 | 0x0 }, /* LH[16] */ | |
22122 | { instruction , 0 , 0 , 16, | |
22123 | 0xfc09 , 0x7c01 , &NMD::SH_16_ , 0, | |
22124 | 0x0 }, /* SH[16] */ | |
22125 | { instruction , 0 , 0 , 16, | |
22126 | 0xfc09 , 0x7c08 , &NMD::LHU_16_ , 0, | |
22127 | 0x0 }, /* LHU[16] */ | |
22128 | { reserved_block , 0 , 0 , 16, | |
22129 | 0xfc09 , 0x7c09 , 0 , 0, | |
22130 | 0x0 }, /* P16.LH~*(3) */ | |
22131 | }; | |
22132 | ||
22133 | ||
22134 | NMD::Pool NMD::P16[32] = { | |
22135 | { pool , P16_MV , 2 , 16, | |
22136 | 0xfc00 , 0x1000 , 0 , 0, | |
22137 | 0x0 }, /* P16.MV */ | |
22138 | { pool , P16_SHIFT , 2 , 16, | |
22139 | 0xfc00 , 0x3000 , 0 , 0, | |
22140 | 0x0 }, /* P16.SHIFT */ | |
22141 | { pool , P16C , 2 , 16, | |
22142 | 0xfc00 , 0x5000 , 0 , 0, | |
22143 | 0x0 }, /* P16C */ | |
22144 | { pool , P16_A1 , 2 , 16, | |
22145 | 0xfc00 , 0x7000 , 0 , 0, | |
22146 | 0x0 }, /* P16.A1 */ | |
22147 | { pool , P16_A2 , 2 , 16, | |
22148 | 0xfc00 , 0x9000 , 0 , 0, | |
22149 | 0x0 }, /* P16.A2 */ | |
22150 | { pool , P16_ADDU , 2 , 16, | |
22151 | 0xfc00 , 0xb000 , 0 , 0, | |
22152 | 0x0 }, /* P16.ADDU */ | |
22153 | { instruction , 0 , 0 , 16, | |
22154 | 0xfc00 , 0xd000 , &NMD::LI_16_ , 0, | |
22155 | 0x0 }, /* LI[16] */ | |
22156 | { instruction , 0 , 0 , 16, | |
22157 | 0xfc00 , 0xf000 , &NMD::ANDI_16_ , 0, | |
22158 | 0x0 }, /* ANDI[16] */ | |
22159 | { instruction , 0 , 0 , 16, | |
22160 | 0xfc00 , 0x1400 , &NMD::LW_16_ , 0, | |
22161 | 0x0 }, /* LW[16] */ | |
22162 | { instruction , 0 , 0 , 16, | |
22163 | 0xfc00 , 0x3400 , &NMD::LW_SP_ , 0, | |
22164 | 0x0 }, /* LW[SP] */ | |
22165 | { instruction , 0 , 0 , 16, | |
22166 | 0xfc00 , 0x5400 , &NMD::LW_GP16_ , 0, | |
22167 | 0x0 }, /* LW[GP16] */ | |
22168 | { instruction , 0 , 0 , 16, | |
22169 | 0xfc00 , 0x7400 , &NMD::LW_4X4_ , 0, | |
22170 | XMMS_ }, /* LW[4X4] */ | |
22171 | { instruction , 0 , 0 , 16, | |
22172 | 0xfc00 , 0x9400 , &NMD::SW_16_ , 0, | |
22173 | 0x0 }, /* SW[16] */ | |
22174 | { instruction , 0 , 0 , 16, | |
22175 | 0xfc00 , 0xb400 , &NMD::SW_SP_ , 0, | |
22176 | 0x0 }, /* SW[SP] */ | |
22177 | { instruction , 0 , 0 , 16, | |
22178 | 0xfc00 , 0xd400 , &NMD::SW_GP16_ , 0, | |
22179 | 0x0 }, /* SW[GP16] */ | |
22180 | { instruction , 0 , 0 , 16, | |
22181 | 0xfc00 , 0xf400 , &NMD::SW_4X4_ , 0, | |
22182 | XMMS_ }, /* SW[4X4] */ | |
22183 | { branch_instruction , 0 , 0 , 16, | |
22184 | 0xfc00 , 0x1800 , &NMD::BC_16_ , 0, | |
22185 | 0x0 }, /* BC[16] */ | |
22186 | { call_instruction , 0 , 0 , 16, | |
22187 | 0xfc00 , 0x3800 , &NMD::BALC_16_ , 0, | |
22188 | 0x0 }, /* BALC[16] */ | |
22189 | { reserved_block , 0 , 0 , 16, | |
22190 | 0xfc00 , 0x5800 , 0 , 0, | |
22191 | 0x0 }, /* P16~*(10) */ | |
22192 | { reserved_block , 0 , 0 , 16, | |
22193 | 0xfc00 , 0x7800 , 0 , 0, | |
22194 | 0x0 }, /* P16~*(14) */ | |
22195 | { branch_instruction , 0 , 0 , 16, | |
22196 | 0xfc00 , 0x9800 , &NMD::BEQZC_16_ , 0, | |
22197 | 0x0 }, /* BEQZC[16] */ | |
22198 | { branch_instruction , 0 , 0 , 16, | |
22199 | 0xfc00 , 0xb800 , &NMD::BNEZC_16_ , 0, | |
22200 | 0x0 }, /* BNEZC[16] */ | |
22201 | { pool , P16_BR , 2 , 16, | |
22202 | 0xfc00 , 0xd800 , 0 , 0, | |
22203 | 0x0 }, /* P16.BR */ | |
22204 | { reserved_block , 0 , 0 , 16, | |
22205 | 0xfc00 , 0xf800 , 0 , 0, | |
22206 | 0x0 }, /* P16~*(30) */ | |
22207 | { pool , P16_SR , 2 , 16, | |
22208 | 0xfc00 , 0x1c00 , 0 , 0, | |
22209 | 0x0 }, /* P16.SR */ | |
22210 | { pool , P16_4X4 , 4 , 16, | |
22211 | 0xfc00 , 0x3c00 , 0 , 0, | |
22212 | 0x0 }, /* P16.4X4 */ | |
22213 | { pool , P16_LB , 4 , 16, | |
22214 | 0xfc00 , 0x5c00 , 0 , 0, | |
22215 | 0x0 }, /* P16.LB */ | |
22216 | { pool , P16_LH , 4 , 16, | |
22217 | 0xfc00 , 0x7c00 , 0 , 0, | |
22218 | 0x0 }, /* P16.LH */ | |
22219 | { reserved_block , 0 , 0 , 16, | |
22220 | 0xfc00 , 0x9c00 , 0 , 0, | |
22221 | 0x0 }, /* P16~*(19) */ | |
22222 | { instruction , 0 , 0 , 16, | |
22223 | 0xfc00 , 0xbc00 , &NMD::MOVEP , 0, | |
22224 | XMMS_ }, /* MOVEP */ | |
22225 | { reserved_block , 0 , 0 , 16, | |
22226 | 0xfc00 , 0xdc00 , 0 , 0, | |
22227 | 0x0 }, /* P16~*(27) */ | |
22228 | { instruction , 0 , 0 , 16, | |
22229 | 0xfc00 , 0xfc00 , &NMD::MOVEP_REV_ , 0, | |
22230 | XMMS_ }, /* MOVEP[REV] */ | |
22231 | }; | |
22232 | ||
22233 | ||
22234 | NMD::Pool NMD::MAJOR[2] = { | |
22235 | { pool , P32 , 32 , 32, | |
22236 | 0x10000000, 0x00000000, 0 , 0, | |
22237 | 0x0 }, /* P32 */ | |
22238 | { pool , P16 , 32 , 16, | |
22239 | 0x1000 , 0x1000 , 0 , 0, | |
22240 | 0x0 }, /* P16 */ | |
22241 | }; |