299 lines · plain
1# clang++ -g -gdwarf-4 -emit-llvm -S helper.cpp2# llc -O0 -mtriple=x86_64-unknown-linux-gnu helper.ll3# int z = 0;4# int d = 0;5#6# int helper(int z_, int d_) {7# z += z_;8# d += d_;9# return z * d;10# }11 12 .text13 .file "helper.cpp"14 .file 1 "." "helper.cpp"15 .globl _Z6helperii # -- Begin function _Z6helperii16 .p2align 4, 0x9017 .type _Z6helperii,@function18_Z6helperii: # @_Z6helperii19.Lfunc_begin0:20 .loc 1 4 0 # helper.cpp:4:021 .cfi_startproc22# %bb.0: # %entry23 pushq %rbp24 .cfi_def_cfa_offset 1625 .cfi_offset %rbp, -1626 movq %rsp, %rbp27 .cfi_def_cfa_register %rbp28 movl %edi, -4(%rbp)29 movl %esi, -8(%rbp)30.Ltmp0:31 .loc 1 5 7 prologue_end # helper.cpp:5:732 movl -4(%rbp), %eax33 .loc 1 5 4 is_stmt 0 # helper.cpp:5:434 addl z, %eax35 movl %eax, z36 .loc 1 6 7 is_stmt 1 # helper.cpp:6:737 movl -8(%rbp), %eax38 .loc 1 6 4 is_stmt 0 # helper.cpp:6:439 addl d, %eax40 movl %eax, d41 .loc 1 7 9 is_stmt 1 # helper.cpp:7:942 movl z, %eax43 .loc 1 7 11 is_stmt 0 # helper.cpp:7:1144 imull d, %eax45 .loc 1 7 2 # helper.cpp:7:246 popq %rbp47 .cfi_def_cfa %rsp, 848 retq49.Ltmp1:50.Lfunc_end0:51 .size _Z6helperii, .Lfunc_end0-_Z6helperii52 .cfi_endproc53 # -- End function54 .type z,@object # @z55 .bss56 .globl z57 .p2align 258z:59 .long 0 # 0x060 .size z, 461 62 .type d,@object # @d63 .globl d64 .p2align 265d:66 .long 0 # 0x067 .size d, 468 69 .section .debug_abbrev,"",@progbits70 .byte 1 # Abbreviation Code71 .byte 17 # DW_TAG_compile_unit72 .byte 0 # DW_CHILDREN_no73 .byte 16 # DW_AT_stmt_list74 .byte 23 # DW_FORM_sec_offset75 .byte 27 # DW_AT_comp_dir76 .byte 14 # DW_FORM_strp77 .ascii "\260B" # DW_AT_GNU_dwo_name78 .byte 14 # DW_FORM_strp79 .ascii "\261B" # DW_AT_GNU_dwo_id80 .byte 7 # DW_FORM_data881 .byte 17 # DW_AT_low_pc82 .byte 1 # DW_FORM_addr83 .byte 18 # DW_AT_high_pc84 .byte 6 # DW_FORM_data485 .ascii "\263B" # DW_AT_GNU_addr_base86 .byte 23 # DW_FORM_sec_offset87 .byte 0 # EOM(1)88 .byte 0 # EOM(2)89 .byte 0 # EOM(3)90 .section .debug_info,"",@progbits91.Lcu_begin0:92 .long .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit93.Ldebug_info_start0:94 .short 4 # DWARF version number95 .long .debug_abbrev # Offset Into Abbrev. Section96 .byte 8 # Address Size (in bytes)97 .byte 1 # Abbrev [1] 0xb:0x25 DW_TAG_compile_unit98 .long .Lline_table_start0 # DW_AT_stmt_list99 .long .Lskel_string0 # DW_AT_comp_dir100 .long .Lskel_string1 # DW_AT_GNU_dwo_name101 .quad 9133088002243470176 # DW_AT_GNU_dwo_id102 .quad .Lfunc_begin0 # DW_AT_low_pc103 .long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc104 .long .Laddr_table_base0 # DW_AT_GNU_addr_base105.Ldebug_info_end0:106 .section .debug_str,"MS",@progbits,1107.Lskel_string0:108 .asciz "." # string offset=0109.Lskel_string1:110 .asciz "helper.dwo" # string offset=2111 .section .debug_str.dwo,"eMS",@progbits,1112.Linfo_string0:113 .asciz "z" # string offset=0114.Linfo_string1:115 .asciz "int" # string offset=2116.Linfo_string2:117 .asciz "d" # string offset=6118.Linfo_string3:119 .asciz "_Z6helperii" # string offset=8120.Linfo_string4:121 .asciz "helper" # string offset=20122.Linfo_string5:123 .asciz "z_" # string offset=27124.Linfo_string6:125 .asciz "d_" # string offset=30126.Linfo_string7:127 .asciz "clang version 15.0.0" # string offset=33128.Linfo_string8:129 .asciz "helper.cpp" # string offset=54130.Linfo_string9:131 .asciz "helper.dwo" # string offset=65132 .section .debug_str_offsets.dwo,"e",@progbits133 .long 0134 .long 2135 .long 6136 .long 8137 .long 20138 .long 27139 .long 30140 .long 33141 .long 54142 .long 65143 .section .debug_info.dwo,"e",@progbits144 .long .Ldebug_info_dwo_end0-.Ldebug_info_dwo_start0 # Length of Unit145.Ldebug_info_dwo_start0:146 .short 4 # DWARF version number147 .long 0 # Offset Into Abbrev. Section148 .byte 8 # Address Size (in bytes)149 .byte 1 # Abbrev [1] 0xb:0x50 DW_TAG_compile_unit150 .byte 7 # DW_AT_producer151 .short 33 # DW_AT_language152 .byte 8 # DW_AT_name153 .byte 9 # DW_AT_GNU_dwo_name154 .quad 9133088002243470176 # DW_AT_GNU_dwo_id155 .byte 2 # Abbrev [2] 0x19:0xb DW_TAG_variable156 .byte 0 # DW_AT_name157 .long 36 # DW_AT_type158 # DW_AT_external159 .byte 1 # DW_AT_decl_file160 .byte 1 # DW_AT_decl_line161 .byte 2 # DW_AT_location162 .byte 251163 .byte 0164 .byte 3 # Abbrev [3] 0x24:0x4 DW_TAG_base_type165 .byte 1 # DW_AT_name166 .byte 5 # DW_AT_encoding167 .byte 4 # DW_AT_byte_size168 .byte 2 # Abbrev [2] 0x28:0xb DW_TAG_variable169 .byte 2 # DW_AT_name170 .long 36 # DW_AT_type171 # DW_AT_external172 .byte 1 # DW_AT_decl_file173 .byte 2 # DW_AT_decl_line174 .byte 2 # DW_AT_location175 .byte 251176 .byte 1177 .byte 4 # Abbrev [4] 0x33:0x27 DW_TAG_subprogram178 .byte 2 # DW_AT_low_pc179 .long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc180 .byte 1 # DW_AT_frame_base181 .byte 86182 .byte 3 # DW_AT_linkage_name183 .byte 4 # DW_AT_name184 .byte 1 # DW_AT_decl_file185 .byte 4 # DW_AT_decl_line186 .long 36 # DW_AT_type187 # DW_AT_external188 .byte 5 # Abbrev [5] 0x43:0xb DW_TAG_formal_parameter189 .byte 2 # DW_AT_location190 .byte 145191 .byte 124192 .byte 5 # DW_AT_name193 .byte 1 # DW_AT_decl_file194 .byte 4 # DW_AT_decl_line195 .long 36 # DW_AT_type196 .byte 5 # Abbrev [5] 0x4e:0xb DW_TAG_formal_parameter197 .byte 2 # DW_AT_location198 .byte 145199 .byte 120200 .byte 6 # DW_AT_name201 .byte 1 # DW_AT_decl_file202 .byte 4 # DW_AT_decl_line203 .long 36 # DW_AT_type204 .byte 0 # End Of Children Mark205 .byte 0 # End Of Children Mark206.Ldebug_info_dwo_end0:207 .section .debug_abbrev.dwo,"e",@progbits208 .byte 1 # Abbreviation Code209 .byte 17 # DW_TAG_compile_unit210 .byte 1 # DW_CHILDREN_yes211 .byte 37 # DW_AT_producer212 .ascii "\202>" # DW_FORM_GNU_str_index213 .byte 19 # DW_AT_language214 .byte 5 # DW_FORM_data2215 .byte 3 # DW_AT_name216 .ascii "\202>" # DW_FORM_GNU_str_index217 .ascii "\260B" # DW_AT_GNU_dwo_name218 .ascii "\202>" # DW_FORM_GNU_str_index219 .ascii "\261B" # DW_AT_GNU_dwo_id220 .byte 7 # DW_FORM_data8221 .byte 0 # EOM(1)222 .byte 0 # EOM(2)223 .byte 2 # Abbreviation Code224 .byte 52 # DW_TAG_variable225 .byte 0 # DW_CHILDREN_no226 .byte 3 # DW_AT_name227 .ascii "\202>" # DW_FORM_GNU_str_index228 .byte 73 # DW_AT_type229 .byte 19 # DW_FORM_ref4230 .byte 63 # DW_AT_external231 .byte 25 # DW_FORM_flag_present232 .byte 58 # DW_AT_decl_file233 .byte 11 # DW_FORM_data1234 .byte 59 # DW_AT_decl_line235 .byte 11 # DW_FORM_data1236 .byte 2 # DW_AT_location237 .byte 24 # DW_FORM_exprloc238 .byte 0 # EOM(1)239 .byte 0 # EOM(2)240 .byte 3 # Abbreviation Code241 .byte 36 # DW_TAG_base_type242 .byte 0 # DW_CHILDREN_no243 .byte 3 # DW_AT_name244 .ascii "\202>" # DW_FORM_GNU_str_index245 .byte 62 # DW_AT_encoding246 .byte 11 # DW_FORM_data1247 .byte 11 # DW_AT_byte_size248 .byte 11 # DW_FORM_data1249 .byte 0 # EOM(1)250 .byte 0 # EOM(2)251 .byte 4 # Abbreviation Code252 .byte 46 # DW_TAG_subprogram253 .byte 1 # DW_CHILDREN_yes254 .byte 17 # DW_AT_low_pc255 .ascii "\201>" # DW_FORM_GNU_addr_index256 .byte 18 # DW_AT_high_pc257 .byte 6 # DW_FORM_data4258 .byte 64 # DW_AT_frame_base259 .byte 24 # DW_FORM_exprloc260 .byte 110 # DW_AT_linkage_name261 .ascii "\202>" # DW_FORM_GNU_str_index262 .byte 3 # DW_AT_name263 .ascii "\202>" # DW_FORM_GNU_str_index264 .byte 58 # DW_AT_decl_file265 .byte 11 # DW_FORM_data1266 .byte 59 # DW_AT_decl_line267 .byte 11 # DW_FORM_data1268 .byte 73 # DW_AT_type269 .byte 19 # DW_FORM_ref4270 .byte 63 # DW_AT_external271 .byte 25 # DW_FORM_flag_present272 .byte 0 # EOM(1)273 .byte 0 # EOM(2)274 .byte 5 # Abbreviation Code275 .byte 5 # DW_TAG_formal_parameter276 .byte 0 # DW_CHILDREN_no277 .byte 2 # DW_AT_location278 .byte 24 # DW_FORM_exprloc279 .byte 3 # DW_AT_name280 .ascii "\202>" # DW_FORM_GNU_str_index281 .byte 58 # DW_AT_decl_file282 .byte 11 # DW_FORM_data1283 .byte 59 # DW_AT_decl_line284 .byte 11 # DW_FORM_data1285 .byte 73 # DW_AT_type286 .byte 19 # DW_FORM_ref4287 .byte 0 # EOM(1)288 .byte 0 # EOM(2)289 .byte 0 # EOM(3)290 .section .debug_addr,"",@progbits291.Laddr_table_base0:292 .quad z293 .quad d294 .quad .Lfunc_begin0295 .ident "clang version 15.0.0"296 .section ".note.GNU-stack","",@progbits297 .section .debug_line,"",@progbits298.Lline_table_start0:299