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

index 4f156f61fbe3dc22b9565225ee7dcf5bfc57fdea..ded03db048d71932a102a90fd5d02979ba4915d4 100644 (file)
@@ -5,5 +5,5 @@ if (xlen == 32) {
   WRITE_REG(X_RA, tmp);
 } else { // c.addiw
   require(insn.rvc_rd() != 0);
-  WRITE_RD(sext32(RVC_RS1 + insn.rvc_imm()));
+  WRITE_RD(sext32(rv_add(RVC_RS1, insn.rvc_imm())));
 }