[PATCH] D122190: [AMDGPU][LLD] Adding support for ABI version 5 option
Jacob Lambert via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 22 16:50:46 PDT 2022
lamb-j updated this revision to Diff 417437.
lamb-j added a comment.
Switching test
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D122190/new/
https://reviews.llvm.org/D122190
Files:
lld/ELF/Arch/AMDGPU.cpp
lld/test/ELF/amdgpu-abi-version.s
Index: lld/test/ELF/amdgpu-abi-version.s
===================================================================
--- lld/test/ELF/amdgpu-abi-version.s
+++ lld/test/ELF/amdgpu-abi-version.s
@@ -1,10 +1,24 @@
# REQUIRES: amdgpu
# RUN: llvm-mc -triple amdgcn-amd-amdhsa -mcpu=gfx900 --amdhsa-code-object-version=3 -filetype=obj %s -o %t.o
# RUN: ld.lld -shared %t.o -o %t.so
-# RUN: llvm-readobj --file-headers %t.so | FileCheck %s
+# RUN: llvm-readobj --file-headers %t.so | FileCheck --check-prefix=COV3 %s
-# CHECK: OS/ABI: AMDGPU_HSA (0x40)
-# CHECK: ABIVersion: 1
+# COV3: OS/ABI: AMDGPU_HSA (0x40)
+# COV3: ABIVersion: 1
+
+# RUN: llvm-mc -triple amdgcn-amd-amdhsa -mcpu=gfx900 --amdhsa-code-object-version=4 -filetype=obj %s -o %t.o
+# RUN: ld.lld -shared %t.o -o %t.so
+# RUN: llvm-readobj --file-headers %t.so | FileCheck --check-prefix=COV4 %s
+
+# COV4: OS/ABI: AMDGPU_HSA (0x40)
+# COV4: ABIVersion: 2
+
+# RUN: llvm-mc -triple amdgcn-amd-amdhsa -mcpu=gfx900 --amdhsa-code-object-version=5 -filetype=obj %s -o %t.o
+# RUN: ld.lld -shared %t.o -o %t.so
+# RUN: llvm-readobj --file-headers %t.so | FileCheck --check-prefix=COV5 %s
+
+# COV5: OS/ABI: AMDGPU_HSA (0x40)
+# COV5: ABIVersion: 3
.text
s_nop 0x0
Index: lld/ELF/Arch/AMDGPU.cpp
===================================================================
--- lld/ELF/Arch/AMDGPU.cpp
+++ lld/ELF/Arch/AMDGPU.cpp
@@ -114,6 +114,7 @@
case ELFABIVERSION_AMDGPU_HSA_V3:
return calcEFlagsV3();
case ELFABIVERSION_AMDGPU_HSA_V4:
+ case ELFABIVERSION_AMDGPU_HSA_V5:
return calcEFlagsV4();
default:
error("unknown abi version: " + Twine(abiVersion));
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D122190.417437.patch
Type: text/x-patch
Size: 1632 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220322/4db94ca1/attachment.bin>
More information about the llvm-commits
mailing list