aboutsummaryrefslogtreecommitdiff
path: root/riscv/decode.h
diff options
context:
space:
mode:
authorAndrew Waterman <aswaterman@gmail.com>2017-10-20 00:07:22 -0400
committerGitHub <noreply@github.com>2017-10-20 00:07:22 -0400
commit3b1e9ab7522b3b20cde6bd8d9f2b28222463cf1b (patch)
treeef2b35a79832b1514592dee71db60f0f406f81c0 /riscv/decode.h
parent38438778f0fc34df8cdf748cc9f35e1d15e0c8db (diff)
downloadspike-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.h4
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