Skip to content

Emit thumb code on VEX V5#158762

Open
lewisfm wants to merge 2 commits into
rust-lang:mainfrom
vexide:feat/vex-v5-thumb2
Open

Emit thumb code on VEX V5#158762
lewisfm wants to merge 2 commits into
rust-lang:mainfrom
vexide:feat/vex-v5-thumb2

Conversation

@lewisfm

@lewisfm lewisfm commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

This PR switches the default codegen for the VEX V5 target to emit Thumb-2 instructions, allowing for smaller binary sizes (on the programs I tested this change on, I saw a ~20% size decrease on average). The target is renamed to have the thumb prefix instead of the arm prefix because of the updated instruction set.

Since VEXos starts all programs in Arm32 mode, the program entrypoint is explicitly compiled as ARM code and now transitions to Thumb mode when calling _start.

Users can still use the updated target in Arm32 mode by specifying -Ctarget-feature=-thumb-mode.

cc @tropicaaal @Gavin-Niederman

@rustbot

rustbot commented Jul 4, 2026

Copy link
Copy Markdown
Collaborator

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. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jul 4, 2026
@rustbot

rustbot commented Jul 4, 2026

Copy link
Copy Markdown
Collaborator

r? @Kivooeo

rustbot has assigned @Kivooeo.
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 76 candidates
  • Random selection from 23 candidates

@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

A job failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
  PR_CI_JOB: 1
  IMAGE: x86_64-gnu-llvm-21
##[endgroup]
    Updating crates.io index
error: failed to get `fnv` as a dependency of package `http v1.2.0`
    ... which satisfies dependency `http = "^1.1.0"` of package `ureq-proto v0.3.3`
    ... which satisfies dependency `ureq-proto = "^0.3.3"` of package `ureq v3.0.8`
    ... which satisfies dependency `ureq = "^3"` of package `citool v0.1.0 (/home/runner/work/rust/rust/src/ci/citool)`

Caused by:
  failed to load source for dependency `fnv`

Caused by:
  unable to update registry `crates-io`

Caused by:
  download of 3/f/fnv failed

Caused by:
  curl failed

Caused by:

@Gavin-Niederman Gavin-Niederman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants