diff options
| author | Prashanth Mundkur | 2018-05-02 11:22:56 -0700 |
|---|---|---|
| committer | Prashanth Mundkur | 2018-05-02 11:22:56 -0700 |
| commit | 47b02bcbf94c24f258cb7d5c67c11d020352b34c (patch) | |
| tree | 25f826866f0338bcfd6a916f4db78fabdf2831da /riscv | |
| parent | 82ea1539578e6100d9ed5149ab7747d31955688b (diff) | |
Fix printing of csr immediates.
Diffstat (limited to 'riscv')
| -rw-r--r-- | riscv/riscv.sail | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/riscv/riscv.sail b/riscv/riscv.sail index 9c61e65f..d409481e 100644 --- a/riscv/riscv.sail +++ b/riscv/riscv.sail @@ -847,7 +847,8 @@ function clause print_insn (CSR(csr, rs1, rd, is_imm, op)) = (CSRRC, true) => "csrrci ", (CSRRC, false) => "csrrc " } in - insn ^ rd ^ ", " ^ rs1 ^ ", " ^ csr_name(csr) + let rs1_str : string = if is_imm then BitStr(rs1) else reg_name_abi(rs1) in + insn ^ rd ^ ", " ^ rs1_str ^ ", " ^ csr_name(csr) /* ****************************************************************** */ union clause ast = NOP : unit |
