diff options
author | James Clarke <jrtc27@jrtc27.com> | 2019-05-10 16:37:18 +0100 |
---|---|---|
committer | James Clarke <jrtc27@jrtc27.com> | 2019-05-10 16:37:18 +0100 |
commit | 4be9ddcc001db052093915515bd9d1ccab86d9cf (patch) | |
tree | 4eb11145af5d6bdab36789c8efdd96ec86695fd3 | |
parent | ac2d819ad9f7fa42dcd8a3b36f45329a809b4414 (diff) | |
download | sail-riscv-4be9ddcc001db052093915515bd9d1ccab86d9cf.zip sail-riscv-4be9ddcc001db052093915515bd9d1ccab86d9cf.tar.gz sail-riscv-4be9ddcc001db052093915515bd9d1ccab86d9cf.tar.bz2 |
Print canonical assembly for immediate loads/stores
-rw-r--r-- | model/riscv_insts_base.sail | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/model/riscv_insts_base.sail b/model/riscv_insts_base.sail index 7ac4294..6bb3050 100644 --- a/model/riscv_insts_base.sail +++ b/model/riscv_insts_base.sail @@ -358,7 +358,7 @@ mapping maybe_u = { } mapping clause assembly = LOAD(imm, rs1, rd, is_unsigned, size, aq, rl) - <-> "l" ^ size_mnemonic(size) ^ maybe_u(is_unsigned) ^ maybe_aq(aq) ^ maybe_rl(rl) ^ spc() ^ reg_name(rd) ^ sep() ^ reg_name(rs1) ^ sep() ^ hex_bits_12(imm) + <-> "l" ^ size_mnemonic(size) ^ maybe_u(is_unsigned) ^ maybe_aq(aq) ^ maybe_rl(rl) ^ spc() ^ reg_name(rd) ^ sep() ^ hex_bits_12(imm) ^ opt_spc() ^ "(" ^ opt_spc() ^ reg_name(rs1) ^ opt_spc() ^ ")" /* ****************************************************************** */ union clause ast = STORE : (bits(12), regbits, regbits, word_width, bool, bool) @@ -408,8 +408,8 @@ function clause execute (STORE(imm, rs2, rs1, width, aq, rl)) = { } } -mapping clause assembly = STORE(imm, rs1, rd, size, aq, rl) - <-> "s" ^ size_mnemonic(size) ^ maybe_aq(aq) ^ maybe_rl(rl) ^ spc() ^ reg_name(rd) ^ sep() ^ reg_name(rs1) ^ sep() ^ hex_bits_12(imm) +mapping clause assembly = STORE(imm, rs2, rs1, size, aq, rl) + <-> "s" ^ size_mnemonic(size) ^ maybe_aq(aq) ^ maybe_rl(rl) ^ spc() ^ reg_name(rs2) ^ sep() ^ hex_bits_12(imm) ^ opt_spc() ^ "(" ^ opt_spc() ^ reg_name(rs1) ^ opt_spc() ^ ")" /* ****************************************************************** */ union clause ast = ADDIW : (bits(12), regbits, regbits) |