[Instrumentation] Fix a warning
[llvm-project.git] / llvm / test / tools / llvm-dwarfdump / X86 / debug_rnglists.s
blob07c9fe6d0f36ec9c6bc18c09496c435282f85a05
1 # RUN: llvm-mc %s -filetype obj -triple x86_64-pc-linux -o %t.o
2 # RUN: llvm-dwarfdump --debug-rnglists %t.o 2> %t.err | FileCheck %s --check-prefixes=TERSE,BOTH
3 # RUN: FileCheck %s --allow-empty --input-file %t.err --check-prefix=ERR
4 # RUN: llvm-dwarfdump -v --debug-rnglists %t.o 2> %t.err | FileCheck %s --check-prefixes=VERBOSE,BOTH
5 # RUN: FileCheck %s --allow-empty --input-file %t.err --check-prefix=ERR
7 # BOTH: .debug_rnglists contents:
8 # TERSE-NEXT: range list header: length = 0x00000037, format = DWARF32, version = 0x0005, addr_size = 0x08, seg_size = 0x00, offset_entry_count = 0x00000000
10 # VERBOSE-NEXT: 0x{{[0-9a-f]*}}:
11 # VERBOSE-SAME: range list header: length = 0x00000037, format = DWARF32, version = 0x0005, addr_size = 0x08, seg_size = 0x00, offset_entry_count = 0x00000000
13 # BOTH-NEXT: ranges:
14 # TERSE-NEXT: [0x0000000000000010, 0x0000000000000020)
15 # TERSE-NEXT: [0x0000000000000025, 0x00000000000000a5)
16 # TERSE-NEXT: <End of list>
17 # TERSE-NEXT: [0x0000000000000100, 0x0000000000000200)
18 # TERSE-NEXT: <End of list>
20 # VERBOSE-NEXT: 0x0000000c: [DW_RLE_start_end ]: [0x0000000000000010, 0x0000000000000020)
21 # VERBOSE-NEXT: 0x0000001d: [DW_RLE_start_length]: 0x0000000000000025, 0x0000000000000080
22 # VERBOSE-SAME: => [0x0000000000000025, 0x00000000000000a5)
23 # VERBOSE-NEXT: 0x00000028: [DW_RLE_end_of_list ]
24 # VERBOSE-NEXT: 0x00000029: [DW_RLE_start_end ]: [0x0000000000000100, 0x0000000000000200)
25 # VERBOSE-NEXT: 0x0000003a: [DW_RLE_end_of_list ]
27 # TERSE-NEXT: range list header: length = 0x0000002b, format = DWARF32, version = 0x0005, addr_size = 0x04, seg_size = 0x00, offset_entry_count = 0x00000002
29 # VERBOSE-NEXT: 0x{{[0-9a-f]*}}:
30 # VERBOSE-SAME: range list header: length = 0x0000002b, format = DWARF32, version = 0x0005, addr_size = 0x04, seg_size = 0x00, offset_entry_count = 0x00000002
32 # BOTH-NEXT: offsets: [
33 # BOTH-NEXT: 0x00000008
34 # VERBOSE-SAME: => 0x0000004f
35 # BOTH-NEXT: 0x0000001b
36 # VERBOSE-SAME: => 0x00000062
37 # BOTH-NEXT: ]
38 # BOTH-NEXT: ranges:
40 # TERSE-NEXT: [0x00000000, 0x00000000)
41 # TERSE-NEXT: [0x00000002, 0x00000006)
42 # TERSE-NEXT: <End of list>
43 # TERSE-NEXT: [0x00000036, 0x00000136)
44 # TERSE-NEXT: <End of list>
46 # VERBOSE-NEXT: 0x0000004f: [DW_RLE_start_end ]: [0x00000000, 0x00000000)
47 # VERBOSE-NEXT: 0x00000058: [DW_RLE_start_end ]: [0x00000002, 0x00000006)
48 # VERBOSE-NEXT: 0x00000061: [DW_RLE_end_of_list ]
49 # VERBOSE-NEXT: 0x00000062: [DW_RLE_start_length]: 0x00000036, 0x00000100 => [0x00000036, 0x00000136)
50 # VERBOSE-NEXT: 0x00000069: [DW_RLE_end_of_list ]
52 # TERSE-NEXT: range list header: length = 0x00000008, format = DWARF32, version = 0x0005, addr_size = 0x08, seg_size = 0x00, offset_entry_count = 0x00000000
54 # VERBOSE-NEXT: 0x{{[0-9a-f]*}}:
55 # VERBOSE-SAME: range list header: length = 0x00000008, format = DWARF32, version = 0x0005, addr_size = 0x08, seg_size = 0x00, offset_entry_count = 0x00000000
57 # BOTH-NOT: offsets:
58 # BOTH: ranges:
59 # BOTH-NOT: [
61 # TERSE-NEXT: range list header: length = 0x0000000b, format = DWARF32, version = 0x0005, addr_size = 0x08, seg_size = 0x00, offset_entry_count = 0x00000000
63 # VERBOSE-NEXT: 0x{{[0-9a-f]*}}:
64 # VERBOSE-SAME: range list header: length = 0x0000000b, format = DWARF32, version = 0x0005, addr_size = 0x08, seg_size = 0x00, offset_entry_count = 0x00000000
66 # BOTH-NEXT: ranges:
67 # TERSE-NEXT: <End of list>
69 # VERBOSE-NEXT: 0x00000082: [DW_RLE_base_addressx]: 0x0000000000000000
70 # VERBOSE-NEXT: 0x00000084: [DW_RLE_end_of_list ]
72 # TERSE-NEXT: range list header: length = 0x0000000c, format = DWARF32, version = 0x0005, addr_size = 0x08, seg_size = 0x00, offset_entry_count = 0x00000000
74 # VERBOSE-NEXT: 0x{{[0-9a-f]*}}:
75 # VERBOSE-SAME: range list header: length = 0x0000000c, format = DWARF32, version = 0x0005, addr_size = 0x08, seg_size = 0x00, offset_entry_count = 0x00000000
77 # BOTH-NEXT: ranges:
78 # TERSE-NEXT: [0x0000000000000000, 0x0000000000000000)
79 # TERSE-NEXT: <End of list>
81 # VERBOSE-NEXT: 0x00000091: [DW_RLE_startx_endx]: 0x0000000000000001, 0x000000000000000a => [0x0000000000000000, 0x0000000000000000)
82 # VERBOSE-NEXT: 0x00000094: [DW_RLE_end_of_list]
84 # TERSE-NEXT: range list header: length = 0x0000000c, format = DWARF32, version = 0x0005, addr_size = 0x08, seg_size = 0x00, offset_entry_count = 0x00000000
86 # VERBOSE-NEXT: 0x{{[0-9a-f]*}}:
87 # VERBOSE-SAME: range list header: length = 0x0000000c, format = DWARF32, version = 0x0005, addr_size = 0x08, seg_size = 0x00, offset_entry_count = 0x00000000
89 # BOTH-NEXT: ranges:
90 # TERSE-NEXT: [0x0000000000000000, 0x000000000000002a)
91 # TERSE-NEXT: <End of list>
93 # VERBOSE-NEXT: 0x000000a1: [DW_RLE_startx_length]: 0x0000000000000002, 0x000000000000002a => [0x0000000000000000, 0x000000000000002a)
94 # VERBOSE-NEXT: 0x000000a4: [DW_RLE_end_of_list ]
96 # TERSE-NEXT: range list header: length = 0x0000000e, format = DWARF32, version = 0x0005, addr_size = 0x08, seg_size = 0x00, offset_entry_count = 0x00000000
98 # VERBOSE-NEXT: 0x{{[0-9a-f]*}}:
99 # VERBOSE-SAME: range list header: length = 0x0000000e, format = DWARF32, version = 0x0005, addr_size = 0x08, seg_size = 0x00, offset_entry_count = 0x00000000
101 # BOTH-NEXT: ranges:
102 # TERSE-NEXT: [0x0000000000000800, 0x0000000000001000)
103 # TERSE-NEXT: <End of list>
105 # VERBOSE-NEXT: 0x000000b1: [DW_RLE_offset_pair]: 0x0000000000000800, 0x0000000000001000 =>
106 # VERBOSE-SAME: [0x0000000000000800, 0x0000000000001000)
107 # VERBOSE-NEXT: 0x000000b6: [DW_RLE_end_of_list]
109 # TERSE-NEXT: range list header: length = 0x00000017, format = DWARF32, version = 0x0005, addr_size = 0x08, seg_size = 0x00, offset_entry_count = 0x00000000
111 # VERBOSE-NEXT: 0x{{[0-9a-f]*}}:
112 # VERBOSE-SAME: range list header: length = 0x00000017, format = DWARF32, version = 0x0005, addr_size = 0x08, seg_size = 0x00, offset_entry_count = 0x00000000
114 # BOTH-NEXT: ranges:
115 # TERSE-NEXT: [0x0000000000001800, 0x0000000000002000)
116 # TERSE-NEXT: <End of list>
118 # VERBOSE-NEXT: 0x000000c3: [DW_RLE_base_address]: 0x0000000000001000
119 # VERBOSE-NEXT: 0x000000cc: [DW_RLE_offset_pair ]: 0x0000000000000800, 0x0000000000001000 =>
120 # VERBOSE-SAME: [0x0000000000001800, 0x0000000000002000)
121 # VERBOSE-NEXT: 0x000000d1: [DW_RLE_end_of_list ]
123 # BOTH-NOT: range list header:
125 # ERR-NOT: error:
127 .section .debug_rnglists,"",@progbits
129 # First table (tests DW_RLE_end_of_list, start_end, and start_length encodings)
130 .long 55 # Table length
131 .short 5 # Version
132 .byte 8 # Address size
133 .byte 0 # Segment selector size
134 .long 0 # Offset entry count
136 # First range list
137 .byte 6 # DW_RLE_start_end
138 .quad 0x10, 0x20 # Start, end address
139 .byte 7 # DW_RLE_start_length
140 .quad 0x25 # Start address
141 .byte 0x80, 0x01 # Length
142 .byte 0 # DW_RLE_end_of_list
144 # Second range list
145 .byte 6 # DW_RLE_start_end
146 .quad 0x100, 0x200 # Start, end address
147 .byte 0 # DW_RLE_end_of_list
149 # Second table (shows support for size 4 addresses)
150 .long 43 # Table length
151 .short 5 # Version
152 .byte 4 # Address size
153 .byte 0 # Segment selector size
154 .long 2 # Offset entry count
156 # Offset array
157 .long 8 # Offset Entry 0
158 .long 27 # Offset Entry 1
160 # First range list
161 .byte 6 # DW_RLE_start_end
162 .long 0, 0 # Start, end address
163 .byte 6 # DW_RLE_start_end
164 .long 0x2, 0x6 # Start, end address
165 .byte 0 # DW_RLE_end_of_list
167 # Second range list
168 .byte 7 # DW_RLE_start_length
169 .long 0x36 # Start address
170 .byte 0x80, 0x02 # Length
171 .byte 0 # DW_RLE_end_of_list
173 # Third (empty) table
174 .long 8 # Table length
175 .short 5 # Version
176 .byte 8 # Address size
177 .byte 0 # Segment selector size
178 .long 0 # Offset entry count
180 # The following entries are for encodings unsupported at the time of writing.
181 # The test should be updated as these encodings are supported.
183 # Fourth table (testing DW_RLE_base_addressx)
184 .long 11 # Table length
185 .short 5 # Version
186 .byte 8 # Address size
187 .byte 0 # Segment selector size
188 .long 0 # Offset entry count
190 # First range list
191 .byte 1 # DW_RLE_base_addressx
192 .byte 0 # Base address (index 0 in .debug_addr)
193 .byte 0 # DW_RLE_end_of_list
195 # Fifth table (testing DW_RLE_startx_endx)
196 .long 12 # Table length
197 .short 5 # Version
198 .byte 8 # Address size
199 .byte 0 # Segment selector size
200 .long 0 # Offset entry count
202 # First range list
203 .byte 2 # DW_RLE_startx_endx
204 .byte 1 # Start address (index in .debug_addr)
205 .byte 10 # End address (index in .debug_addr)
206 .byte 0 # DW_RLE_end_of_list
208 # Sixth table (testing DW_RLE_startx_length)
209 .long 12 # Table length
210 .short 5 # Version
211 .byte 8 # Address size
212 .byte 0 # Segment selector size
213 .long 0 # Offset entry count
215 # First range list
216 .byte 3 # DW_RLE_startx_length
217 .byte 2 # Start address (index in .debug_addr)
218 .byte 42 # Length
219 .byte 0 # DW_RLE_end_of_list
221 # Seventh table (testing DW_RLE_offset_pair)
222 .long 14 # Table length
223 .short 5 # Version
224 .byte 8 # Address size
225 .byte 0 # Segment selector size
226 .long 0 # Offset entry count
228 # First range list
229 .byte 4 # DW_RLE_offset_pair
230 .byte 0x80, 0x10 # Start offset
231 .byte 0x80, 0x20 # End offset (index in .debug_addr)
232 .byte 0 # DW_RLE_end_of_list
234 # Eigth table (testing DW_RLE_base_address and its impact
235 # on DW_RLE_offset_pair)
236 .long 23 # Table length
237 .short 5 # Version
238 .byte 8 # Address size
239 .byte 0 # Segment selector size
240 .long 0 # Offset entry count
242 # First range list
243 .byte 5 # DW_RLE_base_address
244 .quad 0x1000 # Base address
245 .byte 4 # DW_RLE_offset_pair
246 .byte 0x80, 0x10 # Start offset
247 .byte 0x80, 0x20 # End offset
248 .byte 0 # DW_RLE_end_of_list