File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed
Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1414### Changed
1515
1616- Use CSR helper macros to define ` marchid ` register
17+ - Re-use ` try_* ` functions in ` mcountinhibit `
1718
1819## [ v0.12.1] - 2024-10-20
1920
Original file line number Diff line number Diff line change @@ -41,8 +41,7 @@ set_clear_csr!(
4141
4242#[ inline]
4343pub unsafe fn set_hpm ( index : usize ) {
44- assert ! ( ( 3 ..32 ) . contains( & index) ) ;
45- _set ( 1 << index) ;
44+ try_set_hpm ( index) . unwrap ( ) ;
4645}
4746
4847#[ inline]
@@ -60,8 +59,7 @@ pub unsafe fn try_set_hpm(index: usize) -> Result<()> {
6059
6160#[ inline]
6261pub unsafe fn clear_hpm ( index : usize ) {
63- assert ! ( ( 3 ..32 ) . contains( & index) ) ;
64- _clear ( 1 << index) ;
62+ try_clear_hpm ( index) . unwrap ( ) ;
6563}
6664
6765#[ inline]
You can’t perform that action at this time.
0 commit comments