{
case 0x0:
{
- #include "insns/c_addi.h"
+ #include "insns/c_li.h"
break;
}
case 0x1:
{
- #include "insns/c_li.h"
+ #include "insns/c_addi.h"
break;
}
case 0x2:
#include "insns/c_bne.h"
break;
}
- case 0x13:
- {
- switch((insn.bits >> 0x7) & 0x7)
- {
- case 0x0:
- {
- #include "insns/addi.h"
- break;
- }
- case 0x1:
- {
- if((insn.bits & 0x3f03ff) == 0x93)
- {
- #include "insns/slli.h"
- break;
- }
- throw trap_illegal_instruction;
- }
- case 0x2:
- {
- #include "insns/slti.h"
- break;
- }
- case 0x3:
- {
- #include "insns/sltiu.h"
- break;
- }
- case 0x4:
- {
- #include "insns/xori.h"
- break;
- }
- case 0x5:
- {
- if((insn.bits & 0x3f03ff) == 0x293)
- {
- #include "insns/srli.h"
- break;
- }
- if((insn.bits & 0x3f03ff) == 0x10293)
- {
- #include "insns/srai.h"
- break;
- }
- throw trap_illegal_instruction;
- }
- case 0x6:
- {
- #include "insns/ori.h"
- break;
- }
- case 0x7:
- {
- #include "insns/andi.h"
- break;
- }
- default:
- {
- throw trap_illegal_instruction;
- }
- }
- break;
- }
- case 0x1b:
- {
- switch((insn.bits >> 0x7) & 0x7)
- {
- case 0x0:
- {
- #include "insns/addiw.h"
- break;
- }
- case 0x1:
- {
- if((insn.bits & 0x3f83ff) == 0x9b)
- {
- #include "insns/slliw.h"
- break;
- }
- throw trap_illegal_instruction;
- }
- case 0x5:
- {
- if((insn.bits & 0x3f83ff) == 0x29b)
- {
- #include "insns/srliw.h"
- break;
- }
- if((insn.bits & 0x3f83ff) == 0x1029b)
- {
- #include "insns/sraiw.h"
- break;
- }
- throw trap_illegal_instruction;
- }
- default:
- {
- throw trap_illegal_instruction;
- }
- }
- break;
- }
- case 0x20:
- {
- #include "insns/c_addi.h"
- break;
- }
- case 0x21:
- {
- #include "insns/c_li.h"
- break;
- }
- case 0x22:
+ case 0x12:
{
switch((insn.bits >> 0x7) & 0x7)
{
case 0x0:
{
- if((insn.bits & 0x801f) == 0x2)
+ if((insn.bits & 0x801f) == 0x12)
{
- #include "insns/c_move.h"
+ #include "insns/c_lw0.h"
break;
}
- if((insn.bits & 0x801f) == 0x8002)
+ if((insn.bits & 0x801f) == 0x8012)
{
- #include "insns/c_j.h"
+ #include "insns/c_ld0.h"
break;
}
throw trap_illegal_instruction;
}
case 0x1:
{
- if((insn.bits & 0x801f) == 0x2)
+ if((insn.bits & 0x801f) == 0x12)
{
- #include "insns/c_move.h"
+ #include "insns/c_lw0.h"
break;
}
- if((insn.bits & 0x801f) == 0x8002)
+ if((insn.bits & 0x801f) == 0x8012)
{
- #include "insns/c_j.h"
+ #include "insns/c_ld0.h"
break;
}
throw trap_illegal_instruction;
}
case 0x2:
{
- if((insn.bits & 0x801f) == 0x2)
+ if((insn.bits & 0x801f) == 0x12)
{
- #include "insns/c_move.h"
+ #include "insns/c_lw0.h"
break;
}
- if((insn.bits & 0x801f) == 0x8002)
+ if((insn.bits & 0x801f) == 0x8012)
{
- #include "insns/c_j.h"
+ #include "insns/c_ld0.h"
break;
}
throw trap_illegal_instruction;
}
case 0x3:
{
- if((insn.bits & 0x801f) == 0x2)
+ if((insn.bits & 0x801f) == 0x12)
{
- #include "insns/c_move.h"
+ #include "insns/c_lw0.h"
break;
}
- if((insn.bits & 0x801f) == 0x8002)
+ if((insn.bits & 0x801f) == 0x8012)
{
- #include "insns/c_j.h"
+ #include "insns/c_ld0.h"
break;
}
throw trap_illegal_instruction;
}
case 0x4:
{
- if((insn.bits & 0x801f) == 0x2)
+ if((insn.bits & 0x801f) == 0x12)
{
- #include "insns/c_move.h"
+ #include "insns/c_lw0.h"
break;
}
- if((insn.bits & 0x801f) == 0x8002)
+ if((insn.bits & 0x801f) == 0x8012)
{
- #include "insns/c_j.h"
+ #include "insns/c_ld0.h"
break;
}
throw trap_illegal_instruction;
}
case 0x5:
{
- if((insn.bits & 0x801f) == 0x2)
+ if((insn.bits & 0x801f) == 0x12)
{
- #include "insns/c_move.h"
+ #include "insns/c_lw0.h"
break;
}
- if((insn.bits & 0x801f) == 0x8002)
+ if((insn.bits & 0x801f) == 0x8012)
{
- #include "insns/c_j.h"
+ #include "insns/c_ld0.h"
break;
}
throw trap_illegal_instruction;
}
case 0x6:
{
- if((insn.bits & 0x801f) == 0x2)
+ if((insn.bits & 0x801f) == 0x12)
{
- #include "insns/c_move.h"
+ #include "insns/c_lw0.h"
break;
}
- if((insn.bits & 0x801f) == 0x8002)
+ if((insn.bits & 0x801f) == 0x8012)
{
- #include "insns/c_j.h"
+ #include "insns/c_ld0.h"
break;
}
throw trap_illegal_instruction;
}
case 0x7:
{
- if((insn.bits & 0x801f) == 0x2)
+ if((insn.bits & 0x801f) == 0x12)
{
- #include "insns/c_move.h"
+ #include "insns/c_lw0.h"
break;
}
- if((insn.bits & 0x801f) == 0x8002)
+ if((insn.bits & 0x801f) == 0x8012)
{
- #include "insns/c_j.h"
+ #include "insns/c_ld0.h"
break;
}
throw trap_illegal_instruction;
}
break;
}
- case 0x23:
+ case 0x13:
{
switch((insn.bits >> 0x7) & 0x7)
{
case 0x0:
{
- #include "insns/sb.h"
+ #include "insns/addi.h"
break;
}
case 0x1:
{
- #include "insns/sh.h"
- break;
+ if((insn.bits & 0x3f03ff) == 0x93)
+ {
+ #include "insns/slli.h"
+ break;
+ }
+ throw trap_illegal_instruction;
}
case 0x2:
{
- #include "insns/sw.h"
+ #include "insns/slti.h"
break;
}
case 0x3:
{
- #include "insns/sd.h"
+ #include "insns/sltiu.h"
break;
}
- default:
+ case 0x4:
{
+ #include "insns/xori.h"
+ break;
+ }
+ case 0x5:
+ {
+ if((insn.bits & 0x3f03ff) == 0x293)
+ {
+ #include "insns/srli.h"
+ break;
+ }
+ if((insn.bits & 0x3f03ff) == 0x10293)
+ {
+ #include "insns/srai.h"
+ break;
+ }
throw trap_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:
- {
- switch((insn.bits >> 0x7) & 0x7)
- {
- case 0x2:
+ case 0x6:
{
- #include "insns/fsw.h"
+ #include "insns/ori.h"
break;
}
- case 0x3:
+ case 0x7:
{
- #include "insns/fsd.h"
+ #include "insns/andi.h"
break;
}
default:
}
break;
}
- case 0x28:
+ case 0x14:
{
- #include "insns/c_swsp.h"
+ #include "insns/c_flw.h"
break;
}
- case 0x29:
+ case 0x15:
{
- #include "insns/c_ld.h"
+ #include "insns/c_fld.h"
break;
}
- case 0x2a:
+ case 0x16:
{
- #include "insns/c_lw.h"
+ #include "insns/c_fsw.h"
break;
}
- case 0x2b:
+ case 0x18:
+ {
+ #include "insns/c_fsd.h"
+ break;
+ }
+ case 0x19:
{
switch((insn.bits >> 0x7) & 0x7)
{
- case 0x2:
+ case 0x0:
{
- if((insn.bits & 0x1ffff) == 0x192b)
- {
- #include "insns/amominu_w.h"
- break;
- }
- if((insn.bits & 0x1ffff) == 0x92b)
+ if((insn.bits & 0x1c1f) == 0x19)
{
- #include "insns/amoand_w.h"
+ #include "insns/c_slli.h"
break;
}
- if((insn.bits & 0x1ffff) == 0x1d2b)
+ if((insn.bits & 0x1c1f) == 0x819)
{
- #include "insns/amomaxu_w.h"
+ #include "insns/c_srli.h"
break;
}
- if((insn.bits & 0x1ffff) == 0x152b)
+ if((insn.bits & 0x1c1f) == 0x1419)
{
- #include "insns/amomax_w.h"
+ #include "insns/c_srai32.h"
break;
}
- if((insn.bits & 0x1ffff) == 0x12b)
+ if((insn.bits & 0x1c1f) == 0xc19)
{
- #include "insns/amoadd_w.h"
+ #include "insns/c_srli32.h"
break;
}
- if((insn.bits & 0x1ffff) == 0xd2b)
+ if((insn.bits & 0x1c1f) == 0x1819)
{
- #include "insns/amoor_w.h"
+ #include "insns/c_slliw.h"
break;
}
- if((insn.bits & 0x1ffff) == 0x112b)
+ if((insn.bits & 0x1c1f) == 0x1019)
{
- #include "insns/amomin_w.h"
+ #include "insns/c_srai.h"
break;
}
- if((insn.bits & 0x1ffff) == 0x52b)
+ if((insn.bits & 0x1c1f) == 0x419)
{
- #include "insns/amoswap_w.h"
+ #include "insns/c_slli32.h"
break;
}
throw trap_illegal_instruction;
}
- case 0x3:
+ case 0x1:
{
- if((insn.bits & 0x1ffff) == 0x19ab)
+ if((insn.bits & 0x1c1f) == 0x19)
{
- #include "insns/amominu_d.h"
+ #include "insns/c_slli.h"
break;
}
- if((insn.bits & 0x1ffff) == 0x9ab)
+ if((insn.bits & 0x1c1f) == 0x819)
{
- #include "insns/amoand_d.h"
+ #include "insns/c_srli.h"
break;
}
- if((insn.bits & 0x1ffff) == 0x1dab)
+ if((insn.bits & 0x1c1f) == 0x1419)
{
- #include "insns/amomaxu_d.h"
+ #include "insns/c_srai32.h"
break;
}
- if((insn.bits & 0x1ffff) == 0x1ab)
+ if((insn.bits & 0x1c1f) == 0xc19)
{
- #include "insns/amoadd_d.h"
+ #include "insns/c_srli32.h"
break;
}
- if((insn.bits & 0x1ffff) == 0x15ab)
+ if((insn.bits & 0x1c1f) == 0x1819)
{
- #include "insns/amomax_d.h"
+ #include "insns/c_slliw.h"
break;
}
- if((insn.bits & 0x1ffff) == 0xdab)
- {
- #include "insns/amoor_d.h"
- break;
- }
- if((insn.bits & 0x1ffff) == 0x5ab)
+ if((insn.bits & 0x1c1f) == 0x1019)
{
- #include "insns/amoswap_d.h"
+ #include "insns/c_srai.h"
break;
}
- if((insn.bits & 0x1ffff) == 0x11ab)
+ if((insn.bits & 0x1c1f) == 0x419)
{
- #include "insns/amomin_d.h"
+ #include "insns/c_slli32.h"
break;
}
throw trap_illegal_instruction;
}
- default:
- {
- throw trap_illegal_instruction;
- }
- }
- break;
- }
- case 0x2c:
- {
- #include "insns/c_sd.h"
- break;
- }
- case 0x2d:
- {
- #include "insns/c_sw.h"
- break;
- }
- case 0x2f:
- {
- switch((insn.bits >> 0x7) & 0x7)
- {
- case 0x1:
- {
- #include "insns/fence_i.h"
- break;
- }
case 0x2:
{
- #include "insns/fence.h"
- break;
- }
- case 0x4:
- {
- #include "insns/fence_l_v.h"
- break;
- }
- case 0x5:
- {
- #include "insns/fence_g_v.h"
- break;
- }
- case 0x6:
- {
- #include "insns/fence_l_cv.h"
- break;
- }
- case 0x7:
- {
- #include "insns/fence_g_cv.h"
- break;
- }
- default:
- {
- throw trap_illegal_instruction;
- }
- }
- break;
- }
- case 0x30:
- {
- #include "insns/c_beq.h"
- break;
- }
- case 0x31:
- {
- #include "insns/c_bne.h"
- break;
- }
- case 0x33:
- {
- switch((insn.bits >> 0x7) & 0x7)
- {
- case 0x0:
- {
- if((insn.bits & 0x1ffff) == 0x33)
+ if((insn.bits & 0x1c1f) == 0x19)
{
- #include "insns/add.h"
+ #include "insns/c_slli.h"
break;
}
- if((insn.bits & 0x1ffff) == 0x433)
+ if((insn.bits & 0x1c1f) == 0x819)
{
- #include "insns/mul.h"
+ #include "insns/c_srli.h"
break;
}
- if((insn.bits & 0x1ffff) == 0x10033)
+ if((insn.bits & 0x1c1f) == 0x1419)
{
- #include "insns/sub.h"
+ #include "insns/c_srai32.h"
break;
}
- throw trap_illegal_instruction;
- }
- case 0x1:
- {
- if((insn.bits & 0x1ffff) == 0xb3)
+ if((insn.bits & 0x1c1f) == 0xc19)
{
- #include "insns/sll.h"
+ #include "insns/c_srli32.h"
break;
}
- if((insn.bits & 0x1ffff) == 0x4b3)
+ if((insn.bits & 0x1c1f) == 0x1819)
{
- #include "insns/mulh.h"
+ #include "insns/c_slliw.h"
break;
}
- throw trap_illegal_instruction;
- }
- case 0x2:
- {
- if((insn.bits & 0x1ffff) == 0x533)
+ if((insn.bits & 0x1c1f) == 0x1019)
{
- #include "insns/mulhsu.h"
+ #include "insns/c_srai.h"
break;
}
- if((insn.bits & 0x1ffff) == 0x133)
+ if((insn.bits & 0x1c1f) == 0x419)
{
- #include "insns/slt.h"
+ #include "insns/c_slli32.h"
break;
}
throw trap_illegal_instruction;
}
case 0x3:
{
- if((insn.bits & 0x1ffff) == 0x1b3)
+ if((insn.bits & 0x1c1f) == 0x19)
{
- #include "insns/sltu.h"
+ #include "insns/c_slli.h"
break;
}
- if((insn.bits & 0x1ffff) == 0x5b3)
+ if((insn.bits & 0x1c1f) == 0x819)
{
- #include "insns/mulhu.h"
+ #include "insns/c_srli.h"
+ break;
+ }
+ if((insn.bits & 0x1c1f) == 0x1419)
+ {
+ #include "insns/c_srai32.h"
+ break;
+ }
+ if((insn.bits & 0x1c1f) == 0xc19)
+ {
+ #include "insns/c_srli32.h"
+ break;
+ }
+ if((insn.bits & 0x1c1f) == 0x1819)
+ {
+ #include "insns/c_slliw.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 trap_illegal_instruction;
}
case 0x4:
{
- if((insn.bits & 0x1ffff) == 0x633)
+ if((insn.bits & 0x1c1f) == 0x19)
{
- #include "insns/div.h"
+ #include "insns/c_slli.h"
break;
}
- if((insn.bits & 0x1ffff) == 0x233)
+ if((insn.bits & 0x1c1f) == 0x819)
{
- #include "insns/xor.h"
+ #include "insns/c_srli.h"
+ break;
+ }
+ if((insn.bits & 0x1c1f) == 0x1419)
+ {
+ #include "insns/c_srai32.h"
+ break;
+ }
+ if((insn.bits & 0x1c1f) == 0xc19)
+ {
+ #include "insns/c_srli32.h"
+ break;
+ }
+ if((insn.bits & 0x1c1f) == 0x1819)
+ {
+ #include "insns/c_slliw.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 trap_illegal_instruction;
}
case 0x5:
{
- if((insn.bits & 0x1ffff) == 0x102b3)
+ if((insn.bits & 0x1c1f) == 0x19)
{
- #include "insns/sra.h"
+ #include "insns/c_slli.h"
break;
}
- if((insn.bits & 0x1ffff) == 0x2b3)
+ if((insn.bits & 0x1c1f) == 0x819)
{
- #include "insns/srl.h"
+ #include "insns/c_srli.h"
break;
}
- if((insn.bits & 0x1ffff) == 0x6b3)
+ if((insn.bits & 0x1c1f) == 0x1419)
{
- #include "insns/divu.h"
+ #include "insns/c_srai32.h"
+ break;
+ }
+ if((insn.bits & 0x1c1f) == 0xc19)
+ {
+ #include "insns/c_srli32.h"
+ break;
+ }
+ if((insn.bits & 0x1c1f) == 0x1819)
+ {
+ #include "insns/c_slliw.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 trap_illegal_instruction;
}
case 0x6:
{
- if((insn.bits & 0x1ffff) == 0x733)
+ if((insn.bits & 0x1c1f) == 0x19)
{
- #include "insns/rem.h"
+ #include "insns/c_slli.h"
break;
}
- if((insn.bits & 0x1ffff) == 0x333)
+ if((insn.bits & 0x1c1f) == 0x819)
{
- #include "insns/or.h"
+ #include "insns/c_srli.h"
break;
}
- throw trap_illegal_instruction;
- }
- case 0x7:
- {
- if((insn.bits & 0x1ffff) == 0x7b3)
+ if((insn.bits & 0x1c1f) == 0x1419)
{
- #include "insns/remu.h"
+ #include "insns/c_srai32.h"
break;
}
- if((insn.bits & 0x1ffff) == 0x3b3)
+ if((insn.bits & 0x1c1f) == 0xc19)
{
- #include "insns/and.h"
+ #include "insns/c_srli32.h"
break;
}
- throw trap_illegal_instruction;
- }
- default:
- {
- throw trap_illegal_instruction;
- }
- }
- break;
- }
- case 0x37:
- {
- #include "insns/lui.h"
- break;
- }
- case 0x3b:
- {
- switch((insn.bits >> 0x7) & 0x7)
- {
- case 0x0:
- {
- if((insn.bits & 0x1ffff) == 0x43b)
+ if((insn.bits & 0x1c1f) == 0x1819)
{
- #include "insns/mulw.h"
+ #include "insns/c_slliw.h"
break;
}
- if((insn.bits & 0x1ffff) == 0x3b)
+ if((insn.bits & 0x1c1f) == 0x1019)
{
- #include "insns/addw.h"
+ #include "insns/c_srai.h"
break;
}
- if((insn.bits & 0x1ffff) == 0x1003b)
+ if((insn.bits & 0x1c1f) == 0x419)
{
- #include "insns/subw.h"
+ #include "insns/c_slli32.h"
break;
}
throw trap_illegal_instruction;
}
- case 0x1:
+ case 0x7:
{
- if((insn.bits & 0x1ffff) == 0xbb)
+ if((insn.bits & 0x1c1f) == 0x19)
{
- #include "insns/sllw.h"
+ #include "insns/c_slli.h"
break;
}
- throw trap_illegal_instruction;
- }
- case 0x4:
- {
- if((insn.bits & 0x1ffff) == 0x63b)
+ if((insn.bits & 0x1c1f) == 0x819)
{
- #include "insns/divw.h"
+ #include "insns/c_srli.h"
break;
}
- throw trap_illegal_instruction;
- }
- case 0x5:
- {
- if((insn.bits & 0x1ffff) == 0x6bb)
+ if((insn.bits & 0x1c1f) == 0x1419)
{
- #include "insns/divuw.h"
+ #include "insns/c_srai32.h"
break;
}
- if((insn.bits & 0x1ffff) == 0x2bb)
+ if((insn.bits & 0x1c1f) == 0xc19)
{
- #include "insns/srlw.h"
+ #include "insns/c_srli32.h"
break;
}
- if((insn.bits & 0x1ffff) == 0x102bb)
+ if((insn.bits & 0x1c1f) == 0x1819)
{
- #include "insns/sraw.h"
+ #include "insns/c_slliw.h"
break;
}
- throw trap_illegal_instruction;
- }
- case 0x6:
- {
- if((insn.bits & 0x1ffff) == 0x73b)
+ if((insn.bits & 0x1c1f) == 0x1019)
{
- #include "insns/remw.h"
+ #include "insns/c_srai.h"
break;
}
- throw trap_illegal_instruction;
- }
- case 0x7:
- {
- if((insn.bits & 0x1ffff) == 0x7bb)
+ if((insn.bits & 0x1c1f) == 0x419)
{
- #include "insns/remuw.h"
+ #include "insns/c_slli32.h"
break;
}
throw trap_illegal_instruction;
}
break;
}
- case 0x40:
- {
- #include "insns/c_addi.h"
- break;
- }
- case 0x41:
- {
- #include "insns/c_li.h"
- break;
- }
- case 0x42:
+ case 0x1a:
{
switch((insn.bits >> 0x7) & 0x7)
{
case 0x0:
{
- if((insn.bits & 0x801f) == 0x2)
+ if((insn.bits & 0x801f) == 0x1a)
{
- #include "insns/c_move.h"
+ #include "insns/c_add.h"
break;
}
- if((insn.bits & 0x801f) == 0x8002)
+ if((insn.bits & 0x801f) == 0x801a)
{
- #include "insns/c_j.h"
+ #include "insns/c_sub.h"
break;
}
throw trap_illegal_instruction;
}
case 0x1:
{
- if((insn.bits & 0x801f) == 0x2)
+ if((insn.bits & 0x801f) == 0x1a)
{
- #include "insns/c_move.h"
+ #include "insns/c_add.h"
break;
}
- if((insn.bits & 0x801f) == 0x8002)
+ if((insn.bits & 0x801f) == 0x801a)
{
- #include "insns/c_j.h"
+ #include "insns/c_sub.h"
break;
}
throw trap_illegal_instruction;
}
case 0x2:
{
- if((insn.bits & 0x801f) == 0x2)
+ if((insn.bits & 0x801f) == 0x1a)
{
- #include "insns/c_move.h"
+ #include "insns/c_add.h"
break;
}
- if((insn.bits & 0x801f) == 0x8002)
+ if((insn.bits & 0x801f) == 0x801a)
{
- #include "insns/c_j.h"
+ #include "insns/c_sub.h"
break;
}
throw trap_illegal_instruction;
}
case 0x3:
{
- if((insn.bits & 0x801f) == 0x2)
+ if((insn.bits & 0x801f) == 0x1a)
{
- #include "insns/c_move.h"
+ #include "insns/c_add.h"
break;
}
- if((insn.bits & 0x801f) == 0x8002)
+ if((insn.bits & 0x801f) == 0x801a)
{
- #include "insns/c_j.h"
+ #include "insns/c_sub.h"
break;
}
throw trap_illegal_instruction;
}
case 0x4:
{
- if((insn.bits & 0x801f) == 0x2)
+ if((insn.bits & 0x801f) == 0x1a)
{
- #include "insns/c_move.h"
+ #include "insns/c_add.h"
break;
}
- if((insn.bits & 0x801f) == 0x8002)
+ if((insn.bits & 0x801f) == 0x801a)
{
- #include "insns/c_j.h"
+ #include "insns/c_sub.h"
break;
}
throw trap_illegal_instruction;
}
case 0x5:
{
- if((insn.bits & 0x801f) == 0x2)
+ if((insn.bits & 0x801f) == 0x1a)
{
- #include "insns/c_move.h"
+ #include "insns/c_add.h"
break;
}
- if((insn.bits & 0x801f) == 0x8002)
+ if((insn.bits & 0x801f) == 0x801a)
{
- #include "insns/c_j.h"
+ #include "insns/c_sub.h"
break;
}
throw trap_illegal_instruction;
}
case 0x6:
{
- if((insn.bits & 0x801f) == 0x2)
+ if((insn.bits & 0x801f) == 0x1a)
{
- #include "insns/c_move.h"
+ #include "insns/c_add.h"
break;
}
- if((insn.bits & 0x801f) == 0x8002)
+ if((insn.bits & 0x801f) == 0x801a)
{
- #include "insns/c_j.h"
+ #include "insns/c_sub.h"
break;
}
throw trap_illegal_instruction;
}
case 0x7:
{
- if((insn.bits & 0x801f) == 0x2)
+ if((insn.bits & 0x801f) == 0x1a)
{
- #include "insns/c_move.h"
+ #include "insns/c_add.h"
break;
}
- if((insn.bits & 0x801f) == 0x8002)
+ if((insn.bits & 0x801f) == 0x801a)
{
- #include "insns/c_j.h"
+ #include "insns/c_sub.h"
break;
}
throw trap_illegal_instruction;
}
break;
}
- case 0x43:
+ case 0x1b:
{
switch((insn.bits >> 0x7) & 0x7)
{
case 0x0:
{
- #include "insns/fmadd_s.h"
+ #include "insns/addiw.h"
break;
}
case 0x1:
{
- #include "insns/fmadd_d.h"
- break;
- }
- case 0x4:
- {
- #include "insns/fmadd_s.h"
- break;
+ if((insn.bits & 0x3f83ff) == 0x9b)
+ {
+ #include "insns/slliw.h"
+ break;
+ }
+ throw trap_illegal_instruction;
}
case 0x5:
{
- #include "insns/fmadd_d.h"
- break;
+ if((insn.bits & 0x3f83ff) == 0x29b)
+ {
+ #include "insns/srliw.h"
+ break;
+ }
+ if((insn.bits & 0x3f83ff) == 0x1029b)
+ {
+ #include "insns/sraiw.h"
+ break;
+ }
+ throw trap_illegal_instruction;
}
default:
{
}
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:
+ case 0x1c:
{
switch((insn.bits >> 0x7) & 0x7)
{
case 0x0:
{
- #include "insns/fmsub_s.h"
+ #include "insns/c_add3.h"
break;
}
case 0x1:
{
- #include "insns/fmsub_d.h"
- break;
- }
- case 0x4:
- {
- #include "insns/fmsub_s.h"
- break;
- }
- case 0x5:
- {
- #include "insns/fmsub_d.h"
+ #include "insns/c_add3.h"
break;
}
- default:
- {
- throw trap_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:
- {
- switch((insn.bits >> 0x7) & 0x7)
- {
- case 0x0:
+ case 0x2:
{
- #include "insns/fnmsub_s.h"
+ #include "insns/c_sub3.h"
break;
}
- case 0x1:
+ case 0x3:
{
- #include "insns/fnmsub_d.h"
+ #include "insns/c_sub3.h"
break;
}
case 0x4:
{
- #include "insns/fnmsub_s.h"
+ #include "insns/c_or3.h"
break;
}
case 0x5:
{
- #include "insns/fnmsub_d.h"
- break;
- }
- default:
- {
- throw trap_illegal_instruction;
- }
- }
- break;
- }
- case 0x4c:
- {
- #include "insns/c_sd.h"
- break;
- }
- case 0x4d:
- {
- #include "insns/c_sw.h"
- break;
- }
- case 0x4f:
- {
- switch((insn.bits >> 0x7) & 0x7)
- {
- case 0x0:
- {
- #include "insns/fnmadd_s.h"
- break;
- }
- case 0x1:
- {
- #include "insns/fnmadd_d.h"
+ #include "insns/c_or3.h"
break;
}
- case 0x4:
+ case 0x6:
{
- #include "insns/fnmadd_s.h"
+ #include "insns/c_and3.h"
break;
}
- case 0x5:
+ case 0x7:
{
- #include "insns/fnmadd_d.h"
+ #include "insns/c_and3.h"
break;
}
default:
}
break;
}
- case 0x50:
+ case 0x20:
{
- #include "insns/c_beq.h"
+ #include "insns/c_li.h"
break;
}
- case 0x51:
+ case 0x21:
{
- #include "insns/c_bne.h"
+ #include "insns/c_addi.h"
break;
}
- case 0x53:
+ case 0x22:
{
switch((insn.bits >> 0x7) & 0x7)
{
case 0x0:
{
- if((insn.bits & 0x3ff1ff) == 0x9053)
- {
- #include "insns/fcvt_lu_s.h"
- break;
- }
- if((insn.bits & 0x1ffff) == 0x18053)
+ if((insn.bits & 0x801f) == 0x2)
{
- #include "insns/fmin_s.h"
+ #include "insns/c_move.h"
break;
}
- if((insn.bits & 0x3ff1ff) == 0x11053)
+ if((insn.bits & 0x801f) == 0x8002)
{
- #include "insns/fcvt_s_d.h"
+ #include "insns/c_j.h"
break;
}
- if((insn.bits & 0x3ff1ff) == 0xe053)
+ throw trap_illegal_instruction;
+ }
+ case 0x1:
+ {
+ if((insn.bits & 0x801f) == 0x2)
{
- #include "insns/fcvt_s_w.h"
+ #include "insns/c_move.h"
break;
}
- if((insn.bits & 0x7c1ffff) == 0x1c053)
+ if((insn.bits & 0x801f) == 0x8002)
{
- #include "insns/mftx_s.h"
+ #include "insns/c_j.h"
break;
}
- if((insn.bits & 0x3ff1ff) == 0x8053)
+ throw trap_illegal_instruction;
+ }
+ case 0x2:
+ {
+ if((insn.bits & 0x801f) == 0x2)
{
- #include "insns/fcvt_l_s.h"
+ #include "insns/c_move.h"
break;
}
- if((insn.bits & 0x1ffff) == 0x17053)
+ if((insn.bits & 0x801f) == 0x8002)
{
- #include "insns/fle_s.h"
+ #include "insns/c_j.h"
break;
}
- if((insn.bits & 0x7ffffff) == 0x1d053)
+ throw trap_illegal_instruction;
+ }
+ case 0x3:
+ {
+ if((insn.bits & 0x801f) == 0x2)
{
- #include "insns/mffsr.h"
+ #include "insns/c_move.h"
break;
}
- if((insn.bits & 0x1f1ff) == 0x3053)
+ if((insn.bits & 0x801f) == 0x8002)
{
- #include "insns/fdiv_s.h"
+ #include "insns/c_j.h"
break;
}
- if((insn.bits & 0x3fffff) == 0x1f053)
+ throw trap_illegal_instruction;
+ }
+ case 0x4:
+ {
+ if((insn.bits & 0x801f) == 0x2)
{
- #include "insns/mtfsr.h"
+ #include "insns/c_move.h"
break;
}
- if((insn.bits & 0x3ff1ff) == 0xd053)
+ if((insn.bits & 0x801f) == 0x8002)
{
- #include "insns/fcvt_s_lu.h"
+ #include "insns/c_j.h"
break;
}
- if((insn.bits & 0x1f1ff) == 0x2053)
+ throw trap_illegal_instruction;
+ }
+ case 0x5:
+ {
+ if((insn.bits & 0x801f) == 0x2)
{
- #include "insns/fmul_s.h"
+ #include "insns/c_move.h"
break;
}
- if((insn.bits & 0x1ffff) == 0x16053)
+ if((insn.bits & 0x801f) == 0x8002)
{
- #include "insns/flt_s.h"
+ #include "insns/c_j.h"
break;
}
- if((insn.bits & 0x1ffff) == 0x15053)
+ throw trap_illegal_instruction;
+ }
+ case 0x6:
+ {
+ if((insn.bits & 0x801f) == 0x2)
{
- #include "insns/feq_s.h"
+ #include "insns/c_move.h"
break;
}
- if((insn.bits & 0x1ffff) == 0x7053)
+ if((insn.bits & 0x801f) == 0x8002)
{
- #include "insns/fsgnjx_s.h"
+ #include "insns/c_j.h"
break;
}
- if((insn.bits & 0x1ffff) == 0x19053)
+ throw trap_illegal_instruction;
+ }
+ case 0x7:
+ {
+ if((insn.bits & 0x801f) == 0x2)
{
- #include "insns/fmax_s.h"
+ #include "insns/c_move.h"
break;
}
- if((insn.bits & 0x3ff1ff) == 0xb053)
+ if((insn.bits & 0x801f) == 0x8002)
{
- #include "insns/fcvt_wu_s.h"
+ #include "insns/c_j.h"
break;
}
- if((insn.bits & 0x3ff1ff) == 0xa053)
- {
- #include "insns/fcvt_w_s.h"
- break;
+ throw trap_illegal_instruction;
+ }
+ default:
+ {
+ throw trap_illegal_instruction;
+ }
+ }
+ break;
+ }
+ case 0x23:
+ {
+ switch((insn.bits >> 0x7) & 0x7)
+ {
+ case 0x0:
+ {
+ #include "insns/sb.h"
+ break;
+ }
+ case 0x1:
+ {
+ #include "insns/sh.h"
+ break;
+ }
+ case 0x2:
+ {
+ #include "insns/sw.h"
+ break;
+ }
+ case 0x3:
+ {
+ #include "insns/sd.h"
+ break;
+ }
+ default:
+ {
+ throw trap_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:
+ {
+ switch((insn.bits >> 0x7) & 0x7)
+ {
+ case 0x2:
+ {
+ #include "insns/fsw.h"
+ break;
+ }
+ case 0x3:
+ {
+ #include "insns/fsd.h"
+ break;
+ }
+ default:
+ {
+ throw trap_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:
+ {
+ switch((insn.bits >> 0x7) & 0x7)
+ {
+ case 0x2:
+ {
+ if((insn.bits & 0x1ffff) == 0x192b)
+ {
+ #include "insns/amominu_w.h"
+ break;
+ }
+ if((insn.bits & 0x1ffff) == 0x92b)
+ {
+ #include "insns/amoand_w.h"
+ break;
+ }
+ if((insn.bits & 0x1ffff) == 0x1d2b)
+ {
+ #include "insns/amomaxu_w.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) == 0xd2b)
+ {
+ #include "insns/amoor_w.h"
+ break;
+ }
+ if((insn.bits & 0x1ffff) == 0x112b)
+ {
+ #include "insns/amomin_w.h"
+ break;
+ }
+ if((insn.bits & 0x1ffff) == 0x52b)
+ {
+ #include "insns/amoswap_w.h"
+ break;
+ }
+ throw trap_illegal_instruction;
+ }
+ case 0x3:
+ {
+ if((insn.bits & 0x1ffff) == 0x19ab)
+ {
+ #include "insns/amominu_d.h"
+ break;
+ }
+ if((insn.bits & 0x1ffff) == 0x9ab)
+ {
+ #include "insns/amoand_d.h"
+ break;
+ }
+ if((insn.bits & 0x1ffff) == 0x1dab)
+ {
+ #include "insns/amomaxu_d.h"
+ break;
+ }
+ if((insn.bits & 0x1ffff) == 0x1ab)
+ {
+ #include "insns/amoadd_d.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) == 0x5ab)
+ {
+ #include "insns/amoswap_d.h"
+ break;
+ }
+ if((insn.bits & 0x1ffff) == 0x11ab)
+ {
+ #include "insns/amomin_d.h"
+ break;
+ }
+ throw trap_illegal_instruction;
+ }
+ default:
+ {
+ throw trap_illegal_instruction;
+ }
+ }
+ break;
+ }
+ case 0x2c:
+ {
+ #include "insns/c_sd.h"
+ break;
+ }
+ case 0x2d:
+ {
+ #include "insns/c_sw.h"
+ break;
+ }
+ case 0x2f:
+ {
+ switch((insn.bits >> 0x7) & 0x7)
+ {
+ case 0x1:
+ {
+ #include "insns/fence_i.h"
+ break;
+ }
+ case 0x2:
+ {
+ #include "insns/fence.h"
+ break;
+ }
+ case 0x4:
+ {
+ #include "insns/fence_l_v.h"
+ break;
+ }
+ case 0x5:
+ {
+ #include "insns/fence_g_v.h"
+ break;
+ }
+ case 0x6:
+ {
+ #include "insns/fence_l_cv.h"
+ break;
+ }
+ case 0x7:
+ {
+ #include "insns/fence_g_cv.h"
+ break;
+ }
+ default:
+ {
+ throw trap_illegal_instruction;
+ }
+ }
+ break;
+ }
+ case 0x30:
+ {
+ #include "insns/c_beq.h"
+ break;
+ }
+ case 0x31:
+ {
+ #include "insns/c_bne.h"
+ break;
+ }
+ case 0x32:
+ {
+ switch((insn.bits >> 0x7) & 0x7)
+ {
+ case 0x0:
+ {
+ if((insn.bits & 0x801f) == 0x12)
+ {
+ #include "insns/c_lw0.h"
+ break;
+ }
+ if((insn.bits & 0x801f) == 0x8012)
+ {
+ #include "insns/c_ld0.h"
+ break;
+ }
+ throw trap_illegal_instruction;
+ }
+ case 0x1:
+ {
+ if((insn.bits & 0x801f) == 0x12)
+ {
+ #include "insns/c_lw0.h"
+ break;
+ }
+ if((insn.bits & 0x801f) == 0x8012)
+ {
+ #include "insns/c_ld0.h"
+ break;
+ }
+ throw trap_illegal_instruction;
+ }
+ case 0x2:
+ {
+ if((insn.bits & 0x801f) == 0x12)
+ {
+ #include "insns/c_lw0.h"
+ break;
+ }
+ if((insn.bits & 0x801f) == 0x8012)
+ {
+ #include "insns/c_ld0.h"
+ break;
+ }
+ throw trap_illegal_instruction;
+ }
+ case 0x3:
+ {
+ if((insn.bits & 0x801f) == 0x12)
+ {
+ #include "insns/c_lw0.h"
+ break;
+ }
+ if((insn.bits & 0x801f) == 0x8012)
+ {
+ #include "insns/c_ld0.h"
+ break;
+ }
+ throw trap_illegal_instruction;
+ }
+ case 0x4:
+ {
+ if((insn.bits & 0x801f) == 0x12)
+ {
+ #include "insns/c_lw0.h"
+ break;
+ }
+ if((insn.bits & 0x801f) == 0x8012)
+ {
+ #include "insns/c_ld0.h"
+ break;
+ }
+ throw trap_illegal_instruction;
+ }
+ case 0x5:
+ {
+ if((insn.bits & 0x801f) == 0x12)
+ {
+ #include "insns/c_lw0.h"
+ break;
+ }
+ if((insn.bits & 0x801f) == 0x8012)
+ {
+ #include "insns/c_ld0.h"
+ break;
+ }
+ throw trap_illegal_instruction;
+ }
+ case 0x6:
+ {
+ if((insn.bits & 0x801f) == 0x12)
+ {
+ #include "insns/c_lw0.h"
+ break;
+ }
+ if((insn.bits & 0x801f) == 0x8012)
+ {
+ #include "insns/c_ld0.h"
+ break;
+ }
+ throw trap_illegal_instruction;
+ }
+ case 0x7:
+ {
+ if((insn.bits & 0x801f) == 0x12)
+ {
+ #include "insns/c_lw0.h"
+ break;
+ }
+ if((insn.bits & 0x801f) == 0x8012)
+ {
+ #include "insns/c_ld0.h"
+ break;
+ }
+ throw trap_illegal_instruction;
+ }
+ default:
+ {
+ throw trap_illegal_instruction;
+ }
+ }
+ break;
+ }
+ case 0x33:
+ {
+ switch((insn.bits >> 0x7) & 0x7)
+ {
+ case 0x0:
+ {
+ if((insn.bits & 0x1ffff) == 0x33)
+ {
+ #include "insns/add.h"
+ break;
+ }
+ if((insn.bits & 0x1ffff) == 0x433)
+ {
+ #include "insns/mul.h"
+ break;
+ }
+ if((insn.bits & 0x1ffff) == 0x10033)
+ {
+ #include "insns/sub.h"
+ break;
+ }
+ throw trap_illegal_instruction;
+ }
+ case 0x1:
+ {
+ if((insn.bits & 0x1ffff) == 0xb3)
+ {
+ #include "insns/sll.h"
+ break;
+ }
+ if((insn.bits & 0x1ffff) == 0x4b3)
+ {
+ #include "insns/mulh.h"
+ break;
+ }
+ throw trap_illegal_instruction;
+ }
+ case 0x2:
+ {
+ if((insn.bits & 0x1ffff) == 0x533)
+ {
+ #include "insns/mulhsu.h"
+ break;
+ }
+ if((insn.bits & 0x1ffff) == 0x133)
+ {
+ #include "insns/slt.h"
+ break;
+ }
+ throw trap_illegal_instruction;
+ }
+ case 0x3:
+ {
+ if((insn.bits & 0x1ffff) == 0x1b3)
+ {
+ #include "insns/sltu.h"
+ break;
+ }
+ if((insn.bits & 0x1ffff) == 0x5b3)
+ {
+ #include "insns/mulhu.h"
+ break;
+ }
+ throw trap_illegal_instruction;
+ }
+ case 0x4:
+ {
+ if((insn.bits & 0x1ffff) == 0x633)
+ {
+ #include "insns/div.h"
+ break;
+ }
+ if((insn.bits & 0x1ffff) == 0x233)
+ {
+ #include "insns/xor.h"
+ break;
+ }
+ throw trap_illegal_instruction;
+ }
+ case 0x5:
+ {
+ if((insn.bits & 0x1ffff) == 0x102b3)
+ {
+ #include "insns/sra.h"
+ break;
+ }
+ if((insn.bits & 0x1ffff) == 0x2b3)
+ {
+ #include "insns/srl.h"
+ break;
+ }
+ if((insn.bits & 0x1ffff) == 0x6b3)
+ {
+ #include "insns/divu.h"
+ break;
+ }
+ throw trap_illegal_instruction;
+ }
+ case 0x6:
+ {
+ if((insn.bits & 0x1ffff) == 0x733)
+ {
+ #include "insns/rem.h"
+ break;
+ }
+ if((insn.bits & 0x1ffff) == 0x333)
+ {
+ #include "insns/or.h"
+ break;
+ }
+ throw trap_illegal_instruction;
+ }
+ case 0x7:
+ {
+ if((insn.bits & 0x1ffff) == 0x7b3)
+ {
+ #include "insns/remu.h"
+ break;
+ }
+ if((insn.bits & 0x1ffff) == 0x3b3)
+ {
+ #include "insns/and.h"
+ break;
+ }
+ throw trap_illegal_instruction;
+ }
+ default:
+ {
+ throw trap_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:
+ {
+ switch((insn.bits >> 0x7) & 0x7)
+ {
+ case 0x0:
+ {
+ 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) == 0xc19)
+ {
+ #include "insns/c_srli32.h"
+ break;
+ }
+ if((insn.bits & 0x1c1f) == 0x1819)
+ {
+ #include "insns/c_slliw.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 trap_illegal_instruction;
+ }
+ case 0x1:
+ {
+ 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) == 0xc19)
+ {
+ #include "insns/c_srli32.h"
+ break;
+ }
+ if((insn.bits & 0x1c1f) == 0x1819)
+ {
+ #include "insns/c_slliw.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 trap_illegal_instruction;
+ }
+ case 0x2:
+ {
+ 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) == 0xc19)
+ {
+ #include "insns/c_srli32.h"
+ break;
+ }
+ if((insn.bits & 0x1c1f) == 0x1819)
+ {
+ #include "insns/c_slliw.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 trap_illegal_instruction;
+ }
+ case 0x3:
+ {
+ 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) == 0xc19)
+ {
+ #include "insns/c_srli32.h"
+ break;
+ }
+ if((insn.bits & 0x1c1f) == 0x1819)
+ {
+ #include "insns/c_slliw.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 trap_illegal_instruction;
+ }
+ case 0x4:
+ {
+ 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) == 0xc19)
+ {
+ #include "insns/c_srli32.h"
+ break;
+ }
+ if((insn.bits & 0x1c1f) == 0x1819)
+ {
+ #include "insns/c_slliw.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 trap_illegal_instruction;
+ }
+ case 0x5:
+ {
+ 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) == 0xc19)
+ {
+ #include "insns/c_srli32.h"
+ break;
+ }
+ if((insn.bits & 0x1c1f) == 0x1819)
+ {
+ #include "insns/c_slliw.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 trap_illegal_instruction;
+ }
+ case 0x6:
+ {
+ 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) == 0xc19)
+ {
+ #include "insns/c_srli32.h"
+ break;
+ }
+ if((insn.bits & 0x1c1f) == 0x1819)
+ {
+ #include "insns/c_slliw.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 trap_illegal_instruction;
+ }
+ case 0x7:
+ {
+ 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) == 0xc19)
+ {
+ #include "insns/c_srli32.h"
+ break;
+ }
+ if((insn.bits & 0x1c1f) == 0x1819)
+ {
+ #include "insns/c_slliw.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 trap_illegal_instruction;
+ }
+ default:
+ {
+ throw trap_illegal_instruction;
+ }
+ }
+ break;
+ }
+ case 0x3a:
+ {
+ switch((insn.bits >> 0x7) & 0x7)
+ {
+ case 0x0:
+ {
+ if((insn.bits & 0x801f) == 0x1a)
+ {
+ #include "insns/c_add.h"
+ break;
+ }
+ if((insn.bits & 0x801f) == 0x801a)
+ {
+ #include "insns/c_sub.h"
+ break;
+ }
+ throw trap_illegal_instruction;
+ }
+ case 0x1:
+ {
+ if((insn.bits & 0x801f) == 0x1a)
+ {
+ #include "insns/c_add.h"
+ break;
+ }
+ if((insn.bits & 0x801f) == 0x801a)
+ {
+ #include "insns/c_sub.h"
+ break;
+ }
+ throw trap_illegal_instruction;
+ }
+ case 0x2:
+ {
+ if((insn.bits & 0x801f) == 0x1a)
+ {
+ #include "insns/c_add.h"
+ break;
+ }
+ if((insn.bits & 0x801f) == 0x801a)
+ {
+ #include "insns/c_sub.h"
+ break;
+ }
+ throw trap_illegal_instruction;
+ }
+ case 0x3:
+ {
+ if((insn.bits & 0x801f) == 0x1a)
+ {
+ #include "insns/c_add.h"
+ break;
+ }
+ if((insn.bits & 0x801f) == 0x801a)
+ {
+ #include "insns/c_sub.h"
+ break;
+ }
+ throw trap_illegal_instruction;
+ }
+ case 0x4:
+ {
+ if((insn.bits & 0x801f) == 0x1a)
+ {
+ #include "insns/c_add.h"
+ break;
+ }
+ if((insn.bits & 0x801f) == 0x801a)
+ {
+ #include "insns/c_sub.h"
+ break;
+ }
+ throw trap_illegal_instruction;
+ }
+ case 0x5:
+ {
+ if((insn.bits & 0x801f) == 0x1a)
+ {
+ #include "insns/c_add.h"
+ break;
+ }
+ if((insn.bits & 0x801f) == 0x801a)
+ {
+ #include "insns/c_sub.h"
+ break;
+ }
+ throw trap_illegal_instruction;
+ }
+ case 0x6:
+ {
+ if((insn.bits & 0x801f) == 0x1a)
+ {
+ #include "insns/c_add.h"
+ break;
+ }
+ if((insn.bits & 0x801f) == 0x801a)
+ {
+ #include "insns/c_sub.h"
+ break;
+ }
+ throw trap_illegal_instruction;
+ }
+ case 0x7:
+ {
+ if((insn.bits & 0x801f) == 0x1a)
+ {
+ #include "insns/c_add.h"
+ break;
+ }
+ if((insn.bits & 0x801f) == 0x801a)
+ {
+ #include "insns/c_sub.h"
+ break;
+ }
+ throw trap_illegal_instruction;
+ }
+ default:
+ {
+ throw trap_illegal_instruction;
+ }
+ }
+ break;
+ }
+ case 0x3b:
+ {
+ switch((insn.bits >> 0x7) & 0x7)
+ {
+ case 0x0:
+ {
+ if((insn.bits & 0x1ffff) == 0x43b)
+ {
+ #include "insns/mulw.h"
+ break;
+ }
+ if((insn.bits & 0x1ffff) == 0x3b)
+ {
+ #include "insns/addw.h"
+ break;
+ }
+ if((insn.bits & 0x1ffff) == 0x1003b)
+ {
+ #include "insns/subw.h"
+ break;
+ }
+ throw trap_illegal_instruction;
+ }
+ case 0x1:
+ {
+ if((insn.bits & 0x1ffff) == 0xbb)
+ {
+ #include "insns/sllw.h"
+ break;
+ }
+ throw trap_illegal_instruction;
+ }
+ case 0x4:
+ {
+ if((insn.bits & 0x1ffff) == 0x63b)
+ {
+ #include "insns/divw.h"
+ break;
+ }
+ throw trap_illegal_instruction;
+ }
+ case 0x5:
+ {
+ if((insn.bits & 0x1ffff) == 0x6bb)
+ {
+ #include "insns/divuw.h"
+ break;
+ }
+ if((insn.bits & 0x1ffff) == 0x2bb)
+ {
+ #include "insns/srlw.h"
+ break;
+ }
+ if((insn.bits & 0x1ffff) == 0x102bb)
+ {
+ #include "insns/sraw.h"
+ break;
+ }
+ throw trap_illegal_instruction;
+ }
+ case 0x6:
+ {
+ if((insn.bits & 0x1ffff) == 0x73b)
+ {
+ #include "insns/remw.h"
+ break;
+ }
+ throw trap_illegal_instruction;
+ }
+ case 0x7:
+ {
+ if((insn.bits & 0x1ffff) == 0x7bb)
+ {
+ #include "insns/remuw.h"
+ break;
+ }
+ throw trap_illegal_instruction;
+ }
+ default:
+ {
+ throw trap_illegal_instruction;
+ }
+ }
+ break;
+ }
+ case 0x3c:
+ {
+ switch((insn.bits >> 0x7) & 0x7)
+ {
+ case 0x0:
+ {
+ #include "insns/c_add3.h"
+ break;
+ }
+ case 0x1:
+ {
+ #include "insns/c_add3.h"
+ break;
+ }
+ case 0x2:
+ {
+ #include "insns/c_sub3.h"
+ break;
+ }
+ case 0x3:
+ {
+ #include "insns/c_sub3.h"
+ break;
+ }
+ case 0x4:
+ {
+ #include "insns/c_or3.h"
+ break;
+ }
+ case 0x5:
+ {
+ #include "insns/c_or3.h"
+ break;
+ }
+ case 0x6:
+ {
+ #include "insns/c_and3.h"
+ break;
+ }
+ case 0x7:
+ {
+ #include "insns/c_and3.h"
+ break;
+ }
+ default:
+ {
+ throw trap_illegal_instruction;
+ }
+ }
+ break;
+ }
+ case 0x40:
+ {
+ #include "insns/c_li.h"
+ break;
+ }
+ case 0x41:
+ {
+ #include "insns/c_addi.h"
+ break;
+ }
+ case 0x42:
+ {
+ switch((insn.bits >> 0x7) & 0x7)
+ {
+ case 0x0:
+ {
+ if((insn.bits & 0x801f) == 0x2)
+ {
+ #include "insns/c_move.h"
+ break;
+ }
+ if((insn.bits & 0x801f) == 0x8002)
+ {
+ #include "insns/c_j.h"
+ break;
+ }
+ throw trap_illegal_instruction;
+ }
+ case 0x1:
+ {
+ if((insn.bits & 0x801f) == 0x2)
+ {
+ #include "insns/c_move.h"
+ break;
+ }
+ if((insn.bits & 0x801f) == 0x8002)
+ {
+ #include "insns/c_j.h"
+ break;
+ }
+ throw trap_illegal_instruction;
+ }
+ 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 trap_illegal_instruction;
+ }
+ case 0x3:
+ {
+ if((insn.bits & 0x801f) == 0x2)
+ {
+ #include "insns/c_move.h"
+ break;
+ }
+ if((insn.bits & 0x801f) == 0x8002)
+ {
+ #include "insns/c_j.h"
+ break;
+ }
+ throw trap_illegal_instruction;
+ }
+ case 0x4:
+ {
+ if((insn.bits & 0x801f) == 0x2)
+ {
+ #include "insns/c_move.h"
+ break;
+ }
+ if((insn.bits & 0x801f) == 0x8002)
+ {
+ #include "insns/c_j.h"
+ break;
+ }
+ throw trap_illegal_instruction;
+ }
+ case 0x5:
+ {
+ if((insn.bits & 0x801f) == 0x2)
+ {
+ #include "insns/c_move.h"
+ break;
+ }
+ if((insn.bits & 0x801f) == 0x8002)
+ {
+ #include "insns/c_j.h"
+ break;
+ }
+ throw trap_illegal_instruction;
+ }
+ case 0x6:
+ {
+ if((insn.bits & 0x801f) == 0x2)
+ {
+ #include "insns/c_move.h"
+ break;
+ }
+ if((insn.bits & 0x801f) == 0x8002)
+ {
+ #include "insns/c_j.h"
+ break;
+ }
+ throw trap_illegal_instruction;
+ }
+ case 0x7:
+ {
+ if((insn.bits & 0x801f) == 0x2)
+ {
+ #include "insns/c_move.h"
+ break;
+ }
+ if((insn.bits & 0x801f) == 0x8002)
+ {
+ #include "insns/c_j.h"
+ break;
+ }
+ throw trap_illegal_instruction;
+ }
+ default:
+ {
+ throw trap_illegal_instruction;
+ }
+ }
+ break;
+ }
+ case 0x43:
+ {
+ switch((insn.bits >> 0x7) & 0x7)
+ {
+ case 0x0:
+ {
+ #include "insns/fmadd_s.h"
+ break;
+ }
+ case 0x1:
+ {
+ #include "insns/fmadd_d.h"
+ break;
+ }
+ case 0x4:
+ {
+ #include "insns/fmadd_s.h"
+ break;
+ }
+ case 0x5:
+ {
+ #include "insns/fmadd_d.h"
+ break;
+ }
+ default:
+ {
+ throw trap_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:
+ {
+ switch((insn.bits >> 0x7) & 0x7)
+ {
+ case 0x0:
+ {
+ #include "insns/fmsub_s.h"
+ break;
+ }
+ case 0x1:
+ {
+ #include "insns/fmsub_d.h"
+ break;
+ }
+ case 0x4:
+ {
+ #include "insns/fmsub_s.h"
+ break;
+ }
+ case 0x5:
+ {
+ #include "insns/fmsub_d.h"
+ break;
+ }
+ default:
+ {
+ throw trap_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:
+ {
+ switch((insn.bits >> 0x7) & 0x7)
+ {
+ case 0x0:
+ {
+ #include "insns/fnmsub_s.h"
+ break;
+ }
+ case 0x1:
+ {
+ #include "insns/fnmsub_d.h"
+ break;
+ }
+ case 0x4:
+ {
+ #include "insns/fnmsub_s.h"
+ break;
+ }
+ case 0x5:
+ {
+ #include "insns/fnmsub_d.h"
+ break;
+ }
+ default:
+ {
+ throw trap_illegal_instruction;
+ }
+ }
+ break;
+ }
+ case 0x4c:
+ {
+ #include "insns/c_sd.h"
+ break;
+ }
+ case 0x4d:
+ {
+ #include "insns/c_sw.h"
+ break;
+ }
+ case 0x4f:
+ {
+ switch((insn.bits >> 0x7) & 0x7)
+ {
+ case 0x0:
+ {
+ #include "insns/fnmadd_s.h"
+ break;
+ }
+ case 0x1:
+ {
+ #include "insns/fnmadd_d.h"
+ break;
+ }
+ case 0x4:
+ {
+ #include "insns/fnmadd_s.h"
+ break;
+ }
+ case 0x5:
+ {
+ #include "insns/fnmadd_d.h"
+ break;
+ }
+ default:
+ {
+ throw trap_illegal_instruction;
+ }
+ }
+ break;
+ }
+ case 0x50:
+ {
+ #include "insns/c_beq.h"
+ break;
+ }
+ case 0x51:
+ {
+ #include "insns/c_bne.h"
+ break;
+ }
+ case 0x52:
+ {
+ switch((insn.bits >> 0x7) & 0x7)
+ {
+ case 0x0:
+ {
+ if((insn.bits & 0x801f) == 0x12)
+ {
+ #include "insns/c_lw0.h"
+ break;
+ }
+ if((insn.bits & 0x801f) == 0x8012)
+ {
+ #include "insns/c_ld0.h"
+ break;
+ }
+ throw trap_illegal_instruction;
+ }
+ case 0x1:
+ {
+ if((insn.bits & 0x801f) == 0x12)
+ {
+ #include "insns/c_lw0.h"
+ break;
+ }
+ if((insn.bits & 0x801f) == 0x8012)
+ {
+ #include "insns/c_ld0.h"
+ break;
+ }
+ throw trap_illegal_instruction;
+ }
+ case 0x2:
+ {
+ if((insn.bits & 0x801f) == 0x12)
+ {
+ #include "insns/c_lw0.h"
+ break;
+ }
+ if((insn.bits & 0x801f) == 0x8012)
+ {
+ #include "insns/c_ld0.h"
+ break;
+ }
+ throw trap_illegal_instruction;
+ }
+ case 0x3:
+ {
+ if((insn.bits & 0x801f) == 0x12)
+ {
+ #include "insns/c_lw0.h"
+ break;
+ }
+ if((insn.bits & 0x801f) == 0x8012)
+ {
+ #include "insns/c_ld0.h"
+ break;
+ }
+ throw trap_illegal_instruction;
+ }
+ case 0x4:
+ {
+ if((insn.bits & 0x801f) == 0x12)
+ {
+ #include "insns/c_lw0.h"
+ break;
+ }
+ if((insn.bits & 0x801f) == 0x8012)
+ {
+ #include "insns/c_ld0.h"
+ break;
+ }
+ throw trap_illegal_instruction;
+ }
+ case 0x5:
+ {
+ if((insn.bits & 0x801f) == 0x12)
+ {
+ #include "insns/c_lw0.h"
+ break;
+ }
+ if((insn.bits & 0x801f) == 0x8012)
+ {
+ #include "insns/c_ld0.h"
+ break;
+ }
+ throw trap_illegal_instruction;
+ }
+ case 0x6:
+ {
+ if((insn.bits & 0x801f) == 0x12)
+ {
+ #include "insns/c_lw0.h"
+ break;
+ }
+ if((insn.bits & 0x801f) == 0x8012)
+ {
+ #include "insns/c_ld0.h"
+ break;
+ }
+ throw trap_illegal_instruction;
+ }
+ case 0x7:
+ {
+ if((insn.bits & 0x801f) == 0x12)
+ {
+ #include "insns/c_lw0.h"
+ break;
+ }
+ if((insn.bits & 0x801f) == 0x8012)
+ {
+ #include "insns/c_ld0.h"
+ break;
+ }
+ throw trap_illegal_instruction;
+ }
+ default:
+ {
+ throw trap_illegal_instruction;
+ }
+ }
+ break;
+ }
+ case 0x53:
+ {
+ switch((insn.bits >> 0x7) & 0x7)
+ {
+ case 0x0:
+ {
+ 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) == 0x11053)
+ {
+ #include "insns/fcvt_s_d.h"
+ break;
+ }
+ if((insn.bits & 0x3ff1ff) == 0xe053)
+ {
+ #include "insns/fcvt_s_w.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 & 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) == 0x16053)
+ {
+ #include "insns/flt_s.h"
+ break;
+ }
+ if((insn.bits & 0x1ffff) == 0x15053)
+ {
+ #include "insns/feq_s.h"
+ break;
+ }
+ if((insn.bits & 0x1ffff) == 0x7053)
+ {
+ #include "insns/fsgnjx_s.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 & 0x3ff1ff) == 0xa053)
+ {
+ #include "insns/fcvt_w_s.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 & 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) == 0x4053)
+ {
+ #include "insns/fsqrt_s.h"
+ break;
+ }
+ if((insn.bits & 0x1ffff) == 0x6053)
+ {
+ #include "insns/fsgnjn_s.h"
+ break;
+ }
+ if((insn.bits & 0x1f1ff) == 0x53)
+ {
+ #include "insns/fadd_s.h"
+ break;
+ }
+ throw trap_illegal_instruction;
+ }
+ case 0x1:
+ {
+ if((insn.bits & 0x1ffff) == 0x180d3)
+ {
+ #include "insns/fmin_d.h"
+ break;
+ }
+ if((insn.bits & 0x3ff1ff) == 0xc0d3)
+ {
+ #include "insns/fcvt_d_l.h"
+ break;
+ }
+ if((insn.bits & 0x3fffff) == 0xe0d3)
+ {
+ #include "insns/fcvt_d_w.h"
+ break;
+ }
+ if((insn.bits & 0x3fffff) == 0x100d3)
+ {
+ #include "insns/fcvt_d_s.h"
+ break;
+ }
+ if((insn.bits & 0x1ffff) == 0x190d3)
+ {
+ #include "insns/fmax_d.h"
+ break;
+ }
+ if((insn.bits & 0x7c1ffff) == 0x1c0d3)
+ {
+ #include "insns/mftx_d.h"
+ break;
+ }
+ if((insn.bits & 0x1ffff) == 0x170d3)
+ {
+ #include "insns/fle_d.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) == 0x70d3)
+ {
+ #include "insns/fsgnjx_d.h"
+ break;
+ }
+ if((insn.bits & 0x1ffff) == 0x150d3)
+ {
+ #include "insns/feq_d.h"
+ break;
+ }
+ if((insn.bits & 0x3fffff) == 0xf0d3)
+ {
+ #include "insns/fcvt_d_wu.h"
+ break;
+ }
+ if((insn.bits & 0x3ff1ff) == 0xb0d3)
+ {
+ #include "insns/fcvt_wu_d.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 & 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) == 0x90d3)
+ {
+ #include "insns/fcvt_lu_d.h"
+ break;
+ }
+ if((insn.bits & 0x1f1ff) == 0x10d3)
+ {
+ #include "insns/fsub_d.h"
+ break;
+ }
+ if((insn.bits & 0x3ff1ff) == 0x40d3)
+ {
+ #include "insns/fsqrt_d.h"
+ break;
+ }
+ if((insn.bits & 0x1f1ff) == 0x30d3)
+ {
+ #include "insns/fdiv_d.h"
+ break;
+ }
+ throw trap_illegal_instruction;
+ }
+ case 0x4:
+ {
+ if((insn.bits & 0x3ff1ff) == 0x9053)
+ {
+ #include "insns/fcvt_lu_s.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 & 0x3ff1ff) == 0x8053)
+ {
+ #include "insns/fcvt_l_s.h"
+ break;
+ }
+ if((insn.bits & 0x1f1ff) == 0x3053)
+ {
+ #include "insns/fdiv_s.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 & 0x3ff1ff) == 0xb053)
+ {
+ #include "insns/fcvt_wu_s.h"
+ break;
+ }
+ if((insn.bits & 0x3ff1ff) == 0xa053)
+ {
+ #include "insns/fcvt_w_s.h"
+ break;
+ }
+ if((insn.bits & 0x1f1ff) == 0x1053)
+ {
+ #include "insns/fsub_s.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) == 0x4053)
+ {
+ #include "insns/fsqrt_s.h"
+ break;
+ }
+ if((insn.bits & 0x1f1ff) == 0x53)
+ {
+ #include "insns/fadd_s.h"
+ break;
+ }
+ throw trap_illegal_instruction;
+ }
+ case 0x5:
+ {
+ if((insn.bits & 0x3ff1ff) == 0xc0d3)
+ {
+ #include "insns/fcvt_d_l.h"
+ break;
+ }
+ if((insn.bits & 0x1f1ff) == 0x20d3)
+ {
+ #include "insns/fmul_d.h"
+ break;
+ }
+ if((insn.bits & 0x3ff1ff) == 0xb0d3)
+ {
+ #include "insns/fcvt_wu_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 & 0x3ff1ff) == 0x80d3)
+ {
+ #include "insns/fcvt_l_d.h"
+ break;
+ }
+ if((insn.bits & 0x1f1ff) == 0xd3)
+ {
+ #include "insns/fadd_d.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) == 0x40d3)
+ {
+ #include "insns/fsqrt_d.h"
+ break;
+ }
+ if((insn.bits & 0x1f1ff) == 0x30d3)
+ {
+ #include "insns/fdiv_d.h"
+ break;
+ }
+ throw trap_illegal_instruction;
+ }
+ default:
+ {
+ throw trap_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:
+ {
+ switch((insn.bits >> 0x7) & 0x7)
+ {
+ case 0x0:
+ {
+ 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) == 0xc19)
+ {
+ #include "insns/c_srli32.h"
+ break;
+ }
+ if((insn.bits & 0x1c1f) == 0x1819)
+ {
+ #include "insns/c_slliw.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 trap_illegal_instruction;
+ }
+ case 0x1:
+ {
+ 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) == 0xc19)
+ {
+ #include "insns/c_srli32.h"
+ break;
+ }
+ if((insn.bits & 0x1c1f) == 0x1819)
+ {
+ #include "insns/c_slliw.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 trap_illegal_instruction;
+ }
+ case 0x2:
+ {
+ 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) == 0xc19)
+ {
+ #include "insns/c_srli32.h"
+ break;
+ }
+ if((insn.bits & 0x1c1f) == 0x1819)
+ {
+ #include "insns/c_slliw.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 trap_illegal_instruction;
+ }
+ case 0x3:
+ {
+ 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) == 0xc19)
+ {
+ #include "insns/c_srli32.h"
+ break;
+ }
+ if((insn.bits & 0x1c1f) == 0x1819)
+ {
+ #include "insns/c_slliw.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 trap_illegal_instruction;
+ }
+ case 0x4:
+ {
+ 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) == 0xc19)
+ {
+ #include "insns/c_srli32.h"
+ break;
+ }
+ if((insn.bits & 0x1c1f) == 0x1819)
+ {
+ #include "insns/c_slliw.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 trap_illegal_instruction;
+ }
+ case 0x5:
+ {
+ 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) == 0xc19)
+ {
+ #include "insns/c_srli32.h"
+ break;
+ }
+ if((insn.bits & 0x1c1f) == 0x1819)
+ {
+ #include "insns/c_slliw.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 trap_illegal_instruction;
+ }
+ case 0x6:
+ {
+ 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) == 0xc19)
+ {
+ #include "insns/c_srli32.h"
+ break;
+ }
+ if((insn.bits & 0x1c1f) == 0x1819)
+ {
+ #include "insns/c_slliw.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 trap_illegal_instruction;
+ }
+ case 0x7:
+ {
+ 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) == 0xc19)
+ {
+ #include "insns/c_srli32.h"
+ break;
+ }
+ if((insn.bits & 0x1c1f) == 0x1819)
+ {
+ #include "insns/c_slliw.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 trap_illegal_instruction;
+ }
+ default:
+ {
+ throw trap_illegal_instruction;
+ }
+ }
+ break;
+ }
+ case 0x5a:
+ {
+ switch((insn.bits >> 0x7) & 0x7)
+ {
+ case 0x0:
+ {
+ if((insn.bits & 0x801f) == 0x1a)
+ {
+ #include "insns/c_add.h"
+ break;
+ }
+ if((insn.bits & 0x801f) == 0x801a)
+ {
+ #include "insns/c_sub.h"
+ break;
+ }
+ throw trap_illegal_instruction;
+ }
+ case 0x1:
+ {
+ if((insn.bits & 0x801f) == 0x1a)
+ {
+ #include "insns/c_add.h"
+ break;
+ }
+ if((insn.bits & 0x801f) == 0x801a)
+ {
+ #include "insns/c_sub.h"
+ break;
+ }
+ throw trap_illegal_instruction;
+ }
+ case 0x2:
+ {
+ if((insn.bits & 0x801f) == 0x1a)
+ {
+ #include "insns/c_add.h"
+ break;
+ }
+ if((insn.bits & 0x801f) == 0x801a)
+ {
+ #include "insns/c_sub.h"
+ break;
+ }
+ throw trap_illegal_instruction;
+ }
+ case 0x3:
+ {
+ if((insn.bits & 0x801f) == 0x1a)
+ {
+ #include "insns/c_add.h"
+ break;
+ }
+ if((insn.bits & 0x801f) == 0x801a)
+ {
+ #include "insns/c_sub.h"
+ break;
+ }
+ throw trap_illegal_instruction;
+ }
+ case 0x4:
+ {
+ if((insn.bits & 0x801f) == 0x1a)
+ {
+ #include "insns/c_add.h"
+ break;
+ }
+ if((insn.bits & 0x801f) == 0x801a)
+ {
+ #include "insns/c_sub.h"
+ break;
+ }
+ throw trap_illegal_instruction;
+ }
+ case 0x5:
+ {
+ if((insn.bits & 0x801f) == 0x1a)
+ {
+ #include "insns/c_add.h"
+ break;
+ }
+ if((insn.bits & 0x801f) == 0x801a)
+ {
+ #include "insns/c_sub.h"
+ break;
+ }
+ throw trap_illegal_instruction;
+ }
+ case 0x6:
+ {
+ if((insn.bits & 0x801f) == 0x1a)
+ {
+ #include "insns/c_add.h"
+ break;
+ }
+ if((insn.bits & 0x801f) == 0x801a)
+ {
+ #include "insns/c_sub.h"
+ break;
+ }
+ throw trap_illegal_instruction;
+ }
+ case 0x7:
+ {
+ if((insn.bits & 0x801f) == 0x1a)
+ {
+ #include "insns/c_add.h"
+ break;
+ }
+ if((insn.bits & 0x801f) == 0x801a)
+ {
+ #include "insns/c_sub.h"
+ break;
+ }
+ throw trap_illegal_instruction;
+ }
+ default:
+ {
+ throw trap_illegal_instruction;
+ }
+ }
+ break;
+ }
+ case 0x5c:
+ {
+ switch((insn.bits >> 0x7) & 0x7)
+ {
+ case 0x0:
+ {
+ #include "insns/c_add3.h"
+ break;
+ }
+ case 0x1:
+ {
+ #include "insns/c_add3.h"
+ break;
+ }
+ case 0x2:
+ {
+ #include "insns/c_sub3.h"
+ break;
+ }
+ case 0x3:
+ {
+ #include "insns/c_sub3.h"
+ break;
+ }
+ case 0x4:
+ {
+ #include "insns/c_or3.h"
+ break;
+ }
+ case 0x5:
+ {
+ #include "insns/c_or3.h"
+ break;
+ }
+ case 0x6:
+ {
+ #include "insns/c_and3.h"
+ break;
+ }
+ case 0x7:
+ {
+ #include "insns/c_and3.h"
+ break;
+ }
+ default:
+ {
+ throw trap_illegal_instruction;
+ }
+ }
+ break;
+ }
+ case 0x60:
+ {
+ #include "insns/c_li.h"
+ break;
+ }
+ case 0x61:
+ {
+ #include "insns/c_addi.h"
+ break;
+ }
+ case 0x62:
+ {
+ switch((insn.bits >> 0x7) & 0x7)
+ {
+ case 0x0:
+ {
+ if((insn.bits & 0x801f) == 0x2)
+ {
+ #include "insns/c_move.h"
+ break;
+ }
+ if((insn.bits & 0x801f) == 0x8002)
+ {
+ #include "insns/c_j.h"
+ break;
+ }
+ throw trap_illegal_instruction;
+ }
+ case 0x1:
+ {
+ if((insn.bits & 0x801f) == 0x2)
+ {
+ #include "insns/c_move.h"
+ break;
+ }
+ if((insn.bits & 0x801f) == 0x8002)
+ {
+ #include "insns/c_j.h"
+ break;
+ }
+ throw trap_illegal_instruction;
+ }
+ 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 trap_illegal_instruction;
+ }
+ case 0x3:
+ {
+ if((insn.bits & 0x801f) == 0x2)
+ {
+ #include "insns/c_move.h"
+ break;
+ }
+ if((insn.bits & 0x801f) == 0x8002)
+ {
+ #include "insns/c_j.h"
+ break;
+ }
+ throw trap_illegal_instruction;
+ }
+ case 0x4:
+ {
+ if((insn.bits & 0x801f) == 0x2)
+ {
+ #include "insns/c_move.h"
+ break;
+ }
+ if((insn.bits & 0x801f) == 0x8002)
+ {
+ #include "insns/c_j.h"
+ break;
+ }
+ throw trap_illegal_instruction;
+ }
+ case 0x5:
+ {
+ if((insn.bits & 0x801f) == 0x2)
+ {
+ #include "insns/c_move.h"
+ break;
+ }
+ if((insn.bits & 0x801f) == 0x8002)
+ {
+ #include "insns/c_j.h"
+ break;
+ }
+ throw trap_illegal_instruction;
+ }
+ case 0x6:
+ {
+ if((insn.bits & 0x801f) == 0x2)
+ {
+ #include "insns/c_move.h"
+ break;
+ }
+ if((insn.bits & 0x801f) == 0x8002)
+ {
+ #include "insns/c_j.h"
+ break;
+ }
+ throw trap_illegal_instruction;
+ }
+ case 0x7:
+ {
+ if((insn.bits & 0x801f) == 0x2)
+ {
+ #include "insns/c_move.h"
+ break;
}
- if((insn.bits & 0x3fffff) == 0x1e053)
+ if((insn.bits & 0x801f) == 0x8002)
{
- #include "insns/mxtf_s.h"
+ #include "insns/c_j.h"
break;
}
- if((insn.bits & 0x1f1ff) == 0x1053)
+ throw trap_illegal_instruction;
+ }
+ default:
+ {
+ throw trap_illegal_instruction;
+ }
+ }
+ break;
+ }
+ case 0x63:
+ {
+ switch((insn.bits >> 0x7) & 0x7)
+ {
+ case 0x0:
+ {
+ #include "insns/beq.h"
+ break;
+ }
+ case 0x1:
+ {
+ #include "insns/bne.h"
+ break;
+ }
+ case 0x4:
+ {
+ #include "insns/blt.h"
+ break;
+ }
+ case 0x5:
+ {
+ #include "insns/bge.h"
+ break;
+ }
+ case 0x6:
+ {
+ #include "insns/bltu.h"
+ break;
+ }
+ case 0x7:
+ {
+ #include "insns/bgeu.h"
+ break;
+ }
+ default:
+ {
+ throw trap_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:
+ {
+ switch((insn.bits >> 0x7) & 0x7)
+ {
+ case 0x0:
+ {
+ #include "insns/jalr_c.h"
+ break;
+ }
+ case 0x1:
+ {
+ #include "insns/jalr_r.h"
+ break;
+ }
+ case 0x2:
+ {
+ #include "insns/jalr_j.h"
+ break;
+ }
+ case 0x4:
+ {
+ if((insn.bits & 0x7ffffff) == 0x26b)
{
- #include "insns/fsub_s.h"
+ #include "insns/rdnpc.h"
break;
}
- if((insn.bits & 0x1ffff) == 0x5053)
+ throw trap_illegal_instruction;
+ }
+ default:
+ {
+ throw trap_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:
+ {
+ switch((insn.bits >> 0x7) & 0x7)
+ {
+ case 0x0:
+ {
+ if((insn.bits & 0x801f) == 0x12)
{
- #include "insns/fsgnj_s.h"
+ #include "insns/c_lw0.h"
break;
}
- if((insn.bits & 0x3ff1ff) == 0xf053)
+ if((insn.bits & 0x801f) == 0x8012)
{
- #include "insns/fcvt_s_wu.h"
+ #include "insns/c_ld0.h"
break;
}
- if((insn.bits & 0x3ff1ff) == 0xc053)
+ throw trap_illegal_instruction;
+ }
+ case 0x1:
+ {
+ if((insn.bits & 0x801f) == 0x12)
{
- #include "insns/fcvt_s_l.h"
+ #include "insns/c_lw0.h"
break;
}
- if((insn.bits & 0x3ff1ff) == 0x4053)
+ if((insn.bits & 0x801f) == 0x8012)
{
- #include "insns/fsqrt_s.h"
+ #include "insns/c_ld0.h"
break;
}
- if((insn.bits & 0x1ffff) == 0x6053)
+ throw trap_illegal_instruction;
+ }
+ case 0x2:
+ {
+ if((insn.bits & 0x801f) == 0x12)
+ {
+ #include "insns/c_lw0.h"
+ break;
+ }
+ if((insn.bits & 0x801f) == 0x8012)
+ {
+ #include "insns/c_ld0.h"
+ break;
+ }
+ throw trap_illegal_instruction;
+ }
+ case 0x3:
+ {
+ if((insn.bits & 0x801f) == 0x12)
+ {
+ #include "insns/c_lw0.h"
+ break;
+ }
+ if((insn.bits & 0x801f) == 0x8012)
+ {
+ #include "insns/c_ld0.h"
+ break;
+ }
+ throw trap_illegal_instruction;
+ }
+ case 0x4:
+ {
+ if((insn.bits & 0x801f) == 0x12)
+ {
+ #include "insns/c_lw0.h"
+ break;
+ }
+ if((insn.bits & 0x801f) == 0x8012)
+ {
+ #include "insns/c_ld0.h"
+ break;
+ }
+ throw trap_illegal_instruction;
+ }
+ case 0x5:
+ {
+ if((insn.bits & 0x801f) == 0x12)
+ {
+ #include "insns/c_lw0.h"
+ break;
+ }
+ if((insn.bits & 0x801f) == 0x8012)
+ {
+ #include "insns/c_ld0.h"
+ break;
+ }
+ throw trap_illegal_instruction;
+ }
+ case 0x6:
+ {
+ if((insn.bits & 0x801f) == 0x12)
+ {
+ #include "insns/c_lw0.h"
+ break;
+ }
+ if((insn.bits & 0x801f) == 0x8012)
+ {
+ #include "insns/c_ld0.h"
+ break;
+ }
+ throw trap_illegal_instruction;
+ }
+ case 0x7:
+ {
+ if((insn.bits & 0x801f) == 0x12)
+ {
+ #include "insns/c_lw0.h"
+ break;
+ }
+ if((insn.bits & 0x801f) == 0x8012)
+ {
+ #include "insns/c_ld0.h"
+ break;
+ }
+ throw trap_illegal_instruction;
+ }
+ default:
+ {
+ throw trap_illegal_instruction;
+ }
+ }
+ break;
+ }
+ case 0x73:
+ {
+ switch((insn.bits >> 0x7) & 0x7)
+ {
+ case 0x0:
+ {
+ #include "insns/vcfgivl.h"
+ break;
+ }
+ case 0x1:
+ {
+ if((insn.bits & 0x3fffff) == 0xf3)
+ {
+ #include "insns/setvl.h"
+ break;
+ }
+ throw trap_illegal_instruction;
+ }
+ case 0x2:
+ {
+ if((insn.bits & 0xf80003ff) == 0x173)
{
- #include "insns/fsgnjn_s.h"
+ #include "insns/vf.h"
break;
}
- if((insn.bits & 0x1f1ff) == 0x53)
+ throw trap_illegal_instruction;
+ }
+ default:
+ {
+ throw trap_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:
+ {
+ switch((insn.bits >> 0x7) & 0x7)
+ {
+ case 0x0:
+ {
+ if((insn.bits & 0xffffffff) == 0x77)
{
- #include "insns/fadd_s.h"
+ #include "insns/syscall.h"
break;
}
throw trap_illegal_instruction;
}
case 0x1:
{
- if((insn.bits & 0x1ffff) == 0x180d3)
+ if((insn.bits & 0xffffffff) == 0xf7)
{
- #include "insns/fmin_d.h"
+ #include "insns/break.h"
break;
}
- if((insn.bits & 0x3ff1ff) == 0xc0d3)
+ throw trap_illegal_instruction;
+ }
+ case 0x2:
+ {
+ if((insn.bits & 0xffffffff) == 0x177)
{
- #include "insns/fcvt_d_l.h"
+ #include "insns/stop.h"
break;
}
- if((insn.bits & 0x3fffff) == 0xe0d3)
+ throw trap_illegal_instruction;
+ }
+ case 0x3:
+ {
+ if((insn.bits & 0x7ffffff) == 0x1f7)
{
- #include "insns/fcvt_d_w.h"
+ #include "insns/utidx.h"
break;
}
- if((insn.bits & 0x3fffff) == 0x100d3)
+ throw trap_illegal_instruction;
+ }
+ default:
+ {
+ throw trap_illegal_instruction;
+ }
+ }
+ break;
+ }
+ case 0x78:
+ {
+ #include "insns/c_fsd.h"
+ break;
+ }
+ case 0x79:
+ {
+ switch((insn.bits >> 0x7) & 0x7)
+ {
+ case 0x0:
+ {
+ if((insn.bits & 0x1c1f) == 0x19)
{
- #include "insns/fcvt_d_s.h"
+ #include "insns/c_slli.h"
break;
}
- if((insn.bits & 0x1ffff) == 0x190d3)
+ if((insn.bits & 0x1c1f) == 0x819)
{
- #include "insns/fmax_d.h"
+ #include "insns/c_srli.h"
break;
}
- if((insn.bits & 0x7c1ffff) == 0x1c0d3)
+ if((insn.bits & 0x1c1f) == 0x1419)
{
- #include "insns/mftx_d.h"
+ #include "insns/c_srai32.h"
break;
}
- if((insn.bits & 0x1ffff) == 0x170d3)
+ if((insn.bits & 0x1c1f) == 0xc19)
{
- #include "insns/fle_d.h"
+ #include "insns/c_srli32.h"
break;
}
- if((insn.bits & 0x1ffff) == 0x160d3)
+ if((insn.bits & 0x1c1f) == 0x1819)
{
- #include "insns/flt_d.h"
+ #include "insns/c_slliw.h"
break;
}
- if((insn.bits & 0x1f1ff) == 0x20d3)
+ if((insn.bits & 0x1c1f) == 0x1019)
{
- #include "insns/fmul_d.h"
+ #include "insns/c_srai.h"
break;
}
- if((insn.bits & 0x1ffff) == 0x70d3)
+ if((insn.bits & 0x1c1f) == 0x419)
{
- #include "insns/fsgnjx_d.h"
+ #include "insns/c_slli32.h"
break;
}
- if((insn.bits & 0x1ffff) == 0x150d3)
+ throw trap_illegal_instruction;
+ }
+ case 0x1:
+ {
+ if((insn.bits & 0x1c1f) == 0x19)
{
- #include "insns/feq_d.h"
+ #include "insns/c_slli.h"
break;
}
- if((insn.bits & 0x3fffff) == 0xf0d3)
+ if((insn.bits & 0x1c1f) == 0x819)
{
- #include "insns/fcvt_d_wu.h"
+ #include "insns/c_srli.h"
break;
}
- if((insn.bits & 0x3ff1ff) == 0xb0d3)
+ if((insn.bits & 0x1c1f) == 0x1419)
{
- #include "insns/fcvt_wu_d.h"
+ #include "insns/c_srai32.h"
break;
}
- if((insn.bits & 0x1ffff) == 0x60d3)
+ if((insn.bits & 0x1c1f) == 0xc19)
{
- #include "insns/fsgnjn_d.h"
+ #include "insns/c_srli32.h"
break;
}
- if((insn.bits & 0x3ff1ff) == 0xd0d3)
+ if((insn.bits & 0x1c1f) == 0x1819)
{
- #include "insns/fcvt_d_lu.h"
+ #include "insns/c_slliw.h"
break;
}
- if((insn.bits & 0x3ff1ff) == 0xa0d3)
+ if((insn.bits & 0x1c1f) == 0x1019)
{
- #include "insns/fcvt_w_d.h"
+ #include "insns/c_srai.h"
break;
}
- if((insn.bits & 0x3fffff) == 0x1e0d3)
+ if((insn.bits & 0x1c1f) == 0x419)
{
- #include "insns/mxtf_d.h"
+ #include "insns/c_slli32.h"
break;
}
- if((insn.bits & 0x1ffff) == 0x50d3)
+ throw trap_illegal_instruction;
+ }
+ case 0x2:
+ {
+ if((insn.bits & 0x1c1f) == 0x19)
{
- #include "insns/fsgnj_d.h"
+ #include "insns/c_slli.h"
break;
}
- if((insn.bits & 0x3ff1ff) == 0x80d3)
+ if((insn.bits & 0x1c1f) == 0x819)
{
- #include "insns/fcvt_l_d.h"
+ #include "insns/c_srli.h"
break;
}
- if((insn.bits & 0x1f1ff) == 0xd3)
+ if((insn.bits & 0x1c1f) == 0x1419)
{
- #include "insns/fadd_d.h"
+ #include "insns/c_srai32.h"
break;
}
- if((insn.bits & 0x3ff1ff) == 0x90d3)
+ if((insn.bits & 0x1c1f) == 0xc19)
{
- #include "insns/fcvt_lu_d.h"
+ #include "insns/c_srli32.h"
break;
}
- if((insn.bits & 0x1f1ff) == 0x10d3)
+ if((insn.bits & 0x1c1f) == 0x1819)
{
- #include "insns/fsub_d.h"
+ #include "insns/c_slliw.h"
break;
}
- if((insn.bits & 0x3ff1ff) == 0x40d3)
+ if((insn.bits & 0x1c1f) == 0x1019)
{
- #include "insns/fsqrt_d.h"
+ #include "insns/c_srai.h"
break;
}
- if((insn.bits & 0x1f1ff) == 0x30d3)
+ if((insn.bits & 0x1c1f) == 0x419)
{
- #include "insns/fdiv_d.h"
+ #include "insns/c_slli32.h"
break;
}
throw trap_illegal_instruction;
}
- case 0x4:
+ case 0x3:
{
- if((insn.bits & 0x3ff1ff) == 0x9053)
+ if((insn.bits & 0x1c1f) == 0x19)
{
- #include "insns/fcvt_lu_s.h"
+ #include "insns/c_slli.h"
break;
}
- if((insn.bits & 0x3ff1ff) == 0x11053)
+ if((insn.bits & 0x1c1f) == 0x819)
{
- #include "insns/fcvt_s_d.h"
+ #include "insns/c_srli.h"
break;
}
- if((insn.bits & 0x3ff1ff) == 0xe053)
+ if((insn.bits & 0x1c1f) == 0x1419)
{
- #include "insns/fcvt_s_w.h"
+ #include "insns/c_srai32.h"
break;
}
- if((insn.bits & 0x3ff1ff) == 0x8053)
+ if((insn.bits & 0x1c1f) == 0xc19)
{
- #include "insns/fcvt_l_s.h"
+ #include "insns/c_srli32.h"
break;
}
- if((insn.bits & 0x1f1ff) == 0x3053)
+ if((insn.bits & 0x1c1f) == 0x1819)
{
- #include "insns/fdiv_s.h"
+ #include "insns/c_slliw.h"
break;
}
- if((insn.bits & 0x3ff1ff) == 0xd053)
+ if((insn.bits & 0x1c1f) == 0x1019)
{
- #include "insns/fcvt_s_lu.h"
+ #include "insns/c_srai.h"
break;
}
- if((insn.bits & 0x1f1ff) == 0x2053)
+ if((insn.bits & 0x1c1f) == 0x419)
{
- #include "insns/fmul_s.h"
+ #include "insns/c_slli32.h"
break;
}
- if((insn.bits & 0x3ff1ff) == 0xb053)
+ throw trap_illegal_instruction;
+ }
+ case 0x4:
+ {
+ if((insn.bits & 0x1c1f) == 0x19)
{
- #include "insns/fcvt_wu_s.h"
+ #include "insns/c_slli.h"
break;
}
- if((insn.bits & 0x3ff1ff) == 0xa053)
+ if((insn.bits & 0x1c1f) == 0x819)
{
- #include "insns/fcvt_w_s.h"
+ #include "insns/c_srli.h"
break;
}
- if((insn.bits & 0x1f1ff) == 0x1053)
+ if((insn.bits & 0x1c1f) == 0x1419)
{
- #include "insns/fsub_s.h"
+ #include "insns/c_srai32.h"
break;
}
- if((insn.bits & 0x3ff1ff) == 0xf053)
+ if((insn.bits & 0x1c1f) == 0xc19)
{
- #include "insns/fcvt_s_wu.h"
+ #include "insns/c_srli32.h"
break;
}
- if((insn.bits & 0x3ff1ff) == 0xc053)
+ if((insn.bits & 0x1c1f) == 0x1819)
{
- #include "insns/fcvt_s_l.h"
+ #include "insns/c_slliw.h"
break;
}
- if((insn.bits & 0x3ff1ff) == 0x4053)
+ if((insn.bits & 0x1c1f) == 0x1019)
{
- #include "insns/fsqrt_s.h"
+ #include "insns/c_srai.h"
break;
}
- if((insn.bits & 0x1f1ff) == 0x53)
+ if((insn.bits & 0x1c1f) == 0x419)
{
- #include "insns/fadd_s.h"
+ #include "insns/c_slli32.h"
break;
}
throw trap_illegal_instruction;
}
case 0x5:
{
- if((insn.bits & 0x3ff1ff) == 0xc0d3)
- {
- #include "insns/fcvt_d_l.h"
- break;
- }
- if((insn.bits & 0x1f1ff) == 0x20d3)
- {
- #include "insns/fmul_d.h"
- break;
- }
- if((insn.bits & 0x3ff1ff) == 0xb0d3)
- {
- #include "insns/fcvt_wu_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 & 0x3ff1ff) == 0x80d3)
- {
- #include "insns/fcvt_l_d.h"
- break;
- }
- if((insn.bits & 0x1f1ff) == 0xd3)
+ if((insn.bits & 0x1c1f) == 0x19)
{
- #include "insns/fadd_d.h"
+ #include "insns/c_slli.h"
break;
}
- if((insn.bits & 0x3ff1ff) == 0x90d3)
+ if((insn.bits & 0x1c1f) == 0x819)
{
- #include "insns/fcvt_lu_d.h"
+ #include "insns/c_srli.h"
break;
}
- if((insn.bits & 0x1f1ff) == 0x10d3)
+ if((insn.bits & 0x1c1f) == 0x1419)
{
- #include "insns/fsub_d.h"
+ #include "insns/c_srai32.h"
break;
}
- if((insn.bits & 0x3ff1ff) == 0x40d3)
+ if((insn.bits & 0x1c1f) == 0xc19)
{
- #include "insns/fsqrt_d.h"
+ #include "insns/c_srli32.h"
break;
}
- if((insn.bits & 0x1f1ff) == 0x30d3)
+ if((insn.bits & 0x1c1f) == 0x1819)
{
- #include "insns/fdiv_d.h"
+ #include "insns/c_slliw.h"
break;
}
- throw trap_illegal_instruction;
- }
- default:
- {
- throw trap_illegal_instruction;
- }
- }
- break;
- }
- case 0x60:
- {
- #include "insns/c_addi.h"
- break;
- }
- case 0x61:
- {
- #include "insns/c_li.h"
- break;
- }
- case 0x62:
- {
- switch((insn.bits >> 0x7) & 0x7)
- {
- case 0x0:
- {
- if((insn.bits & 0x801f) == 0x2)
+ if((insn.bits & 0x1c1f) == 0x1019)
{
- #include "insns/c_move.h"
+ #include "insns/c_srai.h"
break;
}
- if((insn.bits & 0x801f) == 0x8002)
+ if((insn.bits & 0x1c1f) == 0x419)
{
- #include "insns/c_j.h"
+ #include "insns/c_slli32.h"
break;
}
throw trap_illegal_instruction;
}
- case 0x1:
+ case 0x6:
{
- if((insn.bits & 0x801f) == 0x2)
+ if((insn.bits & 0x1c1f) == 0x19)
{
- #include "insns/c_move.h"
- break;
- }
- if((insn.bits & 0x801f) == 0x8002)
- {
- #include "insns/c_j.h"
+ #include "insns/c_slli.h"
break;
}
- throw trap_illegal_instruction;
- }
- case 0x2:
- {
- if((insn.bits & 0x801f) == 0x2)
+ if((insn.bits & 0x1c1f) == 0x819)
{
- #include "insns/c_move.h"
+ #include "insns/c_srli.h"
break;
}
- if((insn.bits & 0x801f) == 0x8002)
+ if((insn.bits & 0x1c1f) == 0x1419)
{
- #include "insns/c_j.h"
+ #include "insns/c_srai32.h"
break;
}
- throw trap_illegal_instruction;
- }
- case 0x3:
- {
- if((insn.bits & 0x801f) == 0x2)
+ if((insn.bits & 0x1c1f) == 0xc19)
{
- #include "insns/c_move.h"
+ #include "insns/c_srli32.h"
break;
}
- if((insn.bits & 0x801f) == 0x8002)
+ if((insn.bits & 0x1c1f) == 0x1819)
{
- #include "insns/c_j.h"
+ #include "insns/c_slliw.h"
break;
}
- throw trap_illegal_instruction;
- }
- case 0x4:
- {
- if((insn.bits & 0x801f) == 0x2)
+ if((insn.bits & 0x1c1f) == 0x1019)
{
- #include "insns/c_move.h"
+ #include "insns/c_srai.h"
break;
}
- if((insn.bits & 0x801f) == 0x8002)
+ if((insn.bits & 0x1c1f) == 0x419)
{
- #include "insns/c_j.h"
+ #include "insns/c_slli32.h"
break;
}
throw trap_illegal_instruction;
}
- case 0x5:
+ case 0x7:
{
- if((insn.bits & 0x801f) == 0x2)
+ if((insn.bits & 0x1c1f) == 0x19)
{
- #include "insns/c_move.h"
+ #include "insns/c_slli.h"
break;
}
- if((insn.bits & 0x801f) == 0x8002)
+ if((insn.bits & 0x1c1f) == 0x819)
{
- #include "insns/c_j.h"
+ #include "insns/c_srli.h"
break;
}
- throw trap_illegal_instruction;
- }
- case 0x6:
- {
- if((insn.bits & 0x801f) == 0x2)
+ if((insn.bits & 0x1c1f) == 0x1419)
{
- #include "insns/c_move.h"
+ #include "insns/c_srai32.h"
break;
}
- if((insn.bits & 0x801f) == 0x8002)
+ if((insn.bits & 0x1c1f) == 0xc19)
{
- #include "insns/c_j.h"
+ #include "insns/c_srli32.h"
break;
}
- throw trap_illegal_instruction;
- }
- case 0x7:
- {
- if((insn.bits & 0x801f) == 0x2)
+ if((insn.bits & 0x1c1f) == 0x1819)
{
- #include "insns/c_move.h"
+ #include "insns/c_slliw.h"
break;
}
- if((insn.bits & 0x801f) == 0x8002)
+ if((insn.bits & 0x1c1f) == 0x1019)
{
- #include "insns/c_j.h"
+ #include "insns/c_srai.h"
+ break;
+ }
+ if((insn.bits & 0x1c1f) == 0x419)
+ {
+ #include "insns/c_slli32.h"
break;
}
throw trap_illegal_instruction;
}
break;
}
- case 0x63:
- {
- switch((insn.bits >> 0x7) & 0x7)
- {
- case 0x0:
- {
- #include "insns/beq.h"
- break;
- }
- case 0x1:
- {
- #include "insns/bne.h"
- break;
- }
- case 0x4:
- {
- #include "insns/blt.h"
- break;
- }
- case 0x5:
- {
- #include "insns/bge.h"
- break;
- }
- case 0x6:
- {
- #include "insns/bltu.h"
- break;
- }
- case 0x7:
- {
- #include "insns/bgeu.h"
- break;
- }
- default:
- {
- throw trap_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:
+ case 0x7a:
{
switch((insn.bits >> 0x7) & 0x7)
{
case 0x0:
{
- #include "insns/jalr_c.h"
- break;
- }
- case 0x1:
- {
- #include "insns/jalr_r.h"
- break;
- }
- case 0x2:
- {
- #include "insns/jalr_j.h"
- break;
- }
- case 0x4:
- {
- if((insn.bits & 0x7ffffff) == 0x26b)
+ if((insn.bits & 0x801f) == 0x1a)
{
- #include "insns/rdnpc.h"
+ #include "insns/c_add.h"
+ break;
+ }
+ if((insn.bits & 0x801f) == 0x801a)
+ {
+ #include "insns/c_sub.h"
break;
}
throw trap_illegal_instruction;
}
- default:
- {
- throw trap_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 0x73:
- {
- switch((insn.bits >> 0x7) & 0x7)
- {
- case 0x0:
- {
- #include "insns/vcfgivl.h"
- break;
- }
case 0x1:
{
- if((insn.bits & 0x3fffff) == 0xf3)
+ if((insn.bits & 0x801f) == 0x1a)
{
- #include "insns/setvl.h"
+ #include "insns/c_add.h"
+ break;
+ }
+ if((insn.bits & 0x801f) == 0x801a)
+ {
+ #include "insns/c_sub.h"
break;
}
throw trap_illegal_instruction;
}
case 0x2:
{
- if((insn.bits & 0xf80003ff) == 0x173)
+ if((insn.bits & 0x801f) == 0x1a)
{
- #include "insns/vf.h"
+ #include "insns/c_add.h"
+ break;
+ }
+ if((insn.bits & 0x801f) == 0x801a)
+ {
+ #include "insns/c_sub.h"
break;
}
throw trap_illegal_instruction;
}
- default:
+ case 0x3:
{
+ if((insn.bits & 0x801f) == 0x1a)
+ {
+ #include "insns/c_add.h"
+ break;
+ }
+ if((insn.bits & 0x801f) == 0x801a)
+ {
+ #include "insns/c_sub.h"
+ break;
+ }
throw trap_illegal_instruction;
}
- }
- break;
- }
- case 0x77:
- {
- switch((insn.bits >> 0x7) & 0x7)
- {
- case 0x0:
+ case 0x4:
{
- if((insn.bits & 0xffffffff) == 0x77)
+ if((insn.bits & 0x801f) == 0x1a)
{
- #include "insns/syscall.h"
+ #include "insns/c_add.h"
+ break;
+ }
+ if((insn.bits & 0x801f) == 0x801a)
+ {
+ #include "insns/c_sub.h"
break;
}
throw trap_illegal_instruction;
}
- case 0x1:
+ case 0x5:
{
- if((insn.bits & 0xffffffff) == 0xf7)
+ if((insn.bits & 0x801f) == 0x1a)
{
- #include "insns/break.h"
+ #include "insns/c_add.h"
+ break;
+ }
+ if((insn.bits & 0x801f) == 0x801a)
+ {
+ #include "insns/c_sub.h"
break;
}
throw trap_illegal_instruction;
}
- case 0x2:
+ case 0x6:
{
- if((insn.bits & 0xffffffff) == 0x177)
+ if((insn.bits & 0x801f) == 0x1a)
{
- #include "insns/stop.h"
+ #include "insns/c_add.h"
+ break;
+ }
+ if((insn.bits & 0x801f) == 0x801a)
+ {
+ #include "insns/c_sub.h"
break;
}
throw trap_illegal_instruction;
}
- case 0x3:
+ case 0x7:
{
- if((insn.bits & 0x7ffffff) == 0x1f7)
+ if((insn.bits & 0x801f) == 0x1a)
{
- #include "insns/utidx.h"
+ #include "insns/c_add.h"
+ break;
+ }
+ if((insn.bits & 0x801f) == 0x801a)
+ {
+ #include "insns/c_sub.h"
break;
}
throw trap_illegal_instruction;
}
break;
}
+ case 0x7c:
+ {
+ switch((insn.bits >> 0x7) & 0x7)
+ {
+ case 0x0:
+ {
+ #include "insns/c_add3.h"
+ break;
+ }
+ case 0x1:
+ {
+ #include "insns/c_add3.h"
+ break;
+ }
+ case 0x2:
+ {
+ #include "insns/c_sub3.h"
+ break;
+ }
+ case 0x3:
+ {
+ #include "insns/c_sub3.h"
+ break;
+ }
+ case 0x4:
+ {
+ #include "insns/c_or3.h"
+ break;
+ }
+ case 0x5:
+ {
+ #include "insns/c_or3.h"
+ break;
+ }
+ case 0x6:
+ {
+ #include "insns/c_and3.h"
+ break;
+ }
+ case 0x7:
+ {
+ #include "insns/c_and3.h"
+ break;
+ }
+ default:
+ {
+ throw trap_illegal_instruction;
+ }
+ }
+ break;
+ }
default:
{
throw trap_illegal_instruction;