Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
romancardenas committed Dec 29, 2023
1 parent 149d917 commit c6231ce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions riscv/src/interrupt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ pub mod machine {
}

// Restore MSTATUS.PIE, MSTATUS.MPP, and SEPC
if !mstatus.mpie() {
if mstatus.mpie() {
mstatus::set_mpie();
}
mstatus::set_mpp(mstatus.mpp());
Expand Down Expand Up @@ -172,7 +172,7 @@ pub mod supervisor {
}

// Restore SSTATUS.SPIE, SSTATUS.SPP, and SEPC
if !sstatus.spie() {
if sstatus.spie() {
sstatus::set_spie();
}
sstatus::set_spp(sstatus.spp());
Expand Down

0 comments on commit c6231ce

Please sign in to comment.