248 lines · plain
1 .text2 .file "matmul.c"3 .section .rodata.cst8,"aM",@progbits,84 .p2align 3 # -- Begin function init_array5.LCPI0_0:6 .quad 4602678819172646912 # double 0.57 .text8 .globl init_array9 .p2align 4, 0x9010 .type init_array,@function11init_array: # @init_array12 .cfi_startproc13# %bb.0: # %entry14 pushq %rbp15 .cfi_def_cfa_offset 1616 .cfi_offset %rbp, -1617 movq %rsp, %rbp18 .cfi_def_cfa_register %rbp19 leaq B(%rip), %rax20 leaq A(%rip), %rcx21 xorl %r8d, %r8d22 movsd .LCPI0_0(%rip), %xmm0 # xmm0 = mem[0],zero23 xorl %r9d, %r9d24 .p2align 4, 0x9025.LBB0_1: # %for.cond1.preheader26 # =>This Loop Header: Depth=127 # Child Loop BB0_2 Depth 228 movl $1, %edi29 xorl %edx, %edx30 .p2align 4, 0x9031.LBB0_2: # %for.body332 # Parent Loop BB0_1 Depth=133 # => This Inner Loop Header: Depth=234 movl %edx, %esi35 andl $1022, %esi # imm = 0x3FE36 orl $1, %esi37 xorps %xmm1, %xmm138 cvtsi2sdl %esi, %xmm139 mulsd %xmm0, %xmm140 cvtsd2ss %xmm1, %xmm141 movss %xmm1, -4(%rcx,%rdi,4)42 movss %xmm1, -4(%rax,%rdi,4)43 leal (%r9,%rdx), %esi44 andl $1023, %esi # imm = 0x3FF45 addl $1, %esi46 xorps %xmm1, %xmm147 cvtsi2sdl %esi, %xmm148 mulsd %xmm0, %xmm149 cvtsd2ss %xmm1, %xmm150 movss %xmm1, (%rcx,%rdi,4)51 movss %xmm1, (%rax,%rdi,4)52 addq $2, %rdi53 addl %r8d, %edx54 cmpq $1537, %rdi # imm = 0x60155 jne .LBB0_256# %bb.3: # %for.inc1757 # in Loop: Header=BB0_1 Depth=158 addq $1, %r959 addq $6144, %rax # imm = 0x180060 addq $6144, %rcx # imm = 0x180061 addl $2, %r8d62 cmpq $1536, %r9 # imm = 0x60063 jne .LBB0_164# %bb.4: # %for.end1965 popq %rbp66 .cfi_def_cfa %rsp, 867 retq68.Lfunc_end0:69 .size init_array, .Lfunc_end0-init_array70 .cfi_endproc71 # -- End function72 .globl print_array # -- Begin function print_array73 .p2align 4, 0x9074 .type print_array,@function75print_array: # @print_array76 .cfi_startproc77# %bb.0: # %entry78 pushq %rbp79 .cfi_def_cfa_offset 1680 .cfi_offset %rbp, -1681 movq %rsp, %rbp82 .cfi_def_cfa_register %rbp83 pushq %r1584 pushq %r1485 pushq %r1386 pushq %r1287 pushq %rbx88 pushq %rax89 .cfi_offset %rbx, -5690 .cfi_offset %r12, -4891 .cfi_offset %r13, -4092 .cfi_offset %r14, -3293 .cfi_offset %r15, -2494 leaq C(%rip), %r1395 xorl %eax, %eax96 movl $3435973837, %r12d # imm = 0xCCCCCCCD97 leaq .L.str(%rip), %r1498 .p2align 4, 0x9099.LBB1_1: # %for.cond1.preheader100 # =>This Loop Header: Depth=1101 # Child Loop BB1_2 Depth 2102 movq %rax, -48(%rbp) # 8-byte Spill103 movq stdout(%rip), %rsi104 xorl %ebx, %ebx105 .p2align 4, 0x90106.LBB1_2: # %for.body3107 # Parent Loop BB1_1 Depth=1108 # => This Inner Loop Header: Depth=2109 movl %ebx, %eax110 imulq %r12, %rax111 shrq $38, %rax112 leal (%rax,%rax,4), %r15d113 shll $4, %r15d114 addl $79, %r15d115 movss (%r13,%rbx,4), %xmm0 # xmm0 = mem[0],zero,zero,zero116 cvtss2sd %xmm0, %xmm0117 movb $1, %al118 movq %rsi, %rdi119 movq %r14, %rsi120 callq fprintf121 cmpl %ebx, %r15d122 jne .LBB1_4123# %bb.3: # %if.then124 # in Loop: Header=BB1_2 Depth=2125 movq stdout(%rip), %rsi126 movl $10, %edi127 callq fputc@PLT128.LBB1_4: # %for.inc129 # in Loop: Header=BB1_2 Depth=2130 addq $1, %rbx131 movq stdout(%rip), %rsi132 cmpq $1536, %rbx # imm = 0x600133 jne .LBB1_2134# %bb.5: # %for.end135 # in Loop: Header=BB1_1 Depth=1136 movl $10, %edi137 callq fputc@PLT138 movq -48(%rbp), %rax # 8-byte Reload139 addq $1, %rax140 addq $6144, %r13 # imm = 0x1800141 cmpq $1536, %rax # imm = 0x600142 jne .LBB1_1143# %bb.6: # %for.end12144 addq $8, %rsp145 popq %rbx146 popq %r12147 popq %r13148 popq %r14149 popq %r15150 popq %rbp151 .cfi_def_cfa %rsp, 8152 retq153.Lfunc_end1:154 .size print_array, .Lfunc_end1-print_array155 .cfi_endproc156 # -- End function157 .globl main # -- Begin function main158 .p2align 4, 0x90159 .type main,@function160main: # @main161 .cfi_startproc162# %bb.0: # %entry163 pushq %rbp164 .cfi_def_cfa_offset 16165 .cfi_offset %rbp, -16166 movq %rsp, %rbp167 .cfi_def_cfa_register %rbp168 callq init_array169 leaq A(%rip), %rax170 xorl %r10d, %r10d171 leaq B(%rip), %r8172 leaq C(%rip), %r9173 .p2align 4, 0x90174.LBB2_1: # %for.cond1.preheader175 # =>This Loop Header: Depth=1176 # Child Loop BB2_2 Depth 2177 # Child Loop BB2_3 Depth 3178 movq %r8, %rsi179 xorl %edx, %edx180 .p2align 4, 0x90181.LBB2_2: # %for.body3182 # Parent Loop BB2_1 Depth=1183 # => This Loop Header: Depth=2184 # Child Loop BB2_3 Depth 3185 leaq (%r10,%r10,2), %rcx186 shlq $11, %rcx187 addq %r9, %rcx188 leaq (%rcx,%rdx,4), %r11189 movl $0, (%rcx,%rdx,4)190 xorps %xmm0, %xmm0191 movl $2, %ecx192 movq %rsi, %rdi193 .p2align 4, 0x90194.LBB2_3: # %for.body8195 # Parent Loop BB2_1 Depth=1196 # Parent Loop BB2_2 Depth=2197 # => This Inner Loop Header: Depth=3198 movss -8(%rax,%rcx,4), %xmm1 # xmm1 = mem[0],zero,zero,zero199 mulss (%rdi), %xmm1200 movss -4(%rax,%rcx,4), %xmm2 # xmm2 = mem[0],zero,zero,zero201 addss %xmm0, %xmm1202 mulss 6144(%rdi), %xmm2203 addss %xmm1, %xmm2204 movss (%rax,%rcx,4), %xmm0 # xmm0 = mem[0],zero,zero,zero205 mulss 12288(%rdi), %xmm0206 addss %xmm2, %xmm0207 addq $3, %rcx208 addq $18432, %rdi # imm = 0x4800209 cmpq $1538, %rcx # imm = 0x602210 jne .LBB2_3211# %bb.4: # %for.inc25212 # in Loop: Header=BB2_2 Depth=2213 movss %xmm0, (%r11)214 addq $1, %rdx215 addq $4, %rsi216 cmpq $1536, %rdx # imm = 0x600217 jne .LBB2_2218# %bb.5: # %for.inc28219 # in Loop: Header=BB2_1 Depth=1220 addq $1, %r10221 addq $6144, %rax # imm = 0x1800222 cmpq $1536, %r10 # imm = 0x600223 jne .LBB2_1224# %bb.6: # %for.end30225 xorl %eax, %eax226 popq %rbp227 .cfi_def_cfa %rsp, 8228 retq229.Lfunc_end2:230 .size main, .Lfunc_end2-main231 .cfi_endproc232 # -- End function233 .type A,@object # @A234 .comm A,9437184,16235 .type B,@object # @B236 .comm B,9437184,16237 .type .L.str,@object # @.str238 .section .rodata.str1.1,"aMS",@progbits,1239.L.str:240 .asciz "%lf "241 .size .L.str, 5242 243 .type C,@object # @C244 .comm C,9437184,16245 246 .ident "clang version 8.0.0 (trunk 342834) (llvm/trunk 342856)"247 .section ".note.GNU-stack","",@progbits248