From 6025b02665744b71d442912a9895b917cff8590f Mon Sep 17 00:00:00 2001 From: Andrew Waterman Date: Thu, 21 May 2015 11:55:52 -0700 Subject: [PATCH] Fix c.slliw implementation --- riscv/insns/c_slliw.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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())); -- 2.30.2