From: Andrew Waterman Date: Thu, 21 May 2015 18:55:52 +0000 (-0700) Subject: Fix c.slliw implementation X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6025b02665744b71d442912a9895b917cff8590f;p=riscv-isa-sim.git Fix c.slliw implementation --- diff --git a/riscv/insns/c_slliw.h b/riscv/insns/c_slliw.h index b2d87ef..87a5901 100644 --- a/riscv/insns/c_slliw.h +++ b/riscv/insns/c_slliw.h @@ -1,3 +1,5 @@ require_extension('C'); require_rv64; -WRITE_RD(sext_xlen(RVC_RS1 << insn.rvc_imm())); +require(insn.rvc_rd() != 0); +require(insn.rvc_imm() < 32); +WRITE_RD(sext32(RVC_RS1 << insn.rvc_imm()));