[sim,opcodes] improved sim build and run performance
authorAndrew Waterman <waterman@s141.Millennium.Berkeley.EDU>
Sun, 29 May 2011 11:11:39 +0000 (04:11 -0700)
committerAndrew Waterman <waterman@s141.Millennium.Berkeley.EDU>
Sun, 29 May 2011 11:11:39 +0000 (04:11 -0700)
23 files changed:
configure
configure.ac
riscv/common.h
riscv/decode.h
riscv/dispatch.h [new file with mode: 0644]
riscv/dispatch_0.cc [new file with mode: 0644]
riscv/dispatch_1.cc [new file with mode: 0644]
riscv/dispatch_2.cc [new file with mode: 0644]
riscv/dispatch_3.cc [new file with mode: 0644]
riscv/dispatch_4.cc [new file with mode: 0644]
riscv/dispatch_5.cc [new file with mode: 0644]
riscv/dispatch_6.cc [new file with mode: 0644]
riscv/dispatch_7.cc [new file with mode: 0644]
riscv/dispatch_8.cc [new file with mode: 0644]
riscv/dispatch_9.cc [new file with mode: 0644]
riscv/dispatch_decl.h [new file with mode: 0644]
riscv/execute.h [deleted file]
riscv/insn_includes.h [new file with mode: 0644]
riscv/insns/vf.h
riscv/mmu.h
riscv/processor.cc
riscv/processor.h
riscv/riscv.mk.in

index 709daa8be4795ffbe17394202d079b6703ba589f..eda5f6cdca84caad3b9b7482dc84813f2d40c9fb 100755 (executable)
--- a/configure
+++ b/configure
@@ -3961,7 +3961,7 @@ fi
 
 CFLAGS="-Wall -O2"
 
-CXXFLAGS="-Wall -O2"
+CXXFLAGS="-Wall -O2 -Wno-pmf-conversions"
 
 
 #-------------------------------------------------------------------------
index 60abb71e59ee0b879f3620a6578b01c944042d76..90fe28ec2e63cbc8a5761ce3132a8dcbebb380cf 100644 (file)
@@ -72,7 +72,7 @@ AC_HEADER_STDC
 #-------------------------------------------------------------------------
 
 AC_SUBST([CFLAGS],  ["-Wall -O2"])
-AC_SUBST([CXXFLAGS],["-Wall -O2"])
+AC_SUBST([CXXFLAGS],["-Wall -O2 -Wno-pmf-conversions"])
 
 #-------------------------------------------------------------------------
 # MCPPBS subproject list
index cbb8e958cabae496b61ac916f1ec2d124cd796ae..7dd657048e45f7c89d62172c8fde346af7bd39f7 100644 (file)
@@ -22,4 +22,7 @@
 
 #define static_assert(x)       switch (x) case 0: case (x):
 
+#define   likely(x) __builtin_expect(x, 1)
+#define unlikely(x) __builtin_expect(x, 0)
+
 #endif
index 496b31ad034e28237b541080ff28c66d6d94d8da..59ca87a117f8a9094132b8cc1585fb7d639b5fe5 100644 (file)
@@ -193,11 +193,11 @@ private:
               if(rm > 4) throw_illegal_instruction; \
               rm; })
 
-#define require_supervisor if(!(sr & SR_S)) throw trap_privileged_instruction
+#define require_supervisor if(unlikely(!(sr & SR_S))) throw trap_privileged_instruction
 #define xpr64 (xprlen == 64)
-#define require_xpr64 if(!xpr64) throw_illegal_instruction
-#define require_xpr32 if(xpr64) throw_illegal_instruction
-#define require_fp if(!(sr & SR_EF)) throw trap_fp_disabled
+#define require_xpr64 if(unlikely(!xpr64)) throw_illegal_instruction
+#define require_xpr32 if(unlikely(xpr64)) throw_illegal_instruction
+#define require_fp if(unlikely(!(sr & SR_EF))) throw trap_fp_disabled
 #define require_vector \
   ({ if(!(sr & SR_EV)) throw trap_vector_disabled; \
     else if (!utmode && (vecbanks_count < 3)) throw trap_vector_bank; \
@@ -207,9 +207,6 @@ private:
                                (softfloat_exceptionFlags << FSR_AEXC_SHIFT)); \
                              softfloat_exceptionFlags = 0; })
 
-#define require_rvc if(!(sr & SR_EC)) throw_illegal_instruction
-#define insn_length(x) (((x).bits & 0x3) < 0x3 ? 2 : 4)
-
 #define sext32(x) ((sreg_t)(int32_t)(x))
 #define zext32(x) ((reg_t)(uint32_t)(x))
 #define sext_xprlen(x) ((sreg_t(x) << (64-xprlen)) >> (64-xprlen))
@@ -218,6 +215,8 @@ private:
 // RVC stuff
 
 #define INSN_IS_RVC(x) (((x) & 0x3) < 0x3)
+#define insn_length(x) (INSN_IS_RVC(x) ? 2 : 4)
+#define require_rvc if(!(sr & SR_EC)) throw_illegal_instruction
 
 #define CRD_REGNUM ((insn.bits >> 5) & 0x1f)
 #define CRD do_writeback(XPR, CRD_REGNUM)
diff --git a/riscv/dispatch.h b/riscv/dispatch.h
new file mode 100644 (file)
index 0000000..fdc92d3
--- /dev/null
@@ -0,0 +1,1028 @@
+/* Automatically generated by parse-opcodes */
+typedef reg_t (*insn_func_t)(processor_t*, insn_t, reg_t);
+const static insn_func_t dispatch_table[] = {
+  (insn_func_t)&processor_t::opcode_func_000,
+  (insn_func_t)&processor_t::opcode_func_001,
+  (insn_func_t)&processor_t::opcode_func_002,
+  (insn_func_t)&processor_t::opcode_func_003,
+  (insn_func_t)&processor_t::opcode_func_004,
+  (insn_func_t)&processor_t::opcode_func_005,
+  (insn_func_t)&processor_t::opcode_func_006,
+  (insn_func_t)&processor_t::opcode_func_007,
+  (insn_func_t)&processor_t::opcode_func_008,
+  (insn_func_t)&processor_t::opcode_func_009,
+  (insn_func_t)&processor_t::opcode_func_00a,
+  (insn_func_t)&processor_t::opcode_func_00b,
+  (insn_func_t)&processor_t::opcode_func_00c,
+  (insn_func_t)&processor_t::opcode_func_00d,
+  (insn_func_t)&processor_t::opcode_func_00e,
+  (insn_func_t)&processor_t::opcode_func_00f,
+  (insn_func_t)&processor_t::opcode_func_010,
+  (insn_func_t)&processor_t::opcode_func_011,
+  (insn_func_t)&processor_t::opcode_func_012,
+  (insn_func_t)&processor_t::opcode_func_013,
+  (insn_func_t)&processor_t::opcode_func_014,
+  (insn_func_t)&processor_t::opcode_func_015,
+  (insn_func_t)&processor_t::opcode_func_016,
+  (insn_func_t)&processor_t::opcode_func_017,
+  (insn_func_t)&processor_t::opcode_func_018,
+  (insn_func_t)&processor_t::opcode_func_019,
+  (insn_func_t)&processor_t::opcode_func_01a,
+  (insn_func_t)&processor_t::opcode_func_01b,
+  (insn_func_t)&processor_t::opcode_func_01c,
+  (insn_func_t)&processor_t::opcode_func_01d,
+  (insn_func_t)&processor_t::opcode_func_01e,
+  (insn_func_t)&processor_t::opcode_func_01f,
+  (insn_func_t)&processor_t::opcode_func_020,
+  (insn_func_t)&processor_t::opcode_func_021,
+  (insn_func_t)&processor_t::opcode_func_022,
+  (insn_func_t)&processor_t::opcode_func_023,
+  (insn_func_t)&processor_t::opcode_func_024,
+  (insn_func_t)&processor_t::opcode_func_025,
+  (insn_func_t)&processor_t::opcode_func_026,
+  (insn_func_t)&processor_t::opcode_func_027,
+  (insn_func_t)&processor_t::opcode_func_028,
+  (insn_func_t)&processor_t::opcode_func_029,
+  (insn_func_t)&processor_t::opcode_func_02a,
+  (insn_func_t)&processor_t::opcode_func_02b,
+  (insn_func_t)&processor_t::opcode_func_02c,
+  (insn_func_t)&processor_t::opcode_func_02d,
+  (insn_func_t)&processor_t::opcode_func_02e,
+  (insn_func_t)&processor_t::opcode_func_02f,
+  (insn_func_t)&processor_t::opcode_func_030,
+  (insn_func_t)&processor_t::opcode_func_031,
+  (insn_func_t)&processor_t::opcode_func_032,
+  (insn_func_t)&processor_t::opcode_func_033,
+  (insn_func_t)&processor_t::opcode_func_034,
+  (insn_func_t)&processor_t::opcode_func_035,
+  (insn_func_t)&processor_t::opcode_func_036,
+  (insn_func_t)&processor_t::opcode_func_037,
+  (insn_func_t)&processor_t::opcode_func_038,
+  (insn_func_t)&processor_t::opcode_func_039,
+  (insn_func_t)&processor_t::opcode_func_03a,
+  (insn_func_t)&processor_t::opcode_func_03b,
+  (insn_func_t)&processor_t::opcode_func_03c,
+  (insn_func_t)&processor_t::opcode_func_03d,
+  (insn_func_t)&processor_t::opcode_func_03e,
+  (insn_func_t)&processor_t::opcode_func_03f,
+  (insn_func_t)&processor_t::opcode_func_040,
+  (insn_func_t)&processor_t::opcode_func_041,
+  (insn_func_t)&processor_t::opcode_func_042,
+  (insn_func_t)&processor_t::opcode_func_043,
+  (insn_func_t)&processor_t::opcode_func_044,
+  (insn_func_t)&processor_t::opcode_func_045,
+  (insn_func_t)&processor_t::opcode_func_046,
+  (insn_func_t)&processor_t::opcode_func_047,
+  (insn_func_t)&processor_t::opcode_func_048,
+  (insn_func_t)&processor_t::opcode_func_049,
+  (insn_func_t)&processor_t::opcode_func_04a,
+  (insn_func_t)&processor_t::opcode_func_04b,
+  (insn_func_t)&processor_t::opcode_func_04c,
+  (insn_func_t)&processor_t::opcode_func_04d,
+  (insn_func_t)&processor_t::opcode_func_04e,
+  (insn_func_t)&processor_t::opcode_func_04f,
+  (insn_func_t)&processor_t::opcode_func_050,
+  (insn_func_t)&processor_t::opcode_func_051,
+  (insn_func_t)&processor_t::opcode_func_052,
+  (insn_func_t)&processor_t::opcode_func_053,
+  (insn_func_t)&processor_t::opcode_func_054,
+  (insn_func_t)&processor_t::opcode_func_055,
+  (insn_func_t)&processor_t::opcode_func_056,
+  (insn_func_t)&processor_t::opcode_func_057,
+  (insn_func_t)&processor_t::opcode_func_058,
+  (insn_func_t)&processor_t::opcode_func_059,
+  (insn_func_t)&processor_t::opcode_func_05a,
+  (insn_func_t)&processor_t::opcode_func_05b,
+  (insn_func_t)&processor_t::opcode_func_05c,
+  (insn_func_t)&processor_t::opcode_func_05d,
+  (insn_func_t)&processor_t::opcode_func_05e,
+  (insn_func_t)&processor_t::opcode_func_05f,
+  (insn_func_t)&processor_t::opcode_func_060,
+  (insn_func_t)&processor_t::opcode_func_061,
+  (insn_func_t)&processor_t::opcode_func_062,
+  (insn_func_t)&processor_t::opcode_func_063,
+  (insn_func_t)&processor_t::opcode_func_064,
+  (insn_func_t)&processor_t::opcode_func_065,
+  (insn_func_t)&processor_t::opcode_func_066,
+  (insn_func_t)&processor_t::opcode_func_067,
+  (insn_func_t)&processor_t::opcode_func_068,
+  (insn_func_t)&processor_t::opcode_func_069,
+  (insn_func_t)&processor_t::opcode_func_06a,
+  (insn_func_t)&processor_t::opcode_func_06b,
+  (insn_func_t)&processor_t::opcode_func_06c,
+  (insn_func_t)&processor_t::opcode_func_06d,
+  (insn_func_t)&processor_t::opcode_func_06e,
+  (insn_func_t)&processor_t::opcode_func_06f,
+  (insn_func_t)&processor_t::opcode_func_070,
+  (insn_func_t)&processor_t::opcode_func_071,
+  (insn_func_t)&processor_t::opcode_func_072,
+  (insn_func_t)&processor_t::opcode_func_073,
+  (insn_func_t)&processor_t::opcode_func_074,
+  (insn_func_t)&processor_t::opcode_func_075,
+  (insn_func_t)&processor_t::opcode_func_076,
+  (insn_func_t)&processor_t::opcode_func_077,
+  (insn_func_t)&processor_t::opcode_func_078,
+  (insn_func_t)&processor_t::opcode_func_079,
+  (insn_func_t)&processor_t::opcode_func_07a,
+  (insn_func_t)&processor_t::opcode_func_07b,
+  (insn_func_t)&processor_t::opcode_func_07c,
+  (insn_func_t)&processor_t::opcode_func_07d,
+  (insn_func_t)&processor_t::opcode_func_07e,
+  (insn_func_t)&processor_t::opcode_func_07f,
+  (insn_func_t)&processor_t::opcode_func_080,
+  (insn_func_t)&processor_t::opcode_func_081,
+  (insn_func_t)&processor_t::opcode_func_082,
+  (insn_func_t)&processor_t::opcode_func_083,
+  (insn_func_t)&processor_t::opcode_func_084,
+  (insn_func_t)&processor_t::opcode_func_085,
+  (insn_func_t)&processor_t::opcode_func_086,
+  (insn_func_t)&processor_t::opcode_func_087,
+  (insn_func_t)&processor_t::opcode_func_088,
+  (insn_func_t)&processor_t::opcode_func_089,
+  (insn_func_t)&processor_t::opcode_func_08a,
+  (insn_func_t)&processor_t::opcode_func_08b,
+  (insn_func_t)&processor_t::opcode_func_08c,
+  (insn_func_t)&processor_t::opcode_func_08d,
+  (insn_func_t)&processor_t::opcode_func_08e,
+  (insn_func_t)&processor_t::opcode_func_08f,
+  (insn_func_t)&processor_t::opcode_func_090,
+  (insn_func_t)&processor_t::opcode_func_091,
+  (insn_func_t)&processor_t::opcode_func_092,
+  (insn_func_t)&processor_t::opcode_func_093,
+  (insn_func_t)&processor_t::opcode_func_094,
+  (insn_func_t)&processor_t::opcode_func_095,
+  (insn_func_t)&processor_t::opcode_func_096,
+  (insn_func_t)&processor_t::opcode_func_097,
+  (insn_func_t)&processor_t::opcode_func_098,
+  (insn_func_t)&processor_t::opcode_func_099,
+  (insn_func_t)&processor_t::opcode_func_09a,
+  (insn_func_t)&processor_t::opcode_func_09b,
+  (insn_func_t)&processor_t::opcode_func_09c,
+  (insn_func_t)&processor_t::opcode_func_09d,
+  (insn_func_t)&processor_t::opcode_func_09e,
+  (insn_func_t)&processor_t::opcode_func_09f,
+  (insn_func_t)&processor_t::opcode_func_0a0,
+  (insn_func_t)&processor_t::opcode_func_0a1,
+  (insn_func_t)&processor_t::opcode_func_0a2,
+  (insn_func_t)&processor_t::opcode_func_0a3,
+  (insn_func_t)&processor_t::opcode_func_0a4,
+  (insn_func_t)&processor_t::opcode_func_0a5,
+  (insn_func_t)&processor_t::opcode_func_0a6,
+  (insn_func_t)&processor_t::opcode_func_0a7,
+  (insn_func_t)&processor_t::opcode_func_0a8,
+  (insn_func_t)&processor_t::opcode_func_0a9,
+  (insn_func_t)&processor_t::opcode_func_0aa,
+  (insn_func_t)&processor_t::opcode_func_0ab,
+  (insn_func_t)&processor_t::opcode_func_0ac,
+  (insn_func_t)&processor_t::opcode_func_0ad,
+  (insn_func_t)&processor_t::opcode_func_0ae,
+  (insn_func_t)&processor_t::opcode_func_0af,
+  (insn_func_t)&processor_t::opcode_func_0b0,
+  (insn_func_t)&processor_t::opcode_func_0b1,
+  (insn_func_t)&processor_t::opcode_func_0b2,
+  (insn_func_t)&processor_t::opcode_func_0b3,
+  (insn_func_t)&processor_t::opcode_func_0b4,
+  (insn_func_t)&processor_t::opcode_func_0b5,
+  (insn_func_t)&processor_t::opcode_func_0b6,
+  (insn_func_t)&processor_t::opcode_func_0b7,
+  (insn_func_t)&processor_t::opcode_func_0b8,
+  (insn_func_t)&processor_t::opcode_func_0b9,
+  (insn_func_t)&processor_t::opcode_func_0ba,
+  (insn_func_t)&processor_t::opcode_func_0bb,
+  (insn_func_t)&processor_t::opcode_func_0bc,
+  (insn_func_t)&processor_t::opcode_func_0bd,
+  (insn_func_t)&processor_t::opcode_func_0be,
+  (insn_func_t)&processor_t::opcode_func_0bf,
+  (insn_func_t)&processor_t::opcode_func_0c0,
+  (insn_func_t)&processor_t::opcode_func_0c1,
+  (insn_func_t)&processor_t::opcode_func_0c2,
+  (insn_func_t)&processor_t::opcode_func_0c3,
+  (insn_func_t)&processor_t::opcode_func_0c4,
+  (insn_func_t)&processor_t::opcode_func_0c5,
+  (insn_func_t)&processor_t::opcode_func_0c6,
+  (insn_func_t)&processor_t::opcode_func_0c7,
+  (insn_func_t)&processor_t::opcode_func_0c8,
+  (insn_func_t)&processor_t::opcode_func_0c9,
+  (insn_func_t)&processor_t::opcode_func_0ca,
+  (insn_func_t)&processor_t::opcode_func_0cb,
+  (insn_func_t)&processor_t::opcode_func_0cc,
+  (insn_func_t)&processor_t::opcode_func_0cd,
+  (insn_func_t)&processor_t::opcode_func_0ce,
+  (insn_func_t)&processor_t::opcode_func_0cf,
+  (insn_func_t)&processor_t::opcode_func_0d0,
+  (insn_func_t)&processor_t::opcode_func_0d1,
+  (insn_func_t)&processor_t::opcode_func_0d2,
+  (insn_func_t)&processor_t::opcode_func_0d3,
+  (insn_func_t)&processor_t::opcode_func_0d4,
+  (insn_func_t)&processor_t::opcode_func_0d5,
+  (insn_func_t)&processor_t::opcode_func_0d6,
+  (insn_func_t)&processor_t::opcode_func_0d7,
+  (insn_func_t)&processor_t::opcode_func_0d8,
+  (insn_func_t)&processor_t::opcode_func_0d9,
+  (insn_func_t)&processor_t::opcode_func_0da,
+  (insn_func_t)&processor_t::opcode_func_0db,
+  (insn_func_t)&processor_t::opcode_func_0dc,
+  (insn_func_t)&processor_t::opcode_func_0dd,
+  (insn_func_t)&processor_t::opcode_func_0de,
+  (insn_func_t)&processor_t::opcode_func_0df,
+  (insn_func_t)&processor_t::opcode_func_0e0,
+  (insn_func_t)&processor_t::opcode_func_0e1,
+  (insn_func_t)&processor_t::opcode_func_0e2,
+  (insn_func_t)&processor_t::opcode_func_0e3,
+  (insn_func_t)&processor_t::opcode_func_0e4,
+  (insn_func_t)&processor_t::opcode_func_0e5,
+  (insn_func_t)&processor_t::opcode_func_0e6,
+  (insn_func_t)&processor_t::opcode_func_0e7,
+  (insn_func_t)&processor_t::opcode_func_0e8,
+  (insn_func_t)&processor_t::opcode_func_0e9,
+  (insn_func_t)&processor_t::opcode_func_0ea,
+  (insn_func_t)&processor_t::opcode_func_0eb,
+  (insn_func_t)&processor_t::opcode_func_0ec,
+  (insn_func_t)&processor_t::opcode_func_0ed,
+  (insn_func_t)&processor_t::opcode_func_0ee,
+  (insn_func_t)&processor_t::opcode_func_0ef,
+  (insn_func_t)&processor_t::opcode_func_0f0,
+  (insn_func_t)&processor_t::opcode_func_0f1,
+  (insn_func_t)&processor_t::opcode_func_0f2,
+  (insn_func_t)&processor_t::opcode_func_0f3,
+  (insn_func_t)&processor_t::opcode_func_0f4,
+  (insn_func_t)&processor_t::opcode_func_0f5,
+  (insn_func_t)&processor_t::opcode_func_0f6,
+  (insn_func_t)&processor_t::opcode_func_0f7,
+  (insn_func_t)&processor_t::opcode_func_0f8,
+  (insn_func_t)&processor_t::opcode_func_0f9,
+  (insn_func_t)&processor_t::opcode_func_0fa,
+  (insn_func_t)&processor_t::opcode_func_0fb,
+  (insn_func_t)&processor_t::opcode_func_0fc,
+  (insn_func_t)&processor_t::opcode_func_0fd,
+  (insn_func_t)&processor_t::opcode_func_0fe,
+  (insn_func_t)&processor_t::opcode_func_0ff,
+  (insn_func_t)&processor_t::opcode_func_100,
+  (insn_func_t)&processor_t::opcode_func_101,
+  (insn_func_t)&processor_t::opcode_func_102,
+  (insn_func_t)&processor_t::opcode_func_103,
+  (insn_func_t)&processor_t::opcode_func_104,
+  (insn_func_t)&processor_t::opcode_func_105,
+  (insn_func_t)&processor_t::opcode_func_106,
+  (insn_func_t)&processor_t::opcode_func_107,
+  (insn_func_t)&processor_t::opcode_func_108,
+  (insn_func_t)&processor_t::opcode_func_109,
+  (insn_func_t)&processor_t::opcode_func_10a,
+  (insn_func_t)&processor_t::opcode_func_10b,
+  (insn_func_t)&processor_t::opcode_func_10c,
+  (insn_func_t)&processor_t::opcode_func_10d,
+  (insn_func_t)&processor_t::opcode_func_10e,
+  (insn_func_t)&processor_t::opcode_func_10f,
+  (insn_func_t)&processor_t::opcode_func_110,
+  (insn_func_t)&processor_t::opcode_func_111,
+  (insn_func_t)&processor_t::opcode_func_112,
+  (insn_func_t)&processor_t::opcode_func_113,
+  (insn_func_t)&processor_t::opcode_func_114,
+  (insn_func_t)&processor_t::opcode_func_115,
+  (insn_func_t)&processor_t::opcode_func_116,
+  (insn_func_t)&processor_t::opcode_func_117,
+  (insn_func_t)&processor_t::opcode_func_118,
+  (insn_func_t)&processor_t::opcode_func_119,
+  (insn_func_t)&processor_t::opcode_func_11a,
+  (insn_func_t)&processor_t::opcode_func_11b,
+  (insn_func_t)&processor_t::opcode_func_11c,
+  (insn_func_t)&processor_t::opcode_func_11d,
+  (insn_func_t)&processor_t::opcode_func_11e,
+  (insn_func_t)&processor_t::opcode_func_11f,
+  (insn_func_t)&processor_t::opcode_func_120,
+  (insn_func_t)&processor_t::opcode_func_121,
+  (insn_func_t)&processor_t::opcode_func_122,
+  (insn_func_t)&processor_t::opcode_func_123,
+  (insn_func_t)&processor_t::opcode_func_124,
+  (insn_func_t)&processor_t::opcode_func_125,
+  (insn_func_t)&processor_t::opcode_func_126,
+  (insn_func_t)&processor_t::opcode_func_127,
+  (insn_func_t)&processor_t::opcode_func_128,
+  (insn_func_t)&processor_t::opcode_func_129,
+  (insn_func_t)&processor_t::opcode_func_12a,
+  (insn_func_t)&processor_t::opcode_func_12b,
+  (insn_func_t)&processor_t::opcode_func_12c,
+  (insn_func_t)&processor_t::opcode_func_12d,
+  (insn_func_t)&processor_t::opcode_func_12e,
+  (insn_func_t)&processor_t::opcode_func_12f,
+  (insn_func_t)&processor_t::opcode_func_130,
+  (insn_func_t)&processor_t::opcode_func_131,
+  (insn_func_t)&processor_t::opcode_func_132,
+  (insn_func_t)&processor_t::opcode_func_133,
+  (insn_func_t)&processor_t::opcode_func_134,
+  (insn_func_t)&processor_t::opcode_func_135,
+  (insn_func_t)&processor_t::opcode_func_136,
+  (insn_func_t)&processor_t::opcode_func_137,
+  (insn_func_t)&processor_t::opcode_func_138,
+  (insn_func_t)&processor_t::opcode_func_139,
+  (insn_func_t)&processor_t::opcode_func_13a,
+  (insn_func_t)&processor_t::opcode_func_13b,
+  (insn_func_t)&processor_t::opcode_func_13c,
+  (insn_func_t)&processor_t::opcode_func_13d,
+  (insn_func_t)&processor_t::opcode_func_13e,
+  (insn_func_t)&processor_t::opcode_func_13f,
+  (insn_func_t)&processor_t::opcode_func_140,
+  (insn_func_t)&processor_t::opcode_func_141,
+  (insn_func_t)&processor_t::opcode_func_142,
+  (insn_func_t)&processor_t::opcode_func_143,
+  (insn_func_t)&processor_t::opcode_func_144,
+  (insn_func_t)&processor_t::opcode_func_145,
+  (insn_func_t)&processor_t::opcode_func_146,
+  (insn_func_t)&processor_t::opcode_func_147,
+  (insn_func_t)&processor_t::opcode_func_148,
+  (insn_func_t)&processor_t::opcode_func_149,
+  (insn_func_t)&processor_t::opcode_func_14a,
+  (insn_func_t)&processor_t::opcode_func_14b,
+  (insn_func_t)&processor_t::opcode_func_14c,
+  (insn_func_t)&processor_t::opcode_func_14d,
+  (insn_func_t)&processor_t::opcode_func_14e,
+  (insn_func_t)&processor_t::opcode_func_14f,
+  (insn_func_t)&processor_t::opcode_func_150,
+  (insn_func_t)&processor_t::opcode_func_151,
+  (insn_func_t)&processor_t::opcode_func_152,
+  (insn_func_t)&processor_t::opcode_func_153,
+  (insn_func_t)&processor_t::opcode_func_154,
+  (insn_func_t)&processor_t::opcode_func_155,
+  (insn_func_t)&processor_t::opcode_func_156,
+  (insn_func_t)&processor_t::opcode_func_157,
+  (insn_func_t)&processor_t::opcode_func_158,
+  (insn_func_t)&processor_t::opcode_func_159,
+  (insn_func_t)&processor_t::opcode_func_15a,
+  (insn_func_t)&processor_t::opcode_func_15b,
+  (insn_func_t)&processor_t::opcode_func_15c,
+  (insn_func_t)&processor_t::opcode_func_15d,
+  (insn_func_t)&processor_t::opcode_func_15e,
+  (insn_func_t)&processor_t::opcode_func_15f,
+  (insn_func_t)&processor_t::opcode_func_160,
+  (insn_func_t)&processor_t::opcode_func_161,
+  (insn_func_t)&processor_t::opcode_func_162,
+  (insn_func_t)&processor_t::opcode_func_163,
+  (insn_func_t)&processor_t::opcode_func_164,
+  (insn_func_t)&processor_t::opcode_func_165,
+  (insn_func_t)&processor_t::opcode_func_166,
+  (insn_func_t)&processor_t::opcode_func_167,
+  (insn_func_t)&processor_t::opcode_func_168,
+  (insn_func_t)&processor_t::opcode_func_169,
+  (insn_func_t)&processor_t::opcode_func_16a,
+  (insn_func_t)&processor_t::opcode_func_16b,
+  (insn_func_t)&processor_t::opcode_func_16c,
+  (insn_func_t)&processor_t::opcode_func_16d,
+  (insn_func_t)&processor_t::opcode_func_16e,
+  (insn_func_t)&processor_t::opcode_func_16f,
+  (insn_func_t)&processor_t::opcode_func_170,
+  (insn_func_t)&processor_t::opcode_func_171,
+  (insn_func_t)&processor_t::opcode_func_172,
+  (insn_func_t)&processor_t::opcode_func_173,
+  (insn_func_t)&processor_t::opcode_func_174,
+  (insn_func_t)&processor_t::opcode_func_175,
+  (insn_func_t)&processor_t::opcode_func_176,
+  (insn_func_t)&processor_t::opcode_func_177,
+  (insn_func_t)&processor_t::opcode_func_178,
+  (insn_func_t)&processor_t::opcode_func_179,
+  (insn_func_t)&processor_t::opcode_func_17a,
+  (insn_func_t)&processor_t::opcode_func_17b,
+  (insn_func_t)&processor_t::opcode_func_17c,
+  (insn_func_t)&processor_t::opcode_func_17d,
+  (insn_func_t)&processor_t::opcode_func_17e,
+  (insn_func_t)&processor_t::opcode_func_17f,
+  (insn_func_t)&processor_t::opcode_func_180,
+  (insn_func_t)&processor_t::opcode_func_181,
+  (insn_func_t)&processor_t::opcode_func_182,
+  (insn_func_t)&processor_t::opcode_func_183,
+  (insn_func_t)&processor_t::opcode_func_184,
+  (insn_func_t)&processor_t::opcode_func_185,
+  (insn_func_t)&processor_t::opcode_func_186,
+  (insn_func_t)&processor_t::opcode_func_187,
+  (insn_func_t)&processor_t::opcode_func_188,
+  (insn_func_t)&processor_t::opcode_func_189,
+  (insn_func_t)&processor_t::opcode_func_18a,
+  (insn_func_t)&processor_t::opcode_func_18b,
+  (insn_func_t)&processor_t::opcode_func_18c,
+  (insn_func_t)&processor_t::opcode_func_18d,
+  (insn_func_t)&processor_t::opcode_func_18e,
+  (insn_func_t)&processor_t::opcode_func_18f,
+  (insn_func_t)&processor_t::opcode_func_190,
+  (insn_func_t)&processor_t::opcode_func_191,
+  (insn_func_t)&processor_t::opcode_func_192,
+  (insn_func_t)&processor_t::opcode_func_193,
+  (insn_func_t)&processor_t::opcode_func_194,
+  (insn_func_t)&processor_t::opcode_func_195,
+  (insn_func_t)&processor_t::opcode_func_196,
+  (insn_func_t)&processor_t::opcode_func_197,
+  (insn_func_t)&processor_t::opcode_func_198,
+  (insn_func_t)&processor_t::opcode_func_199,
+  (insn_func_t)&processor_t::opcode_func_19a,
+  (insn_func_t)&processor_t::opcode_func_19b,
+  (insn_func_t)&processor_t::opcode_func_19c,
+  (insn_func_t)&processor_t::opcode_func_19d,
+  (insn_func_t)&processor_t::opcode_func_19e,
+  (insn_func_t)&processor_t::opcode_func_19f,
+  (insn_func_t)&processor_t::opcode_func_1a0,
+  (insn_func_t)&processor_t::opcode_func_1a1,
+  (insn_func_t)&processor_t::opcode_func_1a2,
+  (insn_func_t)&processor_t::opcode_func_1a3,
+  (insn_func_t)&processor_t::opcode_func_1a4,
+  (insn_func_t)&processor_t::opcode_func_1a5,
+  (insn_func_t)&processor_t::opcode_func_1a6,
+  (insn_func_t)&processor_t::opcode_func_1a7,
+  (insn_func_t)&processor_t::opcode_func_1a8,
+  (insn_func_t)&processor_t::opcode_func_1a9,
+  (insn_func_t)&processor_t::opcode_func_1aa,
+  (insn_func_t)&processor_t::opcode_func_1ab,
+  (insn_func_t)&processor_t::opcode_func_1ac,
+  (insn_func_t)&processor_t::opcode_func_1ad,
+  (insn_func_t)&processor_t::opcode_func_1ae,
+  (insn_func_t)&processor_t::opcode_func_1af,
+  (insn_func_t)&processor_t::opcode_func_1b0,
+  (insn_func_t)&processor_t::opcode_func_1b1,
+  (insn_func_t)&processor_t::opcode_func_1b2,
+  (insn_func_t)&processor_t::opcode_func_1b3,
+  (insn_func_t)&processor_t::opcode_func_1b4,
+  (insn_func_t)&processor_t::opcode_func_1b5,
+  (insn_func_t)&processor_t::opcode_func_1b6,
+  (insn_func_t)&processor_t::opcode_func_1b7,
+  (insn_func_t)&processor_t::opcode_func_1b8,
+  (insn_func_t)&processor_t::opcode_func_1b9,
+  (insn_func_t)&processor_t::opcode_func_1ba,
+  (insn_func_t)&processor_t::opcode_func_1bb,
+  (insn_func_t)&processor_t::opcode_func_1bc,
+  (insn_func_t)&processor_t::opcode_func_1bd,
+  (insn_func_t)&processor_t::opcode_func_1be,
+  (insn_func_t)&processor_t::opcode_func_1bf,
+  (insn_func_t)&processor_t::opcode_func_1c0,
+  (insn_func_t)&processor_t::opcode_func_1c1,
+  (insn_func_t)&processor_t::opcode_func_1c2,
+  (insn_func_t)&processor_t::opcode_func_1c3,
+  (insn_func_t)&processor_t::opcode_func_1c4,
+  (insn_func_t)&processor_t::opcode_func_1c5,
+  (insn_func_t)&processor_t::opcode_func_1c6,
+  (insn_func_t)&processor_t::opcode_func_1c7,
+  (insn_func_t)&processor_t::opcode_func_1c8,
+  (insn_func_t)&processor_t::opcode_func_1c9,
+  (insn_func_t)&processor_t::opcode_func_1ca,
+  (insn_func_t)&processor_t::opcode_func_1cb,
+  (insn_func_t)&processor_t::opcode_func_1cc,
+  (insn_func_t)&processor_t::opcode_func_1cd,
+  (insn_func_t)&processor_t::opcode_func_1ce,
+  (insn_func_t)&processor_t::opcode_func_1cf,
+  (insn_func_t)&processor_t::opcode_func_1d0,
+  (insn_func_t)&processor_t::opcode_func_1d1,
+  (insn_func_t)&processor_t::opcode_func_1d2,
+  (insn_func_t)&processor_t::opcode_func_1d3,
+  (insn_func_t)&processor_t::opcode_func_1d4,
+  (insn_func_t)&processor_t::opcode_func_1d5,
+  (insn_func_t)&processor_t::opcode_func_1d6,
+  (insn_func_t)&processor_t::opcode_func_1d7,
+  (insn_func_t)&processor_t::opcode_func_1d8,
+  (insn_func_t)&processor_t::opcode_func_1d9,
+  (insn_func_t)&processor_t::opcode_func_1da,
+  (insn_func_t)&processor_t::opcode_func_1db,
+  (insn_func_t)&processor_t::opcode_func_1dc,
+  (insn_func_t)&processor_t::opcode_func_1dd,
+  (insn_func_t)&processor_t::opcode_func_1de,
+  (insn_func_t)&processor_t::opcode_func_1df,
+  (insn_func_t)&processor_t::opcode_func_1e0,
+  (insn_func_t)&processor_t::opcode_func_1e1,
+  (insn_func_t)&processor_t::opcode_func_1e2,
+  (insn_func_t)&processor_t::opcode_func_1e3,
+  (insn_func_t)&processor_t::opcode_func_1e4,
+  (insn_func_t)&processor_t::opcode_func_1e5,
+  (insn_func_t)&processor_t::opcode_func_1e6,
+  (insn_func_t)&processor_t::opcode_func_1e7,
+  (insn_func_t)&processor_t::opcode_func_1e8,
+  (insn_func_t)&processor_t::opcode_func_1e9,
+  (insn_func_t)&processor_t::opcode_func_1ea,
+  (insn_func_t)&processor_t::opcode_func_1eb,
+  (insn_func_t)&processor_t::opcode_func_1ec,
+  (insn_func_t)&processor_t::opcode_func_1ed,
+  (insn_func_t)&processor_t::opcode_func_1ee,
+  (insn_func_t)&processor_t::opcode_func_1ef,
+  (insn_func_t)&processor_t::opcode_func_1f0,
+  (insn_func_t)&processor_t::opcode_func_1f1,
+  (insn_func_t)&processor_t::opcode_func_1f2,
+  (insn_func_t)&processor_t::opcode_func_1f3,
+  (insn_func_t)&processor_t::opcode_func_1f4,
+  (insn_func_t)&processor_t::opcode_func_1f5,
+  (insn_func_t)&processor_t::opcode_func_1f6,
+  (insn_func_t)&processor_t::opcode_func_1f7,
+  (insn_func_t)&processor_t::opcode_func_1f8,
+  (insn_func_t)&processor_t::opcode_func_1f9,
+  (insn_func_t)&processor_t::opcode_func_1fa,
+  (insn_func_t)&processor_t::opcode_func_1fb,
+  (insn_func_t)&processor_t::opcode_func_1fc,
+  (insn_func_t)&processor_t::opcode_func_1fd,
+  (insn_func_t)&processor_t::opcode_func_1fe,
+  (insn_func_t)&processor_t::opcode_func_1ff,
+  (insn_func_t)&processor_t::opcode_func_200,
+  (insn_func_t)&processor_t::opcode_func_201,
+  (insn_func_t)&processor_t::opcode_func_202,
+  (insn_func_t)&processor_t::opcode_func_203,
+  (insn_func_t)&processor_t::opcode_func_204,
+  (insn_func_t)&processor_t::opcode_func_205,
+  (insn_func_t)&processor_t::opcode_func_206,
+  (insn_func_t)&processor_t::opcode_func_207,
+  (insn_func_t)&processor_t::opcode_func_208,
+  (insn_func_t)&processor_t::opcode_func_209,
+  (insn_func_t)&processor_t::opcode_func_20a,
+  (insn_func_t)&processor_t::opcode_func_20b,
+  (insn_func_t)&processor_t::opcode_func_20c,
+  (insn_func_t)&processor_t::opcode_func_20d,
+  (insn_func_t)&processor_t::opcode_func_20e,
+  (insn_func_t)&processor_t::opcode_func_20f,
+  (insn_func_t)&processor_t::opcode_func_210,
+  (insn_func_t)&processor_t::opcode_func_211,
+  (insn_func_t)&processor_t::opcode_func_212,
+  (insn_func_t)&processor_t::opcode_func_213,
+  (insn_func_t)&processor_t::opcode_func_214,
+  (insn_func_t)&processor_t::opcode_func_215,
+  (insn_func_t)&processor_t::opcode_func_216,
+  (insn_func_t)&processor_t::opcode_func_217,
+  (insn_func_t)&processor_t::opcode_func_218,
+  (insn_func_t)&processor_t::opcode_func_219,
+  (insn_func_t)&processor_t::opcode_func_21a,
+  (insn_func_t)&processor_t::opcode_func_21b,
+  (insn_func_t)&processor_t::opcode_func_21c,
+  (insn_func_t)&processor_t::opcode_func_21d,
+  (insn_func_t)&processor_t::opcode_func_21e,
+  (insn_func_t)&processor_t::opcode_func_21f,
+  (insn_func_t)&processor_t::opcode_func_220,
+  (insn_func_t)&processor_t::opcode_func_221,
+  (insn_func_t)&processor_t::opcode_func_222,
+  (insn_func_t)&processor_t::opcode_func_223,
+  (insn_func_t)&processor_t::opcode_func_224,
+  (insn_func_t)&processor_t::opcode_func_225,
+  (insn_func_t)&processor_t::opcode_func_226,
+  (insn_func_t)&processor_t::opcode_func_227,
+  (insn_func_t)&processor_t::opcode_func_228,
+  (insn_func_t)&processor_t::opcode_func_229,
+  (insn_func_t)&processor_t::opcode_func_22a,
+  (insn_func_t)&processor_t::opcode_func_22b,
+  (insn_func_t)&processor_t::opcode_func_22c,
+  (insn_func_t)&processor_t::opcode_func_22d,
+  (insn_func_t)&processor_t::opcode_func_22e,
+  (insn_func_t)&processor_t::opcode_func_22f,
+  (insn_func_t)&processor_t::opcode_func_230,
+  (insn_func_t)&processor_t::opcode_func_231,
+  (insn_func_t)&processor_t::opcode_func_232,
+  (insn_func_t)&processor_t::opcode_func_233,
+  (insn_func_t)&processor_t::opcode_func_234,
+  (insn_func_t)&processor_t::opcode_func_235,
+  (insn_func_t)&processor_t::opcode_func_236,
+  (insn_func_t)&processor_t::opcode_func_237,
+  (insn_func_t)&processor_t::opcode_func_238,
+  (insn_func_t)&processor_t::opcode_func_239,
+  (insn_func_t)&processor_t::opcode_func_23a,
+  (insn_func_t)&processor_t::opcode_func_23b,
+  (insn_func_t)&processor_t::opcode_func_23c,
+  (insn_func_t)&processor_t::opcode_func_23d,
+  (insn_func_t)&processor_t::opcode_func_23e,
+  (insn_func_t)&processor_t::opcode_func_23f,
+  (insn_func_t)&processor_t::opcode_func_240,
+  (insn_func_t)&processor_t::opcode_func_241,
+  (insn_func_t)&processor_t::opcode_func_242,
+  (insn_func_t)&processor_t::opcode_func_243,
+  (insn_func_t)&processor_t::opcode_func_244,
+  (insn_func_t)&processor_t::opcode_func_245,
+  (insn_func_t)&processor_t::opcode_func_246,
+  (insn_func_t)&processor_t::opcode_func_247,
+  (insn_func_t)&processor_t::opcode_func_248,
+  (insn_func_t)&processor_t::opcode_func_249,
+  (insn_func_t)&processor_t::opcode_func_24a,
+  (insn_func_t)&processor_t::opcode_func_24b,
+  (insn_func_t)&processor_t::opcode_func_24c,
+  (insn_func_t)&processor_t::opcode_func_24d,
+  (insn_func_t)&processor_t::opcode_func_24e,
+  (insn_func_t)&processor_t::opcode_func_24f,
+  (insn_func_t)&processor_t::opcode_func_250,
+  (insn_func_t)&processor_t::opcode_func_251,
+  (insn_func_t)&processor_t::opcode_func_252,
+  (insn_func_t)&processor_t::opcode_func_253,
+  (insn_func_t)&processor_t::opcode_func_254,
+  (insn_func_t)&processor_t::opcode_func_255,
+  (insn_func_t)&processor_t::opcode_func_256,
+  (insn_func_t)&processor_t::opcode_func_257,
+  (insn_func_t)&processor_t::opcode_func_258,
+  (insn_func_t)&processor_t::opcode_func_259,
+  (insn_func_t)&processor_t::opcode_func_25a,
+  (insn_func_t)&processor_t::opcode_func_25b,
+  (insn_func_t)&processor_t::opcode_func_25c,
+  (insn_func_t)&processor_t::opcode_func_25d,
+  (insn_func_t)&processor_t::opcode_func_25e,
+  (insn_func_t)&processor_t::opcode_func_25f,
+  (insn_func_t)&processor_t::opcode_func_260,
+  (insn_func_t)&processor_t::opcode_func_261,
+  (insn_func_t)&processor_t::opcode_func_262,
+  (insn_func_t)&processor_t::opcode_func_263,
+  (insn_func_t)&processor_t::opcode_func_264,
+  (insn_func_t)&processor_t::opcode_func_265,
+  (insn_func_t)&processor_t::opcode_func_266,
+  (insn_func_t)&processor_t::opcode_func_267,
+  (insn_func_t)&processor_t::opcode_func_268,
+  (insn_func_t)&processor_t::opcode_func_269,
+  (insn_func_t)&processor_t::opcode_func_26a,
+  (insn_func_t)&processor_t::opcode_func_26b,
+  (insn_func_t)&processor_t::opcode_func_26c,
+  (insn_func_t)&processor_t::opcode_func_26d,
+  (insn_func_t)&processor_t::opcode_func_26e,
+  (insn_func_t)&processor_t::opcode_func_26f,
+  (insn_func_t)&processor_t::opcode_func_270,
+  (insn_func_t)&processor_t::opcode_func_271,
+  (insn_func_t)&processor_t::opcode_func_272,
+  (insn_func_t)&processor_t::opcode_func_273,
+  (insn_func_t)&processor_t::opcode_func_274,
+  (insn_func_t)&processor_t::opcode_func_275,
+  (insn_func_t)&processor_t::opcode_func_276,
+  (insn_func_t)&processor_t::opcode_func_277,
+  (insn_func_t)&processor_t::opcode_func_278,
+  (insn_func_t)&processor_t::opcode_func_279,
+  (insn_func_t)&processor_t::opcode_func_27a,
+  (insn_func_t)&processor_t::opcode_func_27b,
+  (insn_func_t)&processor_t::opcode_func_27c,
+  (insn_func_t)&processor_t::opcode_func_27d,
+  (insn_func_t)&processor_t::opcode_func_27e,
+  (insn_func_t)&processor_t::opcode_func_27f,
+  (insn_func_t)&processor_t::opcode_func_280,
+  (insn_func_t)&processor_t::opcode_func_281,
+  (insn_func_t)&processor_t::opcode_func_282,
+  (insn_func_t)&processor_t::opcode_func_283,
+  (insn_func_t)&processor_t::opcode_func_284,
+  (insn_func_t)&processor_t::opcode_func_285,
+  (insn_func_t)&processor_t::opcode_func_286,
+  (insn_func_t)&processor_t::opcode_func_287,
+  (insn_func_t)&processor_t::opcode_func_288,
+  (insn_func_t)&processor_t::opcode_func_289,
+  (insn_func_t)&processor_t::opcode_func_28a,
+  (insn_func_t)&processor_t::opcode_func_28b,
+  (insn_func_t)&processor_t::opcode_func_28c,
+  (insn_func_t)&processor_t::opcode_func_28d,
+  (insn_func_t)&processor_t::opcode_func_28e,
+  (insn_func_t)&processor_t::opcode_func_28f,
+  (insn_func_t)&processor_t::opcode_func_290,
+  (insn_func_t)&processor_t::opcode_func_291,
+  (insn_func_t)&processor_t::opcode_func_292,
+  (insn_func_t)&processor_t::opcode_func_293,
+  (insn_func_t)&processor_t::opcode_func_294,
+  (insn_func_t)&processor_t::opcode_func_295,
+  (insn_func_t)&processor_t::opcode_func_296,
+  (insn_func_t)&processor_t::opcode_func_297,
+  (insn_func_t)&processor_t::opcode_func_298,
+  (insn_func_t)&processor_t::opcode_func_299,
+  (insn_func_t)&processor_t::opcode_func_29a,
+  (insn_func_t)&processor_t::opcode_func_29b,
+  (insn_func_t)&processor_t::opcode_func_29c,
+  (insn_func_t)&processor_t::opcode_func_29d,
+  (insn_func_t)&processor_t::opcode_func_29e,
+  (insn_func_t)&processor_t::opcode_func_29f,
+  (insn_func_t)&processor_t::opcode_func_2a0,
+  (insn_func_t)&processor_t::opcode_func_2a1,
+  (insn_func_t)&processor_t::opcode_func_2a2,
+  (insn_func_t)&processor_t::opcode_func_2a3,
+  (insn_func_t)&processor_t::opcode_func_2a4,
+  (insn_func_t)&processor_t::opcode_func_2a5,
+  (insn_func_t)&processor_t::opcode_func_2a6,
+  (insn_func_t)&processor_t::opcode_func_2a7,
+  (insn_func_t)&processor_t::opcode_func_2a8,
+  (insn_func_t)&processor_t::opcode_func_2a9,
+  (insn_func_t)&processor_t::opcode_func_2aa,
+  (insn_func_t)&processor_t::opcode_func_2ab,
+  (insn_func_t)&processor_t::opcode_func_2ac,
+  (insn_func_t)&processor_t::opcode_func_2ad,
+  (insn_func_t)&processor_t::opcode_func_2ae,
+  (insn_func_t)&processor_t::opcode_func_2af,
+  (insn_func_t)&processor_t::opcode_func_2b0,
+  (insn_func_t)&processor_t::opcode_func_2b1,
+  (insn_func_t)&processor_t::opcode_func_2b2,
+  (insn_func_t)&processor_t::opcode_func_2b3,
+  (insn_func_t)&processor_t::opcode_func_2b4,
+  (insn_func_t)&processor_t::opcode_func_2b5,
+  (insn_func_t)&processor_t::opcode_func_2b6,
+  (insn_func_t)&processor_t::opcode_func_2b7,
+  (insn_func_t)&processor_t::opcode_func_2b8,
+  (insn_func_t)&processor_t::opcode_func_2b9,
+  (insn_func_t)&processor_t::opcode_func_2ba,
+  (insn_func_t)&processor_t::opcode_func_2bb,
+  (insn_func_t)&processor_t::opcode_func_2bc,
+  (insn_func_t)&processor_t::opcode_func_2bd,
+  (insn_func_t)&processor_t::opcode_func_2be,
+  (insn_func_t)&processor_t::opcode_func_2bf,
+  (insn_func_t)&processor_t::opcode_func_2c0,
+  (insn_func_t)&processor_t::opcode_func_2c1,
+  (insn_func_t)&processor_t::opcode_func_2c2,
+  (insn_func_t)&processor_t::opcode_func_2c3,
+  (insn_func_t)&processor_t::opcode_func_2c4,
+  (insn_func_t)&processor_t::opcode_func_2c5,
+  (insn_func_t)&processor_t::opcode_func_2c6,
+  (insn_func_t)&processor_t::opcode_func_2c7,
+  (insn_func_t)&processor_t::opcode_func_2c8,
+  (insn_func_t)&processor_t::opcode_func_2c9,
+  (insn_func_t)&processor_t::opcode_func_2ca,
+  (insn_func_t)&processor_t::opcode_func_2cb,
+  (insn_func_t)&processor_t::opcode_func_2cc,
+  (insn_func_t)&processor_t::opcode_func_2cd,
+  (insn_func_t)&processor_t::opcode_func_2ce,
+  (insn_func_t)&processor_t::opcode_func_2cf,
+  (insn_func_t)&processor_t::opcode_func_2d0,
+  (insn_func_t)&processor_t::opcode_func_2d1,
+  (insn_func_t)&processor_t::opcode_func_2d2,
+  (insn_func_t)&processor_t::opcode_func_2d3,
+  (insn_func_t)&processor_t::opcode_func_2d4,
+  (insn_func_t)&processor_t::opcode_func_2d5,
+  (insn_func_t)&processor_t::opcode_func_2d6,
+  (insn_func_t)&processor_t::opcode_func_2d7,
+  (insn_func_t)&processor_t::opcode_func_2d8,
+  (insn_func_t)&processor_t::opcode_func_2d9,
+  (insn_func_t)&processor_t::opcode_func_2da,
+  (insn_func_t)&processor_t::opcode_func_2db,
+  (insn_func_t)&processor_t::opcode_func_2dc,
+  (insn_func_t)&processor_t::opcode_func_2dd,
+  (insn_func_t)&processor_t::opcode_func_2de,
+  (insn_func_t)&processor_t::opcode_func_2df,
+  (insn_func_t)&processor_t::opcode_func_2e0,
+  (insn_func_t)&processor_t::opcode_func_2e1,
+  (insn_func_t)&processor_t::opcode_func_2e2,
+  (insn_func_t)&processor_t::opcode_func_2e3,
+  (insn_func_t)&processor_t::opcode_func_2e4,
+  (insn_func_t)&processor_t::opcode_func_2e5,
+  (insn_func_t)&processor_t::opcode_func_2e6,
+  (insn_func_t)&processor_t::opcode_func_2e7,
+  (insn_func_t)&processor_t::opcode_func_2e8,
+  (insn_func_t)&processor_t::opcode_func_2e9,
+  (insn_func_t)&processor_t::opcode_func_2ea,
+  (insn_func_t)&processor_t::opcode_func_2eb,
+  (insn_func_t)&processor_t::opcode_func_2ec,
+  (insn_func_t)&processor_t::opcode_func_2ed,
+  (insn_func_t)&processor_t::opcode_func_2ee,
+  (insn_func_t)&processor_t::opcode_func_2ef,
+  (insn_func_t)&processor_t::opcode_func_2f0,
+  (insn_func_t)&processor_t::opcode_func_2f1,
+  (insn_func_t)&processor_t::opcode_func_2f2,
+  (insn_func_t)&processor_t::opcode_func_2f3,
+  (insn_func_t)&processor_t::opcode_func_2f4,
+  (insn_func_t)&processor_t::opcode_func_2f5,
+  (insn_func_t)&processor_t::opcode_func_2f6,
+  (insn_func_t)&processor_t::opcode_func_2f7,
+  (insn_func_t)&processor_t::opcode_func_2f8,
+  (insn_func_t)&processor_t::opcode_func_2f9,
+  (insn_func_t)&processor_t::opcode_func_2fa,
+  (insn_func_t)&processor_t::opcode_func_2fb,
+  (insn_func_t)&processor_t::opcode_func_2fc,
+  (insn_func_t)&processor_t::opcode_func_2fd,
+  (insn_func_t)&processor_t::opcode_func_2fe,
+  (insn_func_t)&processor_t::opcode_func_2ff,
+  (insn_func_t)&processor_t::opcode_func_300,
+  (insn_func_t)&processor_t::opcode_func_301,
+  (insn_func_t)&processor_t::opcode_func_302,
+  (insn_func_t)&processor_t::opcode_func_303,
+  (insn_func_t)&processor_t::opcode_func_304,
+  (insn_func_t)&processor_t::opcode_func_305,
+  (insn_func_t)&processor_t::opcode_func_306,
+  (insn_func_t)&processor_t::opcode_func_307,
+  (insn_func_t)&processor_t::opcode_func_308,
+  (insn_func_t)&processor_t::opcode_func_309,
+  (insn_func_t)&processor_t::opcode_func_30a,
+  (insn_func_t)&processor_t::opcode_func_30b,
+  (insn_func_t)&processor_t::opcode_func_30c,
+  (insn_func_t)&processor_t::opcode_func_30d,
+  (insn_func_t)&processor_t::opcode_func_30e,
+  (insn_func_t)&processor_t::opcode_func_30f,
+  (insn_func_t)&processor_t::opcode_func_310,
+  (insn_func_t)&processor_t::opcode_func_311,
+  (insn_func_t)&processor_t::opcode_func_312,
+  (insn_func_t)&processor_t::opcode_func_313,
+  (insn_func_t)&processor_t::opcode_func_314,
+  (insn_func_t)&processor_t::opcode_func_315,
+  (insn_func_t)&processor_t::opcode_func_316,
+  (insn_func_t)&processor_t::opcode_func_317,
+  (insn_func_t)&processor_t::opcode_func_318,
+  (insn_func_t)&processor_t::opcode_func_319,
+  (insn_func_t)&processor_t::opcode_func_31a,
+  (insn_func_t)&processor_t::opcode_func_31b,
+  (insn_func_t)&processor_t::opcode_func_31c,
+  (insn_func_t)&processor_t::opcode_func_31d,
+  (insn_func_t)&processor_t::opcode_func_31e,
+  (insn_func_t)&processor_t::opcode_func_31f,
+  (insn_func_t)&processor_t::opcode_func_320,
+  (insn_func_t)&processor_t::opcode_func_321,
+  (insn_func_t)&processor_t::opcode_func_322,
+  (insn_func_t)&processor_t::opcode_func_323,
+  (insn_func_t)&processor_t::opcode_func_324,
+  (insn_func_t)&processor_t::opcode_func_325,
+  (insn_func_t)&processor_t::opcode_func_326,
+  (insn_func_t)&processor_t::opcode_func_327,
+  (insn_func_t)&processor_t::opcode_func_328,
+  (insn_func_t)&processor_t::opcode_func_329,
+  (insn_func_t)&processor_t::opcode_func_32a,
+  (insn_func_t)&processor_t::opcode_func_32b,
+  (insn_func_t)&processor_t::opcode_func_32c,
+  (insn_func_t)&processor_t::opcode_func_32d,
+  (insn_func_t)&processor_t::opcode_func_32e,
+  (insn_func_t)&processor_t::opcode_func_32f,
+  (insn_func_t)&processor_t::opcode_func_330,
+  (insn_func_t)&processor_t::opcode_func_331,
+  (insn_func_t)&processor_t::opcode_func_332,
+  (insn_func_t)&processor_t::opcode_func_333,
+  (insn_func_t)&processor_t::opcode_func_334,
+  (insn_func_t)&processor_t::opcode_func_335,
+  (insn_func_t)&processor_t::opcode_func_336,
+  (insn_func_t)&processor_t::opcode_func_337,
+  (insn_func_t)&processor_t::opcode_func_338,
+  (insn_func_t)&processor_t::opcode_func_339,
+  (insn_func_t)&processor_t::opcode_func_33a,
+  (insn_func_t)&processor_t::opcode_func_33b,
+  (insn_func_t)&processor_t::opcode_func_33c,
+  (insn_func_t)&processor_t::opcode_func_33d,
+  (insn_func_t)&processor_t::opcode_func_33e,
+  (insn_func_t)&processor_t::opcode_func_33f,
+  (insn_func_t)&processor_t::opcode_func_340,
+  (insn_func_t)&processor_t::opcode_func_341,
+  (insn_func_t)&processor_t::opcode_func_342,
+  (insn_func_t)&processor_t::opcode_func_343,
+  (insn_func_t)&processor_t::opcode_func_344,
+  (insn_func_t)&processor_t::opcode_func_345,
+  (insn_func_t)&processor_t::opcode_func_346,
+  (insn_func_t)&processor_t::opcode_func_347,
+  (insn_func_t)&processor_t::opcode_func_348,
+  (insn_func_t)&processor_t::opcode_func_349,
+  (insn_func_t)&processor_t::opcode_func_34a,
+  (insn_func_t)&processor_t::opcode_func_34b,
+  (insn_func_t)&processor_t::opcode_func_34c,
+  (insn_func_t)&processor_t::opcode_func_34d,
+  (insn_func_t)&processor_t::opcode_func_34e,
+  (insn_func_t)&processor_t::opcode_func_34f,
+  (insn_func_t)&processor_t::opcode_func_350,
+  (insn_func_t)&processor_t::opcode_func_351,
+  (insn_func_t)&processor_t::opcode_func_352,
+  (insn_func_t)&processor_t::opcode_func_353,
+  (insn_func_t)&processor_t::opcode_func_354,
+  (insn_func_t)&processor_t::opcode_func_355,
+  (insn_func_t)&processor_t::opcode_func_356,
+  (insn_func_t)&processor_t::opcode_func_357,
+  (insn_func_t)&processor_t::opcode_func_358,
+  (insn_func_t)&processor_t::opcode_func_359,
+  (insn_func_t)&processor_t::opcode_func_35a,
+  (insn_func_t)&processor_t::opcode_func_35b,
+  (insn_func_t)&processor_t::opcode_func_35c,
+  (insn_func_t)&processor_t::opcode_func_35d,
+  (insn_func_t)&processor_t::opcode_func_35e,
+  (insn_func_t)&processor_t::opcode_func_35f,
+  (insn_func_t)&processor_t::opcode_func_360,
+  (insn_func_t)&processor_t::opcode_func_361,
+  (insn_func_t)&processor_t::opcode_func_362,
+  (insn_func_t)&processor_t::opcode_func_363,
+  (insn_func_t)&processor_t::opcode_func_364,
+  (insn_func_t)&processor_t::opcode_func_365,
+  (insn_func_t)&processor_t::opcode_func_366,
+  (insn_func_t)&processor_t::opcode_func_367,
+  (insn_func_t)&processor_t::opcode_func_368,
+  (insn_func_t)&processor_t::opcode_func_369,
+  (insn_func_t)&processor_t::opcode_func_36a,
+  (insn_func_t)&processor_t::opcode_func_36b,
+  (insn_func_t)&processor_t::opcode_func_36c,
+  (insn_func_t)&processor_t::opcode_func_36d,
+  (insn_func_t)&processor_t::opcode_func_36e,
+  (insn_func_t)&processor_t::opcode_func_36f,
+  (insn_func_t)&processor_t::opcode_func_370,
+  (insn_func_t)&processor_t::opcode_func_371,
+  (insn_func_t)&processor_t::opcode_func_372,
+  (insn_func_t)&processor_t::opcode_func_373,
+  (insn_func_t)&processor_t::opcode_func_374,
+  (insn_func_t)&processor_t::opcode_func_375,
+  (insn_func_t)&processor_t::opcode_func_376,
+  (insn_func_t)&processor_t::opcode_func_377,
+  (insn_func_t)&processor_t::opcode_func_378,
+  (insn_func_t)&processor_t::opcode_func_379,
+  (insn_func_t)&processor_t::opcode_func_37a,
+  (insn_func_t)&processor_t::opcode_func_37b,
+  (insn_func_t)&processor_t::opcode_func_37c,
+  (insn_func_t)&processor_t::opcode_func_37d,
+  (insn_func_t)&processor_t::opcode_func_37e,
+  (insn_func_t)&processor_t::opcode_func_37f,
+  (insn_func_t)&processor_t::opcode_func_380,
+  (insn_func_t)&processor_t::opcode_func_381,
+  (insn_func_t)&processor_t::opcode_func_382,
+  (insn_func_t)&processor_t::opcode_func_383,
+  (insn_func_t)&processor_t::opcode_func_384,
+  (insn_func_t)&processor_t::opcode_func_385,
+  (insn_func_t)&processor_t::opcode_func_386,
+  (insn_func_t)&processor_t::opcode_func_387,
+  (insn_func_t)&processor_t::opcode_func_388,
+  (insn_func_t)&processor_t::opcode_func_389,
+  (insn_func_t)&processor_t::opcode_func_38a,
+  (insn_func_t)&processor_t::opcode_func_38b,
+  (insn_func_t)&processor_t::opcode_func_38c,
+  (insn_func_t)&processor_t::opcode_func_38d,
+  (insn_func_t)&processor_t::opcode_func_38e,
+  (insn_func_t)&processor_t::opcode_func_38f,
+  (insn_func_t)&processor_t::opcode_func_390,
+  (insn_func_t)&processor_t::opcode_func_391,
+  (insn_func_t)&processor_t::opcode_func_392,
+  (insn_func_t)&processor_t::opcode_func_393,
+  (insn_func_t)&processor_t::opcode_func_394,
+  (insn_func_t)&processor_t::opcode_func_395,
+  (insn_func_t)&processor_t::opcode_func_396,
+  (insn_func_t)&processor_t::opcode_func_397,
+  (insn_func_t)&processor_t::opcode_func_398,
+  (insn_func_t)&processor_t::opcode_func_399,
+  (insn_func_t)&processor_t::opcode_func_39a,
+  (insn_func_t)&processor_t::opcode_func_39b,
+  (insn_func_t)&processor_t::opcode_func_39c,
+  (insn_func_t)&processor_t::opcode_func_39d,
+  (insn_func_t)&processor_t::opcode_func_39e,
+  (insn_func_t)&processor_t::opcode_func_39f,
+  (insn_func_t)&processor_t::opcode_func_3a0,
+  (insn_func_t)&processor_t::opcode_func_3a1,
+  (insn_func_t)&processor_t::opcode_func_3a2,
+  (insn_func_t)&processor_t::opcode_func_3a3,
+  (insn_func_t)&processor_t::opcode_func_3a4,
+  (insn_func_t)&processor_t::opcode_func_3a5,
+  (insn_func_t)&processor_t::opcode_func_3a6,
+  (insn_func_t)&processor_t::opcode_func_3a7,
+  (insn_func_t)&processor_t::opcode_func_3a8,
+  (insn_func_t)&processor_t::opcode_func_3a9,
+  (insn_func_t)&processor_t::opcode_func_3aa,
+  (insn_func_t)&processor_t::opcode_func_3ab,
+  (insn_func_t)&processor_t::opcode_func_3ac,
+  (insn_func_t)&processor_t::opcode_func_3ad,
+  (insn_func_t)&processor_t::opcode_func_3ae,
+  (insn_func_t)&processor_t::opcode_func_3af,
+  (insn_func_t)&processor_t::opcode_func_3b0,
+  (insn_func_t)&processor_t::opcode_func_3b1,
+  (insn_func_t)&processor_t::opcode_func_3b2,
+  (insn_func_t)&processor_t::opcode_func_3b3,
+  (insn_func_t)&processor_t::opcode_func_3b4,
+  (insn_func_t)&processor_t::opcode_func_3b5,
+  (insn_func_t)&processor_t::opcode_func_3b6,
+  (insn_func_t)&processor_t::opcode_func_3b7,
+  (insn_func_t)&processor_t::opcode_func_3b8,
+  (insn_func_t)&processor_t::opcode_func_3b9,
+  (insn_func_t)&processor_t::opcode_func_3ba,
+  (insn_func_t)&processor_t::opcode_func_3bb,
+  (insn_func_t)&processor_t::opcode_func_3bc,
+  (insn_func_t)&processor_t::opcode_func_3bd,
+  (insn_func_t)&processor_t::opcode_func_3be,
+  (insn_func_t)&processor_t::opcode_func_3bf,
+  (insn_func_t)&processor_t::opcode_func_3c0,
+  (insn_func_t)&processor_t::opcode_func_3c1,
+  (insn_func_t)&processor_t::opcode_func_3c2,
+  (insn_func_t)&processor_t::opcode_func_3c3,
+  (insn_func_t)&processor_t::opcode_func_3c4,
+  (insn_func_t)&processor_t::opcode_func_3c5,
+  (insn_func_t)&processor_t::opcode_func_3c6,
+  (insn_func_t)&processor_t::opcode_func_3c7,
+  (insn_func_t)&processor_t::opcode_func_3c8,
+  (insn_func_t)&processor_t::opcode_func_3c9,
+  (insn_func_t)&processor_t::opcode_func_3ca,
+  (insn_func_t)&processor_t::opcode_func_3cb,
+  (insn_func_t)&processor_t::opcode_func_3cc,
+  (insn_func_t)&processor_t::opcode_func_3cd,
+  (insn_func_t)&processor_t::opcode_func_3ce,
+  (insn_func_t)&processor_t::opcode_func_3cf,
+  (insn_func_t)&processor_t::opcode_func_3d0,
+  (insn_func_t)&processor_t::opcode_func_3d1,
+  (insn_func_t)&processor_t::opcode_func_3d2,
+  (insn_func_t)&processor_t::opcode_func_3d3,
+  (insn_func_t)&processor_t::opcode_func_3d4,
+  (insn_func_t)&processor_t::opcode_func_3d5,
+  (insn_func_t)&processor_t::opcode_func_3d6,
+  (insn_func_t)&processor_t::opcode_func_3d7,
+  (insn_func_t)&processor_t::opcode_func_3d8,
+  (insn_func_t)&processor_t::opcode_func_3d9,
+  (insn_func_t)&processor_t::opcode_func_3da,
+  (insn_func_t)&processor_t::opcode_func_3db,
+  (insn_func_t)&processor_t::opcode_func_3dc,
+  (insn_func_t)&processor_t::opcode_func_3dd,
+  (insn_func_t)&processor_t::opcode_func_3de,
+  (insn_func_t)&processor_t::opcode_func_3df,
+  (insn_func_t)&processor_t::opcode_func_3e0,
+  (insn_func_t)&processor_t::opcode_func_3e1,
+  (insn_func_t)&processor_t::opcode_func_3e2,
+  (insn_func_t)&processor_t::opcode_func_3e3,
+  (insn_func_t)&processor_t::opcode_func_3e4,
+  (insn_func_t)&processor_t::opcode_func_3e5,
+  (insn_func_t)&processor_t::opcode_func_3e6,
+  (insn_func_t)&processor_t::opcode_func_3e7,
+  (insn_func_t)&processor_t::opcode_func_3e8,
+  (insn_func_t)&processor_t::opcode_func_3e9,
+  (insn_func_t)&processor_t::opcode_func_3ea,
+  (insn_func_t)&processor_t::opcode_func_3eb,
+  (insn_func_t)&processor_t::opcode_func_3ec,
+  (insn_func_t)&processor_t::opcode_func_3ed,
+  (insn_func_t)&processor_t::opcode_func_3ee,
+  (insn_func_t)&processor_t::opcode_func_3ef,
+  (insn_func_t)&processor_t::opcode_func_3f0,
+  (insn_func_t)&processor_t::opcode_func_3f1,
+  (insn_func_t)&processor_t::opcode_func_3f2,
+  (insn_func_t)&processor_t::opcode_func_3f3,
+  (insn_func_t)&processor_t::opcode_func_3f4,
+  (insn_func_t)&processor_t::opcode_func_3f5,
+  (insn_func_t)&processor_t::opcode_func_3f6,
+  (insn_func_t)&processor_t::opcode_func_3f7,
+  (insn_func_t)&processor_t::opcode_func_3f8,
+  (insn_func_t)&processor_t::opcode_func_3f9,
+  (insn_func_t)&processor_t::opcode_func_3fa,
+  (insn_func_t)&processor_t::opcode_func_3fb,
+  (insn_func_t)&processor_t::opcode_func_3fc,
+  (insn_func_t)&processor_t::opcode_func_3fd,
+  (insn_func_t)&processor_t::opcode_func_3fe,
+  (insn_func_t)&processor_t::opcode_func_3ff,
+};
diff --git a/riscv/dispatch_0.cc b/riscv/dispatch_0.cc
new file mode 100644 (file)
index 0000000..a22acd2
--- /dev/null
@@ -0,0 +1,887 @@
+#include "insn_includes.h"
+
+reg_t processor_t::opcode_func_000(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000000);
+    #include "insns/c_li.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_00a(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000a);
+    #include "insns/c_lw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_014(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000014);
+    #include "insns/c_flw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_01e(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_028(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000008);
+    #include "insns/c_swsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_032(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x12)
+  {
+    reg_t npc = pc + insn_length(0x00000012);
+    #include "insns/c_lw0.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x8012)
+  {
+    reg_t npc = pc + insn_length(0x00008012);
+    #include "insns/c_ld0.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_03c(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000001c);
+    #include "insns/c_add3.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_046(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000006);
+    #include "insns/c_sdsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_050(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000010);
+    #include "insns/c_beq.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_05a(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x801a)
+  {
+    reg_t npc = pc + insn_length(0x0000801a);
+    #include "insns/c_sub.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x1a)
+  {
+    reg_t npc = pc + insn_length(0x0000001a);
+    #include "insns/c_add.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_064(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000004);
+    #include "insns/c_ldsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_06e(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_078(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000018);
+    #include "insns/c_fsd.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_082(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x2)
+  {
+    reg_t npc = pc + insn_length(0x00000002);
+    #include "insns/c_move.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x8002)
+  {
+    reg_t npc = pc + insn_length(0x00008002);
+    #include "insns/c_j.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_08c(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000c);
+    #include "insns/c_sd.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_096(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000016);
+    #include "insns/c_fsw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_0a0(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000000);
+    #include "insns/c_li.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_0aa(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000a);
+    #include "insns/c_lw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_0b4(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000014);
+    #include "insns/c_flw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_0be(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_0c8(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000008);
+    #include "insns/c_swsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_0d2(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x12)
+  {
+    reg_t npc = pc + insn_length(0x00000012);
+    #include "insns/c_lw0.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x8012)
+  {
+    reg_t npc = pc + insn_length(0x00008012);
+    #include "insns/c_ld0.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_0dc(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000001c);
+    #include "insns/c_add3.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_0e6(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000006);
+    #include "insns/c_sdsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_0f0(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000010);
+    #include "insns/c_beq.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_0fa(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x801a)
+  {
+    reg_t npc = pc + insn_length(0x0000801a);
+    #include "insns/c_sub.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x1a)
+  {
+    reg_t npc = pc + insn_length(0x0000001a);
+    #include "insns/c_add.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_104(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000004);
+    #include "insns/c_ldsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_10e(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_118(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000018);
+    #include "insns/c_fsd.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_122(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x2)
+  {
+    reg_t npc = pc + insn_length(0x00000002);
+    #include "insns/c_move.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x8002)
+  {
+    reg_t npc = pc + insn_length(0x00008002);
+    #include "insns/c_j.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_12c(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000c);
+    #include "insns/c_sd.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_136(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000016);
+    #include "insns/c_fsw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_140(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000000);
+    #include "insns/c_li.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_14a(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000a);
+    #include "insns/c_lw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_154(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000014);
+    #include "insns/c_flw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_15e(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_168(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000008);
+    #include "insns/c_swsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_172(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x12)
+  {
+    reg_t npc = pc + insn_length(0x00000012);
+    #include "insns/c_lw0.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x8012)
+  {
+    reg_t npc = pc + insn_length(0x00008012);
+    #include "insns/c_ld0.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_17c(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000011c);
+    #include "insns/c_sub3.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_186(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000006);
+    #include "insns/c_sdsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_190(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000010);
+    #include "insns/c_beq.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_19a(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x801a)
+  {
+    reg_t npc = pc + insn_length(0x0000801a);
+    #include "insns/c_sub.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x1a)
+  {
+    reg_t npc = pc + insn_length(0x0000001a);
+    #include "insns/c_add.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_1a4(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000004);
+    #include "insns/c_ldsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_1ae(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_1b8(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000018);
+    #include "insns/c_fsd.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_1c2(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x2)
+  {
+    reg_t npc = pc + insn_length(0x00000002);
+    #include "insns/c_move.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x8002)
+  {
+    reg_t npc = pc + insn_length(0x00008002);
+    #include "insns/c_j.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_1cc(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000c);
+    #include "insns/c_sd.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_1d6(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000016);
+    #include "insns/c_fsw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_1e0(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000000);
+    #include "insns/c_li.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_1ea(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000a);
+    #include "insns/c_lw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_1f4(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000014);
+    #include "insns/c_flw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_1fe(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_208(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000008);
+    #include "insns/c_swsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_212(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x12)
+  {
+    reg_t npc = pc + insn_length(0x00000012);
+    #include "insns/c_lw0.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x8012)
+  {
+    reg_t npc = pc + insn_length(0x00008012);
+    #include "insns/c_ld0.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_21c(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000021c);
+    #include "insns/c_or3.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_226(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000006);
+    #include "insns/c_sdsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_230(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000010);
+    #include "insns/c_beq.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_23a(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x801a)
+  {
+    reg_t npc = pc + insn_length(0x0000801a);
+    #include "insns/c_sub.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x1a)
+  {
+    reg_t npc = pc + insn_length(0x0000001a);
+    #include "insns/c_add.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_244(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000004);
+    #include "insns/c_ldsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_24e(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_258(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000018);
+    #include "insns/c_fsd.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_262(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x2)
+  {
+    reg_t npc = pc + insn_length(0x00000002);
+    #include "insns/c_move.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x8002)
+  {
+    reg_t npc = pc + insn_length(0x00008002);
+    #include "insns/c_j.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_26c(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000c);
+    #include "insns/c_sd.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_276(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000016);
+    #include "insns/c_fsw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_280(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000000);
+    #include "insns/c_li.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_28a(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000a);
+    #include "insns/c_lw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_294(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000014);
+    #include "insns/c_flw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_29e(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_2a8(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000008);
+    #include "insns/c_swsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_2b2(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x12)
+  {
+    reg_t npc = pc + insn_length(0x00000012);
+    #include "insns/c_lw0.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x8012)
+  {
+    reg_t npc = pc + insn_length(0x00008012);
+    #include "insns/c_ld0.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_2bc(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000021c);
+    #include "insns/c_or3.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_2c6(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000006);
+    #include "insns/c_sdsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_2d0(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000010);
+    #include "insns/c_beq.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_2da(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x801a)
+  {
+    reg_t npc = pc + insn_length(0x0000801a);
+    #include "insns/c_sub.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x1a)
+  {
+    reg_t npc = pc + insn_length(0x0000001a);
+    #include "insns/c_add.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_2e4(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000004);
+    #include "insns/c_ldsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_2ee(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_2f8(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000018);
+    #include "insns/c_fsd.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_302(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x2)
+  {
+    reg_t npc = pc + insn_length(0x00000002);
+    #include "insns/c_move.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x8002)
+  {
+    reg_t npc = pc + insn_length(0x00008002);
+    #include "insns/c_j.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_30c(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000c);
+    #include "insns/c_sd.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_316(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000016);
+    #include "insns/c_fsw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_320(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000000);
+    #include "insns/c_li.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_32a(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000a);
+    #include "insns/c_lw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_334(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000014);
+    #include "insns/c_flw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_33e(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_348(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000008);
+    #include "insns/c_swsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_352(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x12)
+  {
+    reg_t npc = pc + insn_length(0x00000012);
+    #include "insns/c_lw0.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x8012)
+  {
+    reg_t npc = pc + insn_length(0x00008012);
+    #include "insns/c_ld0.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_35c(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000031c);
+    #include "insns/c_and3.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_366(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000006);
+    #include "insns/c_sdsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_370(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000010);
+    #include "insns/c_beq.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_37a(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x801a)
+  {
+    reg_t npc = pc + insn_length(0x0000801a);
+    #include "insns/c_sub.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x1a)
+  {
+    reg_t npc = pc + insn_length(0x0000001a);
+    #include "insns/c_add.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_384(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000004);
+    #include "insns/c_ldsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_38e(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_398(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000018);
+    #include "insns/c_fsd.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_3a2(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x2)
+  {
+    reg_t npc = pc + insn_length(0x00000002);
+    #include "insns/c_move.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x8002)
+  {
+    reg_t npc = pc + insn_length(0x00008002);
+    #include "insns/c_j.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_3ac(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000c);
+    #include "insns/c_sd.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_3b6(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000016);
+    #include "insns/c_fsw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_3c0(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000000);
+    #include "insns/c_li.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_3ca(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000a);
+    #include "insns/c_lw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_3d4(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000014);
+    #include "insns/c_flw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_3de(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_3e8(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000008);
+    #include "insns/c_swsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_3f2(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x12)
+  {
+    reg_t npc = pc + insn_length(0x00000012);
+    #include "insns/c_lw0.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x8012)
+  {
+    reg_t npc = pc + insn_length(0x00008012);
+    #include "insns/c_ld0.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_3fc(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000031c);
+    #include "insns/c_and3.h"
+    return npc;
+}
+
diff --git a/riscv/dispatch_1.cc b/riscv/dispatch_1.cc
new file mode 100644 (file)
index 0000000..2ec169a
--- /dev/null
@@ -0,0 +1,1227 @@
+#include "insn_includes.h"
+
+reg_t processor_t::opcode_func_001(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000001);
+    #include "insns/c_addi.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_00b(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x3fffff) == 0xb)
+  {
+    reg_t npc = pc + insn_length(0x0000000b);
+    #include "insns/vlb.h"
+    return npc;
+  }
+  if((insn.bits & 0x1ffff) == 0x100b)
+  {
+    reg_t npc = pc + insn_length(0x0000100b);
+    #include "insns/vlstb.h"
+    return npc;
+  }
+  if((insn.bits & 0xfff) == 0x80b)
+  {
+    reg_t npc = pc + insn_length(0x0000080b);
+    #include "insns/vlsegstb.h"
+    return npc;
+  }
+  if((insn.bits & 0x1ffff) == 0x200b)
+  {
+    reg_t npc = pc + insn_length(0x0000200b);
+    #include "insns/vlsegb.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_015(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000015);
+    #include "insns/c_fld.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_01f(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_029(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000009);
+    #include "insns/c_ld.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_033(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x1ffff) == 0x33)
+  {
+    reg_t npc = pc + insn_length(0x00000033);
+    #include "insns/add.h"
+    return npc;
+  }
+  if((insn.bits & 0x1ffff) == 0x433)
+  {
+    reg_t npc = pc + insn_length(0x00000433);
+    #include "insns/mul.h"
+    return npc;
+  }
+  if((insn.bits & 0x1ffff) == 0x10033)
+  {
+    reg_t npc = pc + insn_length(0x00010033);
+    #include "insns/sub.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_03d(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000001d);
+    #include "insns/c_addiw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_047(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000047);
+    #include "insns/fmsub_s.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_051(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000011);
+    #include "insns/c_bne.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_05b(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_065(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000005);
+    #include "insns/c_lwsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_06f(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000006f);
+    #include "insns/jal.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_079(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x1c1f) == 0x19)
+  {
+    reg_t npc = pc + insn_length(0x00000019);
+    #include "insns/c_slli.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x819)
+  {
+    reg_t npc = pc + insn_length(0x00000819);
+    #include "insns/c_srli.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1419)
+  {
+    reg_t npc = pc + insn_length(0x00001419);
+    #include "insns/c_srai32.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1819)
+  {
+    reg_t npc = pc + insn_length(0x00001819);
+    #include "insns/c_slliw.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0xc19)
+  {
+    reg_t npc = pc + insn_length(0x00000c19);
+    #include "insns/c_srli32.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1019)
+  {
+    reg_t npc = pc + insn_length(0x00001019);
+    #include "insns/c_srai.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x419)
+  {
+    reg_t npc = pc + insn_length(0x00000419);
+    #include "insns/c_slli32.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_083(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000083);
+    #include "insns/lh.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_08d(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000d);
+    #include "insns/c_sw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_097(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_0a1(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000001);
+    #include "insns/c_addi.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_0ab(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_0b5(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000015);
+    #include "insns/c_fld.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_0bf(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_0c9(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000009);
+    #include "insns/c_ld.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_0d3(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x1ffff) == 0x180d3)
+  {
+    reg_t npc = pc + insn_length(0x000180d3);
+    #include "insns/fmin_d.h"
+    return npc;
+  }
+  if((insn.bits & 0x3ff1ff) == 0xc0d3)
+  {
+    reg_t npc = pc + insn_length(0x0000c0d3);
+    #include "insns/fcvt_d_l.h"
+    return npc;
+  }
+  if((insn.bits & 0x3ff1ff) == 0xe0d3)
+  {
+    reg_t npc = pc + insn_length(0x0000e0d3);
+    #include "insns/fcvt_d_w.h"
+    return npc;
+  }
+  if((insn.bits & 0x3ff1ff) == 0x100d3)
+  {
+    reg_t npc = pc + insn_length(0x000100d3);
+    #include "insns/fcvt_d_s.h"
+    return npc;
+  }
+  if((insn.bits & 0x1ffff) == 0x190d3)
+  {
+    reg_t npc = pc + insn_length(0x000190d3);
+    #include "insns/fmax_d.h"
+    return npc;
+  }
+  if((insn.bits & 0x7c1ffff) == 0x1c0d3)
+  {
+    reg_t npc = pc + insn_length(0x0001c0d3);
+    #include "insns/mftx_d.h"
+    return npc;
+  }
+  if((insn.bits & 0x1ffff) == 0x170d3)
+  {
+    reg_t npc = pc + insn_length(0x000170d3);
+    #include "insns/fle_d.h"
+    return npc;
+  }
+  if((insn.bits & 0x1ffff) == 0x160d3)
+  {
+    reg_t npc = pc + insn_length(0x000160d3);
+    #include "insns/flt_d.h"
+    return npc;
+  }
+  if((insn.bits & 0x1f1ff) == 0x20d3)
+  {
+    reg_t npc = pc + insn_length(0x000020d3);
+    #include "insns/fmul_d.h"
+    return npc;
+  }
+  if((insn.bits & 0x1ffff) == 0x70d3)
+  {
+    reg_t npc = pc + insn_length(0x000070d3);
+    #include "insns/fsgnjx_d.h"
+    return npc;
+  }
+  if((insn.bits & 0x1ffff) == 0x150d3)
+  {
+    reg_t npc = pc + insn_length(0x000150d3);
+    #include "insns/feq_d.h"
+    return npc;
+  }
+  if((insn.bits & 0x3ff1ff) == 0xf0d3)
+  {
+    reg_t npc = pc + insn_length(0x0000f0d3);
+    #include "insns/fcvt_d_wu.h"
+    return npc;
+  }
+  if((insn.bits & 0x3ff1ff) == 0xb0d3)
+  {
+    reg_t npc = pc + insn_length(0x0000b0d3);
+    #include "insns/fcvt_wu_d.h"
+    return npc;
+  }
+  if((insn.bits & 0x1ffff) == 0x60d3)
+  {
+    reg_t npc = pc + insn_length(0x000060d3);
+    #include "insns/fsgnjn_d.h"
+    return npc;
+  }
+  if((insn.bits & 0x3ff1ff) == 0xd0d3)
+  {
+    reg_t npc = pc + insn_length(0x0000d0d3);
+    #include "insns/fcvt_d_lu.h"
+    return npc;
+  }
+  if((insn.bits & 0x3ff1ff) == 0xa0d3)
+  {
+    reg_t npc = pc + insn_length(0x0000a0d3);
+    #include "insns/fcvt_w_d.h"
+    return npc;
+  }
+  if((insn.bits & 0x3fffff) == 0x1e0d3)
+  {
+    reg_t npc = pc + insn_length(0x0001e0d3);
+    #include "insns/mxtf_d.h"
+    return npc;
+  }
+  if((insn.bits & 0x1ffff) == 0x50d3)
+  {
+    reg_t npc = pc + insn_length(0x000050d3);
+    #include "insns/fsgnj_d.h"
+    return npc;
+  }
+  if((insn.bits & 0x3ff1ff) == 0x80d3)
+  {
+    reg_t npc = pc + insn_length(0x000080d3);
+    #include "insns/fcvt_l_d.h"
+    return npc;
+  }
+  if((insn.bits & 0x1f1ff) == 0xd3)
+  {
+    reg_t npc = pc + insn_length(0x000000d3);
+    #include "insns/fadd_d.h"
+    return npc;
+  }
+  if((insn.bits & 0x3ff1ff) == 0x90d3)
+  {
+    reg_t npc = pc + insn_length(0x000090d3);
+    #include "insns/fcvt_lu_d.h"
+    return npc;
+  }
+  if((insn.bits & 0x1f1ff) == 0x10d3)
+  {
+    reg_t npc = pc + insn_length(0x000010d3);
+    #include "insns/fsub_d.h"
+    return npc;
+  }
+  if((insn.bits & 0x3ff1ff) == 0x40d3)
+  {
+    reg_t npc = pc + insn_length(0x000040d3);
+    #include "insns/fsqrt_d.h"
+    return npc;
+  }
+  if((insn.bits & 0x1f1ff) == 0x30d3)
+  {
+    reg_t npc = pc + insn_length(0x000030d3);
+    #include "insns/fdiv_d.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_0dd(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000001d);
+    #include "insns/c_addiw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_0e7(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000067);
+    #include "insns/j.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_0f1(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000011);
+    #include "insns/c_bne.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_0fb(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x7ffffff) == 0xfb)
+  {
+    reg_t npc = pc + insn_length(0x000000fb);
+    #include "insns/di.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_105(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000005);
+    #include "insns/c_lwsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_10f(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x1ffff) == 0x150f)
+  {
+    reg_t npc = pc + insn_length(0x0000150f);
+    #include "insns/vfsstw.h"
+    return npc;
+  }
+  if((insn.bits & 0xfff) == 0x90f)
+  {
+    reg_t npc = pc + insn_length(0x0000090f);
+    #include "insns/vssegstw.h"
+    return npc;
+  }
+  if((insn.bits & 0x3fffff) == 0x10f)
+  {
+    reg_t npc = pc + insn_length(0x0000010f);
+    #include "insns/vsw.h"
+    return npc;
+  }
+  if((insn.bits & 0x1ffff) == 0x110f)
+  {
+    reg_t npc = pc + insn_length(0x0000110f);
+    #include "insns/vsstw.h"
+    return npc;
+  }
+  if((insn.bits & 0xfff) == 0xd0f)
+  {
+    reg_t npc = pc + insn_length(0x00000d0f);
+    #include "insns/vfssegstw.h"
+    return npc;
+  }
+  if((insn.bits & 0x1ffff) == 0x210f)
+  {
+    reg_t npc = pc + insn_length(0x0000210f);
+    #include "insns/vssegw.h"
+    return npc;
+  }
+  if((insn.bits & 0x3fffff) == 0x50f)
+  {
+    reg_t npc = pc + insn_length(0x0000050f);
+    #include "insns/vfsw.h"
+    return npc;
+  }
+  if((insn.bits & 0x1ffff) == 0x250f)
+  {
+    reg_t npc = pc + insn_length(0x0000250f);
+    #include "insns/vfssegw.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_119(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x1c1f) == 0x19)
+  {
+    reg_t npc = pc + insn_length(0x00000019);
+    #include "insns/c_slli.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x819)
+  {
+    reg_t npc = pc + insn_length(0x00000819);
+    #include "insns/c_srli.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1419)
+  {
+    reg_t npc = pc + insn_length(0x00001419);
+    #include "insns/c_srai32.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1819)
+  {
+    reg_t npc = pc + insn_length(0x00001819);
+    #include "insns/c_slliw.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0xc19)
+  {
+    reg_t npc = pc + insn_length(0x00000c19);
+    #include "insns/c_srli32.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1019)
+  {
+    reg_t npc = pc + insn_length(0x00001019);
+    #include "insns/c_srai.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x419)
+  {
+    reg_t npc = pc + insn_length(0x00000419);
+    #include "insns/c_slli32.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_123(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000123);
+    #include "insns/sw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_12d(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000d);
+    #include "insns/c_sw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_137(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000037);
+    #include "insns/lui.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_141(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000001);
+    #include "insns/c_addi.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_14b(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_155(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000015);
+    #include "insns/c_fld.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_15f(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_169(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000009);
+    #include "insns/c_ld.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_173(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x1ffff) == 0x1173)
+  {
+    reg_t npc = pc + insn_length(0x00001173);
+    #include "insns/vfmst.h"
+    return npc;
+  }
+  if((insn.bits & 0x1ffff) == 0x1973)
+  {
+    reg_t npc = pc + insn_length(0x00001973);
+    #include "insns/vfmts.h"
+    return npc;
+  }
+  if((insn.bits & 0x3fffff) == 0x973)
+  {
+    reg_t npc = pc + insn_length(0x00000973);
+    #include "insns/vfmsv.h"
+    return npc;
+  }
+  if((insn.bits & 0x3fffff) == 0x173)
+  {
+    reg_t npc = pc + insn_length(0x00000173);
+    #include "insns/vfmvv.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_17d(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000001d);
+    #include "insns/c_addiw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_187(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000187);
+    #include "insns/fld.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_191(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000011);
+    #include "insns/c_bne.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_19b(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_1a5(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000005);
+    #include "insns/c_lwsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_1af(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_1b9(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x1c1f) == 0x19)
+  {
+    reg_t npc = pc + insn_length(0x00000019);
+    #include "insns/c_slli.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x819)
+  {
+    reg_t npc = pc + insn_length(0x00000819);
+    #include "insns/c_srli.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1419)
+  {
+    reg_t npc = pc + insn_length(0x00001419);
+    #include "insns/c_srai32.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1819)
+  {
+    reg_t npc = pc + insn_length(0x00001819);
+    #include "insns/c_slliw.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0xc19)
+  {
+    reg_t npc = pc + insn_length(0x00000c19);
+    #include "insns/c_srli32.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1019)
+  {
+    reg_t npc = pc + insn_length(0x00001019);
+    #include "insns/c_srai.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x419)
+  {
+    reg_t npc = pc + insn_length(0x00000419);
+    #include "insns/c_slli32.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_1c3(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_1cd(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000d);
+    #include "insns/c_sw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_1d7(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_1e1(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000001);
+    #include "insns/c_addi.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_1eb(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_1f5(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000015);
+    #include "insns/c_fld.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_1ff(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_209(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000009);
+    #include "insns/c_ld.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_213(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000213);
+    #include "insns/xori.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_21d(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000001d);
+    #include "insns/c_addiw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_227(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_231(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000011);
+    #include "insns/c_bne.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_23b(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x1ffff) == 0x63b)
+  {
+    reg_t npc = pc + insn_length(0x0000063b);
+    #include "insns/divw.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_245(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000005);
+    #include "insns/c_lwsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_24f(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000004f);
+    #include "insns/fnmadd_s.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_259(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x1c1f) == 0x19)
+  {
+    reg_t npc = pc + insn_length(0x00000019);
+    #include "insns/c_slli.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x819)
+  {
+    reg_t npc = pc + insn_length(0x00000819);
+    #include "insns/c_srli.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1419)
+  {
+    reg_t npc = pc + insn_length(0x00001419);
+    #include "insns/c_srai32.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1819)
+  {
+    reg_t npc = pc + insn_length(0x00001819);
+    #include "insns/c_slliw.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0xc19)
+  {
+    reg_t npc = pc + insn_length(0x00000c19);
+    #include "insns/c_srli32.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1019)
+  {
+    reg_t npc = pc + insn_length(0x00001019);
+    #include "insns/c_srai.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x419)
+  {
+    reg_t npc = pc + insn_length(0x00000419);
+    #include "insns/c_slli32.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_263(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000263);
+    #include "insns/blt.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_26d(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000d);
+    #include "insns/c_sw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_277(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x7ffffff) == 0x277)
+  {
+    reg_t npc = pc + insn_length(0x00000277);
+    #include "insns/rdcycle.h"
+    return npc;
+  }
+  if((insn.bits & 0x7ffffff) == 0xa77)
+  {
+    reg_t npc = pc + insn_length(0x00000a77);
+    #include "insns/rdinstret.h"
+    return npc;
+  }
+  if((insn.bits & 0x7ffffff) == 0x677)
+  {
+    reg_t npc = pc + insn_length(0x00000677);
+    #include "insns/rdtime.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_281(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000001);
+    #include "insns/c_addi.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_28b(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x1ffff) == 0x128b)
+  {
+    reg_t npc = pc + insn_length(0x0000128b);
+    #include "insns/vlsthu.h"
+    return npc;
+  }
+  if((insn.bits & 0xfff) == 0xa8b)
+  {
+    reg_t npc = pc + insn_length(0x00000a8b);
+    #include "insns/vlsegsthu.h"
+    return npc;
+  }
+  if((insn.bits & 0x3fffff) == 0x28b)
+  {
+    reg_t npc = pc + insn_length(0x0000028b);
+    #include "insns/vlhu.h"
+    return npc;
+  }
+  if((insn.bits & 0x1ffff) == 0x228b)
+  {
+    reg_t npc = pc + insn_length(0x0000228b);
+    #include "insns/vlseghu.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_295(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000015);
+    #include "insns/c_fld.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_29f(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_2a9(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000009);
+    #include "insns/c_ld.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_2b3(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x1ffff) == 0x102b3)
+  {
+    reg_t npc = pc + insn_length(0x000102b3);
+    #include "insns/sra.h"
+    return npc;
+  }
+  if((insn.bits & 0x1ffff) == 0x2b3)
+  {
+    reg_t npc = pc + insn_length(0x000002b3);
+    #include "insns/srl.h"
+    return npc;
+  }
+  if((insn.bits & 0x1ffff) == 0x6b3)
+  {
+    reg_t npc = pc + insn_length(0x000006b3);
+    #include "insns/divu.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_2bd(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000001d);
+    #include "insns/c_addiw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_2c7(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x000000c7);
+    #include "insns/fmsub_d.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_2d1(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000011);
+    #include "insns/c_bne.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_2db(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_2e5(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000005);
+    #include "insns/c_lwsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_2ef(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000006f);
+    #include "insns/jal.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_2f9(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x1c1f) == 0x19)
+  {
+    reg_t npc = pc + insn_length(0x00000019);
+    #include "insns/c_slli.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x819)
+  {
+    reg_t npc = pc + insn_length(0x00000819);
+    #include "insns/c_srli.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1419)
+  {
+    reg_t npc = pc + insn_length(0x00001419);
+    #include "insns/c_srai32.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1819)
+  {
+    reg_t npc = pc + insn_length(0x00001819);
+    #include "insns/c_slliw.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0xc19)
+  {
+    reg_t npc = pc + insn_length(0x00000c19);
+    #include "insns/c_srli32.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1019)
+  {
+    reg_t npc = pc + insn_length(0x00001019);
+    #include "insns/c_srai.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x419)
+  {
+    reg_t npc = pc + insn_length(0x00000419);
+    #include "insns/c_slli32.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_303(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000303);
+    #include "insns/lwu.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_30d(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000d);
+    #include "insns/c_sw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_317(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_321(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000001);
+    #include "insns/c_addi.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_32b(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_335(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000015);
+    #include "insns/c_fld.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_33f(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_349(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000009);
+    #include "insns/c_ld.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_353(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_35d(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000001d);
+    #include "insns/c_addiw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_367(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000067);
+    #include "insns/j.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_371(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000011);
+    #include "insns/c_bne.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_37b(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_385(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000005);
+    #include "insns/c_lwsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_38f(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_399(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x1c1f) == 0x19)
+  {
+    reg_t npc = pc + insn_length(0x00000019);
+    #include "insns/c_slli.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x819)
+  {
+    reg_t npc = pc + insn_length(0x00000819);
+    #include "insns/c_srli.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1419)
+  {
+    reg_t npc = pc + insn_length(0x00001419);
+    #include "insns/c_srai32.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1819)
+  {
+    reg_t npc = pc + insn_length(0x00001819);
+    #include "insns/c_slliw.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0xc19)
+  {
+    reg_t npc = pc + insn_length(0x00000c19);
+    #include "insns/c_srli32.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1019)
+  {
+    reg_t npc = pc + insn_length(0x00001019);
+    #include "insns/c_srai.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x419)
+  {
+    reg_t npc = pc + insn_length(0x00000419);
+    #include "insns/c_slli32.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_3a3(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_3ad(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000d);
+    #include "insns/c_sw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_3b7(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000037);
+    #include "insns/lui.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_3c1(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000001);
+    #include "insns/c_addi.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_3cb(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_3d5(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000015);
+    #include "insns/c_fld.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_3df(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_3e9(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000009);
+    #include "insns/c_ld.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_3f3(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0xf80003ff) == 0x3f3)
+  {
+    reg_t npc = pc + insn_length(0x000003f3);
+    #include "insns/vf.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_3fd(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000001d);
+    #include "insns/c_addiw.h"
+    return npc;
+}
+
diff --git a/riscv/dispatch_2.cc b/riscv/dispatch_2.cc
new file mode 100644 (file)
index 0000000..3f9871f
--- /dev/null
@@ -0,0 +1,887 @@
+#include "insn_includes.h"
+
+reg_t processor_t::opcode_func_002(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x2)
+  {
+    reg_t npc = pc + insn_length(0x00000002);
+    #include "insns/c_move.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x8002)
+  {
+    reg_t npc = pc + insn_length(0x00008002);
+    #include "insns/c_j.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_00c(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000c);
+    #include "insns/c_sd.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_016(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000016);
+    #include "insns/c_fsw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_020(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000000);
+    #include "insns/c_li.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_02a(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000a);
+    #include "insns/c_lw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_034(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000014);
+    #include "insns/c_flw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_03e(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_048(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000008);
+    #include "insns/c_swsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_052(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x12)
+  {
+    reg_t npc = pc + insn_length(0x00000012);
+    #include "insns/c_lw0.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x8012)
+  {
+    reg_t npc = pc + insn_length(0x00008012);
+    #include "insns/c_ld0.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_05c(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000001c);
+    #include "insns/c_add3.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_066(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000006);
+    #include "insns/c_sdsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_070(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000010);
+    #include "insns/c_beq.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_07a(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x801a)
+  {
+    reg_t npc = pc + insn_length(0x0000801a);
+    #include "insns/c_sub.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x1a)
+  {
+    reg_t npc = pc + insn_length(0x0000001a);
+    #include "insns/c_add.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_084(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000004);
+    #include "insns/c_ldsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_08e(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_098(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000018);
+    #include "insns/c_fsd.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_0a2(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x2)
+  {
+    reg_t npc = pc + insn_length(0x00000002);
+    #include "insns/c_move.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x8002)
+  {
+    reg_t npc = pc + insn_length(0x00008002);
+    #include "insns/c_j.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_0ac(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000c);
+    #include "insns/c_sd.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_0b6(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000016);
+    #include "insns/c_fsw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_0c0(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000000);
+    #include "insns/c_li.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_0ca(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000a);
+    #include "insns/c_lw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_0d4(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000014);
+    #include "insns/c_flw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_0de(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_0e8(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000008);
+    #include "insns/c_swsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_0f2(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x12)
+  {
+    reg_t npc = pc + insn_length(0x00000012);
+    #include "insns/c_lw0.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x8012)
+  {
+    reg_t npc = pc + insn_length(0x00008012);
+    #include "insns/c_ld0.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_0fc(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000001c);
+    #include "insns/c_add3.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_106(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000006);
+    #include "insns/c_sdsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_110(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000010);
+    #include "insns/c_beq.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_11a(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x801a)
+  {
+    reg_t npc = pc + insn_length(0x0000801a);
+    #include "insns/c_sub.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x1a)
+  {
+    reg_t npc = pc + insn_length(0x0000001a);
+    #include "insns/c_add.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_124(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000004);
+    #include "insns/c_ldsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_12e(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_138(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000018);
+    #include "insns/c_fsd.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_142(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x2)
+  {
+    reg_t npc = pc + insn_length(0x00000002);
+    #include "insns/c_move.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x8002)
+  {
+    reg_t npc = pc + insn_length(0x00008002);
+    #include "insns/c_j.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_14c(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000c);
+    #include "insns/c_sd.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_156(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000016);
+    #include "insns/c_fsw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_160(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000000);
+    #include "insns/c_li.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_16a(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000a);
+    #include "insns/c_lw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_174(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000014);
+    #include "insns/c_flw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_17e(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_188(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000008);
+    #include "insns/c_swsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_192(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x12)
+  {
+    reg_t npc = pc + insn_length(0x00000012);
+    #include "insns/c_lw0.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x8012)
+  {
+    reg_t npc = pc + insn_length(0x00008012);
+    #include "insns/c_ld0.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_19c(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000011c);
+    #include "insns/c_sub3.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_1a6(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000006);
+    #include "insns/c_sdsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_1b0(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000010);
+    #include "insns/c_beq.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_1ba(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x801a)
+  {
+    reg_t npc = pc + insn_length(0x0000801a);
+    #include "insns/c_sub.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x1a)
+  {
+    reg_t npc = pc + insn_length(0x0000001a);
+    #include "insns/c_add.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_1c4(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000004);
+    #include "insns/c_ldsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_1ce(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_1d8(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000018);
+    #include "insns/c_fsd.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_1e2(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x2)
+  {
+    reg_t npc = pc + insn_length(0x00000002);
+    #include "insns/c_move.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x8002)
+  {
+    reg_t npc = pc + insn_length(0x00008002);
+    #include "insns/c_j.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_1ec(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000c);
+    #include "insns/c_sd.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_1f6(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000016);
+    #include "insns/c_fsw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_200(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000000);
+    #include "insns/c_li.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_20a(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000a);
+    #include "insns/c_lw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_214(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000014);
+    #include "insns/c_flw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_21e(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_228(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000008);
+    #include "insns/c_swsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_232(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x12)
+  {
+    reg_t npc = pc + insn_length(0x00000012);
+    #include "insns/c_lw0.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x8012)
+  {
+    reg_t npc = pc + insn_length(0x00008012);
+    #include "insns/c_ld0.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_23c(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000021c);
+    #include "insns/c_or3.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_246(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000006);
+    #include "insns/c_sdsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_250(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000010);
+    #include "insns/c_beq.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_25a(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x801a)
+  {
+    reg_t npc = pc + insn_length(0x0000801a);
+    #include "insns/c_sub.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x1a)
+  {
+    reg_t npc = pc + insn_length(0x0000001a);
+    #include "insns/c_add.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_264(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000004);
+    #include "insns/c_ldsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_26e(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_278(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000018);
+    #include "insns/c_fsd.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_282(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x2)
+  {
+    reg_t npc = pc + insn_length(0x00000002);
+    #include "insns/c_move.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x8002)
+  {
+    reg_t npc = pc + insn_length(0x00008002);
+    #include "insns/c_j.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_28c(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000c);
+    #include "insns/c_sd.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_296(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000016);
+    #include "insns/c_fsw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_2a0(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000000);
+    #include "insns/c_li.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_2aa(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000a);
+    #include "insns/c_lw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_2b4(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000014);
+    #include "insns/c_flw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_2be(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_2c8(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000008);
+    #include "insns/c_swsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_2d2(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x12)
+  {
+    reg_t npc = pc + insn_length(0x00000012);
+    #include "insns/c_lw0.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x8012)
+  {
+    reg_t npc = pc + insn_length(0x00008012);
+    #include "insns/c_ld0.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_2dc(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000021c);
+    #include "insns/c_or3.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_2e6(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000006);
+    #include "insns/c_sdsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_2f0(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000010);
+    #include "insns/c_beq.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_2fa(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x801a)
+  {
+    reg_t npc = pc + insn_length(0x0000801a);
+    #include "insns/c_sub.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x1a)
+  {
+    reg_t npc = pc + insn_length(0x0000001a);
+    #include "insns/c_add.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_304(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000004);
+    #include "insns/c_ldsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_30e(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_318(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000018);
+    #include "insns/c_fsd.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_322(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x2)
+  {
+    reg_t npc = pc + insn_length(0x00000002);
+    #include "insns/c_move.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x8002)
+  {
+    reg_t npc = pc + insn_length(0x00008002);
+    #include "insns/c_j.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_32c(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000c);
+    #include "insns/c_sd.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_336(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000016);
+    #include "insns/c_fsw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_340(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000000);
+    #include "insns/c_li.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_34a(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000a);
+    #include "insns/c_lw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_354(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000014);
+    #include "insns/c_flw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_35e(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_368(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000008);
+    #include "insns/c_swsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_372(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x12)
+  {
+    reg_t npc = pc + insn_length(0x00000012);
+    #include "insns/c_lw0.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x8012)
+  {
+    reg_t npc = pc + insn_length(0x00008012);
+    #include "insns/c_ld0.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_37c(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000031c);
+    #include "insns/c_and3.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_386(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000006);
+    #include "insns/c_sdsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_390(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000010);
+    #include "insns/c_beq.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_39a(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x801a)
+  {
+    reg_t npc = pc + insn_length(0x0000801a);
+    #include "insns/c_sub.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x1a)
+  {
+    reg_t npc = pc + insn_length(0x0000001a);
+    #include "insns/c_add.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_3a4(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000004);
+    #include "insns/c_ldsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_3ae(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_3b8(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000018);
+    #include "insns/c_fsd.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_3c2(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x2)
+  {
+    reg_t npc = pc + insn_length(0x00000002);
+    #include "insns/c_move.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x8002)
+  {
+    reg_t npc = pc + insn_length(0x00008002);
+    #include "insns/c_j.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_3cc(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000c);
+    #include "insns/c_sd.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_3d6(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000016);
+    #include "insns/c_fsw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_3e0(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000000);
+    #include "insns/c_li.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_3ea(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000a);
+    #include "insns/c_lw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_3f4(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000014);
+    #include "insns/c_flw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_3fe(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
diff --git a/riscv/dispatch_3.cc b/riscv/dispatch_3.cc
new file mode 100644 (file)
index 0000000..a3e7a8f
--- /dev/null
@@ -0,0 +1,1211 @@
+#include "insn_includes.h"
+
+reg_t processor_t::opcode_func_003(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000003);
+    #include "insns/lb.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_00d(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000d);
+    #include "insns/c_sw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_017(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_021(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000001);
+    #include "insns/c_addi.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_02b(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_035(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000015);
+    #include "insns/c_fld.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_03f(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_049(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000009);
+    #include "insns/c_ld.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_053(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x3ff1ff) == 0x9053)
+  {
+    reg_t npc = pc + insn_length(0x00009053);
+    #include "insns/fcvt_lu_s.h"
+    return npc;
+  }
+  if((insn.bits & 0x1ffff) == 0x18053)
+  {
+    reg_t npc = pc + insn_length(0x00018053);
+    #include "insns/fmin_s.h"
+    return npc;
+  }
+  if((insn.bits & 0x3ff1ff) == 0x11053)
+  {
+    reg_t npc = pc + insn_length(0x00011053);
+    #include "insns/fcvt_s_d.h"
+    return npc;
+  }
+  if((insn.bits & 0x3ff1ff) == 0xe053)
+  {
+    reg_t npc = pc + insn_length(0x0000e053);
+    #include "insns/fcvt_s_w.h"
+    return npc;
+  }
+  if((insn.bits & 0x7c1ffff) == 0x1c053)
+  {
+    reg_t npc = pc + insn_length(0x0001c053);
+    #include "insns/mftx_s.h"
+    return npc;
+  }
+  if((insn.bits & 0x3ff1ff) == 0x8053)
+  {
+    reg_t npc = pc + insn_length(0x00008053);
+    #include "insns/fcvt_l_s.h"
+    return npc;
+  }
+  if((insn.bits & 0x1ffff) == 0x17053)
+  {
+    reg_t npc = pc + insn_length(0x00017053);
+    #include "insns/fle_s.h"
+    return npc;
+  }
+  if((insn.bits & 0x7ffffff) == 0x1d053)
+  {
+    reg_t npc = pc + insn_length(0x0001d053);
+    #include "insns/mffsr.h"
+    return npc;
+  }
+  if((insn.bits & 0x1f1ff) == 0x3053)
+  {
+    reg_t npc = pc + insn_length(0x00003053);
+    #include "insns/fdiv_s.h"
+    return npc;
+  }
+  if((insn.bits & 0x3fffff) == 0x1f053)
+  {
+    reg_t npc = pc + insn_length(0x0001f053);
+    #include "insns/mtfsr.h"
+    return npc;
+  }
+  if((insn.bits & 0x3ff1ff) == 0xd053)
+  {
+    reg_t npc = pc + insn_length(0x0000d053);
+    #include "insns/fcvt_s_lu.h"
+    return npc;
+  }
+  if((insn.bits & 0x1f1ff) == 0x2053)
+  {
+    reg_t npc = pc + insn_length(0x00002053);
+    #include "insns/fmul_s.h"
+    return npc;
+  }
+  if((insn.bits & 0x1ffff) == 0x16053)
+  {
+    reg_t npc = pc + insn_length(0x00016053);
+    #include "insns/flt_s.h"
+    return npc;
+  }
+  if((insn.bits & 0x1ffff) == 0x15053)
+  {
+    reg_t npc = pc + insn_length(0x00015053);
+    #include "insns/feq_s.h"
+    return npc;
+  }
+  if((insn.bits & 0x1ffff) == 0x7053)
+  {
+    reg_t npc = pc + insn_length(0x00007053);
+    #include "insns/fsgnjx_s.h"
+    return npc;
+  }
+  if((insn.bits & 0x1ffff) == 0x19053)
+  {
+    reg_t npc = pc + insn_length(0x00019053);
+    #include "insns/fmax_s.h"
+    return npc;
+  }
+  if((insn.bits & 0x3ff1ff) == 0xb053)
+  {
+    reg_t npc = pc + insn_length(0x0000b053);
+    #include "insns/fcvt_wu_s.h"
+    return npc;
+  }
+  if((insn.bits & 0x3fffff) == 0x1e053)
+  {
+    reg_t npc = pc + insn_length(0x0001e053);
+    #include "insns/mxtf_s.h"
+    return npc;
+  }
+  if((insn.bits & 0x1f1ff) == 0x1053)
+  {
+    reg_t npc = pc + insn_length(0x00001053);
+    #include "insns/fsub_s.h"
+    return npc;
+  }
+  if((insn.bits & 0x1ffff) == 0x5053)
+  {
+    reg_t npc = pc + insn_length(0x00005053);
+    #include "insns/fsgnj_s.h"
+    return npc;
+  }
+  if((insn.bits & 0x3ff1ff) == 0xf053)
+  {
+    reg_t npc = pc + insn_length(0x0000f053);
+    #include "insns/fcvt_s_wu.h"
+    return npc;
+  }
+  if((insn.bits & 0x3ff1ff) == 0xc053)
+  {
+    reg_t npc = pc + insn_length(0x0000c053);
+    #include "insns/fcvt_s_l.h"
+    return npc;
+  }
+  if((insn.bits & 0x3ff1ff) == 0xa053)
+  {
+    reg_t npc = pc + insn_length(0x0000a053);
+    #include "insns/fcvt_w_s.h"
+    return npc;
+  }
+  if((insn.bits & 0x3ff1ff) == 0x4053)
+  {
+    reg_t npc = pc + insn_length(0x00004053);
+    #include "insns/fsqrt_s.h"
+    return npc;
+  }
+  if((insn.bits & 0x1ffff) == 0x6053)
+  {
+    reg_t npc = pc + insn_length(0x00006053);
+    #include "insns/fsgnjn_s.h"
+    return npc;
+  }
+  if((insn.bits & 0x1f1ff) == 0x53)
+  {
+    reg_t npc = pc + insn_length(0x00000053);
+    #include "insns/fadd_s.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_05d(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000001d);
+    #include "insns/c_addiw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_067(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000067);
+    #include "insns/j.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_071(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000011);
+    #include "insns/c_bne.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_07b(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x7ffffff) == 0x7b)
+  {
+    reg_t npc = pc + insn_length(0x0000007b);
+    #include "insns/ei.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_085(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000005);
+    #include "insns/c_lwsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_08f(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0xfff) == 0x88f)
+  {
+    reg_t npc = pc + insn_length(0x0000088f);
+    #include "insns/vssegsth.h"
+    return npc;
+  }
+  if((insn.bits & 0x1ffff) == 0x108f)
+  {
+    reg_t npc = pc + insn_length(0x0000108f);
+    #include "insns/vssth.h"
+    return npc;
+  }
+  if((insn.bits & 0x3fffff) == 0x8f)
+  {
+    reg_t npc = pc + insn_length(0x0000008f);
+    #include "insns/vsh.h"
+    return npc;
+  }
+  if((insn.bits & 0x1ffff) == 0x208f)
+  {
+    reg_t npc = pc + insn_length(0x0000208f);
+    #include "insns/vssegh.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_099(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x1c1f) == 0x19)
+  {
+    reg_t npc = pc + insn_length(0x00000019);
+    #include "insns/c_slli.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x819)
+  {
+    reg_t npc = pc + insn_length(0x00000819);
+    #include "insns/c_srli.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1419)
+  {
+    reg_t npc = pc + insn_length(0x00001419);
+    #include "insns/c_srai32.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1819)
+  {
+    reg_t npc = pc + insn_length(0x00001819);
+    #include "insns/c_slliw.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0xc19)
+  {
+    reg_t npc = pc + insn_length(0x00000c19);
+    #include "insns/c_srli32.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1019)
+  {
+    reg_t npc = pc + insn_length(0x00001019);
+    #include "insns/c_srai.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x419)
+  {
+    reg_t npc = pc + insn_length(0x00000419);
+    #include "insns/c_slli32.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_0a3(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x000000a3);
+    #include "insns/sh.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_0ad(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000d);
+    #include "insns/c_sw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_0b7(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000037);
+    #include "insns/lui.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_0c1(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000001);
+    #include "insns/c_addi.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_0cb(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x000000cb);
+    #include "insns/fnmsub_d.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_0d5(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000015);
+    #include "insns/c_fld.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_0df(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_0e9(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000009);
+    #include "insns/c_ld.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_0f3(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x000000f3);
+    #include "insns/vvcfgivl.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_0fd(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000001d);
+    #include "insns/c_addiw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_107(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000107);
+    #include "insns/flw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_111(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000011);
+    #include "insns/c_bne.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_11b(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_125(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000005);
+    #include "insns/c_lwsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_12f(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000012f);
+    #include "insns/fence.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_139(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x1c1f) == 0x19)
+  {
+    reg_t npc = pc + insn_length(0x00000019);
+    #include "insns/c_slli.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x819)
+  {
+    reg_t npc = pc + insn_length(0x00000819);
+    #include "insns/c_srli.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1419)
+  {
+    reg_t npc = pc + insn_length(0x00001419);
+    #include "insns/c_srai32.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1819)
+  {
+    reg_t npc = pc + insn_length(0x00001819);
+    #include "insns/c_slliw.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0xc19)
+  {
+    reg_t npc = pc + insn_length(0x00000c19);
+    #include "insns/c_srli32.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1019)
+  {
+    reg_t npc = pc + insn_length(0x00001019);
+    #include "insns/c_srai.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x419)
+  {
+    reg_t npc = pc + insn_length(0x00000419);
+    #include "insns/c_slli32.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_143(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_14d(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000d);
+    #include "insns/c_sw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_157(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_161(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000001);
+    #include "insns/c_addi.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_16b(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000016b);
+    #include "insns/jalr_j.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_175(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000015);
+    #include "insns/c_fld.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_17f(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_189(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000009);
+    #include "insns/c_ld.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_193(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000193);
+    #include "insns/sltiu.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_19d(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000001d);
+    #include "insns/c_addiw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_1a7(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x000001a7);
+    #include "insns/fsd.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_1b1(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000011);
+    #include "insns/c_bne.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_1bb(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_1c5(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000005);
+    #include "insns/c_lwsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_1cf(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_1d9(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x1c1f) == 0x19)
+  {
+    reg_t npc = pc + insn_length(0x00000019);
+    #include "insns/c_slli.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x819)
+  {
+    reg_t npc = pc + insn_length(0x00000819);
+    #include "insns/c_srli.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1419)
+  {
+    reg_t npc = pc + insn_length(0x00001419);
+    #include "insns/c_srai32.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1819)
+  {
+    reg_t npc = pc + insn_length(0x00001819);
+    #include "insns/c_slliw.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0xc19)
+  {
+    reg_t npc = pc + insn_length(0x00000c19);
+    #include "insns/c_srli32.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1019)
+  {
+    reg_t npc = pc + insn_length(0x00001019);
+    #include "insns/c_srai.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x419)
+  {
+    reg_t npc = pc + insn_length(0x00000419);
+    #include "insns/c_slli32.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_1e3(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_1ed(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000d);
+    #include "insns/c_sw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_1f7(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x7ffffff) == 0x1f7)
+  {
+    reg_t npc = pc + insn_length(0x000001f7);
+    #include "insns/utidx.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_201(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000001);
+    #include "insns/c_addi.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_20b(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x1ffff) == 0x120b)
+  {
+    reg_t npc = pc + insn_length(0x0000120b);
+    #include "insns/vlstbu.h"
+    return npc;
+  }
+  if((insn.bits & 0x1ffff) == 0x220b)
+  {
+    reg_t npc = pc + insn_length(0x0000220b);
+    #include "insns/vlsegbu.h"
+    return npc;
+  }
+  if((insn.bits & 0xfff) == 0xa0b)
+  {
+    reg_t npc = pc + insn_length(0x00000a0b);
+    #include "insns/vlsegstbu.h"
+    return npc;
+  }
+  if((insn.bits & 0x3fffff) == 0x20b)
+  {
+    reg_t npc = pc + insn_length(0x0000020b);
+    #include "insns/vlbu.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_215(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000015);
+    #include "insns/c_fld.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_21f(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_229(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000009);
+    #include "insns/c_ld.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_233(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x1ffff) == 0x633)
+  {
+    reg_t npc = pc + insn_length(0x00000633);
+    #include "insns/div.h"
+    return npc;
+  }
+  if((insn.bits & 0x1ffff) == 0x233)
+  {
+    reg_t npc = pc + insn_length(0x00000233);
+    #include "insns/xor.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_23d(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000001d);
+    #include "insns/c_addiw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_247(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000047);
+    #include "insns/fmsub_s.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_251(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000011);
+    #include "insns/c_bne.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_25b(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_265(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000005);
+    #include "insns/c_lwsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_26f(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000006f);
+    #include "insns/jal.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_279(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x1c1f) == 0x19)
+  {
+    reg_t npc = pc + insn_length(0x00000019);
+    #include "insns/c_slli.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x819)
+  {
+    reg_t npc = pc + insn_length(0x00000819);
+    #include "insns/c_srli.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1419)
+  {
+    reg_t npc = pc + insn_length(0x00001419);
+    #include "insns/c_srai32.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1819)
+  {
+    reg_t npc = pc + insn_length(0x00001819);
+    #include "insns/c_slliw.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0xc19)
+  {
+    reg_t npc = pc + insn_length(0x00000c19);
+    #include "insns/c_srli32.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1019)
+  {
+    reg_t npc = pc + insn_length(0x00001019);
+    #include "insns/c_srai.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x419)
+  {
+    reg_t npc = pc + insn_length(0x00000419);
+    #include "insns/c_slli32.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_283(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000283);
+    #include "insns/lhu.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_28d(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000d);
+    #include "insns/c_sw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_297(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_2a1(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000001);
+    #include "insns/c_addi.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_2ab(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_2b5(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000015);
+    #include "insns/c_fld.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_2bf(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_2c9(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000009);
+    #include "insns/c_ld.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_2d3(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x3ff1ff) == 0xc0d3)
+  {
+    reg_t npc = pc + insn_length(0x0000c0d3);
+    #include "insns/fcvt_d_l.h"
+    return npc;
+  }
+  if((insn.bits & 0x3ff1ff) == 0xe0d3)
+  {
+    reg_t npc = pc + insn_length(0x0000e0d3);
+    #include "insns/fcvt_d_w.h"
+    return npc;
+  }
+  if((insn.bits & 0x3ff1ff) == 0x100d3)
+  {
+    reg_t npc = pc + insn_length(0x000100d3);
+    #include "insns/fcvt_d_s.h"
+    return npc;
+  }
+  if((insn.bits & 0x1f1ff) == 0x20d3)
+  {
+    reg_t npc = pc + insn_length(0x000020d3);
+    #include "insns/fmul_d.h"
+    return npc;
+  }
+  if((insn.bits & 0x3ff1ff) == 0xf0d3)
+  {
+    reg_t npc = pc + insn_length(0x0000f0d3);
+    #include "insns/fcvt_d_wu.h"
+    return npc;
+  }
+  if((insn.bits & 0x3ff1ff) == 0xb0d3)
+  {
+    reg_t npc = pc + insn_length(0x0000b0d3);
+    #include "insns/fcvt_wu_d.h"
+    return npc;
+  }
+  if((insn.bits & 0x3ff1ff) == 0xd0d3)
+  {
+    reg_t npc = pc + insn_length(0x0000d0d3);
+    #include "insns/fcvt_d_lu.h"
+    return npc;
+  }
+  if((insn.bits & 0x3ff1ff) == 0xa0d3)
+  {
+    reg_t npc = pc + insn_length(0x0000a0d3);
+    #include "insns/fcvt_w_d.h"
+    return npc;
+  }
+  if((insn.bits & 0x3ff1ff) == 0x80d3)
+  {
+    reg_t npc = pc + insn_length(0x000080d3);
+    #include "insns/fcvt_l_d.h"
+    return npc;
+  }
+  if((insn.bits & 0x1f1ff) == 0xd3)
+  {
+    reg_t npc = pc + insn_length(0x000000d3);
+    #include "insns/fadd_d.h"
+    return npc;
+  }
+  if((insn.bits & 0x3ff1ff) == 0x90d3)
+  {
+    reg_t npc = pc + insn_length(0x000090d3);
+    #include "insns/fcvt_lu_d.h"
+    return npc;
+  }
+  if((insn.bits & 0x1f1ff) == 0x10d3)
+  {
+    reg_t npc = pc + insn_length(0x000010d3);
+    #include "insns/fsub_d.h"
+    return npc;
+  }
+  if((insn.bits & 0x3ff1ff) == 0x40d3)
+  {
+    reg_t npc = pc + insn_length(0x000040d3);
+    #include "insns/fsqrt_d.h"
+    return npc;
+  }
+  if((insn.bits & 0x1f1ff) == 0x30d3)
+  {
+    reg_t npc = pc + insn_length(0x000030d3);
+    #include "insns/fdiv_d.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_2dd(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000001d);
+    #include "insns/c_addiw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_2e7(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000067);
+    #include "insns/j.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_2f1(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000011);
+    #include "insns/c_bne.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_2fb(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0xffffffff) == 0x2fb)
+  {
+    reg_t npc = pc + insn_length(0x000002fb);
+    #include "insns/cflush.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_305(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000005);
+    #include "insns/c_lwsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_30f(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_319(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x1c1f) == 0x19)
+  {
+    reg_t npc = pc + insn_length(0x00000019);
+    #include "insns/c_slli.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x819)
+  {
+    reg_t npc = pc + insn_length(0x00000819);
+    #include "insns/c_srli.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1419)
+  {
+    reg_t npc = pc + insn_length(0x00001419);
+    #include "insns/c_srai32.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1819)
+  {
+    reg_t npc = pc + insn_length(0x00001819);
+    #include "insns/c_slliw.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0xc19)
+  {
+    reg_t npc = pc + insn_length(0x00000c19);
+    #include "insns/c_srli32.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1019)
+  {
+    reg_t npc = pc + insn_length(0x00001019);
+    #include "insns/c_srai.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x419)
+  {
+    reg_t npc = pc + insn_length(0x00000419);
+    #include "insns/c_slli32.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_323(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_32d(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000d);
+    #include "insns/c_sw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_337(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000037);
+    #include "insns/lui.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_341(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000001);
+    #include "insns/c_addi.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_34b(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_355(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000015);
+    #include "insns/c_fld.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_35f(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_369(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000009);
+    #include "insns/c_ld.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_373(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_37d(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000001d);
+    #include "insns/c_addiw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_387(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_391(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000011);
+    #include "insns/c_bne.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_39b(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_3a5(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000005);
+    #include "insns/c_lwsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_3af(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x000003af);
+    #include "insns/fence_g_cv.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_3b9(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x1c1f) == 0x19)
+  {
+    reg_t npc = pc + insn_length(0x00000019);
+    #include "insns/c_slli.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x819)
+  {
+    reg_t npc = pc + insn_length(0x00000819);
+    #include "insns/c_srli.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1419)
+  {
+    reg_t npc = pc + insn_length(0x00001419);
+    #include "insns/c_srai32.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1819)
+  {
+    reg_t npc = pc + insn_length(0x00001819);
+    #include "insns/c_slliw.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0xc19)
+  {
+    reg_t npc = pc + insn_length(0x00000c19);
+    #include "insns/c_srli32.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1019)
+  {
+    reg_t npc = pc + insn_length(0x00001019);
+    #include "insns/c_srai.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x419)
+  {
+    reg_t npc = pc + insn_length(0x00000419);
+    #include "insns/c_slli32.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_3c3(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_3cd(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000d);
+    #include "insns/c_sw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_3d7(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_3e1(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000001);
+    #include "insns/c_addi.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_3eb(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_3f5(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000015);
+    #include "insns/c_fld.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_3ff(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
diff --git a/riscv/dispatch_4.cc b/riscv/dispatch_4.cc
new file mode 100644 (file)
index 0000000..294ff1a
--- /dev/null
@@ -0,0 +1,880 @@
+#include "insn_includes.h"
+
+reg_t processor_t::opcode_func_004(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000004);
+    #include "insns/c_ldsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_00e(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_018(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000018);
+    #include "insns/c_fsd.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_022(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x2)
+  {
+    reg_t npc = pc + insn_length(0x00000002);
+    #include "insns/c_move.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x8002)
+  {
+    reg_t npc = pc + insn_length(0x00008002);
+    #include "insns/c_j.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_02c(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000c);
+    #include "insns/c_sd.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_036(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000016);
+    #include "insns/c_fsw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_040(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000000);
+    #include "insns/c_li.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_04a(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000a);
+    #include "insns/c_lw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_054(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000014);
+    #include "insns/c_flw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_05e(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_068(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000008);
+    #include "insns/c_swsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_072(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x12)
+  {
+    reg_t npc = pc + insn_length(0x00000012);
+    #include "insns/c_lw0.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x8012)
+  {
+    reg_t npc = pc + insn_length(0x00008012);
+    #include "insns/c_ld0.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_07c(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000001c);
+    #include "insns/c_add3.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_086(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000006);
+    #include "insns/c_sdsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_090(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000010);
+    #include "insns/c_beq.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_09a(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x801a)
+  {
+    reg_t npc = pc + insn_length(0x0000801a);
+    #include "insns/c_sub.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x1a)
+  {
+    reg_t npc = pc + insn_length(0x0000001a);
+    #include "insns/c_add.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_0a4(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000004);
+    #include "insns/c_ldsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_0ae(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_0b8(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000018);
+    #include "insns/c_fsd.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_0c2(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x2)
+  {
+    reg_t npc = pc + insn_length(0x00000002);
+    #include "insns/c_move.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x8002)
+  {
+    reg_t npc = pc + insn_length(0x00008002);
+    #include "insns/c_j.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_0cc(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000c);
+    #include "insns/c_sd.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_0d6(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000016);
+    #include "insns/c_fsw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_0e0(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000000);
+    #include "insns/c_li.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_0ea(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000a);
+    #include "insns/c_lw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_0f4(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000014);
+    #include "insns/c_flw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_0fe(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_108(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000008);
+    #include "insns/c_swsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_112(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x12)
+  {
+    reg_t npc = pc + insn_length(0x00000012);
+    #include "insns/c_lw0.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x8012)
+  {
+    reg_t npc = pc + insn_length(0x00008012);
+    #include "insns/c_ld0.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_11c(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000011c);
+    #include "insns/c_sub3.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_126(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000006);
+    #include "insns/c_sdsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_130(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000010);
+    #include "insns/c_beq.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_13a(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x801a)
+  {
+    reg_t npc = pc + insn_length(0x0000801a);
+    #include "insns/c_sub.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x1a)
+  {
+    reg_t npc = pc + insn_length(0x0000001a);
+    #include "insns/c_add.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_144(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000004);
+    #include "insns/c_ldsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_14e(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_158(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000018);
+    #include "insns/c_fsd.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_162(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x2)
+  {
+    reg_t npc = pc + insn_length(0x00000002);
+    #include "insns/c_move.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x8002)
+  {
+    reg_t npc = pc + insn_length(0x00008002);
+    #include "insns/c_j.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_16c(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000c);
+    #include "insns/c_sd.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_176(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000016);
+    #include "insns/c_fsw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_180(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000000);
+    #include "insns/c_li.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_18a(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000a);
+    #include "insns/c_lw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_194(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000014);
+    #include "insns/c_flw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_19e(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_1a8(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000008);
+    #include "insns/c_swsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_1b2(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x12)
+  {
+    reg_t npc = pc + insn_length(0x00000012);
+    #include "insns/c_lw0.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x8012)
+  {
+    reg_t npc = pc + insn_length(0x00008012);
+    #include "insns/c_ld0.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_1bc(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000011c);
+    #include "insns/c_sub3.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_1c6(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000006);
+    #include "insns/c_sdsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_1d0(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000010);
+    #include "insns/c_beq.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_1da(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x801a)
+  {
+    reg_t npc = pc + insn_length(0x0000801a);
+    #include "insns/c_sub.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x1a)
+  {
+    reg_t npc = pc + insn_length(0x0000001a);
+    #include "insns/c_add.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_1e4(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000004);
+    #include "insns/c_ldsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_1ee(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_1f8(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000018);
+    #include "insns/c_fsd.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_202(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x2)
+  {
+    reg_t npc = pc + insn_length(0x00000002);
+    #include "insns/c_move.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x8002)
+  {
+    reg_t npc = pc + insn_length(0x00008002);
+    #include "insns/c_j.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_20c(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000c);
+    #include "insns/c_sd.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_216(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000016);
+    #include "insns/c_fsw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_220(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000000);
+    #include "insns/c_li.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_22a(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000a);
+    #include "insns/c_lw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_234(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000014);
+    #include "insns/c_flw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_23e(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_248(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000008);
+    #include "insns/c_swsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_252(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x12)
+  {
+    reg_t npc = pc + insn_length(0x00000012);
+    #include "insns/c_lw0.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x8012)
+  {
+    reg_t npc = pc + insn_length(0x00008012);
+    #include "insns/c_ld0.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_25c(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000021c);
+    #include "insns/c_or3.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_266(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000006);
+    #include "insns/c_sdsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_270(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000010);
+    #include "insns/c_beq.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_27a(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x801a)
+  {
+    reg_t npc = pc + insn_length(0x0000801a);
+    #include "insns/c_sub.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x1a)
+  {
+    reg_t npc = pc + insn_length(0x0000001a);
+    #include "insns/c_add.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_284(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000004);
+    #include "insns/c_ldsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_28e(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_298(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000018);
+    #include "insns/c_fsd.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_2a2(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x2)
+  {
+    reg_t npc = pc + insn_length(0x00000002);
+    #include "insns/c_move.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x8002)
+  {
+    reg_t npc = pc + insn_length(0x00008002);
+    #include "insns/c_j.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_2ac(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000c);
+    #include "insns/c_sd.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_2b6(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000016);
+    #include "insns/c_fsw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_2c0(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000000);
+    #include "insns/c_li.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_2ca(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000a);
+    #include "insns/c_lw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_2d4(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000014);
+    #include "insns/c_flw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_2de(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_2e8(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000008);
+    #include "insns/c_swsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_2f2(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x12)
+  {
+    reg_t npc = pc + insn_length(0x00000012);
+    #include "insns/c_lw0.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x8012)
+  {
+    reg_t npc = pc + insn_length(0x00008012);
+    #include "insns/c_ld0.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_2fc(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000021c);
+    #include "insns/c_or3.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_306(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000006);
+    #include "insns/c_sdsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_310(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000010);
+    #include "insns/c_beq.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_31a(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x801a)
+  {
+    reg_t npc = pc + insn_length(0x0000801a);
+    #include "insns/c_sub.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x1a)
+  {
+    reg_t npc = pc + insn_length(0x0000001a);
+    #include "insns/c_add.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_324(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000004);
+    #include "insns/c_ldsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_32e(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_338(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000018);
+    #include "insns/c_fsd.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_342(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x2)
+  {
+    reg_t npc = pc + insn_length(0x00000002);
+    #include "insns/c_move.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x8002)
+  {
+    reg_t npc = pc + insn_length(0x00008002);
+    #include "insns/c_j.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_34c(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000c);
+    #include "insns/c_sd.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_356(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000016);
+    #include "insns/c_fsw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_360(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000000);
+    #include "insns/c_li.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_36a(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000a);
+    #include "insns/c_lw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_374(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000014);
+    #include "insns/c_flw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_37e(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_388(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000008);
+    #include "insns/c_swsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_392(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x12)
+  {
+    reg_t npc = pc + insn_length(0x00000012);
+    #include "insns/c_lw0.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x8012)
+  {
+    reg_t npc = pc + insn_length(0x00008012);
+    #include "insns/c_ld0.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_39c(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000031c);
+    #include "insns/c_and3.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_3a6(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000006);
+    #include "insns/c_sdsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_3b0(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000010);
+    #include "insns/c_beq.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_3ba(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x801a)
+  {
+    reg_t npc = pc + insn_length(0x0000801a);
+    #include "insns/c_sub.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x1a)
+  {
+    reg_t npc = pc + insn_length(0x0000001a);
+    #include "insns/c_add.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_3c4(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000004);
+    #include "insns/c_ldsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_3ce(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_3d8(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000018);
+    #include "insns/c_fsd.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_3e2(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x2)
+  {
+    reg_t npc = pc + insn_length(0x00000002);
+    #include "insns/c_move.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x8002)
+  {
+    reg_t npc = pc + insn_length(0x00008002);
+    #include "insns/c_j.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_3ec(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000c);
+    #include "insns/c_sd.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_3f6(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000016);
+    #include "insns/c_fsw.h"
+    return npc;
+}
+
diff --git a/riscv/dispatch_5.cc b/riscv/dispatch_5.cc
new file mode 100644 (file)
index 0000000..37dc146
--- /dev/null
@@ -0,0 +1,1148 @@
+#include "insn_includes.h"
+
+reg_t processor_t::opcode_func_005(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000005);
+    #include "insns/c_lwsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_00f(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0xfff) == 0x80f)
+  {
+    reg_t npc = pc + insn_length(0x0000080f);
+    #include "insns/vssegstb.h"
+    return npc;
+  }
+  if((insn.bits & 0x3fffff) == 0xf)
+  {
+    reg_t npc = pc + insn_length(0x0000000f);
+    #include "insns/vsb.h"
+    return npc;
+  }
+  if((insn.bits & 0x1ffff) == 0x100f)
+  {
+    reg_t npc = pc + insn_length(0x0000100f);
+    #include "insns/vsstb.h"
+    return npc;
+  }
+  if((insn.bits & 0x1ffff) == 0x200f)
+  {
+    reg_t npc = pc + insn_length(0x0000200f);
+    #include "insns/vssegb.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_019(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x1c1f) == 0x19)
+  {
+    reg_t npc = pc + insn_length(0x00000019);
+    #include "insns/c_slli.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x819)
+  {
+    reg_t npc = pc + insn_length(0x00000819);
+    #include "insns/c_srli.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1419)
+  {
+    reg_t npc = pc + insn_length(0x00001419);
+    #include "insns/c_srai32.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1819)
+  {
+    reg_t npc = pc + insn_length(0x00001819);
+    #include "insns/c_slliw.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0xc19)
+  {
+    reg_t npc = pc + insn_length(0x00000c19);
+    #include "insns/c_srli32.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1019)
+  {
+    reg_t npc = pc + insn_length(0x00001019);
+    #include "insns/c_srai.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x419)
+  {
+    reg_t npc = pc + insn_length(0x00000419);
+    #include "insns/c_slli32.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_023(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000023);
+    #include "insns/sb.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_02d(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000d);
+    #include "insns/c_sw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_037(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000037);
+    #include "insns/lui.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_041(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000001);
+    #include "insns/c_addi.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_04b(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000004b);
+    #include "insns/fnmsub_s.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_055(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000015);
+    #include "insns/c_fld.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_05f(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_069(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000009);
+    #include "insns/c_ld.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_073(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x1ffff) == 0x1873)
+  {
+    reg_t npc = pc + insn_length(0x00001873);
+    #include "insns/vmts.h"
+    return npc;
+  }
+  if((insn.bits & 0x3fffff) == 0x73)
+  {
+    reg_t npc = pc + insn_length(0x00000073);
+    #include "insns/vmvv.h"
+    return npc;
+  }
+  if((insn.bits & 0x3fffff) == 0x873)
+  {
+    reg_t npc = pc + insn_length(0x00000873);
+    #include "insns/vmsv.h"
+    return npc;
+  }
+  if((insn.bits & 0x1ffff) == 0x1073)
+  {
+    reg_t npc = pc + insn_length(0x00001073);
+    #include "insns/vmst.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_07d(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000001d);
+    #include "insns/c_addiw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_087(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_091(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000011);
+    #include "insns/c_bne.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_09b(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x3f83ff) == 0x9b)
+  {
+    reg_t npc = pc + insn_length(0x0000009b);
+    #include "insns/slliw.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_0a5(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000005);
+    #include "insns/c_lwsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_0af(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x000000af);
+    #include "insns/fence_i.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_0b9(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x1c1f) == 0x19)
+  {
+    reg_t npc = pc + insn_length(0x00000019);
+    #include "insns/c_slli.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x819)
+  {
+    reg_t npc = pc + insn_length(0x00000819);
+    #include "insns/c_srli.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1419)
+  {
+    reg_t npc = pc + insn_length(0x00001419);
+    #include "insns/c_srai32.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1819)
+  {
+    reg_t npc = pc + insn_length(0x00001819);
+    #include "insns/c_slliw.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0xc19)
+  {
+    reg_t npc = pc + insn_length(0x00000c19);
+    #include "insns/c_srli32.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1019)
+  {
+    reg_t npc = pc + insn_length(0x00001019);
+    #include "insns/c_srai.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x419)
+  {
+    reg_t npc = pc + insn_length(0x00000419);
+    #include "insns/c_slli32.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_0c3(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x000000c3);
+    #include "insns/fmadd_d.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_0cd(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000d);
+    #include "insns/c_sw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_0d7(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_0e1(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000001);
+    #include "insns/c_addi.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_0eb(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x000000eb);
+    #include "insns/jalr_r.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_0f5(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000015);
+    #include "insns/c_fld.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_0ff(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_109(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000009);
+    #include "insns/c_ld.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_113(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000113);
+    #include "insns/slti.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_11d(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000001d);
+    #include "insns/c_addiw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_127(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000127);
+    #include "insns/fsw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_131(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000011);
+    #include "insns/c_bne.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_13b(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_145(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000005);
+    #include "insns/c_lwsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_14f(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_159(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x1c1f) == 0x19)
+  {
+    reg_t npc = pc + insn_length(0x00000019);
+    #include "insns/c_slli.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x819)
+  {
+    reg_t npc = pc + insn_length(0x00000819);
+    #include "insns/c_srli.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1419)
+  {
+    reg_t npc = pc + insn_length(0x00001419);
+    #include "insns/c_srai32.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1819)
+  {
+    reg_t npc = pc + insn_length(0x00001819);
+    #include "insns/c_slliw.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0xc19)
+  {
+    reg_t npc = pc + insn_length(0x00000c19);
+    #include "insns/c_srli32.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1019)
+  {
+    reg_t npc = pc + insn_length(0x00001019);
+    #include "insns/c_srai.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x419)
+  {
+    reg_t npc = pc + insn_length(0x00000419);
+    #include "insns/c_slli32.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_163(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_16d(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000d);
+    #include "insns/c_sw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_177(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0xffffffff) == 0x177)
+  {
+    reg_t npc = pc + insn_length(0x00000177);
+    #include "insns/stop.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_181(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000001);
+    #include "insns/c_addi.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_18b(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x1ffff) == 0x158b)
+  {
+    reg_t npc = pc + insn_length(0x0000158b);
+    #include "insns/vflstd.h"
+    return npc;
+  }
+  if((insn.bits & 0x3fffff) == 0x18b)
+  {
+    reg_t npc = pc + insn_length(0x0000018b);
+    #include "insns/vld.h"
+    return npc;
+  }
+  if((insn.bits & 0x1ffff) == 0x118b)
+  {
+    reg_t npc = pc + insn_length(0x0000118b);
+    #include "insns/vlstd.h"
+    return npc;
+  }
+  if((insn.bits & 0xfff) == 0x98b)
+  {
+    reg_t npc = pc + insn_length(0x0000098b);
+    #include "insns/vlsegstd.h"
+    return npc;
+  }
+  if((insn.bits & 0x1ffff) == 0x258b)
+  {
+    reg_t npc = pc + insn_length(0x0000258b);
+    #include "insns/vflsegd.h"
+    return npc;
+  }
+  if((insn.bits & 0xfff) == 0xd8b)
+  {
+    reg_t npc = pc + insn_length(0x00000d8b);
+    #include "insns/vflsegstd.h"
+    return npc;
+  }
+  if((insn.bits & 0x3fffff) == 0x58b)
+  {
+    reg_t npc = pc + insn_length(0x0000058b);
+    #include "insns/vfld.h"
+    return npc;
+  }
+  if((insn.bits & 0x1ffff) == 0x218b)
+  {
+    reg_t npc = pc + insn_length(0x0000218b);
+    #include "insns/vlsegd.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_195(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000015);
+    #include "insns/c_fld.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_19f(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_1a9(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000009);
+    #include "insns/c_ld.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_1b3(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x1ffff) == 0x1b3)
+  {
+    reg_t npc = pc + insn_length(0x000001b3);
+    #include "insns/sltu.h"
+    return npc;
+  }
+  if((insn.bits & 0x1ffff) == 0x5b3)
+  {
+    reg_t npc = pc + insn_length(0x000005b3);
+    #include "insns/mulhu.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_1bd(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000001d);
+    #include "insns/c_addiw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_1c7(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_1d1(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000011);
+    #include "insns/c_bne.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_1db(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_1e5(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000005);
+    #include "insns/c_lwsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_1ef(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000006f);
+    #include "insns/jal.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_1f9(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x1c1f) == 0x19)
+  {
+    reg_t npc = pc + insn_length(0x00000019);
+    #include "insns/c_slli.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x819)
+  {
+    reg_t npc = pc + insn_length(0x00000819);
+    #include "insns/c_srli.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1419)
+  {
+    reg_t npc = pc + insn_length(0x00001419);
+    #include "insns/c_srai32.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1819)
+  {
+    reg_t npc = pc + insn_length(0x00001819);
+    #include "insns/c_slliw.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0xc19)
+  {
+    reg_t npc = pc + insn_length(0x00000c19);
+    #include "insns/c_srli32.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1019)
+  {
+    reg_t npc = pc + insn_length(0x00001019);
+    #include "insns/c_srai.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x419)
+  {
+    reg_t npc = pc + insn_length(0x00000419);
+    #include "insns/c_slli32.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_203(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000203);
+    #include "insns/lbu.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_20d(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000d);
+    #include "insns/c_sw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_217(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_221(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000001);
+    #include "insns/c_addi.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_22b(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_235(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000015);
+    #include "insns/c_fld.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_23f(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_249(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000009);
+    #include "insns/c_ld.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_253(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x3ff1ff) == 0x9053)
+  {
+    reg_t npc = pc + insn_length(0x00009053);
+    #include "insns/fcvt_lu_s.h"
+    return npc;
+  }
+  if((insn.bits & 0x3ff1ff) == 0x11053)
+  {
+    reg_t npc = pc + insn_length(0x00011053);
+    #include "insns/fcvt_s_d.h"
+    return npc;
+  }
+  if((insn.bits & 0x3ff1ff) == 0xe053)
+  {
+    reg_t npc = pc + insn_length(0x0000e053);
+    #include "insns/fcvt_s_w.h"
+    return npc;
+  }
+  if((insn.bits & 0x3ff1ff) == 0x8053)
+  {
+    reg_t npc = pc + insn_length(0x00008053);
+    #include "insns/fcvt_l_s.h"
+    return npc;
+  }
+  if((insn.bits & 0x1f1ff) == 0x3053)
+  {
+    reg_t npc = pc + insn_length(0x00003053);
+    #include "insns/fdiv_s.h"
+    return npc;
+  }
+  if((insn.bits & 0x3ff1ff) == 0xd053)
+  {
+    reg_t npc = pc + insn_length(0x0000d053);
+    #include "insns/fcvt_s_lu.h"
+    return npc;
+  }
+  if((insn.bits & 0x1f1ff) == 0x2053)
+  {
+    reg_t npc = pc + insn_length(0x00002053);
+    #include "insns/fmul_s.h"
+    return npc;
+  }
+  if((insn.bits & 0x3ff1ff) == 0xb053)
+  {
+    reg_t npc = pc + insn_length(0x0000b053);
+    #include "insns/fcvt_wu_s.h"
+    return npc;
+  }
+  if((insn.bits & 0x1f1ff) == 0x1053)
+  {
+    reg_t npc = pc + insn_length(0x00001053);
+    #include "insns/fsub_s.h"
+    return npc;
+  }
+  if((insn.bits & 0x3ff1ff) == 0xf053)
+  {
+    reg_t npc = pc + insn_length(0x0000f053);
+    #include "insns/fcvt_s_wu.h"
+    return npc;
+  }
+  if((insn.bits & 0x3ff1ff) == 0xc053)
+  {
+    reg_t npc = pc + insn_length(0x0000c053);
+    #include "insns/fcvt_s_l.h"
+    return npc;
+  }
+  if((insn.bits & 0x3ff1ff) == 0xa053)
+  {
+    reg_t npc = pc + insn_length(0x0000a053);
+    #include "insns/fcvt_w_s.h"
+    return npc;
+  }
+  if((insn.bits & 0x3ff1ff) == 0x4053)
+  {
+    reg_t npc = pc + insn_length(0x00004053);
+    #include "insns/fsqrt_s.h"
+    return npc;
+  }
+  if((insn.bits & 0x1f1ff) == 0x53)
+  {
+    reg_t npc = pc + insn_length(0x00000053);
+    #include "insns/fadd_s.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_25d(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000001d);
+    #include "insns/c_addiw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_267(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000067);
+    #include "insns/j.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_271(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000011);
+    #include "insns/c_bne.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_27b(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0xffffffff) == 0x27b)
+  {
+    reg_t npc = pc + insn_length(0x0000027b);
+    #include "insns/eret.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_285(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000005);
+    #include "insns/c_lwsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_28f(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_299(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x1c1f) == 0x19)
+  {
+    reg_t npc = pc + insn_length(0x00000019);
+    #include "insns/c_slli.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x819)
+  {
+    reg_t npc = pc + insn_length(0x00000819);
+    #include "insns/c_srli.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1419)
+  {
+    reg_t npc = pc + insn_length(0x00001419);
+    #include "insns/c_srai32.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1819)
+  {
+    reg_t npc = pc + insn_length(0x00001819);
+    #include "insns/c_slliw.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0xc19)
+  {
+    reg_t npc = pc + insn_length(0x00000c19);
+    #include "insns/c_srli32.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1019)
+  {
+    reg_t npc = pc + insn_length(0x00001019);
+    #include "insns/c_srai.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x419)
+  {
+    reg_t npc = pc + insn_length(0x00000419);
+    #include "insns/c_slli32.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_2a3(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_2ad(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000d);
+    #include "insns/c_sw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_2b7(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000037);
+    #include "insns/lui.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_2c1(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000001);
+    #include "insns/c_addi.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_2cb(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x000000cb);
+    #include "insns/fnmsub_d.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_2d5(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000015);
+    #include "insns/c_fld.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_2df(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_2e9(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000009);
+    #include "insns/c_ld.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_2f3(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x3fffff) == 0x2f3)
+  {
+    reg_t npc = pc + insn_length(0x000002f3);
+    #include "insns/vsetvl.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_2fd(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000001d);
+    #include "insns/c_addiw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_307(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_311(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000011);
+    #include "insns/c_bne.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_31b(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_325(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000005);
+    #include "insns/c_lwsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_32f(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000032f);
+    #include "insns/fence_l_cv.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_339(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x1c1f) == 0x19)
+  {
+    reg_t npc = pc + insn_length(0x00000019);
+    #include "insns/c_slli.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x819)
+  {
+    reg_t npc = pc + insn_length(0x00000819);
+    #include "insns/c_srli.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1419)
+  {
+    reg_t npc = pc + insn_length(0x00001419);
+    #include "insns/c_srai32.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1819)
+  {
+    reg_t npc = pc + insn_length(0x00001819);
+    #include "insns/c_slliw.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0xc19)
+  {
+    reg_t npc = pc + insn_length(0x00000c19);
+    #include "insns/c_srli32.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1019)
+  {
+    reg_t npc = pc + insn_length(0x00001019);
+    #include "insns/c_srai.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x419)
+  {
+    reg_t npc = pc + insn_length(0x00000419);
+    #include "insns/c_slli32.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_343(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_34d(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000d);
+    #include "insns/c_sw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_357(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_361(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000001);
+    #include "insns/c_addi.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_36b(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_375(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000015);
+    #include "insns/c_fld.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_37f(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_389(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000009);
+    #include "insns/c_ld.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_393(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000393);
+    #include "insns/andi.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_39d(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000001d);
+    #include "insns/c_addiw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_3a7(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_3b1(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000011);
+    #include "insns/c_bne.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_3bb(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x1ffff) == 0x7bb)
+  {
+    reg_t npc = pc + insn_length(0x000007bb);
+    #include "insns/remuw.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_3c5(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000005);
+    #include "insns/c_lwsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_3cf(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_3d9(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x1c1f) == 0x19)
+  {
+    reg_t npc = pc + insn_length(0x00000019);
+    #include "insns/c_slli.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x819)
+  {
+    reg_t npc = pc + insn_length(0x00000819);
+    #include "insns/c_srli.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1419)
+  {
+    reg_t npc = pc + insn_length(0x00001419);
+    #include "insns/c_srai32.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1819)
+  {
+    reg_t npc = pc + insn_length(0x00001819);
+    #include "insns/c_slliw.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0xc19)
+  {
+    reg_t npc = pc + insn_length(0x00000c19);
+    #include "insns/c_srli32.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1019)
+  {
+    reg_t npc = pc + insn_length(0x00001019);
+    #include "insns/c_srai.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x419)
+  {
+    reg_t npc = pc + insn_length(0x00000419);
+    #include "insns/c_slli32.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_3e3(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x000003e3);
+    #include "insns/bgeu.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_3ed(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000d);
+    #include "insns/c_sw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_3f7(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
diff --git a/riscv/dispatch_6.cc b/riscv/dispatch_6.cc
new file mode 100644 (file)
index 0000000..11a3c04
--- /dev/null
@@ -0,0 +1,880 @@
+#include "insn_includes.h"
+
+reg_t processor_t::opcode_func_006(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000006);
+    #include "insns/c_sdsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_010(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000010);
+    #include "insns/c_beq.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_01a(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x801a)
+  {
+    reg_t npc = pc + insn_length(0x0000801a);
+    #include "insns/c_sub.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x1a)
+  {
+    reg_t npc = pc + insn_length(0x0000001a);
+    #include "insns/c_add.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_024(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000004);
+    #include "insns/c_ldsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_02e(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_038(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000018);
+    #include "insns/c_fsd.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_042(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x2)
+  {
+    reg_t npc = pc + insn_length(0x00000002);
+    #include "insns/c_move.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x8002)
+  {
+    reg_t npc = pc + insn_length(0x00008002);
+    #include "insns/c_j.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_04c(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000c);
+    #include "insns/c_sd.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_056(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000016);
+    #include "insns/c_fsw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_060(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000000);
+    #include "insns/c_li.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_06a(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000a);
+    #include "insns/c_lw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_074(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000014);
+    #include "insns/c_flw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_07e(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_088(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000008);
+    #include "insns/c_swsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_092(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x12)
+  {
+    reg_t npc = pc + insn_length(0x00000012);
+    #include "insns/c_lw0.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x8012)
+  {
+    reg_t npc = pc + insn_length(0x00008012);
+    #include "insns/c_ld0.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_09c(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000001c);
+    #include "insns/c_add3.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_0a6(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000006);
+    #include "insns/c_sdsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_0b0(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000010);
+    #include "insns/c_beq.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_0ba(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x801a)
+  {
+    reg_t npc = pc + insn_length(0x0000801a);
+    #include "insns/c_sub.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x1a)
+  {
+    reg_t npc = pc + insn_length(0x0000001a);
+    #include "insns/c_add.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_0c4(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000004);
+    #include "insns/c_ldsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_0ce(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_0d8(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000018);
+    #include "insns/c_fsd.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_0e2(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x2)
+  {
+    reg_t npc = pc + insn_length(0x00000002);
+    #include "insns/c_move.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x8002)
+  {
+    reg_t npc = pc + insn_length(0x00008002);
+    #include "insns/c_j.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_0ec(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000c);
+    #include "insns/c_sd.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_0f6(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000016);
+    #include "insns/c_fsw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_100(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000000);
+    #include "insns/c_li.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_10a(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000a);
+    #include "insns/c_lw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_114(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000014);
+    #include "insns/c_flw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_11e(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_128(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000008);
+    #include "insns/c_swsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_132(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x12)
+  {
+    reg_t npc = pc + insn_length(0x00000012);
+    #include "insns/c_lw0.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x8012)
+  {
+    reg_t npc = pc + insn_length(0x00008012);
+    #include "insns/c_ld0.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_13c(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000011c);
+    #include "insns/c_sub3.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_146(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000006);
+    #include "insns/c_sdsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_150(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000010);
+    #include "insns/c_beq.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_15a(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x801a)
+  {
+    reg_t npc = pc + insn_length(0x0000801a);
+    #include "insns/c_sub.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x1a)
+  {
+    reg_t npc = pc + insn_length(0x0000001a);
+    #include "insns/c_add.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_164(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000004);
+    #include "insns/c_ldsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_16e(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_178(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000018);
+    #include "insns/c_fsd.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_182(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x2)
+  {
+    reg_t npc = pc + insn_length(0x00000002);
+    #include "insns/c_move.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x8002)
+  {
+    reg_t npc = pc + insn_length(0x00008002);
+    #include "insns/c_j.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_18c(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000c);
+    #include "insns/c_sd.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_196(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000016);
+    #include "insns/c_fsw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_1a0(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000000);
+    #include "insns/c_li.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_1aa(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000a);
+    #include "insns/c_lw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_1b4(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000014);
+    #include "insns/c_flw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_1be(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_1c8(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000008);
+    #include "insns/c_swsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_1d2(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x12)
+  {
+    reg_t npc = pc + insn_length(0x00000012);
+    #include "insns/c_lw0.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x8012)
+  {
+    reg_t npc = pc + insn_length(0x00008012);
+    #include "insns/c_ld0.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_1dc(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000011c);
+    #include "insns/c_sub3.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_1e6(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000006);
+    #include "insns/c_sdsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_1f0(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000010);
+    #include "insns/c_beq.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_1fa(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x801a)
+  {
+    reg_t npc = pc + insn_length(0x0000801a);
+    #include "insns/c_sub.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x1a)
+  {
+    reg_t npc = pc + insn_length(0x0000001a);
+    #include "insns/c_add.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_204(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000004);
+    #include "insns/c_ldsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_20e(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_218(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000018);
+    #include "insns/c_fsd.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_222(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x2)
+  {
+    reg_t npc = pc + insn_length(0x00000002);
+    #include "insns/c_move.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x8002)
+  {
+    reg_t npc = pc + insn_length(0x00008002);
+    #include "insns/c_j.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_22c(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000c);
+    #include "insns/c_sd.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_236(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000016);
+    #include "insns/c_fsw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_240(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000000);
+    #include "insns/c_li.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_24a(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000a);
+    #include "insns/c_lw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_254(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000014);
+    #include "insns/c_flw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_25e(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_268(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000008);
+    #include "insns/c_swsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_272(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x12)
+  {
+    reg_t npc = pc + insn_length(0x00000012);
+    #include "insns/c_lw0.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x8012)
+  {
+    reg_t npc = pc + insn_length(0x00008012);
+    #include "insns/c_ld0.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_27c(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000021c);
+    #include "insns/c_or3.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_286(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000006);
+    #include "insns/c_sdsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_290(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000010);
+    #include "insns/c_beq.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_29a(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x801a)
+  {
+    reg_t npc = pc + insn_length(0x0000801a);
+    #include "insns/c_sub.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x1a)
+  {
+    reg_t npc = pc + insn_length(0x0000001a);
+    #include "insns/c_add.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_2a4(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000004);
+    #include "insns/c_ldsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_2ae(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_2b8(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000018);
+    #include "insns/c_fsd.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_2c2(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x2)
+  {
+    reg_t npc = pc + insn_length(0x00000002);
+    #include "insns/c_move.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x8002)
+  {
+    reg_t npc = pc + insn_length(0x00008002);
+    #include "insns/c_j.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_2cc(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000c);
+    #include "insns/c_sd.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_2d6(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000016);
+    #include "insns/c_fsw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_2e0(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000000);
+    #include "insns/c_li.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_2ea(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000a);
+    #include "insns/c_lw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_2f4(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000014);
+    #include "insns/c_flw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_2fe(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_308(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000008);
+    #include "insns/c_swsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_312(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x12)
+  {
+    reg_t npc = pc + insn_length(0x00000012);
+    #include "insns/c_lw0.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x8012)
+  {
+    reg_t npc = pc + insn_length(0x00008012);
+    #include "insns/c_ld0.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_31c(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000031c);
+    #include "insns/c_and3.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_326(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000006);
+    #include "insns/c_sdsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_330(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000010);
+    #include "insns/c_beq.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_33a(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x801a)
+  {
+    reg_t npc = pc + insn_length(0x0000801a);
+    #include "insns/c_sub.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x1a)
+  {
+    reg_t npc = pc + insn_length(0x0000001a);
+    #include "insns/c_add.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_344(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000004);
+    #include "insns/c_ldsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_34e(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_358(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000018);
+    #include "insns/c_fsd.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_362(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x2)
+  {
+    reg_t npc = pc + insn_length(0x00000002);
+    #include "insns/c_move.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x8002)
+  {
+    reg_t npc = pc + insn_length(0x00008002);
+    #include "insns/c_j.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_36c(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000c);
+    #include "insns/c_sd.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_376(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000016);
+    #include "insns/c_fsw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_380(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000000);
+    #include "insns/c_li.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_38a(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000a);
+    #include "insns/c_lw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_394(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000014);
+    #include "insns/c_flw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_39e(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_3a8(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000008);
+    #include "insns/c_swsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_3b2(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x12)
+  {
+    reg_t npc = pc + insn_length(0x00000012);
+    #include "insns/c_lw0.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x8012)
+  {
+    reg_t npc = pc + insn_length(0x00008012);
+    #include "insns/c_ld0.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_3bc(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000031c);
+    #include "insns/c_and3.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_3c6(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000006);
+    #include "insns/c_sdsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_3d0(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000010);
+    #include "insns/c_beq.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_3da(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x801a)
+  {
+    reg_t npc = pc + insn_length(0x0000801a);
+    #include "insns/c_sub.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x1a)
+  {
+    reg_t npc = pc + insn_length(0x0000001a);
+    #include "insns/c_add.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_3e4(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000004);
+    #include "insns/c_ldsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_3ee(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_3f8(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000018);
+    #include "insns/c_fsd.h"
+    return npc;
+}
+
diff --git a/riscv/dispatch_7.cc b/riscv/dispatch_7.cc
new file mode 100644 (file)
index 0000000..7e8dbd8
--- /dev/null
@@ -0,0 +1,1086 @@
+#include "insn_includes.h"
+
+reg_t processor_t::opcode_func_007(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_011(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000011);
+    #include "insns/c_bne.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_01b(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000001b);
+    #include "insns/addiw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_025(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000005);
+    #include "insns/c_lwsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_02f(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_039(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x1c1f) == 0x19)
+  {
+    reg_t npc = pc + insn_length(0x00000019);
+    #include "insns/c_slli.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x819)
+  {
+    reg_t npc = pc + insn_length(0x00000819);
+    #include "insns/c_srli.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1419)
+  {
+    reg_t npc = pc + insn_length(0x00001419);
+    #include "insns/c_srai32.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1819)
+  {
+    reg_t npc = pc + insn_length(0x00001819);
+    #include "insns/c_slliw.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0xc19)
+  {
+    reg_t npc = pc + insn_length(0x00000c19);
+    #include "insns/c_srli32.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1019)
+  {
+    reg_t npc = pc + insn_length(0x00001019);
+    #include "insns/c_srai.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x419)
+  {
+    reg_t npc = pc + insn_length(0x00000419);
+    #include "insns/c_slli32.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_043(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000043);
+    #include "insns/fmadd_s.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_04d(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000d);
+    #include "insns/c_sw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_057(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_061(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000001);
+    #include "insns/c_addi.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_06b(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000006b);
+    #include "insns/jalr_c.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_075(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000015);
+    #include "insns/c_fld.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_07f(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_089(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000009);
+    #include "insns/c_ld.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_093(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x3f03ff) == 0x93)
+  {
+    reg_t npc = pc + insn_length(0x00000093);
+    #include "insns/slli.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_09d(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000001d);
+    #include "insns/c_addiw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_0a7(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_0b1(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000011);
+    #include "insns/c_bne.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_0bb(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x1ffff) == 0xbb)
+  {
+    reg_t npc = pc + insn_length(0x000000bb);
+    #include "insns/sllw.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_0c5(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000005);
+    #include "insns/c_lwsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_0cf(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x000000cf);
+    #include "insns/fnmadd_d.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_0d9(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x1c1f) == 0x19)
+  {
+    reg_t npc = pc + insn_length(0x00000019);
+    #include "insns/c_slli.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x819)
+  {
+    reg_t npc = pc + insn_length(0x00000819);
+    #include "insns/c_srli.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1419)
+  {
+    reg_t npc = pc + insn_length(0x00001419);
+    #include "insns/c_srai32.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1819)
+  {
+    reg_t npc = pc + insn_length(0x00001819);
+    #include "insns/c_slliw.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0xc19)
+  {
+    reg_t npc = pc + insn_length(0x00000c19);
+    #include "insns/c_srli32.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1019)
+  {
+    reg_t npc = pc + insn_length(0x00001019);
+    #include "insns/c_srai.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x419)
+  {
+    reg_t npc = pc + insn_length(0x00000419);
+    #include "insns/c_slli32.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_0e3(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x000000e3);
+    #include "insns/bne.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_0ed(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000d);
+    #include "insns/c_sw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_0f7(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0xffffffff) == 0xf7)
+  {
+    reg_t npc = pc + insn_length(0x000000f7);
+    #include "insns/break.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_101(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000001);
+    #include "insns/c_addi.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_10b(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x1ffff) == 0x150b)
+  {
+    reg_t npc = pc + insn_length(0x0000150b);
+    #include "insns/vflstw.h"
+    return npc;
+  }
+  if((insn.bits & 0x3fffff) == 0x10b)
+  {
+    reg_t npc = pc + insn_length(0x0000010b);
+    #include "insns/vlw.h"
+    return npc;
+  }
+  if((insn.bits & 0x1ffff) == 0x110b)
+  {
+    reg_t npc = pc + insn_length(0x0000110b);
+    #include "insns/vlstw.h"
+    return npc;
+  }
+  if((insn.bits & 0xfff) == 0x90b)
+  {
+    reg_t npc = pc + insn_length(0x0000090b);
+    #include "insns/vlsegstw.h"
+    return npc;
+  }
+  if((insn.bits & 0x1ffff) == 0x250b)
+  {
+    reg_t npc = pc + insn_length(0x0000250b);
+    #include "insns/vflsegw.h"
+    return npc;
+  }
+  if((insn.bits & 0xfff) == 0xd0b)
+  {
+    reg_t npc = pc + insn_length(0x00000d0b);
+    #include "insns/vflsegstw.h"
+    return npc;
+  }
+  if((insn.bits & 0x3fffff) == 0x50b)
+  {
+    reg_t npc = pc + insn_length(0x0000050b);
+    #include "insns/vflw.h"
+    return npc;
+  }
+  if((insn.bits & 0x1ffff) == 0x210b)
+  {
+    reg_t npc = pc + insn_length(0x0000210b);
+    #include "insns/vlsegw.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_115(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000015);
+    #include "insns/c_fld.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_11f(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_129(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000009);
+    #include "insns/c_ld.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_133(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x1ffff) == 0x533)
+  {
+    reg_t npc = pc + insn_length(0x00000533);
+    #include "insns/mulhsu.h"
+    return npc;
+  }
+  if((insn.bits & 0x1ffff) == 0x133)
+  {
+    reg_t npc = pc + insn_length(0x00000133);
+    #include "insns/slt.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_13d(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000001d);
+    #include "insns/c_addiw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_147(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_151(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000011);
+    #include "insns/c_bne.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_15b(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_165(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000005);
+    #include "insns/c_lwsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_16f(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000006f);
+    #include "insns/jal.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_179(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x1c1f) == 0x19)
+  {
+    reg_t npc = pc + insn_length(0x00000019);
+    #include "insns/c_slli.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x819)
+  {
+    reg_t npc = pc + insn_length(0x00000819);
+    #include "insns/c_srli.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1419)
+  {
+    reg_t npc = pc + insn_length(0x00001419);
+    #include "insns/c_srai32.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1819)
+  {
+    reg_t npc = pc + insn_length(0x00001819);
+    #include "insns/c_slliw.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0xc19)
+  {
+    reg_t npc = pc + insn_length(0x00000c19);
+    #include "insns/c_srli32.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1019)
+  {
+    reg_t npc = pc + insn_length(0x00001019);
+    #include "insns/c_srai.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x419)
+  {
+    reg_t npc = pc + insn_length(0x00000419);
+    #include "insns/c_slli32.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_183(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000183);
+    #include "insns/ld.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_18d(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000d);
+    #include "insns/c_sw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_197(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_1a1(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000001);
+    #include "insns/c_addi.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_1ab(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x1ffff) == 0x19ab)
+  {
+    reg_t npc = pc + insn_length(0x000019ab);
+    #include "insns/amominu_d.h"
+    return npc;
+  }
+  if((insn.bits & 0x1ffff) == 0x9ab)
+  {
+    reg_t npc = pc + insn_length(0x000009ab);
+    #include "insns/amoand_d.h"
+    return npc;
+  }
+  if((insn.bits & 0x1ffff) == 0x1dab)
+  {
+    reg_t npc = pc + insn_length(0x00001dab);
+    #include "insns/amomaxu_d.h"
+    return npc;
+  }
+  if((insn.bits & 0x1ffff) == 0x1ab)
+  {
+    reg_t npc = pc + insn_length(0x000001ab);
+    #include "insns/amoadd_d.h"
+    return npc;
+  }
+  if((insn.bits & 0x1ffff) == 0x15ab)
+  {
+    reg_t npc = pc + insn_length(0x000015ab);
+    #include "insns/amomax_d.h"
+    return npc;
+  }
+  if((insn.bits & 0x1ffff) == 0xdab)
+  {
+    reg_t npc = pc + insn_length(0x00000dab);
+    #include "insns/amoor_d.h"
+    return npc;
+  }
+  if((insn.bits & 0x1ffff) == 0x5ab)
+  {
+    reg_t npc = pc + insn_length(0x000005ab);
+    #include "insns/amoswap_d.h"
+    return npc;
+  }
+  if((insn.bits & 0x1ffff) == 0x11ab)
+  {
+    reg_t npc = pc + insn_length(0x000011ab);
+    #include "insns/amomin_d.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_1b5(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000015);
+    #include "insns/c_fld.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_1bf(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_1c9(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000009);
+    #include "insns/c_ld.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_1d3(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_1dd(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000001d);
+    #include "insns/c_addiw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_1e7(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000067);
+    #include "insns/j.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_1f1(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000011);
+    #include "insns/c_bne.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_1fb(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0xf801ffff) == 0x1fb)
+  {
+    reg_t npc = pc + insn_length(0x000001fb);
+    #include "insns/mtpcr.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_205(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000005);
+    #include "insns/c_lwsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_20f(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_219(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x1c1f) == 0x19)
+  {
+    reg_t npc = pc + insn_length(0x00000019);
+    #include "insns/c_slli.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x819)
+  {
+    reg_t npc = pc + insn_length(0x00000819);
+    #include "insns/c_srli.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1419)
+  {
+    reg_t npc = pc + insn_length(0x00001419);
+    #include "insns/c_srai32.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1819)
+  {
+    reg_t npc = pc + insn_length(0x00001819);
+    #include "insns/c_slliw.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0xc19)
+  {
+    reg_t npc = pc + insn_length(0x00000c19);
+    #include "insns/c_srli32.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1019)
+  {
+    reg_t npc = pc + insn_length(0x00001019);
+    #include "insns/c_srai.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x419)
+  {
+    reg_t npc = pc + insn_length(0x00000419);
+    #include "insns/c_slli32.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_223(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_22d(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000d);
+    #include "insns/c_sw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_237(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000037);
+    #include "insns/lui.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_241(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000001);
+    #include "insns/c_addi.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_24b(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000004b);
+    #include "insns/fnmsub_s.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_255(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000015);
+    #include "insns/c_fld.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_25f(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_269(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000009);
+    #include "insns/c_ld.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_273(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_27d(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000001d);
+    #include "insns/c_addiw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_287(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_291(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000011);
+    #include "insns/c_bne.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_29b(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x3f83ff) == 0x29b)
+  {
+    reg_t npc = pc + insn_length(0x0000029b);
+    #include "insns/srliw.h"
+    return npc;
+  }
+  if((insn.bits & 0x3f83ff) == 0x1029b)
+  {
+    reg_t npc = pc + insn_length(0x0001029b);
+    #include "insns/sraiw.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_2a5(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000005);
+    #include "insns/c_lwsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_2af(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x000002af);
+    #include "insns/fence_g_v.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_2b9(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x1c1f) == 0x19)
+  {
+    reg_t npc = pc + insn_length(0x00000019);
+    #include "insns/c_slli.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x819)
+  {
+    reg_t npc = pc + insn_length(0x00000819);
+    #include "insns/c_srli.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1419)
+  {
+    reg_t npc = pc + insn_length(0x00001419);
+    #include "insns/c_srai32.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1819)
+  {
+    reg_t npc = pc + insn_length(0x00001819);
+    #include "insns/c_slliw.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0xc19)
+  {
+    reg_t npc = pc + insn_length(0x00000c19);
+    #include "insns/c_srli32.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1019)
+  {
+    reg_t npc = pc + insn_length(0x00001019);
+    #include "insns/c_srai.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x419)
+  {
+    reg_t npc = pc + insn_length(0x00000419);
+    #include "insns/c_slli32.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_2c3(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x000000c3);
+    #include "insns/fmadd_d.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_2cd(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000d);
+    #include "insns/c_sw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_2d7(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_2e1(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000001);
+    #include "insns/c_addi.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_2eb(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_2f5(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000015);
+    #include "insns/c_fld.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_2ff(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_309(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000009);
+    #include "insns/c_ld.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_313(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000313);
+    #include "insns/ori.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_31d(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000001d);
+    #include "insns/c_addiw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_327(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_331(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000011);
+    #include "insns/c_bne.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_33b(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x1ffff) == 0x73b)
+  {
+    reg_t npc = pc + insn_length(0x0000073b);
+    #include "insns/remw.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_345(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000005);
+    #include "insns/c_lwsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_34f(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_359(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x1c1f) == 0x19)
+  {
+    reg_t npc = pc + insn_length(0x00000019);
+    #include "insns/c_slli.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x819)
+  {
+    reg_t npc = pc + insn_length(0x00000819);
+    #include "insns/c_srli.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1419)
+  {
+    reg_t npc = pc + insn_length(0x00001419);
+    #include "insns/c_srai32.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1819)
+  {
+    reg_t npc = pc + insn_length(0x00001819);
+    #include "insns/c_slliw.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0xc19)
+  {
+    reg_t npc = pc + insn_length(0x00000c19);
+    #include "insns/c_srli32.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1019)
+  {
+    reg_t npc = pc + insn_length(0x00001019);
+    #include "insns/c_srai.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x419)
+  {
+    reg_t npc = pc + insn_length(0x00000419);
+    #include "insns/c_slli32.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_363(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000363);
+    #include "insns/bltu.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_36d(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000d);
+    #include "insns/c_sw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_377(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_381(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000001);
+    #include "insns/c_addi.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_38b(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_395(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000015);
+    #include "insns/c_fld.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_39f(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_3a9(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000009);
+    #include "insns/c_ld.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_3b3(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x1ffff) == 0x7b3)
+  {
+    reg_t npc = pc + insn_length(0x000007b3);
+    #include "insns/remu.h"
+    return npc;
+  }
+  if((insn.bits & 0x1ffff) == 0x3b3)
+  {
+    reg_t npc = pc + insn_length(0x000003b3);
+    #include "insns/and.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_3bd(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000001d);
+    #include "insns/c_addiw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_3c7(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_3d1(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000011);
+    #include "insns/c_bne.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_3db(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_3e5(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000005);
+    #include "insns/c_lwsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_3ef(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000006f);
+    #include "insns/jal.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_3f9(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x1c1f) == 0x19)
+  {
+    reg_t npc = pc + insn_length(0x00000019);
+    #include "insns/c_slli.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x819)
+  {
+    reg_t npc = pc + insn_length(0x00000819);
+    #include "insns/c_srli.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1419)
+  {
+    reg_t npc = pc + insn_length(0x00001419);
+    #include "insns/c_srai32.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1819)
+  {
+    reg_t npc = pc + insn_length(0x00001819);
+    #include "insns/c_slliw.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0xc19)
+  {
+    reg_t npc = pc + insn_length(0x00000c19);
+    #include "insns/c_srli32.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1019)
+  {
+    reg_t npc = pc + insn_length(0x00001019);
+    #include "insns/c_srai.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x419)
+  {
+    reg_t npc = pc + insn_length(0x00000419);
+    #include "insns/c_slli32.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
diff --git a/riscv/dispatch_8.cc b/riscv/dispatch_8.cc
new file mode 100644 (file)
index 0000000..3dd44dd
--- /dev/null
@@ -0,0 +1,892 @@
+#include "insn_includes.h"
+
+reg_t processor_t::opcode_func_008(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000008);
+    #include "insns/c_swsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_012(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x12)
+  {
+    reg_t npc = pc + insn_length(0x00000012);
+    #include "insns/c_lw0.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x8012)
+  {
+    reg_t npc = pc + insn_length(0x00008012);
+    #include "insns/c_ld0.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_01c(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000001c);
+    #include "insns/c_add3.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_026(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000006);
+    #include "insns/c_sdsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_030(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000010);
+    #include "insns/c_beq.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_03a(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x801a)
+  {
+    reg_t npc = pc + insn_length(0x0000801a);
+    #include "insns/c_sub.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x1a)
+  {
+    reg_t npc = pc + insn_length(0x0000001a);
+    #include "insns/c_add.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_044(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000004);
+    #include "insns/c_ldsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_04e(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_058(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000018);
+    #include "insns/c_fsd.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_062(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x2)
+  {
+    reg_t npc = pc + insn_length(0x00000002);
+    #include "insns/c_move.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x8002)
+  {
+    reg_t npc = pc + insn_length(0x00008002);
+    #include "insns/c_j.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_06c(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000c);
+    #include "insns/c_sd.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_076(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000016);
+    #include "insns/c_fsw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_080(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000000);
+    #include "insns/c_li.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_08a(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000a);
+    #include "insns/c_lw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_094(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000014);
+    #include "insns/c_flw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_09e(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_0a8(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000008);
+    #include "insns/c_swsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_0b2(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x12)
+  {
+    reg_t npc = pc + insn_length(0x00000012);
+    #include "insns/c_lw0.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x8012)
+  {
+    reg_t npc = pc + insn_length(0x00008012);
+    #include "insns/c_ld0.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_0bc(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000001c);
+    #include "insns/c_add3.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_0c6(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000006);
+    #include "insns/c_sdsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_0d0(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000010);
+    #include "insns/c_beq.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_0da(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x801a)
+  {
+    reg_t npc = pc + insn_length(0x0000801a);
+    #include "insns/c_sub.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x1a)
+  {
+    reg_t npc = pc + insn_length(0x0000001a);
+    #include "insns/c_add.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_0e4(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000004);
+    #include "insns/c_ldsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_0ee(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_0f8(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000018);
+    #include "insns/c_fsd.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_102(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x2)
+  {
+    reg_t npc = pc + insn_length(0x00000002);
+    #include "insns/c_move.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x8002)
+  {
+    reg_t npc = pc + insn_length(0x00008002);
+    #include "insns/c_j.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_10c(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000c);
+    #include "insns/c_sd.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_116(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000016);
+    #include "insns/c_fsw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_120(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000000);
+    #include "insns/c_li.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_12a(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000a);
+    #include "insns/c_lw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_134(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000014);
+    #include "insns/c_flw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_13e(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_148(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000008);
+    #include "insns/c_swsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_152(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x12)
+  {
+    reg_t npc = pc + insn_length(0x00000012);
+    #include "insns/c_lw0.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x8012)
+  {
+    reg_t npc = pc + insn_length(0x00008012);
+    #include "insns/c_ld0.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_15c(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000011c);
+    #include "insns/c_sub3.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_166(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000006);
+    #include "insns/c_sdsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_170(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000010);
+    #include "insns/c_beq.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_17a(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x801a)
+  {
+    reg_t npc = pc + insn_length(0x0000801a);
+    #include "insns/c_sub.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x1a)
+  {
+    reg_t npc = pc + insn_length(0x0000001a);
+    #include "insns/c_add.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_184(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000004);
+    #include "insns/c_ldsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_18e(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_198(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000018);
+    #include "insns/c_fsd.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_1a2(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x2)
+  {
+    reg_t npc = pc + insn_length(0x00000002);
+    #include "insns/c_move.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x8002)
+  {
+    reg_t npc = pc + insn_length(0x00008002);
+    #include "insns/c_j.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_1ac(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000c);
+    #include "insns/c_sd.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_1b6(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000016);
+    #include "insns/c_fsw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_1c0(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000000);
+    #include "insns/c_li.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_1ca(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000a);
+    #include "insns/c_lw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_1d4(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000014);
+    #include "insns/c_flw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_1de(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_1e8(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000008);
+    #include "insns/c_swsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_1f2(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x12)
+  {
+    reg_t npc = pc + insn_length(0x00000012);
+    #include "insns/c_lw0.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x8012)
+  {
+    reg_t npc = pc + insn_length(0x00008012);
+    #include "insns/c_ld0.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_1fc(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000011c);
+    #include "insns/c_sub3.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_206(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000006);
+    #include "insns/c_sdsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_210(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000010);
+    #include "insns/c_beq.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_21a(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x801a)
+  {
+    reg_t npc = pc + insn_length(0x0000801a);
+    #include "insns/c_sub.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x1a)
+  {
+    reg_t npc = pc + insn_length(0x0000001a);
+    #include "insns/c_add.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_224(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000004);
+    #include "insns/c_ldsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_22e(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_238(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000018);
+    #include "insns/c_fsd.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_242(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x2)
+  {
+    reg_t npc = pc + insn_length(0x00000002);
+    #include "insns/c_move.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x8002)
+  {
+    reg_t npc = pc + insn_length(0x00008002);
+    #include "insns/c_j.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_24c(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000c);
+    #include "insns/c_sd.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_256(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000016);
+    #include "insns/c_fsw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_260(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000000);
+    #include "insns/c_li.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_26a(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000a);
+    #include "insns/c_lw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_274(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000014);
+    #include "insns/c_flw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_27e(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_288(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000008);
+    #include "insns/c_swsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_292(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x12)
+  {
+    reg_t npc = pc + insn_length(0x00000012);
+    #include "insns/c_lw0.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x8012)
+  {
+    reg_t npc = pc + insn_length(0x00008012);
+    #include "insns/c_ld0.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_29c(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000021c);
+    #include "insns/c_or3.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_2a6(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000006);
+    #include "insns/c_sdsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_2b0(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000010);
+    #include "insns/c_beq.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_2ba(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x801a)
+  {
+    reg_t npc = pc + insn_length(0x0000801a);
+    #include "insns/c_sub.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x1a)
+  {
+    reg_t npc = pc + insn_length(0x0000001a);
+    #include "insns/c_add.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_2c4(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000004);
+    #include "insns/c_ldsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_2ce(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_2d8(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000018);
+    #include "insns/c_fsd.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_2e2(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x2)
+  {
+    reg_t npc = pc + insn_length(0x00000002);
+    #include "insns/c_move.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x8002)
+  {
+    reg_t npc = pc + insn_length(0x00008002);
+    #include "insns/c_j.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_2ec(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000c);
+    #include "insns/c_sd.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_2f6(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000016);
+    #include "insns/c_fsw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_300(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000000);
+    #include "insns/c_li.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_30a(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000a);
+    #include "insns/c_lw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_314(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000014);
+    #include "insns/c_flw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_31e(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_328(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000008);
+    #include "insns/c_swsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_332(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x12)
+  {
+    reg_t npc = pc + insn_length(0x00000012);
+    #include "insns/c_lw0.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x8012)
+  {
+    reg_t npc = pc + insn_length(0x00008012);
+    #include "insns/c_ld0.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_33c(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000031c);
+    #include "insns/c_and3.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_346(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000006);
+    #include "insns/c_sdsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_350(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000010);
+    #include "insns/c_beq.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_35a(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x801a)
+  {
+    reg_t npc = pc + insn_length(0x0000801a);
+    #include "insns/c_sub.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x1a)
+  {
+    reg_t npc = pc + insn_length(0x0000001a);
+    #include "insns/c_add.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_364(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000004);
+    #include "insns/c_ldsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_36e(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_378(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000018);
+    #include "insns/c_fsd.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_382(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x2)
+  {
+    reg_t npc = pc + insn_length(0x00000002);
+    #include "insns/c_move.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x8002)
+  {
+    reg_t npc = pc + insn_length(0x00008002);
+    #include "insns/c_j.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_38c(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000c);
+    #include "insns/c_sd.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_396(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000016);
+    #include "insns/c_fsw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_3a0(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000000);
+    #include "insns/c_li.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_3aa(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000a);
+    #include "insns/c_lw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_3b4(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000014);
+    #include "insns/c_flw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_3be(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_3c8(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000008);
+    #include "insns/c_swsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_3d2(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x12)
+  {
+    reg_t npc = pc + insn_length(0x00000012);
+    #include "insns/c_lw0.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x8012)
+  {
+    reg_t npc = pc + insn_length(0x00008012);
+    #include "insns/c_ld0.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_3dc(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000031c);
+    #include "insns/c_and3.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_3e6(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000006);
+    #include "insns/c_sdsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_3f0(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000010);
+    #include "insns/c_beq.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_3fa(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x801f) == 0x801a)
+  {
+    reg_t npc = pc + insn_length(0x0000801a);
+    #include "insns/c_sub.h"
+    return npc;
+  }
+  if((insn.bits & 0x801f) == 0x1a)
+  {
+    reg_t npc = pc + insn_length(0x0000001a);
+    #include "insns/c_add.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
diff --git a/riscv/dispatch_9.cc b/riscv/dispatch_9.cc
new file mode 100644 (file)
index 0000000..eb5d76c
--- /dev/null
@@ -0,0 +1,1144 @@
+#include "insn_includes.h"
+
+reg_t processor_t::opcode_func_009(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000009);
+    #include "insns/c_ld.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_013(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000013);
+    #include "insns/addi.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_01d(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000001d);
+    #include "insns/c_addiw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_027(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_031(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000011);
+    #include "insns/c_bne.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_03b(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x1ffff) == 0x43b)
+  {
+    reg_t npc = pc + insn_length(0x0000043b);
+    #include "insns/mulw.h"
+    return npc;
+  }
+  if((insn.bits & 0x1ffff) == 0x3b)
+  {
+    reg_t npc = pc + insn_length(0x0000003b);
+    #include "insns/addw.h"
+    return npc;
+  }
+  if((insn.bits & 0x1ffff) == 0x1003b)
+  {
+    reg_t npc = pc + insn_length(0x0001003b);
+    #include "insns/subw.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_045(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000005);
+    #include "insns/c_lwsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_04f(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000004f);
+    #include "insns/fnmadd_s.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_059(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x1c1f) == 0x19)
+  {
+    reg_t npc = pc + insn_length(0x00000019);
+    #include "insns/c_slli.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x819)
+  {
+    reg_t npc = pc + insn_length(0x00000819);
+    #include "insns/c_srli.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1419)
+  {
+    reg_t npc = pc + insn_length(0x00001419);
+    #include "insns/c_srai32.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1819)
+  {
+    reg_t npc = pc + insn_length(0x00001819);
+    #include "insns/c_slliw.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0xc19)
+  {
+    reg_t npc = pc + insn_length(0x00000c19);
+    #include "insns/c_srli32.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1019)
+  {
+    reg_t npc = pc + insn_length(0x00001019);
+    #include "insns/c_srai.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x419)
+  {
+    reg_t npc = pc + insn_length(0x00000419);
+    #include "insns/c_slli32.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_063(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000063);
+    #include "insns/beq.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_06d(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000d);
+    #include "insns/c_sw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_077(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0xffffffff) == 0x77)
+  {
+    reg_t npc = pc + insn_length(0x00000077);
+    #include "insns/syscall.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_081(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000001);
+    #include "insns/c_addi.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_08b(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x3fffff) == 0x8b)
+  {
+    reg_t npc = pc + insn_length(0x0000008b);
+    #include "insns/vlh.h"
+    return npc;
+  }
+  if((insn.bits & 0x1ffff) == 0x108b)
+  {
+    reg_t npc = pc + insn_length(0x0000108b);
+    #include "insns/vlsth.h"
+    return npc;
+  }
+  if((insn.bits & 0xfff) == 0x88b)
+  {
+    reg_t npc = pc + insn_length(0x0000088b);
+    #include "insns/vlsegsth.h"
+    return npc;
+  }
+  if((insn.bits & 0x1ffff) == 0x208b)
+  {
+    reg_t npc = pc + insn_length(0x0000208b);
+    #include "insns/vlsegh.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_095(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000015);
+    #include "insns/c_fld.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_09f(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_0a9(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000009);
+    #include "insns/c_ld.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_0b3(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x1ffff) == 0xb3)
+  {
+    reg_t npc = pc + insn_length(0x000000b3);
+    #include "insns/sll.h"
+    return npc;
+  }
+  if((insn.bits & 0x1ffff) == 0x4b3)
+  {
+    reg_t npc = pc + insn_length(0x000004b3);
+    #include "insns/mulh.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_0bd(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000001d);
+    #include "insns/c_addiw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_0c7(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x000000c7);
+    #include "insns/fmsub_d.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_0d1(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000011);
+    #include "insns/c_bne.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_0db(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_0e5(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000005);
+    #include "insns/c_lwsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_0ef(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000006f);
+    #include "insns/jal.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_0f9(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x1c1f) == 0x19)
+  {
+    reg_t npc = pc + insn_length(0x00000019);
+    #include "insns/c_slli.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x819)
+  {
+    reg_t npc = pc + insn_length(0x00000819);
+    #include "insns/c_srli.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1419)
+  {
+    reg_t npc = pc + insn_length(0x00001419);
+    #include "insns/c_srai32.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1819)
+  {
+    reg_t npc = pc + insn_length(0x00001819);
+    #include "insns/c_slliw.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0xc19)
+  {
+    reg_t npc = pc + insn_length(0x00000c19);
+    #include "insns/c_srli32.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1019)
+  {
+    reg_t npc = pc + insn_length(0x00001019);
+    #include "insns/c_srai.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x419)
+  {
+    reg_t npc = pc + insn_length(0x00000419);
+    #include "insns/c_slli32.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_103(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000103);
+    #include "insns/lw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_10d(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000d);
+    #include "insns/c_sw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_117(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_121(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000001);
+    #include "insns/c_addi.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_12b(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x1ffff) == 0x192b)
+  {
+    reg_t npc = pc + insn_length(0x0000192b);
+    #include "insns/amominu_w.h"
+    return npc;
+  }
+  if((insn.bits & 0x1ffff) == 0x92b)
+  {
+    reg_t npc = pc + insn_length(0x0000092b);
+    #include "insns/amoand_w.h"
+    return npc;
+  }
+  if((insn.bits & 0x1ffff) == 0x1d2b)
+  {
+    reg_t npc = pc + insn_length(0x00001d2b);
+    #include "insns/amomaxu_w.h"
+    return npc;
+  }
+  if((insn.bits & 0x1ffff) == 0x152b)
+  {
+    reg_t npc = pc + insn_length(0x0000152b);
+    #include "insns/amomax_w.h"
+    return npc;
+  }
+  if((insn.bits & 0x1ffff) == 0x12b)
+  {
+    reg_t npc = pc + insn_length(0x0000012b);
+    #include "insns/amoadd_w.h"
+    return npc;
+  }
+  if((insn.bits & 0x1ffff) == 0xd2b)
+  {
+    reg_t npc = pc + insn_length(0x00000d2b);
+    #include "insns/amoor_w.h"
+    return npc;
+  }
+  if((insn.bits & 0x1ffff) == 0x112b)
+  {
+    reg_t npc = pc + insn_length(0x0000112b);
+    #include "insns/amomin_w.h"
+    return npc;
+  }
+  if((insn.bits & 0x1ffff) == 0x52b)
+  {
+    reg_t npc = pc + insn_length(0x0000052b);
+    #include "insns/amoswap_w.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_135(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000015);
+    #include "insns/c_fld.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_13f(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_149(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000009);
+    #include "insns/c_ld.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_153(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_15d(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000001d);
+    #include "insns/c_addiw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_167(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000067);
+    #include "insns/j.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_171(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000011);
+    #include "insns/c_bne.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_17b(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x7c1ffff) == 0x17b)
+  {
+    reg_t npc = pc + insn_length(0x0000017b);
+    #include "insns/mfpcr.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_185(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000005);
+    #include "insns/c_lwsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_18f(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0xfff) == 0x98f)
+  {
+    reg_t npc = pc + insn_length(0x0000098f);
+    #include "insns/vssegstd.h"
+    return npc;
+  }
+  if((insn.bits & 0xfff) == 0xd8f)
+  {
+    reg_t npc = pc + insn_length(0x00000d8f);
+    #include "insns/vfssegstd.h"
+    return npc;
+  }
+  if((insn.bits & 0x1ffff) == 0x118f)
+  {
+    reg_t npc = pc + insn_length(0x0000118f);
+    #include "insns/vsstd.h"
+    return npc;
+  }
+  if((insn.bits & 0x1ffff) == 0x218f)
+  {
+    reg_t npc = pc + insn_length(0x0000218f);
+    #include "insns/vssegd.h"
+    return npc;
+  }
+  if((insn.bits & 0x1ffff) == 0x158f)
+  {
+    reg_t npc = pc + insn_length(0x0000158f);
+    #include "insns/vfsstd.h"
+    return npc;
+  }
+  if((insn.bits & 0x3fffff) == 0x18f)
+  {
+    reg_t npc = pc + insn_length(0x0000018f);
+    #include "insns/vsd.h"
+    return npc;
+  }
+  if((insn.bits & 0x3fffff) == 0x58f)
+  {
+    reg_t npc = pc + insn_length(0x0000058f);
+    #include "insns/vfsd.h"
+    return npc;
+  }
+  if((insn.bits & 0x1ffff) == 0x258f)
+  {
+    reg_t npc = pc + insn_length(0x0000258f);
+    #include "insns/vfssegd.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_199(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x1c1f) == 0x19)
+  {
+    reg_t npc = pc + insn_length(0x00000019);
+    #include "insns/c_slli.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x819)
+  {
+    reg_t npc = pc + insn_length(0x00000819);
+    #include "insns/c_srli.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1419)
+  {
+    reg_t npc = pc + insn_length(0x00001419);
+    #include "insns/c_srai32.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1819)
+  {
+    reg_t npc = pc + insn_length(0x00001819);
+    #include "insns/c_slliw.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0xc19)
+  {
+    reg_t npc = pc + insn_length(0x00000c19);
+    #include "insns/c_srli32.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1019)
+  {
+    reg_t npc = pc + insn_length(0x00001019);
+    #include "insns/c_srai.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x419)
+  {
+    reg_t npc = pc + insn_length(0x00000419);
+    #include "insns/c_slli32.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_1a3(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x000001a3);
+    #include "insns/sd.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_1ad(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000d);
+    #include "insns/c_sw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_1b7(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000037);
+    #include "insns/lui.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_1c1(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000001);
+    #include "insns/c_addi.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_1cb(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_1d5(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000015);
+    #include "insns/c_fld.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_1df(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_1e9(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000009);
+    #include "insns/c_ld.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_1f3(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x000001f3);
+    #include "insns/vtcfgivl.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_1fd(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000001d);
+    #include "insns/c_addiw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_207(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_211(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000011);
+    #include "insns/c_bne.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_21b(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_225(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000005);
+    #include "insns/c_lwsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_22f(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000022f);
+    #include "insns/fence_l_v.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_239(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x1c1f) == 0x19)
+  {
+    reg_t npc = pc + insn_length(0x00000019);
+    #include "insns/c_slli.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x819)
+  {
+    reg_t npc = pc + insn_length(0x00000819);
+    #include "insns/c_srli.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1419)
+  {
+    reg_t npc = pc + insn_length(0x00001419);
+    #include "insns/c_srai32.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1819)
+  {
+    reg_t npc = pc + insn_length(0x00001819);
+    #include "insns/c_slliw.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0xc19)
+  {
+    reg_t npc = pc + insn_length(0x00000c19);
+    #include "insns/c_srli32.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1019)
+  {
+    reg_t npc = pc + insn_length(0x00001019);
+    #include "insns/c_srai.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x419)
+  {
+    reg_t npc = pc + insn_length(0x00000419);
+    #include "insns/c_slli32.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_243(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000043);
+    #include "insns/fmadd_s.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_24d(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000d);
+    #include "insns/c_sw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_257(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_261(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000001);
+    #include "insns/c_addi.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_26b(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x7ffffff) == 0x26b)
+  {
+    reg_t npc = pc + insn_length(0x0000026b);
+    #include "insns/rdnpc.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_275(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000015);
+    #include "insns/c_fld.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_27f(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_289(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000009);
+    #include "insns/c_ld.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_293(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x3f03ff) == 0x293)
+  {
+    reg_t npc = pc + insn_length(0x00000293);
+    #include "insns/srli.h"
+    return npc;
+  }
+  if((insn.bits & 0x3f03ff) == 0x10293)
+  {
+    reg_t npc = pc + insn_length(0x00010293);
+    #include "insns/srai.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_29d(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000001d);
+    #include "insns/c_addiw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_2a7(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_2b1(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000011);
+    #include "insns/c_bne.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_2bb(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x1ffff) == 0x6bb)
+  {
+    reg_t npc = pc + insn_length(0x000006bb);
+    #include "insns/divuw.h"
+    return npc;
+  }
+  if((insn.bits & 0x1ffff) == 0x2bb)
+  {
+    reg_t npc = pc + insn_length(0x000002bb);
+    #include "insns/srlw.h"
+    return npc;
+  }
+  if((insn.bits & 0x1ffff) == 0x102bb)
+  {
+    reg_t npc = pc + insn_length(0x000102bb);
+    #include "insns/sraw.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_2c5(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000005);
+    #include "insns/c_lwsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_2cf(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x000000cf);
+    #include "insns/fnmadd_d.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_2d9(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x1c1f) == 0x19)
+  {
+    reg_t npc = pc + insn_length(0x00000019);
+    #include "insns/c_slli.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x819)
+  {
+    reg_t npc = pc + insn_length(0x00000819);
+    #include "insns/c_srli.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1419)
+  {
+    reg_t npc = pc + insn_length(0x00001419);
+    #include "insns/c_srai32.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1819)
+  {
+    reg_t npc = pc + insn_length(0x00001819);
+    #include "insns/c_slliw.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0xc19)
+  {
+    reg_t npc = pc + insn_length(0x00000c19);
+    #include "insns/c_srli32.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1019)
+  {
+    reg_t npc = pc + insn_length(0x00001019);
+    #include "insns/c_srai.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x419)
+  {
+    reg_t npc = pc + insn_length(0x00000419);
+    #include "insns/c_slli32.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_2e3(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x000002e3);
+    #include "insns/bge.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_2ed(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000d);
+    #include "insns/c_sw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_2f7(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x1ffff) == 0x6f7)
+  {
+    reg_t npc = pc + insn_length(0x000006f7);
+    #include "insns/movn.h"
+    return npc;
+  }
+  if((insn.bits & 0x1ffff) == 0x2f7)
+  {
+    reg_t npc = pc + insn_length(0x000002f7);
+    #include "insns/movz.h"
+    return npc;
+  }
+  if((insn.bits & 0x1ffff) == 0xef7)
+  {
+    reg_t npc = pc + insn_length(0x00000ef7);
+    #include "insns/fmovn.h"
+    return npc;
+  }
+  if((insn.bits & 0x1ffff) == 0xaf7)
+  {
+    reg_t npc = pc + insn_length(0x00000af7);
+    #include "insns/fmovz.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_301(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000001);
+    #include "insns/c_addi.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_30b(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0xfff) == 0xb0b)
+  {
+    reg_t npc = pc + insn_length(0x00000b0b);
+    #include "insns/vlsegstwu.h"
+    return npc;
+  }
+  if((insn.bits & 0x3fffff) == 0x30b)
+  {
+    reg_t npc = pc + insn_length(0x0000030b);
+    #include "insns/vlwu.h"
+    return npc;
+  }
+  if((insn.bits & 0x1ffff) == 0x130b)
+  {
+    reg_t npc = pc + insn_length(0x0000130b);
+    #include "insns/vlstwu.h"
+    return npc;
+  }
+  if((insn.bits & 0x1ffff) == 0x230b)
+  {
+    reg_t npc = pc + insn_length(0x0000230b);
+    #include "insns/vlsegwu.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_315(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000015);
+    #include "insns/c_fld.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_31f(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_329(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000009);
+    #include "insns/c_ld.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_333(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x1ffff) == 0x733)
+  {
+    reg_t npc = pc + insn_length(0x00000733);
+    #include "insns/rem.h"
+    return npc;
+  }
+  if((insn.bits & 0x1ffff) == 0x333)
+  {
+    reg_t npc = pc + insn_length(0x00000333);
+    #include "insns/or.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_33d(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000001d);
+    #include "insns/c_addiw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_347(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_351(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000011);
+    #include "insns/c_bne.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_35b(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_365(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000005);
+    #include "insns/c_lwsp.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_36f(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000006f);
+    #include "insns/jal.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_379(insn_t insn, reg_t pc)
+{
+  if((insn.bits & 0x1c1f) == 0x19)
+  {
+    reg_t npc = pc + insn_length(0x00000019);
+    #include "insns/c_slli.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x819)
+  {
+    reg_t npc = pc + insn_length(0x00000819);
+    #include "insns/c_srli.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1419)
+  {
+    reg_t npc = pc + insn_length(0x00001419);
+    #include "insns/c_srai32.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1819)
+  {
+    reg_t npc = pc + insn_length(0x00001819);
+    #include "insns/c_slliw.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0xc19)
+  {
+    reg_t npc = pc + insn_length(0x00000c19);
+    #include "insns/c_srli32.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x1019)
+  {
+    reg_t npc = pc + insn_length(0x00001019);
+    #include "insns/c_srai.h"
+    return npc;
+  }
+  if((insn.bits & 0x1c1f) == 0x419)
+  {
+    reg_t npc = pc + insn_length(0x00000419);
+    #include "insns/c_slli32.h"
+    return npc;
+  }
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_383(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_38d(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000000d);
+    #include "insns/c_sw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_397(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_3a1(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000001);
+    #include "insns/c_addi.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_3ab(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_3b5(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000015);
+    #include "insns/c_fld.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_3bf(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_3c9(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000009);
+    #include "insns/c_ld.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_3d3(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
+reg_t processor_t::opcode_func_3dd(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x0000001d);
+    #include "insns/c_addiw.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_3e7(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000067);
+    #include "insns/j.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_3f1(insn_t insn, reg_t pc)
+{
+    reg_t npc = pc + insn_length(0x00000011);
+    #include "insns/c_bne.h"
+    return npc;
+}
+
+reg_t processor_t::opcode_func_3fb(insn_t insn, reg_t pc)
+{
+  throw trap_illegal_instruction;
+}
+
diff --git a/riscv/dispatch_decl.h b/riscv/dispatch_decl.h
new file mode 100644 (file)
index 0000000..efd4f99
--- /dev/null
@@ -0,0 +1,1026 @@
+/* Automatically generated by parse-opcodes */
+#define dispatch_index(insn) (((insn).bits >> 0) & 1023)
+reg_t opcode_func_000(insn_t insn, reg_t pc);
+reg_t opcode_func_001(insn_t insn, reg_t pc);
+reg_t opcode_func_002(insn_t insn, reg_t pc);
+reg_t opcode_func_003(insn_t insn, reg_t pc);
+reg_t opcode_func_004(insn_t insn, reg_t pc);
+reg_t opcode_func_005(insn_t insn, reg_t pc);
+reg_t opcode_func_006(insn_t insn, reg_t pc);
+reg_t opcode_func_007(insn_t insn, reg_t pc);
+reg_t opcode_func_008(insn_t insn, reg_t pc);
+reg_t opcode_func_009(insn_t insn, reg_t pc);
+reg_t opcode_func_00a(insn_t insn, reg_t pc);
+reg_t opcode_func_00b(insn_t insn, reg_t pc);
+reg_t opcode_func_00c(insn_t insn, reg_t pc);
+reg_t opcode_func_00d(insn_t insn, reg_t pc);
+reg_t opcode_func_00e(insn_t insn, reg_t pc);
+reg_t opcode_func_00f(insn_t insn, reg_t pc);
+reg_t opcode_func_010(insn_t insn, reg_t pc);
+reg_t opcode_func_011(insn_t insn, reg_t pc);
+reg_t opcode_func_012(insn_t insn, reg_t pc);
+reg_t opcode_func_013(insn_t insn, reg_t pc);
+reg_t opcode_func_014(insn_t insn, reg_t pc);
+reg_t opcode_func_015(insn_t insn, reg_t pc);
+reg_t opcode_func_016(insn_t insn, reg_t pc);
+reg_t opcode_func_017(insn_t insn, reg_t pc);
+reg_t opcode_func_018(insn_t insn, reg_t pc);
+reg_t opcode_func_019(insn_t insn, reg_t pc);
+reg_t opcode_func_01a(insn_t insn, reg_t pc);
+reg_t opcode_func_01b(insn_t insn, reg_t pc);
+reg_t opcode_func_01c(insn_t insn, reg_t pc);
+reg_t opcode_func_01d(insn_t insn, reg_t pc);
+reg_t opcode_func_01e(insn_t insn, reg_t pc);
+reg_t opcode_func_01f(insn_t insn, reg_t pc);
+reg_t opcode_func_020(insn_t insn, reg_t pc);
+reg_t opcode_func_021(insn_t insn, reg_t pc);
+reg_t opcode_func_022(insn_t insn, reg_t pc);
+reg_t opcode_func_023(insn_t insn, reg_t pc);
+reg_t opcode_func_024(insn_t insn, reg_t pc);
+reg_t opcode_func_025(insn_t insn, reg_t pc);
+reg_t opcode_func_026(insn_t insn, reg_t pc);
+reg_t opcode_func_027(insn_t insn, reg_t pc);
+reg_t opcode_func_028(insn_t insn, reg_t pc);
+reg_t opcode_func_029(insn_t insn, reg_t pc);
+reg_t opcode_func_02a(insn_t insn, reg_t pc);
+reg_t opcode_func_02b(insn_t insn, reg_t pc);
+reg_t opcode_func_02c(insn_t insn, reg_t pc);
+reg_t opcode_func_02d(insn_t insn, reg_t pc);
+reg_t opcode_func_02e(insn_t insn, reg_t pc);
+reg_t opcode_func_02f(insn_t insn, reg_t pc);
+reg_t opcode_func_030(insn_t insn, reg_t pc);
+reg_t opcode_func_031(insn_t insn, reg_t pc);
+reg_t opcode_func_032(insn_t insn, reg_t pc);
+reg_t opcode_func_033(insn_t insn, reg_t pc);
+reg_t opcode_func_034(insn_t insn, reg_t pc);
+reg_t opcode_func_035(insn_t insn, reg_t pc);
+reg_t opcode_func_036(insn_t insn, reg_t pc);
+reg_t opcode_func_037(insn_t insn, reg_t pc);
+reg_t opcode_func_038(insn_t insn, reg_t pc);
+reg_t opcode_func_039(insn_t insn, reg_t pc);
+reg_t opcode_func_03a(insn_t insn, reg_t pc);
+reg_t opcode_func_03b(insn_t insn, reg_t pc);
+reg_t opcode_func_03c(insn_t insn, reg_t pc);
+reg_t opcode_func_03d(insn_t insn, reg_t pc);
+reg_t opcode_func_03e(insn_t insn, reg_t pc);
+reg_t opcode_func_03f(insn_t insn, reg_t pc);
+reg_t opcode_func_040(insn_t insn, reg_t pc);
+reg_t opcode_func_041(insn_t insn, reg_t pc);
+reg_t opcode_func_042(insn_t insn, reg_t pc);
+reg_t opcode_func_043(insn_t insn, reg_t pc);
+reg_t opcode_func_044(insn_t insn, reg_t pc);
+reg_t opcode_func_045(insn_t insn, reg_t pc);
+reg_t opcode_func_046(insn_t insn, reg_t pc);
+reg_t opcode_func_047(insn_t insn, reg_t pc);
+reg_t opcode_func_048(insn_t insn, reg_t pc);
+reg_t opcode_func_049(insn_t insn, reg_t pc);
+reg_t opcode_func_04a(insn_t insn, reg_t pc);
+reg_t opcode_func_04b(insn_t insn, reg_t pc);
+reg_t opcode_func_04c(insn_t insn, reg_t pc);
+reg_t opcode_func_04d(insn_t insn, reg_t pc);
+reg_t opcode_func_04e(insn_t insn, reg_t pc);
+reg_t opcode_func_04f(insn_t insn, reg_t pc);
+reg_t opcode_func_050(insn_t insn, reg_t pc);
+reg_t opcode_func_051(insn_t insn, reg_t pc);
+reg_t opcode_func_052(insn_t insn, reg_t pc);
+reg_t opcode_func_053(insn_t insn, reg_t pc);
+reg_t opcode_func_054(insn_t insn, reg_t pc);
+reg_t opcode_func_055(insn_t insn, reg_t pc);
+reg_t opcode_func_056(insn_t insn, reg_t pc);
+reg_t opcode_func_057(insn_t insn, reg_t pc);
+reg_t opcode_func_058(insn_t insn, reg_t pc);
+reg_t opcode_func_059(insn_t insn, reg_t pc);
+reg_t opcode_func_05a(insn_t insn, reg_t pc);
+reg_t opcode_func_05b(insn_t insn, reg_t pc);
+reg_t opcode_func_05c(insn_t insn, reg_t pc);
+reg_t opcode_func_05d(insn_t insn, reg_t pc);
+reg_t opcode_func_05e(insn_t insn, reg_t pc);
+reg_t opcode_func_05f(insn_t insn, reg_t pc);
+reg_t opcode_func_060(insn_t insn, reg_t pc);
+reg_t opcode_func_061(insn_t insn, reg_t pc);
+reg_t opcode_func_062(insn_t insn, reg_t pc);
+reg_t opcode_func_063(insn_t insn, reg_t pc);
+reg_t opcode_func_064(insn_t insn, reg_t pc);
+reg_t opcode_func_065(insn_t insn, reg_t pc);
+reg_t opcode_func_066(insn_t insn, reg_t pc);
+reg_t opcode_func_067(insn_t insn, reg_t pc);
+reg_t opcode_func_068(insn_t insn, reg_t pc);
+reg_t opcode_func_069(insn_t insn, reg_t pc);
+reg_t opcode_func_06a(insn_t insn, reg_t pc);
+reg_t opcode_func_06b(insn_t insn, reg_t pc);
+reg_t opcode_func_06c(insn_t insn, reg_t pc);
+reg_t opcode_func_06d(insn_t insn, reg_t pc);
+reg_t opcode_func_06e(insn_t insn, reg_t pc);
+reg_t opcode_func_06f(insn_t insn, reg_t pc);
+reg_t opcode_func_070(insn_t insn, reg_t pc);
+reg_t opcode_func_071(insn_t insn, reg_t pc);
+reg_t opcode_func_072(insn_t insn, reg_t pc);
+reg_t opcode_func_073(insn_t insn, reg_t pc);
+reg_t opcode_func_074(insn_t insn, reg_t pc);
+reg_t opcode_func_075(insn_t insn, reg_t pc);
+reg_t opcode_func_076(insn_t insn, reg_t pc);
+reg_t opcode_func_077(insn_t insn, reg_t pc);
+reg_t opcode_func_078(insn_t insn, reg_t pc);
+reg_t opcode_func_079(insn_t insn, reg_t pc);
+reg_t opcode_func_07a(insn_t insn, reg_t pc);
+reg_t opcode_func_07b(insn_t insn, reg_t pc);
+reg_t opcode_func_07c(insn_t insn, reg_t pc);
+reg_t opcode_func_07d(insn_t insn, reg_t pc);
+reg_t opcode_func_07e(insn_t insn, reg_t pc);
+reg_t opcode_func_07f(insn_t insn, reg_t pc);
+reg_t opcode_func_080(insn_t insn, reg_t pc);
+reg_t opcode_func_081(insn_t insn, reg_t pc);
+reg_t opcode_func_082(insn_t insn, reg_t pc);
+reg_t opcode_func_083(insn_t insn, reg_t pc);
+reg_t opcode_func_084(insn_t insn, reg_t pc);
+reg_t opcode_func_085(insn_t insn, reg_t pc);
+reg_t opcode_func_086(insn_t insn, reg_t pc);
+reg_t opcode_func_087(insn_t insn, reg_t pc);
+reg_t opcode_func_088(insn_t insn, reg_t pc);
+reg_t opcode_func_089(insn_t insn, reg_t pc);
+reg_t opcode_func_08a(insn_t insn, reg_t pc);
+reg_t opcode_func_08b(insn_t insn, reg_t pc);
+reg_t opcode_func_08c(insn_t insn, reg_t pc);
+reg_t opcode_func_08d(insn_t insn, reg_t pc);
+reg_t opcode_func_08e(insn_t insn, reg_t pc);
+reg_t opcode_func_08f(insn_t insn, reg_t pc);
+reg_t opcode_func_090(insn_t insn, reg_t pc);
+reg_t opcode_func_091(insn_t insn, reg_t pc);
+reg_t opcode_func_092(insn_t insn, reg_t pc);
+reg_t opcode_func_093(insn_t insn, reg_t pc);
+reg_t opcode_func_094(insn_t insn, reg_t pc);
+reg_t opcode_func_095(insn_t insn, reg_t pc);
+reg_t opcode_func_096(insn_t insn, reg_t pc);
+reg_t opcode_func_097(insn_t insn, reg_t pc);
+reg_t opcode_func_098(insn_t insn, reg_t pc);
+reg_t opcode_func_099(insn_t insn, reg_t pc);
+reg_t opcode_func_09a(insn_t insn, reg_t pc);
+reg_t opcode_func_09b(insn_t insn, reg_t pc);
+reg_t opcode_func_09c(insn_t insn, reg_t pc);
+reg_t opcode_func_09d(insn_t insn, reg_t pc);
+reg_t opcode_func_09e(insn_t insn, reg_t pc);
+reg_t opcode_func_09f(insn_t insn, reg_t pc);
+reg_t opcode_func_0a0(insn_t insn, reg_t pc);
+reg_t opcode_func_0a1(insn_t insn, reg_t pc);
+reg_t opcode_func_0a2(insn_t insn, reg_t pc);
+reg_t opcode_func_0a3(insn_t insn, reg_t pc);
+reg_t opcode_func_0a4(insn_t insn, reg_t pc);
+reg_t opcode_func_0a5(insn_t insn, reg_t pc);
+reg_t opcode_func_0a6(insn_t insn, reg_t pc);
+reg_t opcode_func_0a7(insn_t insn, reg_t pc);
+reg_t opcode_func_0a8(insn_t insn, reg_t pc);
+reg_t opcode_func_0a9(insn_t insn, reg_t pc);
+reg_t opcode_func_0aa(insn_t insn, reg_t pc);
+reg_t opcode_func_0ab(insn_t insn, reg_t pc);
+reg_t opcode_func_0ac(insn_t insn, reg_t pc);
+reg_t opcode_func_0ad(insn_t insn, reg_t pc);
+reg_t opcode_func_0ae(insn_t insn, reg_t pc);
+reg_t opcode_func_0af(insn_t insn, reg_t pc);
+reg_t opcode_func_0b0(insn_t insn, reg_t pc);
+reg_t opcode_func_0b1(insn_t insn, reg_t pc);
+reg_t opcode_func_0b2(insn_t insn, reg_t pc);
+reg_t opcode_func_0b3(insn_t insn, reg_t pc);
+reg_t opcode_func_0b4(insn_t insn, reg_t pc);
+reg_t opcode_func_0b5(insn_t insn, reg_t pc);
+reg_t opcode_func_0b6(insn_t insn, reg_t pc);
+reg_t opcode_func_0b7(insn_t insn, reg_t pc);
+reg_t opcode_func_0b8(insn_t insn, reg_t pc);
+reg_t opcode_func_0b9(insn_t insn, reg_t pc);
+reg_t opcode_func_0ba(insn_t insn, reg_t pc);
+reg_t opcode_func_0bb(insn_t insn, reg_t pc);
+reg_t opcode_func_0bc(insn_t insn, reg_t pc);
+reg_t opcode_func_0bd(insn_t insn, reg_t pc);
+reg_t opcode_func_0be(insn_t insn, reg_t pc);
+reg_t opcode_func_0bf(insn_t insn, reg_t pc);
+reg_t opcode_func_0c0(insn_t insn, reg_t pc);
+reg_t opcode_func_0c1(insn_t insn, reg_t pc);
+reg_t opcode_func_0c2(insn_t insn, reg_t pc);
+reg_t opcode_func_0c3(insn_t insn, reg_t pc);
+reg_t opcode_func_0c4(insn_t insn, reg_t pc);
+reg_t opcode_func_0c5(insn_t insn, reg_t pc);
+reg_t opcode_func_0c6(insn_t insn, reg_t pc);
+reg_t opcode_func_0c7(insn_t insn, reg_t pc);
+reg_t opcode_func_0c8(insn_t insn, reg_t pc);
+reg_t opcode_func_0c9(insn_t insn, reg_t pc);
+reg_t opcode_func_0ca(insn_t insn, reg_t pc);
+reg_t opcode_func_0cb(insn_t insn, reg_t pc);
+reg_t opcode_func_0cc(insn_t insn, reg_t pc);
+reg_t opcode_func_0cd(insn_t insn, reg_t pc);
+reg_t opcode_func_0ce(insn_t insn, reg_t pc);
+reg_t opcode_func_0cf(insn_t insn, reg_t pc);
+reg_t opcode_func_0d0(insn_t insn, reg_t pc);
+reg_t opcode_func_0d1(insn_t insn, reg_t pc);
+reg_t opcode_func_0d2(insn_t insn, reg_t pc);
+reg_t opcode_func_0d3(insn_t insn, reg_t pc);
+reg_t opcode_func_0d4(insn_t insn, reg_t pc);
+reg_t opcode_func_0d5(insn_t insn, reg_t pc);
+reg_t opcode_func_0d6(insn_t insn, reg_t pc);
+reg_t opcode_func_0d7(insn_t insn, reg_t pc);
+reg_t opcode_func_0d8(insn_t insn, reg_t pc);
+reg_t opcode_func_0d9(insn_t insn, reg_t pc);
+reg_t opcode_func_0da(insn_t insn, reg_t pc);
+reg_t opcode_func_0db(insn_t insn, reg_t pc);
+reg_t opcode_func_0dc(insn_t insn, reg_t pc);
+reg_t opcode_func_0dd(insn_t insn, reg_t pc);
+reg_t opcode_func_0de(insn_t insn, reg_t pc);
+reg_t opcode_func_0df(insn_t insn, reg_t pc);
+reg_t opcode_func_0e0(insn_t insn, reg_t pc);
+reg_t opcode_func_0e1(insn_t insn, reg_t pc);
+reg_t opcode_func_0e2(insn_t insn, reg_t pc);
+reg_t opcode_func_0e3(insn_t insn, reg_t pc);
+reg_t opcode_func_0e4(insn_t insn, reg_t pc);
+reg_t opcode_func_0e5(insn_t insn, reg_t pc);
+reg_t opcode_func_0e6(insn_t insn, reg_t pc);
+reg_t opcode_func_0e7(insn_t insn, reg_t pc);
+reg_t opcode_func_0e8(insn_t insn, reg_t pc);
+reg_t opcode_func_0e9(insn_t insn, reg_t pc);
+reg_t opcode_func_0ea(insn_t insn, reg_t pc);
+reg_t opcode_func_0eb(insn_t insn, reg_t pc);
+reg_t opcode_func_0ec(insn_t insn, reg_t pc);
+reg_t opcode_func_0ed(insn_t insn, reg_t pc);
+reg_t opcode_func_0ee(insn_t insn, reg_t pc);
+reg_t opcode_func_0ef(insn_t insn, reg_t pc);
+reg_t opcode_func_0f0(insn_t insn, reg_t pc);
+reg_t opcode_func_0f1(insn_t insn, reg_t pc);
+reg_t opcode_func_0f2(insn_t insn, reg_t pc);
+reg_t opcode_func_0f3(insn_t insn, reg_t pc);
+reg_t opcode_func_0f4(insn_t insn, reg_t pc);
+reg_t opcode_func_0f5(insn_t insn, reg_t pc);
+reg_t opcode_func_0f6(insn_t insn, reg_t pc);
+reg_t opcode_func_0f7(insn_t insn, reg_t pc);
+reg_t opcode_func_0f8(insn_t insn, reg_t pc);
+reg_t opcode_func_0f9(insn_t insn, reg_t pc);
+reg_t opcode_func_0fa(insn_t insn, reg_t pc);
+reg_t opcode_func_0fb(insn_t insn, reg_t pc);
+reg_t opcode_func_0fc(insn_t insn, reg_t pc);
+reg_t opcode_func_0fd(insn_t insn, reg_t pc);
+reg_t opcode_func_0fe(insn_t insn, reg_t pc);
+reg_t opcode_func_0ff(insn_t insn, reg_t pc);
+reg_t opcode_func_100(insn_t insn, reg_t pc);
+reg_t opcode_func_101(insn_t insn, reg_t pc);
+reg_t opcode_func_102(insn_t insn, reg_t pc);
+reg_t opcode_func_103(insn_t insn, reg_t pc);
+reg_t opcode_func_104(insn_t insn, reg_t pc);
+reg_t opcode_func_105(insn_t insn, reg_t pc);
+reg_t opcode_func_106(insn_t insn, reg_t pc);
+reg_t opcode_func_107(insn_t insn, reg_t pc);
+reg_t opcode_func_108(insn_t insn, reg_t pc);
+reg_t opcode_func_109(insn_t insn, reg_t pc);
+reg_t opcode_func_10a(insn_t insn, reg_t pc);
+reg_t opcode_func_10b(insn_t insn, reg_t pc);
+reg_t opcode_func_10c(insn_t insn, reg_t pc);
+reg_t opcode_func_10d(insn_t insn, reg_t pc);
+reg_t opcode_func_10e(insn_t insn, reg_t pc);
+reg_t opcode_func_10f(insn_t insn, reg_t pc);
+reg_t opcode_func_110(insn_t insn, reg_t pc);
+reg_t opcode_func_111(insn_t insn, reg_t pc);
+reg_t opcode_func_112(insn_t insn, reg_t pc);
+reg_t opcode_func_113(insn_t insn, reg_t pc);
+reg_t opcode_func_114(insn_t insn, reg_t pc);
+reg_t opcode_func_115(insn_t insn, reg_t pc);
+reg_t opcode_func_116(insn_t insn, reg_t pc);
+reg_t opcode_func_117(insn_t insn, reg_t pc);
+reg_t opcode_func_118(insn_t insn, reg_t pc);
+reg_t opcode_func_119(insn_t insn, reg_t pc);
+reg_t opcode_func_11a(insn_t insn, reg_t pc);
+reg_t opcode_func_11b(insn_t insn, reg_t pc);
+reg_t opcode_func_11c(insn_t insn, reg_t pc);
+reg_t opcode_func_11d(insn_t insn, reg_t pc);
+reg_t opcode_func_11e(insn_t insn, reg_t pc);
+reg_t opcode_func_11f(insn_t insn, reg_t pc);
+reg_t opcode_func_120(insn_t insn, reg_t pc);
+reg_t opcode_func_121(insn_t insn, reg_t pc);
+reg_t opcode_func_122(insn_t insn, reg_t pc);
+reg_t opcode_func_123(insn_t insn, reg_t pc);
+reg_t opcode_func_124(insn_t insn, reg_t pc);
+reg_t opcode_func_125(insn_t insn, reg_t pc);
+reg_t opcode_func_126(insn_t insn, reg_t pc);
+reg_t opcode_func_127(insn_t insn, reg_t pc);
+reg_t opcode_func_128(insn_t insn, reg_t pc);
+reg_t opcode_func_129(insn_t insn, reg_t pc);
+reg_t opcode_func_12a(insn_t insn, reg_t pc);
+reg_t opcode_func_12b(insn_t insn, reg_t pc);
+reg_t opcode_func_12c(insn_t insn, reg_t pc);
+reg_t opcode_func_12d(insn_t insn, reg_t pc);
+reg_t opcode_func_12e(insn_t insn, reg_t pc);
+reg_t opcode_func_12f(insn_t insn, reg_t pc);
+reg_t opcode_func_130(insn_t insn, reg_t pc);
+reg_t opcode_func_131(insn_t insn, reg_t pc);
+reg_t opcode_func_132(insn_t insn, reg_t pc);
+reg_t opcode_func_133(insn_t insn, reg_t pc);
+reg_t opcode_func_134(insn_t insn, reg_t pc);
+reg_t opcode_func_135(insn_t insn, reg_t pc);
+reg_t opcode_func_136(insn_t insn, reg_t pc);
+reg_t opcode_func_137(insn_t insn, reg_t pc);
+reg_t opcode_func_138(insn_t insn, reg_t pc);
+reg_t opcode_func_139(insn_t insn, reg_t pc);
+reg_t opcode_func_13a(insn_t insn, reg_t pc);
+reg_t opcode_func_13b(insn_t insn, reg_t pc);
+reg_t opcode_func_13c(insn_t insn, reg_t pc);
+reg_t opcode_func_13d(insn_t insn, reg_t pc);
+reg_t opcode_func_13e(insn_t insn, reg_t pc);
+reg_t opcode_func_13f(insn_t insn, reg_t pc);
+reg_t opcode_func_140(insn_t insn, reg_t pc);
+reg_t opcode_func_141(insn_t insn, reg_t pc);
+reg_t opcode_func_142(insn_t insn, reg_t pc);
+reg_t opcode_func_143(insn_t insn, reg_t pc);
+reg_t opcode_func_144(insn_t insn, reg_t pc);
+reg_t opcode_func_145(insn_t insn, reg_t pc);
+reg_t opcode_func_146(insn_t insn, reg_t pc);
+reg_t opcode_func_147(insn_t insn, reg_t pc);
+reg_t opcode_func_148(insn_t insn, reg_t pc);
+reg_t opcode_func_149(insn_t insn, reg_t pc);
+reg_t opcode_func_14a(insn_t insn, reg_t pc);
+reg_t opcode_func_14b(insn_t insn, reg_t pc);
+reg_t opcode_func_14c(insn_t insn, reg_t pc);
+reg_t opcode_func_14d(insn_t insn, reg_t pc);
+reg_t opcode_func_14e(insn_t insn, reg_t pc);
+reg_t opcode_func_14f(insn_t insn, reg_t pc);
+reg_t opcode_func_150(insn_t insn, reg_t pc);
+reg_t opcode_func_151(insn_t insn, reg_t pc);
+reg_t opcode_func_152(insn_t insn, reg_t pc);
+reg_t opcode_func_153(insn_t insn, reg_t pc);
+reg_t opcode_func_154(insn_t insn, reg_t pc);
+reg_t opcode_func_155(insn_t insn, reg_t pc);
+reg_t opcode_func_156(insn_t insn, reg_t pc);
+reg_t opcode_func_157(insn_t insn, reg_t pc);
+reg_t opcode_func_158(insn_t insn, reg_t pc);
+reg_t opcode_func_159(insn_t insn, reg_t pc);
+reg_t opcode_func_15a(insn_t insn, reg_t pc);
+reg_t opcode_func_15b(insn_t insn, reg_t pc);
+reg_t opcode_func_15c(insn_t insn, reg_t pc);
+reg_t opcode_func_15d(insn_t insn, reg_t pc);
+reg_t opcode_func_15e(insn_t insn, reg_t pc);
+reg_t opcode_func_15f(insn_t insn, reg_t pc);
+reg_t opcode_func_160(insn_t insn, reg_t pc);
+reg_t opcode_func_161(insn_t insn, reg_t pc);
+reg_t opcode_func_162(insn_t insn, reg_t pc);
+reg_t opcode_func_163(insn_t insn, reg_t pc);
+reg_t opcode_func_164(insn_t insn, reg_t pc);
+reg_t opcode_func_165(insn_t insn, reg_t pc);
+reg_t opcode_func_166(insn_t insn, reg_t pc);
+reg_t opcode_func_167(insn_t insn, reg_t pc);
+reg_t opcode_func_168(insn_t insn, reg_t pc);
+reg_t opcode_func_169(insn_t insn, reg_t pc);
+reg_t opcode_func_16a(insn_t insn, reg_t pc);
+reg_t opcode_func_16b(insn_t insn, reg_t pc);
+reg_t opcode_func_16c(insn_t insn, reg_t pc);
+reg_t opcode_func_16d(insn_t insn, reg_t pc);
+reg_t opcode_func_16e(insn_t insn, reg_t pc);
+reg_t opcode_func_16f(insn_t insn, reg_t pc);
+reg_t opcode_func_170(insn_t insn, reg_t pc);
+reg_t opcode_func_171(insn_t insn, reg_t pc);
+reg_t opcode_func_172(insn_t insn, reg_t pc);
+reg_t opcode_func_173(insn_t insn, reg_t pc);
+reg_t opcode_func_174(insn_t insn, reg_t pc);
+reg_t opcode_func_175(insn_t insn, reg_t pc);
+reg_t opcode_func_176(insn_t insn, reg_t pc);
+reg_t opcode_func_177(insn_t insn, reg_t pc);
+reg_t opcode_func_178(insn_t insn, reg_t pc);
+reg_t opcode_func_179(insn_t insn, reg_t pc);
+reg_t opcode_func_17a(insn_t insn, reg_t pc);
+reg_t opcode_func_17b(insn_t insn, reg_t pc);
+reg_t opcode_func_17c(insn_t insn, reg_t pc);
+reg_t opcode_func_17d(insn_t insn, reg_t pc);
+reg_t opcode_func_17e(insn_t insn, reg_t pc);
+reg_t opcode_func_17f(insn_t insn, reg_t pc);
+reg_t opcode_func_180(insn_t insn, reg_t pc);
+reg_t opcode_func_181(insn_t insn, reg_t pc);
+reg_t opcode_func_182(insn_t insn, reg_t pc);
+reg_t opcode_func_183(insn_t insn, reg_t pc);
+reg_t opcode_func_184(insn_t insn, reg_t pc);
+reg_t opcode_func_185(insn_t insn, reg_t pc);
+reg_t opcode_func_186(insn_t insn, reg_t pc);
+reg_t opcode_func_187(insn_t insn, reg_t pc);
+reg_t opcode_func_188(insn_t insn, reg_t pc);
+reg_t opcode_func_189(insn_t insn, reg_t pc);
+reg_t opcode_func_18a(insn_t insn, reg_t pc);
+reg_t opcode_func_18b(insn_t insn, reg_t pc);
+reg_t opcode_func_18c(insn_t insn, reg_t pc);
+reg_t opcode_func_18d(insn_t insn, reg_t pc);
+reg_t opcode_func_18e(insn_t insn, reg_t pc);
+reg_t opcode_func_18f(insn_t insn, reg_t pc);
+reg_t opcode_func_190(insn_t insn, reg_t pc);
+reg_t opcode_func_191(insn_t insn, reg_t pc);
+reg_t opcode_func_192(insn_t insn, reg_t pc);
+reg_t opcode_func_193(insn_t insn, reg_t pc);
+reg_t opcode_func_194(insn_t insn, reg_t pc);
+reg_t opcode_func_195(insn_t insn, reg_t pc);
+reg_t opcode_func_196(insn_t insn, reg_t pc);
+reg_t opcode_func_197(insn_t insn, reg_t pc);
+reg_t opcode_func_198(insn_t insn, reg_t pc);
+reg_t opcode_func_199(insn_t insn, reg_t pc);
+reg_t opcode_func_19a(insn_t insn, reg_t pc);
+reg_t opcode_func_19b(insn_t insn, reg_t pc);
+reg_t opcode_func_19c(insn_t insn, reg_t pc);
+reg_t opcode_func_19d(insn_t insn, reg_t pc);
+reg_t opcode_func_19e(insn_t insn, reg_t pc);
+reg_t opcode_func_19f(insn_t insn, reg_t pc);
+reg_t opcode_func_1a0(insn_t insn, reg_t pc);
+reg_t opcode_func_1a1(insn_t insn, reg_t pc);
+reg_t opcode_func_1a2(insn_t insn, reg_t pc);
+reg_t opcode_func_1a3(insn_t insn, reg_t pc);
+reg_t opcode_func_1a4(insn_t insn, reg_t pc);
+reg_t opcode_func_1a5(insn_t insn, reg_t pc);
+reg_t opcode_func_1a6(insn_t insn, reg_t pc);
+reg_t opcode_func_1a7(insn_t insn, reg_t pc);
+reg_t opcode_func_1a8(insn_t insn, reg_t pc);
+reg_t opcode_func_1a9(insn_t insn, reg_t pc);
+reg_t opcode_func_1aa(insn_t insn, reg_t pc);
+reg_t opcode_func_1ab(insn_t insn, reg_t pc);
+reg_t opcode_func_1ac(insn_t insn, reg_t pc);
+reg_t opcode_func_1ad(insn_t insn, reg_t pc);
+reg_t opcode_func_1ae(insn_t insn, reg_t pc);
+reg_t opcode_func_1af(insn_t insn, reg_t pc);
+reg_t opcode_func_1b0(insn_t insn, reg_t pc);
+reg_t opcode_func_1b1(insn_t insn, reg_t pc);
+reg_t opcode_func_1b2(insn_t insn, reg_t pc);
+reg_t opcode_func_1b3(insn_t insn, reg_t pc);
+reg_t opcode_func_1b4(insn_t insn, reg_t pc);
+reg_t opcode_func_1b5(insn_t insn, reg_t pc);
+reg_t opcode_func_1b6(insn_t insn, reg_t pc);
+reg_t opcode_func_1b7(insn_t insn, reg_t pc);
+reg_t opcode_func_1b8(insn_t insn, reg_t pc);
+reg_t opcode_func_1b9(insn_t insn, reg_t pc);
+reg_t opcode_func_1ba(insn_t insn, reg_t pc);
+reg_t opcode_func_1bb(insn_t insn, reg_t pc);
+reg_t opcode_func_1bc(insn_t insn, reg_t pc);
+reg_t opcode_func_1bd(insn_t insn, reg_t pc);
+reg_t opcode_func_1be(insn_t insn, reg_t pc);
+reg_t opcode_func_1bf(insn_t insn, reg_t pc);
+reg_t opcode_func_1c0(insn_t insn, reg_t pc);
+reg_t opcode_func_1c1(insn_t insn, reg_t pc);
+reg_t opcode_func_1c2(insn_t insn, reg_t pc);
+reg_t opcode_func_1c3(insn_t insn, reg_t pc);
+reg_t opcode_func_1c4(insn_t insn, reg_t pc);
+reg_t opcode_func_1c5(insn_t insn, reg_t pc);
+reg_t opcode_func_1c6(insn_t insn, reg_t pc);
+reg_t opcode_func_1c7(insn_t insn, reg_t pc);
+reg_t opcode_func_1c8(insn_t insn, reg_t pc);
+reg_t opcode_func_1c9(insn_t insn, reg_t pc);
+reg_t opcode_func_1ca(insn_t insn, reg_t pc);
+reg_t opcode_func_1cb(insn_t insn, reg_t pc);
+reg_t opcode_func_1cc(insn_t insn, reg_t pc);
+reg_t opcode_func_1cd(insn_t insn, reg_t pc);
+reg_t opcode_func_1ce(insn_t insn, reg_t pc);
+reg_t opcode_func_1cf(insn_t insn, reg_t pc);
+reg_t opcode_func_1d0(insn_t insn, reg_t pc);
+reg_t opcode_func_1d1(insn_t insn, reg_t pc);
+reg_t opcode_func_1d2(insn_t insn, reg_t pc);
+reg_t opcode_func_1d3(insn_t insn, reg_t pc);
+reg_t opcode_func_1d4(insn_t insn, reg_t pc);
+reg_t opcode_func_1d5(insn_t insn, reg_t pc);
+reg_t opcode_func_1d6(insn_t insn, reg_t pc);
+reg_t opcode_func_1d7(insn_t insn, reg_t pc);
+reg_t opcode_func_1d8(insn_t insn, reg_t pc);
+reg_t opcode_func_1d9(insn_t insn, reg_t pc);
+reg_t opcode_func_1da(insn_t insn, reg_t pc);
+reg_t opcode_func_1db(insn_t insn, reg_t pc);
+reg_t opcode_func_1dc(insn_t insn, reg_t pc);
+reg_t opcode_func_1dd(insn_t insn, reg_t pc);
+reg_t opcode_func_1de(insn_t insn, reg_t pc);
+reg_t opcode_func_1df(insn_t insn, reg_t pc);
+reg_t opcode_func_1e0(insn_t insn, reg_t pc);
+reg_t opcode_func_1e1(insn_t insn, reg_t pc);
+reg_t opcode_func_1e2(insn_t insn, reg_t pc);
+reg_t opcode_func_1e3(insn_t insn, reg_t pc);
+reg_t opcode_func_1e4(insn_t insn, reg_t pc);
+reg_t opcode_func_1e5(insn_t insn, reg_t pc);
+reg_t opcode_func_1e6(insn_t insn, reg_t pc);
+reg_t opcode_func_1e7(insn_t insn, reg_t pc);
+reg_t opcode_func_1e8(insn_t insn, reg_t pc);
+reg_t opcode_func_1e9(insn_t insn, reg_t pc);
+reg_t opcode_func_1ea(insn_t insn, reg_t pc);
+reg_t opcode_func_1eb(insn_t insn, reg_t pc);
+reg_t opcode_func_1ec(insn_t insn, reg_t pc);
+reg_t opcode_func_1ed(insn_t insn, reg_t pc);
+reg_t opcode_func_1ee(insn_t insn, reg_t pc);
+reg_t opcode_func_1ef(insn_t insn, reg_t pc);
+reg_t opcode_func_1f0(insn_t insn, reg_t pc);
+reg_t opcode_func_1f1(insn_t insn, reg_t pc);
+reg_t opcode_func_1f2(insn_t insn, reg_t pc);
+reg_t opcode_func_1f3(insn_t insn, reg_t pc);
+reg_t opcode_func_1f4(insn_t insn, reg_t pc);
+reg_t opcode_func_1f5(insn_t insn, reg_t pc);
+reg_t opcode_func_1f6(insn_t insn, reg_t pc);
+reg_t opcode_func_1f7(insn_t insn, reg_t pc);
+reg_t opcode_func_1f8(insn_t insn, reg_t pc);
+reg_t opcode_func_1f9(insn_t insn, reg_t pc);
+reg_t opcode_func_1fa(insn_t insn, reg_t pc);
+reg_t opcode_func_1fb(insn_t insn, reg_t pc);
+reg_t opcode_func_1fc(insn_t insn, reg_t pc);
+reg_t opcode_func_1fd(insn_t insn, reg_t pc);
+reg_t opcode_func_1fe(insn_t insn, reg_t pc);
+reg_t opcode_func_1ff(insn_t insn, reg_t pc);
+reg_t opcode_func_200(insn_t insn, reg_t pc);
+reg_t opcode_func_201(insn_t insn, reg_t pc);
+reg_t opcode_func_202(insn_t insn, reg_t pc);
+reg_t opcode_func_203(insn_t insn, reg_t pc);
+reg_t opcode_func_204(insn_t insn, reg_t pc);
+reg_t opcode_func_205(insn_t insn, reg_t pc);
+reg_t opcode_func_206(insn_t insn, reg_t pc);
+reg_t opcode_func_207(insn_t insn, reg_t pc);
+reg_t opcode_func_208(insn_t insn, reg_t pc);
+reg_t opcode_func_209(insn_t insn, reg_t pc);
+reg_t opcode_func_20a(insn_t insn, reg_t pc);
+reg_t opcode_func_20b(insn_t insn, reg_t pc);
+reg_t opcode_func_20c(insn_t insn, reg_t pc);
+reg_t opcode_func_20d(insn_t insn, reg_t pc);
+reg_t opcode_func_20e(insn_t insn, reg_t pc);
+reg_t opcode_func_20f(insn_t insn, reg_t pc);
+reg_t opcode_func_210(insn_t insn, reg_t pc);
+reg_t opcode_func_211(insn_t insn, reg_t pc);
+reg_t opcode_func_212(insn_t insn, reg_t pc);
+reg_t opcode_func_213(insn_t insn, reg_t pc);
+reg_t opcode_func_214(insn_t insn, reg_t pc);
+reg_t opcode_func_215(insn_t insn, reg_t pc);
+reg_t opcode_func_216(insn_t insn, reg_t pc);
+reg_t opcode_func_217(insn_t insn, reg_t pc);
+reg_t opcode_func_218(insn_t insn, reg_t pc);
+reg_t opcode_func_219(insn_t insn, reg_t pc);
+reg_t opcode_func_21a(insn_t insn, reg_t pc);
+reg_t opcode_func_21b(insn_t insn, reg_t pc);
+reg_t opcode_func_21c(insn_t insn, reg_t pc);
+reg_t opcode_func_21d(insn_t insn, reg_t pc);
+reg_t opcode_func_21e(insn_t insn, reg_t pc);
+reg_t opcode_func_21f(insn_t insn, reg_t pc);
+reg_t opcode_func_220(insn_t insn, reg_t pc);
+reg_t opcode_func_221(insn_t insn, reg_t pc);
+reg_t opcode_func_222(insn_t insn, reg_t pc);
+reg_t opcode_func_223(insn_t insn, reg_t pc);
+reg_t opcode_func_224(insn_t insn, reg_t pc);
+reg_t opcode_func_225(insn_t insn, reg_t pc);
+reg_t opcode_func_226(insn_t insn, reg_t pc);
+reg_t opcode_func_227(insn_t insn, reg_t pc);
+reg_t opcode_func_228(insn_t insn, reg_t pc);
+reg_t opcode_func_229(insn_t insn, reg_t pc);
+reg_t opcode_func_22a(insn_t insn, reg_t pc);
+reg_t opcode_func_22b(insn_t insn, reg_t pc);
+reg_t opcode_func_22c(insn_t insn, reg_t pc);
+reg_t opcode_func_22d(insn_t insn, reg_t pc);
+reg_t opcode_func_22e(insn_t insn, reg_t pc);
+reg_t opcode_func_22f(insn_t insn, reg_t pc);
+reg_t opcode_func_230(insn_t insn, reg_t pc);
+reg_t opcode_func_231(insn_t insn, reg_t pc);
+reg_t opcode_func_232(insn_t insn, reg_t pc);
+reg_t opcode_func_233(insn_t insn, reg_t pc);
+reg_t opcode_func_234(insn_t insn, reg_t pc);
+reg_t opcode_func_235(insn_t insn, reg_t pc);
+reg_t opcode_func_236(insn_t insn, reg_t pc);
+reg_t opcode_func_237(insn_t insn, reg_t pc);
+reg_t opcode_func_238(insn_t insn, reg_t pc);
+reg_t opcode_func_239(insn_t insn, reg_t pc);
+reg_t opcode_func_23a(insn_t insn, reg_t pc);
+reg_t opcode_func_23b(insn_t insn, reg_t pc);
+reg_t opcode_func_23c(insn_t insn, reg_t pc);
+reg_t opcode_func_23d(insn_t insn, reg_t pc);
+reg_t opcode_func_23e(insn_t insn, reg_t pc);
+reg_t opcode_func_23f(insn_t insn, reg_t pc);
+reg_t opcode_func_240(insn_t insn, reg_t pc);
+reg_t opcode_func_241(insn_t insn, reg_t pc);
+reg_t opcode_func_242(insn_t insn, reg_t pc);
+reg_t opcode_func_243(insn_t insn, reg_t pc);
+reg_t opcode_func_244(insn_t insn, reg_t pc);
+reg_t opcode_func_245(insn_t insn, reg_t pc);
+reg_t opcode_func_246(insn_t insn, reg_t pc);
+reg_t opcode_func_247(insn_t insn, reg_t pc);
+reg_t opcode_func_248(insn_t insn, reg_t pc);
+reg_t opcode_func_249(insn_t insn, reg_t pc);
+reg_t opcode_func_24a(insn_t insn, reg_t pc);
+reg_t opcode_func_24b(insn_t insn, reg_t pc);
+reg_t opcode_func_24c(insn_t insn, reg_t pc);
+reg_t opcode_func_24d(insn_t insn, reg_t pc);
+reg_t opcode_func_24e(insn_t insn, reg_t pc);
+reg_t opcode_func_24f(insn_t insn, reg_t pc);
+reg_t opcode_func_250(insn_t insn, reg_t pc);
+reg_t opcode_func_251(insn_t insn, reg_t pc);
+reg_t opcode_func_252(insn_t insn, reg_t pc);
+reg_t opcode_func_253(insn_t insn, reg_t pc);
+reg_t opcode_func_254(insn_t insn, reg_t pc);
+reg_t opcode_func_255(insn_t insn, reg_t pc);
+reg_t opcode_func_256(insn_t insn, reg_t pc);
+reg_t opcode_func_257(insn_t insn, reg_t pc);
+reg_t opcode_func_258(insn_t insn, reg_t pc);
+reg_t opcode_func_259(insn_t insn, reg_t pc);
+reg_t opcode_func_25a(insn_t insn, reg_t pc);
+reg_t opcode_func_25b(insn_t insn, reg_t pc);
+reg_t opcode_func_25c(insn_t insn, reg_t pc);
+reg_t opcode_func_25d(insn_t insn, reg_t pc);
+reg_t opcode_func_25e(insn_t insn, reg_t pc);
+reg_t opcode_func_25f(insn_t insn, reg_t pc);
+reg_t opcode_func_260(insn_t insn, reg_t pc);
+reg_t opcode_func_261(insn_t insn, reg_t pc);
+reg_t opcode_func_262(insn_t insn, reg_t pc);
+reg_t opcode_func_263(insn_t insn, reg_t pc);
+reg_t opcode_func_264(insn_t insn, reg_t pc);
+reg_t opcode_func_265(insn_t insn, reg_t pc);
+reg_t opcode_func_266(insn_t insn, reg_t pc);
+reg_t opcode_func_267(insn_t insn, reg_t pc);
+reg_t opcode_func_268(insn_t insn, reg_t pc);
+reg_t opcode_func_269(insn_t insn, reg_t pc);
+reg_t opcode_func_26a(insn_t insn, reg_t pc);
+reg_t opcode_func_26b(insn_t insn, reg_t pc);
+reg_t opcode_func_26c(insn_t insn, reg_t pc);
+reg_t opcode_func_26d(insn_t insn, reg_t pc);
+reg_t opcode_func_26e(insn_t insn, reg_t pc);
+reg_t opcode_func_26f(insn_t insn, reg_t pc);
+reg_t opcode_func_270(insn_t insn, reg_t pc);
+reg_t opcode_func_271(insn_t insn, reg_t pc);
+reg_t opcode_func_272(insn_t insn, reg_t pc);
+reg_t opcode_func_273(insn_t insn, reg_t pc);
+reg_t opcode_func_274(insn_t insn, reg_t pc);
+reg_t opcode_func_275(insn_t insn, reg_t pc);
+reg_t opcode_func_276(insn_t insn, reg_t pc);
+reg_t opcode_func_277(insn_t insn, reg_t pc);
+reg_t opcode_func_278(insn_t insn, reg_t pc);
+reg_t opcode_func_279(insn_t insn, reg_t pc);
+reg_t opcode_func_27a(insn_t insn, reg_t pc);
+reg_t opcode_func_27b(insn_t insn, reg_t pc);
+reg_t opcode_func_27c(insn_t insn, reg_t pc);
+reg_t opcode_func_27d(insn_t insn, reg_t pc);
+reg_t opcode_func_27e(insn_t insn, reg_t pc);
+reg_t opcode_func_27f(insn_t insn, reg_t pc);
+reg_t opcode_func_280(insn_t insn, reg_t pc);
+reg_t opcode_func_281(insn_t insn, reg_t pc);
+reg_t opcode_func_282(insn_t insn, reg_t pc);
+reg_t opcode_func_283(insn_t insn, reg_t pc);
+reg_t opcode_func_284(insn_t insn, reg_t pc);
+reg_t opcode_func_285(insn_t insn, reg_t pc);
+reg_t opcode_func_286(insn_t insn, reg_t pc);
+reg_t opcode_func_287(insn_t insn, reg_t pc);
+reg_t opcode_func_288(insn_t insn, reg_t pc);
+reg_t opcode_func_289(insn_t insn, reg_t pc);
+reg_t opcode_func_28a(insn_t insn, reg_t pc);
+reg_t opcode_func_28b(insn_t insn, reg_t pc);
+reg_t opcode_func_28c(insn_t insn, reg_t pc);
+reg_t opcode_func_28d(insn_t insn, reg_t pc);
+reg_t opcode_func_28e(insn_t insn, reg_t pc);
+reg_t opcode_func_28f(insn_t insn, reg_t pc);
+reg_t opcode_func_290(insn_t insn, reg_t pc);
+reg_t opcode_func_291(insn_t insn, reg_t pc);
+reg_t opcode_func_292(insn_t insn, reg_t pc);
+reg_t opcode_func_293(insn_t insn, reg_t pc);
+reg_t opcode_func_294(insn_t insn, reg_t pc);
+reg_t opcode_func_295(insn_t insn, reg_t pc);
+reg_t opcode_func_296(insn_t insn, reg_t pc);
+reg_t opcode_func_297(insn_t insn, reg_t pc);
+reg_t opcode_func_298(insn_t insn, reg_t pc);
+reg_t opcode_func_299(insn_t insn, reg_t pc);
+reg_t opcode_func_29a(insn_t insn, reg_t pc);
+reg_t opcode_func_29b(insn_t insn, reg_t pc);
+reg_t opcode_func_29c(insn_t insn, reg_t pc);
+reg_t opcode_func_29d(insn_t insn, reg_t pc);
+reg_t opcode_func_29e(insn_t insn, reg_t pc);
+reg_t opcode_func_29f(insn_t insn, reg_t pc);
+reg_t opcode_func_2a0(insn_t insn, reg_t pc);
+reg_t opcode_func_2a1(insn_t insn, reg_t pc);
+reg_t opcode_func_2a2(insn_t insn, reg_t pc);
+reg_t opcode_func_2a3(insn_t insn, reg_t pc);
+reg_t opcode_func_2a4(insn_t insn, reg_t pc);
+reg_t opcode_func_2a5(insn_t insn, reg_t pc);
+reg_t opcode_func_2a6(insn_t insn, reg_t pc);
+reg_t opcode_func_2a7(insn_t insn, reg_t pc);
+reg_t opcode_func_2a8(insn_t insn, reg_t pc);
+reg_t opcode_func_2a9(insn_t insn, reg_t pc);
+reg_t opcode_func_2aa(insn_t insn, reg_t pc);
+reg_t opcode_func_2ab(insn_t insn, reg_t pc);
+reg_t opcode_func_2ac(insn_t insn, reg_t pc);
+reg_t opcode_func_2ad(insn_t insn, reg_t pc);
+reg_t opcode_func_2ae(insn_t insn, reg_t pc);
+reg_t opcode_func_2af(insn_t insn, reg_t pc);
+reg_t opcode_func_2b0(insn_t insn, reg_t pc);
+reg_t opcode_func_2b1(insn_t insn, reg_t pc);
+reg_t opcode_func_2b2(insn_t insn, reg_t pc);
+reg_t opcode_func_2b3(insn_t insn, reg_t pc);
+reg_t opcode_func_2b4(insn_t insn, reg_t pc);
+reg_t opcode_func_2b5(insn_t insn, reg_t pc);
+reg_t opcode_func_2b6(insn_t insn, reg_t pc);
+reg_t opcode_func_2b7(insn_t insn, reg_t pc);
+reg_t opcode_func_2b8(insn_t insn, reg_t pc);
+reg_t opcode_func_2b9(insn_t insn, reg_t pc);
+reg_t opcode_func_2ba(insn_t insn, reg_t pc);
+reg_t opcode_func_2bb(insn_t insn, reg_t pc);
+reg_t opcode_func_2bc(insn_t insn, reg_t pc);
+reg_t opcode_func_2bd(insn_t insn, reg_t pc);
+reg_t opcode_func_2be(insn_t insn, reg_t pc);
+reg_t opcode_func_2bf(insn_t insn, reg_t pc);
+reg_t opcode_func_2c0(insn_t insn, reg_t pc);
+reg_t opcode_func_2c1(insn_t insn, reg_t pc);
+reg_t opcode_func_2c2(insn_t insn, reg_t pc);
+reg_t opcode_func_2c3(insn_t insn, reg_t pc);
+reg_t opcode_func_2c4(insn_t insn, reg_t pc);
+reg_t opcode_func_2c5(insn_t insn, reg_t pc);
+reg_t opcode_func_2c6(insn_t insn, reg_t pc);
+reg_t opcode_func_2c7(insn_t insn, reg_t pc);
+reg_t opcode_func_2c8(insn_t insn, reg_t pc);
+reg_t opcode_func_2c9(insn_t insn, reg_t pc);
+reg_t opcode_func_2ca(insn_t insn, reg_t pc);
+reg_t opcode_func_2cb(insn_t insn, reg_t pc);
+reg_t opcode_func_2cc(insn_t insn, reg_t pc);
+reg_t opcode_func_2cd(insn_t insn, reg_t pc);
+reg_t opcode_func_2ce(insn_t insn, reg_t pc);
+reg_t opcode_func_2cf(insn_t insn, reg_t pc);
+reg_t opcode_func_2d0(insn_t insn, reg_t pc);
+reg_t opcode_func_2d1(insn_t insn, reg_t pc);
+reg_t opcode_func_2d2(insn_t insn, reg_t pc);
+reg_t opcode_func_2d3(insn_t insn, reg_t pc);
+reg_t opcode_func_2d4(insn_t insn, reg_t pc);
+reg_t opcode_func_2d5(insn_t insn, reg_t pc);
+reg_t opcode_func_2d6(insn_t insn, reg_t pc);
+reg_t opcode_func_2d7(insn_t insn, reg_t pc);
+reg_t opcode_func_2d8(insn_t insn, reg_t pc);
+reg_t opcode_func_2d9(insn_t insn, reg_t pc);
+reg_t opcode_func_2da(insn_t insn, reg_t pc);
+reg_t opcode_func_2db(insn_t insn, reg_t pc);
+reg_t opcode_func_2dc(insn_t insn, reg_t pc);
+reg_t opcode_func_2dd(insn_t insn, reg_t pc);
+reg_t opcode_func_2de(insn_t insn, reg_t pc);
+reg_t opcode_func_2df(insn_t insn, reg_t pc);
+reg_t opcode_func_2e0(insn_t insn, reg_t pc);
+reg_t opcode_func_2e1(insn_t insn, reg_t pc);
+reg_t opcode_func_2e2(insn_t insn, reg_t pc);
+reg_t opcode_func_2e3(insn_t insn, reg_t pc);
+reg_t opcode_func_2e4(insn_t insn, reg_t pc);
+reg_t opcode_func_2e5(insn_t insn, reg_t pc);
+reg_t opcode_func_2e6(insn_t insn, reg_t pc);
+reg_t opcode_func_2e7(insn_t insn, reg_t pc);
+reg_t opcode_func_2e8(insn_t insn, reg_t pc);
+reg_t opcode_func_2e9(insn_t insn, reg_t pc);
+reg_t opcode_func_2ea(insn_t insn, reg_t pc);
+reg_t opcode_func_2eb(insn_t insn, reg_t pc);
+reg_t opcode_func_2ec(insn_t insn, reg_t pc);
+reg_t opcode_func_2ed(insn_t insn, reg_t pc);
+reg_t opcode_func_2ee(insn_t insn, reg_t pc);
+reg_t opcode_func_2ef(insn_t insn, reg_t pc);
+reg_t opcode_func_2f0(insn_t insn, reg_t pc);
+reg_t opcode_func_2f1(insn_t insn, reg_t pc);
+reg_t opcode_func_2f2(insn_t insn, reg_t pc);
+reg_t opcode_func_2f3(insn_t insn, reg_t pc);
+reg_t opcode_func_2f4(insn_t insn, reg_t pc);
+reg_t opcode_func_2f5(insn_t insn, reg_t pc);
+reg_t opcode_func_2f6(insn_t insn, reg_t pc);
+reg_t opcode_func_2f7(insn_t insn, reg_t pc);
+reg_t opcode_func_2f8(insn_t insn, reg_t pc);
+reg_t opcode_func_2f9(insn_t insn, reg_t pc);
+reg_t opcode_func_2fa(insn_t insn, reg_t pc);
+reg_t opcode_func_2fb(insn_t insn, reg_t pc);
+reg_t opcode_func_2fc(insn_t insn, reg_t pc);
+reg_t opcode_func_2fd(insn_t insn, reg_t pc);
+reg_t opcode_func_2fe(insn_t insn, reg_t pc);
+reg_t opcode_func_2ff(insn_t insn, reg_t pc);
+reg_t opcode_func_300(insn_t insn, reg_t pc);
+reg_t opcode_func_301(insn_t insn, reg_t pc);
+reg_t opcode_func_302(insn_t insn, reg_t pc);
+reg_t opcode_func_303(insn_t insn, reg_t pc);
+reg_t opcode_func_304(insn_t insn, reg_t pc);
+reg_t opcode_func_305(insn_t insn, reg_t pc);
+reg_t opcode_func_306(insn_t insn, reg_t pc);
+reg_t opcode_func_307(insn_t insn, reg_t pc);
+reg_t opcode_func_308(insn_t insn, reg_t pc);
+reg_t opcode_func_309(insn_t insn, reg_t pc);
+reg_t opcode_func_30a(insn_t insn, reg_t pc);
+reg_t opcode_func_30b(insn_t insn, reg_t pc);
+reg_t opcode_func_30c(insn_t insn, reg_t pc);
+reg_t opcode_func_30d(insn_t insn, reg_t pc);
+reg_t opcode_func_30e(insn_t insn, reg_t pc);
+reg_t opcode_func_30f(insn_t insn, reg_t pc);
+reg_t opcode_func_310(insn_t insn, reg_t pc);
+reg_t opcode_func_311(insn_t insn, reg_t pc);
+reg_t opcode_func_312(insn_t insn, reg_t pc);
+reg_t opcode_func_313(insn_t insn, reg_t pc);
+reg_t opcode_func_314(insn_t insn, reg_t pc);
+reg_t opcode_func_315(insn_t insn, reg_t pc);
+reg_t opcode_func_316(insn_t insn, reg_t pc);
+reg_t opcode_func_317(insn_t insn, reg_t pc);
+reg_t opcode_func_318(insn_t insn, reg_t pc);
+reg_t opcode_func_319(insn_t insn, reg_t pc);
+reg_t opcode_func_31a(insn_t insn, reg_t pc);
+reg_t opcode_func_31b(insn_t insn, reg_t pc);
+reg_t opcode_func_31c(insn_t insn, reg_t pc);
+reg_t opcode_func_31d(insn_t insn, reg_t pc);
+reg_t opcode_func_31e(insn_t insn, reg_t pc);
+reg_t opcode_func_31f(insn_t insn, reg_t pc);
+reg_t opcode_func_320(insn_t insn, reg_t pc);
+reg_t opcode_func_321(insn_t insn, reg_t pc);
+reg_t opcode_func_322(insn_t insn, reg_t pc);
+reg_t opcode_func_323(insn_t insn, reg_t pc);
+reg_t opcode_func_324(insn_t insn, reg_t pc);
+reg_t opcode_func_325(insn_t insn, reg_t pc);
+reg_t opcode_func_326(insn_t insn, reg_t pc);
+reg_t opcode_func_327(insn_t insn, reg_t pc);
+reg_t opcode_func_328(insn_t insn, reg_t pc);
+reg_t opcode_func_329(insn_t insn, reg_t pc);
+reg_t opcode_func_32a(insn_t insn, reg_t pc);
+reg_t opcode_func_32b(insn_t insn, reg_t pc);
+reg_t opcode_func_32c(insn_t insn, reg_t pc);
+reg_t opcode_func_32d(insn_t insn, reg_t pc);
+reg_t opcode_func_32e(insn_t insn, reg_t pc);
+reg_t opcode_func_32f(insn_t insn, reg_t pc);
+reg_t opcode_func_330(insn_t insn, reg_t pc);
+reg_t opcode_func_331(insn_t insn, reg_t pc);
+reg_t opcode_func_332(insn_t insn, reg_t pc);
+reg_t opcode_func_333(insn_t insn, reg_t pc);
+reg_t opcode_func_334(insn_t insn, reg_t pc);
+reg_t opcode_func_335(insn_t insn, reg_t pc);
+reg_t opcode_func_336(insn_t insn, reg_t pc);
+reg_t opcode_func_337(insn_t insn, reg_t pc);
+reg_t opcode_func_338(insn_t insn, reg_t pc);
+reg_t opcode_func_339(insn_t insn, reg_t pc);
+reg_t opcode_func_33a(insn_t insn, reg_t pc);
+reg_t opcode_func_33b(insn_t insn, reg_t pc);
+reg_t opcode_func_33c(insn_t insn, reg_t pc);
+reg_t opcode_func_33d(insn_t insn, reg_t pc);
+reg_t opcode_func_33e(insn_t insn, reg_t pc);
+reg_t opcode_func_33f(insn_t insn, reg_t pc);
+reg_t opcode_func_340(insn_t insn, reg_t pc);
+reg_t opcode_func_341(insn_t insn, reg_t pc);
+reg_t opcode_func_342(insn_t insn, reg_t pc);
+reg_t opcode_func_343(insn_t insn, reg_t pc);
+reg_t opcode_func_344(insn_t insn, reg_t pc);
+reg_t opcode_func_345(insn_t insn, reg_t pc);
+reg_t opcode_func_346(insn_t insn, reg_t pc);
+reg_t opcode_func_347(insn_t insn, reg_t pc);
+reg_t opcode_func_348(insn_t insn, reg_t pc);
+reg_t opcode_func_349(insn_t insn, reg_t pc);
+reg_t opcode_func_34a(insn_t insn, reg_t pc);
+reg_t opcode_func_34b(insn_t insn, reg_t pc);
+reg_t opcode_func_34c(insn_t insn, reg_t pc);
+reg_t opcode_func_34d(insn_t insn, reg_t pc);
+reg_t opcode_func_34e(insn_t insn, reg_t pc);
+reg_t opcode_func_34f(insn_t insn, reg_t pc);
+reg_t opcode_func_350(insn_t insn, reg_t pc);
+reg_t opcode_func_351(insn_t insn, reg_t pc);
+reg_t opcode_func_352(insn_t insn, reg_t pc);
+reg_t opcode_func_353(insn_t insn, reg_t pc);
+reg_t opcode_func_354(insn_t insn, reg_t pc);
+reg_t opcode_func_355(insn_t insn, reg_t pc);
+reg_t opcode_func_356(insn_t insn, reg_t pc);
+reg_t opcode_func_357(insn_t insn, reg_t pc);
+reg_t opcode_func_358(insn_t insn, reg_t pc);
+reg_t opcode_func_359(insn_t insn, reg_t pc);
+reg_t opcode_func_35a(insn_t insn, reg_t pc);
+reg_t opcode_func_35b(insn_t insn, reg_t pc);
+reg_t opcode_func_35c(insn_t insn, reg_t pc);
+reg_t opcode_func_35d(insn_t insn, reg_t pc);
+reg_t opcode_func_35e(insn_t insn, reg_t pc);
+reg_t opcode_func_35f(insn_t insn, reg_t pc);
+reg_t opcode_func_360(insn_t insn, reg_t pc);
+reg_t opcode_func_361(insn_t insn, reg_t pc);
+reg_t opcode_func_362(insn_t insn, reg_t pc);
+reg_t opcode_func_363(insn_t insn, reg_t pc);
+reg_t opcode_func_364(insn_t insn, reg_t pc);
+reg_t opcode_func_365(insn_t insn, reg_t pc);
+reg_t opcode_func_366(insn_t insn, reg_t pc);
+reg_t opcode_func_367(insn_t insn, reg_t pc);
+reg_t opcode_func_368(insn_t insn, reg_t pc);
+reg_t opcode_func_369(insn_t insn, reg_t pc);
+reg_t opcode_func_36a(insn_t insn, reg_t pc);
+reg_t opcode_func_36b(insn_t insn, reg_t pc);
+reg_t opcode_func_36c(insn_t insn, reg_t pc);
+reg_t opcode_func_36d(insn_t insn, reg_t pc);
+reg_t opcode_func_36e(insn_t insn, reg_t pc);
+reg_t opcode_func_36f(insn_t insn, reg_t pc);
+reg_t opcode_func_370(insn_t insn, reg_t pc);
+reg_t opcode_func_371(insn_t insn, reg_t pc);
+reg_t opcode_func_372(insn_t insn, reg_t pc);
+reg_t opcode_func_373(insn_t insn, reg_t pc);
+reg_t opcode_func_374(insn_t insn, reg_t pc);
+reg_t opcode_func_375(insn_t insn, reg_t pc);
+reg_t opcode_func_376(insn_t insn, reg_t pc);
+reg_t opcode_func_377(insn_t insn, reg_t pc);
+reg_t opcode_func_378(insn_t insn, reg_t pc);
+reg_t opcode_func_379(insn_t insn, reg_t pc);
+reg_t opcode_func_37a(insn_t insn, reg_t pc);
+reg_t opcode_func_37b(insn_t insn, reg_t pc);
+reg_t opcode_func_37c(insn_t insn, reg_t pc);
+reg_t opcode_func_37d(insn_t insn, reg_t pc);
+reg_t opcode_func_37e(insn_t insn, reg_t pc);
+reg_t opcode_func_37f(insn_t insn, reg_t pc);
+reg_t opcode_func_380(insn_t insn, reg_t pc);
+reg_t opcode_func_381(insn_t insn, reg_t pc);
+reg_t opcode_func_382(insn_t insn, reg_t pc);
+reg_t opcode_func_383(insn_t insn, reg_t pc);
+reg_t opcode_func_384(insn_t insn, reg_t pc);
+reg_t opcode_func_385(insn_t insn, reg_t pc);
+reg_t opcode_func_386(insn_t insn, reg_t pc);
+reg_t opcode_func_387(insn_t insn, reg_t pc);
+reg_t opcode_func_388(insn_t insn, reg_t pc);
+reg_t opcode_func_389(insn_t insn, reg_t pc);
+reg_t opcode_func_38a(insn_t insn, reg_t pc);
+reg_t opcode_func_38b(insn_t insn, reg_t pc);
+reg_t opcode_func_38c(insn_t insn, reg_t pc);
+reg_t opcode_func_38d(insn_t insn, reg_t pc);
+reg_t opcode_func_38e(insn_t insn, reg_t pc);
+reg_t opcode_func_38f(insn_t insn, reg_t pc);
+reg_t opcode_func_390(insn_t insn, reg_t pc);
+reg_t opcode_func_391(insn_t insn, reg_t pc);
+reg_t opcode_func_392(insn_t insn, reg_t pc);
+reg_t opcode_func_393(insn_t insn, reg_t pc);
+reg_t opcode_func_394(insn_t insn, reg_t pc);
+reg_t opcode_func_395(insn_t insn, reg_t pc);
+reg_t opcode_func_396(insn_t insn, reg_t pc);
+reg_t opcode_func_397(insn_t insn, reg_t pc);
+reg_t opcode_func_398(insn_t insn, reg_t pc);
+reg_t opcode_func_399(insn_t insn, reg_t pc);
+reg_t opcode_func_39a(insn_t insn, reg_t pc);
+reg_t opcode_func_39b(insn_t insn, reg_t pc);
+reg_t opcode_func_39c(insn_t insn, reg_t pc);
+reg_t opcode_func_39d(insn_t insn, reg_t pc);
+reg_t opcode_func_39e(insn_t insn, reg_t pc);
+reg_t opcode_func_39f(insn_t insn, reg_t pc);
+reg_t opcode_func_3a0(insn_t insn, reg_t pc);
+reg_t opcode_func_3a1(insn_t insn, reg_t pc);
+reg_t opcode_func_3a2(insn_t insn, reg_t pc);
+reg_t opcode_func_3a3(insn_t insn, reg_t pc);
+reg_t opcode_func_3a4(insn_t insn, reg_t pc);
+reg_t opcode_func_3a5(insn_t insn, reg_t pc);
+reg_t opcode_func_3a6(insn_t insn, reg_t pc);
+reg_t opcode_func_3a7(insn_t insn, reg_t pc);
+reg_t opcode_func_3a8(insn_t insn, reg_t pc);
+reg_t opcode_func_3a9(insn_t insn, reg_t pc);
+reg_t opcode_func_3aa(insn_t insn, reg_t pc);
+reg_t opcode_func_3ab(insn_t insn, reg_t pc);
+reg_t opcode_func_3ac(insn_t insn, reg_t pc);
+reg_t opcode_func_3ad(insn_t insn, reg_t pc);
+reg_t opcode_func_3ae(insn_t insn, reg_t pc);
+reg_t opcode_func_3af(insn_t insn, reg_t pc);
+reg_t opcode_func_3b0(insn_t insn, reg_t pc);
+reg_t opcode_func_3b1(insn_t insn, reg_t pc);
+reg_t opcode_func_3b2(insn_t insn, reg_t pc);
+reg_t opcode_func_3b3(insn_t insn, reg_t pc);
+reg_t opcode_func_3b4(insn_t insn, reg_t pc);
+reg_t opcode_func_3b5(insn_t insn, reg_t pc);
+reg_t opcode_func_3b6(insn_t insn, reg_t pc);
+reg_t opcode_func_3b7(insn_t insn, reg_t pc);
+reg_t opcode_func_3b8(insn_t insn, reg_t pc);
+reg_t opcode_func_3b9(insn_t insn, reg_t pc);
+reg_t opcode_func_3ba(insn_t insn, reg_t pc);
+reg_t opcode_func_3bb(insn_t insn, reg_t pc);
+reg_t opcode_func_3bc(insn_t insn, reg_t pc);
+reg_t opcode_func_3bd(insn_t insn, reg_t pc);
+reg_t opcode_func_3be(insn_t insn, reg_t pc);
+reg_t opcode_func_3bf(insn_t insn, reg_t pc);
+reg_t opcode_func_3c0(insn_t insn, reg_t pc);
+reg_t opcode_func_3c1(insn_t insn, reg_t pc);
+reg_t opcode_func_3c2(insn_t insn, reg_t pc);
+reg_t opcode_func_3c3(insn_t insn, reg_t pc);
+reg_t opcode_func_3c4(insn_t insn, reg_t pc);
+reg_t opcode_func_3c5(insn_t insn, reg_t pc);
+reg_t opcode_func_3c6(insn_t insn, reg_t pc);
+reg_t opcode_func_3c7(insn_t insn, reg_t pc);
+reg_t opcode_func_3c8(insn_t insn, reg_t pc);
+reg_t opcode_func_3c9(insn_t insn, reg_t pc);
+reg_t opcode_func_3ca(insn_t insn, reg_t pc);
+reg_t opcode_func_3cb(insn_t insn, reg_t pc);
+reg_t opcode_func_3cc(insn_t insn, reg_t pc);
+reg_t opcode_func_3cd(insn_t insn, reg_t pc);
+reg_t opcode_func_3ce(insn_t insn, reg_t pc);
+reg_t opcode_func_3cf(insn_t insn, reg_t pc);
+reg_t opcode_func_3d0(insn_t insn, reg_t pc);
+reg_t opcode_func_3d1(insn_t insn, reg_t pc);
+reg_t opcode_func_3d2(insn_t insn, reg_t pc);
+reg_t opcode_func_3d3(insn_t insn, reg_t pc);
+reg_t opcode_func_3d4(insn_t insn, reg_t pc);
+reg_t opcode_func_3d5(insn_t insn, reg_t pc);
+reg_t opcode_func_3d6(insn_t insn, reg_t pc);
+reg_t opcode_func_3d7(insn_t insn, reg_t pc);
+reg_t opcode_func_3d8(insn_t insn, reg_t pc);
+reg_t opcode_func_3d9(insn_t insn, reg_t pc);
+reg_t opcode_func_3da(insn_t insn, reg_t pc);
+reg_t opcode_func_3db(insn_t insn, reg_t pc);
+reg_t opcode_func_3dc(insn_t insn, reg_t pc);
+reg_t opcode_func_3dd(insn_t insn, reg_t pc);
+reg_t opcode_func_3de(insn_t insn, reg_t pc);
+reg_t opcode_func_3df(insn_t insn, reg_t pc);
+reg_t opcode_func_3e0(insn_t insn, reg_t pc);
+reg_t opcode_func_3e1(insn_t insn, reg_t pc);
+reg_t opcode_func_3e2(insn_t insn, reg_t pc);
+reg_t opcode_func_3e3(insn_t insn, reg_t pc);
+reg_t opcode_func_3e4(insn_t insn, reg_t pc);
+reg_t opcode_func_3e5(insn_t insn, reg_t pc);
+reg_t opcode_func_3e6(insn_t insn, reg_t pc);
+reg_t opcode_func_3e7(insn_t insn, reg_t pc);
+reg_t opcode_func_3e8(insn_t insn, reg_t pc);
+reg_t opcode_func_3e9(insn_t insn, reg_t pc);
+reg_t opcode_func_3ea(insn_t insn, reg_t pc);
+reg_t opcode_func_3eb(insn_t insn, reg_t pc);
+reg_t opcode_func_3ec(insn_t insn, reg_t pc);
+reg_t opcode_func_3ed(insn_t insn, reg_t pc);
+reg_t opcode_func_3ee(insn_t insn, reg_t pc);
+reg_t opcode_func_3ef(insn_t insn, reg_t pc);
+reg_t opcode_func_3f0(insn_t insn, reg_t pc);
+reg_t opcode_func_3f1(insn_t insn, reg_t pc);
+reg_t opcode_func_3f2(insn_t insn, reg_t pc);
+reg_t opcode_func_3f3(insn_t insn, reg_t pc);
+reg_t opcode_func_3f4(insn_t insn, reg_t pc);
+reg_t opcode_func_3f5(insn_t insn, reg_t pc);
+reg_t opcode_func_3f6(insn_t insn, reg_t pc);
+reg_t opcode_func_3f7(insn_t insn, reg_t pc);
+reg_t opcode_func_3f8(insn_t insn, reg_t pc);
+reg_t opcode_func_3f9(insn_t insn, reg_t pc);
+reg_t opcode_func_3fa(insn_t insn, reg_t pc);
+reg_t opcode_func_3fb(insn_t insn, reg_t pc);
+reg_t opcode_func_3fc(insn_t insn, reg_t pc);
+reg_t opcode_func_3fd(insn_t insn, reg_t pc);
+reg_t opcode_func_3fe(insn_t insn, reg_t pc);
+reg_t opcode_func_3ff(insn_t insn, reg_t pc);
diff --git a/riscv/execute.h b/riscv/execute.h
deleted file mode 100644 (file)
index 7b03a31..0000000
+++ /dev/null
@@ -1,2088 +0,0 @@
-/* Automatically generated by parse-opcodes */
-switch((insn.bits >> 0x0) & 0x7f)
-{
-  case 0x0:
-  {
-    #include "insns/c_li.h"
-    break;
-  }
-  case 0x1:
-  {
-    #include "insns/c_addi.h"
-    break;
-  }
-  case 0x2:
-  {
-        if((insn.bits & 0x801f) == 0x2)
-        {
-          #include "insns/c_move.h"
-          break;
-        }
-        if((insn.bits & 0x801f) == 0x8002)
-        {
-          #include "insns/c_j.h"
-          break;
-        }
-        throw_illegal_instruction;
-    break;
-  }
-  case 0x3:
-  {
-        if((insn.bits & 0x3ff) == 0x3)
-        {
-          #include "insns/lb.h"
-          break;
-        }
-        if((insn.bits & 0x3ff) == 0x83)
-        {
-          #include "insns/lh.h"
-          break;
-        }
-        if((insn.bits & 0x3ff) == 0x103)
-        {
-          #include "insns/lw.h"
-          break;
-        }
-        if((insn.bits & 0x3ff) == 0x183)
-        {
-          #include "insns/ld.h"
-          break;
-        }
-        if((insn.bits & 0x3ff) == 0x303)
-        {
-          #include "insns/lwu.h"
-          break;
-        }
-        if((insn.bits & 0x3ff) == 0x203)
-        {
-          #include "insns/lbu.h"
-          break;
-        }
-        if((insn.bits & 0x3ff) == 0x283)
-        {
-          #include "insns/lhu.h"
-          break;
-        }
-        throw_illegal_instruction;
-    break;
-  }
-  case 0x4:
-  {
-    #include "insns/c_ldsp.h"
-    break;
-  }
-  case 0x5:
-  {
-    #include "insns/c_lwsp.h"
-    break;
-  }
-  case 0x6:
-  {
-    #include "insns/c_sdsp.h"
-    break;
-  }
-  case 0x7:
-  {
-        if((insn.bits & 0x3ff) == 0x107)
-        {
-          #include "insns/flw.h"
-          break;
-        }
-        if((insn.bits & 0x3ff) == 0x187)
-        {
-          #include "insns/fld.h"
-          break;
-        }
-        throw_illegal_instruction;
-    break;
-  }
-  case 0x8:
-  {
-    #include "insns/c_swsp.h"
-    break;
-  }
-  case 0x9:
-  {
-    #include "insns/c_ld.h"
-    break;
-  }
-  case 0xa:
-  {
-    #include "insns/c_lw.h"
-    break;
-  }
-  case 0xb:
-  {
-        if((insn.bits & 0x1ffff) == 0x128b)
-        {
-          #include "insns/vlsthu.h"
-          break;
-        }
-        if((insn.bits & 0xfff) == 0xb0b)
-        {
-          #include "insns/vlsegstwu.h"
-          break;
-        }
-        if((insn.bits & 0x3fffff) == 0x30b)
-        {
-          #include "insns/vlwu.h"
-          break;
-        }
-        if((insn.bits & 0x3fffff) == 0x8b)
-        {
-          #include "insns/vlh.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0x158b)
-        {
-          #include "insns/vflstd.h"
-          break;
-        }
-        if((insn.bits & 0x3fffff) == 0xb)
-        {
-          #include "insns/vlb.h"
-          break;
-        }
-        if((insn.bits & 0x3fffff) == 0x18b)
-        {
-          #include "insns/vld.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0x150b)
-        {
-          #include "insns/vflstw.h"
-          break;
-        }
-        if((insn.bits & 0x3fffff) == 0x10b)
-        {
-          #include "insns/vlw.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0x120b)
-        {
-          #include "insns/vlstbu.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0x220b)
-        {
-          #include "insns/vlsegbu.h"
-          break;
-        }
-        if((insn.bits & 0xfff) == 0xa8b)
-        {
-          #include "insns/vlsegsthu.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0x110b)
-        {
-          #include "insns/vlstw.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0x108b)
-        {
-          #include "insns/vlsth.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0x100b)
-        {
-          #include "insns/vlstb.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0x118b)
-        {
-          #include "insns/vlstd.h"
-          break;
-        }
-        if((insn.bits & 0xfff) == 0xa0b)
-        {
-          #include "insns/vlsegstbu.h"
-          break;
-        }
-        if((insn.bits & 0x3fffff) == 0x28b)
-        {
-          #include "insns/vlhu.h"
-          break;
-        }
-        if((insn.bits & 0xfff) == 0x90b)
-        {
-          #include "insns/vlsegstw.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0x130b)
-        {
-          #include "insns/vlstwu.h"
-          break;
-        }
-        if((insn.bits & 0xfff) == 0x80b)
-        {
-          #include "insns/vlsegstb.h"
-          break;
-        }
-        if((insn.bits & 0xfff) == 0x98b)
-        {
-          #include "insns/vlsegstd.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0x258b)
-        {
-          #include "insns/vflsegd.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0x250b)
-        {
-          #include "insns/vflsegw.h"
-          break;
-        }
-        if((insn.bits & 0xfff) == 0x88b)
-        {
-          #include "insns/vlsegsth.h"
-          break;
-        }
-        if((insn.bits & 0xfff) == 0xd0b)
-        {
-          #include "insns/vflsegstw.h"
-          break;
-        }
-        if((insn.bits & 0xfff) == 0xd8b)
-        {
-          #include "insns/vflsegstd.h"
-          break;
-        }
-        if((insn.bits & 0x3fffff) == 0x58b)
-        {
-          #include "insns/vfld.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0x230b)
-        {
-          #include "insns/vlsegwu.h"
-          break;
-        }
-        if((insn.bits & 0x3fffff) == 0x50b)
-        {
-          #include "insns/vflw.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0x200b)
-        {
-          #include "insns/vlsegb.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0x218b)
-        {
-          #include "insns/vlsegd.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0x208b)
-        {
-          #include "insns/vlsegh.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0x210b)
-        {
-          #include "insns/vlsegw.h"
-          break;
-        }
-        if((insn.bits & 0x3fffff) == 0x20b)
-        {
-          #include "insns/vlbu.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0x228b)
-        {
-          #include "insns/vlseghu.h"
-          break;
-        }
-        throw_illegal_instruction;
-    break;
-  }
-  case 0xc:
-  {
-    #include "insns/c_sd.h"
-    break;
-  }
-  case 0xd:
-  {
-    #include "insns/c_sw.h"
-    break;
-  }
-  case 0xf:
-  {
-        if((insn.bits & 0x1ffff) == 0x150f)
-        {
-          #include "insns/vfsstw.h"
-          break;
-        }
-        if((insn.bits & 0xfff) == 0x90f)
-        {
-          #include "insns/vssegstw.h"
-          break;
-        }
-        if((insn.bits & 0xfff) == 0x98f)
-        {
-          #include "insns/vssegstd.h"
-          break;
-        }
-        if((insn.bits & 0xfff) == 0x80f)
-        {
-          #include "insns/vssegstb.h"
-          break;
-        }
-        if((insn.bits & 0xfff) == 0x88f)
-        {
-          #include "insns/vssegsth.h"
-          break;
-        }
-        if((insn.bits & 0x3fffff) == 0x10f)
-        {
-          #include "insns/vsw.h"
-          break;
-        }
-        if((insn.bits & 0xfff) == 0xd8f)
-        {
-          #include "insns/vfssegstd.h"
-          break;
-        }
-        if((insn.bits & 0x3fffff) == 0xf)
-        {
-          #include "insns/vsb.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0x110f)
-        {
-          #include "insns/vsstw.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0x108f)
-        {
-          #include "insns/vssth.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0x100f)
-        {
-          #include "insns/vsstb.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0x118f)
-        {
-          #include "insns/vsstd.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0x218f)
-        {
-          #include "insns/vssegd.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0x158f)
-        {
-          #include "insns/vfsstd.h"
-          break;
-        }
-        if((insn.bits & 0xfff) == 0xd0f)
-        {
-          #include "insns/vfssegstw.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0x210f)
-        {
-          #include "insns/vssegw.h"
-          break;
-        }
-        if((insn.bits & 0x3fffff) == 0x18f)
-        {
-          #include "insns/vsd.h"
-          break;
-        }
-        if((insn.bits & 0x3fffff) == 0x8f)
-        {
-          #include "insns/vsh.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0x208f)
-        {
-          #include "insns/vssegh.h"
-          break;
-        }
-        if((insn.bits & 0x3fffff) == 0x50f)
-        {
-          #include "insns/vfsw.h"
-          break;
-        }
-        if((insn.bits & 0x3fffff) == 0x58f)
-        {
-          #include "insns/vfsd.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0x250f)
-        {
-          #include "insns/vfssegw.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0x200f)
-        {
-          #include "insns/vssegb.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0x258f)
-        {
-          #include "insns/vfssegd.h"
-          break;
-        }
-        throw_illegal_instruction;
-    break;
-  }
-  case 0x10:
-  {
-    #include "insns/c_beq.h"
-    break;
-  }
-  case 0x11:
-  {
-    #include "insns/c_bne.h"
-    break;
-  }
-  case 0x12:
-  {
-        if((insn.bits & 0x801f) == 0x12)
-        {
-          #include "insns/c_lw0.h"
-          break;
-        }
-        if((insn.bits & 0x801f) == 0x8012)
-        {
-          #include "insns/c_ld0.h"
-          break;
-        }
-        throw_illegal_instruction;
-    break;
-  }
-  case 0x13:
-  {
-        if((insn.bits & 0x3ff) == 0x193)
-        {
-          #include "insns/sltiu.h"
-          break;
-        }
-        if((insn.bits & 0x3f03ff) == 0x293)
-        {
-          #include "insns/srli.h"
-          break;
-        }
-        if((insn.bits & 0x3ff) == 0x13)
-        {
-          #include "insns/addi.h"
-          break;
-        }
-        if((insn.bits & 0x3f03ff) == 0x10293)
-        {
-          #include "insns/srai.h"
-          break;
-        }
-        if((insn.bits & 0x3ff) == 0x313)
-        {
-          #include "insns/ori.h"
-          break;
-        }
-        if((insn.bits & 0x3ff) == 0x213)
-        {
-          #include "insns/xori.h"
-          break;
-        }
-        if((insn.bits & 0x3ff) == 0x393)
-        {
-          #include "insns/andi.h"
-          break;
-        }
-        if((insn.bits & 0x3ff) == 0x113)
-        {
-          #include "insns/slti.h"
-          break;
-        }
-        if((insn.bits & 0x3f03ff) == 0x93)
-        {
-          #include "insns/slli.h"
-          break;
-        }
-        throw_illegal_instruction;
-    break;
-  }
-  case 0x14:
-  {
-    #include "insns/c_flw.h"
-    break;
-  }
-  case 0x15:
-  {
-    #include "insns/c_fld.h"
-    break;
-  }
-  case 0x16:
-  {
-    #include "insns/c_fsw.h"
-    break;
-  }
-  case 0x18:
-  {
-    #include "insns/c_fsd.h"
-    break;
-  }
-  case 0x19:
-  {
-        if((insn.bits & 0x1c1f) == 0x19)
-        {
-          #include "insns/c_slli.h"
-          break;
-        }
-        if((insn.bits & 0x1c1f) == 0x819)
-        {
-          #include "insns/c_srli.h"
-          break;
-        }
-        if((insn.bits & 0x1c1f) == 0x1419)
-        {
-          #include "insns/c_srai32.h"
-          break;
-        }
-        if((insn.bits & 0x1c1f) == 0x1819)
-        {
-          #include "insns/c_slliw.h"
-          break;
-        }
-        if((insn.bits & 0x1c1f) == 0xc19)
-        {
-          #include "insns/c_srli32.h"
-          break;
-        }
-        if((insn.bits & 0x1c1f) == 0x1019)
-        {
-          #include "insns/c_srai.h"
-          break;
-        }
-        if((insn.bits & 0x1c1f) == 0x419)
-        {
-          #include "insns/c_slli32.h"
-          break;
-        }
-        throw_illegal_instruction;
-    break;
-  }
-  case 0x1a:
-  {
-        if((insn.bits & 0x801f) == 0x801a)
-        {
-          #include "insns/c_sub.h"
-          break;
-        }
-        if((insn.bits & 0x801f) == 0x1a)
-        {
-          #include "insns/c_add.h"
-          break;
-        }
-        throw_illegal_instruction;
-    break;
-  }
-  case 0x1b:
-  {
-        if((insn.bits & 0x3f83ff) == 0x9b)
-        {
-          #include "insns/slliw.h"
-          break;
-        }
-        if((insn.bits & 0x3f83ff) == 0x29b)
-        {
-          #include "insns/srliw.h"
-          break;
-        }
-        if((insn.bits & 0x3ff) == 0x1b)
-        {
-          #include "insns/addiw.h"
-          break;
-        }
-        if((insn.bits & 0x3f83ff) == 0x1029b)
-        {
-          #include "insns/sraiw.h"
-          break;
-        }
-        throw_illegal_instruction;
-    break;
-  }
-  case 0x1c:
-  {
-        if((insn.bits & 0x31f) == 0x1c)
-        {
-          #include "insns/c_add3.h"
-          break;
-        }
-        if((insn.bits & 0x31f) == 0x21c)
-        {
-          #include "insns/c_or3.h"
-          break;
-        }
-        if((insn.bits & 0x31f) == 0x31c)
-        {
-          #include "insns/c_and3.h"
-          break;
-        }
-        if((insn.bits & 0x31f) == 0x11c)
-        {
-          #include "insns/c_sub3.h"
-          break;
-        }
-        throw_illegal_instruction;
-    break;
-  }
-  case 0x1d:
-  {
-    #include "insns/c_addiw.h"
-    break;
-  }
-  case 0x20:
-  {
-    #include "insns/c_li.h"
-    break;
-  }
-  case 0x21:
-  {
-    #include "insns/c_addi.h"
-    break;
-  }
-  case 0x22:
-  {
-        if((insn.bits & 0x801f) == 0x2)
-        {
-          #include "insns/c_move.h"
-          break;
-        }
-        if((insn.bits & 0x801f) == 0x8002)
-        {
-          #include "insns/c_j.h"
-          break;
-        }
-        throw_illegal_instruction;
-    break;
-  }
-  case 0x23:
-  {
-        if((insn.bits & 0x3ff) == 0x123)
-        {
-          #include "insns/sw.h"
-          break;
-        }
-        if((insn.bits & 0x3ff) == 0xa3)
-        {
-          #include "insns/sh.h"
-          break;
-        }
-        if((insn.bits & 0x3ff) == 0x23)
-        {
-          #include "insns/sb.h"
-          break;
-        }
-        if((insn.bits & 0x3ff) == 0x1a3)
-        {
-          #include "insns/sd.h"
-          break;
-        }
-        throw_illegal_instruction;
-    break;
-  }
-  case 0x24:
-  {
-    #include "insns/c_ldsp.h"
-    break;
-  }
-  case 0x25:
-  {
-    #include "insns/c_lwsp.h"
-    break;
-  }
-  case 0x26:
-  {
-    #include "insns/c_sdsp.h"
-    break;
-  }
-  case 0x27:
-  {
-        if((insn.bits & 0x3ff) == 0x1a7)
-        {
-          #include "insns/fsd.h"
-          break;
-        }
-        if((insn.bits & 0x3ff) == 0x127)
-        {
-          #include "insns/fsw.h"
-          break;
-        }
-        throw_illegal_instruction;
-    break;
-  }
-  case 0x28:
-  {
-    #include "insns/c_swsp.h"
-    break;
-  }
-  case 0x29:
-  {
-    #include "insns/c_ld.h"
-    break;
-  }
-  case 0x2a:
-  {
-    #include "insns/c_lw.h"
-    break;
-  }
-  case 0x2b:
-  {
-        if((insn.bits & 0x1ffff) == 0x19ab)
-        {
-          #include "insns/amominu_d.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0x192b)
-        {
-          #include "insns/amominu_w.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0x9ab)
-        {
-          #include "insns/amoand_d.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0x92b)
-        {
-          #include "insns/amoand_w.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0x1dab)
-        {
-          #include "insns/amomaxu_d.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0x1d2b)
-        {
-          #include "insns/amomaxu_w.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0x1ab)
-        {
-          #include "insns/amoadd_d.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0x152b)
-        {
-          #include "insns/amomax_w.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0x12b)
-        {
-          #include "insns/amoadd_w.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0x15ab)
-        {
-          #include "insns/amomax_d.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0xdab)
-        {
-          #include "insns/amoor_d.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0xd2b)
-        {
-          #include "insns/amoor_w.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0x112b)
-        {
-          #include "insns/amomin_w.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0x5ab)
-        {
-          #include "insns/amoswap_d.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0x11ab)
-        {
-          #include "insns/amomin_d.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0x52b)
-        {
-          #include "insns/amoswap_w.h"
-          break;
-        }
-        throw_illegal_instruction;
-    break;
-  }
-  case 0x2c:
-  {
-    #include "insns/c_sd.h"
-    break;
-  }
-  case 0x2d:
-  {
-    #include "insns/c_sw.h"
-    break;
-  }
-  case 0x2f:
-  {
-        if((insn.bits & 0x3ff) == 0x32f)
-        {
-          #include "insns/fence_l_cv.h"
-          break;
-        }
-        if((insn.bits & 0x3ff) == 0x2af)
-        {
-          #include "insns/fence_g_v.h"
-          break;
-        }
-        if((insn.bits & 0x3ff) == 0x12f)
-        {
-          #include "insns/fence.h"
-          break;
-        }
-        if((insn.bits & 0x3ff) == 0xaf)
-        {
-          #include "insns/fence_i.h"
-          break;
-        }
-        if((insn.bits & 0x3ff) == 0x3af)
-        {
-          #include "insns/fence_g_cv.h"
-          break;
-        }
-        if((insn.bits & 0x3ff) == 0x22f)
-        {
-          #include "insns/fence_l_v.h"
-          break;
-        }
-        throw_illegal_instruction;
-    break;
-  }
-  case 0x30:
-  {
-    #include "insns/c_beq.h"
-    break;
-  }
-  case 0x31:
-  {
-    #include "insns/c_bne.h"
-    break;
-  }
-  case 0x32:
-  {
-        if((insn.bits & 0x801f) == 0x12)
-        {
-          #include "insns/c_lw0.h"
-          break;
-        }
-        if((insn.bits & 0x801f) == 0x8012)
-        {
-          #include "insns/c_ld0.h"
-          break;
-        }
-        throw_illegal_instruction;
-    break;
-  }
-  case 0x33:
-  {
-        if((insn.bits & 0x1ffff) == 0x33)
-        {
-          #include "insns/add.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0x433)
-        {
-          #include "insns/mul.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0x633)
-        {
-          #include "insns/div.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0xb3)
-        {
-          #include "insns/sll.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0x233)
-        {
-          #include "insns/xor.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0x10033)
-        {
-          #include "insns/sub.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0x733)
-        {
-          #include "insns/rem.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0x4b3)
-        {
-          #include "insns/mulh.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0x102b3)
-        {
-          #include "insns/sra.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0x2b3)
-        {
-          #include "insns/srl.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0x333)
-        {
-          #include "insns/or.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0x533)
-        {
-          #include "insns/mulhsu.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0x133)
-        {
-          #include "insns/slt.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0x7b3)
-        {
-          #include "insns/remu.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0x1b3)
-        {
-          #include "insns/sltu.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0x3b3)
-        {
-          #include "insns/and.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0x5b3)
-        {
-          #include "insns/mulhu.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0x6b3)
-        {
-          #include "insns/divu.h"
-          break;
-        }
-        throw_illegal_instruction;
-    break;
-  }
-  case 0x34:
-  {
-    #include "insns/c_flw.h"
-    break;
-  }
-  case 0x35:
-  {
-    #include "insns/c_fld.h"
-    break;
-  }
-  case 0x36:
-  {
-    #include "insns/c_fsw.h"
-    break;
-  }
-  case 0x37:
-  {
-    #include "insns/lui.h"
-    break;
-  }
-  case 0x38:
-  {
-    #include "insns/c_fsd.h"
-    break;
-  }
-  case 0x39:
-  {
-        if((insn.bits & 0x1c1f) == 0x19)
-        {
-          #include "insns/c_slli.h"
-          break;
-        }
-        if((insn.bits & 0x1c1f) == 0x819)
-        {
-          #include "insns/c_srli.h"
-          break;
-        }
-        if((insn.bits & 0x1c1f) == 0x1419)
-        {
-          #include "insns/c_srai32.h"
-          break;
-        }
-        if((insn.bits & 0x1c1f) == 0x1819)
-        {
-          #include "insns/c_slliw.h"
-          break;
-        }
-        if((insn.bits & 0x1c1f) == 0xc19)
-        {
-          #include "insns/c_srli32.h"
-          break;
-        }
-        if((insn.bits & 0x1c1f) == 0x1019)
-        {
-          #include "insns/c_srai.h"
-          break;
-        }
-        if((insn.bits & 0x1c1f) == 0x419)
-        {
-          #include "insns/c_slli32.h"
-          break;
-        }
-        throw_illegal_instruction;
-    break;
-  }
-  case 0x3a:
-  {
-        if((insn.bits & 0x801f) == 0x801a)
-        {
-          #include "insns/c_sub.h"
-          break;
-        }
-        if((insn.bits & 0x801f) == 0x1a)
-        {
-          #include "insns/c_add.h"
-          break;
-        }
-        throw_illegal_instruction;
-    break;
-  }
-  case 0x3b:
-  {
-        if((insn.bits & 0x1ffff) == 0x7bb)
-        {
-          #include "insns/remuw.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0x6bb)
-        {
-          #include "insns/divuw.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0x43b)
-        {
-          #include "insns/mulw.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0x2bb)
-        {
-          #include "insns/srlw.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0x3b)
-        {
-          #include "insns/addw.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0x102bb)
-        {
-          #include "insns/sraw.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0x1003b)
-        {
-          #include "insns/subw.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0xbb)
-        {
-          #include "insns/sllw.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0x73b)
-        {
-          #include "insns/remw.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0x63b)
-        {
-          #include "insns/divw.h"
-          break;
-        }
-        throw_illegal_instruction;
-    break;
-  }
-  case 0x3c:
-  {
-        if((insn.bits & 0x31f) == 0x1c)
-        {
-          #include "insns/c_add3.h"
-          break;
-        }
-        if((insn.bits & 0x31f) == 0x21c)
-        {
-          #include "insns/c_or3.h"
-          break;
-        }
-        if((insn.bits & 0x31f) == 0x31c)
-        {
-          #include "insns/c_and3.h"
-          break;
-        }
-        if((insn.bits & 0x31f) == 0x11c)
-        {
-          #include "insns/c_sub3.h"
-          break;
-        }
-        throw_illegal_instruction;
-    break;
-  }
-  case 0x3d:
-  {
-    #include "insns/c_addiw.h"
-    break;
-  }
-  case 0x40:
-  {
-    #include "insns/c_li.h"
-    break;
-  }
-  case 0x41:
-  {
-    #include "insns/c_addi.h"
-    break;
-  }
-  case 0x42:
-  {
-        if((insn.bits & 0x801f) == 0x2)
-        {
-          #include "insns/c_move.h"
-          break;
-        }
-        if((insn.bits & 0x801f) == 0x8002)
-        {
-          #include "insns/c_j.h"
-          break;
-        }
-        throw_illegal_instruction;
-    break;
-  }
-  case 0x43:
-  {
-        if((insn.bits & 0x1ff) == 0x43)
-        {
-          #include "insns/fmadd_s.h"
-          break;
-        }
-        if((insn.bits & 0x1ff) == 0xc3)
-        {
-          #include "insns/fmadd_d.h"
-          break;
-        }
-        throw_illegal_instruction;
-    break;
-  }
-  case 0x44:
-  {
-    #include "insns/c_ldsp.h"
-    break;
-  }
-  case 0x45:
-  {
-    #include "insns/c_lwsp.h"
-    break;
-  }
-  case 0x46:
-  {
-    #include "insns/c_sdsp.h"
-    break;
-  }
-  case 0x47:
-  {
-        if((insn.bits & 0x1ff) == 0x47)
-        {
-          #include "insns/fmsub_s.h"
-          break;
-        }
-        if((insn.bits & 0x1ff) == 0xc7)
-        {
-          #include "insns/fmsub_d.h"
-          break;
-        }
-        throw_illegal_instruction;
-    break;
-  }
-  case 0x48:
-  {
-    #include "insns/c_swsp.h"
-    break;
-  }
-  case 0x49:
-  {
-    #include "insns/c_ld.h"
-    break;
-  }
-  case 0x4a:
-  {
-    #include "insns/c_lw.h"
-    break;
-  }
-  case 0x4b:
-  {
-        if((insn.bits & 0x1ff) == 0x4b)
-        {
-          #include "insns/fnmsub_s.h"
-          break;
-        }
-        if((insn.bits & 0x1ff) == 0xcb)
-        {
-          #include "insns/fnmsub_d.h"
-          break;
-        }
-        throw_illegal_instruction;
-    break;
-  }
-  case 0x4c:
-  {
-    #include "insns/c_sd.h"
-    break;
-  }
-  case 0x4d:
-  {
-    #include "insns/c_sw.h"
-    break;
-  }
-  case 0x4f:
-  {
-        if((insn.bits & 0x1ff) == 0x4f)
-        {
-          #include "insns/fnmadd_s.h"
-          break;
-        }
-        if((insn.bits & 0x1ff) == 0xcf)
-        {
-          #include "insns/fnmadd_d.h"
-          break;
-        }
-        throw_illegal_instruction;
-    break;
-  }
-  case 0x50:
-  {
-    #include "insns/c_beq.h"
-    break;
-  }
-  case 0x51:
-  {
-    #include "insns/c_bne.h"
-    break;
-  }
-  case 0x52:
-  {
-        if((insn.bits & 0x801f) == 0x12)
-        {
-          #include "insns/c_lw0.h"
-          break;
-        }
-        if((insn.bits & 0x801f) == 0x8012)
-        {
-          #include "insns/c_ld0.h"
-          break;
-        }
-        throw_illegal_instruction;
-    break;
-  }
-  case 0x53:
-  {
-        if((insn.bits & 0x1ffff) == 0x180d3)
-        {
-          #include "insns/fmin_d.h"
-          break;
-        }
-        if((insn.bits & 0x3ff1ff) == 0x9053)
-        {
-          #include "insns/fcvt_lu_s.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0x18053)
-        {
-          #include "insns/fmin_s.h"
-          break;
-        }
-        if((insn.bits & 0x3ff1ff) == 0xc0d3)
-        {
-          #include "insns/fcvt_d_l.h"
-          break;
-        }
-        if((insn.bits & 0x3ff1ff) == 0xe0d3)
-        {
-          #include "insns/fcvt_d_w.h"
-          break;
-        }
-        if((insn.bits & 0x3ff1ff) == 0x100d3)
-        {
-          #include "insns/fcvt_d_s.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0x190d3)
-        {
-          #include "insns/fmax_d.h"
-          break;
-        }
-        if((insn.bits & 0x3ff1ff) == 0x11053)
-        {
-          #include "insns/fcvt_s_d.h"
-          break;
-        }
-        if((insn.bits & 0x3ff1ff) == 0xe053)
-        {
-          #include "insns/fcvt_s_w.h"
-          break;
-        }
-        if((insn.bits & 0x7c1ffff) == 0x1c0d3)
-        {
-          #include "insns/mftx_d.h"
-          break;
-        }
-        if((insn.bits & 0x7c1ffff) == 0x1c053)
-        {
-          #include "insns/mftx_s.h"
-          break;
-        }
-        if((insn.bits & 0x3ff1ff) == 0x8053)
-        {
-          #include "insns/fcvt_l_s.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0x17053)
-        {
-          #include "insns/fle_s.h"
-          break;
-        }
-        if((insn.bits & 0x7ffffff) == 0x1d053)
-        {
-          #include "insns/mffsr.h"
-          break;
-        }
-        if((insn.bits & 0x1f1ff) == 0x3053)
-        {
-          #include "insns/fdiv_s.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0x170d3)
-        {
-          #include "insns/fle_d.h"
-          break;
-        }
-        if((insn.bits & 0x3fffff) == 0x1f053)
-        {
-          #include "insns/mtfsr.h"
-          break;
-        }
-        if((insn.bits & 0x3ff1ff) == 0xd053)
-        {
-          #include "insns/fcvt_s_lu.h"
-          break;
-        }
-        if((insn.bits & 0x1f1ff) == 0x2053)
-        {
-          #include "insns/fmul_s.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0x160d3)
-        {
-          #include "insns/flt_d.h"
-          break;
-        }
-        if((insn.bits & 0x1f1ff) == 0x20d3)
-        {
-          #include "insns/fmul_d.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0x16053)
-        {
-          #include "insns/flt_s.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0x15053)
-        {
-          #include "insns/feq_s.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0x70d3)
-        {
-          #include "insns/fsgnjx_d.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0x7053)
-        {
-          #include "insns/fsgnjx_s.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0x150d3)
-        {
-          #include "insns/feq_d.h"
-          break;
-        }
-        if((insn.bits & 0x3ff1ff) == 0xf0d3)
-        {
-          #include "insns/fcvt_d_wu.h"
-          break;
-        }
-        if((insn.bits & 0x3ff1ff) == 0xb0d3)
-        {
-          #include "insns/fcvt_wu_d.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0x19053)
-        {
-          #include "insns/fmax_s.h"
-          break;
-        }
-        if((insn.bits & 0x3ff1ff) == 0xb053)
-        {
-          #include "insns/fcvt_wu_s.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0x60d3)
-        {
-          #include "insns/fsgnjn_d.h"
-          break;
-        }
-        if((insn.bits & 0x3ff1ff) == 0xd0d3)
-        {
-          #include "insns/fcvt_d_lu.h"
-          break;
-        }
-        if((insn.bits & 0x3ff1ff) == 0xa0d3)
-        {
-          #include "insns/fcvt_w_d.h"
-          break;
-        }
-        if((insn.bits & 0x3fffff) == 0x1e0d3)
-        {
-          #include "insns/mxtf_d.h"
-          break;
-        }
-        if((insn.bits & 0x3fffff) == 0x1e053)
-        {
-          #include "insns/mxtf_s.h"
-          break;
-        }
-        if((insn.bits & 0x1f1ff) == 0x1053)
-        {
-          #include "insns/fsub_s.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0x5053)
-        {
-          #include "insns/fsgnj_s.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0x50d3)
-        {
-          #include "insns/fsgnj_d.h"
-          break;
-        }
-        if((insn.bits & 0x3ff1ff) == 0x80d3)
-        {
-          #include "insns/fcvt_l_d.h"
-          break;
-        }
-        if((insn.bits & 0x1f1ff) == 0xd3)
-        {
-          #include "insns/fadd_d.h"
-          break;
-        }
-        if((insn.bits & 0x3ff1ff) == 0xf053)
-        {
-          #include "insns/fcvt_s_wu.h"
-          break;
-        }
-        if((insn.bits & 0x3ff1ff) == 0xc053)
-        {
-          #include "insns/fcvt_s_l.h"
-          break;
-        }
-        if((insn.bits & 0x3ff1ff) == 0x90d3)
-        {
-          #include "insns/fcvt_lu_d.h"
-          break;
-        }
-        if((insn.bits & 0x1f1ff) == 0x10d3)
-        {
-          #include "insns/fsub_d.h"
-          break;
-        }
-        if((insn.bits & 0x3ff1ff) == 0xa053)
-        {
-          #include "insns/fcvt_w_s.h"
-          break;
-        }
-        if((insn.bits & 0x3ff1ff) == 0x4053)
-        {
-          #include "insns/fsqrt_s.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0x6053)
-        {
-          #include "insns/fsgnjn_s.h"
-          break;
-        }
-        if((insn.bits & 0x3ff1ff) == 0x40d3)
-        {
-          #include "insns/fsqrt_d.h"
-          break;
-        }
-        if((insn.bits & 0x1f1ff) == 0x30d3)
-        {
-          #include "insns/fdiv_d.h"
-          break;
-        }
-        if((insn.bits & 0x1f1ff) == 0x53)
-        {
-          #include "insns/fadd_s.h"
-          break;
-        }
-        throw_illegal_instruction;
-    break;
-  }
-  case 0x54:
-  {
-    #include "insns/c_flw.h"
-    break;
-  }
-  case 0x55:
-  {
-    #include "insns/c_fld.h"
-    break;
-  }
-  case 0x56:
-  {
-    #include "insns/c_fsw.h"
-    break;
-  }
-  case 0x58:
-  {
-    #include "insns/c_fsd.h"
-    break;
-  }
-  case 0x59:
-  {
-        if((insn.bits & 0x1c1f) == 0x19)
-        {
-          #include "insns/c_slli.h"
-          break;
-        }
-        if((insn.bits & 0x1c1f) == 0x819)
-        {
-          #include "insns/c_srli.h"
-          break;
-        }
-        if((insn.bits & 0x1c1f) == 0x1419)
-        {
-          #include "insns/c_srai32.h"
-          break;
-        }
-        if((insn.bits & 0x1c1f) == 0x1819)
-        {
-          #include "insns/c_slliw.h"
-          break;
-        }
-        if((insn.bits & 0x1c1f) == 0xc19)
-        {
-          #include "insns/c_srli32.h"
-          break;
-        }
-        if((insn.bits & 0x1c1f) == 0x1019)
-        {
-          #include "insns/c_srai.h"
-          break;
-        }
-        if((insn.bits & 0x1c1f) == 0x419)
-        {
-          #include "insns/c_slli32.h"
-          break;
-        }
-        throw_illegal_instruction;
-    break;
-  }
-  case 0x5a:
-  {
-        if((insn.bits & 0x801f) == 0x801a)
-        {
-          #include "insns/c_sub.h"
-          break;
-        }
-        if((insn.bits & 0x801f) == 0x1a)
-        {
-          #include "insns/c_add.h"
-          break;
-        }
-        throw_illegal_instruction;
-    break;
-  }
-  case 0x5c:
-  {
-        if((insn.bits & 0x31f) == 0x1c)
-        {
-          #include "insns/c_add3.h"
-          break;
-        }
-        if((insn.bits & 0x31f) == 0x21c)
-        {
-          #include "insns/c_or3.h"
-          break;
-        }
-        if((insn.bits & 0x31f) == 0x31c)
-        {
-          #include "insns/c_and3.h"
-          break;
-        }
-        if((insn.bits & 0x31f) == 0x11c)
-        {
-          #include "insns/c_sub3.h"
-          break;
-        }
-        throw_illegal_instruction;
-    break;
-  }
-  case 0x5d:
-  {
-    #include "insns/c_addiw.h"
-    break;
-  }
-  case 0x60:
-  {
-    #include "insns/c_li.h"
-    break;
-  }
-  case 0x61:
-  {
-    #include "insns/c_addi.h"
-    break;
-  }
-  case 0x62:
-  {
-        if((insn.bits & 0x801f) == 0x2)
-        {
-          #include "insns/c_move.h"
-          break;
-        }
-        if((insn.bits & 0x801f) == 0x8002)
-        {
-          #include "insns/c_j.h"
-          break;
-        }
-        throw_illegal_instruction;
-    break;
-  }
-  case 0x63:
-  {
-        if((insn.bits & 0x3ff) == 0x363)
-        {
-          #include "insns/bltu.h"
-          break;
-        }
-        if((insn.bits & 0x3ff) == 0xe3)
-        {
-          #include "insns/bne.h"
-          break;
-        }
-        if((insn.bits & 0x3ff) == 0x3e3)
-        {
-          #include "insns/bgeu.h"
-          break;
-        }
-        if((insn.bits & 0x3ff) == 0x263)
-        {
-          #include "insns/blt.h"
-          break;
-        }
-        if((insn.bits & 0x3ff) == 0x2e3)
-        {
-          #include "insns/bge.h"
-          break;
-        }
-        if((insn.bits & 0x3ff) == 0x63)
-        {
-          #include "insns/beq.h"
-          break;
-        }
-        throw_illegal_instruction;
-    break;
-  }
-  case 0x64:
-  {
-    #include "insns/c_ldsp.h"
-    break;
-  }
-  case 0x65:
-  {
-    #include "insns/c_lwsp.h"
-    break;
-  }
-  case 0x66:
-  {
-    #include "insns/c_sdsp.h"
-    break;
-  }
-  case 0x67:
-  {
-    #include "insns/j.h"
-    break;
-  }
-  case 0x68:
-  {
-    #include "insns/c_swsp.h"
-    break;
-  }
-  case 0x69:
-  {
-    #include "insns/c_ld.h"
-    break;
-  }
-  case 0x6a:
-  {
-    #include "insns/c_lw.h"
-    break;
-  }
-  case 0x6b:
-  {
-        if((insn.bits & 0x3ff) == 0x6b)
-        {
-          #include "insns/jalr_c.h"
-          break;
-        }
-        if((insn.bits & 0x3ff) == 0x16b)
-        {
-          #include "insns/jalr_j.h"
-          break;
-        }
-        if((insn.bits & 0x3ff) == 0xeb)
-        {
-          #include "insns/jalr_r.h"
-          break;
-        }
-        if((insn.bits & 0x7ffffff) == 0x26b)
-        {
-          #include "insns/rdnpc.h"
-          break;
-        }
-        throw_illegal_instruction;
-    break;
-  }
-  case 0x6c:
-  {
-    #include "insns/c_sd.h"
-    break;
-  }
-  case 0x6d:
-  {
-    #include "insns/c_sw.h"
-    break;
-  }
-  case 0x6f:
-  {
-    #include "insns/jal.h"
-    break;
-  }
-  case 0x70:
-  {
-    #include "insns/c_beq.h"
-    break;
-  }
-  case 0x71:
-  {
-    #include "insns/c_bne.h"
-    break;
-  }
-  case 0x72:
-  {
-        if((insn.bits & 0x801f) == 0x12)
-        {
-          #include "insns/c_lw0.h"
-          break;
-        }
-        if((insn.bits & 0x801f) == 0x8012)
-        {
-          #include "insns/c_ld0.h"
-          break;
-        }
-        throw_illegal_instruction;
-    break;
-  }
-  case 0x73:
-  {
-        if((insn.bits & 0x3ff) == 0xf3)
-        {
-          #include "insns/vvcfgivl.h"
-          break;
-        }
-        if((insn.bits & 0x3fffff) == 0x2f3)
-        {
-          #include "insns/vsetvl.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0x1173)
-        {
-          #include "insns/vfmst.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0x1973)
-        {
-          #include "insns/vfmts.h"
-          break;
-        }
-        if((insn.bits & 0x3fffff) == 0x973)
-        {
-          #include "insns/vfmsv.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0x1873)
-        {
-          #include "insns/vmts.h"
-          break;
-        }
-        if((insn.bits & 0x3fffff) == 0x73)
-        {
-          #include "insns/vmvv.h"
-          break;
-        }
-        if((insn.bits & 0x3ff) == 0x1f3)
-        {
-          #include "insns/vtcfgivl.h"
-          break;
-        }
-        if((insn.bits & 0xf80003ff) == 0x3f3)
-        {
-          #include "insns/vf.h"
-          break;
-        }
-        if((insn.bits & 0x3fffff) == 0x173)
-        {
-          #include "insns/vfmvv.h"
-          break;
-        }
-        if((insn.bits & 0x3fffff) == 0x873)
-        {
-          #include "insns/vmsv.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0x1073)
-        {
-          #include "insns/vmst.h"
-          break;
-        }
-        throw_illegal_instruction;
-    break;
-  }
-  case 0x74:
-  {
-    #include "insns/c_flw.h"
-    break;
-  }
-  case 0x75:
-  {
-    #include "insns/c_fld.h"
-    break;
-  }
-  case 0x76:
-  {
-    #include "insns/c_fsw.h"
-    break;
-  }
-  case 0x77:
-  {
-        if((insn.bits & 0x1ffff) == 0x6f7)
-        {
-          #include "insns/movn.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0x2f7)
-        {
-          #include "insns/movz.h"
-          break;
-        }
-        if((insn.bits & 0x7ffffff) == 0x277)
-        {
-          #include "insns/rdcycle.h"
-          break;
-        }
-        if((insn.bits & 0xffffffff) == 0x177)
-        {
-          #include "insns/stop.h"
-          break;
-        }
-        if((insn.bits & 0xffffffff) == 0xf7)
-        {
-          #include "insns/break.h"
-          break;
-        }
-        if((insn.bits & 0x7ffffff) == 0x1f7)
-        {
-          #include "insns/utidx.h"
-          break;
-        }
-        if((insn.bits & 0x7ffffff) == 0xa77)
-        {
-          #include "insns/rdinstret.h"
-          break;
-        }
-        if((insn.bits & 0x7ffffff) == 0x677)
-        {
-          #include "insns/rdtime.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0xef7)
-        {
-          #include "insns/fmovn.h"
-          break;
-        }
-        if((insn.bits & 0x1ffff) == 0xaf7)
-        {
-          #include "insns/fmovz.h"
-          break;
-        }
-        if((insn.bits & 0xffffffff) == 0x77)
-        {
-          #include "insns/syscall.h"
-          break;
-        }
-        throw_illegal_instruction;
-    break;
-  }
-  case 0x78:
-  {
-    #include "insns/c_fsd.h"
-    break;
-  }
-  case 0x79:
-  {
-        if((insn.bits & 0x1c1f) == 0x19)
-        {
-          #include "insns/c_slli.h"
-          break;
-        }
-        if((insn.bits & 0x1c1f) == 0x819)
-        {
-          #include "insns/c_srli.h"
-          break;
-        }
-        if((insn.bits & 0x1c1f) == 0x1419)
-        {
-          #include "insns/c_srai32.h"
-          break;
-        }
-        if((insn.bits & 0x1c1f) == 0x1819)
-        {
-          #include "insns/c_slliw.h"
-          break;
-        }
-        if((insn.bits & 0x1c1f) == 0xc19)
-        {
-          #include "insns/c_srli32.h"
-          break;
-        }
-        if((insn.bits & 0x1c1f) == 0x1019)
-        {
-          #include "insns/c_srai.h"
-          break;
-        }
-        if((insn.bits & 0x1c1f) == 0x419)
-        {
-          #include "insns/c_slli32.h"
-          break;
-        }
-        throw_illegal_instruction;
-    break;
-  }
-  case 0x7a:
-  {
-        if((insn.bits & 0x801f) == 0x801a)
-        {
-          #include "insns/c_sub.h"
-          break;
-        }
-        if((insn.bits & 0x801f) == 0x1a)
-        {
-          #include "insns/c_add.h"
-          break;
-        }
-        throw_illegal_instruction;
-    break;
-  }
-  case 0x7b:
-  {
-        if((insn.bits & 0x7c1ffff) == 0x17b)
-        {
-          #include "insns/mfpcr.h"
-          break;
-        }
-        if((insn.bits & 0x7ffffff) == 0xfb)
-        {
-          #include "insns/di.h"
-          break;
-        }
-        if((insn.bits & 0xf801ffff) == 0x1fb)
-        {
-          #include "insns/mtpcr.h"
-          break;
-        }
-        if((insn.bits & 0xffffffff) == 0x2fb)
-        {
-          #include "insns/cflush.h"
-          break;
-        }
-        if((insn.bits & 0x7ffffff) == 0x7b)
-        {
-          #include "insns/ei.h"
-          break;
-        }
-        if((insn.bits & 0xffffffff) == 0x27b)
-        {
-          #include "insns/eret.h"
-          break;
-        }
-        throw_illegal_instruction;
-    break;
-  }
-  case 0x7c:
-  {
-        if((insn.bits & 0x31f) == 0x1c)
-        {
-          #include "insns/c_add3.h"
-          break;
-        }
-        if((insn.bits & 0x31f) == 0x21c)
-        {
-          #include "insns/c_or3.h"
-          break;
-        }
-        if((insn.bits & 0x31f) == 0x31c)
-        {
-          #include "insns/c_and3.h"
-          break;
-        }
-        if((insn.bits & 0x31f) == 0x11c)
-        {
-          #include "insns/c_sub3.h"
-          break;
-        }
-        throw_illegal_instruction;
-    break;
-  }
-  case 0x7d:
-  {
-    #include "insns/c_addiw.h"
-    break;
-  }
-  default:
-  {
-    throw_illegal_instruction;
-  }
-}
diff --git a/riscv/insn_includes.h b/riscv/insn_includes.h
new file mode 100644 (file)
index 0000000..9496572
--- /dev/null
@@ -0,0 +1,7 @@
+#include "processor.h"
+#include "common.h"
+#include "config.h"
+#include "sim.h"
+#include "softfloat.h"
+#include "platform.h" // softfloat isNaNF32UI, etc.
+#include "internals.h" // ditto
index c3a43cf4b627510267e9303fbef1c46821b3180b..777964544e3c1cd9f978ae8a3be38ec50d21de53 100644 (file)
@@ -4,5 +4,5 @@ for (int i=0; i<VL; i++)
   uts[i]->pc = RS1+SIMM;
   uts[i]->utmode = true;
   while (uts[i]->utmode)
-    uts[i]->step(n, noisy);
+    uts[i]->step(1, false); // XXX
 }
index 4c2cfcf407635ba6944856483253b6a8ccf400a8..b107b71055869a7bc18da4611f49cf85294c1e8f 100644 (file)
@@ -1,30 +1,32 @@
 #include "decode.h"
 #include "trap.h"
 #include "icsim.h"
+#include "common.h"
 #include <assert.h>
 
 class processor_t;
 
+typedef reg_t pte_t;
+
 const reg_t LEVELS = 4;
 const reg_t PGSHIFT = 12;
 const reg_t PGSIZE = 1 << PGSHIFT;
+const reg_t PTIDXBITS = PGSHIFT - (sizeof(pte_t) == 8 ? 3 : 2);
 const reg_t PPN_BITS = 8*sizeof(reg_t) - PGSHIFT;
 
-struct pte_t
-{
-  reg_t t  : 1;
-  reg_t e  : 1;
-  reg_t r  : 1;
-  reg_t d  : 1;
-  reg_t ux : 1;
-  reg_t uw : 1;
-  reg_t ur : 1;
-  reg_t sx : 1;
-  reg_t sw : 1;
-  reg_t sr : 1;
-  reg_t unused1 : 2;
-  reg_t ppn : PPN_BITS;
-};
+#define PTE_T    0x001 // Entry is a page Table descriptor
+#define PTE_E    0x002 // Entry is a page table Entry
+#define PTE_R    0x004 // Referenced
+#define PTE_D    0x008 // Dirty
+#define PTE_UX   0x010 // User eXecute permission
+#define PTE_UW   0x020 // User Read permission
+#define PTE_UR   0x040 // User Write permission
+#define PTE_SX   0x080 // Supervisor eXecute permission
+#define PTE_SW   0x100 // Supervisor Read permission
+#define PTE_SR   0x200 // Supervisor Write permission
+#define PTE_PERM (PTE_SR | PTE_SW | PTE_SX | PTE_UR | PTE_UW | PTE_UX)
+#define PTE_PERM_SHIFT 4
+#define PTE_PPN_SHIFT  12
 
 class mmu_t
 {
@@ -60,12 +62,13 @@ public:
       *(type##_t*)(mem+addr) = val; \
     }
 
-  insn_t load_insn(reg_t addr, bool rvc)
+  insn_t __attribute__((always_inline)) load_insn(reg_t addr, bool rvc)
   {
     insn_t insn;
 
     reg_t idx = (addr/sizeof(insn_t)) % ICACHE_ENTRIES;
-    if(addr % 4 == 0 && icache_tag[idx] == (addr | 1))
+    bool hit = addr % 4 == 0 && icache_tag[idx] == (addr | 1);
+    if(likely(hit))
       return icache_data[idx];
 
     #ifdef RISCV_ENABLE_RVC
@@ -93,7 +96,7 @@ public:
 
     #ifdef RISCV_ENABLE_ICSIM
     if(icsim)
-      icsim->tick(addr, insn_length(insn), false);
+      icsim->tick(addr, insn_length(insn.bits), false);
     if(itlbsim)
       itlbsim->tick(addr, sizeof(reg_t), false);
     #endif
@@ -140,11 +143,11 @@ private:
   bool supervisor;
   bool vm_enabled;
 
-  static const reg_t TLB_ENTRIES = 32;
+  static const reg_t TLB_ENTRIES = 256;
   pte_t tlb_data[TLB_ENTRIES];
   reg_t tlb_tag[TLB_ENTRIES];
 
-  static const reg_t ICACHE_ENTRIES = 32;
+  static const reg_t ICACHE_ENTRIES = 256;
   insn_t icache_data[ICACHE_ENTRIES];
   reg_t icache_tag[ICACHE_ENTRIES];
 
@@ -155,7 +158,7 @@ private:
 
   void check_align(reg_t addr, int size, bool store, bool fetch)
   {
-    if(addr & (size-1))
+    if(unlikely(addr & (size-1)))
     {
       badvaddr = addr;
       if(fetch)
@@ -176,71 +179,62 @@ private:
                 : fetch ? trap_instruction_access_fault
                 :         trap_load_access_fault;
 
-    if(!pte.e || tag != (addr >> PGSHIFT))
+    bool hit = (pte & PTE_E) && tag == (addr >> PGSHIFT);
+    if(unlikely(!hit))
     {
       pte = walk(addr);
-      if(!pte.e)
+      if(!(pte & PTE_E))
         throw trap;
 
       tlb_data[idx] = pte;
       tlb_tag[idx] = addr >> PGSHIFT;
     }
 
-    if(store && !(supervisor ? pte.sw : pte.uw) ||
-       !store && !fetch && !(supervisor ? pte.sr : pte.ur) ||
-       !store && !fetch && !(supervisor ? pte.sr : pte.ur))
+    reg_t access_type = store ? PTE_UW : fetch ? PTE_UX : PTE_UR;
+    if(supervisor)
+      access_type <<= 3;
+    if(unlikely(!(access_type & pte & PTE_PERM)))
       throw trap;
 
-    return (addr & (PGSIZE-1)) | (pte.ppn << PGSHIFT);
+    return (addr & (PGSIZE-1)) | ((pte >> PTE_PPN_SHIFT) << PGSHIFT);
   }
 
   pte_t walk(reg_t addr)
   {
-    pte_t pte;
+    pte_t pte = 0;
   
     if(!vm_enabled)
     {
-      pte.t = 0;
-      pte.e = addr < memsz;
-      pte.r = pte.d = 0;
-      pte.ur = pte.uw = pte.ux = pte.sr = pte.sw = pte.sx = 1;
-      pte.ppn = addr >> PGSHIFT;
+      if(addr < memsz)
+        pte = PTE_E | PTE_PERM | ((addr >> PGSHIFT) << PTE_PPN_SHIFT);
     }
     else
     {
-      pte.t = pte.e = 0;
-
-      int lg_ptesz = sizeof(pte_t) == 4 ? 2
-                   : sizeof(pte_t) == 8 ? 3
-                   : 0;
-      assert(lg_ptesz);
-  
       reg_t base = ptbr;
+      reg_t ptd;
   
-      for(int i = LEVELS-1; i >= 0; i--)
+      int ptshift = (LEVELS-1)*PTIDXBITS;
+      for(reg_t i = 0; i < LEVELS; i++, ptshift -= PTIDXBITS)
       {
-        int idxbits = PGSHIFT - lg_ptesz;
-        int shift = PGSHIFT + i*idxbits;
-        reg_t idx = addr >> shift;
-        idx &= (1 << idxbits) - 1;
+        reg_t idx = (addr >> (PGSHIFT+ptshift)) & ((1<<PTIDXBITS)-1);
   
         reg_t pte_addr = base + idx*sizeof(pte_t);
         if(pte_addr >= memsz)
           break;
   
-        pte = *(pte_t*)(mem+pte_addr);
-        if(pte.e)
+        ptd = *(pte_t*)(mem+pte_addr);
+        if(ptd & PTE_E)
         {
           // if this PTE is from a larger PT, fake a leaf
           // PTE so the TLB will work right
           reg_t vpn = addr >> PGSHIFT;
-          pte.ppn += vpn & ((1<<(i*idxbits))-1);
+          pte |= ptd | (vpn & ((1<<(ptshift))-1)) << PTE_PPN_SHIFT;
           break;
         }
-        if(!pte.t)
+        else if(!(ptd & PTE_T))
           break;
   
-        base = pte.ppn << PGSHIFT;
+        base = (ptd >> PTE_PPN_SHIFT) << PGSHIFT;
       }
     }
   
index ae757b5c038ac447c87ee36aeaf20e0ca4d90d4e..e22030b2292535412a0f9300829f8fe89a0b6446 100644 (file)
@@ -8,9 +8,6 @@
 #include "config.h"
 #include "sim.h"
 #include "icsim.h"
-#include "softfloat.h"
-#include "platform.h" // softfloat isNaNF32UI, etc.
-#include "internals.h" // ditto
 
 processor_t::processor_t(sim_t* _sim, char* _mem, size_t _memsz)
   : sim(_sim), mmu(_mem,_memsz)
@@ -156,34 +153,48 @@ void processor_t::setvl(int vlapp)
   vl = std::min(vlmax, vlapp);
 }
 
+void processor_t::take_interrupt()
+{
+  uint32_t interrupts = (cause & CAUSE_IP) >> CAUSE_IP_SHIFT;
+  interrupts &= (sr & SR_IM) >> SR_IM_SHIFT;
+
+  if(interrupts && (sr & SR_ET))
+    throw trap_interrupt;
+}
+
 void processor_t::step(size_t n, bool noisy)
 {
+  if(!run)
+    return;
+
   size_t i = 0;
-  while(run) try
+  while(1) try
   {
-    for( ; i < n; i++)
+    take_interrupt();
+
+    #include "dispatch.h"
+
+    #define execute_insn(noisy) \
+      do { insn_t insn = mmu.load_insn(pc, sr & SR_EC); \
+      if(noisy) disasm(insn,pc); \
+      pc = dispatch_table[dispatch_index(insn)](this, insn, pc); \
+      XPR[0] = 0; } while(0)
+
+    if(noisy) for( ; i < n; i++)
+      execute_insn(true);
+    else 
     {
-      uint32_t interrupts = (cause & CAUSE_IP) >> CAUSE_IP_SHIFT;
-      interrupts &= (sr & SR_IM) >> SR_IM_SHIFT;
-      if(interrupts && (sr & SR_ET))
-        take_trap(trap_interrupt,noisy);
-
-      insn_t insn = mmu.load_insn(pc, sr & SR_EC);
-  
-      reg_t npc = pc + insn_length(insn);
-
-      if(noisy)
-        disasm(insn,pc);
-
-      #include "execute.h"
-  
-      pc = npc;
-      XPR[0] = 0;
-
-      if(count++ == compare)
-        cause |= 1 << (TIMER_IRQ+CAUSE_IP_SHIFT);
-      cycle++;
+      for( ; i < n-3; i+=4)
+      {
+        execute_insn(false);
+        execute_insn(false);
+        execute_insn(false);
+        execute_insn(false);
+      }
+      for( ; i < n; i++)
+        execute_insn(false);
     }
+
     return;
   }
   catch(trap_t t)
@@ -193,13 +204,23 @@ void processor_t::step(size_t n, bool noisy)
   }
   catch(vt_command_t cmd)
   {
+    i++;
     if (cmd == vt_command_stop)
-      return;
+      break;
   }
   catch(halt_t t)
   {
     reset();
+    return;
   }
+
+  cycle += i;
+
+  typeof(count) old_count = count;
+  typeof(count) max_count = -1;
+  count += i;
+  if(old_count < compare && (count >= compare || old_count > max_count-i))
+    cause |= 1 << (TIMER_IRQ+CAUSE_IP_SHIFT);
 }
 
 void processor_t::take_trap(trap_t t, bool noisy)
@@ -240,7 +261,7 @@ void processor_t::disasm(insn_t insn, reg_t pc)
   info.buffer_vma = pc;
 
   int ret = print_insn_little_mips(pc, &info);
-  demand(ret == (INSN_IS_RVC(insn.bits) ? 2 : 4), "disasm bug!");
+  demand(ret == insn_length(insn.bits), "disasm bug!");
   #else
   printf("unknown");
   #endif
index 28b7e28e79f7682cc61319a2e75322bf447422b1..10abe1495a5decfc38e2b54c727c298a5665dad1 100644 (file)
@@ -58,6 +58,7 @@ private:
 
   // functions
   void reset();
+  void take_interrupt();
   void set_sr(uint32_t val);
   void set_fsr(uint32_t val);
   void take_trap(trap_t t, bool noisy);
@@ -86,6 +87,8 @@ private:
   icsim_t* dtlbsim;
 
   friend class sim_t;
+  
+  #include "dispatch_decl.h"
 };
 
 #endif
index 62d604631ef5a40593a32585b88b49ad3233ffa9..202d437054f109f999e19596fad58e11c1b6b898 100644 (file)
@@ -3,10 +3,10 @@ riscv_subproject_deps = \
        softfloat \
 
 riscv_hdrs = \
-    applink.h \
+       applink.h \
        common.h \
        decode.h \
-       execute.h \
+       dispatch.h \
        mmu.h \
        processor.h \
        sim.h \
@@ -14,12 +14,22 @@ riscv_hdrs = \
        insns/*.h \
 
 riscv_srcs = \
-    applink.cc \
+       applink.cc \
        processor.cc \
        sim.cc \
        trap.cc \
        icsim.cc \
        mmu.cc \
+       dispatch_0.cc \
+       dispatch_1.cc \
+       dispatch_2.cc \
+       dispatch_3.cc \
+       dispatch_4.cc \
+       dispatch_5.cc \
+       dispatch_6.cc \
+       dispatch_7.cc \
+       dispatch_8.cc \
+       dispatch_9.cc \
 
 riscv_test_srcs =