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

Konstantin Zhuravlyov via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 12 21:58:51 PDT 2016


kzhuravl created this revision.
kzhuravl added reviewers: tstellarAMD, tony-tye.
kzhuravl added a subscriber: llvm-commits.
Herald added subscribers: yaxunl, nhaehnle, wdng.

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.


https://reviews.llvm.org/D25546

Files:
  docs/CodeGenerator.rst
  include/llvm/Support/ELFRelocs/AMDGPU.def
  test/Object/AMDGPU/elf64-relocs.yaml

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D25546.74474.patch
Type: text/x-patch
Size: 6018 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161013/11e78272/attachment.bin>


More information about the llvm-commits mailing list