313 lines · plain
1/* Original C (for context):2* __attribute__((noinline))3* int regs_int_params(int a, int b, int c, int d, int e, int f) {4* // Keep all params in regs; avoid spilling to the stack.5* // The compiler will usually keep a..f in the 6 integer-arg regs.6* asm volatile("" :: "r"(a), "r"(b), "r"(c), "r"(d), "r"(e), "r"(f));7* return a + b + c + d + e + f;8* }9*/10 .file "regs_int_params.c"11 .text12 .globl regs_int_params # -- Begin function regs_int_params13 .p2align 414 .type regs_int_params,@function15regs_int_params: # @regs_int_params16.Lfunc_begin0:17 .file 0 "." "regs_int_params.c" md5 0xcf39432098ab893043cc8b4606354bd218 .loc 0 2 0 # regs_int_params.c:2:019 .cfi_startproc20# %bb.0: # %entry21 #DEBUG_VALUE: regs_int_params:a <- $edi22 #DEBUG_VALUE: regs_int_params:b <- $esi23 #DEBUG_VALUE: regs_int_params:c <- $edx24 #DEBUG_VALUE: regs_int_params:d <- $ecx25 #DEBUG_VALUE: regs_int_params:e <- $r8d26 #DEBUG_VALUE: regs_int_params:f <- $r9d27 pushq %rbp28 .cfi_def_cfa_offset 1629 .cfi_offset %rbp, -1630 movq %rsp, %rbp31 .cfi_def_cfa_register %rbp32 # kill: def $r9d killed $r9d def $r933 # kill: def $r8d killed $r8d def $r834 # kill: def $ecx killed $ecx def $rcx35 # kill: def $edx killed $edx def $rdx36 # kill: def $esi killed $esi def $rsi37 # kill: def $edi killed $edi def $rdi38.Ltmp0:39 .loc 0 5 3 prologue_end # regs_int_params.c:5:340 #APP41 #NO_APP42 .loc 0 6 12 # regs_int_params.c:6:1243 addl %edi, %esi44.Ltmp1:45 #DEBUG_VALUE: regs_int_params:b <- [DW_OP_LLVM_entry_value 1] $esi46 .loc 0 6 16 is_stmt 0 # regs_int_params.c:6:1647 leal (%rdx,%rcx), %eax48 .loc 0 6 20 # regs_int_params.c:6:2049 addl %esi, %eax50 .loc 0 6 28 # regs_int_params.c:6:2851 addl %r8d, %eax52 addl %r9d, %eax53 .loc 0 6 3 epilogue_begin # regs_int_params.c:6:354 popq %rbp55 .cfi_def_cfa %rsp, 856 retq57.Ltmp2:58.Lfunc_end0:59 .size regs_int_params, .Lfunc_end0-regs_int_params60 .cfi_endproc61 # -- End function62 .section .debug_loclists,"",@progbits63 .long .Ldebug_list_header_end0-.Ldebug_list_header_start0 # Length64.Ldebug_list_header_start0:65 .short 5 # Version66 .byte 8 # Address size67 .byte 0 # Segment selector size68 .long 1 # Offset entry count69.Lloclists_table_base0:70 .long .Ldebug_loc0-.Lloclists_table_base071.Ldebug_loc0:72 .byte 4 # DW_LLE_offset_pair73 .uleb128 .Lfunc_begin0-.Lfunc_begin0 # starting offset74 .uleb128 .Ltmp1-.Lfunc_begin0 # ending offset75 .byte 1 # Loc expr size76 .byte 84 # super-register DW_OP_reg477 .byte 4 # DW_LLE_offset_pair78 .uleb128 .Ltmp1-.Lfunc_begin0 # starting offset79 .uleb128 .Lfunc_end0-.Lfunc_begin0 # ending offset80 .byte 4 # Loc expr size81 .byte 163 # DW_OP_entry_value82 .byte 1 # 183 .byte 84 # super-register DW_OP_reg484 .byte 159 # DW_OP_stack_value85 .byte 0 # DW_LLE_end_of_list86.Ldebug_list_header_end0:87 .section .debug_abbrev,"",@progbits88 .byte 1 # Abbreviation Code89 .byte 17 # DW_TAG_compile_unit90 .byte 1 # DW_CHILDREN_yes91 .byte 37 # DW_AT_producer92 .byte 37 # DW_FORM_strx193 .byte 19 # DW_AT_language94 .byte 5 # DW_FORM_data295 .byte 3 # DW_AT_name96 .byte 37 # DW_FORM_strx197 .byte 114 # DW_AT_str_offsets_base98 .byte 23 # DW_FORM_sec_offset99 .byte 16 # DW_AT_stmt_list100 .byte 23 # DW_FORM_sec_offset101 .byte 27 # DW_AT_comp_dir102 .byte 37 # DW_FORM_strx1103 .byte 17 # DW_AT_low_pc104 .byte 27 # DW_FORM_addrx105 .byte 18 # DW_AT_high_pc106 .byte 6 # DW_FORM_data4107 .byte 115 # DW_AT_addr_base108 .byte 23 # DW_FORM_sec_offset109 .ascii "\214\001" # DW_AT_loclists_base110 .byte 23 # DW_FORM_sec_offset111 .byte 0 # EOM(1)112 .byte 0 # EOM(2)113 .byte 2 # Abbreviation Code114 .byte 46 # DW_TAG_subprogram115 .byte 1 # DW_CHILDREN_yes116 .byte 17 # DW_AT_low_pc117 .byte 27 # DW_FORM_addrx118 .byte 18 # DW_AT_high_pc119 .byte 6 # DW_FORM_data4120 .byte 64 # DW_AT_frame_base121 .byte 24 # DW_FORM_exprloc122 .byte 122 # DW_AT_call_all_calls123 .byte 25 # DW_FORM_flag_present124 .byte 3 # DW_AT_name125 .byte 37 # DW_FORM_strx1126 .byte 58 # DW_AT_decl_file127 .byte 11 # DW_FORM_data1128 .byte 59 # DW_AT_decl_line129 .byte 11 # DW_FORM_data1130 .byte 39 # DW_AT_prototyped131 .byte 25 # DW_FORM_flag_present132 .byte 73 # DW_AT_type133 .byte 19 # DW_FORM_ref4134 .byte 63 # DW_AT_external135 .byte 25 # DW_FORM_flag_present136 .byte 0 # EOM(1)137 .byte 0 # EOM(2)138 .byte 3 # Abbreviation Code139 .byte 5 # DW_TAG_formal_parameter140 .byte 0 # DW_CHILDREN_no141 .byte 2 # DW_AT_location142 .byte 24 # DW_FORM_exprloc143 .byte 3 # DW_AT_name144 .byte 37 # DW_FORM_strx1145 .byte 58 # DW_AT_decl_file146 .byte 11 # DW_FORM_data1147 .byte 59 # DW_AT_decl_line148 .byte 11 # DW_FORM_data1149 .byte 73 # DW_AT_type150 .byte 19 # DW_FORM_ref4151 .byte 0 # EOM(1)152 .byte 0 # EOM(2)153 .byte 4 # Abbreviation Code154 .byte 5 # DW_TAG_formal_parameter155 .byte 0 # DW_CHILDREN_no156 .byte 2 # DW_AT_location157 .byte 34 # DW_FORM_loclistx158 .byte 3 # DW_AT_name159 .byte 37 # DW_FORM_strx1160 .byte 58 # DW_AT_decl_file161 .byte 11 # DW_FORM_data1162 .byte 59 # DW_AT_decl_line163 .byte 11 # DW_FORM_data1164 .byte 73 # DW_AT_type165 .byte 19 # DW_FORM_ref4166 .byte 0 # EOM(1)167 .byte 0 # EOM(2)168 .byte 5 # Abbreviation Code169 .byte 36 # DW_TAG_base_type170 .byte 0 # DW_CHILDREN_no171 .byte 3 # DW_AT_name172 .byte 37 # DW_FORM_strx1173 .byte 62 # DW_AT_encoding174 .byte 11 # DW_FORM_data1175 .byte 11 # DW_AT_byte_size176 .byte 11 # DW_FORM_data1177 .byte 0 # EOM(1)178 .byte 0 # EOM(2)179 .byte 0 # EOM(3)180 .section .debug_info,"",@progbits181.Lcu_begin0:182 .long .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit183.Ldebug_info_start0:184 .short 5 # DWARF version number185 .byte 1 # DWARF Unit Type186 .byte 8 # Address Size (in bytes)187 .long .debug_abbrev # Offset Into Abbrev. Section188 .byte 1 # Abbrev [1] 0xc:0x6b DW_TAG_compile_unit189 .byte 0 # DW_AT_producer190 .short 29 # DW_AT_language191 .byte 1 # DW_AT_name192 .long .Lstr_offsets_base0 # DW_AT_str_offsets_base193 .long .Lline_table_start0 # DW_AT_stmt_list194 .byte 2 # DW_AT_comp_dir195 .byte 0 # DW_AT_low_pc196 .long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc197 .long .Laddr_table_base0 # DW_AT_addr_base198 .long .Lloclists_table_base0 # DW_AT_loclists_base199 .byte 2 # Abbrev [2] 0x27:0x4b DW_TAG_subprogram200 .byte 0 # DW_AT_low_pc201 .long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc202 .byte 1 # DW_AT_frame_base203 .byte 86204 # DW_AT_call_all_calls205 .byte 3 # DW_AT_name206 .byte 0 # DW_AT_decl_file207 .byte 2 # DW_AT_decl_line208 # DW_AT_prototyped209 .long 114 # DW_AT_type210 # DW_AT_external211 .byte 3 # Abbrev [3] 0x36:0xa DW_TAG_formal_parameter212 .byte 1 # DW_AT_location213 .byte 85214 .byte 5 # DW_AT_name215 .byte 0 # DW_AT_decl_file216 .byte 2 # DW_AT_decl_line217 .long 114 # DW_AT_type218 .byte 4 # Abbrev [4] 0x40:0x9 DW_TAG_formal_parameter219 .byte 0 # DW_AT_location220 .byte 6 # DW_AT_name221 .byte 0 # DW_AT_decl_file222 .byte 2 # DW_AT_decl_line223 .long 114 # DW_AT_type224 .byte 3 # Abbrev [3] 0x49:0xa DW_TAG_formal_parameter225 .byte 1 # DW_AT_location226 .byte 81227 .byte 7 # DW_AT_name228 .byte 0 # DW_AT_decl_file229 .byte 2 # DW_AT_decl_line230 .long 114 # DW_AT_type231 .byte 3 # Abbrev [3] 0x53:0xa DW_TAG_formal_parameter232 .byte 1 # DW_AT_location233 .byte 82234 .byte 8 # DW_AT_name235 .byte 0 # DW_AT_decl_file236 .byte 2 # DW_AT_decl_line237 .long 114 # DW_AT_type238 .byte 3 # Abbrev [3] 0x5d:0xa DW_TAG_formal_parameter239 .byte 1 # DW_AT_location240 .byte 88241 .byte 9 # DW_AT_name242 .byte 0 # DW_AT_decl_file243 .byte 2 # DW_AT_decl_line244 .long 114 # DW_AT_type245 .byte 3 # Abbrev [3] 0x67:0xa DW_TAG_formal_parameter246 .byte 1 # DW_AT_location247 .byte 89248 .byte 10 # DW_AT_name249 .byte 0 # DW_AT_decl_file250 .byte 2 # DW_AT_decl_line251 .long 114 # DW_AT_type252 .byte 0 # End Of Children Mark253 .byte 5 # Abbrev [5] 0x72:0x4 DW_TAG_base_type254 .byte 4 # DW_AT_name255 .byte 5 # DW_AT_encoding256 .byte 4 # DW_AT_byte_size257 .byte 0 # End Of Children Mark258.Ldebug_info_end0:259 .section .debug_str_offsets,"",@progbits260 .long 48 # Length of String Offsets Set261 .short 5262 .short 0263.Lstr_offsets_base0:264 .section .debug_str,"MS",@progbits,1265.Linfo_string0:266 .asciz "clang version 22.0.0git (https://github.com/UltimateForce21/llvm-project.git 79c0a9e1e7da0f727c41d27c9c6ff8a28bb7d06f)" # string offset=0267.Linfo_string1:268 .asciz "regs_int_params.c" # string offset=119269.Linfo_string2:270 .asciz "." # string offset=137271.Linfo_string3:272 .asciz "regs_int_params" # string offset=139273.Linfo_string4:274 .asciz "int" # string offset=155275.Linfo_string5:276 .asciz "a" # string offset=159277.Linfo_string6:278 .asciz "b" # string offset=161279.Linfo_string7:280 .asciz "c" # string offset=163281.Linfo_string8:282 .asciz "d" # string offset=165283.Linfo_string9:284 .asciz "e" # string offset=167285.Linfo_string10:286 .asciz "f" # string offset=169287 .section .debug_str_offsets,"",@progbits288 .long .Linfo_string0289 .long .Linfo_string1290 .long .Linfo_string2291 .long .Linfo_string3292 .long .Linfo_string4293 .long .Linfo_string5294 .long .Linfo_string6295 .long .Linfo_string7296 .long .Linfo_string8297 .long .Linfo_string9298 .long .Linfo_string10299 .section .debug_addr,"",@progbits300 .long .Ldebug_addr_end0-.Ldebug_addr_start0 # Length of contribution301.Ldebug_addr_start0:302 .short 5 # DWARF version number303 .byte 8 # Address size304 .byte 0 # Segment selector size305.Laddr_table_base0:306 .quad .Lfunc_begin0307.Ldebug_addr_end0:308 .ident "clang version 22.0.0git (https://github.com/UltimateForce21/llvm-project.git 79c0a9e1e7da0f727c41d27c9c6ff8a28bb7d06f)"309 .section ".note.GNU-stack","",@progbits310 .addrsig311 .section .debug_line,"",@progbits312.Lline_table_start0:313