This is an archive of the discontinued LLVM Phabricator instance.

[Support/ELF/AMDGPU] Add 32-bit lo/hi got and pc relative relocations
ClosedPublic

Authored by kzhuravl on Oct 12 2016, 9:58 PM.

Details

Summary

Added relocation names:

  • R_AMDGPU_GOTPCREL32_LO
  • R_AMDGPU_GOTPCREL32_HI
  • R_AMDGPU_REL32_LO
  • R_AMDGPU_REL32_HI

AMDGPU isa only supports 32-bit immediates. In order to access 64-bit address we need to generate 32-bit lo/hi relocations, and do the right math (separate patch). Currently we only generate one 32 bit relocation for lower bits for each access, losing higher bits. Hence we need relocations listed above.

Diff Detail

Repository
rL LLVM

Event Timeline

kzhuravl updated this revision to Diff 74474.Oct 12 2016, 9:58 PM
kzhuravl retitled this revision from to [Support/ELF/AMDGPU] Add 32-bit lo/hi got and pc relative relocations.
kzhuravl updated this object.
kzhuravl added reviewers: tstellarAMD, tony-tye.
kzhuravl added a subscriber: llvm-commits.
tstellarAMD accepted this revision.Oct 13 2016, 2:36 PM
tstellarAMD edited edge metadata.

LGTM.

This revision is now accepted and ready to land.Oct 13 2016, 2:36 PM
This revision was automatically updated to reflect the committed changes.