Skip to content

Commit

Permalink
Fix incorrect assembly for c.j immediate
Browse files Browse the repository at this point in the history
Fix the assembly error mentioned in #537 - the immediate is in units of 2 bytes, not bytes.
  • Loading branch information
KotorinMinami committed Sep 24, 2024
1 parent b3ca3a8 commit 07a5036
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion model/riscv_insts_zca.sail
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ function clause execute (C_J(imm)) =
execute(RISCV_JAL(sign_extend(imm @ 0b0), zreg))

mapping clause assembly = C_J(imm)
<-> "c.j" ^ spc() ^ hex_bits_signed_11(imm)
<-> "c.j" ^ spc() ^ hex_bits_signed_12(imm @ 0b0)

/* ****************************************************************** */
union clause ast = C_BEQZ : (bits(8), cregidx)
Expand Down

0 comments on commit 07a5036

Please sign in to comment.