Browse Source

Use existing write_with_mask() to simplify code

pull/796/head
Scott Johnson 5 years ago
committed by Andrew Waterman
parent
commit
07439eec69
  1. 4
      riscv/csrs.cc

4
riscv/csrs.cc

@ -547,8 +547,8 @@ bool mip_csr_t::unlogged_write(const reg_t val) noexcept {
// * vstip is read-only -- write hvip instead
const reg_t mask = (supervisor_ints | hypervisor_ints) &
(MIP_SEIP | MIP_SSIP | MIP_STIP | vssip_int);
this->val = (this->val & ~mask) | (val & mask);
return true;
write_with_mask(mask, val);
return false; // avoid double logging: already logged by write_with_mask()
}

Loading…
Cancel
Save