diff options
author | Andrew Waterman <andrew@sifive.com> | 2022-03-15 20:36:52 -0700 |
---|---|---|
committer | Andrew Waterman <andrew@sifive.com> | 2022-03-15 20:38:24 -0700 |
commit | c7745501d92df74171abb0718711581379693e5e (patch) | |
tree | e75196272aee657c41d7e790fec771df58ec8fa0 /riscv/csrs.h | |
parent | e218b2f4d767edb63d107b7cd5cf3dff070d2e8b (diff) | |
download | spike-c7745501d92df74171abb0718711581379693e5e.zip spike-c7745501d92df74171abb0718711581379693e5e.tar.gz spike-c7745501d92df74171abb0718711581379693e5e.tar.bz2 |
Allow mstatus_csr_t::read() to be inlined
Diffstat (limited to 'riscv/csrs.h')
-rw-r--r-- | riscv/csrs.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/riscv/csrs.h b/riscv/csrs.h index 731ab55..350225d 100644 --- a/riscv/csrs.h +++ b/riscv/csrs.h @@ -219,10 +219,14 @@ class vsstatus_csr_t final: public base_status_csr_t { typedef std::shared_ptr<vsstatus_csr_t> vsstatus_csr_t_p; -class mstatus_csr_t: public base_status_csr_t { +class mstatus_csr_t final: public base_status_csr_t { public: mstatus_csr_t(processor_t* const proc, const reg_t addr); - virtual reg_t read() const noexcept override; + + reg_t read() const noexcept override { + return val; + } + protected: virtual bool unlogged_write(const reg_t val) noexcept override; private: |