xref: /llvm-project/llvm/test/MC/AMDGPU/elf-header-cov.s (revision bc82cfb38d83f1afeb2c290aa472c2e2e88919cb)
1// RUN: sed 's/COV/4/g' %s | llvm-mc -triple amdgcn-amd-amdhsa -mcpu=gfx802 -filetype=obj | \
2// RUN:   llvm-readobj --file-headers - | FileCheck %s --check-prefixes=HS4
3
4// RUN: sed 's/COV/5/g' %s | llvm-mc -triple amdgcn-amd-amdhsa -mcpu=gfx802 -filetype=obj | \
5// RUN:   llvm-readobj --file-headers - | FileCheck %s --check-prefixes=HS5
6
7// RUN: sed 's/COV/4/g' %s | not llvm-mc -triple amdgcn-amd-amdpal -mcpu=gfx802 2>&1 | \
8// RUN:   FileCheck %s --check-prefix=ERR
9
10// RUN: sed 's/COV/4/g' %s | not llvm-mc -triple amdgcn-amd-mesa3d -mcpu=gfx802 2>&1 | \
11// RUN:   FileCheck %s --check-prefix=ERR
12
13// RUN: sed 's/COV/4/g' %s | not llvm-mc -triple amdgcn-amd- -mcpu=gfx802 2>&1 | \
14// RUN:   FileCheck %s --check-prefix=ERR
15
16.amdhsa_code_object_version COV
17
18// ERR: error: unknown directive
19
20// HS4: OS/ABI: AMDGPU_HSA (0x40)
21// HS4-NEXT: ABIVersion: 2
22
23// HS5: OS/ABI: AMDGPU_HSA (0x40)
24// HS5-NEXT: ABIVersion: 3
25