Skip to content

Promotes 5 Thumb-mode bare-metal Arm targets to Tier 2#155763

Open
cezarbbb wants to merge 1 commit into
rust-lang:mainfrom
cezarbbb:promote-thumb-to-tier2
Open

Promotes 5 Thumb-mode bare-metal Arm targets to Tier 2#155763
cezarbbb wants to merge 1 commit into
rust-lang:mainfrom
cezarbbb:promote-thumb-to-tier2

Conversation

@cezarbbb
Copy link
Copy Markdown
Contributor

@cezarbbb cezarbbb commented Apr 25, 2026

View all comments

This PR promotes five Thumb-mode bare-metal Arm targets to Tier 2, joining their Arm-mode counterparts which are already Tier 2:

Thumb-mode target (Tier 3 → Tier 2) Arm-mode counterpart (already Tier 2)
thumbv7a-none-eabi armv7a-none-eabi
thumbv7a-none-eabihf armv7a-none-eabihf
thumbv7r-none-eabi armv7r-none-eabi
thumbv7r-none-eabihf armv7r-none-eabihf
thumbv8r-none-eabihf armv8r-none-eabihf

Note: There is no thumbv8r-none-eabi target 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_target string and the description.

See rust-lang/compiler-team#985

@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 25, 2026

Some changes occurred in src/doc/rustc/src/platform-support

cc @Noratrieb

These commits modify compiler targets.
(See the Target Tier Policy.)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Apr 25, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 25, 2026

r? @adwinwhite

rustbot has assigned @adwinwhite.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: @ehuss, compiler
  • @ehuss, compiler expanded to 74 candidates
  • Random selection from 20 candidates

@petrochenkov
Copy link
Copy Markdown
Contributor

Blocked on rust-lang/compiler-team#985.
@rustbot blocked

@rustbot rustbot added S-blocked Status: Blocked on something else such as an RFC or other implementation work. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 27, 2026
@cezarbbb
Copy link
Copy Markdown
Contributor Author

@rustbot ping arm-maintainers
As the T32 and A32 targets share a page in the rustc book, can you continue to be the maintainers of these targets?

@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 28, 2026

Error: Only Rust team members can ping teams.

Please file an issue on GitHub at triagebot if there's a problem with this bot, or reach out on #triagebot on Zulip.

@SparrowLii
Copy link
Copy Markdown
Member

@rustbot ping arm-maintainers
:)

@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 28, 2026

Error: This team (arm-maintainers) cannot be pinged via this command; it may need to be added to triagebot.toml on the default branch.

Please file an issue on GitHub at triagebot if there's a problem with this bot, or reach out on #triagebot on Zulip.

@thejpster
Copy link
Copy Markdown
Contributor

arm-maintainers said yes over on rust-lang/compiler-team#985 (comment) (just for anyone else looking at this without looking at that thread first)

@cezarbbb cezarbbb force-pushed the promote-thumb-to-tier2 branch from 0b1bacb to f45a817 Compare May 30, 2026 01:27
@rustbot rustbot added A-CI Area: Our Github Actions CI A-testsuite Area: The testsuite used to check the correctness of rustc T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. labels May 30, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented May 30, 2026

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@cezarbbb
Copy link
Copy Markdown
Contributor Author

cezarbbb commented Jun 1, 2026

@petrochenkov The FCP is complete

@petrochenkov petrochenkov added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-blocked Status: Blocked on something else such as an RFC or other implementation work. labels Jun 1, 2026
@petrochenkov
Copy link
Copy Markdown
Contributor

@bors r+

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Jun 1, 2026

📌 Commit f45a817 has been approved by petrochenkov

It is now in the queue for this repository.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 1, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jun 1, 2026
…=petrochenkov

Promotes 5 Thumb-mode bare-metal Arm targets to Tier 2

This PR promotes five Thumb-mode bare-metal Arm targets to Tier 2, joining their Arm-mode counterparts which are already Tier 2:

| Thumb-mode target (Tier 3 → Tier 2) | Arm-mode counterpart (already Tier 2) |
|:---|:---|
| `thumbv7a-none-eabi` | `armv7a-none-eabi` |
| `thumbv7a-none-eabihf` | `armv7a-none-eabihf` |
| `thumbv7r-none-eabi` | `armv7r-none-eabi` |
| `thumbv7r-none-eabihf` | `armv7r-none-eabihf` |
| `thumbv8r-none-eabihf` | `armv8r-none-eabihf` |

