OSDN Git Service

[Support/ELF/AMDGPU] Add 32-bit lo/hi got and pc relative relocations
authorKonstantin Zhuravlyov <kzhuravl_dev@outlook.com>
Fri, 14 Oct 2016 04:03:49 +0000 (04:03 +0000)
committerKonstantin Zhuravlyov <kzhuravl_dev@outlook.com>
Fri, 14 Oct 2016 04:03:49 +0000 (04:03 +0000)
commitaa6ce7991489ab416be98a33b0c83d4ab119e275
tree254995f6be5ad039911a0b51e5507ee90e504c97
parent15a3555c6d39d2b5926b306e4d24bce0cf4d390b
[Support/ELF/AMDGPU] Add 32-bit lo/hi got and pc relative relocations

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.

Differential Revision: https://reviews.llvm.org/D25546

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284191 91177308-0d34-0410-b5e6-96231b3b80d8
docs/CodeGenerator.rst
include/llvm/Support/ELFRelocs/AMDGPU.def
test/Object/AMDGPU/elf64-relocs.yaml