[gn] port afa8aeeeec (RISCVGenExegesis.inc)
[llvm-project.git] / llvm / test / tools / llvm-readobj / ELF / note-amdgpu-invalid.s
blob39f3e4b4e462318a08f07177bc588f0d5051e20b
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
10 # GNU-NEXT: ---
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
22 # GNU-NEXT: ...
23 # GNU-EMPTY:
24 # GNU-EMPTY:
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
29 # GNU-NEXT: AMDGPU 0x00000003 NT_AMDGPU_METADATA (AMDGPU Metadata)
30 # GNU-NEXT: description data: ab cd ef
31 # GNU-EMPTY:
33 # LLVM: NoteSections [
34 # LLVM-NEXT: NoteSection {
35 # LLVM-NEXT: Name: .note.foo
36 # LLVM-NEXT: Offset: 0x40
37 # LLVM-NEXT: Size: 0xE8
38 # LLVM-NEXT: Notes [
39 # LLVM-NEXT: {
40 # LLVM-NEXT: Owner: AMDGPU
41 # LLVM-NEXT: Data size: 0xD4
42 # LLVM-NEXT: Type: NT_AMDGPU_METADATA (AMDGPU Metadata)
43 # LLVM-NEXT: AMDGPU Metadata: Invalid AMDGPU Metadata
44 # LLVM-NEXT: ---
45 # LLVM-NEXT: amdhsa.kernels:
46 # LLVM-NEXT: - .group_segment_fixed_size: 2
47 # LLVM-NEXT: .kernarg_segment_align: 4
48 # LLVM-NEXT: .kernarg_segment_size: 1
49 # LLVM-NEXT: .max_flat_workgroup_size: 8
50 # LLVM-NEXT: .name: foo
51 # LLVM-NEXT: .private_segment_fixed_size: 3
52 # LLVM-NEXT: .sgpr_count: 6
53 # LLVM-NEXT: .symbol: foo
54 # LLVM-NEXT: .vgpr_count: 7
55 # LLVM-NEXT: .wavefront_size: 5
56 # LLVM-NEXT: ...
57 # LLVM-EMPTY:
58 # LLVM-NEXT: }
59 # LLVM-NEXT: ]
60 # LLVM-NEXT: }
61 # LLVM-NEXT: NoteSection {
62 # LLVM-NEXT: Name: .note.bar
63 # LLVM-NEXT: Offset: 0x128
64 # LLVM-NEXT: Size: 0x30
65 # LLVM-NEXT: Notes [
66 # LLVM-NEXT: {
67 # LLVM-NEXT: Owner: AMDGPU
68 # LLVM-NEXT: Data size: 0x3
69 # LLVM-NEXT: Type: NT_AMDGPU_METADATA (AMDGPU Metadata)
70 # LLVM-NEXT: Description data (
71 # LLVM-NEXT: 0000: 123456 |.4V|
72 # LLVM-NEXT: )
73 # LLVM-NEXT: }
74 # LLVM-NEXT: {
75 # LLVM-NEXT: Owner: AMDGPU
76 # LLVM-NEXT: Data size: 0x3
77 # LLVM-NEXT: Type: NT_AMDGPU_METADATA (AMDGPU Metadata)
78 # LLVM-NEXT: Description data (
79 # LLVM-NEXT: 0000: ABCDEF |...|
80 # LLVM-NEXT: )
81 # LLVM-NEXT: }
82 # LLVM-NEXT: ]
83 # LLVM-NEXT: }
84 # LLVM-NEXT:]
86 ## Use yaml2obj instead of llvm-mc for more test portability. This was
87 ## generated by grabbing section data from note-amdgpu.s and removing the amdhsa.version field.
89 --- !ELF
90 FileHeader:
91 Class: ELFCLASS64
92 Data: ELFDATA2LSB
93 Type: ET_REL
94 Sections:
95 - Name: .note.foo
96 Type: SHT_NOTE
97 Content: 07000000D400000020000000414D44475055000081ae616d646873612e6b65726e656c73918ab92e67726f75705f7365676d656e745f66697865645f73697a6502b62e6b65726e6172675f7365676d656e745f616c69676e04b52e6b65726e6172675f7365676d656e745f73697a6501b82e6d61785f666c61745f776f726b67726f75705f73697a6508a52e6e616d65a3666f6fbb2e707269766174655f7365676d656e745f66697865645f73697a6503ab2e736770725f636f756e7406a72e73796d626f6ca3666f6fab2e766770725f636f756e7407af2e7761766566726f6e745f73697a6505
98 - Name: .note.bar
99 Type: SHT_NOTE
100 Notes:
101 - Name: AMDGPU
102 Type: NT_AMDGPU_METADATA
103 Desc: '123456'
104 - Name: AMDGPU
105 Type: NT_AMDGPU_METADATA
106 Desc: 'abcdef'