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