Skip to content

[JITLink][AArch32] Add support for ELF::R_ARM_THM_MOV{W_PREL_NC,T_PREL} #70364

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 2 commits into from
Nov 9, 2023

Conversation

eymay
Copy link
Contributor

@eymay eymay commented Oct 26, 2023

Support for ELF::R_ARM_THM_MOVW_PREL_NC and ELF::R_ARM_THM_MOVT_PREL
is added. Move instructions with PC-relative immediates can be handled in Thumb mode with this addition.

@eymay eymay requested a review from weliveindetail October 26, 2023 18:32
@eymay
Copy link
Contributor Author

eymay commented Oct 26, 2023

Though not dependent, assumes PR #70346 being merged.

@eymay eymay changed the title [JITLink][AArch32] Add support for ELF::R_ARM_THM_MOV{W_PREL_NC,T_ABS} [JITLink][AArch32] Add support for ELF::R_ARM_THM_MOV{W_PREL_NC,T_PREL} Nov 1, 2023
@eymay eymay force-pushed the jitlink-thumb-movwprel branch 2 times, most recently from 9f39f51 to 665de0a Compare November 7, 2023 18:42
Copy link
Member

@weliveindetail weliveindetail left a comment

Choose a reason for hiding this comment

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

Thanks, this LGTM! It would be good to land this patch and work on the remarks from my inline comments in context of my upcoming PR #71649

@@ -377,12 +377,14 @@ Expected<int64_t> readAddendThumb(LinkGraph &G, Block &B, const Edge &E,
: decodeImmBT4BlT1BlxT2(R.Hi, R.Lo);

case Thumb_MovwAbsNC:
case Thumb_MovwPrelNC:
Copy link
Member

Choose a reason for hiding this comment

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

We were talking about the opcode checks and duplication in both, code and constants. I've been working on a patch to compensate for it here: #71649 With that the asymmetry in opcode checks will go away. I think we can land this as is.

eymay added 2 commits November 8, 2023 21:36
Support for ELF::R_ARM_THM_MOVW_PREL_NC and ELF::R_ARM_THM_MOVT_PREL
is added. Move instructions with PC-relative immediates can be handled
in Thumb mode with this addition.
@eymay eymay force-pushed the jitlink-thumb-movwprel branch from 665de0a to 56aa89f Compare November 8, 2023 18:36
Copy link
Member

@weliveindetail weliveindetail left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for working on this!

@eymay eymay merged commit 87081f1 into llvm:main Nov 9, 2023
@eymay eymay deleted the jitlink-thumb-movwprel branch November 9, 2023 08:51
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.

2 participants