diff options
author | Andrew Waterman <aswaterman@gmail.com> | 2017-10-20 00:07:22 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-20 00:07:22 -0400 |
commit | 3b1e9ab7522b3b20cde6bd8d9f2b28222463cf1b (patch) | |
tree | ef2b35a79832b1514592dee71db60f0f406f81c0 /riscv/decode.h | |
parent | 38438778f0fc34df8cdf748cc9f35e1d15e0c8db (diff) | |
download | spike-3b1e9ab7522b3b20cde6bd8d9f2b28222463cf1b.zip spike-3b1e9ab7522b3b20cde6bd8d9f2b28222463cf1b.tar.gz spike-3b1e9ab7522b3b20cde6bd8d9f2b28222463cf1b.tar.bz2 |
Fix commit-log for Q extension, and for RV32 (#143)
* Fix commit-log for Q extension, and for RV32
The number of nibbles printed out now depends upon XLEN or FLEN,
as appropriate.
* Factor out FLEN calculation
Diffstat (limited to 'riscv/decode.h')
-rw-r--r-- | riscv/decode.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/riscv/decode.h b/riscv/decode.h index 45dd3c4..7f5effc 100644 --- a/riscv/decode.h +++ b/riscv/decode.h @@ -139,12 +139,12 @@ private: #else # define WRITE_REG(reg, value) ({ \ reg_t wdata = (value); /* value may have side effects */ \ - STATE.log_reg_write = (commit_log_reg_t){(reg) << 1, wdata}; \ + STATE.log_reg_write = (commit_log_reg_t){(reg) << 1, {wdata, 0}}; \ STATE.XPR.write(reg, wdata); \ }) # define WRITE_FREG(reg, value) ({ \ freg_t wdata = freg(value); /* value may have side effects */ \ - STATE.log_reg_write = (commit_log_reg_t){((reg) << 1) | 1, wdata.v}; \ + STATE.log_reg_write = (commit_log_reg_t){((reg) << 1) | 1, wdata}; \ DO_WRITE_FREG(reg, wdata); \ }) #endif |