c_jalr
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Thu, 18 Oct 2018 22:17:49 +0000 (23:17 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Thu, 18 Oct 2018 22:17:49 +0000 (23:17 +0100)
riscv/insns/c_jalr.h

index cb1e4222dcd38829bb65f1c0e8e2073ecdb3c47c..5ee9e10fa2f5d2cd44f61c9ef6a16e34e006f17c 100644 (file)
@@ -1,5 +1,5 @@
 require_extension('C');
 require(insn.rvc_rs1() != 0);
 reg_t tmp = npc;
-set_pc(RVC_RS1 & ~reg_t(1));
+set_pc(rv_and(RVC_RS1, sv_reg_t(~reg_t(1))));
 WRITE_REG(X_RA, tmp);