Fix c.slliw implementation
authorAndrew Waterman <waterman@cs.berkeley.edu>
Thu, 21 May 2015 18:55:52 +0000 (11:55 -0700)
committerAndrew Waterman <waterman@cs.berkeley.edu>
Mon, 1 Jun 2015 01:29:45 +0000 (18:29 -0700)
riscv/insns/c_slliw.h

index b2d87efd5a66240293aa3834e616a5c1cfdc12a4..87a59010a78d259a163ef0d5a509bdb9b5de12f2 100644 (file)
@@ -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()));