1 ## This test is checking the handling of valid note entries for AMDGPU code
4 ## Big endian is not supported for AMDGPU targets.
5 # XFAIL: host-byteorder-big-endian
7 # RUN: yaml2obj %s -o %t.o
8 # RUN: llvm-readobj --notes %t.o | FileCheck %s --match-full-lines --check-prefix=LLVM
9 # RUN: llvm-readelf --notes %t.o | FileCheck %s --match-full-lines --check-prefix=GNU
12 # LLVM-NEXT: NoteSection {
13 # LLVM-NEXT: Name: .note.nt_amd_hsa_code_object_version
14 # LLVM-NEXT: Offset: 0x40
15 # LLVM-NEXT: Size: 0x18
17 # LLVM-NEXT: Owner: AMD
18 # LLVM-NEXT: Data size: 0x8
19 # LLVM-NEXT: Type: NT_AMD_HSA_CODE_OBJECT_VERSION (AMD HSA Code Object Version)
20 # LLVM-NEXT: AMD HSA Code Object Version: [Major: 2, Minor: 1]
23 # LLVM-NEXT: NoteSection {
24 # LLVM-NEXT: Name: .note.nt_amd_hsa_hsail
25 # LLVM-NEXT: Offset: 0x58
26 # 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]
34 # LLVM-NEXT: NoteSection {
35 # LLVM-NEXT: Name: .note.nt_amd_hsa_isa_version
36 # LLVM-NEXT: Offset: 0x74
37 # LLVM-NEXT: Size: 0x2C
39 # LLVM-NEXT: Owner: AMD
40 # LLVM-NEXT: Data size: 0x1B
41 # LLVM-NEXT: Type: NT_AMD_HSA_ISA_VERSION (AMD HSA ISA Version)
42 # LLVM-NEXT: AMD HSA ISA Version: [Vendor: AMD, Architecture: AMDGPU, Major: 8, Minor: 0, Stepping: 2]
45 # LLVM-NEXT: NoteSection {
46 # LLVM-NEXT: Name: .note.nt_amd_hsa_metadata_0
47 # LLVM-NEXT: Offset: 0xA0
48 # LLVM-NEXT: Size: 0x10
50 # LLVM-NEXT: Owner: AMD
51 # LLVM-NEXT: Data size: 0x0
52 # LLVM-NEXT: Type: NT_AMD_HSA_METADATA (AMD HSA Metadata)
53 # LLVM-NEXT: AMD HSA Metadata:
56 # LLVM-NEXT: NoteSection {
57 # LLVM-NEXT: Name: .note.nt_amd_hsa_metadata_1
58 # LLVM-NEXT: Offset: 0xB0
59 # LLVM-NEXT: Size: 0x18
61 # LLVM-NEXT: Owner: AMD
62 # LLVM-NEXT: Data size: 0x6
63 # LLVM-NEXT: Type: NT_AMD_HSA_METADATA (AMD HSA Metadata)
64 # LLVM-NEXT: AMD HSA Metadata: abcde
67 # LLVM-NEXT: NoteSection {
68 # LLVM-NEXT: Name: .note.nt_amd_hsa_isa_name_0
69 # LLVM-NEXT: Offset: 0xC8
70 # LLVM-NEXT: Size: 0x10
72 # LLVM-NEXT: Owner: AMD
73 # LLVM-NEXT: Data size: 0x0
74 # LLVM-NEXT: Type: NT_AMD_HSA_ISA_NAME (AMD HSA ISA Name)
75 # LLVM-NEXT: AMD HSA ISA Name:
78 # LLVM-NEXT: NoteSection {
79 # LLVM-NEXT: Name: .note.nt_amd_hsa_isa_name_1
80 # LLVM-NEXT: Offset: 0xD8
81 # LLVM-NEXT: Size: 0x18
83 # LLVM-NEXT: Owner: AMD
84 # LLVM-NEXT: Data size: 0x6
85 # LLVM-NEXT: Type: NT_AMD_HSA_ISA_NAME (AMD HSA ISA Name)
86 # LLVM-NEXT: AMD HSA ISA Name: abcdef
89 # LLVM-NEXT: NoteSection {
90 # LLVM-NEXT: Name: .note.nt_amd_pal_metadata
91 # LLVM-NEXT: Offset: 0xF0
92 # LLVM-NEXT: Size: 0x28
94 # LLVM-NEXT: Owner: AMD
95 # LLVM-NEXT: Data size: 0x18
96 # LLVM-NEXT: Type: NT_AMD_PAL_METADATA (AMD PAL Metadata)
97 # LLVM-NEXT: AMD PAL Metadata: [2: 1][4: 2][8: 4]
102 # GNU: Displaying notes found in: .note.nt_amd_hsa_code_object_version
103 # GNU-NEXT: Owner Data size Description
104 # GNU-NEXT: AMD 0x00000008 NT_AMD_HSA_CODE_OBJECT_VERSION (AMD HSA Code Object Version)
105 # GNU-NEXT: AMD HSA Code Object Version:
106 # GNU-NEXT: [Major: 2, Minor: 1]
108 # GNU-NEXT: Displaying notes found in: .note.nt_amd_hsa_hsail
109 # GNU-NEXT: Owner Data size Description
110 # GNU-NEXT: AMD 0x0000000c NT_AMD_HSA_HSAIL (AMD HSA HSAIL Properties)
111 # GNU-NEXT: AMD HSA HSAIL Properties:
112 # GNU-NEXT: [HSAIL Major: 2, HSAIL Minor: 1, Profile: 1, Machine Model: 2, Default Float Round: 3]
114 # GNU-NEXT: Displaying notes found in: .note.nt_amd_hsa_isa_version
115 # GNU-NEXT: Owner Data size Description
116 # GNU-NEXT: AMD 0x0000001b NT_AMD_HSA_ISA_VERSION (AMD HSA ISA Version)
117 # GNU-NEXT: AMD HSA ISA Version:
118 # GNU-NEXT: [Vendor: AMD, Architecture: AMDGPU, Major: 8, Minor: 0, Stepping: 2]
120 # GNU-NEXT: Displaying notes found in: .note.nt_amd_hsa_metadata_0
121 # GNU-NEXT: Owner Data size Description
122 # GNU-NEXT: AMD 0x00000000 NT_AMD_HSA_METADATA (AMD HSA Metadata)
123 # GNU-NEXT: AMD HSA Metadata:
126 # GNU-NEXT: Displaying notes found in: .note.nt_amd_hsa_metadata_1
127 # GNU-NEXT: Owner Data size Description
128 # GNU-NEXT: AMD 0x00000006 NT_AMD_HSA_METADATA (AMD HSA Metadata)
129 # GNU-NEXT: AMD HSA Metadata:
132 # GNU-NEXT: Displaying notes found in: .note.nt_amd_hsa_isa_name_0
133 # GNU-NEXT: Owner Data size Description
134 # GNU-NEXT: AMD 0x00000000 NT_AMD_HSA_ISA_NAME (AMD HSA ISA Name)
135 # GNU-NEXT: AMD HSA ISA Name:
138 # GNU-NEXT: Displaying notes found in: .note.nt_amd_hsa_isa_name_1
139 # GNU-NEXT: Owner Data size Description
140 # GNU-NEXT: AMD 0x00000006 NT_AMD_HSA_ISA_NAME (AMD HSA ISA Name)
141 # GNU-NEXT: AMD HSA ISA Name:
144 # GNU-NEXT: Displaying notes found in: .note.nt_amd_pal_metadata
145 # GNU-NEXT: Owner Data size Description
146 # GNU-NEXT: AMD 0x00000018 NT_AMD_PAL_METADATA (AMD PAL Metadata)
147 # GNU-NEXT: AMD PAL Metadata:
148 # GNU-NEXT: [2: 1][4: 2][8: 4]
156 - Name: .note.nt_amd_hsa_code_object_version
160 Type: NT_AMD_HSA_CODE_OBJECT_VERSION
161 Desc: '0200000001000000'
162 - Name: .note.nt_amd_hsa_hsail
166 Type: NT_AMD_HSA_HSAIL
167 Desc: '020000000100000001020300'
168 - Name: .note.nt_amd_hsa_isa_version
172 Type: NT_AMD_HSA_ISA_VERSION
173 Desc: '04000700080000000000000002000000414d4400414d4447505500'
174 - Name: .note.nt_amd_hsa_metadata_0
178 Type: NT_AMD_HSA_METADATA
181 - Name: .note.nt_amd_hsa_metadata_1
185 Type: NT_AMD_HSA_METADATA
187 - Name: .note.nt_amd_hsa_isa_name_0
191 Type: NT_AMD_HSA_ISA_NAME
194 - Name: .note.nt_amd_hsa_isa_name_1
198 Type: NT_AMD_HSA_ISA_NAME
200 - Name: .note.nt_amd_pal_metadata
204 Type: NT_AMD_PAL_METADATA
205 Desc: '020000000100000004000000020000000800000004000000'