aboutsummaryrefslogtreecommitdiff
path: root/riscv/csrs.h
diff options
context:
space:
mode:
authorScott Johnson <scott.johnson@arilinc.com>2021-11-13 08:54:24 -0800
committerScott Johnson <scott.johnson@arilinc.com>2021-11-13 08:54:24 -0800
commitd3d526b85341b810e1a8be846f8437c3afd5fafe (patch)
treec006e53d1e5b5aa3585249422ab11e850c4f2a28 /riscv/csrs.h
parent37807bca031e173436464f5b9aa3967709906e5b (diff)
downloadspike-d3d526b85341b810e1a8be846f8437c3afd5fafe.zip
spike-d3d526b85341b810e1a8be846f8437c3afd5fafe.tar.gz
spike-d3d526b85341b810e1a8be846f8437c3afd5fafe.tar.bz2
Mask hideleg by mideleg
According to spec clarification: https://github.com/riscv/riscv-isa-manual/pull/771 This has no functional effect today, because all the active bits of hideleg are tied to 1 inside mideleg.
Diffstat (limited to 'riscv/csrs.h')
-rw-r--r--riscv/csrs.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/riscv/csrs.h b/riscv/csrs.h
index cf63d4d..6e218db 100644
--- a/riscv/csrs.h
+++ b/riscv/csrs.h
@@ -511,6 +511,15 @@ class hypervisor_csr_t: public basic_csr_t {
};
+class hideleg_csr_t: public masked_csr_t {
+ public:
+ hideleg_csr_t(processor_t* const proc, const reg_t addr, csr_t_p mideleg);
+ virtual reg_t read() const noexcept override;
+ private:
+ csr_t_p mideleg;
+};
+
+
class hgatp_csr_t: public basic_csr_t {
public:
hgatp_csr_t(processor_t* const proc, const reg_t addr);