Skip to content

add tests for thumb interworking#153153

Merged
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
folkertdev:thumb-and-arm
Mar 2, 2026
Merged

add tests for thumb interworking#153153
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
folkertdev:thumb-and-arm

Conversation

@folkertdev
Copy link
Copy Markdown
Contributor

fixes #151946

thumb programs (using a 16-bit instruction encoding) can call arm (32-bit instruction encoding) code. Doing so requires switching from thumb mode to arm mode, executing, then switching back. Test that this happens correctly, in particular for naked functions.

cc @thejpster can you confirm the output looks good here and that we're testing all of the relevant things
r? jieyouxu because this is doing some interesting things testing-wise

I believe that we need run-make here because we need to look at the assembly after the linker has run. It will correct calls from thumb to arm: depending on the thumb version this either uses a special instruction or inserts a call to a thunk that handles switching between thumb and arm mode.

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

Labels

A-run-make Area: port run-make Makefiles to rmake.rs S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

unsafe(naked) functions might not be called via a thunk

7 participants