[sim,opcodes] improved sim build and run performance
[riscv-isa-sim.git] / riscv / dispatch_3.cc
1 #include "insn_includes.h"
2
3 reg_t processor_t::opcode_func_003(insn_t insn, reg_t pc)
4 {
5 reg_t npc = pc + insn_length(0x00000003);
6 #include "insns/lb.h"
7 return npc;
8 }
9
10 reg_t processor_t::opcode_func_00d(insn_t insn, reg_t pc)
11 {
12 reg_t npc = pc + insn_length(0x0000000d);
13 #include "insns/c_sw.h"
14 return npc;
15 }
16
17 reg_t processor_t::opcode_func_017(insn_t insn, reg_t pc)
18 {
19 throw trap_illegal_instruction;
20 }
21
22 reg_t processor_t::opcode_func_021(insn_t insn, reg_t pc)
23 {
24 reg_t npc = pc + insn_length(0x00000001);
25 #include "insns/c_addi.h"
26 return npc;
27 }
28
29 reg_t processor_t::opcode_func_02b(insn_t insn, reg_t pc)
30 {
31 throw trap_illegal_instruction;
32 }
33
34 reg_t processor_t::opcode_func_035(insn_t insn, reg_t pc)
35 {
36 reg_t npc = pc + insn_length(0x00000015);
37 #include "insns/c_fld.h"
38 return npc;
39 }
40
41 reg_t processor_t::opcode_func_03f(insn_t insn, reg_t pc)
42 {
43 throw trap_illegal_instruction;
44 }
45
46 reg_t processor_t::opcode_func_049(insn_t insn, reg_t pc)
47 {
48 reg_t npc = pc + insn_length(0x00000009);
49 #include "insns/c_ld.h"
50 return npc;
51 }
52
53 reg_t processor_t::opcode_func_053(insn_t insn, reg_t pc)
54 {
55 if((insn.bits & 0x3ff1ff) == 0x9053)
56 {
57 reg_t npc = pc + insn_length(0x00009053);
58 #include "insns/fcvt_lu_s.h"
59 return npc;
60 }
61 if((insn.bits & 0x1ffff) == 0x18053)
62 {
63 reg_t npc = pc + insn_length(0x00018053);
64 #include "insns/fmin_s.h"
65 return npc;
66 }
67 if((insn.bits & 0x3ff1ff) == 0x11053)
68 {
69 reg_t npc = pc + insn_length(0x00011053);
70 #include "insns/fcvt_s_d.h"
71 return npc;
72 }
73 if((insn.bits & 0x3ff1ff) == 0xe053)
74 {
75 reg_t npc = pc + insn_length(0x0000e053);
76 #include "insns/fcvt_s_w.h"
77 return npc;
78 }
79 if((insn.bits & 0x7c1ffff) == 0x1c053)
80 {
81 reg_t npc = pc + insn_length(0x0001c053);
82 #include "insns/mftx_s.h"
83 return npc;
84 }
85 if((insn.bits & 0x3ff1ff) == 0x8053)
86 {
87 reg_t npc = pc + insn_length(0x00008053);
88 #include "insns/fcvt_l_s.h"
89 return npc;
90 }
91 if((insn.bits & 0x1ffff) == 0x17053)
92 {
93 reg_t npc = pc + insn_length(0x00017053);
94 #include "insns/fle_s.h"
95 return npc;
96 }
97 if((insn.bits & 0x7ffffff) == 0x1d053)
98 {
99 reg_t npc = pc + insn_length(0x0001d053);
100 #include "insns/mffsr.h"
101 return npc;
102 }
103 if((insn.bits & 0x1f1ff) == 0x3053)
104 {
105 reg_t npc = pc + insn_length(0x00003053);
106 #include "insns/fdiv_s.h"
107 return npc;
108 }
109 if((insn.bits & 0x3fffff) == 0x1f053)
110 {
111 reg_t npc = pc + insn_length(0x0001f053);
112 #include "insns/mtfsr.h"
113 return npc;
114 }
115 if((insn.bits & 0x3ff1ff) == 0xd053)
116 {
117 reg_t npc = pc + insn_length(0x0000d053);
118 #include "insns/fcvt_s_lu.h"
119 return npc;
120 }
121 if((insn.bits & 0x1f1ff) == 0x2053)
122 {
123 reg_t npc = pc + insn_length(0x00002053);
124 #include "insns/fmul_s.h"
125 return npc;
126 }
127 if((insn.bits & 0x1ffff) == 0x16053)
128 {
129 reg_t npc = pc + insn_length(0x00016053);
130 #include "insns/flt_s.h"
131 return npc;
132 }
133 if((insn.bits & 0x1ffff) == 0x15053)
134 {
135 reg_t npc = pc + insn_length(0x00015053);
136 #include "insns/feq_s.h"
137 return npc;
138 }
139 if((insn.bits & 0x1ffff) == 0x7053)
140 {
141 reg_t npc = pc + insn_length(0x00007053);
142 #include "insns/fsgnjx_s.h"
143 return npc;
144 }
145 if((insn.bits & 0x1ffff) == 0x19053)
146 {
147 reg_t npc = pc + insn_length(0x00019053);
148 #include "insns/fmax_s.h"
149 return npc;
150 }
151 if((insn.bits & 0x3ff1ff) == 0xb053)
152 {
153 reg_t npc = pc + insn_length(0x0000b053);
154 #include "insns/fcvt_wu_s.h"
155 return npc;
156 }
157 if((insn.bits & 0x3fffff) == 0x1e053)
158 {
159 reg_t npc = pc + insn_length(0x0001e053);
160 #include "insns/mxtf_s.h"
161 return npc;
162 }
163 if((insn.bits & 0x1f1ff) == 0x1053)
164 {
165 reg_t npc = pc + insn_length(0x00001053);
166 #include "insns/fsub_s.h"
167 return npc;
168 }
169 if((insn.bits & 0x1ffff) == 0x5053)
170 {
171 reg_t npc = pc + insn_length(0x00005053);
172 #include "insns/fsgnj_s.h"
173 return npc;
174 }
175 if((insn.bits & 0x3ff1ff) == 0xf053)
176 {
177 reg_t npc = pc + insn_length(0x0000f053);
178 #include "insns/fcvt_s_wu.h"
179 return npc;
180 }
181 if((insn.bits & 0x3ff1ff) == 0xc053)
182 {
183 reg_t npc = pc + insn_length(0x0000c053);
184 #include "insns/fcvt_s_l.h"
185 return npc;
186 }
187 if((insn.bits & 0x3ff1ff) == 0xa053)
188 {
189 reg_t npc = pc + insn_length(0x0000a053);
190 #include "insns/fcvt_w_s.h"
191 return npc;
192 }
193 if((insn.bits & 0x3ff1ff) == 0x4053)
194 {
195 reg_t npc = pc + insn_length(0x00004053);
196 #include "insns/fsqrt_s.h"
197 return npc;
198 }
199 if((insn.bits & 0x1ffff) == 0x6053)
200 {
201 reg_t npc = pc + insn_length(0x00006053);
202 #include "insns/fsgnjn_s.h"
203 return npc;
204 }
205 if((insn.bits & 0x1f1ff) == 0x53)
206 {
207 reg_t npc = pc + insn_length(0x00000053);
208 #include "insns/fadd_s.h"
209 return npc;
210 }
211 throw trap_illegal_instruction;
212 }
213
214 reg_t processor_t::opcode_func_05d(insn_t insn, reg_t pc)
215 {
216 reg_t npc = pc + insn_length(0x0000001d);
217 #include "insns/c_addiw.h"
218 return npc;
219 }
220
221 reg_t processor_t::opcode_func_067(insn_t insn, reg_t pc)
222 {
223 reg_t npc = pc + insn_length(0x00000067);
224 #include "insns/j.h"
225 return npc;
226 }
227
228 reg_t processor_t::opcode_func_071(insn_t insn, reg_t pc)
229 {
230 reg_t npc = pc + insn_length(0x00000011);
231 #include "insns/c_bne.h"
232 return npc;
233 }
234
235 reg_t processor_t::opcode_func_07b(insn_t insn, reg_t pc)
236 {
237 if((insn.bits & 0x7ffffff) == 0x7b)
238 {
239 reg_t npc = pc + insn_length(0x0000007b);
240 #include "insns/ei.h"
241 return npc;
242 }
243 throw trap_illegal_instruction;
244 }
245
246 reg_t processor_t::opcode_func_085(insn_t insn, reg_t pc)
247 {
248 reg_t npc = pc + insn_length(0x00000005);
249 #include "insns/c_lwsp.h"
250 return npc;
251 }
252
253 reg_t processor_t::opcode_func_08f(insn_t insn, reg_t pc)
254 {
255 if((insn.bits & 0xfff) == 0x88f)
256 {
257 reg_t npc = pc + insn_length(0x0000088f);
258 #include "insns/vssegsth.h"
259 return npc;
260 }
261 if((insn.bits & 0x1ffff) == 0x108f)
262 {
263 reg_t npc = pc + insn_length(0x0000108f);
264 #include "insns/vssth.h"
265 return npc;
266 }
267 if((insn.bits & 0x3fffff) == 0x8f)
268 {
269 reg_t npc = pc + insn_length(0x0000008f);
270 #include "insns/vsh.h"
271 return npc;
272 }
273 if((insn.bits & 0x1ffff) == 0x208f)
274 {
275 reg_t npc = pc + insn_length(0x0000208f);
276 #include "insns/vssegh.h"
277 return npc;
278 }
279 throw trap_illegal_instruction;
280 }
281
282 reg_t processor_t::opcode_func_099(insn_t insn, reg_t pc)
283 {
284 if((insn.bits & 0x1c1f) == 0x19)
285 {
286 reg_t npc = pc + insn_length(0x00000019);
287 #include "insns/c_slli.h"
288 return npc;
289 }
290 if((insn.bits & 0x1c1f) == 0x819)
291 {
292 reg_t npc = pc + insn_length(0x00000819);
293 #include "insns/c_srli.h"
294 return npc;
295 }
296 if((insn.bits & 0x1c1f) == 0x1419)
297 {
298 reg_t npc = pc + insn_length(0x00001419);
299 #include "insns/c_srai32.h"
300 return npc;
301 }
302 if((insn.bits & 0x1c1f) == 0x1819)
303 {
304 reg_t npc = pc + insn_length(0x00001819);
305 #include "insns/c_slliw.h"
306 return npc;
307 }
308 if((insn.bits & 0x1c1f) == 0xc19)
309 {
310 reg_t npc = pc + insn_length(0x00000c19);
311 #include "insns/c_srli32.h"
312 return npc;
313 }
314 if((insn.bits & 0x1c1f) == 0x1019)
315 {
316 reg_t npc = pc + insn_length(0x00001019);
317 #include "insns/c_srai.h"
318 return npc;
319 }
320 if((insn.bits & 0x1c1f) == 0x419)
321 {
322 reg_t npc = pc + insn_length(0x00000419);
323 #include "insns/c_slli32.h"
324 return npc;
325 }
326 throw trap_illegal_instruction;
327 }
328
329 reg_t processor_t::opcode_func_0a3(insn_t insn, reg_t pc)
330 {
331 reg_t npc = pc + insn_length(0x000000a3);
332 #include "insns/sh.h"
333 return npc;
334 }
335
336 reg_t processor_t::opcode_func_0ad(insn_t insn, reg_t pc)
337 {
338 reg_t npc = pc + insn_length(0x0000000d);
339 #include "insns/c_sw.h"
340 return npc;
341 }
342
343 reg_t processor_t::opcode_func_0b7(insn_t insn, reg_t pc)
344 {
345 reg_t npc = pc + insn_length(0x00000037);
346 #include "insns/lui.h"
347 return npc;
348 }
349
350 reg_t processor_t::opcode_func_0c1(insn_t insn, reg_t pc)
351 {
352 reg_t npc = pc + insn_length(0x00000001);
353 #include "insns/c_addi.h"
354 return npc;
355 }
356
357 reg_t processor_t::opcode_func_0cb(insn_t insn, reg_t pc)
358 {
359 reg_t npc = pc + insn_length(0x000000cb);
360 #include "insns/fnmsub_d.h"
361 return npc;
362 }
363
364 reg_t processor_t::opcode_func_0d5(insn_t insn, reg_t pc)
365 {
366 reg_t npc = pc + insn_length(0x00000015);
367 #include "insns/c_fld.h"
368 return npc;
369 }
370
371 reg_t processor_t::opcode_func_0df(insn_t insn, reg_t pc)
372 {
373 throw trap_illegal_instruction;
374 }
375
376 reg_t processor_t::opcode_func_0e9(insn_t insn, reg_t pc)
377 {
378 reg_t npc = pc + insn_length(0x00000009);
379 #include "insns/c_ld.h"
380 return npc;
381 }
382
383 reg_t processor_t::opcode_func_0f3(insn_t insn, reg_t pc)
384 {
385 reg_t npc = pc + insn_length(0x000000f3);
386 #include "insns/vvcfgivl.h"
387 return npc;
388 }
389
390 reg_t processor_t::opcode_func_0fd(insn_t insn, reg_t pc)
391 {
392 reg_t npc = pc + insn_length(0x0000001d);
393 #include "insns/c_addiw.h"
394 return npc;
395 }
396
397 reg_t processor_t::opcode_func_107(insn_t insn, reg_t pc)
398 {
399 reg_t npc = pc + insn_length(0x00000107);
400 #include "insns/flw.h"
401 return npc;
402 }
403
404 reg_t processor_t::opcode_func_111(insn_t insn, reg_t pc)
405 {
406 reg_t npc = pc + insn_length(0x00000011);
407 #include "insns/c_bne.h"
408 return npc;
409 }
410
411 reg_t processor_t::opcode_func_11b(insn_t insn, reg_t pc)
412 {
413 throw trap_illegal_instruction;
414 }
415
416 reg_t processor_t::opcode_func_125(insn_t insn, reg_t pc)
417 {
418 reg_t npc = pc + insn_length(0x00000005);
419 #include "insns/c_lwsp.h"
420 return npc;
421 }
422
423 reg_t processor_t::opcode_func_12f(insn_t insn, reg_t pc)
424 {
425 reg_t npc = pc + insn_length(0x0000012f);
426 #include "insns/fence.h"
427 return npc;
428 }
429
430 reg_t processor_t::opcode_func_139(insn_t insn, reg_t pc)
431 {
432 if((insn.bits & 0x1c1f) == 0x19)
433 {
434 reg_t npc = pc + insn_length(0x00000019);
435 #include "insns/c_slli.h"
436 return npc;
437 }
438 if((insn.bits & 0x1c1f) == 0x819)
439 {
440 reg_t npc = pc + insn_length(0x00000819);
441 #include "insns/c_srli.h"
442 return npc;
443 }
444 if((insn.bits & 0x1c1f) == 0x1419)
445 {
446 reg_t npc = pc + insn_length(0x00001419);
447 #include "insns/c_srai32.h"
448 return npc;
449 }
450 if((insn.bits & 0x1c1f) == 0x1819)
451 {
452 reg_t npc = pc + insn_length(0x00001819);
453 #include "insns/c_slliw.h"
454 return npc;
455 }
456 if((insn.bits & 0x1c1f) == 0xc19)
457 {
458 reg_t npc = pc + insn_length(0x00000c19);
459 #include "insns/c_srli32.h"
460 return npc;
461 }
462 if((insn.bits & 0x1c1f) == 0x1019)
463 {
464 reg_t npc = pc + insn_length(0x00001019);
465 #include "insns/c_srai.h"
466 return npc;
467 }
468 if((insn.bits & 0x1c1f) == 0x419)
469 {
470 reg_t npc = pc + insn_length(0x00000419);
471 #include "insns/c_slli32.h"
472 return npc;
473 }
474 throw trap_illegal_instruction;
475 }
476
477 reg_t processor_t::opcode_func_143(insn_t insn, reg_t pc)
478 {
479 throw trap_illegal_instruction;
480 }
481
482 reg_t processor_t::opcode_func_14d(insn_t insn, reg_t pc)
483 {
484 reg_t npc = pc + insn_length(0x0000000d);
485 #include "insns/c_sw.h"
486 return npc;
487 }
488
489 reg_t processor_t::opcode_func_157(insn_t insn, reg_t pc)
490 {
491 throw trap_illegal_instruction;
492 }
493
494 reg_t processor_t::opcode_func_161(insn_t insn, reg_t pc)
495 {
496 reg_t npc = pc + insn_length(0x00000001);
497 #include "insns/c_addi.h"
498 return npc;
499 }
500
501 reg_t processor_t::opcode_func_16b(insn_t insn, reg_t pc)
502 {
503 reg_t npc = pc + insn_length(0x0000016b);
504 #include "insns/jalr_j.h"
505 return npc;
506 }
507
508 reg_t processor_t::opcode_func_175(insn_t insn, reg_t pc)
509 {
510 reg_t npc = pc + insn_length(0x00000015);
511 #include "insns/c_fld.h"
512 return npc;
513 }
514
515 reg_t processor_t::opcode_func_17f(insn_t insn, reg_t pc)
516 {
517 throw trap_illegal_instruction;
518 }
519
520 reg_t processor_t::opcode_func_189(insn_t insn, reg_t pc)
521 {
522 reg_t npc = pc + insn_length(0x00000009);
523 #include "insns/c_ld.h"
524 return npc;
525 }
526
527 reg_t processor_t::opcode_func_193(insn_t insn, reg_t pc)
528 {
529 reg_t npc = pc + insn_length(0x00000193);
530 #include "insns/sltiu.h"
531 return npc;
532 }
533
534 reg_t processor_t::opcode_func_19d(insn_t insn, reg_t pc)
535 {
536 reg_t npc = pc + insn_length(0x0000001d);
537 #include "insns/c_addiw.h"
538 return npc;
539 }
540
541 reg_t processor_t::opcode_func_1a7(insn_t insn, reg_t pc)
542 {
543 reg_t npc = pc + insn_length(0x000001a7);
544 #include "insns/fsd.h"
545 return npc;
546 }
547
548 reg_t processor_t::opcode_func_1b1(insn_t insn, reg_t pc)
549 {
550 reg_t npc = pc + insn_length(0x00000011);
551 #include "insns/c_bne.h"
552 return npc;
553 }
554
555 reg_t processor_t::opcode_func_1bb(insn_t insn, reg_t pc)
556 {
557 throw trap_illegal_instruction;
558 }
559
560 reg_t processor_t::opcode_func_1c5(insn_t insn, reg_t pc)
561 {
562 reg_t npc = pc + insn_length(0x00000005);
563 #include "insns/c_lwsp.h"
564 return npc;
565 }
566
567 reg_t processor_t::opcode_func_1cf(insn_t insn, reg_t pc)
568 {
569 throw trap_illegal_instruction;
570 }
571
572 reg_t processor_t::opcode_func_1d9(insn_t insn, reg_t pc)
573 {
574 if((insn.bits & 0x1c1f) == 0x19)
575 {
576 reg_t npc = pc + insn_length(0x00000019);
577 #include "insns/c_slli.h"
578 return npc;
579 }
580 if((insn.bits & 0x1c1f) == 0x819)
581 {
582 reg_t npc = pc + insn_length(0x00000819);
583 #include "insns/c_srli.h"
584 return npc;
585 }
586 if((insn.bits & 0x1c1f) == 0x1419)
587 {
588 reg_t npc = pc + insn_length(0x00001419);
589 #include "insns/c_srai32.h"
590 return npc;
591 }
592 if((insn.bits & 0x1c1f) == 0x1819)
593 {
594 reg_t npc = pc + insn_length(0x00001819);
595 #include "insns/c_slliw.h"
596 return npc;
597 }
598 if((insn.bits & 0x1c1f) == 0xc19)
599 {
600 reg_t npc = pc + insn_length(0x00000c19);
601 #include "insns/c_srli32.h"
602 return npc;
603 }
604 if((insn.bits & 0x1c1f) == 0x1019)
605 {
606 reg_t npc = pc + insn_length(0x00001019);
607 #include "insns/c_srai.h"
608 return npc;
609 }
610 if((insn.bits & 0x1c1f) == 0x419)
611 {
612 reg_t npc = pc + insn_length(0x00000419);
613 #include "insns/c_slli32.h"
614 return npc;
615 }
616 throw trap_illegal_instruction;
617 }
618
619 reg_t processor_t::opcode_func_1e3(insn_t insn, reg_t pc)
620 {
621 throw trap_illegal_instruction;
622 }
623
624 reg_t processor_t::opcode_func_1ed(insn_t insn, reg_t pc)
625 {
626 reg_t npc = pc + insn_length(0x0000000d);
627 #include "insns/c_sw.h"
628 return npc;
629 }
630
631 reg_t processor_t::opcode_func_1f7(insn_t insn, reg_t pc)
632 {
633 if((insn.bits & 0x7ffffff) == 0x1f7)
634 {
635 reg_t npc = pc + insn_length(0x000001f7);
636 #include "insns/utidx.h"
637 return npc;
638 }
639 throw trap_illegal_instruction;
640 }
641
642 reg_t processor_t::opcode_func_201(insn_t insn, reg_t pc)
643 {
644 reg_t npc = pc + insn_length(0x00000001);
645 #include "insns/c_addi.h"
646 return npc;
647 }
648
649 reg_t processor_t::opcode_func_20b(insn_t insn, reg_t pc)
650 {
651 if((insn.bits & 0x1ffff) == 0x120b)
652 {
653 reg_t npc = pc + insn_length(0x0000120b);
654 #include "insns/vlstbu.h"
655 return npc;
656 }
657 if((insn.bits & 0x1ffff) == 0x220b)
658 {
659 reg_t npc = pc + insn_length(0x0000220b);
660 #include "insns/vlsegbu.h"
661 return npc;
662 }
663 if((insn.bits & 0xfff) == 0xa0b)
664 {
665 reg_t npc = pc + insn_length(0x00000a0b);
666 #include "insns/vlsegstbu.h"
667 return npc;
668 }
669 if((insn.bits & 0x3fffff) == 0x20b)
670 {
671 reg_t npc = pc + insn_length(0x0000020b);
672 #include "insns/vlbu.h"
673 return npc;
674 }
675 throw trap_illegal_instruction;
676 }
677
678 reg_t processor_t::opcode_func_215(insn_t insn, reg_t pc)
679 {
680 reg_t npc = pc + insn_length(0x00000015);
681 #include "insns/c_fld.h"
682 return npc;
683 }
684
685 reg_t processor_t::opcode_func_21f(insn_t insn, reg_t pc)
686 {
687 throw trap_illegal_instruction;
688 }
689
690 reg_t processor_t::opcode_func_229(insn_t insn, reg_t pc)
691 {
692 reg_t npc = pc + insn_length(0x00000009);
693 #include "insns/c_ld.h"
694 return npc;
695 }
696
697 reg_t processor_t::opcode_func_233(insn_t insn, reg_t pc)
698 {
699 if((insn.bits & 0x1ffff) == 0x633)
700 {
701 reg_t npc = pc + insn_length(0x00000633);
702 #include "insns/div.h"
703 return npc;
704 }
705 if((insn.bits & 0x1ffff) == 0x233)
706 {
707 reg_t npc = pc + insn_length(0x00000233);
708 #include "insns/xor.h"
709 return npc;
710 }
711 throw trap_illegal_instruction;
712 }
713
714 reg_t processor_t::opcode_func_23d(insn_t insn, reg_t pc)
715 {
716 reg_t npc = pc + insn_length(0x0000001d);
717 #include "insns/c_addiw.h"
718 return npc;
719 }
720
721 reg_t processor_t::opcode_func_247(insn_t insn, reg_t pc)
722 {
723 reg_t npc = pc + insn_length(0x00000047);
724 #include "insns/fmsub_s.h"
725 return npc;
726 }
727
728 reg_t processor_t::opcode_func_251(insn_t insn, reg_t pc)
729 {
730 reg_t npc = pc + insn_length(0x00000011);
731 #include "insns/c_bne.h"
732 return npc;
733 }
734
735 reg_t processor_t::opcode_func_25b(insn_t insn, reg_t pc)
736 {
737 throw trap_illegal_instruction;
738 }
739
740 reg_t processor_t::opcode_func_265(insn_t insn, reg_t pc)
741 {
742 reg_t npc = pc + insn_length(0x00000005);
743 #include "insns/c_lwsp.h"
744 return npc;
745 }
746
747 reg_t processor_t::opcode_func_26f(insn_t insn, reg_t pc)
748 {
749 reg_t npc = pc + insn_length(0x0000006f);
750 #include "insns/jal.h"
751 return npc;
752 }
753
754 reg_t processor_t::opcode_func_279(insn_t insn, reg_t pc)
755 {
756 if((insn.bits & 0x1c1f) == 0x19)
757 {
758 reg_t npc = pc + insn_length(0x00000019);
759 #include "insns/c_slli.h"
760 return npc;
761 }
762 if((insn.bits & 0x1c1f) == 0x819)
763 {
764 reg_t npc = pc + insn_length(0x00000819);
765 #include "insns/c_srli.h"
766 return npc;
767 }
768 if((insn.bits & 0x1c1f) == 0x1419)
769 {
770 reg_t npc = pc + insn_length(0x00001419);
771 #include "insns/c_srai32.h"
772 return npc;
773 }
774 if((insn.bits & 0x1c1f) == 0x1819)
775 {
776 reg_t npc = pc + insn_length(0x00001819);
777 #include "insns/c_slliw.h"
778 return npc;
779 }
780 if((insn.bits & 0x1c1f) == 0xc19)
781 {
782 reg_t npc = pc + insn_length(0x00000c19);
783 #include "insns/c_srli32.h"
784 return npc;
785 }
786 if((insn.bits & 0x1c1f) == 0x1019)
787 {
788 reg_t npc = pc + insn_length(0x00001019);
789 #include "insns/c_srai.h"
790 return npc;
791 }
792 if((insn.bits & 0x1c1f) == 0x419)
793 {
794 reg_t npc = pc + insn_length(0x00000419);
795 #include "insns/c_slli32.h"
796 return npc;
797 }
798 throw trap_illegal_instruction;
799 }
800
801 reg_t processor_t::opcode_func_283(insn_t insn, reg_t pc)
802 {
803 reg_t npc = pc + insn_length(0x00000283);
804 #include "insns/lhu.h"
805 return npc;
806 }
807
808 reg_t processor_t::opcode_func_28d(insn_t insn, reg_t pc)
809 {
810 reg_t npc = pc + insn_length(0x0000000d);
811 #include "insns/c_sw.h"
812 return npc;
813 }
814
815 reg_t processor_t::opcode_func_297(insn_t insn, reg_t pc)
816 {
817 throw trap_illegal_instruction;
818 }
819
820 reg_t processor_t::opcode_func_2a1(insn_t insn, reg_t pc)
821 {
822 reg_t npc = pc + insn_length(0x00000001);
823 #include "insns/c_addi.h"
824 return npc;
825 }
826
827 reg_t processor_t::opcode_func_2ab(insn_t insn, reg_t pc)
828 {
829 throw trap_illegal_instruction;
830 }
831
832 reg_t processor_t::opcode_func_2b5(insn_t insn, reg_t pc)
833 {
834 reg_t npc = pc + insn_length(0x00000015);
835 #include "insns/c_fld.h"
836 return npc;
837 }
838
839 reg_t processor_t::opcode_func_2bf(insn_t insn, reg_t pc)
840 {
841 throw trap_illegal_instruction;
842 }
843
844 reg_t processor_t::opcode_func_2c9(insn_t insn, reg_t pc)
845 {
846 reg_t npc = pc + insn_length(0x00000009);
847 #include "insns/c_ld.h"
848 return npc;
849 }
850
851 reg_t processor_t::opcode_func_2d3(insn_t insn, reg_t pc)
852 {
853 if((insn.bits & 0x3ff1ff) == 0xc0d3)
854 {
855 reg_t npc = pc + insn_length(0x0000c0d3);
856 #include "insns/fcvt_d_l.h"
857 return npc;
858 }
859 if((insn.bits & 0x3ff1ff) == 0xe0d3)
860 {
861 reg_t npc = pc + insn_length(0x0000e0d3);
862 #include "insns/fcvt_d_w.h"
863 return npc;
864 }
865 if((insn.bits & 0x3ff1ff) == 0x100d3)
866 {
867 reg_t npc = pc + insn_length(0x000100d3);
868 #include "insns/fcvt_d_s.h"
869 return npc;
870 }
871 if((insn.bits & 0x1f1ff) == 0x20d3)
872 {
873 reg_t npc = pc + insn_length(0x000020d3);
874 #include "insns/fmul_d.h"
875 return npc;
876 }
877 if((insn.bits & 0x3ff1ff) == 0xf0d3)
878 {
879 reg_t npc = pc + insn_length(0x0000f0d3);
880 #include "insns/fcvt_d_wu.h"
881 return npc;
882 }
883 if((insn.bits & 0x3ff1ff) == 0xb0d3)
884 {
885 reg_t npc = pc + insn_length(0x0000b0d3);
886 #include "insns/fcvt_wu_d.h"
887 return npc;
888 }
889 if((insn.bits & 0x3ff1ff) == 0xd0d3)
890 {
891 reg_t npc = pc + insn_length(0x0000d0d3);
892 #include "insns/fcvt_d_lu.h"
893 return npc;
894 }
895 if((insn.bits & 0x3ff1ff) == 0xa0d3)
896 {
897 reg_t npc = pc + insn_length(0x0000a0d3);
898 #include "insns/fcvt_w_d.h"
899 return npc;
900 }
901 if((insn.bits & 0x3ff1ff) == 0x80d3)
902 {
903 reg_t npc = pc + insn_length(0x000080d3);
904 #include "insns/fcvt_l_d.h"
905 return npc;
906 }
907 if((insn.bits & 0x1f1ff) == 0xd3)
908 {
909 reg_t npc = pc + insn_length(0x000000d3);
910 #include "insns/fadd_d.h"
911 return npc;
912 }
913 if((insn.bits & 0x3ff1ff) == 0x90d3)
914 {
915 reg_t npc = pc + insn_length(0x000090d3);
916 #include "insns/fcvt_lu_d.h"
917 return npc;
918 }
919 if((insn.bits & 0x1f1ff) == 0x10d3)
920 {
921 reg_t npc = pc + insn_length(0x000010d3);
922 #include "insns/fsub_d.h"
923 return npc;
924 }
925 if((insn.bits & 0x3ff1ff) == 0x40d3)
926 {
927 reg_t npc = pc + insn_length(0x000040d3);
928 #include "insns/fsqrt_d.h"
929 return npc;
930 }
931 if((insn.bits & 0x1f1ff) == 0x30d3)
932 {
933 reg_t npc = pc + insn_length(0x000030d3);
934 #include "insns/fdiv_d.h"
935 return npc;
936 }
937 throw trap_illegal_instruction;
938 }
939
940 reg_t processor_t::opcode_func_2dd(insn_t insn, reg_t pc)
941 {
942 reg_t npc = pc + insn_length(0x0000001d);
943 #include "insns/c_addiw.h"
944 return npc;
945 }
946
947 reg_t processor_t::opcode_func_2e7(insn_t insn, reg_t pc)
948 {
949 reg_t npc = pc + insn_length(0x00000067);
950 #include "insns/j.h"
951 return npc;
952 }
953
954 reg_t processor_t::opcode_func_2f1(insn_t insn, reg_t pc)
955 {
956 reg_t npc = pc + insn_length(0x00000011);
957 #include "insns/c_bne.h"
958 return npc;
959 }
960
961 reg_t processor_t::opcode_func_2fb(insn_t insn, reg_t pc)
962 {
963 if((insn.bits & 0xffffffff) == 0x2fb)
964 {
965 reg_t npc = pc + insn_length(0x000002fb);
966 #include "insns/cflush.h"
967 return npc;
968 }
969 throw trap_illegal_instruction;
970 }
971
972 reg_t processor_t::opcode_func_305(insn_t insn, reg_t pc)
973 {
974 reg_t npc = pc + insn_length(0x00000005);
975 #include "insns/c_lwsp.h"
976 return npc;
977 }
978
979 reg_t processor_t::opcode_func_30f(insn_t insn, reg_t pc)
980 {
981 throw trap_illegal_instruction;
982 }
983
984 reg_t processor_t::opcode_func_319(insn_t insn, reg_t pc)
985 {
986 if((insn.bits & 0x1c1f) == 0x19)
987 {
988 reg_t npc = pc + insn_length(0x00000019);
989 #include "insns/c_slli.h"
990 return npc;
991 }
992 if((insn.bits & 0x1c1f) == 0x819)
993 {
994 reg_t npc = pc + insn_length(0x00000819);
995 #include "insns/c_srli.h"
996 return npc;
997 }
998 if((insn.bits & 0x1c1f) == 0x1419)
999 {
1000 reg_t npc = pc + insn_length(0x00001419);
1001 #include "insns/c_srai32.h"
1002 return npc;
1003 }
1004 if((insn.bits & 0x1c1f) == 0x1819)
1005 {
1006 reg_t npc = pc + insn_length(0x00001819);
1007 #include "insns/c_slliw.h"
1008 return npc;
1009 }
1010 if((insn.bits & 0x1c1f) == 0xc19)
1011 {
1012 reg_t npc = pc + insn_length(0x00000c19);
1013 #include "insns/c_srli32.h"
1014 return npc;
1015 }
1016 if((insn.bits & 0x1c1f) == 0x1019)
1017 {
1018 reg_t npc = pc + insn_length(0x00001019);
1019 #include "insns/c_srai.h"
1020 return npc;
1021 }
1022 if((insn.bits & 0x1c1f) == 0x419)
1023 {
1024 reg_t npc = pc + insn_length(0x00000419);
1025 #include "insns/c_slli32.h"
1026 return npc;
1027 }
1028 throw trap_illegal_instruction;
1029 }
1030
1031 reg_t processor_t::opcode_func_323(insn_t insn, reg_t pc)
1032 {
1033 throw trap_illegal_instruction;
1034 }
1035
1036 reg_t processor_t::opcode_func_32d(insn_t insn, reg_t pc)
1037 {
1038 reg_t npc = pc + insn_length(0x0000000d);
1039 #include "insns/c_sw.h"
1040 return npc;
1041 }
1042
1043 reg_t processor_t::opcode_func_337(insn_t insn, reg_t pc)
1044 {
1045 reg_t npc = pc + insn_length(0x00000037);
1046 #include "insns/lui.h"
1047 return npc;
1048 }
1049
1050 reg_t processor_t::opcode_func_341(insn_t insn, reg_t pc)
1051 {
1052 reg_t npc = pc + insn_length(0x00000001);
1053 #include "insns/c_addi.h"
1054 return npc;
1055 }
1056
1057 reg_t processor_t::opcode_func_34b(insn_t insn, reg_t pc)
1058 {
1059 throw trap_illegal_instruction;
1060 }
1061
1062 reg_t processor_t::opcode_func_355(insn_t insn, reg_t pc)
1063 {
1064 reg_t npc = pc + insn_length(0x00000015);
1065 #include "insns/c_fld.h"
1066 return npc;
1067 }
1068
1069 reg_t processor_t::opcode_func_35f(insn_t insn, reg_t pc)
1070 {
1071 throw trap_illegal_instruction;
1072 }
1073
1074 reg_t processor_t::opcode_func_369(insn_t insn, reg_t pc)
1075 {
1076 reg_t npc = pc + insn_length(0x00000009);
1077 #include "insns/c_ld.h"
1078 return npc;
1079 }
1080
1081 reg_t processor_t::opcode_func_373(insn_t insn, reg_t pc)
1082 {
1083 throw trap_illegal_instruction;
1084 }
1085
1086 reg_t processor_t::opcode_func_37d(insn_t insn, reg_t pc)
1087 {
1088 reg_t npc = pc + insn_length(0x0000001d);
1089 #include "insns/c_addiw.h"
1090 return npc;
1091 }
1092
1093 reg_t processor_t::opcode_func_387(insn_t insn, reg_t pc)
1094 {
1095 throw trap_illegal_instruction;
1096 }
1097
1098 reg_t processor_t::opcode_func_391(insn_t insn, reg_t pc)
1099 {
1100 reg_t npc = pc + insn_length(0x00000011);
1101 #include "insns/c_bne.h"
1102 return npc;
1103 }
1104
1105 reg_t processor_t::opcode_func_39b(insn_t insn, reg_t pc)
1106 {
1107 throw trap_illegal_instruction;
1108 }
1109
1110 reg_t processor_t::opcode_func_3a5(insn_t insn, reg_t pc)
1111 {
1112 reg_t npc = pc + insn_length(0x00000005);
1113 #include "insns/c_lwsp.h"
1114 return npc;
1115 }
1116
1117 reg_t processor_t::opcode_func_3af(insn_t insn, reg_t pc)
1118 {
1119 reg_t npc = pc + insn_length(0x000003af);
1120 #include "insns/fence_g_cv.h"
1121 return npc;
1122 }
1123
1124 reg_t processor_t::opcode_func_3b9(insn_t insn, reg_t pc)
1125 {
1126 if((insn.bits & 0x1c1f) == 0x19)
1127 {
1128 reg_t npc = pc + insn_length(0x00000019);
1129 #include "insns/c_slli.h"
1130 return npc;
1131 }
1132 if((insn.bits & 0x1c1f) == 0x819)
1133 {
1134 reg_t npc = pc + insn_length(0x00000819);
1135 #include "insns/c_srli.h"
1136 return npc;
1137 }
1138 if((insn.bits & 0x1c1f) == 0x1419)
1139 {
1140 reg_t npc = pc + insn_length(0x00001419);
1141 #include "insns/c_srai32.h"
1142 return npc;
1143 }
1144 if((insn.bits & 0x1c1f) == 0x1819)
1145 {
1146 reg_t npc = pc + insn_length(0x00001819);
1147 #include "insns/c_slliw.h"
1148 return npc;
1149 }
1150 if((insn.bits & 0x1c1f) == 0xc19)
1151 {
1152 reg_t npc = pc + insn_length(0x00000c19);
1153 #include "insns/c_srli32.h"
1154 return npc;
1155 }
1156 if((insn.bits & 0x1c1f) == 0x1019)
1157 {
1158 reg_t npc = pc + insn_length(0x00001019);
1159 #include "insns/c_srai.h"
1160 return npc;
1161 }
1162 if((insn.bits & 0x1c1f) == 0x419)
1163 {
1164 reg_t npc = pc + insn_length(0x00000419);
1165 #include "insns/c_slli32.h"
1166 return npc;
1167 }
1168 throw trap_illegal_instruction;
1169 }
1170
1171 reg_t processor_t::opcode_func_3c3(insn_t insn, reg_t pc)
1172 {
1173 throw trap_illegal_instruction;
1174 }
1175
1176 reg_t processor_t::opcode_func_3cd(insn_t insn, reg_t pc)
1177 {
1178 reg_t npc = pc + insn_length(0x0000000d);
1179 #include "insns/c_sw.h"
1180 return npc;
1181 }
1182
1183 reg_t processor_t::opcode_func_3d7(insn_t insn, reg_t pc)
1184 {
1185 throw trap_illegal_instruction;
1186 }
1187
1188 reg_t processor_t::opcode_func_3e1(insn_t insn, reg_t pc)
1189 {
1190 reg_t npc = pc + insn_length(0x00000001);
1191 #include "insns/c_addi.h"
1192 return npc;
1193 }
1194
1195 reg_t processor_t::opcode_func_3eb(insn_t insn, reg_t pc)
1196 {
1197 throw trap_illegal_instruction;
1198 }
1199
1200 reg_t processor_t::opcode_func_3f5(insn_t insn, reg_t pc)
1201 {
1202 reg_t npc = pc + insn_length(0x00000015);
1203 #include "insns/c_fld.h"
1204 return npc;
1205 }
1206
1207 reg_t processor_t::opcode_func_3ff(insn_t insn, reg_t pc)
1208 {
1209 throw trap_illegal_instruction;
1210 }
1211