RISC-V: Prefer `new` over `allocate` with `bind`
Part of RV-568
Stacked MRs
- RISC-V: Initialise Buddy branch correctly (!17570 - merged)
- RISC-V: Abolish `allocate` on `Layouts` (!17566 - merged)
- RISC-V: Prefer `new` over `allocate` with `bind` (!17569 - merged) (you are here)
- RISC-V: New state allocation and initialisation... (!17567 - merged)
What
Switch all remaining uses of allocate+bind to use the new mechanism from !17567 (merged).
Why
Please refer to !17567 (merged) for more context!
How
Replaces the crate_state! macro for state instantiation in tests. I wanted to implement this switch within the crate_state! macro initially. This turned out to be quite messy, so I chose to simply replace the macro altogether.
Manually Testing
make -C src/riscv all
Benchmarking
This does not impact runtime performance.
Tasks for the Author
-
Link all Linear issues related to this MR using magic words (e.g. part of, relates to, closes). -
Eliminate dead code and other spurious artefacts introduced in your changes. -
Document new public functions, methods and types. -
Make sure the documentation for updated functions, methods, and types is correct. -
Add tests for bugs that have been fixed. -
Put in reasonable effort to ensure that CI will pass. make -C src/riscvdune build src/lib_riscvdune build src/rust_deps
-
Benchmark performance and populate the table above if needed. -
Explain changes to regression test captures when applicable. -
Write commit messages to reflect the changes they're about. -
Self-review your changes to ensure they are high-quality. -
Complete all of the above before assigning this MR to reviewers.
Edited by Ole Krüger