[PATCH] D25375: AMDGPU/SI: Add support for 8-byte relocations
Tom Stellard via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 7 12:21:03 PDT 2016
tstellarAMD updated this revision to Diff 73967.
tstellarAMD added a comment.
Remove debug statements.
https://reviews.llvm.org/D25375
Files:
lib/Target/AMDGPU/MCTargetDesc/AMDGPUELFObjectWriter.cpp
test/MC/AMDGPU/reloc.s
Index: test/MC/AMDGPU/reloc.s
===================================================================
--- test/MC/AMDGPU/reloc.s
+++ test/MC/AMDGPU/reloc.s
@@ -1,10 +1,15 @@
// RUN: llvm-mc -filetype=obj -triple amdgcn-- -mcpu=kaveri -show-encoding %s | llvm-readobj -relocations | FileCheck %s
// CHECK: Relocations [
+// CHECK: .rel.text {
// CHECK: R_AMDGPU_ABS32_LO SCRATCH_RSRC_DWORD0 0x0
// CHECK: R_AMDGPU_ABS32_HI SCRATCH_RSRC_DWORD1 0x0
// CHECK: R_AMDGPU_GOTPCREL global_var 0x0
// CHECK: R_AMDGPU_ABS32 var 0x0
+// CHECK: }
+// CHECK: .rel.data {
+// CHECK: R_AMDGPU_ABS64 temp 0x0
+// CHECK: }
// CHECK: ]
kernel:
@@ -18,3 +23,13 @@
.section nonalloc, "w", @progbits
.long var, common_var
+
+
+// 8 byte relocations
+ .type ptr, at object
+ .data
+ .globl ptr
+ .p2align 3
+ptr:
+ .quad temp
+ .size ptr, 8
Index: lib/Target/AMDGPU/MCTargetDesc/AMDGPUELFObjectWriter.cpp
===================================================================
--- lib/Target/AMDGPU/MCTargetDesc/AMDGPUELFObjectWriter.cpp
+++ lib/Target/AMDGPU/MCTargetDesc/AMDGPUELFObjectWriter.cpp
@@ -62,6 +62,8 @@
case FK_Data_4:
case FK_SecRel_4:
return ELF::R_AMDGPU_ABS32;
+ case FK_Data_8:
+ return ELF::R_AMDGPU_ABS64;
}
llvm_unreachable("unhandled relocation type");
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D25375.73967.patch
Type: text/x-patch
Size: 1284 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161007/12f4a62d/attachment.bin>
More information about the llvm-commits
mailing list