1 # RUN: llvm-mc < %s -triple=s390x-linux-gnu -filetype=obj | llvm-dwarfdump -v - | FileCheck %s
3 # We use both R_390_32 and R_390_64 to encode the dwarf information.
4 # Test that they are used correctly. This uses the assembly output
7 # A couple of R_390_32s, both at 0 and elsewhere:
9 # CHECK: DW_AT_producer [DW_FORM_strp] ( .debug_str[0x00000000] = "clang version 3.2 ")
10 # CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000013] = "simple.c")
12 # A couple of R_390_64s similarly:
14 # CHECK: DW_AT_low_pc [DW_FORM_addr] (0x0000000000000000 ".text")
15 # CHECK: DW_AT_high_pc [DW_FORM_addr] (0x0000000000000050 ".text")
18 .file "test/DebugInfo/SystemZ/variable-loc.ll"
19 .section .debug_info,"",@progbits
21 .section .debug_abbrev,"",@progbits
23 .section .debug_aranges,"",@progbits
24 .section .debug_macinfo,"",@progbits
25 .section .debug_line,"",@progbits
27 .section .debug_loc,"",@progbits
28 .section .debug_pubtypes,"",@progbits
29 .section .debug_str,"MS",@progbits,1
31 .section .debug_ranges,"",@progbits
33 .section .debug_loc,"",@progbits
49 stmg
%r12, %r15, 96(%r15)
60 .cfi_def_cfa_offset 728
64 .loc 2 22 3 prologue_end # :22:3
68 brasl
%r14, populate_array@PLT
72 brasl
%r14, sum_array@PLT
78 brasl
%r14, printf@PLT
81 lmg
%r12, %r15, 664(%r15)
85 .size main, .Ltmp9-main
89 .type .L.str,@object # @.str
90 .section .rodata.str1.2,"aMS",@progbits,1
93 .asciz "Total is %d\n"
96 .cfi_sections .debug_frame
103 .section .debug_info,"",@progbits
104 .L.debug_info_begin0:
105 .long 155 # Length of Compilation Unit Info
106 .short 2 # DWARF version number
107 .long .L.debug_abbrev_begin # Offset Into Abbrev. Section
108 .byte 8 # Address Size (in bytes)
109 .byte 1 # Abbrev [1] 0xb:0x94 DW_TAG_compile_unit
110 .long .Linfo_string0 # DW_AT_producer
111 .short 12 # DW_AT_language
112 .long .Linfo_string1 # DW_AT_name
113 .quad 0 # DW_AT_low_pc
114 .long .Lsection_line # DW_AT_stmt_list
115 .long .Linfo_string2 # DW_AT_comp_dir
116 .byte 2 # Abbrev [2] 0x26:0x7 DW_TAG_subprogram
117 .long .Linfo_string3 # DW_AT_name
118 .byte 2 # DW_AT_decl_file
119 .byte 4 # DW_AT_decl_line
122 .byte 3 # Abbrev [3] 0x2d:0xb DW_TAG_subprogram
123 .long .Linfo_string4 # DW_AT_name
124 .byte 2 # DW_AT_decl_file
125 .byte 9 # DW_AT_decl_line
127 .long 56 # DW_AT_type
129 .byte 4 # Abbrev [4] 0x38:0x7 DW_TAG_base_type
130 .long .Linfo_string5 # DW_AT_name
131 .byte 5 # DW_AT_encoding
132 .byte 4 # DW_AT_byte_size
133 .byte 5 # Abbrev [5] 0x3f:0xb DW_TAG_subprogram
134 .long .Linfo_string6 # DW_AT_name
135 .byte 2 # DW_AT_decl_file
136 .byte 18 # DW_AT_decl_line
138 .long 56 # DW_AT_type
141 .byte 6 # Abbrev [6] 0x4a:0x7 DW_TAG_base_type
142 .long .Linfo_string5 # DW_AT_name
143 .byte 4 # DW_AT_byte_size
144 .byte 5 # DW_AT_encoding
145 .byte 7 # Abbrev [7] 0x51:0x5 DW_TAG_array_type
146 .long 56 # DW_AT_type
147 .byte 8 # Abbrev [8] 0x56:0x48 DW_TAG_subprogram
148 .long 63 # DW_AT_specification
149 .quad .Lfunc_begin0 # DW_AT_low_pc
150 .quad .Lfunc_end0 # DW_AT_high_pc
151 .byte 1 # DW_AT_frame_base
153 # DW_AT_APPLE_omit_frame_ptr
154 .byte 9 # Abbrev [9] 0x6d:0x30 DW_TAG_lexical_block
155 .quad .Ltmp7 # DW_AT_low_pc
156 .quad .Ltmp8 # DW_AT_high_pc
157 .byte 10 # Abbrev [10] 0x7e:0xf DW_TAG_variable
158 .long .Linfo_string7 # DW_AT_name
159 .byte 2 # DW_AT_decl_file
160 .byte 19 # DW_AT_decl_line
161 .long 81 # DW_AT_type
162 .byte 3 # DW_AT_location
165 .byte 10 # Abbrev [10] 0x8d:0xf DW_TAG_variable
166 .long .Linfo_string8 # DW_AT_name
167 .byte 2 # DW_AT_decl_file
168 .byte 20 # DW_AT_decl_line
169 .long 56 # DW_AT_type
170 .byte 3 # DW_AT_location
173 .byte 0 # End Of Children Mark
174 .byte 0 # End Of Children Mark
175 .byte 0 # End Of Children Mark
177 .section .debug_abbrev,"",@progbits
178 .L.debug_abbrev_begin:
179 .byte 1 # Abbreviation Code
180 .byte 17 # DW_TAG_compile_unit
181 .byte 1 # DW_CHILDREN_yes
182 .byte 37 # DW_AT_producer
183 .byte 14 # DW_FORM_strp
184 .byte 19 # DW_AT_language
185 .byte 5 # DW_FORM_data2
187 .byte 14 # DW_FORM_strp
188 .byte 17 # DW_AT_low_pc
189 .byte 1 # DW_FORM_addr
190 .byte 16 # DW_AT_stmt_list
191 .byte 6 # DW_FORM_data4
192 .byte 27 # DW_AT_comp_dir
193 .byte 14 # DW_FORM_strp
196 .byte 2 # Abbreviation Code
197 .byte 46 # DW_TAG_subprogram
198 .byte 0 # DW_CHILDREN_no
200 .byte 14 # DW_FORM_strp
201 .byte 58 # DW_AT_decl_file
202 .byte 11 # DW_FORM_data1
203 .byte 59 # DW_AT_decl_line
204 .byte 11 # DW_FORM_data1
205 .byte 39 # DW_AT_prototyped
206 .byte 25 # DW_FORM_flag_present
207 .byte 63 # DW_AT_external
208 .byte 25 # DW_FORM_flag_present
211 .byte 3 # Abbreviation Code
212 .byte 46 # DW_TAG_subprogram
213 .byte 0 # DW_CHILDREN_no
215 .byte 14 # DW_FORM_strp
216 .byte 58 # DW_AT_decl_file
217 .byte 11 # DW_FORM_data1
218 .byte 59 # DW_AT_decl_line
219 .byte 11 # DW_FORM_data1
220 .byte 39 # DW_AT_prototyped
221 .byte 25 # DW_FORM_flag_present
222 .byte 73 # DW_AT_type
223 .byte 19 # DW_FORM_ref4
224 .byte 63 # DW_AT_external
225 .byte 25 # DW_FORM_flag_present
228 .byte 4 # Abbreviation Code
229 .byte 36 # DW_TAG_base_type
230 .byte 0 # DW_CHILDREN_no
232 .byte 14 # DW_FORM_strp
233 .byte 62 # DW_AT_encoding
234 .byte 11 # DW_FORM_data1
235 .byte 11 # DW_AT_byte_size
236 .byte 11 # DW_FORM_data1
239 .byte 5 # Abbreviation Code
240 .byte 46 # DW_TAG_subprogram
241 .byte 0 # DW_CHILDREN_no
243 .byte 14 # DW_FORM_strp
244 .byte 58 # DW_AT_decl_file
245 .byte 11 # DW_FORM_data1
246 .byte 59 # DW_AT_decl_line
247 .byte 11 # DW_FORM_data1
248 .byte 39 # DW_AT_prototyped
249 .byte 25 # DW_FORM_flag_present
250 .byte 73 # DW_AT_type
251 .byte 19 # DW_FORM_ref4
252 .byte 63 # DW_AT_external
253 .byte 25 # DW_FORM_flag_present
254 .byte 60 # DW_AT_declaration
255 .byte 25 # DW_FORM_flag_present
258 .byte 6 # Abbreviation Code
259 .byte 36 # DW_TAG_base_type
260 .byte 0 # DW_CHILDREN_no
262 .byte 14 # DW_FORM_strp
263 .byte 11 # DW_AT_byte_size
264 .byte 11 # DW_FORM_data1
265 .byte 62 # DW_AT_encoding
266 .byte 11 # DW_FORM_data1
269 .byte 7 # Abbreviation Code
270 .byte 1 # DW_TAG_array_type
271 .byte 0 # DW_CHILDREN_no
272 .byte 73 # DW_AT_type
273 .byte 19 # DW_FORM_ref4
276 .byte 8 # Abbreviation Code
277 .byte 46 # DW_TAG_subprogram
278 .byte 1 # DW_CHILDREN_yes
279 .byte 71 # DW_AT_specification
280 .byte 19 # DW_FORM_ref4
281 .byte 17 # DW_AT_low_pc
282 .byte 1 # DW_FORM_addr
283 .byte 18 # DW_AT_high_pc
284 .byte 1 # DW_FORM_addr
285 .byte 64 # DW_AT_frame_base
286 .byte 10 # DW_FORM_block1
287 .ascii "\347\177" # DW_AT_APPLE_omit_frame_ptr
288 .byte 25 # DW_FORM_flag_present
291 .byte 9 # Abbreviation Code
292 .byte 11 # DW_TAG_lexical_block
293 .byte 1 # DW_CHILDREN_yes
294 .byte 17 # DW_AT_low_pc
295 .byte 1 # DW_FORM_addr
296 .byte 18 # DW_AT_high_pc
297 .byte 1 # DW_FORM_addr
300 .byte 10 # Abbreviation Code
301 .byte 52 # DW_TAG_variable
302 .byte 0 # DW_CHILDREN_no
304 .byte 14 # DW_FORM_strp
305 .byte 58 # DW_AT_decl_file
306 .byte 11 # DW_FORM_data1
307 .byte 59 # DW_AT_decl_line
308 .byte 11 # DW_FORM_data1
309 .byte 73 # DW_AT_type
310 .byte 19 # DW_FORM_ref4
311 .byte 2 # DW_AT_location
312 .byte 10 # DW_FORM_block1
317 .section .debug_aranges,"",@progbits
318 .section .debug_ranges,"",@progbits
319 .section .debug_macinfo,"",@progbits
320 .section .debug_str,"MS",@progbits,1
322 .asciz "clang version 3.2 "
326 .asciz "/home/timnor01/a64-trunk/build"
328 .asciz "populate_array"
340 .section ".note.GNU-stack","",@progbits