Skip to content

Commit

Permalink
Merge pull request #214 from rmsyn/fixup/mstatus
Browse files Browse the repository at this point in the history
fixup: riscv: fix `mstatus` test
  • Loading branch information
almindor committed May 21, 2024
2 parents f7afa99 + 8567963 commit 6de6e53
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions riscv/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
### Fixed

- Fixed `sip::set_ssoft` and `sip::clear_ssoft` using wrong address
- Fixed assignment in `mstatus` unit tests.

## [v0.11.1] - 2024-02-15

Expand Down
6 changes: 3 additions & 3 deletions riscv/src/register/mstatus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -602,11 +602,11 @@ mod test {
#[test]
fn test_mpp() {
let mut mstatus = Mstatus { bits: 0 };
mstatus = mstatus.set_mpp(MPP::User);
mstatus.set_mpp(MPP::User);
assert_eq!(mstatus.mpp(), MPP::User);
mstatus = mstatus.set_mpp(MPP::Machine);
mstatus.set_mpp(MPP::Machine);
assert_eq!(mstatus.mpp(), MPP::Machine);
mstatus = mstatus.set_mpp(MPP::Supervisor);
mstatus.set_mpp(MPP::Supervisor);
assert_eq!(mstatus.mpp(), MPP::Supervisor);
}
}

0 comments on commit 6de6e53

Please sign in to comment.