Skip to content

Commit

Permalink
Merge pull request #1804 from ved-rivos/ssdbltrp_typo
Browse files Browse the repository at this point in the history
Fix error in reading right sstatus
  • Loading branch information
aswaterman authored Sep 18, 2024
2 parents 0cc5ecc + a8525b6 commit 52aff02
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion riscv/processor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ void processor_t::take_trap(trap_t& t, reg_t epc)
// An unexpected trap - a trap when SDT is 1 - traps to M-mode
if ((state.prv <= PRV_S && bit < max_xlen) &&
(((vsdeleg >> bit) & 1) || ((hsdeleg >> bit) & 1))) {
reg_t s = curr_virt ? state.nonvirtual_sstatus->read() : state.sstatus->read();
reg_t s = state.sstatus->read();
supv_double_trap = get_field(s, MSTATUS_SDT);
if (supv_double_trap)
vsdeleg = hsdeleg = 0;
Expand Down

0 comments on commit 52aff02

Please sign in to comment.