1# RUN: yaml2obj %s -o %t -DCPU=GFX600
2# RUN: llvm-readobj -h %t | FileCheck %s --match-full-lines -DFILE=%t -DCPU=GFX600 -DFLAGS=0x20
3
4# RUN: yaml2obj %s -o %t -DCPU=GFX601
5# RUN: llvm-readobj -h %t | FileCheck %s --match-full-lines -DFILE=%t -DCPU=GFX601 -DFLAGS=0x21
6
7# RUN: yaml2obj %s -o %t -DCPU=GFX602
8# RUN: llvm-readobj -h %t | FileCheck %s --match-full-lines -DFILE=%t -DCPU=GFX602 -DFLAGS=0x3A
9
10# RUN: yaml2obj %s -o %t -DCPU=GFX700
11# RUN: llvm-readobj -h %t | FileCheck %s --match-full-lines -DFILE=%t -DCPU=GFX700 -DFLAGS=0x22
12
13# RUN: yaml2obj %s -o %t -DCPU=GFX701
14# RUN: llvm-readobj -h %t | FileCheck %s --match-full-lines -DFILE=%t -DCPU=GFX701 -DFLAGS=0x23
15
16# RUN: yaml2obj %s -o %t -DCPU=GFX702
17# RUN: llvm-readobj -h %t | FileCheck %s --match-full-lines -DFILE=%t -DCPU=GFX702 -DFLAGS=0x24
18
19# RUN: yaml2obj %s -o %t -DCPU=GFX703
20# RUN: llvm-readobj -h %t | FileCheck %s --match-full-lines -DFILE=%t -DCPU=GFX703 -DFLAGS=0x25
21
22# RUN: yaml2obj %s -o %t -DCPU=GFX704
23# RUN: llvm-readobj -h %t | FileCheck %s --match-full-lines -DFILE=%t -DCPU=GFX704 -DFLAGS=0x26
24
25# RUN: yaml2obj %s -o %t -DCPU=GFX705
26# RUN: llvm-readobj -h %t | FileCheck %s --match-full-lines -DFILE=%t -DCPU=GFX705 -DFLAGS=0x3B
27
28# RUN: yaml2obj %s -o %t -DCPU=GFX801
29# RUN: llvm-readobj -h %t | FileCheck %s --match-full-lines -DFILE=%t -DCPU=GFX801 -DFLAGS=0x28
30
31# RUN: yaml2obj %s -o %t -DCPU=GFX802
32# RUN: llvm-readobj -h %t | FileCheck %s --match-full-lines -DFILE=%t -DCPU=GFX802 -DFLAGS=0x29
33
34# RUN: yaml2obj %s -o %t -DCPU=GFX803
35# RUN: llvm-readobj -h %t | FileCheck %s --match-full-lines -DFILE=%t -DCPU=GFX803 -DFLAGS=0x2A
36
37# RUN: yaml2obj %s -o %t -DCPU=GFX805
38# RUN: llvm-readobj -h %t | FileCheck %s --match-full-lines -DFILE=%t -DCPU=GFX805 -DFLAGS=0x3C
39
40# RUN: yaml2obj %s -o %t -DCPU=GFX810
41# RUN: llvm-readobj -h %t | FileCheck %s --match-full-lines -DFILE=%t -DCPU=GFX810 -DFLAGS=0x2B
42
43# RUN: yaml2obj %s -o %t -DCPU=GFX900
44# RUN: llvm-readobj -h %t | FileCheck %s --match-full-lines -DFILE=%t -DCPU=GFX900 -DFLAGS=0x2C
45
46# RUN: yaml2obj %s -o %t -DCPU=GFX902
47# RUN: llvm-readobj -h %t | FileCheck %s --match-full-lines -DFILE=%t -DCPU=GFX902 -DFLAGS=0x2D
48
49# RUN: yaml2obj %s -o %t -DCPU=GFX904
50# RUN: llvm-readobj -h %t | FileCheck %s --match-full-lines -DFILE=%t -DCPU=GFX904 -DFLAGS=0x2E
51
52# RUN: yaml2obj %s -o %t -DCPU=GFX906
53# RUN: llvm-readobj -h %t | FileCheck %s --match-full-lines -DFILE=%t -DCPU=GFX906 -DFLAGS=0x2F
54
55# RUN: yaml2obj %s -o %t -DCPU=GFX908
56# RUN: llvm-readobj -h %t | FileCheck %s --match-full-lines -DFILE=%t -DCPU=GFX908 -DFLAGS=0x30
57
58# RUN: yaml2obj %s -o %t -DCPU=GFX909
59# RUN: llvm-readobj -h %t | FileCheck %s --match-full-lines -DFILE=%t -DCPU=GFX909 -DFLAGS=0x31
60
61# RUN: yaml2obj %s -o %t -DCPU=GFX90C
62# RUN: llvm-readobj -h %t | FileCheck %s --match-full-lines -DFILE=%t -DCPU=GFX90C -DFLAGS=0x32
63
64# RUN: yaml2obj %s -o %t -DCPU=GFX1010
65# RUN: llvm-readobj -h %t | FileCheck %s --match-full-lines -DFILE=%t -DCPU=GFX1010 -DFLAGS=0x33
66
67# RUN: yaml2obj %s -o %t -DCPU=GFX1011
68# RUN: llvm-readobj -h %t | FileCheck %s --match-full-lines -DFILE=%t -DCPU=GFX1011 -DFLAGS=0x34
69
70# RUN: yaml2obj %s -o %t -DCPU=GFX1012
71# RUN: llvm-readobj -h %t | FileCheck %s --match-full-lines -DFILE=%t -DCPU=GFX1012 -DFLAGS=0x35
72
73# RUN: yaml2obj %s -o %t -DCPU=GFX1030
74# RUN: llvm-readobj -h %t | FileCheck %s --match-full-lines -DFILE=%t -DCPU=GFX1030 -DFLAGS=0x36
75
76# RUN: yaml2obj %s -o %t -DCPU=GFX1031
77# RUN: llvm-readobj -h %t | FileCheck %s --match-full-lines -DFILE=%t -DCPU=GFX1031 -DFLAGS=0x37
78
79# RUN: yaml2obj %s -o %t -DCPU=GFX1032
80# RUN: llvm-readobj -h %t | FileCheck %s --match-full-lines -DFILE=%t -DCPU=GFX1032 -DFLAGS=0x38
81
82# RUN: yaml2obj %s -o %t -DCPU=GFX1033
83# RUN: llvm-readobj -h %t | FileCheck %s --match-full-lines -DFILE=%t -DCPU=GFX1033 -DFLAGS=0x39
84
85--- !ELF
86FileHeader:
87  Class:           ELFCLASS64
88  Data:            ELFDATA2LSB
89  OSABI:           ELFOSABI_AMDGPU_HSA
90  Type:            ET_REL
91  Machine:         EM_AMDGPU
92  Flags:           [ EF_AMDGPU_MACH_AMDGCN_[[CPU]] ]
93
94# CHECK:      File: [[FILE]]
95# CHECK-NEXT: Format: elf64-amdgpu
96# CHECK-NEXT: Arch: amdgcn
97# CHECK-NEXT: AddressSize: 64bit
98# CHECK-NEXT: LoadName: <Not found>
99# CHECK-NEXT: ElfHeader {
100# CHECK-NEXT:   Ident {
101# CHECK-NEXT:     Magic: (7F 45 4C 46)
102# CHECK-NEXT:     Class: 64-bit (0x2)
103# CHECK-NEXT:     DataEncoding: LittleEndian (0x1)
104# CHECK-NEXT:     FileVersion: 1
105# CHECK-NEXT:     OS/ABI: AMDGPU_HSA (0x40)
106# CHECK-NEXT:     ABIVersion: 0
107# CHECK-NEXT:     Unused: (00 00 00 00 00 00 00)
108# CHECK-NEXT:   }
109# CHECK-NEXT:   Type: Relocatable (0x1)
110# CHECK-NEXT:   Machine: EM_AMDGPU (0xE0)
111# CHECK-NEXT:   Version: 1
112# CHECK-NEXT:   Entry: 0x0
113# CHECK-NEXT:   ProgramHeaderOffset: 0x0
114# CHECK-NEXT:   SectionHeaderOffset: 0x58
115# CHECK-NEXT:     Flags [ ([[FLAGS]])
116# CHECK-NEXT:     EF_AMDGPU_MACH_AMDGCN_[[CPU]] ([[FLAGS]])
117# CHECK-NEXT:   ]
118# CHECK-NEXT:   HeaderSize: 64
119# CHECK-NEXT:   ProgramHeaderEntrySize: 0
120# CHECK-NEXT:   ProgramHeaderCount: 0
121# CHECK-NEXT:   SectionHeaderEntrySize: 64
122# CHECK-NEXT:   SectionHeaderCount: 3
123# CHECK-NEXT:   StringTableSectionIndex: 2
124# CHECK-NEXT: }
125