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