diff options
author | Weiwei Li <liweiwei@iscas.ac.cn> | 2022-07-06 10:52:15 +0800 |
---|---|---|
committer | Weiwei Li <liweiwei@iscas.ac.cn> | 2022-07-09 08:56:02 +0800 |
commit | 10fefa1542756a7f7caf45670a64d965a995153a (patch) | |
tree | c7c86c65fbd2e7bcf7778e6561578de9c4dc2e85 /riscv/csrs.h | |
parent | 11dacaedc4b55ac1d79f1152a549ab9bfb170d2d (diff) | |
download | spike-10fefa1542756a7f7caf45670a64d965a995153a.zip spike-10fefa1542756a7f7caf45670a64d965a995153a.tar.gz spike-10fefa1542756a7f7caf45670a64d965a995153a.tar.bz2 |
add smstateen check for fcsr, senvcfg, henvcfg
Diffstat (limited to 'riscv/csrs.h')
-rw-r--r-- | riscv/csrs.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/riscv/csrs.h b/riscv/csrs.h index 2b8a2fb..bde31da 100644 --- a/riscv/csrs.h +++ b/riscv/csrs.h @@ -439,6 +439,8 @@ class henvcfg_csr_t final: public masked_csr_t { return (menvcfg->read() | ~MENVCFG_PBMTE) & masked_csr_t::read(); } + virtual void verify_permissions(insn_t insn, bool write) const override; + private: csr_t_p menvcfg; }; @@ -699,11 +701,13 @@ class sstateen_csr_t: public hstateen_csr_t { class fcsr_csr_t: public composite_csr_t { public: fcsr_csr_t(processor_t* const proc, const reg_t addr, csr_t_p upper_csr, csr_t_p lower_csr, const unsigned upper_lsb); + virtual void verify_permissions(insn_t insn, bool write) const override; }; class senvcfg_csr_t final: public masked_csr_t { public: senvcfg_csr_t(processor_t* const proc, const reg_t addr, const reg_t mask, const reg_t init); + virtual void verify_permissions(insn_t insn, bool write) const override; }; #endif |