From: Andrew Waterman Date: Thu, 25 Jul 2013 23:13:08 +0000 (-0700) Subject: Remove JALR static hints X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d237ebbd5c7a68443ec94c0127e98071b59399b0;p=riscv-isa-sim.git Remove JALR static hints --- diff --git a/riscv/disasm.cc b/riscv/disasm.cc index 27af927..ca3b3dd 100644 --- a/riscv/disasm.cc +++ b/riscv/disasm.cc @@ -504,12 +504,10 @@ disassembler::disassembler() DEFINE_LTYPE(lui); DEFINE_LTYPE(auipc); - DEFINE_I2TYPE("jr", jalr_j); - add_insn(new disasm_insn_t("jalr", match_jalr_c | match_rd_ra, mask_jalr_c | mask_rd | mask_imm, xrs1_reg)); - add_insn(new disasm_insn_t("ret", match_jalr_r | match_rs1_ra, mask_jalr_r | mask_rd | mask_rs1 | mask_imm)); - DEFINE_ITYPE(jalr_c); - DEFINE_ITYPE(jalr_r); - DEFINE_ITYPE(jalr_j); + DEFINE_I2TYPE("jr", jalr); + add_insn(new disasm_insn_t("jalr", match_jalr | match_rd_ra, mask_jalr | mask_rd | mask_imm, xrs1_reg)); + add_insn(new disasm_insn_t("ret", match_jalr | match_rs1_ra, mask_jalr | mask_rd | mask_rs1 | mask_imm)); + DEFINE_ITYPE(jalr); add_insn(new disasm_insn_t("nop", match_addi, mask_addi | mask_rd | mask_rs1 | mask_imm)); DEFINE_I0TYPE("li", addi); @@ -572,7 +570,6 @@ disassembler::disassembler() add_insn(new disasm_insn_t("setpcr", match_setpcr, mask_setpcr, xrd_reg, pcr_reg, imm)); add_insn(new disasm_insn_t("clearpcr", match_clearpcr, mask_clearpcr, xrd_reg, pcr_reg, imm)); DEFINE_NOARG(eret) - DEFINE_NOARG(cflush) DEFINE_RS1(vxcptsave); DEFINE_RS1(vxcptrestore); diff --git a/riscv/insns/jalr.h b/riscv/insns/jalr.h new file mode 100644 index 0000000..91be911 --- /dev/null +++ b/riscv/insns/jalr.h @@ -0,0 +1,3 @@ +reg_t temp = RS1; +RD = npc; +set_pc(temp + SIMM); diff --git a/riscv/insns/jalr_c.h b/riscv/insns/jalr_c.h deleted file mode 100644 index 91be911..0000000 --- a/riscv/insns/jalr_c.h +++ /dev/null @@ -1,3 +0,0 @@ -reg_t temp = RS1; -RD = npc; -set_pc(temp + SIMM); diff --git a/riscv/insns/jalr_j.h b/riscv/insns/jalr_j.h deleted file mode 100644 index 0d2ef12..0000000 --- a/riscv/insns/jalr_j.h +++ /dev/null @@ -1 +0,0 @@ -#include "insns/jalr_c.h" diff --git a/riscv/insns/jalr_r.h b/riscv/insns/jalr_r.h deleted file mode 100644 index 0d2ef12..0000000 --- a/riscv/insns/jalr_r.h +++ /dev/null @@ -1 +0,0 @@ -#include "insns/jalr_c.h" diff --git a/riscv/opcodes.h b/riscv/opcodes.h index ab33192..aaf8e67 100644 --- a/riscv/opcodes.h +++ b/riscv/opcodes.h @@ -4,7 +4,6 @@ DECLARE_INSN(remuw, 0x7bb, 0x1ffff) DECLARE_INSN(fmin_d, 0x180d3, 0x1ffff) DECLARE_INSN(lr_w, 0x1012b, 0x3fffff) DECLARE_INSN(vlsthu, 0x128b, 0x1ffff) -DECLARE_INSN(c_swsp, 0x8, 0x1f) DECLARE_INSN(bltu, 0x363, 0x3ff) DECLARE_INSN(vlsegstwu, 0xb0b, 0xfff) DECLARE_INSN(vvcfg, 0x473, 0xf801ffff) @@ -41,7 +40,6 @@ DECLARE_INSN(stop, 0x177, 0xffffffff) DECLARE_INSN(vld, 0x18b, 0x3fffff) DECLARE_INSN(c_slli, 0x19, 0x1c1f) DECLARE_INSN(break, 0xf7, 0xffffffff) -DECLARE_INSN(cflush, 0x2fb, 0xffffffff) DECLARE_INSN(fcvt_s_w, 0xe053, 0x3ff1ff) DECLARE_INSN(vflstw, 0x150b, 0x1ffff) DECLARE_INSN(mul, 0x433, 0x1ffff) @@ -51,7 +49,7 @@ DECLARE_INSN(vlw, 0x10b, 0x3fffff) DECLARE_INSN(vssegstw, 0x90f, 0xfff) DECLARE_INSN(amominu_d, 0x19ab, 0x1ffff) DECLARE_INSN(c_sdsp, 0x6, 0x1f) -DECLARE_INSN(utidx, 0x1f7, 0x7ffffff) +DECLARE_INSN(mftx_d, 0x1c0d3, 0x3fffff) DECLARE_INSN(srli, 0x293, 0x3f03ff) DECLARE_INSN(c_srli, 0x819, 0x1c1f) DECLARE_INSN(c_ldsp, 0x4, 0x1f) @@ -63,7 +61,7 @@ DECLARE_INSN(mulw, 0x43b, 0x1ffff) DECLARE_INSN(vssegstd, 0x98f, 0xfff) DECLARE_INSN(srlw, 0x2bb, 0x1ffff) DECLARE_INSN(vssegstb, 0x80f, 0xfff) -DECLARE_INSN(mftx_d, 0x1c0d3, 0x3fffff) +DECLARE_INSN(utidx, 0x1f7, 0x7ffffff) DECLARE_INSN(div, 0x633, 0x1ffff) DECLARE_INSN(vtcfg, 0xc73, 0xf801ffff) DECLARE_INSN(mftx_s, 0x1c053, 0x3fffff) @@ -122,6 +120,7 @@ DECLARE_INSN(fsgnjx_d, 0x70d3, 0x1ffff) DECLARE_INSN(sra, 0x102b3, 0x1ffff) DECLARE_INSN(c_lwsp, 0x5, 0x1f) DECLARE_INSN(bge, 0x2e3, 0x3ff) +DECLARE_INSN(venqimm2, 0x337b, 0xf801ffff) DECLARE_INSN(c_add3, 0x1c, 0x31f) DECLARE_INSN(sraiw, 0x1029b, 0x3f83ff) DECLARE_INSN(vssegd, 0x218f, 0x1ffff) @@ -132,7 +131,7 @@ DECLARE_INSN(vfmts, 0x1973, 0x1ffff) DECLARE_INSN(venqimm1, 0x2f7b, 0xf801ffff) DECLARE_INSN(fsgnjx_s, 0x7053, 0x1ffff) DECLARE_INSN(vfmsv, 0x973, 0x3fffff) -DECLARE_INSN(venqimm2, 0x337b, 0xf801ffff) +DECLARE_INSN(feq_d, 0x150d3, 0x1ffff) DECLARE_INSN(fcvt_d_wu, 0xf0d3, 0x3ff1ff) DECLARE_INSN(vxcptrestore, 0x77b, 0xf83fffff) DECLARE_INSN(vmts, 0x1873, 0x1ffff) @@ -140,16 +139,15 @@ DECLARE_INSN(or, 0x333, 0x1ffff) DECLARE_INSN(rdinstret, 0xa77, 0x7ffffff) DECLARE_INSN(fcvt_wu_d, 0xb0d3, 0x3ff1ff) DECLARE_INSN(subw, 0x1003b, 0x1ffff) -DECLARE_INSN(jalr_c, 0x6b, 0x3ff) +DECLARE_INSN(c_swsp, 0x8, 0x1f) DECLARE_INSN(fmax_s, 0x19053, 0x1ffff) DECLARE_INSN(amomaxu_d, 0x1dab, 0x1ffff) DECLARE_INSN(c_slliw, 0x1819, 0x1c1f) -DECLARE_INSN(jalr_j, 0x16b, 0x3ff) DECLARE_INSN(c_fld, 0x15, 0x1f) DECLARE_INSN(vlstw, 0x110b, 0x1ffff) DECLARE_INSN(vlsth, 0x108b, 0x1ffff) DECLARE_INSN(xori, 0x213, 0x3ff) -DECLARE_INSN(jalr_r, 0xeb, 0x3ff) +DECLARE_INSN(fdiv_d, 0x30d3, 0x1f1ff) DECLARE_INSN(amomaxu_w, 0x1d2b, 0x1ffff) DECLARE_INSN(fcvt_wu_s, 0xb053, 0x3ff1ff) DECLARE_INSN(vlstb, 0x100b, 0x1ffff) @@ -167,13 +165,12 @@ DECLARE_INSN(vlsegstbu, 0xa0b, 0xfff) DECLARE_INSN(c_beq, 0x10, 0x1f) DECLARE_INSN(vlhu, 0x28b, 0x3fffff) DECLARE_INSN(vfsstd, 0x158f, 0x1ffff) -DECLARE_INSN(c_bne, 0x11, 0x1f) DECLARE_INSN(fnmadd_d, 0xcf, 0x1ff) DECLARE_INSN(amoadd_d, 0x1ab, 0x1ffff) DECLARE_INSN(c_sw, 0xd, 0x1f) DECLARE_INSN(lr_d, 0x101ab, 0x3fffff) DECLARE_INSN(c_move, 0x2, 0x801f) -DECLARE_INSN(fmovn, 0xef7, 0x1ffff) +DECLARE_INSN(fcvt_w_s, 0xa053, 0x3ff1ff) DECLARE_INSN(c_fsw, 0x16, 0x1f) DECLARE_INSN(c_j, 0x8002, 0x801f) DECLARE_INSN(mulhsu, 0x533, 0x1ffff) @@ -184,7 +181,6 @@ DECLARE_INSN(amomax_d, 0x15ab, 0x1ffff) DECLARE_INSN(fsd, 0x1a7, 0x3ff) DECLARE_INSN(fcvt_w_d, 0xa0d3, 0x3ff1ff) DECLARE_INSN(fmovz, 0xaf7, 0x1ffff) -DECLARE_INSN(feq_d, 0x150d3, 0x1ffff) DECLARE_INSN(c_or3, 0x21c, 0x31f) DECLARE_INSN(vmvv, 0x73, 0x3fffff) DECLARE_INSN(vfssegstw, 0xd0f, 0xfff) @@ -243,7 +239,7 @@ DECLARE_INSN(fcvt_lu_d, 0x90d3, 0x3ff1ff) DECLARE_INSN(vfld, 0x58b, 0x3fffff) DECLARE_INSN(sc_d, 0x105ab, 0x1ffff) DECLARE_INSN(fmadd_s, 0x43, 0x1ff) -DECLARE_INSN(fcvt_w_s, 0xa053, 0x3ff1ff) +DECLARE_INSN(fmovn, 0xef7, 0x1ffff) DECLARE_INSN(vssegh, 0x208f, 0x1ffff) DECLARE_INSN(fsqrt_s, 0x4053, 0x3ff1ff) DECLARE_INSN(vxcptkill, 0xb7b, 0xffffffff) @@ -256,13 +252,14 @@ DECLARE_INSN(vfsw, 0x50f, 0x3fffff) DECLARE_INSN(amoswap_d, 0x5ab, 0x1ffff) DECLARE_INSN(fsqrt_d, 0x40d3, 0x3ff1ff) DECLARE_INSN(vflw, 0x50b, 0x3fffff) -DECLARE_INSN(fdiv_d, 0x30d3, 0x1f1ff) +DECLARE_INSN(c_bne, 0x11, 0x1f) DECLARE_INSN(fmadd_d, 0xc3, 0x1ff) DECLARE_INSN(divw, 0x63b, 0x1ffff) DECLARE_INSN(amomin_d, 0x11ab, 0x1ffff) DECLARE_INSN(divu, 0x6b3, 0x1ffff) DECLARE_INSN(amoswap_w, 0x52b, 0x1ffff) DECLARE_INSN(vfsd, 0x58f, 0x3fffff) +DECLARE_INSN(jalr, 0x6b, 0x3ff) DECLARE_INSN(fadd_s, 0x53, 0x1f1ff) DECLARE_INSN(vlsegb, 0x200b, 0x1ffff) DECLARE_INSN(fcvt_l_d, 0x80d3, 0x3ff1ff)