37dc1469ca57fa5a8f41598a7431fef7c47f4e65
[riscv-isa-sim.git] / riscv / dispatch_5.cc
1 #include "insn_includes.h"
2
3 reg_t processor_t::opcode_func_005(insn_t insn, reg_t pc)
4 {
5 reg_t npc = pc + insn_length(0x00000005);
6 #include "insns/c_lwsp.h"
7 return npc;
8 }
9
10 reg_t processor_t::opcode_func_00f(insn_t insn, reg_t pc)
11 {
12 if((insn.bits & 0xfff) == 0x80f)
13 {
14 reg_t npc = pc + insn_length(0x0000080f);
15 #include "insns/vssegstb.h"
16 return npc;
17 }
18 if((insn.bits & 0x3fffff) == 0xf)
19 {
20 reg_t npc = pc + insn_length(0x0000000f);
21 #include "insns/vsb.h"
22 return npc;
23 }
24 if((insn.bits & 0x1ffff) == 0x100f)
25 {
26 reg_t npc = pc + insn_length(0x0000100f);
27 #include "insns/vsstb.h"
28 return npc;
29 }
30 if((insn.bits & 0x1ffff) == 0x200f)
31 {
32 reg_t npc = pc + insn_length(0x0000200f);
33 #include "insns/vssegb.h"
34 return npc;
35 }
36 throw trap_illegal_instruction;
37 }
38
39 reg_t processor_t::opcode_func_019(insn_t insn, reg_t pc)
40 {
41 if((insn.bits & 0x1c1f) == 0x19)
42 {
43 reg_t npc = pc + insn_length(0x00000019);
44 #include "insns/c_slli.h"
45 return npc;
46 }
47 if((insn.bits & 0x1c1f) == 0x819)
48 {
49 reg_t npc = pc + insn_length(0x00000819);
50 #include "insns/c_srli.h"
51 return npc;
52 }
53 if((insn.bits & 0x1c1f) == 0x1419)
54 {
55 reg_t npc = pc + insn_length(0x00001419);
56 #include "insns/c_srai32.h"
57 return npc;
58 }
59 if((insn.bits & 0x1c1f) == 0x1819)
60 {
61 reg_t npc = pc + insn_length(0x00001819);
62 #include "insns/c_slliw.h"
63 return npc;
64 }
65 if((insn.bits & 0x1c1f) == 0xc19)
66 {
67 reg_t npc = pc + insn_length(0x00000c19);
68 #include "insns/c_srli32.h"
69 return npc;
70 }
71 if((insn.bits & 0x1c1f) == 0x1019)
72 {
73 reg_t npc = pc + insn_length(0x00001019);
74 #include "insns/c_srai.h"
75 return npc;
76 }
77 if((insn.bits & 0x1c1f) == 0x419)
78 {
79 reg_t npc = pc + insn_length(0x00000419);
80 #include "insns/c_slli32.h"
81 return npc;
82 }
83 throw trap_illegal_instruction;
84 }
85
86 reg_t processor_t::opcode_func_023(insn_t insn, reg_t pc)
87 {
88 reg_t npc = pc + insn_length(0x00000023);
89 #include "insns/sb.h"
90 return npc;
91 }
92
93 reg_t processor_t::opcode_func_02d(insn_t insn, reg_t pc)
94 {
95 reg_t npc = pc + insn_length(0x0000000d);
96 #include "insns/c_sw.h"
97 return npc;
98 }
99
100 reg_t processor_t::opcode_func_037(insn_t insn, reg_t pc)
101 {
102 reg_t npc = pc + insn_length(0x00000037);
103 #include "insns/lui.h"
104 return npc;
105 }
106
107 reg_t processor_t::opcode_func_041(insn_t insn, reg_t pc)
108 {
109 reg_t npc = pc + insn_length(0x00000001);
110 #include "insns/c_addi.h"
111 return npc;
112 }
113
114 reg_t processor_t::opcode_func_04b(insn_t insn, reg_t pc)
115 {
116 reg_t npc = pc + insn_length(0x0000004b);
117 #include "insns/fnmsub_s.h"
118 return npc;
119 }
120
121 reg_t processor_t::opcode_func_055(insn_t insn, reg_t pc)
122 {
123 reg_t npc = pc + insn_length(0x00000015);
124 #include "insns/c_fld.h"
125 return npc;
126 }
127
128 reg_t processor_t::opcode_func_05f(insn_t insn, reg_t pc)
129 {
130 throw trap_illegal_instruction;
131 }
132
133 reg_t processor_t::opcode_func_069(insn_t insn, reg_t pc)
134 {
135 reg_t npc = pc + insn_length(0x00000009);
136 #include "insns/c_ld.h"
137 return npc;
138 }
139
140 reg_t processor_t::opcode_func_073(insn_t insn, reg_t pc)
141 {
142 if((insn.bits & 0x1ffff) == 0x1873)
143 {
144 reg_t npc = pc + insn_length(0x00001873);
145 #include "insns/vmts.h"
146 return npc;
147 }
148 if((insn.bits & 0x3fffff) == 0x73)
149 {
150 reg_t npc = pc + insn_length(0x00000073);
151 #include "insns/vmvv.h"
152 return npc;
153 }
154 if((insn.bits & 0x3fffff) == 0x873)
155 {
156 reg_t npc = pc + insn_length(0x00000873);
157 #include "insns/vmsv.h"
158 return npc;
159 }
160 if((insn.bits & 0x1ffff) == 0x1073)
161 {
162 reg_t npc = pc + insn_length(0x00001073);
163 #include "insns/vmst.h"
164 return npc;
165 }
166 throw trap_illegal_instruction;
167 }
168
169 reg_t processor_t::opcode_func_07d(insn_t insn, reg_t pc)
170 {
171 reg_t npc = pc + insn_length(0x0000001d);
172 #include "insns/c_addiw.h"
173 return npc;
174 }
175
176 reg_t processor_t::opcode_func_087(insn_t insn, reg_t pc)
177 {
178 throw trap_illegal_instruction;
179 }
180
181 reg_t processor_t::opcode_func_091(insn_t insn, reg_t pc)
182 {
183 reg_t npc = pc + insn_length(0x00000011);
184 #include "insns/c_bne.h"
185 return npc;
186 }
187
188 reg_t processor_t::opcode_func_09b(insn_t insn, reg_t pc)
189 {
190 if((insn.bits & 0x3f83ff) == 0x9b)
191 {
192 reg_t npc = pc + insn_length(0x0000009b);
193 #include "insns/slliw.h"
194 return npc;
195 }
196 throw trap_illegal_instruction;
197 }
198
199 reg_t processor_t::opcode_func_0a5(insn_t insn, reg_t pc)
200 {
201 reg_t npc = pc + insn_length(0x00000005);
202 #include "insns/c_lwsp.h"
203 return npc;
204 }
205
206 reg_t processor_t::opcode_func_0af(insn_t insn, reg_t pc)
207 {
208 reg_t npc = pc + insn_length(0x000000af);
209 #include "insns/fence_i.h"
210 return npc;
211 }
212
213 reg_t processor_t::opcode_func_0b9(insn_t insn, reg_t pc)
214 {
215 if((insn.bits & 0x1c1f) == 0x19)
216 {
217 reg_t npc = pc + insn_length(0x00000019);
218 #include "insns/c_slli.h"
219 return npc;
220 }
221 if((insn.bits & 0x1c1f) == 0x819)
222 {
223 reg_t npc = pc + insn_length(0x00000819);
224 #include "insns/c_srli.h"
225 return npc;
226 }
227 if((insn.bits & 0x1c1f) == 0x1419)
228 {
229 reg_t npc = pc + insn_length(0x00001419);
230 #include "insns/c_srai32.h"
231 return npc;
232 }
233 if((insn.bits & 0x1c1f) == 0x1819)
234 {
235 reg_t npc = pc + insn_length(0x00001819);
236 #include "insns/c_slliw.h"
237 return npc;
238 }
239 if((insn.bits & 0x1c1f) == 0xc19)
240 {
241 reg_t npc = pc + insn_length(0x00000c19);
242 #include "insns/c_srli32.h"
243 return npc;
244 }
245 if((insn.bits & 0x1c1f) == 0x1019)
246 {
247 reg_t npc = pc + insn_length(0x00001019);
248 #include "insns/c_srai.h"
249 return npc;
250 }
251 if((insn.bits & 0x1c1f) == 0x419)
252 {
253 reg_t npc = pc + insn_length(0x00000419);
254 #include "insns/c_slli32.h"
255 return npc;
256 }
257 throw trap_illegal_instruction;
258 }
259
260 reg_t processor_t::opcode_func_0c3(insn_t insn, reg_t pc)
261 {
262 reg_t npc = pc + insn_length(0x000000c3);
263 #include "insns/fmadd_d.h"
264 return npc;
265 }
266
267 reg_t processor_t::opcode_func_0cd(insn_t insn, reg_t pc)
268 {
269 reg_t npc = pc + insn_length(0x0000000d);
270 #include "insns/c_sw.h"
271 return npc;
272 }
273
274 reg_t processor_t::opcode_func_0d7(insn_t insn, reg_t pc)
275 {
276 throw trap_illegal_instruction;
277 }
278
279 reg_t processor_t::opcode_func_0e1(insn_t insn, reg_t pc)
280 {
281 reg_t npc = pc + insn_length(0x00000001);
282 #include "insns/c_addi.h"
283 return npc;
284 }
285
286 reg_t processor_t::opcode_func_0eb(insn_t insn, reg_t pc)
287 {
288 reg_t npc = pc + insn_length(0x000000eb);
289 #include "insns/jalr_r.h"
290 return npc;
291 }
292
293 reg_t processor_t::opcode_func_0f5(insn_t insn, reg_t pc)
294 {
295 reg_t npc = pc + insn_length(0x00000015);
296 #include "insns/c_fld.h"
297 return npc;
298 }
299
300 reg_t processor_t::opcode_func_0ff(insn_t insn, reg_t pc)
301 {
302 throw trap_illegal_instruction;
303 }
304
305 reg_t processor_t::opcode_func_109(insn_t insn, reg_t pc)
306 {
307 reg_t npc = pc + insn_length(0x00000009);
308 #include "insns/c_ld.h"
309 return npc;
310 }
311
312 reg_t processor_t::opcode_func_113(insn_t insn, reg_t pc)
313 {
314 reg_t npc = pc + insn_length(0x00000113);
315 #include "insns/slti.h"
316 return npc;
317 }
318
319 reg_t processor_t::opcode_func_11d(insn_t insn, reg_t pc)
320 {
321 reg_t npc = pc + insn_length(0x0000001d);
322 #include "insns/c_addiw.h"
323 return npc;
324 }
325
326 reg_t processor_t::opcode_func_127(insn_t insn, reg_t pc)
327 {
328 reg_t npc = pc + insn_length(0x00000127);
329 #include "insns/fsw.h"
330 return npc;
331 }
332
333 reg_t processor_t::opcode_func_131(insn_t insn, reg_t pc)
334 {
335 reg_t npc = pc + insn_length(0x00000011);
336 #include "insns/c_bne.h"
337 return npc;
338 }
339
340 reg_t processor_t::opcode_func_13b(insn_t insn, reg_t pc)
341 {
342 throw trap_illegal_instruction;
343 }
344
345 reg_t processor_t::opcode_func_145(insn_t insn, reg_t pc)
346 {
347 reg_t npc = pc + insn_length(0x00000005);
348 #include "insns/c_lwsp.h"
349 return npc;
350 }
351
352 reg_t processor_t::opcode_func_14f(insn_t insn, reg_t pc)
353 {
354 throw trap_illegal_instruction;
355 }
356
357 reg_t processor_t::opcode_func_159(insn_t insn, reg_t pc)
358 {
359 if((insn.bits & 0x1c1f) == 0x19)
360 {
361 reg_t npc = pc + insn_length(0x00000019);
362 #include "insns/c_slli.h"
363 return npc;
364 }
365 if((insn.bits & 0x1c1f) == 0x819)
366 {
367 reg_t npc = pc + insn_length(0x00000819);
368 #include "insns/c_srli.h"
369 return npc;
370 }
371 if((insn.bits & 0x1c1f) == 0x1419)
372 {
373 reg_t npc = pc + insn_length(0x00001419);
374 #include "insns/c_srai32.h"
375 return npc;
376 }
377 if((insn.bits & 0x1c1f) == 0x1819)
378 {
379 reg_t npc = pc + insn_length(0x00001819);
380 #include "insns/c_slliw.h"
381 return npc;
382 }
383 if((insn.bits & 0x1c1f) == 0xc19)
384 {
385 reg_t npc = pc + insn_length(0x00000c19);
386 #include "insns/c_srli32.h"
387 return npc;
388 }
389 if((insn.bits & 0x1c1f) == 0x1019)
390 {
391 reg_t npc = pc + insn_length(0x00001019);
392 #include "insns/c_srai.h"
393 return npc;
394 }
395 if((insn.bits & 0x1c1f) == 0x419)
396 {
397 reg_t npc = pc + insn_length(0x00000419);
398 #include "insns/c_slli32.h"
399 return npc;
400 }
401 throw trap_illegal_instruction;
402 }
403
404 reg_t processor_t::opcode_func_163(insn_t insn, reg_t pc)
405 {
406 throw trap_illegal_instruction;
407 }
408
409 reg_t processor_t::opcode_func_16d(insn_t insn, reg_t pc)
410 {
411 reg_t npc = pc + insn_length(0x0000000d);
412 #include "insns/c_sw.h"
413 return npc;
414 }
415
416 reg_t processor_t::opcode_func_177(insn_t insn, reg_t pc)
417 {
418 if((insn.bits & 0xffffffff) == 0x177)
419 {
420 reg_t npc = pc + insn_length(0x00000177);
421 #include "insns/stop.h"
422 return npc;
423 }
424 throw trap_illegal_instruction;
425 }
426
427 reg_t processor_t::opcode_func_181(insn_t insn, reg_t pc)
428 {
429 reg_t npc = pc + insn_length(0x00000001);
430 #include "insns/c_addi.h"
431 return npc;
432 }
433
434 reg_t processor_t::opcode_func_18b(insn_t insn, reg_t pc)
435 {
436 if((insn.bits & 0x1ffff) == 0x158b)
437 {
438 reg_t npc = pc + insn_length(0x0000158b);
439 #include "insns/vflstd.h"
440 return npc;
441 }
442 if((insn.bits & 0x3fffff) == 0x18b)
443 {
444 reg_t npc = pc + insn_length(0x0000018b);
445 #include "insns/vld.h"
446 return npc;
447 }
448 if((insn.bits & 0x1ffff) == 0x118b)
449 {
450 reg_t npc = pc + insn_length(0x0000118b);
451 #include "insns/vlstd.h"
452 return npc;
453 }
454 if((insn.bits & 0xfff) == 0x98b)
455 {
456 reg_t npc = pc + insn_length(0x0000098b);
457 #include "insns/vlsegstd.h"
458 return npc;
459 }
460 if((insn.bits & 0x1ffff) == 0x258b)
461 {
462 reg_t npc = pc + insn_length(0x0000258b);
463 #include "insns/vflsegd.h"
464 return npc;
465 }
466 if((insn.bits & 0xfff) == 0xd8b)
467 {
468 reg_t npc = pc + insn_length(0x00000d8b);
469 #include "insns/vflsegstd.h"
470 return npc;
471 }
472 if((insn.bits & 0x3fffff) == 0x58b)
473 {
474 reg_t npc = pc + insn_length(0x0000058b);
475 #include "insns/vfld.h"
476 return npc;
477 }
478 if((insn.bits & 0x1ffff) == 0x218b)
479 {
480 reg_t npc = pc + insn_length(0x0000218b);
481 #include "insns/vlsegd.h"
482 return npc;
483 }
484 throw trap_illegal_instruction;
485 }
486
487 reg_t processor_t::opcode_func_195(insn_t insn, reg_t pc)
488 {
489 reg_t npc = pc + insn_length(0x00000015);
490 #include "insns/c_fld.h"
491 return npc;
492 }
493
494 reg_t processor_t::opcode_func_19f(insn_t insn, reg_t pc)
495 {
496 throw trap_illegal_instruction;
497 }
498
499 reg_t processor_t::opcode_func_1a9(insn_t insn, reg_t pc)
500 {
501 reg_t npc = pc + insn_length(0x00000009);
502 #include "insns/c_ld.h"
503 return npc;
504 }
505
506 reg_t processor_t::opcode_func_1b3(insn_t insn, reg_t pc)
507 {
508 if((insn.bits & 0x1ffff) == 0x1b3)
509 {
510 reg_t npc = pc + insn_length(0x000001b3);
511 #include "insns/sltu.h"
512 return npc;
513 }
514 if((insn.bits & 0x1ffff) == 0x5b3)
515 {
516 reg_t npc = pc + insn_length(0x000005b3);
517 #include "insns/mulhu.h"
518 return npc;
519 }
520 throw trap_illegal_instruction;
521 }
522
523 reg_t processor_t::opcode_func_1bd(insn_t insn, reg_t pc)
524 {
525 reg_t npc = pc + insn_length(0x0000001d);
526 #include "insns/c_addiw.h"
527 return npc;
528 }
529
530 reg_t processor_t::opcode_func_1c7(insn_t insn, reg_t pc)
531 {
532 throw trap_illegal_instruction;
533 }
534
535 reg_t processor_t::opcode_func_1d1(insn_t insn, reg_t pc)
536 {
537 reg_t npc = pc + insn_length(0x00000011);
538 #include "insns/c_bne.h"
539 return npc;
540 }
541
542 reg_t processor_t::opcode_func_1db(insn_t insn, reg_t pc)
543 {
544 throw trap_illegal_instruction;
545 }
546
547 reg_t processor_t::opcode_func_1e5(insn_t insn, reg_t pc)
548 {
549 reg_t npc = pc + insn_length(0x00000005);
550 #include "insns/c_lwsp.h"
551 return npc;
552 }
553
554 reg_t processor_t::opcode_func_1ef(insn_t insn, reg_t pc)
555 {
556 reg_t npc = pc + insn_length(0x0000006f);
557 #include "insns/jal.h"
558 return npc;
559 }
560
561 reg_t processor_t::opcode_func_1f9(insn_t insn, reg_t pc)
562 {
563 if((insn.bits & 0x1c1f) == 0x19)
564 {
565 reg_t npc = pc + insn_length(0x00000019);
566 #include "insns/c_slli.h"
567 return npc;
568 }
569 if((insn.bits & 0x1c1f) == 0x819)
570 {
571 reg_t npc = pc + insn_length(0x00000819);
572 #include "insns/c_srli.h"
573 return npc;
574 }
575 if((insn.bits & 0x1c1f) == 0x1419)
576 {
577 reg_t npc = pc + insn_length(0x00001419);
578 #include "insns/c_srai32.h"
579 return npc;
580 }
581 if((insn.bits & 0x1c1f) == 0x1819)
582 {
583 reg_t npc = pc + insn_length(0x00001819);
584 #include "insns/c_slliw.h"
585 return npc;
586 }
587 if((insn.bits & 0x1c1f) == 0xc19)
588 {
589 reg_t npc = pc + insn_length(0x00000c19);
590 #include "insns/c_srli32.h"
591 return npc;
592 }
593 if((insn.bits & 0x1c1f) == 0x1019)
594 {
595 reg_t npc = pc + insn_length(0x00001019);
596 #include "insns/c_srai.h"
597 return npc;
598 }
599 if((insn.bits & 0x1c1f) == 0x419)
600 {
601 reg_t npc = pc + insn_length(0x00000419);
602 #include "insns/c_slli32.h"
603 return npc;
604 }
605 throw trap_illegal_instruction;
606 }
607
608 reg_t processor_t::opcode_func_203(insn_t insn, reg_t pc)
609 {
610 reg_t npc = pc + insn_length(0x00000203);
611 #include "insns/lbu.h"
612 return npc;
613 }
614
615 reg_t processor_t::opcode_func_20d(insn_t insn, reg_t pc)
616 {
617 reg_t npc = pc + insn_length(0x0000000d);
618 #include "insns/c_sw.h"
619 return npc;
620 }
621
622 reg_t processor_t::opcode_func_217(insn_t insn, reg_t pc)
623 {
624 throw trap_illegal_instruction;
625 }
626
627 reg_t processor_t::opcode_func_221(insn_t insn, reg_t pc)
628 {
629 reg_t npc = pc + insn_length(0x00000001);
630 #include "insns/c_addi.h"
631 return npc;
632 }
633
634 reg_t processor_t::opcode_func_22b(insn_t insn, reg_t pc)
635 {
636 throw trap_illegal_instruction;
637 }
638
639 reg_t processor_t::opcode_func_235(insn_t insn, reg_t pc)
640 {
641 reg_t npc = pc + insn_length(0x00000015);
642 #include "insns/c_fld.h"
643 return npc;
644 }
645
646 reg_t processor_t::opcode_func_23f(insn_t insn, reg_t pc)
647 {
648 throw trap_illegal_instruction;
649 }
650
651 reg_t processor_t::opcode_func_249(insn_t insn, reg_t pc)
652 {
653 reg_t npc = pc + insn_length(0x00000009);
654 #include "insns/c_ld.h"
655 return npc;
656 }
657
658 reg_t processor_t::opcode_func_253(insn_t insn, reg_t pc)
659 {
660 if((insn.bits & 0x3ff1ff) == 0x9053)
661 {
662 reg_t npc = pc + insn_length(0x00009053);
663 #include "insns/fcvt_lu_s.h"
664 return npc;
665 }
666 if((insn.bits & 0x3ff1ff) == 0x11053)
667 {
668 reg_t npc = pc + insn_length(0x00011053);
669 #include "insns/fcvt_s_d.h"
670 return npc;
671 }
672 if((insn.bits & 0x3ff1ff) == 0xe053)
673 {
674 reg_t npc = pc + insn_length(0x0000e053);
675 #include "insns/fcvt_s_w.h"
676 return npc;
677 }
678 if((insn.bits & 0x3ff1ff) == 0x8053)
679 {
680 reg_t npc = pc + insn_length(0x00008053);
681 #include "insns/fcvt_l_s.h"
682 return npc;
683 }
684 if((insn.bits & 0x1f1ff) == 0x3053)
685 {
686 reg_t npc = pc + insn_length(0x00003053);
687 #include "insns/fdiv_s.h"
688 return npc;
689 }
690 if((insn.bits & 0x3ff1ff) == 0xd053)
691 {
692 reg_t npc = pc + insn_length(0x0000d053);
693 #include "insns/fcvt_s_lu.h"
694 return npc;
695 }
696 if((insn.bits & 0x1f1ff) == 0x2053)
697 {
698 reg_t npc = pc + insn_length(0x00002053);
699 #include "insns/fmul_s.h"
700 return npc;
701 }
702 if((insn.bits & 0x3ff1ff) == 0xb053)
703 {
704 reg_t npc = pc + insn_length(0x0000b053);
705 #include "insns/fcvt_wu_s.h"
706 return npc;
707 }
708 if((insn.bits & 0x1f1ff) == 0x1053)
709 {
710 reg_t npc = pc + insn_length(0x00001053);
711 #include "insns/fsub_s.h"
712 return npc;
713 }
714 if((insn.bits & 0x3ff1ff) == 0xf053)
715 {
716 reg_t npc = pc + insn_length(0x0000f053);
717 #include "insns/fcvt_s_wu.h"
718 return npc;
719 }
720 if((insn.bits & 0x3ff1ff) == 0xc053)
721 {
722 reg_t npc = pc + insn_length(0x0000c053);
723 #include "insns/fcvt_s_l.h"
724 return npc;
725 }
726 if((insn.bits & 0x3ff1ff) == 0xa053)
727 {
728 reg_t npc = pc + insn_length(0x0000a053);
729 #include "insns/fcvt_w_s.h"
730 return npc;
731 }
732 if((insn.bits & 0x3ff1ff) == 0x4053)
733 {
734 reg_t npc = pc + insn_length(0x00004053);
735 #include "insns/fsqrt_s.h"
736 return npc;
737 }
738 if((insn.bits & 0x1f1ff) == 0x53)
739 {
740 reg_t npc = pc + insn_length(0x00000053);
741 #include "insns/fadd_s.h"
742 return npc;
743 }
744 throw trap_illegal_instruction;
745 }
746
747 reg_t processor_t::opcode_func_25d(insn_t insn, reg_t pc)
748 {
749 reg_t npc = pc + insn_length(0x0000001d);
750 #include "insns/c_addiw.h"
751 return npc;
752 }
753
754 reg_t processor_t::opcode_func_267(insn_t insn, reg_t pc)
755 {
756 reg_t npc = pc + insn_length(0x00000067);
757 #include "insns/j.h"
758 return npc;
759 }
760
761 reg_t processor_t::opcode_func_271(insn_t insn, reg_t pc)
762 {
763 reg_t npc = pc + insn_length(0x00000011);
764 #include "insns/c_bne.h"
765 return npc;
766 }
767
768 reg_t processor_t::opcode_func_27b(insn_t insn, reg_t pc)
769 {
770 if((insn.bits & 0xffffffff) == 0x27b)
771 {
772 reg_t npc = pc + insn_length(0x0000027b);
773 #include "insns/eret.h"
774 return npc;
775 }
776 throw trap_illegal_instruction;
777 }
778
779 reg_t processor_t::opcode_func_285(insn_t insn, reg_t pc)
780 {
781 reg_t npc = pc + insn_length(0x00000005);
782 #include "insns/c_lwsp.h"
783 return npc;
784 }
785
786 reg_t processor_t::opcode_func_28f(insn_t insn, reg_t pc)
787 {
788 throw trap_illegal_instruction;
789 }
790
791 reg_t processor_t::opcode_func_299(insn_t insn, reg_t pc)
792 {
793 if((insn.bits & 0x1c1f) == 0x19)
794 {
795 reg_t npc = pc + insn_length(0x00000019);
796 #include "insns/c_slli.h"
797 return npc;
798 }
799 if((insn.bits & 0x1c1f) == 0x819)
800 {
801 reg_t npc = pc + insn_length(0x00000819);
802 #include "insns/c_srli.h"
803 return npc;
804 }
805 if((insn.bits & 0x1c1f) == 0x1419)
806 {
807 reg_t npc = pc + insn_length(0x00001419);
808 #include "insns/c_srai32.h"
809 return npc;
810 }
811 if((insn.bits & 0x1c1f) == 0x1819)
812 {
813 reg_t npc = pc + insn_length(0x00001819);
814 #include "insns/c_slliw.h"
815 return npc;
816 }
817 if((insn.bits & 0x1c1f) == 0xc19)
818 {
819 reg_t npc = pc + insn_length(0x00000c19);
820 #include "insns/c_srli32.h"
821 return npc;
822 }
823 if((insn.bits & 0x1c1f) == 0x1019)
824 {
825 reg_t npc = pc + insn_length(0x00001019);
826 #include "insns/c_srai.h"
827 return npc;
828 }
829 if((insn.bits & 0x1c1f) == 0x419)
830 {
831 reg_t npc = pc + insn_length(0x00000419);
832 #include "insns/c_slli32.h"
833 return npc;
834 }
835 throw trap_illegal_instruction;
836 }
837
838 reg_t processor_t::opcode_func_2a3(insn_t insn, reg_t pc)
839 {
840 throw trap_illegal_instruction;
841 }
842
843 reg_t processor_t::opcode_func_2ad(insn_t insn, reg_t pc)
844 {
845 reg_t npc = pc + insn_length(0x0000000d);
846 #include "insns/c_sw.h"
847 return npc;
848 }
849
850 reg_t processor_t::opcode_func_2b7(insn_t insn, reg_t pc)
851 {
852 reg_t npc = pc + insn_length(0x00000037);
853 #include "insns/lui.h"
854 return npc;
855 }
856
857 reg_t processor_t::opcode_func_2c1(insn_t insn, reg_t pc)
858 {
859 reg_t npc = pc + insn_length(0x00000001);
860 #include "insns/c_addi.h"
861 return npc;
862 }
863
864 reg_t processor_t::opcode_func_2cb(insn_t insn, reg_t pc)
865 {
866 reg_t npc = pc + insn_length(0x000000cb);
867 #include "insns/fnmsub_d.h"
868 return npc;
869 }
870
871 reg_t processor_t::opcode_func_2d5(insn_t insn, reg_t pc)
872 {
873 reg_t npc = pc + insn_length(0x00000015);
874 #include "insns/c_fld.h"
875 return npc;
876 }
877
878 reg_t processor_t::opcode_func_2df(insn_t insn, reg_t pc)
879 {
880 throw trap_illegal_instruction;
881 }
882
883 reg_t processor_t::opcode_func_2e9(insn_t insn, reg_t pc)
884 {
885 reg_t npc = pc + insn_length(0x00000009);
886 #include "insns/c_ld.h"
887 return npc;
888 }
889
890 reg_t processor_t::opcode_func_2f3(insn_t insn, reg_t pc)
891 {
892 if((insn.bits & 0x3fffff) == 0x2f3)
893 {
894 reg_t npc = pc + insn_length(0x000002f3);
895 #include "insns/vsetvl.h"
896 return npc;
897 }
898 throw trap_illegal_instruction;
899 }
900
901 reg_t processor_t::opcode_func_2fd(insn_t insn, reg_t pc)
902 {
903 reg_t npc = pc + insn_length(0x0000001d);
904 #include "insns/c_addiw.h"
905 return npc;
906 }
907
908 reg_t processor_t::opcode_func_307(insn_t insn, reg_t pc)
909 {
910 throw trap_illegal_instruction;
911 }
912
913 reg_t processor_t::opcode_func_311(insn_t insn, reg_t pc)
914 {
915 reg_t npc = pc + insn_length(0x00000011);
916 #include "insns/c_bne.h"
917 return npc;
918 }
919
920 reg_t processor_t::opcode_func_31b(insn_t insn, reg_t pc)
921 {
922 throw trap_illegal_instruction;
923 }
924
925 reg_t processor_t::opcode_func_325(insn_t insn, reg_t pc)
926 {
927 reg_t npc = pc + insn_length(0x00000005);
928 #include "insns/c_lwsp.h"
929 return npc;
930 }
931
932 reg_t processor_t::opcode_func_32f(insn_t insn, reg_t pc)
933 {
934 reg_t npc = pc + insn_length(0x0000032f);
935 #include "insns/fence_l_cv.h"
936 return npc;
937 }
938
939 reg_t processor_t::opcode_func_339(insn_t insn, reg_t pc)
940 {
941 if((insn.bits & 0x1c1f) == 0x19)
942 {
943 reg_t npc = pc + insn_length(0x00000019);
944 #include "insns/c_slli.h"
945 return npc;
946 }
947 if((insn.bits & 0x1c1f) == 0x819)
948 {
949 reg_t npc = pc + insn_length(0x00000819);
950 #include "insns/c_srli.h"
951 return npc;
952 }
953 if((insn.bits & 0x1c1f) == 0x1419)
954 {
955 reg_t npc = pc + insn_length(0x00001419);
956 #include "insns/c_srai32.h"
957 return npc;
958 }
959 if((insn.bits & 0x1c1f) == 0x1819)
960 {
961 reg_t npc = pc + insn_length(0x00001819);
962 #include "insns/c_slliw.h"
963 return npc;
964 }
965 if((insn.bits & 0x1c1f) == 0xc19)
966 {
967 reg_t npc = pc + insn_length(0x00000c19);
968 #include "insns/c_srli32.h"
969 return npc;
970 }
971 if((insn.bits & 0x1c1f) == 0x1019)
972 {
973 reg_t npc = pc + insn_length(0x00001019);
974 #include "insns/c_srai.h"
975 return npc;
976 }
977 if((insn.bits & 0x1c1f) == 0x419)
978 {
979 reg_t npc = pc + insn_length(0x00000419);
980 #include "insns/c_slli32.h"
981 return npc;
982 }
983 throw trap_illegal_instruction;
984 }
985
986 reg_t processor_t::opcode_func_343(insn_t insn, reg_t pc)
987 {
988 throw trap_illegal_instruction;
989 }
990
991 reg_t processor_t::opcode_func_34d(insn_t insn, reg_t pc)
992 {
993 reg_t npc = pc + insn_length(0x0000000d);
994 #include "insns/c_sw.h"
995 return npc;
996 }
997
998 reg_t processor_t::opcode_func_357(insn_t insn, reg_t pc)
999 {
1000 throw trap_illegal_instruction;
1001 }
1002
1003 reg_t processor_t::opcode_func_361(insn_t insn, reg_t pc)
1004 {
1005 reg_t npc = pc + insn_length(0x00000001);
1006 #include "insns/c_addi.h"
1007 return npc;
1008 }
1009
1010 reg_t processor_t::opcode_func_36b(insn_t insn, reg_t pc)
1011 {
1012 throw trap_illegal_instruction;
1013 }
1014
1015 reg_t processor_t::opcode_func_375(insn_t insn, reg_t pc)
1016 {
1017 reg_t npc = pc + insn_length(0x00000015);
1018 #include "insns/c_fld.h"
1019 return npc;
1020 }
1021
1022 reg_t processor_t::opcode_func_37f(insn_t insn, reg_t pc)
1023 {
1024 throw trap_illegal_instruction;
1025 }
1026
1027 reg_t processor_t::opcode_func_389(insn_t insn, reg_t pc)
1028 {
1029 reg_t npc = pc + insn_length(0x00000009);
1030 #include "insns/c_ld.h"
1031 return npc;
1032 }
1033
1034 reg_t processor_t::opcode_func_393(insn_t insn, reg_t pc)
1035 {
1036 reg_t npc = pc + insn_length(0x00000393);
1037 #include "insns/andi.h"
1038 return npc;
1039 }
1040
1041 reg_t processor_t::opcode_func_39d(insn_t insn, reg_t pc)
1042 {
1043 reg_t npc = pc + insn_length(0x0000001d);
1044 #include "insns/c_addiw.h"
1045 return npc;
1046 }
1047
1048 reg_t processor_t::opcode_func_3a7(insn_t insn, reg_t pc)
1049 {
1050 throw trap_illegal_instruction;
1051 }
1052
1053 reg_t processor_t::opcode_func_3b1(insn_t insn, reg_t pc)
1054 {
1055 reg_t npc = pc + insn_length(0x00000011);
1056 #include "insns/c_bne.h"
1057 return npc;
1058 }
1059
1060 reg_t processor_t::opcode_func_3bb(insn_t insn, reg_t pc)
1061 {
1062 if((insn.bits & 0x1ffff) == 0x7bb)
1063 {
1064 reg_t npc = pc + insn_length(0x000007bb);
1065 #include "insns/remuw.h"
1066 return npc;
1067 }
1068 throw trap_illegal_instruction;
1069 }
1070
1071 reg_t processor_t::opcode_func_3c5(insn_t insn, reg_t pc)
1072 {
1073 reg_t npc = pc + insn_length(0x00000005);
1074 #include "insns/c_lwsp.h"
1075 return npc;
1076 }
1077
1078 reg_t processor_t::opcode_func_3cf(insn_t insn, reg_t pc)
1079 {
1080 throw trap_illegal_instruction;
1081 }
1082
1083 reg_t processor_t::opcode_func_3d9(insn_t insn, reg_t pc)
1084 {
1085 if((insn.bits & 0x1c1f) == 0x19)
1086 {
1087 reg_t npc = pc + insn_length(0x00000019);
1088 #include "insns/c_slli.h"
1089 return npc;
1090 }
1091 if((insn.bits & 0x1c1f) == 0x819)
1092 {
1093 reg_t npc = pc + insn_length(0x00000819);
1094 #include "insns/c_srli.h"
1095 return npc;
1096 }
1097 if((insn.bits & 0x1c1f) == 0x1419)
1098 {
1099 reg_t npc = pc + insn_length(0x00001419);
1100 #include "insns/c_srai32.h"
1101 return npc;
1102 }
1103 if((insn.bits & 0x1c1f) == 0x1819)
1104 {
1105 reg_t npc = pc + insn_length(0x00001819);
1106 #include "insns/c_slliw.h"
1107 return npc;
1108 }
1109 if((insn.bits & 0x1c1f) == 0xc19)
1110 {
1111 reg_t npc = pc + insn_length(0x00000c19);
1112 #include "insns/c_srli32.h"
1113 return npc;
1114 }
1115 if((insn.bits & 0x1c1f) == 0x1019)
1116 {
1117 reg_t npc = pc + insn_length(0x00001019);
1118 #include "insns/c_srai.h"
1119 return npc;
1120 }
1121 if((insn.bits & 0x1c1f) == 0x419)
1122 {
1123 reg_t npc = pc + insn_length(0x00000419);
1124 #include "insns/c_slli32.h"
1125 return npc;
1126 }
1127 throw trap_illegal_instruction;
1128 }
1129
1130 reg_t processor_t::opcode_func_3e3(insn_t insn, reg_t pc)
1131 {
1132 reg_t npc = pc + insn_length(0x000003e3);
1133 #include "insns/bgeu.h"
1134 return npc;
1135 }
1136
1137 reg_t processor_t::opcode_func_3ed(insn_t insn, reg_t pc)
1138 {
1139 reg_t npc = pc + insn_length(0x0000000d);
1140 #include "insns/c_sw.h"
1141 return npc;
1142 }
1143
1144 reg_t processor_t::opcode_func_3f7(insn_t insn, reg_t pc)
1145 {
1146 throw trap_illegal_instruction;
1147 }
1148