466 lines · plain
1# extern int helper(int i);2# void use(int * x, int * y) {3# *x += 4;4# *y -= 2;5# }6#7# int x = 0;8# int y = 1;9# int main(int argc, char *argv[]) {10# x = argc;11# y = argc + 3;12# use(&x, &y);13# return x + helper(y);14# }15 16 .text17 .file "main.cpp"18 .file 1 "." "main.cpp"19 .globl _Z3usePiS_ # -- Begin function _Z3usePiS_20 .p2align 4, 0x9021 .type _Z3usePiS_,@function22_Z3usePiS_: # @_Z3usePiS_23.Lfunc_begin0:24 .loc 1 2 0 # main.cpp:2:025 .cfi_startproc26# %bb.0: # %entry27 pushq %rbp28 .cfi_def_cfa_offset 1629 .cfi_offset %rbp, -1630 movq %rsp, %rbp31 .cfi_def_cfa_register %rbp32 movq %rdi, -8(%rbp)33 movq %rsi, -16(%rbp)34.Ltmp0:35 .loc 1 3 3 prologue_end # main.cpp:3:336 movq -8(%rbp), %rax37 .loc 1 3 5 is_stmt 0 # main.cpp:3:538 movl (%rax), %ecx39 addl $4, %ecx40 movl %ecx, (%rax)41 .loc 1 4 3 is_stmt 1 # main.cpp:4:342 movq -16(%rbp), %rax43 .loc 1 4 5 is_stmt 0 # main.cpp:4:544 movl (%rax), %ecx45 subl $2, %ecx46 movl %ecx, (%rax)47 .loc 1 5 1 is_stmt 1 # main.cpp:5:148 popq %rbp49 .cfi_def_cfa %rsp, 850 retq51.Ltmp1:52.Lfunc_end0:53 .size _Z3usePiS_, .Lfunc_end0-_Z3usePiS_54 .cfi_endproc55 # -- End function56 .globl main # -- Begin function main57 .p2align 4, 0x9058 .type main,@function59main: # @main60.Lfunc_begin1:61 .loc 1 9 0 # main.cpp:9:062 .cfi_startproc63# %bb.0: # %entry64 pushq %rbp65 .cfi_def_cfa_offset 1666 .cfi_offset %rbp, -1667 movq %rsp, %rbp68 .cfi_def_cfa_register %rbp69 subq $32, %rsp70 movl $0, -4(%rbp)71 movl %edi, -8(%rbp)72 movq %rsi, -16(%rbp)73.Ltmp2:74 .loc 1 10 7 prologue_end # main.cpp:10:775 movl -8(%rbp), %eax76 .loc 1 10 5 is_stmt 0 # main.cpp:10:577 movl %eax, x78 .loc 1 11 7 is_stmt 1 # main.cpp:11:779 movl -8(%rbp), %eax80 .loc 1 11 12 is_stmt 0 # main.cpp:11:1281 addl $3, %eax82 .loc 1 11 5 # main.cpp:11:583 movl %eax, y84 .loc 1 12 3 is_stmt 1 # main.cpp:12:385 movabsq $x, %rdi86 movabsq $y, %rsi87 callq _Z3usePiS_88 .loc 1 13 10 # main.cpp:13:1089 movl x, %eax90 movl %eax, -20(%rbp) # 4-byte Spill91 .loc 1 13 21 is_stmt 0 # main.cpp:13:2192 movl y, %edi93 .loc 1 13 14 # main.cpp:13:1494 callq _Z6helperi95 movl %eax, %ecx96 movl -20(%rbp), %eax # 4-byte Reload97 .loc 1 13 12 # main.cpp:13:1298 addl %ecx, %eax99 .loc 1 13 3 # main.cpp:13:3100 addq $32, %rsp101 popq %rbp102 .cfi_def_cfa %rsp, 8103 retq104.Ltmp3:105.Lfunc_end1:106 .size main, .Lfunc_end1-main107 .cfi_endproc108 # -- End function109 .type x,@object # @x110 .bss111 .globl x112 .p2align 2113x:114 .long 0 # 0x0115 .size x, 4116 117 .type y,@object # @y118 .data119 .globl y120 .p2align 2121y:122 .long 1 # 0x1123 .size y, 4124 125 .section .debug_abbrev,"",@progbits126 .byte 1 # Abbreviation Code127 .byte 17 # DW_TAG_compile_unit128 .byte 0 # DW_CHILDREN_no129 .byte 16 # DW_AT_stmt_list130 .byte 23 # DW_FORM_sec_offset131 .byte 27 # DW_AT_comp_dir132 .byte 14 # DW_FORM_strp133 .ascii "\264B" # DW_AT_GNU_pubnames134 .byte 25 # DW_FORM_flag_present135 .ascii "\260B" # DW_AT_GNU_dwo_name136 .byte 14 # DW_FORM_strp137 .ascii "\261B" # DW_AT_GNU_dwo_id138 .byte 7 # DW_FORM_data8139 .byte 17 # DW_AT_low_pc140 .byte 1 # DW_FORM_addr141 .byte 18 # DW_AT_high_pc142 .byte 6 # DW_FORM_data4143 .ascii "\263B" # DW_AT_GNU_addr_base144 .byte 23 # DW_FORM_sec_offset145 .byte 0 # EOM(1)146 .byte 0 # EOM(2)147 .byte 0 # EOM(3)148 .section .debug_info,"",@progbits149.Lcu_begin0:150 .long .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit151.Ldebug_info_start0:152 .short 4 # DWARF version number153 .long .debug_abbrev # Offset Into Abbrev. Section154 .byte 8 # Address Size (in bytes)155 .byte 1 # Abbrev [1] 0xb:0x25 DW_TAG_compile_unit156 .long .Lline_table_start0 # DW_AT_stmt_list157 .long .Lskel_string0 # DW_AT_comp_dir158 # DW_AT_GNU_pubnames159 .long .Lskel_string1 # DW_AT_GNU_dwo_name160 .quad 4587139501222431648 # DW_AT_GNU_dwo_id161 .quad .Lfunc_begin0 # DW_AT_low_pc162 .long .Lfunc_end1-.Lfunc_begin0 # DW_AT_high_pc163 .long .Laddr_table_base0 # DW_AT_GNU_addr_base164.Ldebug_info_end0:165 .section .debug_str,"MS",@progbits,1166.Lskel_string0:167 .asciz "." # string offset=0168.Lskel_string1:169 .asciz "main.dwo" # string offset=38170 .section .debug_str.dwo,"eMS",@progbits,1171.Linfo_string0:172 .asciz "x" # string offset=0173.Linfo_string1:174 .asciz "int" # string offset=2175.Linfo_string2:176 .asciz "y" # string offset=6177.Linfo_string3:178 .asciz "_Z3usePiS_" # string offset=8179.Linfo_string4:180 .asciz "use" # string offset=19181.Linfo_string5:182 .asciz "main" # string offset=23183.Linfo_string6:184 .asciz "argc" # string offset=28185.Linfo_string7:186 .asciz "argv" # string offset=33187.Linfo_string8:188 .asciz "char" # string offset=38189.Linfo_string9:190 .asciz "clang version 15.0.0" # string offset=43191.Linfo_string10:192 .asciz "main.cpp" # string offset=177193.Linfo_string11:194 .asciz "main.dwo" # string offset=186195 .section .debug_str_offsets.dwo,"e",@progbits196 .long 0197 .long 2198 .long 6199 .long 8200 .long 19201 .long 23202 .long 28203 .long 33204 .long 38205 .long 43206 .long 177207 .long 186208 .section .debug_info.dwo,"e",@progbits209 .long .Ldebug_info_dwo_end0-.Ldebug_info_dwo_start0 # Length of Unit210.Ldebug_info_dwo_start0:211 .short 4 # DWARF version number212 .long 0 # Offset Into Abbrev. Section213 .byte 8 # Address Size (in bytes)214 .byte 1 # Abbrev [1] 0xb:0x85 DW_TAG_compile_unit215 .byte 9 # DW_AT_producer216 .short 33 # DW_AT_language217 .byte 10 # DW_AT_name218 .byte 11 # DW_AT_GNU_dwo_name219 .quad 4587139501222431648 # DW_AT_GNU_dwo_id220 .byte 2 # Abbrev [2] 0x19:0xb DW_TAG_variable221 .byte 0 # DW_AT_name222 .long 36 # DW_AT_type223 # DW_AT_external224 .byte 1 # DW_AT_decl_file225 .byte 7 # DW_AT_decl_line226 .byte 2 # DW_AT_location227 .byte 251228 .byte 0229 .byte 3 # Abbrev [3] 0x24:0x4 DW_TAG_base_type230 .byte 1 # DW_AT_name231 .byte 5 # DW_AT_encoding232 .byte 4 # DW_AT_byte_size233 .byte 2 # Abbrev [2] 0x28:0xb DW_TAG_variable234 .byte 2 # DW_AT_name235 .long 36 # DW_AT_type236 # DW_AT_external237 .byte 1 # DW_AT_decl_file238 .byte 8 # DW_AT_decl_line239 .byte 2 # DW_AT_location240 .byte 251241 .byte 1242 .byte 4 # Abbrev [4] 0x33:0x23 DW_TAG_subprogram243 .byte 2 # DW_AT_low_pc244 .long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc245 .byte 1 # DW_AT_frame_base246 .byte 86247 .byte 3 # DW_AT_linkage_name248 .byte 4 # DW_AT_name249 .byte 1 # DW_AT_decl_file250 .byte 2 # DW_AT_decl_line251 # DW_AT_external252 .byte 5 # Abbrev [5] 0x3f:0xb DW_TAG_formal_parameter253 .byte 2 # DW_AT_location254 .byte 145255 .byte 120256 .byte 0 # DW_AT_name257 .byte 1 # DW_AT_decl_file258 .byte 2 # DW_AT_decl_line259 .long 124 # DW_AT_type260 .byte 5 # Abbrev [5] 0x4a:0xb DW_TAG_formal_parameter261 .byte 2 # DW_AT_location262 .byte 145263 .byte 112264 .byte 2 # DW_AT_name265 .byte 1 # DW_AT_decl_file266 .byte 2 # DW_AT_decl_line267 .long 124 # DW_AT_type268 .byte 0 # End Of Children Mark269 .byte 6 # Abbrev [6] 0x56:0x26 DW_TAG_subprogram270 .byte 3 # DW_AT_low_pc271 .long .Lfunc_end1-.Lfunc_begin1 # DW_AT_high_pc272 .byte 1 # DW_AT_frame_base273 .byte 86274 .byte 5 # DW_AT_name275 .byte 1 # DW_AT_decl_file276 .byte 9 # DW_AT_decl_line277 .long 36 # DW_AT_type278 # DW_AT_external279 .byte 5 # Abbrev [5] 0x65:0xb DW_TAG_formal_parameter280 .byte 2 # DW_AT_location281 .byte 145282 .byte 120283 .byte 6 # DW_AT_name284 .byte 1 # DW_AT_decl_file285 .byte 9 # DW_AT_decl_line286 .long 36 # DW_AT_type287 .byte 5 # Abbrev [5] 0x70:0xb DW_TAG_formal_parameter288 .byte 2 # DW_AT_location289 .byte 145290 .byte 112291 .byte 7 # DW_AT_name292 .byte 1 # DW_AT_decl_file293 .byte 9 # DW_AT_decl_line294 .long 129 # DW_AT_type295 .byte 0 # End Of Children Mark296 .byte 7 # Abbrev [7] 0x7c:0x5 DW_TAG_pointer_type297 .long 36 # DW_AT_type298 .byte 7 # Abbrev [7] 0x81:0x5 DW_TAG_pointer_type299 .long 134 # DW_AT_type300 .byte 7 # Abbrev [7] 0x86:0x5 DW_TAG_pointer_type301 .long 139 # DW_AT_type302 .byte 3 # Abbrev [3] 0x8b:0x4 DW_TAG_base_type303 .byte 8 # DW_AT_name304 .byte 6 # DW_AT_encoding305 .byte 1 # DW_AT_byte_size306 .byte 0 # End Of Children Mark307.Ldebug_info_dwo_end0:308 .section .debug_abbrev.dwo,"e",@progbits309 .byte 1 # Abbreviation Code310 .byte 17 # DW_TAG_compile_unit311 .byte 1 # DW_CHILDREN_yes312 .byte 37 # DW_AT_producer313 .ascii "\202>" # DW_FORM_GNU_str_index314 .byte 19 # DW_AT_language315 .byte 5 # DW_FORM_data2316 .byte 3 # DW_AT_name317 .ascii "\202>" # DW_FORM_GNU_str_index318 .ascii "\260B" # DW_AT_GNU_dwo_name319 .ascii "\202>" # DW_FORM_GNU_str_index320 .ascii "\261B" # DW_AT_GNU_dwo_id321 .byte 7 # DW_FORM_data8322 .byte 0 # EOM(1)323 .byte 0 # EOM(2)324 .byte 2 # Abbreviation Code325 .byte 52 # DW_TAG_variable326 .byte 0 # DW_CHILDREN_no327 .byte 3 # DW_AT_name328 .ascii "\202>" # DW_FORM_GNU_str_index329 .byte 73 # DW_AT_type330 .byte 19 # DW_FORM_ref4331 .byte 63 # DW_AT_external332 .byte 25 # DW_FORM_flag_present333 .byte 58 # DW_AT_decl_file334 .byte 11 # DW_FORM_data1335 .byte 59 # DW_AT_decl_line336 .byte 11 # DW_FORM_data1337 .byte 2 # DW_AT_location338 .byte 24 # DW_FORM_exprloc339 .byte 0 # EOM(1)340 .byte 0 # EOM(2)341 .byte 3 # Abbreviation Code342 .byte 36 # DW_TAG_base_type343 .byte 0 # DW_CHILDREN_no344 .byte 3 # DW_AT_name345 .ascii "\202>" # DW_FORM_GNU_str_index346 .byte 62 # DW_AT_encoding347 .byte 11 # DW_FORM_data1348 .byte 11 # DW_AT_byte_size349 .byte 11 # DW_FORM_data1350 .byte 0 # EOM(1)351 .byte 0 # EOM(2)352 .byte 4 # Abbreviation Code353 .byte 46 # DW_TAG_subprogram354 .byte 1 # DW_CHILDREN_yes355 .byte 17 # DW_AT_low_pc356 .ascii "\201>" # DW_FORM_GNU_addr_index357 .byte 18 # DW_AT_high_pc358 .byte 6 # DW_FORM_data4359 .byte 64 # DW_AT_frame_base360 .byte 24 # DW_FORM_exprloc361 .byte 110 # DW_AT_linkage_name362 .ascii "\202>" # DW_FORM_GNU_str_index363 .byte 3 # DW_AT_name364 .ascii "\202>" # DW_FORM_GNU_str_index365 .byte 58 # DW_AT_decl_file366 .byte 11 # DW_FORM_data1367 .byte 59 # DW_AT_decl_line368 .byte 11 # DW_FORM_data1369 .byte 63 # DW_AT_external370 .byte 25 # DW_FORM_flag_present371 .byte 0 # EOM(1)372 .byte 0 # EOM(2)373 .byte 5 # Abbreviation Code374 .byte 5 # DW_TAG_formal_parameter375 .byte 0 # DW_CHILDREN_no376 .byte 2 # DW_AT_location377 .byte 24 # DW_FORM_exprloc378 .byte 3 # DW_AT_name379 .ascii "\202>" # DW_FORM_GNU_str_index380 .byte 58 # DW_AT_decl_file381 .byte 11 # DW_FORM_data1382 .byte 59 # DW_AT_decl_line383 .byte 11 # DW_FORM_data1384 .byte 73 # DW_AT_type385 .byte 19 # DW_FORM_ref4386 .byte 0 # EOM(1)387 .byte 0 # EOM(2)388 .byte 6 # Abbreviation Code389 .byte 46 # DW_TAG_subprogram390 .byte 1 # DW_CHILDREN_yes391 .byte 17 # DW_AT_low_pc392 .ascii "\201>" # DW_FORM_GNU_addr_index393 .byte 18 # DW_AT_high_pc394 .byte 6 # DW_FORM_data4395 .byte 64 # DW_AT_frame_base396 .byte 24 # DW_FORM_exprloc397 .byte 3 # DW_AT_name398 .ascii "\202>" # DW_FORM_GNU_str_index399 .byte 58 # DW_AT_decl_file400 .byte 11 # DW_FORM_data1401 .byte 59 # DW_AT_decl_line402 .byte 11 # DW_FORM_data1403 .byte 73 # DW_AT_type404 .byte 19 # DW_FORM_ref4405 .byte 63 # DW_AT_external406 .byte 25 # DW_FORM_flag_present407 .byte 0 # EOM(1)408 .byte 0 # EOM(2)409 .byte 7 # Abbreviation Code410 .byte 15 # DW_TAG_pointer_type411 .byte 0 # DW_CHILDREN_no412 .byte 73 # DW_AT_type413 .byte 19 # DW_FORM_ref4414 .byte 0 # EOM(1)415 .byte 0 # EOM(2)416 .byte 0 # EOM(3)417 .section .debug_addr,"",@progbits418.Laddr_table_base0:419 .quad x420 .quad y421 .quad .Lfunc_begin0422 .quad .Lfunc_begin1423 .section .debug_gnu_pubnames,"",@progbits424 .long .LpubNames_end0-.LpubNames_start0 # Length of Public Names Info425.LpubNames_start0:426 .short 2 # DWARF Version427 .long .Lcu_begin0 # Offset of Compilation Unit Info428 .long 48 # Compilation Unit Length429 .long 86 # DIE offset430 .byte 48 # Attributes: FUNCTION, EXTERNAL431 .asciz "main" # External Name432 .long 25 # DIE offset433 .byte 32 # Attributes: VARIABLE, EXTERNAL434 .asciz "x" # External Name435 .long 40 # DIE offset436 .byte 32 # Attributes: VARIABLE, EXTERNAL437 .asciz "y" # External Name438 .long 51 # DIE offset439 .byte 48 # Attributes: FUNCTION, EXTERNAL440 .asciz "use" # External Name441 .long 0 # End Mark442.LpubNames_end0:443 .section .debug_gnu_pubtypes,"",@progbits444 .long .LpubTypes_end0-.LpubTypes_start0 # Length of Public Types Info445.LpubTypes_start0:446 .short 2 # DWARF Version447 .long .Lcu_begin0 # Offset of Compilation Unit Info448 .long 48 # Compilation Unit Length449 .long 36 # DIE offset450 .byte 144 # Attributes: TYPE, STATIC451 .asciz "int" # External Name452 .long 139 # DIE offset453 .byte 144 # Attributes: TYPE, STATIC454 .asciz "char" # External Name455 .long 0 # End Mark456.LpubTypes_end0:457 .ident "clang version 15.0.0"458 .section ".note.GNU-stack","",@progbits459 .addrsig460 .addrsig_sym _Z3usePiS_461 .addrsig_sym _Z6helperi462 .addrsig_sym x463 .addrsig_sym y464 .section .debug_line,"",@progbits465.Lline_table_start0:466