Browse Source

Merge pull request #461 from riscv/mstatus-spie-sie

Hardwire mstatus.[sie,spie] to zero if 'S' mode absent
pull/462/head
Andrew Waterman 6 years ago
committed by GitHub
parent
commit
a21011116c
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      riscv/processor.cc

5
riscv/processor.cc

@ -697,9 +697,8 @@ void processor_t::set_csr(int which, reg_t val)
|| supports_extension('V');
bool has_vs = supports_extension('V');
reg_t mask = MSTATUS_SIE | MSTATUS_SPIE | MSTATUS_MIE | MSTATUS_MPIE
| MSTATUS_MPRV
| (supports_extension('S') ? MSTATUS_SUM : 0)
reg_t mask = MSTATUS_MIE | MSTATUS_MPIE | MSTATUS_MPRV
| (supports_extension('S') ? (MSTATUS_SUM | MSTATUS_SIE | MSTATUS_SPIE) : 0)
| MSTATUS_MXR | MSTATUS_TW | MSTATUS_TVM | MSTATUS_TSR
| (has_fs ? MSTATUS_FS : 0)
| (has_vs ? MSTATUS_VS : 0)

Loading…
Cancel
Save