1 ## Tests llvm-dwarfdump handling of AMDGPU relocations. We provide a .debug_info
2 ## section with multiple DW_AT_high_pc entries (that's one of the attributes for
3 ## which relocations are resolved by llvm-dwarfdump) and we add a relocation for
4 ## each of them. The first YAML document represents an amdgcn code object, and
5 ## the second an r600 code object.
7 # RUN: yaml2obj --docnum=1 -DMACH= %s \
8 # RUN: | llvm-dwarfdump - 2>&1 | FileCheck --check-prefixes=AMDGCN,UNKNOWN %s
9 # RUN: yaml2obj --docnum=1 -DMACH=EF_AMDGPU_MACH_AMDGCN_GFX803 %s \
10 # RUN: | llvm-dwarfdump - 2>&1 | FileCheck --check-prefixes=AMDGCN,KNOWN %s
12 # RUN: yaml2obj --docnum=2 -DMACH= %s \
13 # RUN: | llvm-dwarfdump - 2>&1 | FileCheck --check-prefixes=R600,UNKNOWN %s
14 # RUN: yaml2obj --docnum=2 -DMACH=EF_AMDGPU_MACH_R600_R600 %s \
15 # RUN: | llvm-dwarfdump - 2>&1 | FileCheck --check-prefixes=R600,KNOWN %s
17 # UNKNOWN: -: Error in creating MCRegInfo
18 # KNOWN-NOT: -: Error in creating MCRegInfo
20 # AMDGCN: -: file format elf64-amdgpu
26 OSABI: ELFOSABI_AMDGPU_HSA
35 Tag: DW_TAG_compile_unit
36 Children: DW_CHILDREN_no
38 - Attribute: DW_AT_high_pc
40 - Attribute: DW_AT_high_pc
42 - Attribute: DW_AT_high_pc
44 - Attribute: DW_AT_high_pc
46 - Attribute: DW_AT_high_pc
48 - Attribute: DW_AT_high_pc
50 - Attribute: DW_AT_high_pc
52 - Attribute: DW_AT_high_pc
60 - Value: 0x4242424242424242
61 - Value: 0x4242424242424242
62 - Value: 0x4242424242424242
63 - Value: 0x4242424242424242
64 - Value: 0x4242424242424242
65 - Value: 0x4242424242424242
66 - Value: 0x4242424242424242
67 - Value: 0x4242424242424242
69 - Name: .rela.debug_info
71 Flags: [ SHF_INFO_LINK ]
72 AddressAlign: 0x0000000000000008
76 # AMDGCN: DW_AT_high_pc (0x0000000000000001)
77 - Offset: 0x000000000000000C # 0xC + 8*0
82 # AMDGCN-NEXT: DW_AT_high_pc (0x0000000000000043)
83 - Offset: 0x0000000000000014 # 0xC + 8*1
88 # AMDGCN-NEXT: DW_AT_high_pc (0xffffffffffffffff)
89 - Offset: 0x000000000000001C # 0xC + 8*2
92 Addend: 0xffffffffffffffff
94 # AMDGCN-NEXT: DW_AT_high_pc (0xffffffffffffffff)
95 - Offset: 0x0000000000000024 # 0xC + 8*3
97 Symbol: vffffffffffffffff
100 # AMDGCN: DW_AT_high_pc (0x0000000000000001)
101 - Offset: 0x000000000000002C # 0xC + 8*4
106 # AMDGCN-NEXT: DW_AT_high_pc (0x0000000000000043)
107 - Offset: 0x0000000000000034 # 0xC + 8*5
112 # AMDGCN-NEXT: DW_AT_high_pc (0xffffffffffffffff)
113 - Offset: 0x000000000000003C # 0xC + 8*6
116 Addend: 0xffffffffffffffff
118 # AMDGCN-NEXT: DW_AT_high_pc (0xffffffffffffffff)
119 - Offset: 0x0000000000000044 # 0xC + 8*7
121 Symbol: vffffffffffffffff
133 - Name: vffffffffffffffff
136 Value: 0xffffffffffffffff
139 # R600: -: file format elf32-amdgpu
152 Tag: DW_TAG_compile_unit
153 Children: DW_CHILDREN_no
155 - Attribute: DW_AT_high_pc
157 - Attribute: DW_AT_high_pc
159 - Attribute: DW_AT_high_pc
161 - Attribute: DW_AT_high_pc
174 - Name: .rela.debug_info
176 Flags: [ SHF_INFO_LINK ]
177 AddressAlign: 0x0000000000000001
181 ## FIXME: Is R_AMDGPU_ABS64 meaningful here?
183 # R600: DW_AT_high_pc (0x00000001)
184 - Offset: 0x0000000C # 0xC + 4*0
189 # R600-NEXT: DW_AT_high_pc (0x00000043)
190 - Offset: 0x00000010 # 0xC + 4*1
195 ## FIXME: Why is this field printed as sign-extended 64-bit in a 32-bit executable?
196 # R600-NEXT: DW_AT_high_pc (0xffffffffffffffff)
197 - Offset: 0x00000014 # 0xC + 4*2
202 # R600-NEXT: DW_AT_high_pc (0xffffffff)
203 - Offset: 0x00000018 # 0xC + 4*3