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