Skip to content

[JITLink][AArch32] Multi-stub support for armv7/thumbv7 #78371

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

Merged
merged 1 commit into from
Jan 23, 2024

Conversation

weliveindetail
Copy link
Member

@weliveindetail weliveindetail commented Jan 17, 2024

We want to emit stubs that match the instruction set state of the relocation site. This is important for branches that have no built-in switch for the instruction set state. It's the case for Jump24 relocations. Relocations on instructions support switching on the fly should be fixed up in a relaxation step in the future. This affects Call relocations on BL/BLX instructions.

In this patch, the StubManager gains a second stub symbol slot for each target and selects which one to use based on the relocation type. For testing, we select the appropriate slot with a stub-kind filter, i.e. arm or thumb. With that we implements Armv7 stubs and test that we can have both kinds of stubs for a single external symbol.

Copy link

github-actions bot commented Jan 19, 2024

✅ With the latest revision this PR passed the C/C++ code formatter.

@weliveindetail weliveindetail force-pushed the jitlink-aarch32-multi-stub branch from 8ecdaf5 to 142168f Compare January 19, 2024 17:38
@weliveindetail weliveindetail marked this pull request as ready for review January 19, 2024 17:50
@weliveindetail weliveindetail force-pushed the jitlink-aarch32-multi-stub branch 2 times, most recently from bd78a78 to 6abe2d1 Compare January 22, 2024 15:51
@weliveindetail weliveindetail force-pushed the jitlink-aarch32-multi-stub branch from 6abe2d1 to 559fe8e Compare January 22, 2024 20:26
@weliveindetail
Copy link
Member Author

This is a pretty isolated change in JITLink AArch32. Related design questions were discussed in #78369. It seems worth landing before release/18.x branches. If there are any questions about the code here, I am happy to discuss post-commit. Pre-merge tests had passed before rebasing.

@weliveindetail weliveindetail merged commit e5ca202 into llvm:main Jan 23, 2024
@weliveindetail weliveindetail deleted the jitlink-aarch32-multi-stub branch January 23, 2024 01:59
weliveindetail added a commit to weliveindetail/llvm-project that referenced this pull request Jan 30, 2024
This function is used in jitlink-check lines for LIT testing. In llvm#78371 I missed to swap initial instruction bytes for systems that
store the constants as big-endian.
weliveindetail added a commit that referenced this pull request Jan 30, 2024
This function is used in `jitlink-check` lines in LIT tests. In #78371 I
missed to swap initial instruction bytes for systems that store the
constants as big-endian.
llvmbot pushed a commit to llvmbot/llvm-project that referenced this pull request Jan 30, 2024
This function is used in `jitlink-check` lines in LIT tests. In llvm#78371 I
missed to swap initial instruction bytes for systems that store the
constants as big-endian.

(cherry picked from commit 8a5bdd8)
llvmbot pushed a commit to llvmbot/llvm-project that referenced this pull request Feb 1, 2024
This function is used in `jitlink-check` lines in LIT tests. In llvm#78371 I
missed to swap initial instruction bytes for systems that store the
constants as big-endian.

(cherry picked from commit 8a5bdd8)
tstellar pushed a commit to tstellar/llvm-project that referenced this pull request Feb 14, 2024
This function is used in `jitlink-check` lines in LIT tests. In llvm#78371 I
missed to swap initial instruction bytes for systems that store the
constants as big-endian.

(cherry picked from commit 8a5bdd8)
tstellar pushed a commit to tstellar/llvm-project that referenced this pull request Feb 14, 2024
This function is used in `jitlink-check` lines in LIT tests. In llvm#78371 I
missed to swap initial instruction bytes for systems that store the
constants as big-endian.

(cherry picked from commit 8a5bdd8)
tstellar pushed a commit to tstellar/llvm-project that referenced this pull request Feb 14, 2024
This function is used in `jitlink-check` lines in LIT tests. In llvm#78371 I
missed to swap initial instruction bytes for systems that store the
constants as big-endian.

(cherry picked from commit 8a5bdd8)
tstellar pushed a commit to tstellar/llvm-project that referenced this pull request Feb 14, 2024
This function is used in `jitlink-check` lines in LIT tests. In llvm#78371 I
missed to swap initial instruction bytes for systems that store the
constants as big-endian.

(cherry picked from commit 8a5bdd8)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant