This is an archive of the discontinued LLVM Phabricator instance.

[JITLink][PowerPC][WIP] Handle case when local branch target is out of range
Needs ReviewPublic

Authored by lkail on Aug 28 2023, 9:10 PM.
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
Summary

R_PPC64_REL24 relocation is able to branch directly if the displacement of the branching target is within int26 range. If not, we have to create a stub to perform indirect branching.

This patch assumes all local branching need a stub and optimize it via a PreFixupPass.

Since rtdyld for ppc64 has handled such case, now we implement it for jitlink for ppc64.

Diff Detail

Event Timeline

lkail created this revision.Aug 28 2023, 9:10 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 28 2023, 9:10 PM
lkail requested review of this revision.Aug 28 2023, 9:10 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 28 2023, 9:10 PM
lkail retitled this revision from [JITLink][PowerPC][WIP] Handle local branch target is out of range to [JITLink][PowerPC][WIP] Handle case when local branch target is out of range.
lkail updated this revision to Diff 554195.Aug 28 2023, 11:46 PM