[sim] fix writeback after ipi clearing
[riscv-isa-sim.git] / riscv / dispatch_8.cc
1 #include "insn_includes.h"
2
3 reg_t processor_t::opcode_func_008(insn_t insn, reg_t pc)
4 {
5 reg_t npc = pc + insn_length(0x00000008);
6 #include "insns/c_swsp.h"
7 return npc;
8 }
9
10 reg_t processor_t::opcode_func_012(insn_t insn, reg_t pc)
11 {
12 if((insn.bits & 0x801f) == 0x12)
13 {
14 reg_t npc = pc + insn_length(0x00000012);
15 #include "insns/c_lw0.h"
16 return npc;
17 }
18 if((insn.bits & 0x801f) == 0x8012)
19 {
20 reg_t npc = pc + insn_length(0x00008012);
21 #include "insns/c_ld0.h"
22 return npc;
23 }
24 throw trap_illegal_instruction;
25 }
26
27 reg_t processor_t::opcode_func_01c(insn_t insn, reg_t pc)
28 {
29 reg_t npc = pc + insn_length(0x0000001c);
30 #include "insns/c_add3.h"
31 return npc;
32 }
33
34 reg_t processor_t::opcode_func_026(insn_t insn, reg_t pc)
35 {
36 reg_t npc = pc + insn_length(0x00000006);
37 #include "insns/c_sdsp.h"
38 return npc;
39 }
40
41 reg_t processor_t::opcode_func_030(insn_t insn, reg_t pc)
42 {
43 reg_t npc = pc + insn_length(0x00000010);
44 #include "insns/c_beq.h"
45 return npc;
46 }
47
48 reg_t processor_t::opcode_func_03a(insn_t insn, reg_t pc)
49 {
50 if((insn.bits & 0x801f) == 0x801a)
51 {
52 reg_t npc = pc + insn_length(0x0000801a);
53 #include "insns/c_sub.h"
54 return npc;
55 }
56 if((insn.bits & 0x801f) == 0x1a)
57 {
58 reg_t npc = pc + insn_length(0x0000001a);
59 #include "insns/c_add.h"
60 return npc;
61 }
62 throw trap_illegal_instruction;
63 }
64
65 reg_t processor_t::opcode_func_044(insn_t insn, reg_t pc)
66 {
67 reg_t npc = pc + insn_length(0x00000004);
68 #include "insns/c_ldsp.h"
69 return npc;
70 }
71
72 reg_t processor_t::opcode_func_04e(insn_t insn, reg_t pc)
73 {
74 throw trap_illegal_instruction;
75 }
76
77 reg_t processor_t::opcode_func_058(insn_t insn, reg_t pc)
78 {
79 reg_t npc = pc + insn_length(0x00000018);
80 #include "insns/c_fsd.h"
81 return npc;
82 }
83
84 reg_t processor_t::opcode_func_062(insn_t insn, reg_t pc)
85 {
86 if((insn.bits & 0x801f) == 0x2)
87 {
88 reg_t npc = pc + insn_length(0x00000002);
89 #include "insns/c_move.h"
90 return npc;
91 }
92 if((insn.bits & 0x801f) == 0x8002)
93 {
94 reg_t npc = pc + insn_length(0x00008002);
95 #include "insns/c_j.h"
96 return npc;
97 }
98 throw trap_illegal_instruction;
99 }
100
101 reg_t processor_t::opcode_func_06c(insn_t insn, reg_t pc)
102 {
103 reg_t npc = pc + insn_length(0x0000000c);
104 #include "insns/c_sd.h"
105 return npc;
106 }
107
108 reg_t processor_t::opcode_func_076(insn_t insn, reg_t pc)
109 {
110 reg_t npc = pc + insn_length(0x00000016);
111 #include "insns/c_fsw.h"
112 return npc;
113 }
114
115 reg_t processor_t::opcode_func_080(insn_t insn, reg_t pc)
116 {
117 reg_t npc = pc + insn_length(0x00000000);
118 #include "insns/c_li.h"
119 return npc;
120 }
121
122 reg_t processor_t::opcode_func_08a(insn_t insn, reg_t pc)
123 {
124 reg_t npc = pc + insn_length(0x0000000a);
125 #include "insns/c_lw.h"
126 return npc;
127 }
128
129 reg_t processor_t::opcode_func_094(insn_t insn, reg_t pc)
130 {
131 reg_t npc = pc + insn_length(0x00000014);
132 #include "insns/c_flw.h"
133 return npc;
134 }
135
136 reg_t processor_t::opcode_func_09e(insn_t insn, reg_t pc)
137 {
138 throw trap_illegal_instruction;
139 }
140
141 reg_t processor_t::opcode_func_0a8(insn_t insn, reg_t pc)
142 {
143 reg_t npc = pc + insn_length(0x00000008);
144 #include "insns/c_swsp.h"
145 return npc;
146 }
147
148 reg_t processor_t::opcode_func_0b2(insn_t insn, reg_t pc)
149 {
150 if((insn.bits & 0x801f) == 0x12)
151 {
152 reg_t npc = pc + insn_length(0x00000012);
153 #include "insns/c_lw0.h"
154 return npc;
155 }
156 if((insn.bits & 0x801f) == 0x8012)
157 {
158 reg_t npc = pc + insn_length(0x00008012);
159 #include "insns/c_ld0.h"
160 return npc;
161 }
162 throw trap_illegal_instruction;
163 }
164
165 reg_t processor_t::opcode_func_0bc(insn_t insn, reg_t pc)
166 {
167 reg_t npc = pc + insn_length(0x0000001c);
168 #include "insns/c_add3.h"
169 return npc;
170 }
171
172 reg_t processor_t::opcode_func_0c6(insn_t insn, reg_t pc)
173 {
174 reg_t npc = pc + insn_length(0x00000006);
175 #include "insns/c_sdsp.h"
176 return npc;
177 }
178
179 reg_t processor_t::opcode_func_0d0(insn_t insn, reg_t pc)
180 {
181 reg_t npc = pc + insn_length(0x00000010);
182 #include "insns/c_beq.h"
183 return npc;
184 }
185
186 reg_t processor_t::opcode_func_0da(insn_t insn, reg_t pc)
187 {
188 if((insn.bits & 0x801f) == 0x801a)
189 {
190 reg_t npc = pc + insn_length(0x0000801a);
191 #include "insns/c_sub.h"
192 return npc;
193 }
194 if((insn.bits & 0x801f) == 0x1a)
195 {
196 reg_t npc = pc + insn_length(0x0000001a);
197 #include "insns/c_add.h"
198 return npc;
199 }
200 throw trap_illegal_instruction;
201 }
202
203 reg_t processor_t::opcode_func_0e4(insn_t insn, reg_t pc)
204 {
205 reg_t npc = pc + insn_length(0x00000004);
206 #include "insns/c_ldsp.h"
207 return npc;
208 }
209
210 reg_t processor_t::opcode_func_0ee(insn_t insn, reg_t pc)
211 {
212 throw trap_illegal_instruction;
213 }
214
215 reg_t processor_t::opcode_func_0f8(insn_t insn, reg_t pc)
216 {
217 reg_t npc = pc + insn_length(0x00000018);
218 #include "insns/c_fsd.h"
219 return npc;
220 }
221
222 reg_t processor_t::opcode_func_102(insn_t insn, reg_t pc)
223 {
224 if((insn.bits & 0x801f) == 0x2)
225 {
226 reg_t npc = pc + insn_length(0x00000002);
227 #include "insns/c_move.h"
228 return npc;
229 }
230 if((insn.bits & 0x801f) == 0x8002)
231 {
232 reg_t npc = pc + insn_length(0x00008002);
233 #include "insns/c_j.h"
234 return npc;
235 }
236 throw trap_illegal_instruction;
237 }
238
239 reg_t processor_t::opcode_func_10c(insn_t insn, reg_t pc)
240 {
241 reg_t npc = pc + insn_length(0x0000000c);
242 #include "insns/c_sd.h"
243 return npc;
244 }
245
246 reg_t processor_t::opcode_func_116(insn_t insn, reg_t pc)
247 {
248 reg_t npc = pc + insn_length(0x00000016);
249 #include "insns/c_fsw.h"
250 return npc;
251 }
252
253 reg_t processor_t::opcode_func_120(insn_t insn, reg_t pc)
254 {
255 reg_t npc = pc + insn_length(0x00000000);
256 #include "insns/c_li.h"
257 return npc;
258 }
259
260 reg_t processor_t::opcode_func_12a(insn_t insn, reg_t pc)
261 {
262 reg_t npc = pc + insn_length(0x0000000a);
263 #include "insns/c_lw.h"
264 return npc;
265 }
266
267 reg_t processor_t::opcode_func_134(insn_t insn, reg_t pc)
268 {
269 reg_t npc = pc + insn_length(0x00000014);
270 #include "insns/c_flw.h"
271 return npc;
272 }
273
274 reg_t processor_t::opcode_func_13e(insn_t insn, reg_t pc)
275 {
276 throw trap_illegal_instruction;
277 }
278
279 reg_t processor_t::opcode_func_148(insn_t insn, reg_t pc)
280 {
281 reg_t npc = pc + insn_length(0x00000008);
282 #include "insns/c_swsp.h"
283 return npc;
284 }
285
286 reg_t processor_t::opcode_func_152(insn_t insn, reg_t pc)
287 {
288 if((insn.bits & 0x801f) == 0x12)
289 {
290 reg_t npc = pc + insn_length(0x00000012);
291 #include "insns/c_lw0.h"
292 return npc;
293 }
294 if((insn.bits & 0x801f) == 0x8012)
295 {
296 reg_t npc = pc + insn_length(0x00008012);
297 #include "insns/c_ld0.h"
298 return npc;
299 }
300 throw trap_illegal_instruction;
301 }
302
303 reg_t processor_t::opcode_func_15c(insn_t insn, reg_t pc)
304 {
305 reg_t npc = pc + insn_length(0x0000011c);
306 #include "insns/c_sub3.h"
307 return npc;
308 }
309
310 reg_t processor_t::opcode_func_166(insn_t insn, reg_t pc)
311 {
312 reg_t npc = pc + insn_length(0x00000006);
313 #include "insns/c_sdsp.h"
314 return npc;
315 }
316
317 reg_t processor_t::opcode_func_170(insn_t insn, reg_t pc)
318 {
319 reg_t npc = pc + insn_length(0x00000010);
320 #include "insns/c_beq.h"
321 return npc;
322 }
323
324 reg_t processor_t::opcode_func_17a(insn_t insn, reg_t pc)
325 {
326 if((insn.bits & 0x801f) == 0x801a)
327 {
328 reg_t npc = pc + insn_length(0x0000801a);
329 #include "insns/c_sub.h"
330 return npc;
331 }
332 if((insn.bits & 0x801f) == 0x1a)
333 {
334 reg_t npc = pc + insn_length(0x0000001a);
335 #include "insns/c_add.h"
336 return npc;
337 }
338 throw trap_illegal_instruction;
339 }
340
341 reg_t processor_t::opcode_func_184(insn_t insn, reg_t pc)
342 {
343 reg_t npc = pc + insn_length(0x00000004);
344 #include "insns/c_ldsp.h"
345 return npc;
346 }
347
348 reg_t processor_t::opcode_func_18e(insn_t insn, reg_t pc)
349 {
350 throw trap_illegal_instruction;
351 }
352
353 reg_t processor_t::opcode_func_198(insn_t insn, reg_t pc)
354 {
355 reg_t npc = pc + insn_length(0x00000018);
356 #include "insns/c_fsd.h"
357 return npc;
358 }
359
360 reg_t processor_t::opcode_func_1a2(insn_t insn, reg_t pc)
361 {
362 if((insn.bits & 0x801f) == 0x2)
363 {
364 reg_t npc = pc + insn_length(0x00000002);
365 #include "insns/c_move.h"
366 return npc;
367 }
368 if((insn.bits & 0x801f) == 0x8002)
369 {
370 reg_t npc = pc + insn_length(0x00008002);
371 #include "insns/c_j.h"
372 return npc;
373 }
374 throw trap_illegal_instruction;
375 }
376
377 reg_t processor_t::opcode_func_1ac(insn_t insn, reg_t pc)
378 {
379 reg_t npc = pc + insn_length(0x0000000c);
380 #include "insns/c_sd.h"
381 return npc;
382 }
383
384 reg_t processor_t::opcode_func_1b6(insn_t insn, reg_t pc)
385 {
386 reg_t npc = pc + insn_length(0x00000016);
387 #include "insns/c_fsw.h"
388 return npc;
389 }
390
391 reg_t processor_t::opcode_func_1c0(insn_t insn, reg_t pc)
392 {
393 reg_t npc = pc + insn_length(0x00000000);
394 #include "insns/c_li.h"
395 return npc;
396 }
397
398 reg_t processor_t::opcode_func_1ca(insn_t insn, reg_t pc)
399 {
400 reg_t npc = pc + insn_length(0x0000000a);
401 #include "insns/c_lw.h"
402 return npc;
403 }
404
405 reg_t processor_t::opcode_func_1d4(insn_t insn, reg_t pc)
406 {
407 reg_t npc = pc + insn_length(0x00000014);
408 #include "insns/c_flw.h"
409 return npc;
410 }
411
412 reg_t processor_t::opcode_func_1de(insn_t insn, reg_t pc)
413 {
414 throw trap_illegal_instruction;
415 }
416
417 reg_t processor_t::opcode_func_1e8(insn_t insn, reg_t pc)
418 {
419 reg_t npc = pc + insn_length(0x00000008);
420 #include "insns/c_swsp.h"
421 return npc;
422 }
423
424 reg_t processor_t::opcode_func_1f2(insn_t insn, reg_t pc)
425 {
426 if((insn.bits & 0x801f) == 0x12)
427 {
428 reg_t npc = pc + insn_length(0x00000012);
429 #include "insns/c_lw0.h"
430 return npc;
431 }
432 if((insn.bits & 0x801f) == 0x8012)
433 {
434 reg_t npc = pc + insn_length(0x00008012);
435 #include "insns/c_ld0.h"
436 return npc;
437 }
438 throw trap_illegal_instruction;
439 }
440
441 reg_t processor_t::opcode_func_1fc(insn_t insn, reg_t pc)
442 {
443 reg_t npc = pc + insn_length(0x0000011c);
444 #include "insns/c_sub3.h"
445 return npc;
446 }
447
448 reg_t processor_t::opcode_func_206(insn_t insn, reg_t pc)
449 {
450 reg_t npc = pc + insn_length(0x00000006);
451 #include "insns/c_sdsp.h"
452 return npc;
453 }
454
455 reg_t processor_t::opcode_func_210(insn_t insn, reg_t pc)
456 {
457 reg_t npc = pc + insn_length(0x00000010);
458 #include "insns/c_beq.h"
459 return npc;
460 }
461
462 reg_t processor_t::opcode_func_21a(insn_t insn, reg_t pc)
463 {
464 if((insn.bits & 0x801f) == 0x801a)
465 {
466 reg_t npc = pc + insn_length(0x0000801a);
467 #include "insns/c_sub.h"
468 return npc;
469 }
470 if((insn.bits & 0x801f) == 0x1a)
471 {
472 reg_t npc = pc + insn_length(0x0000001a);
473 #include "insns/c_add.h"
474 return npc;
475 }
476 throw trap_illegal_instruction;
477 }
478
479 reg_t processor_t::opcode_func_224(insn_t insn, reg_t pc)
480 {
481 reg_t npc = pc + insn_length(0x00000004);
482 #include "insns/c_ldsp.h"
483 return npc;
484 }
485
486 reg_t processor_t::opcode_func_22e(insn_t insn, reg_t pc)
487 {
488 throw trap_illegal_instruction;
489 }
490
491 reg_t processor_t::opcode_func_238(insn_t insn, reg_t pc)
492 {
493 reg_t npc = pc + insn_length(0x00000018);
494 #include "insns/c_fsd.h"
495 return npc;
496 }
497
498 reg_t processor_t::opcode_func_242(insn_t insn, reg_t pc)
499 {
500 if((insn.bits & 0x801f) == 0x2)
501 {
502 reg_t npc = pc + insn_length(0x00000002);
503 #include "insns/c_move.h"
504 return npc;
505 }
506 if((insn.bits & 0x801f) == 0x8002)
507 {
508 reg_t npc = pc + insn_length(0x00008002);
509 #include "insns/c_j.h"
510 return npc;
511 }
512 throw trap_illegal_instruction;
513 }
514
515 reg_t processor_t::opcode_func_24c(insn_t insn, reg_t pc)
516 {
517 reg_t npc = pc + insn_length(0x0000000c);
518 #include "insns/c_sd.h"
519 return npc;
520 }
521
522 reg_t processor_t::opcode_func_256(insn_t insn, reg_t pc)
523 {
524 reg_t npc = pc + insn_length(0x00000016);
525 #include "insns/c_fsw.h"
526 return npc;
527 }
528
529 reg_t processor_t::opcode_func_260(insn_t insn, reg_t pc)
530 {
531 reg_t npc = pc + insn_length(0x00000000);
532 #include "insns/c_li.h"
533 return npc;
534 }
535
536 reg_t processor_t::opcode_func_26a(insn_t insn, reg_t pc)
537 {
538 reg_t npc = pc + insn_length(0x0000000a);
539 #include "insns/c_lw.h"
540 return npc;
541 }
542
543 reg_t processor_t::opcode_func_274(insn_t insn, reg_t pc)
544 {
545 reg_t npc = pc + insn_length(0x00000014);
546 #include "insns/c_flw.h"
547 return npc;
548 }
549
550 reg_t processor_t::opcode_func_27e(insn_t insn, reg_t pc)
551 {
552 throw trap_illegal_instruction;
553 }
554
555 reg_t processor_t::opcode_func_288(insn_t insn, reg_t pc)
556 {
557 reg_t npc = pc + insn_length(0x00000008);
558 #include "insns/c_swsp.h"
559 return npc;
560 }
561
562 reg_t processor_t::opcode_func_292(insn_t insn, reg_t pc)
563 {
564 if((insn.bits & 0x801f) == 0x12)
565 {
566 reg_t npc = pc + insn_length(0x00000012);
567 #include "insns/c_lw0.h"
568 return npc;
569 }
570 if((insn.bits & 0x801f) == 0x8012)
571 {
572 reg_t npc = pc + insn_length(0x00008012);
573 #include "insns/c_ld0.h"
574 return npc;
575 }
576 throw trap_illegal_instruction;
577 }
578
579 reg_t processor_t::opcode_func_29c(insn_t insn, reg_t pc)
580 {
581 reg_t npc = pc + insn_length(0x0000021c);
582 #include "insns/c_or3.h"
583 return npc;
584 }
585
586 reg_t processor_t::opcode_func_2a6(insn_t insn, reg_t pc)
587 {
588 reg_t npc = pc + insn_length(0x00000006);
589 #include "insns/c_sdsp.h"
590 return npc;
591 }
592
593 reg_t processor_t::opcode_func_2b0(insn_t insn, reg_t pc)
594 {
595 reg_t npc = pc + insn_length(0x00000010);
596 #include "insns/c_beq.h"
597 return npc;
598 }
599
600 reg_t processor_t::opcode_func_2ba(insn_t insn, reg_t pc)
601 {
602 if((insn.bits & 0x801f) == 0x801a)
603 {
604 reg_t npc = pc + insn_length(0x0000801a);
605 #include "insns/c_sub.h"
606 return npc;
607 }
608 if((insn.bits & 0x801f) == 0x1a)
609 {
610 reg_t npc = pc + insn_length(0x0000001a);
611 #include "insns/c_add.h"
612 return npc;
613 }
614 throw trap_illegal_instruction;
615 }
616
617 reg_t processor_t::opcode_func_2c4(insn_t insn, reg_t pc)
618 {
619 reg_t npc = pc + insn_length(0x00000004);
620 #include "insns/c_ldsp.h"
621 return npc;
622 }
623
624 reg_t processor_t::opcode_func_2ce(insn_t insn, reg_t pc)
625 {
626 throw trap_illegal_instruction;
627 }
628
629 reg_t processor_t::opcode_func_2d8(insn_t insn, reg_t pc)
630 {
631 reg_t npc = pc + insn_length(0x00000018);
632 #include "insns/c_fsd.h"
633 return npc;
634 }
635
636 reg_t processor_t::opcode_func_2e2(insn_t insn, reg_t pc)
637 {
638 if((insn.bits & 0x801f) == 0x2)
639 {
640 reg_t npc = pc + insn_length(0x00000002);
641 #include "insns/c_move.h"
642 return npc;
643 }
644 if((insn.bits & 0x801f) == 0x8002)
645 {
646 reg_t npc = pc + insn_length(0x00008002);
647 #include "insns/c_j.h"
648 return npc;
649 }
650 throw trap_illegal_instruction;
651 }
652
653 reg_t processor_t::opcode_func_2ec(insn_t insn, reg_t pc)
654 {
655 reg_t npc = pc + insn_length(0x0000000c);
656 #include "insns/c_sd.h"
657 return npc;
658 }
659
660 reg_t processor_t::opcode_func_2f6(insn_t insn, reg_t pc)
661 {
662 reg_t npc = pc + insn_length(0x00000016);
663 #include "insns/c_fsw.h"
664 return npc;
665 }
666
667 reg_t processor_t::opcode_func_300(insn_t insn, reg_t pc)
668 {
669 reg_t npc = pc + insn_length(0x00000000);
670 #include "insns/c_li.h"
671 return npc;
672 }
673
674 reg_t processor_t::opcode_func_30a(insn_t insn, reg_t pc)
675 {
676 reg_t npc = pc + insn_length(0x0000000a);
677 #include "insns/c_lw.h"
678 return npc;
679 }
680
681 reg_t processor_t::opcode_func_314(insn_t insn, reg_t pc)
682 {
683 reg_t npc = pc + insn_length(0x00000014);
684 #include "insns/c_flw.h"
685 return npc;
686 }
687
688 reg_t processor_t::opcode_func_31e(insn_t insn, reg_t pc)
689 {
690 throw trap_illegal_instruction;
691 }
692
693 reg_t processor_t::opcode_func_328(insn_t insn, reg_t pc)
694 {
695 reg_t npc = pc + insn_length(0x00000008);
696 #include "insns/c_swsp.h"
697 return npc;
698 }
699
700 reg_t processor_t::opcode_func_332(insn_t insn, reg_t pc)
701 {
702 if((insn.bits & 0x801f) == 0x12)
703 {
704 reg_t npc = pc + insn_length(0x00000012);
705 #include "insns/c_lw0.h"
706 return npc;
707 }
708 if((insn.bits & 0x801f) == 0x8012)
709 {
710 reg_t npc = pc + insn_length(0x00008012);
711 #include "insns/c_ld0.h"
712 return npc;
713 }
714 throw trap_illegal_instruction;
715 }
716
717 reg_t processor_t::opcode_func_33c(insn_t insn, reg_t pc)
718 {
719 reg_t npc = pc + insn_length(0x0000031c);
720 #include "insns/c_and3.h"
721 return npc;
722 }
723
724 reg_t processor_t::opcode_func_346(insn_t insn, reg_t pc)
725 {
726 reg_t npc = pc + insn_length(0x00000006);
727 #include "insns/c_sdsp.h"
728 return npc;
729 }
730
731 reg_t processor_t::opcode_func_350(insn_t insn, reg_t pc)
732 {
733 reg_t npc = pc + insn_length(0x00000010);
734 #include "insns/c_beq.h"
735 return npc;
736 }
737
738 reg_t processor_t::opcode_func_35a(insn_t insn, reg_t pc)
739 {
740 if((insn.bits & 0x801f) == 0x801a)
741 {
742 reg_t npc = pc + insn_length(0x0000801a);
743 #include "insns/c_sub.h"
744 return npc;
745 }
746 if((insn.bits & 0x801f) == 0x1a)
747 {
748 reg_t npc = pc + insn_length(0x0000001a);
749 #include "insns/c_add.h"
750 return npc;
751 }
752 throw trap_illegal_instruction;
753 }
754
755 reg_t processor_t::opcode_func_364(insn_t insn, reg_t pc)
756 {
757 reg_t npc = pc + insn_length(0x00000004);
758 #include "insns/c_ldsp.h"
759 return npc;
760 }
761
762 reg_t processor_t::opcode_func_36e(insn_t insn, reg_t pc)
763 {
764 throw trap_illegal_instruction;
765 }
766
767 reg_t processor_t::opcode_func_378(insn_t insn, reg_t pc)
768 {
769 reg_t npc = pc + insn_length(0x00000018);
770 #include "insns/c_fsd.h"
771 return npc;
772 }
773
774 reg_t processor_t::opcode_func_382(insn_t insn, reg_t pc)
775 {
776 if((insn.bits & 0x801f) == 0x2)
777 {
778 reg_t npc = pc + insn_length(0x00000002);
779 #include "insns/c_move.h"
780 return npc;
781 }
782 if((insn.bits & 0x801f) == 0x8002)
783 {
784 reg_t npc = pc + insn_length(0x00008002);
785 #include "insns/c_j.h"
786 return npc;
787 }
788 throw trap_illegal_instruction;
789 }
790
791 reg_t processor_t::opcode_func_38c(insn_t insn, reg_t pc)
792 {
793 reg_t npc = pc + insn_length(0x0000000c);
794 #include "insns/c_sd.h"
795 return npc;
796 }
797
798 reg_t processor_t::opcode_func_396(insn_t insn, reg_t pc)
799 {
800 reg_t npc = pc + insn_length(0x00000016);
801 #include "insns/c_fsw.h"
802 return npc;
803 }
804
805 reg_t processor_t::opcode_func_3a0(insn_t insn, reg_t pc)
806 {
807 reg_t npc = pc + insn_length(0x00000000);
808 #include "insns/c_li.h"
809 return npc;
810 }
811
812 reg_t processor_t::opcode_func_3aa(insn_t insn, reg_t pc)
813 {
814 reg_t npc = pc + insn_length(0x0000000a);
815 #include "insns/c_lw.h"
816 return npc;
817 }
818
819 reg_t processor_t::opcode_func_3b4(insn_t insn, reg_t pc)
820 {
821 reg_t npc = pc + insn_length(0x00000014);
822 #include "insns/c_flw.h"
823 return npc;
824 }
825
826 reg_t processor_t::opcode_func_3be(insn_t insn, reg_t pc)
827 {
828 throw trap_illegal_instruction;
829 }
830
831 reg_t processor_t::opcode_func_3c8(insn_t insn, reg_t pc)
832 {
833 reg_t npc = pc + insn_length(0x00000008);
834 #include "insns/c_swsp.h"
835 return npc;
836 }
837
838 reg_t processor_t::opcode_func_3d2(insn_t insn, reg_t pc)
839 {
840 if((insn.bits & 0x801f) == 0x12)
841 {
842 reg_t npc = pc + insn_length(0x00000012);
843 #include "insns/c_lw0.h"
844 return npc;
845 }
846 if((insn.bits & 0x801f) == 0x8012)
847 {
848 reg_t npc = pc + insn_length(0x00008012);
849 #include "insns/c_ld0.h"
850 return npc;
851 }
852 throw trap_illegal_instruction;
853 }
854
855 reg_t processor_t::opcode_func_3dc(insn_t insn, reg_t pc)
856 {
857 reg_t npc = pc + insn_length(0x0000031c);
858 #include "insns/c_and3.h"
859 return npc;
860 }
861
862 reg_t processor_t::opcode_func_3e6(insn_t insn, reg_t pc)
863 {
864 reg_t npc = pc + insn_length(0x00000006);
865 #include "insns/c_sdsp.h"
866 return npc;
867 }
868
869 reg_t processor_t::opcode_func_3f0(insn_t insn, reg_t pc)
870 {
871 reg_t npc = pc + insn_length(0x00000010);
872 #include "insns/c_beq.h"
873 return npc;
874 }
875
876 reg_t processor_t::opcode_func_3fa(insn_t insn, reg_t pc)
877 {
878 if((insn.bits & 0x801f) == 0x801a)
879 {
880 reg_t npc = pc + insn_length(0x0000801a);
881 #include "insns/c_sub.h"
882 return npc;
883 }
884 if((insn.bits & 0x801f) == 0x1a)
885 {
886 reg_t npc = pc + insn_length(0x0000001a);
887 #include "insns/c_add.h"
888 return npc;
889 }
890 throw trap_illegal_instruction;
891 }
892