1 ## This test is checking the handling of valid note entries for AMDGPU code
4 # RUN: yaml2obj %s -o %t.o
5 # RUN: llvm-readobj --notes %t.o | FileCheck %s --match-full-lines --check-prefix=LLVM
6 # RUN: llvm-readelf --notes %t.o | FileCheck %s --match-full-lines --check-prefix=GNU
9 # LLVM-NEXT: NoteSection {
10 # LLVM-NEXT: Name: .note.nt_amd_hsa_code_object_version
11 # LLVM-NEXT: Offset: 0x40
12 # LLVM-NEXT: Size: 0x18
15 # LLVM-NEXT: Owner: AMD
16 # LLVM-NEXT: Data size: 0x8
17 # LLVM-NEXT: Type: NT_AMD_HSA_CODE_OBJECT_VERSION (AMD HSA Code Object Version)
18 # LLVM-NEXT: AMD HSA Code Object Version: [Major: 2, Minor: 1]
22 # LLVM-NEXT: NoteSection {
23 # LLVM-NEXT: Name: .note.nt_amd_hsa_hsail
24 # LLVM-NEXT: Offset: 0x58
25 # LLVM-NEXT: Size: 0x1C
28 # LLVM-NEXT: Owner: AMD
29 # LLVM-NEXT: Data size: 0xC
30 # LLVM-NEXT: Type: NT_AMD_HSA_HSAIL (AMD HSA HSAIL Properties)
31 # LLVM-NEXT: AMD HSA HSAIL Properties: [HSAIL Major: 2, HSAIL Minor: 1, Profile: 1, Machine Model: 2, Default Float Round: 3]
35 # LLVM-NEXT: NoteSection {
36 # LLVM-NEXT: Name: .note.nt_amd_hsa_isa_version
37 # LLVM-NEXT: Offset: 0x74
38 # LLVM-NEXT: Size: 0x2C
41 # LLVM-NEXT: Owner: AMD
42 # LLVM-NEXT: Data size: 0x1B
43 # LLVM-NEXT: Type: NT_AMD_HSA_ISA_VERSION (AMD HSA ISA Version)
44 # LLVM-NEXT: AMD HSA ISA Version: [Vendor: AMD, Architecture: AMDGPU, Major: 8, Minor: 0, Stepping: 2]
48 # LLVM-NEXT: NoteSection {
49 # LLVM-NEXT: Name: .note.nt_amd_hsa_metadata_0
50 # LLVM-NEXT: Offset: 0xA0
51 # LLVM-NEXT: Size: 0x10
54 # LLVM-NEXT: Owner: AMD
55 # LLVM-NEXT: Data size: 0x0
56 # LLVM-NEXT: Type: NT_AMD_HSA_METADATA (AMD HSA Metadata)
57 # LLVM-NEXT: AMD HSA Metadata:
61 # LLVM-NEXT: NoteSection {
62 # LLVM-NEXT: Name: .note.nt_amd_hsa_metadata_1
63 # LLVM-NEXT: Offset: 0xB0
64 # LLVM-NEXT: Size: 0x18
67 # LLVM-NEXT: Owner: AMD
68 # LLVM-NEXT: Data size: 0x6
69 # LLVM-NEXT: Type: NT_AMD_HSA_METADATA (AMD HSA Metadata)
70 # LLVM-NEXT: AMD HSA Metadata: abcde
74 # LLVM-NEXT: NoteSection {
75 # LLVM-NEXT: Name: .note.nt_amd_hsa_isa_name_0
76 # LLVM-NEXT: Offset: 0xC8
77 # LLVM-NEXT: Size: 0x10
80 # LLVM-NEXT: Owner: AMD
81 # LLVM-NEXT: Data size: 0x0
82 # LLVM-NEXT: Type: NT_AMD_HSA_ISA_NAME (AMD HSA ISA Name)
83 # LLVM-NEXT: AMD HSA ISA Name:
87 # LLVM-NEXT: NoteSection {
88 # LLVM-NEXT: Name: .note.nt_amd_hsa_isa_name_1
89 # LLVM-NEXT: Offset: 0xD8
90 # LLVM-NEXT: Size: 0x18
93 # LLVM-NEXT: Owner: AMD
94 # LLVM-NEXT: Data size: 0x6
95 # LLVM-NEXT: Type: NT_AMD_HSA_ISA_NAME (AMD HSA ISA Name)
96 # LLVM-NEXT: AMD HSA ISA Name: abcdef
100 # LLVM-NEXT: NoteSection {
101 # LLVM-NEXT: Name: .note.nt_amd_pal_metadata
102 # LLVM-NEXT: Offset: 0xF0
103 # LLVM-NEXT: Size: 0x28
106 # LLVM-NEXT: Owner: AMD
107 # LLVM-NEXT: Data size: 0x18
108 # LLVM-NEXT: Type: NT_AMD_PAL_METADATA (AMD PAL Metadata)
109 # LLVM-NEXT: AMD PAL Metadata: [2: 1][4: 2][8: 4]
115 # GNU: Displaying notes found in: .note.nt_amd_hsa_code_object_version
116 # GNU-NEXT: Owner Data size Description
117 # GNU-NEXT: AMD 0x00000008 NT_AMD_HSA_CODE_OBJECT_VERSION (AMD HSA Code Object Version)
118 # GNU-NEXT: AMD HSA Code Object Version:
119 # GNU-NEXT: [Major: 2, Minor: 1]
121 # GNU-NEXT: Displaying notes found in: .note.nt_amd_hsa_hsail
122 # GNU-NEXT: Owner Data size Description
123 # GNU-NEXT: AMD 0x0000000c NT_AMD_HSA_HSAIL (AMD HSA HSAIL Properties)
124 # GNU-NEXT: AMD HSA HSAIL Properties:
125 # GNU-NEXT: [HSAIL Major: 2, HSAIL Minor: 1, Profile: 1, Machine Model: 2, Default Float Round: 3]
127 # GNU-NEXT: Displaying notes found in: .note.nt_amd_hsa_isa_version
128 # GNU-NEXT: Owner Data size Description
129 # GNU-NEXT: AMD 0x0000001b NT_AMD_HSA_ISA_VERSION (AMD HSA ISA Version)
130 # GNU-NEXT: AMD HSA ISA Version:
131 # GNU-NEXT: [Vendor: AMD, Architecture: AMDGPU, Major: 8, Minor: 0, Stepping: 2]
133 # GNU-NEXT: Displaying notes found in: .note.nt_amd_hsa_metadata_0
134 # GNU-NEXT: Owner Data size Description
135 # GNU-NEXT: AMD 0x00000000 NT_AMD_HSA_METADATA (AMD HSA Metadata)
136 # GNU-NEXT: AMD HSA Metadata:
139 # GNU-NEXT: Displaying notes found in: .note.nt_amd_hsa_metadata_1
140 # GNU-NEXT: Owner Data size Description
141 # GNU-NEXT: AMD 0x00000006 NT_AMD_HSA_METADATA (AMD HSA Metadata)
142 # GNU-NEXT: AMD HSA Metadata:
145 # GNU-NEXT: Displaying notes found in: .note.nt_amd_hsa_isa_name_0
146 # GNU-NEXT: Owner Data size Description
147 # GNU-NEXT: AMD 0x00000000 NT_AMD_HSA_ISA_NAME (AMD HSA ISA Name)
148 # GNU-NEXT: AMD HSA ISA Name:
151 # GNU-NEXT: Displaying notes found in: .note.nt_amd_hsa_isa_name_1
152 # GNU-NEXT: Owner Data size Description
153 # GNU-NEXT: AMD 0x00000006 NT_AMD_HSA_ISA_NAME (AMD HSA ISA Name)
154 # GNU-NEXT: AMD HSA ISA Name:
157 # GNU-NEXT: Displaying notes found in: .note.nt_amd_pal_metadata
158 # GNU-NEXT: Owner Data size Description
159 # GNU-NEXT: AMD 0x00000018 NT_AMD_PAL_METADATA (AMD PAL Metadata)
160 # GNU-NEXT: AMD PAL Metadata:
161 # GNU-NEXT: [2: 1][4: 2][8: 4]
169 - Name: .note.nt_amd_hsa_code_object_version
173 Type: NT_AMD_HSA_CODE_OBJECT_VERSION
174 Desc: '0200000001000000'
175 - Name: .note.nt_amd_hsa_hsail
179 Type: NT_AMD_HSA_HSAIL
180 Desc: '020000000100000001020300'
181 - Name: .note.nt_amd_hsa_isa_version
185 Type: NT_AMD_HSA_ISA_VERSION
186 Desc: '04000700080000000000000002000000414d4400414d4447505500'
187 - Name: .note.nt_amd_hsa_metadata_0
191 Type: NT_AMD_HSA_METADATA
194 - Name: .note.nt_amd_hsa_metadata_1
198 Type: NT_AMD_HSA_METADATA
200 - Name: .note.nt_amd_hsa_isa_name_0
204 Type: NT_AMD_HSA_ISA_NAME
207 - Name: .note.nt_amd_hsa_isa_name_1
211 Type: NT_AMD_HSA_ISA_NAME
213 - Name: .note.nt_amd_pal_metadata
217 Type: NT_AMD_PAL_METADATA
218 Desc: '020000000100000004000000020000000800000004000000'