323 lines · plain
1# clang++ -g -gdwarf-4 -emit-llvm -S helper.cpp2# llc -O2 -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 #DEBUG_VALUE: helper:z_ <- $edi24 #DEBUG_VALUE: helper:d_ <- $esi25 movl %esi, %eax26.Ltmp0:27 .loc 1 5 4 prologue_end # helper.cpp:5:428 addl z(%rip), %edi29.Ltmp1:30 #DEBUG_VALUE: helper:z_ <- [DW_OP_LLVM_entry_value 1] $edi31 .loc 1 6 4 # helper.cpp:6:432 addl d(%rip), %eax33 .loc 1 5 4 # helper.cpp:5:434 movl %edi, z(%rip)35 .loc 1 6 4 # helper.cpp:6:436 movl %eax, d(%rip)37 .loc 1 7 11 # helper.cpp:7:1138 imull %edi, %eax39 .loc 1 7 2 is_stmt 0 # helper.cpp:7:240 retq41.Ltmp2:42.Lfunc_end0:43 .size _Z6helperii, .Lfunc_end0-_Z6helperii44 .cfi_endproc45 # -- End function46 .type z,@object # @z47 .bss48 .globl z49 .p2align 250z:51 .long 0 # 0x052 .size z, 453 54 .type d,@object # @d55 .globl d56 .p2align 257d:58 .long 0 # 0x059 .size d, 460 61 .section .debug_loc.dwo,"e",@progbits62.Ldebug_loc0:63 .byte 364 .byte 265 .long .Ltmp1-.Lfunc_begin066 .short 1 # Loc expr size67 .byte 85 # super-register DW_OP_reg568 .byte 369 .byte 370 .long .Lfunc_end0-.Ltmp171 .short 4 # Loc expr size72 .byte 243 # DW_OP_GNU_entry_value73 .byte 1 # 174 .byte 85 # super-register DW_OP_reg575 .byte 159 # DW_OP_stack_value76 .byte 077 .section .debug_abbrev,"",@progbits78 .byte 1 # Abbreviation Code79 .byte 17 # DW_TAG_compile_unit80 .byte 0 # DW_CHILDREN_no81 .byte 16 # DW_AT_stmt_list82 .byte 23 # DW_FORM_sec_offset83 .byte 27 # DW_AT_comp_dir84 .byte 14 # DW_FORM_strp85 .ascii "\260B" # DW_AT_GNU_dwo_name86 .byte 14 # DW_FORM_strp87 .ascii "\261B" # DW_AT_GNU_dwo_id88 .byte 7 # DW_FORM_data889 .byte 17 # DW_AT_low_pc90 .byte 1 # DW_FORM_addr91 .byte 18 # DW_AT_high_pc92 .byte 6 # DW_FORM_data493 .ascii "\263B" # DW_AT_GNU_addr_base94 .byte 23 # DW_FORM_sec_offset95 .byte 0 # EOM(1)96 .byte 0 # EOM(2)97 .byte 0 # EOM(3)98 .section .debug_info,"",@progbits99.Lcu_begin0:100 .long .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit101.Ldebug_info_start0:102 .short 4 # DWARF version number103 .long .debug_abbrev # Offset Into Abbrev. Section104 .byte 8 # Address Size (in bytes)105 .byte 1 # Abbrev [1] 0xb:0x25 DW_TAG_compile_unit106 .long .Lline_table_start0 # DW_AT_stmt_list107 .long .Lskel_string0 # DW_AT_comp_dir108 .long .Lskel_string1 # DW_AT_GNU_dwo_name109 .quad -5732284259998169791 # DW_AT_GNU_dwo_id110 .quad .Lfunc_begin0 # DW_AT_low_pc111 .long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc112 .long .Laddr_table_base0 # DW_AT_GNU_addr_base113.Ldebug_info_end0:114 .section .debug_str,"MS",@progbits,1115.Lskel_string0:116 .asciz "." # string offset=0117.Lskel_string1:118 .asciz "helper.dwo" # string offset=2119 .section .debug_str.dwo,"eMS",@progbits,1120.Linfo_string0:121 .asciz "z" # string offset=0122.Linfo_string1:123 .asciz "int" # string offset=2124.Linfo_string2:125 .asciz "d" # string offset=6126.Linfo_string3:127 .asciz "_Z6helperii" # string offset=8128.Linfo_string4:129 .asciz "helper" # string offset=20130.Linfo_string5:131 .asciz "z_" # string offset=27132.Linfo_string6:133 .asciz "d_" # string offset=30134.Linfo_string7:135 .asciz "clang version 15.0.0" # string offset=33136.Linfo_string8:137 .asciz "helper.cpp" # string offset=54138.Linfo_string9:139 .asciz "helper.dwo" # string offset=65140 .section .debug_str_offsets.dwo,"e",@progbits141 .long 0142 .long 2143 .long 6144 .long 8145 .long 20146 .long 27147 .long 30148 .long 33149 .long 54150 .long 65151 .section .debug_info.dwo,"e",@progbits152 .long .Ldebug_info_dwo_end0-.Ldebug_info_dwo_start0 # Length of Unit153.Ldebug_info_dwo_start0:154 .short 4 # DWARF version number155 .long 0 # Offset Into Abbrev. Section156 .byte 8 # Address Size (in bytes)157 .byte 1 # Abbrev [1] 0xb:0x50 DW_TAG_compile_unit158 .byte 7 # DW_AT_producer159 .short 33 # DW_AT_language160 .byte 8 # DW_AT_name161 .byte 9 # DW_AT_GNU_dwo_name162 .quad -5732284259998169791 # DW_AT_GNU_dwo_id163 .byte 2 # Abbrev [2] 0x19:0xb DW_TAG_variable164 .byte 0 # DW_AT_name165 .long 36 # DW_AT_type166 # DW_AT_external167 .byte 1 # DW_AT_decl_file168 .byte 1 # DW_AT_decl_line169 .byte 2 # DW_AT_location170 .byte 251171 .byte 0172 .byte 3 # Abbrev [3] 0x24:0x4 DW_TAG_base_type173 .byte 1 # DW_AT_name174 .byte 5 # DW_AT_encoding175 .byte 4 # DW_AT_byte_size176 .byte 2 # Abbrev [2] 0x28:0xb DW_TAG_variable177 .byte 2 # DW_AT_name178 .long 36 # DW_AT_type179 # DW_AT_external180 .byte 1 # DW_AT_decl_file181 .byte 2 # DW_AT_decl_line182 .byte 2 # DW_AT_location183 .byte 251184 .byte 1185 .byte 4 # Abbrev [4] 0x33:0x27 DW_TAG_subprogram186 .byte 2 # DW_AT_low_pc187 .long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc188 .byte 1 # DW_AT_frame_base189 .byte 87190 # DW_AT_GNU_all_call_sites191 .byte 3 # DW_AT_linkage_name192 .byte 4 # DW_AT_name193 .byte 1 # DW_AT_decl_file194 .byte 4 # DW_AT_decl_line195 .long 36 # DW_AT_type196 # DW_AT_external197 .byte 5 # Abbrev [5] 0x43:0xc DW_TAG_formal_parameter198 .long .Ldebug_loc0-.debug_loc.dwo # DW_AT_location199 .byte 5 # DW_AT_name200 .byte 1 # DW_AT_decl_file201 .byte 4 # DW_AT_decl_line202 .long 36 # DW_AT_type203 .byte 6 # Abbrev [6] 0x4f:0xa DW_TAG_formal_parameter204 .byte 1 # DW_AT_location205 .byte 84206 .byte 6 # DW_AT_name207 .byte 1 # DW_AT_decl_file208 .byte 4 # DW_AT_decl_line209 .long 36 # DW_AT_type210 .byte 0 # End Of Children Mark211 .byte 0 # End Of Children Mark212.Ldebug_info_dwo_end0:213 .section .debug_abbrev.dwo,"e",@progbits214 .byte 1 # Abbreviation Code215 .byte 17 # DW_TAG_compile_unit216 .byte 1 # DW_CHILDREN_yes217 .byte 37 # DW_AT_producer218 .ascii "\202>" # DW_FORM_GNU_str_index219 .byte 19 # DW_AT_language220 .byte 5 # DW_FORM_data2221 .byte 3 # DW_AT_name222 .ascii "\202>" # DW_FORM_GNU_str_index223 .ascii "\260B" # DW_AT_GNU_dwo_name224 .ascii "\202>" # DW_FORM_GNU_str_index225 .ascii "\261B" # DW_AT_GNU_dwo_id226 .byte 7 # DW_FORM_data8227 .byte 0 # EOM(1)228 .byte 0 # EOM(2)229 .byte 2 # Abbreviation Code230 .byte 52 # DW_TAG_variable231 .byte 0 # DW_CHILDREN_no232 .byte 3 # DW_AT_name233 .ascii "\202>" # DW_FORM_GNU_str_index234 .byte 73 # DW_AT_type235 .byte 19 # DW_FORM_ref4236 .byte 63 # DW_AT_external237 .byte 25 # DW_FORM_flag_present238 .byte 58 # DW_AT_decl_file239 .byte 11 # DW_FORM_data1240 .byte 59 # DW_AT_decl_line241 .byte 11 # DW_FORM_data1242 .byte 2 # DW_AT_location243 .byte 24 # DW_FORM_exprloc244 .byte 0 # EOM(1)245 .byte 0 # EOM(2)246 .byte 3 # Abbreviation Code247 .byte 36 # DW_TAG_base_type248 .byte 0 # DW_CHILDREN_no249 .byte 3 # DW_AT_name250 .ascii "\202>" # DW_FORM_GNU_str_index251 .byte 62 # DW_AT_encoding252 .byte 11 # DW_FORM_data1253 .byte 11 # DW_AT_byte_size254 .byte 11 # DW_FORM_data1255 .byte 0 # EOM(1)256 .byte 0 # EOM(2)257 .byte 4 # Abbreviation Code258 .byte 46 # DW_TAG_subprogram259 .byte 1 # DW_CHILDREN_yes260 .byte 17 # DW_AT_low_pc261 .ascii "\201>" # DW_FORM_GNU_addr_index262 .byte 18 # DW_AT_high_pc263 .byte 6 # DW_FORM_data4264 .byte 64 # DW_AT_frame_base265 .byte 24 # DW_FORM_exprloc266 .ascii "\227B" # DW_AT_GNU_all_call_sites267 .byte 25 # DW_FORM_flag_present268 .byte 110 # DW_AT_linkage_name269 .ascii "\202>" # DW_FORM_GNU_str_index270 .byte 3 # DW_AT_name271 .ascii "\202>" # DW_FORM_GNU_str_index272 .byte 58 # DW_AT_decl_file273 .byte 11 # DW_FORM_data1274 .byte 59 # DW_AT_decl_line275 .byte 11 # DW_FORM_data1276 .byte 73 # DW_AT_type277 .byte 19 # DW_FORM_ref4278 .byte 63 # DW_AT_external279 .byte 25 # DW_FORM_flag_present280 .byte 0 # EOM(1)281 .byte 0 # EOM(2)282 .byte 5 # Abbreviation Code283 .byte 5 # DW_TAG_formal_parameter284 .byte 0 # DW_CHILDREN_no285 .byte 2 # DW_AT_location286 .byte 23 # DW_FORM_sec_offset287 .byte 3 # DW_AT_name288 .ascii "\202>" # DW_FORM_GNU_str_index289 .byte 58 # DW_AT_decl_file290 .byte 11 # DW_FORM_data1291 .byte 59 # DW_AT_decl_line292 .byte 11 # DW_FORM_data1293 .byte 73 # DW_AT_type294 .byte 19 # DW_FORM_ref4295 .byte 0 # EOM(1)296 .byte 0 # EOM(2)297 .byte 6 # Abbreviation Code298 .byte 5 # DW_TAG_formal_parameter299 .byte 0 # DW_CHILDREN_no300 .byte 2 # DW_AT_location301 .byte 24 # DW_FORM_exprloc302 .byte 3 # DW_AT_name303 .ascii "\202>" # DW_FORM_GNU_str_index304 .byte 58 # DW_AT_decl_file305 .byte 11 # DW_FORM_data1306 .byte 59 # DW_AT_decl_line307 .byte 11 # DW_FORM_data1308 .byte 73 # DW_AT_type309 .byte 19 # DW_FORM_ref4310 .byte 0 # EOM(1)311 .byte 0 # EOM(2)312 .byte 0 # EOM(3)313 .section .debug_addr,"",@progbits314.Laddr_table_base0:315 .quad z316 .quad d317 .quad .Lfunc_begin0318 .quad .Ltmp1319 .ident "clang version 15.0.0"320 .section ".note.GNU-stack","",@progbits321 .section .debug_line,"",@progbits322.Lline_table_start0:323