-
Notifications
You must be signed in to change notification settings - Fork 193
riscv-macros: Move post_init attribute
#386
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
679bfff to
9f1b655
Compare
9f1b655 to
92cb29e
Compare
| ); | ||
|
|
||
| #[entry] | ||
| fn main(hartid: usize) -> ! { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding this test case to the QEMU test suite.
Maybe add cases for positive/negative results for each of the check_* functions to the test-trybuild suite?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure! There are already a few, but I am also thinking on a new error handling mechanism for these macros that stores multiple errors and throws them in batch. In this way, developers will able to see all the errors with just one attempt
9b5d742 to
288b98c
Compare
|
@rmsyn check it out, I think the new error handling is way better than in previous versions! |
288b98c to
d86e58d
Compare
|
(of course Rust 1.93 came with new clippy lints and compile error messages that broke our CI...) |
d08b712 to
79c47a6
Compare
79c47a6 to
8049a7f
Compare
This PR is part of the rework for procedural macros of the RISC-V crates. Basically, it migrates
riscv_rt_macros::post_inittoriscv_macros::post_init.The behavior of the macro remains mainly identical. However, I worked on a more modular implementation, with the idea of reusing as much code as possible once this PR is merged and we move
entry,exception, etc. Hopefully, it will be easier in the future to maintain all theriscv-rtmacros :)I also modified the
multi-hartQEMU example to illustrate how the macro works (and assert that it works properly).Let me know what you think!