This is an archive of the discontinued LLVM Phabricator instance.

[PPC64] Fix offset checks on rel24 call relocations.
ClosedPublic

Authored by sfertile on Oct 18 2018, 7:56 AM.

Details

Summary

Adjust the range check on a call instruction from 24 bits signed to 26 bits signed, and check that the target VA is 4 byte aligned. While the call instruction only encodes 24 bits of offset, the target address is implicitly assumed to be at least 4 byte aligned , giving the call instruction a reach of 26 signed bits.

Diff Detail

Repository
rL LLVM

Event Timeline

sfertile created this revision.Oct 18 2018, 7:56 AM
ruiu accepted this revision.Oct 18 2018, 8:04 AM

LGTM

This revision is now accepted and ready to land.Oct 18 2018, 8:04 AM
This revision was automatically updated to reflect the committed changes.