Promotes 5 Thumb-mode bare-metal Arm targets to Tier 2#155763
Open
cezarbbb wants to merge 1 commit intorust-lang:mainfrom
Open
Promotes 5 Thumb-mode bare-metal Arm targets to Tier 2#155763cezarbbb wants to merge 1 commit intorust-lang:mainfrom
cezarbbb wants to merge 1 commit intorust-lang:mainfrom
Conversation
Collaborator
|
Some changes occurred in src/doc/rustc/src/platform-support cc @Noratrieb These commits modify compiler targets. |
Collaborator
|
r? @adwinwhite rustbot has assigned @adwinwhite. Use Why was this reviewer chosen?The reviewer was selected based on:
|
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR promotes five Thumb-mode bare-metal Arm targets to Tier 2, joining their Arm-mode counterparts which are already Tier 2:
thumbv7a-none-eabiarmv7a-none-eabithumbv7a-none-eabihfarmv7a-none-eabihfthumbv7r-none-eabiarmv7r-none-eabithumbv7r-none-eabihfarmv7r-none-eabihfthumbv8r-none-eabihfarmv8r-none-eabihfNote: There is no
thumbv8r-none-eabitarget because the Cortex-R52 processor always includes an FPU, making a soft-float ABI variant unnecessary.These Thumb-mode targets generate T32 code by default while their Arm-mode counterparts generate A32 code. They share the same LLVM backend, ABI, and data layout — the only spec differences are the
llvm_targetstring and the description.Thumb-mode is preferred in many embedded projects for its smaller code size. Cortex-A and Cortex-R processors support both ARM and Thumb modes. Having both at Tier 2 ensures parity for all users of these processor families.
@thejpster (contacted), @davidtwco (contacted), @rust-lang/arm-maintainers (need confirmation). I'm actively reaching out to other qualified developers and will update the maintainers list as soon as I get further confirmations.
These targets are highly similar to their already-Tier-2 Arm-mode counterparts and share the same LLVM backend. They should not add undue burden.
The existing documentation at https://doc.rust-lang.org/nightly/rustc/platform-support/armv7a-none-eabi.html, armv7r-none-eabi.html, and armv8r-none-eabihf.html already covers both ARM and Thumb variants. It will be updated to reflect the new Tier 2 status.
The existing documentation already covers this for both modes.
The difference is the default instruction set: A32 (ARM mode) vs T32 (Thumb mode). Thumb-mode produces smaller code, which is valuable for resource-constrained embedded systems. The processor supports both modes, and users should be able to choose either without being penalized by Tier 3 status.
They have full libcore and liballoc, same as the Arm-mode counterparts.
Same LLVM backend as the existing Tier 2 Arm-mode targets. No known issues.
The ABI is EABI/EABIhf, the same as many other Arm targets.
The https://github.com/rust-embedded/cortex-ar repository already builds all five Thumb-mode targets in CI with -Zbuild-std=core. They build fine locally as well.
There are no no-std tests in the tree that I'm aware of.
Building libcore for these targets is quite fast, comparable to the existing Arm-mode Tier 2 targets.
They do — these are cross-compilation-only targets.
Just libcore and liballoc required. No known issues.
Noted.
The https://github.com/rust-embedded/cortex-ar repository will be updated to use the rustup component when available.