This is an archive of the discontinued LLVM Phabricator instance.

[SystemZ] Improve handling of huge PC relative immediate offsets.
ClosedPublic

Authored by jonpa on Nov 2 2019, 1:58 AM.

Details

Reviewers
uweigand
Summary

Demand that an immediate offset to a PC relative address fits in 32 bits, or else load it into a register and perform a separate add.

Verify in the assembler that such immediate offsets fit the bitwidth.

Even though the final address of a Load Address Relative Long may fit in 32 bits even with >32 bit offset (depending on where the symbol lives relative to PC), the GNU toolchain demands the offset by itself to be in range. This patch adapts the same behavior for llvm.

Diff Detail

Event Timeline

jonpa created this revision.Nov 2 2019, 1:58 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 2 2019, 1:58 AM
uweigand accepted this revision.Nov 2 2019, 7:38 AM

LGTM, thanks!

This revision is now accepted and ready to land.Nov 2 2019, 7:38 AM
jonpa closed this revision.Nov 4 2019, 1:47 AM

Thanks for review.
commit 580310f