Skip to content
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

[BOLT] Fix long jump negative offset issue. #67132

Merged
merged 1 commit into from
Oct 7, 2023
Merged

Conversation

qijitao
Copy link
Contributor

@qijitao qijitao commented Sep 22, 2023

In instruction encoding, the relative offset address of the PC is signed, that is, the number of positive offset bits and the number of negative offset bits is asymmetric. Therefore, the maximum and minimum values are used to replace Mask to determine the boundary.

@yota9 yota9 added the BOLT label Sep 22, 2023
@yota9 yota9 self-requested a review September 22, 2023 20:41
Copy link
Member

@yota9 yota9 left a comment

Choose a reason for hiding this comment

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

Thanks. Also please check, the test seems to be failed on build

bolt/test/AArch64/long-jmp-offset-boundary.s Outdated Show resolved Hide resolved
bolt/test/AArch64/long-jmp-offset-boundary.s Outdated Show resolved Hide resolved
bolt/test/AArch64/long-jmp-offset-boundary.s Outdated Show resolved Hide resolved
bolt/test/AArch64/long-jmp-offset-boundary.s Outdated Show resolved Hide resolved
bolt/test/AArch64/long-jmp-offset-boundary.s Outdated Show resolved Hide resolved
@qijitao qijitao requested a review from yota9 September 25, 2023 01:26
@qijitao qijitao force-pushed the long-jmp-issue branch 2 times, most recently from fc5c15f to 0c2d80a Compare September 25, 2023 14:16
In instruction encoding, the relative offset address of the PC is signed,
that is, the number of positive offset bits and the number of negative
offset bits is asymmetric. Therefore, the maximum and minimum values
are used to replace Mask to determine the boundary.
@yota9
Copy link
Member

yota9 commented Oct 1, 2023

LGTM Thanks!

@qijitao qijitao requested a review from yota9 October 1, 2023 15:09
@yota9 yota9 merged commit bae41ff into llvm:main Oct 7, 2023
2 checks passed
@qijitao qijitao deleted the long-jmp-issue branch October 8, 2023 01:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants