diff options
author | Andrew Waterman <andrew@sifive.com> | 2020-02-28 12:50:16 -0800 |
---|---|---|
committer | Andrew Waterman <andrew@sifive.com> | 2020-02-28 12:50:16 -0800 |
commit | fe24c46547f98576e74d3cabd5548a721cb38b3f (patch) | |
tree | 6ee4bfbc39717d2f2c173900e12f6f2ee7dbeecc | |
parent | 7dfd3525c8ce4e29570205af7fed33c3095f4bf8 (diff) | |
parent | a154c42a9ba0ffca021825117542f5285084bba8 (diff) | |
download | riscv-isa-sim-fe24c46547f98576e74d3cabd5548a721cb38b3f.zip riscv-isa-sim-fe24c46547f98576e74d3cabd5548a721cb38b3f.tar.gz riscv-isa-sim-fe24c46547f98576e74d3cabd5548a721cb38b3f.tar.bz2 |
Merge branch 'rswarbrick-mcountinhibit'
-rw-r--r-- | riscv/encoding.h | 2 | ||||
-rw-r--r-- | riscv/processor.cc | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/riscv/encoding.h b/riscv/encoding.h index 26142db..a1d6c7c 100644 --- a/riscv/encoding.h +++ b/riscv/encoding.h @@ -1617,6 +1617,7 @@ #define CSR_MIE 0x304 #define CSR_MTVEC 0x305 #define CSR_MCOUNTEREN 0x306 +#define CSR_MCOUNTINHIBIT 0x320 #define CSR_MSCRATCH 0x340 #define CSR_MEPC 0x341 #define CSR_MCAUSE 0x342 @@ -2538,6 +2539,7 @@ DECLARE_CSR(mideleg, CSR_MIDELEG) DECLARE_CSR(mie, CSR_MIE) DECLARE_CSR(mtvec, CSR_MTVEC) DECLARE_CSR(mcounteren, CSR_MCOUNTEREN) +DECLARE_CSR(mcountinhibit, CSR_MCOUNTINHIBIT) DECLARE_CSR(mscratch, CSR_MSCRATCH) DECLARE_CSR(mepc, CSR_MEPC) DECLARE_CSR(mcause, CSR_MCAUSE) diff --git a/riscv/processor.cc b/riscv/processor.cc index d458e39..17b8796 100644 --- a/riscv/processor.cc +++ b/riscv/processor.cc @@ -888,6 +888,7 @@ reg_t processor_t::get_csr(int which) break; case CSR_SCOUNTEREN: return state.scounteren; case CSR_MCOUNTEREN: return state.mcounteren; + case CSR_MCOUNTINHIBIT: return 0; case CSR_SSTATUS: { reg_t mask = SSTATUS_SIE | SSTATUS_SPIE | SSTATUS_SPP | SSTATUS_FS | (supports_extension('V') ? SSTATUS_VS : 0) |