riscv-macros: Move post_init and entry attributes#386
riscv-macros: Move post_init and entry attributes#386romancardenas wants to merge 5 commits intomasterfrom
post_init and entry attributes#386Conversation
679bfff to
9f1b655
Compare
9f1b655 to
92cb29e
Compare
| ); | ||
|
|
||
| #[entry] | ||
| fn main(hartid: usize) -> ! { |
There was a problem hiding this comment.
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.
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
post_init attributepost_init and entry attributes
|
Now, |
|
Closed as per #389 |
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!