llvm.org GIT mirror llvm / b44dba3
AMDGPU/SI: Add support for 8-byte relocations Reviewers: arsenm, kzhuravl Subscribers: wdng, nhaehnle, yaxunl, llvm-commits, tony-tye Differential Revision: https://reviews.llvm.org/D25375 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283593 91177308-0d34-0410-b5e6-96231b3b80d8 Tom Stellard 4 years ago
2 changed file(s) with 17 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
6161 case FK_Data_4:
6262 case FK_SecRel_4:
6363 return ELF::R_AMDGPU_ABS32;
64 case FK_Data_8:
65 return ELF::R_AMDGPU_ABS64;
6466 }
6567
6668 llvm_unreachable("unhandled relocation type");
0 // RUN: llvm-mc -filetype=obj -triple amdgcn-- -mcpu=kaveri -show-encoding %s | llvm-readobj -relocations | FileCheck %s
11
22 // CHECK: Relocations [
3 // CHECK: .rel.text {
34 // CHECK: R_AMDGPU_ABS32_LO SCRATCH_RSRC_DWORD0 0x0
45 // CHECK: R_AMDGPU_ABS32_HI SCRATCH_RSRC_DWORD1 0x0
56 // CHECK: R_AMDGPU_GOTPCREL global_var 0x0
67 // CHECK: R_AMDGPU_ABS32 var 0x0
8 // CHECK: }
9 // CHECK: .rel.data {
10 // CHECK: R_AMDGPU_ABS64 temp 0x0
11 // CHECK: }
712 // CHECK: ]
813
914 kernel:
1722
1823 .section nonalloc, "w", @progbits
1924 .long var, common_var
25
26
27 // 8 byte relocations
28 .type ptr,@object
29 .data
30 .globl ptr
31 .p2align 3
32 ptr:
33 .quad temp
34 .size ptr, 8