1 # RUN: yaml2obj %s -o %t.o
2 # RUN: llvm-readobj --notes %t.o | FileCheck %s --check-prefix=LLVM
3 # RUN: llvm-readelf --notes %t.o | FileCheck %s --check-prefix=GNU
5 # GNU: Displaying notes found in: .note.foo
6 # GNU-NEXT: Owner Data size Description
7 # GNU-NEXT: AMDGPU 0x000000d4 NT_AMDGPU_METADATA (AMDGPU Metadata)
8 # GNU-NEXT: AMDGPU Metadata:
9 # GNU-NEXT: Invalid AMDGPU Metadata
11 # GNU-NEXT: amdhsa.kernels:
12 # GNU-NEXT: - .group_segment_fixed_size: 2
13 # GNU-NEXT: .kernarg_segment_align: 4
14 # GNU-NEXT: .kernarg_segment_size: 1
15 # GNU-NEXT: .max_flat_workgroup_size: 8
16 # GNU-NEXT: .name: foo
17 # GNU-NEXT: .private_segment_fixed_size: 3
18 # GNU-NEXT: .sgpr_count: 6
19 # GNU-NEXT: .symbol: foo
20 # GNU-NEXT: .vgpr_count: 7
21 # GNU-NEXT: .wavefront_size: 5
25 # GNU-NEXT: Displaying notes found in: .note.bar
26 # GNU-NEXT: Owner Data size Description
27 # GNU-NEXT: AMDGPU 0x00000003 NT_AMDGPU_METADATA (AMDGPU Metadata)
28 # GNU-NEXT: description data: 12 34 56
32 # LLVM-NEXT: NoteSection {
33 # LLVM-NEXT: Name: .note.foo
34 # LLVM-NEXT: Offset: 0x40
35 # LLVM-NEXT: Size: 0xE8
37 # LLVM-NEXT: Owner: AMDGPU
38 # LLVM-NEXT: Data size: 0xD4
39 # LLVM-NEXT: Type: NT_AMDGPU_METADATA (AMDGPU Metadata)
40 # LLVM-NEXT: AMDGPU Metadata: Invalid AMDGPU Metadata
42 # LLVM-NEXT: amdhsa.kernels:
43 # LLVM-NEXT: - .group_segment_fixed_size: 2
44 # LLVM-NEXT: .kernarg_segment_align: 4
45 # LLVM-NEXT: .kernarg_segment_size: 1
46 # LLVM-NEXT: .max_flat_workgroup_size: 8
47 # LLVM-NEXT: .name: foo
48 # LLVM-NEXT: .private_segment_fixed_size: 3
49 # LLVM-NEXT: .sgpr_count: 6
50 # LLVM-NEXT: .symbol: foo
51 # LLVM-NEXT: .vgpr_count: 7
52 # LLVM-NEXT: .wavefront_size: 5
57 # LLVM-NEXT: NoteSection {
58 # LLVM-NEXT: Name: .note.bar
59 # LLVM-NEXT: Offset: 0x128
60 # LLVM-NEXT: Size: 0x18
62 # LLVM-NEXT: Owner: AMDGPU
63 # LLVM-NEXT: Data size: 0x3
64 # LLVM-NEXT: Type: NT_AMDGPU_METADATA (AMDGPU Metadata)
65 # LLVM-NEXT: Description data (
66 # LLVM-NEXT: 0000: 123456 |.4V|
72 ## Use yaml2obj instead of llvm-mc for more test portability. This was
73 ## generated by grabbing section data from note-amdgpu.s and removing the amdhsa.version field.
83 Content
: 07000000D400000020000000414D44475055000081ae616d646873612e6b65726e656c73918ab92e67726f75705f7365676d656e745f66697865645f73697a6502b62e6b65726e6172675f7365676d656e745f616c69676e04b52e6b65726e6172675f7365676d656e745f73697a6501b82e6d61785f666c61745f776f726b67726f75705f73697a6508a52e6e616d65a3666f6fbb2e707269766174655f7365676d656e745f66697865645f73697a6503ab2e736770725f636f756e7406a72e73796d626f6ca3666f6fab2e766770725f636f756e7407af2e7761766566726f6e745f73697a6505
88 Type
: NT_AMDGPU_METADATA
90 # TODO: https://bugs.llvm.org/show_bug.cgi?id=49034
92 # Type: NT_AMDGPU_METADATA