-
-
Notifications
You must be signed in to change notification settings - Fork 796
Remove nightly-only target_feature
#3803
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
Conversation
85840b6 to
de40abb
Compare
The _v7m functions were cfg gated with `target_feature="v7"`, which only works on nightly. To move to stable we need to remove these. Instead we move them to their own crate where they can be included only on v7m platforms.
Since v7m cannot compile with target=v6, we need to move the v7m asm to its own crate.
de40abb to
434a80e
Compare
|
This is rebased and ready to go. I only copied the functions from one file to another without any changes. |
| Cortex-M v7m Architecture | ||
| ========================= |
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.
Thoughts on adding the cortex-v7m crate (copied over from Slack):
Upsides:
- It removes a nightly feature
- It's consequential, given that we have a common cortex-m crate and a cortex-m0 crate, which contains v6m assembly already
- (I'm biased, but) I think the cortexm::CortexMVariant encapsulates these arch differences very nicely across crates, without involving guesswork as to what the linker's gonna stick together
Downsides:
- Yet another crate
- Increases compilation time slightly
I'm in favor, esp. given we want to compile on stable.
lschuermann
left a comment
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.
I trust that the assembly has been copied over verbatim and doesn't warrant another review. 😄
ppannuto
left a comment
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.
This is a good change.
Really, we should get rid of all of the arch/cortex-*; they are not ARM arch's.. v6m, v7m, v7me, etc are. I strongly suspect blame for this falls to me however, for not really understanding things that well in 2015 :/.
Pull Request Overview
Blocked on #3798Part of #1654.
We use
in the cortex-m crate so we can include v7m-specific code in a crate that is also used by v6 arch crates. Using cfgs like this is normally not something we would do, but, since the cfgs are set by the toolchain and not manually by us in tock repo files, it was ok.
The issue is is that
target_feature = "v7"is only set on nightly and not stable. So doing this actually added another nightly only feature although we were not either aware of this or we did not write it down.This removes using
target_feature = "v7"by create a new crate for v7m that only v7m platforms will include.Testing Strategy
travis
TODO or Help Wanted
n/a
This incorporates the changes from #3798 assuming that will be merged as is. Moving code between files is a pain.
Documentation Updated
/docs, or no updates are required.Formatting
make prepush.