Note: There is no `thumbv8r-none-eabi` target 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_target` string and the description.

See rust-lang/compiler-team#985
@cezarbbb cezarbbb force-pushed the promote-thumb-to-tier2 branch from 8efcf19 to 5a04cb4 Compare June 2, 2026 07:18
@cezarbbb
Copy link
Copy Markdown
Contributor Author

cezarbbb commented Jun 2, 2026

It appears that +fp.sp only enabled single-precision FPUs and did not support double-precision instructions. It has now been changed to +fp, consistent with the handling of armv7r-none-eabihf.

@JonathanBrouwer
Copy link
Copy Markdown
Contributor

@bors try jobs=dist-various-1

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jun 2, 2026
Promotes 5 Thumb-mode bare-metal Arm targets to Tier 2


try-job: dist-various-1
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Jun 2, 2026

💔 Test for 3ead6a8 failed: CI. Failed job:

@rust-log-analyzer

This comment has been minimized.

@cezarbbb
Copy link
Copy Markdown
Contributor Author

cezarbbb commented Jun 2, 2026

@JonathanBrouwer Hmm this error seems to be a Docker Hub network issue? Can you try job again?

@JonathanBrouwer
Copy link
Copy Markdown
Contributor

@bors try jobs=dist-various-1
Yep, github moment

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jun 2, 2026
Promotes 5 Thumb-mode bare-metal Arm targets to Tier 2


try-job: dist-various-1
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Jun 2, 2026

💔 Test for db682f4 failed: CI. Failed job:

@cezarbbb cezarbbb force-pushed the promote-thumb-to-tier2 branch from 5a04cb4 to e3468ae Compare June 2, 2026 10:14
@cezarbbb
Copy link
Copy Markdown
Contributor Author

cezarbbb commented Jun 2, 2026

Seems like cc-rs only automatically adds -mthumb, so -mfpu needs to be provided by the Dockerfile CFLAGS.

@rust-log-analyzer

This comment has been minimized.

@JonathanBrouwer
Copy link
Copy Markdown
Contributor

@bors try jobs=dist-various-1

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jun 2, 2026
Promotes 5 Thumb-mode bare-metal Arm targets to Tier 2


try-job: dist-various-1
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Jun 2, 2026

☀️ Try build successful (CI)
Build commit: 953da85 (953da853c0a78a6b15ebd589ec51d913ba8c1f9b, parent: 4f84d9fac456d973d592cf3fb48db958ecf22506)

@JonathanBrouwer
Copy link
Copy Markdown
Contributor

I'm not super familiar with all these build tooling flags and their consequences so I'll wait for @petrochenkov to re-review and reapprove

@petrochenkov petrochenkov added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jun 2, 2026
@petrochenkov
Copy link
Copy Markdown
Contributor

@cezarbbb
I'm not sure, how were the -mfpu flags selected?

@petrochenkov petrochenkov added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 2, 2026
@cezarbbb
Copy link
Copy Markdown
Contributor Author

cezarbbb commented Jun 3, 2026

Hi. I found that cc-rs automatically adds three key flags for armv7r-none-eabihf: -marm / -march=armv7-r / -mfpu=vfpv3-d16 (see cc-rs/src/lib.rs:2476-2495), but the Thumb targets — thumbv7r-none-eabihf, thumbv7a-none-eabihf, thumbv8r-none-eabihf — don't match those branches. cc-rs only adds -mthumb for them, not -march or -mfpu.

ARM and Thumb differ only in instruction encoding; the underlying hardware requirements are identical. For example, armv7r_none_eabihf.rs:20 and thumbv7r_none_eabihf.rs:20 both specify +vfp3d16, and armv7a_none_eabihf.rs:20 and thumbv7a_none_eabihf.rs:20 both specify +vfp3d16,-neon,+strict-align. So they need the same -mfpu=vfpv3-d16. My approach is simply to replicate the FPU that cc-rs already selects for the ARM variants, written explicitly in the Thumb variants' Dockerfile CFLAGS.

For thumbv8r-none-eabihf's -mfpu=fp-armv8, I simply followed @thejpster's existing armv8r config in the Dockerfile. I also want to ask @thejpster, does these approaches above look correct to you?

@cezarbbb
Copy link
Copy Markdown
Contributor Author

cezarbbb commented Jun 3, 2026

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-CI Area: Our Github Actions CI A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants