aboutsummaryrefslogtreecommitdiff
path: root/riscv/csrs.h
diff options
context:
space:
mode:
authorScott Johnson <scott.johnson@arilinc.com>2021-03-24 17:35:20 -0700
committerAndrew Waterman <aswaterman@gmail.com>2021-09-08 07:59:02 -0700
commit4429ddb687ea6aacc0329f32f3fe0adf7156acf0 (patch)
tree7a362b032288530f4793ea4de862e32c9df5d06d /riscv/csrs.h
parentba6f0dc65c14780683f2248274a3395dc7df02fa (diff)
downloadspike-4429ddb687ea6aacc0329f32f3fe0adf7156acf0.zip
spike-4429ddb687ea6aacc0329f32f3fe0adf7156acf0.tar.gz
spike-4429ddb687ea6aacc0329f32f3fe0adf7156acf0.tar.bz2
Declare mip/mie to use customized classes
Because I plan to make these two have slightly different APIs next.
Diffstat (limited to 'riscv/csrs.h')
-rw-r--r--riscv/csrs.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/riscv/csrs.h b/riscv/csrs.h
index 0f69f2a..8b9e5cc 100644
--- a/riscv/csrs.h
+++ b/riscv/csrs.h
@@ -277,8 +277,6 @@ class mip_or_mie_csr_t: public logged_csr_t {
reg_t val;
};
-typedef std::shared_ptr<mip_or_mie_csr_t> mip_or_mie_csr_t_p;
-
class mip_csr_t: public mip_or_mie_csr_t {
public:
@@ -287,6 +285,9 @@ class mip_csr_t: public mip_or_mie_csr_t {
virtual reg_t write_mask() const noexcept override;
};
+typedef std::shared_ptr<mip_csr_t> mip_csr_t_p;
+
+
class mie_csr_t: public mip_or_mie_csr_t {
public:
mie_csr_t(processor_t* const proc, const reg_t addr);
@@ -294,6 +295,8 @@ class mie_csr_t: public mip_or_mie_csr_t {
virtual reg_t write_mask() const noexcept override;
};
+typedef std::shared_ptr<mie_csr_t> mie_csr_t_p;
+
// For sip, hip, hvip, vsip, sie, hie, vsie which are all just (masked
// & shifted) views into mip or mie. Each pair will have one of these