nb_kernel232_ia32_sse.s

来自「最著名最快的分子模拟软件」· S 代码 · 共 2,002 行 · 第 1/5 页

S
2,002
字号
        unpcklps %xmm4,%xmm3        unpckhps %xmm4,%xmm5        addps    %xmm3,%xmm0        addps    %xmm5,%xmm1        movlps  %xmm0,(%esi,%eax,4)        movlps  %xmm1,12(%esi,%eax,4)        movhps  %xmm1,24(%esi,%eax,4)        decl nb232_innerk(%esp)        jz    _nb_kernel232_ia32_sse.nb232_updateouterdata        jmp   _nb_kernel232_ia32_sse.nb232_single_loop_nb_kernel232_ia32_sse.nb232_updateouterdata:         movl  nb232_ii3(%esp),%ecx        movl  nb232_faction(%ebp),%edi        movl  nb232_fshift(%ebp),%esi        movl  nb232_is3(%esp),%edx        ## accumulate  Oi forces in xmm0, xmm1, xmm2         movaps nb232_fixO(%esp),%xmm0        movaps nb232_fiyO(%esp),%xmm1        movaps nb232_fizO(%esp),%xmm2        movhlps %xmm0,%xmm3        movhlps %xmm1,%xmm4        movhlps %xmm2,%xmm5        addps  %xmm3,%xmm0        addps  %xmm4,%xmm1        addps  %xmm5,%xmm2 ## sum is in 1/2 in xmm0-xmm2         movaps %xmm0,%xmm3        movaps %xmm1,%xmm4        movaps %xmm2,%xmm5        shufps $1,%xmm3,%xmm3        shufps $1,%xmm4,%xmm4        shufps $1,%xmm5,%xmm5        addss  %xmm3,%xmm0        addss  %xmm4,%xmm1        addss  %xmm5,%xmm2      ## xmm0-xmm2 has single force in pos0         ## increment i force         movss  (%edi,%ecx,4),%xmm3        movss  4(%edi,%ecx,4),%xmm4        movss  8(%edi,%ecx,4),%xmm5        addss  %xmm0,%xmm3        addss  %xmm1,%xmm4        addss  %xmm2,%xmm5        movss  %xmm3,(%edi,%ecx,4)        movss  %xmm4,4(%edi,%ecx,4)        movss  %xmm5,8(%edi,%ecx,4)        ## accumulate force in xmm6/xmm7 for fshift         movaps %xmm0,%xmm6        movss %xmm2,%xmm7        movlhps %xmm1,%xmm6        shufps $8,%xmm6,%xmm6 ## constant 00001000              ## accumulate H1i forces in xmm0, xmm1, xmm2         movaps nb232_fixH1(%esp),%xmm0        movaps nb232_fiyH1(%esp),%xmm1        movaps nb232_fizH1(%esp),%xmm2        movhlps %xmm0,%xmm3        movhlps %xmm1,%xmm4        movhlps %xmm2,%xmm5        addps  %xmm3,%xmm0        addps  %xmm4,%xmm1        addps  %xmm5,%xmm2 ## sum is in 1/2 in xmm0-xmm2         movaps %xmm0,%xmm3        movaps %xmm1,%xmm4        movaps %xmm2,%xmm5        shufps $1,%xmm3,%xmm3        shufps $1,%xmm4,%xmm4        shufps $1,%xmm5,%xmm5        addss  %xmm3,%xmm0        addss  %xmm4,%xmm1        addss  %xmm5,%xmm2      ## xmm0-xmm2 has single force in pos0         ## increment i force         movss  12(%edi,%ecx,4),%xmm3        movss  16(%edi,%ecx,4),%xmm4        movss  20(%edi,%ecx,4),%xmm5        addss  %xmm0,%xmm3        addss  %xmm1,%xmm4        addss  %xmm2,%xmm5        movss  %xmm3,12(%edi,%ecx,4)        movss  %xmm4,16(%edi,%ecx,4)        movss  %xmm5,20(%edi,%ecx,4)        ## accumulate force in xmm6/xmm7 for fshift         addss %xmm2,%xmm7        movlhps %xmm1,%xmm0        shufps $8,%xmm0,%xmm0 ## constant 00001000              addps   %xmm0,%xmm6        ## accumulate H2i forces in xmm0, xmm1, xmm2         movaps nb232_fixH2(%esp),%xmm0        movaps nb232_fiyH2(%esp),%xmm1        movaps nb232_fizH2(%esp),%xmm2        movhlps %xmm0,%xmm3        movhlps %xmm1,%xmm4        movhlps %xmm2,%xmm5        addps  %xmm3,%xmm0        addps  %xmm4,%xmm1        addps  %xmm5,%xmm2 ## sum is in 1/2 in xmm0-xmm2         movaps %xmm0,%xmm3        movaps %xmm1,%xmm4        movaps %xmm2,%xmm5        shufps $1,%xmm3,%xmm3        shufps $1,%xmm4,%xmm4        shufps $1,%xmm5,%xmm5        addss  %xmm3,%xmm0        addss  %xmm4,%xmm1        addss  %xmm5,%xmm2      ## xmm0-xmm2 has single force in pos0         ## increment i force         movss  24(%edi,%ecx,4),%xmm3        movss  28(%edi,%ecx,4),%xmm4        movss  32(%edi,%ecx,4),%xmm5        addss  %xmm0,%xmm3        addss  %xmm1,%xmm4        addss  %xmm2,%xmm5        movss  %xmm3,24(%edi,%ecx,4)        movss  %xmm4,28(%edi,%ecx,4)        movss  %xmm5,32(%edi,%ecx,4)        ## accumulate force in xmm6/xmm7 for fshift         addss %xmm2,%xmm7        movlhps %xmm1,%xmm0        shufps $8,%xmm0,%xmm0 ## constant 00001000              addps   %xmm0,%xmm6        ## increment fshift force          movlps  (%esi,%edx,4),%xmm3        movss  8(%esi,%edx,4),%xmm4        addps  %xmm6,%xmm3        addss  %xmm7,%xmm4        movlps  %xmm3,(%esi,%edx,4)        movss  %xmm4,8(%esi,%edx,4)        ## get n from stack        movl nb232_n(%esp),%esi        ## get group index for i particle         movl  nb232_gid(%ebp),%edx              ## base of gid[]        movl  (%edx,%esi,4),%edx                ## ggid=gid[n]        ## accumulate total potential energy and update it         movaps nb232_vctot(%esp),%xmm7        ## accumulate         movhlps %xmm7,%xmm6        addps  %xmm6,%xmm7      ## pos 0-1 in xmm7 have the sum now         movaps %xmm7,%xmm6        shufps $1,%xmm6,%xmm6        addss  %xmm6,%xmm7        ## add earlier value from mem         movl  nb232_Vc(%ebp),%eax        addss (%eax,%edx,4),%xmm7        ## move back to mem         movss %xmm7,(%eax,%edx,4)        ## accumulate total lj energy and update it         movaps nb232_Vvdwtot(%esp),%xmm7        ## accumulate         movhlps %xmm7,%xmm6        addps  %xmm6,%xmm7      ## pos 0-1 in xmm7 have the sum now         movaps %xmm7,%xmm6        shufps $1,%xmm6,%xmm6        addss  %xmm6,%xmm7        ## add earlier value from mem         movl  nb232_Vvdw(%ebp),%eax        addss (%eax,%edx,4),%xmm7        ## move back to mem         movss %xmm7,(%eax,%edx,4)        ## finish if last         movl nb232_nn1(%esp),%ecx        ## esi already loaded with n        incl %esi        subl %esi,%ecx        jz _nb_kernel232_ia32_sse.nb232_outerend        ## not last, iterate outer loop once more!          movl %esi,nb232_n(%esp)        jmp _nb_kernel232_ia32_sse.nb232_outer_nb_kernel232_ia32_sse.nb232_outerend:         ## check if more outer neighborlists remain        movl  nb232_nri(%esp),%ecx        ## esi already loaded with n above        subl  %esi,%ecx        jz _nb_kernel232_ia32_sse.nb232_end        ## non-zero, do one more workunit        jmp   _nb_kernel232_ia32_sse.nb232_threadloop_nb_kernel232_ia32_sse.nb232_end:         emms        movl nb232_nouter(%esp),%eax        movl nb232_ninner(%esp),%ebx        movl nb232_outeriter(%ebp),%ecx        movl nb232_inneriter(%ebp),%edx        movl %eax,(%ecx)        movl %ebx,(%edx)        movl nb232_salign(%esp),%eax        addl %eax,%esp        addl $1560,%esp        popl %edi        popl %esi        popl %edx        popl %ecx        popl %ebx        popl %eax        leave        ret.globl nb_kernel232nf_ia32_sse.globl _nb_kernel232nf_ia32_ssenb_kernel232nf_ia32_sse:        _nb_kernel232nf_ia32_sse:       .set nb232nf_p_nri, 8.set nb232nf_iinr, 12.set nb232nf_jindex, 16.set nb232nf_jjnr, 20.set nb232nf_shift, 24.set nb232nf_shiftvec, 28.set nb232nf_fshift, 32.set nb232nf_gid, 36.set nb232nf_pos, 40.set nb232nf_faction, 44.set nb232nf_charge, 48.set nb232nf_p_facel, 52.set nb232nf_argkrf, 56.set nb232nf_argcrf, 60.set nb232nf_Vc, 64.set nb232nf_type, 68.set nb232nf_p_ntype, 72.set nb232nf_vdwparam, 76.set nb232nf_Vvdw, 80.set nb232nf_p_tabscale, 84.set nb232nf_VFtab, 88.set nb232nf_invsqrta, 92.set nb232nf_dvda, 96.set nb232nf_p_gbtabscale, 100.set nb232nf_GBtab, 104.set nb232nf_p_nthreads, 108.set nb232nf_count, 112.set nb232nf_mtx, 116.set nb232nf_outeriter, 120.set nb232nf_inneriter, 124.set nb232nf_work, 128        ## stack offsets for local variables          ## bottom of stack is cache-aligned for sse use .set nb232nf_ixO, 0.set nb232nf_iyO, 16.set nb232nf_izO, 32.set nb232nf_ixH1, 48.set nb232nf_iyH1, 64.set nb232nf_izH1, 80.set nb232nf_ixH2, 96.set nb232nf_iyH2, 112.set nb232nf_izH2, 128.set nb232nf_jxO, 144.set nb232nf_jyO, 160.set nb232nf_jzO, 176.set nb232nf_jxH1, 192.set nb232nf_jyH1, 208.set nb232nf_jzH1, 224.set nb232nf_jxH2, 240.set nb232nf_jyH2, 256.set nb232nf_jzH2, 272.set nb232nf_qqOO, 288.set nb232nf_qqOH, 304.set nb232nf_qqHH, 320.set nb232nf_c6, 336.set nb232nf_c12, 352.set nb232nf_tsc, 368.set nb232nf_vctot, 384.set nb232nf_Vvdwtot, 400.set nb232nf_half, 416.set nb232nf_three, 432.set nb232nf_rsqOO, 448.set nb232nf_rsqOH1, 464.set nb232nf_rsqOH2, 480.set nb232nf_rsqH1O, 496.set nb232nf_rsqH1H1, 512.set nb232nf_rsqH1H2, 528.set nb232nf_rsqH2O, 544.set nb232nf_rsqH2H1, 560.set nb232nf_rsqH2H2, 576.set nb232nf_rinvOO, 592.set nb232nf_rinvOH1, 608.set nb232nf_rinvOH2, 624.set nb232nf_rinvH1O, 640.set nb232nf_rinvH1H1, 656.set nb232nf_rinvH1H2, 672.set nb232nf_rinvH2O, 688.set nb232nf_rinvH2H1, 704.set nb232nf_rinvH2H2, 720.set nb232nf_krf, 736.set nb232nf_crf, 752.set nb232nf_is3, 768.set nb232nf_ii3, 772.set nb232nf_innerjjnr, 776.set nb232nf_innerk, 780.set nb232nf_n, 784.set nb232nf_nn1, 788.set nb232nf_nri, 792.set nb232nf_nouter, 796.set nb232nf_ninner, 800.set nb232nf_salign, 804        pushl %ebp        movl %esp,%ebp        pushl %eax        pushl %ebx        pushl %ecx        pushl %edx        pushl %esi        pushl %edi        subl $808,%esp          ## local stack space         movl %esp,%eax        andl $0xf,%eax        subl %eax,%esp        movl %eax,nb232nf_salign(%esp)        emms        ## Move args passed by reference to stack        movl nb232nf_p_nri(%ebp),%ecx        movl (%ecx),%ecx        movl %ecx,nb232nf_nri(%esp)        ## zero iteration counters        movl $0,%eax        movl %eax,nb232nf_nouter(%esp)        movl %eax,nb232nf_ninner(%esp)        movl nb232nf_p_tabscale(%ebp),%eax        movss (%eax),%xmm3        shufps $0,%xmm3,%xmm3        movaps %xmm3,nb232nf_tsc(%esp)        movl nb232nf_argkrf(%ebp),%esi        movl nb232nf_argcrf(%ebp),%edi        movss (%esi),%xmm5        movss (%edi),%xmm6        shufps $0,%xmm5,%xmm5        shufps $0,%xmm6,%xmm6        movaps %xmm5,nb232nf_krf(%esp)        movaps %xmm6,nb232nf_crf(%esp)        ## assume we have at least one i particle - start directly         movl  nb232nf_iinr(%ebp),%ecx         ## ecx = pointer into iinr[]              movl  (%ecx),%ebx           ## ebx =ii         movl  nb232nf_charge(%ebp),%edx        movss (%edx,%ebx,4),%xmm3        movss %xmm3,%xmm4        movss 4(%edx,%ebx,4),%xmm5        movl nb232nf_p_facel(%ebp),%esi        movss (%esi),%xmm6        mulss  %xmm3,%xmm3        mulss  %xmm5,%xmm4        mulss  %xmm5,%xmm5        mulss  %xmm6,%xmm3        mulss  %xmm6,%xmm4        mulss  %xmm6,%xmm5        shufps $0,%xmm3,%xmm3        shufps $0,%xmm4,%xmm4        shufps $0,%xmm5,%xmm5        movaps %xmm3,nb232nf_qqOO(%esp)        movaps %xmm4,nb232nf_qqOH(%esp)        movaps %xmm5,nb232nf_qqHH(%esp)        xorps %xmm0,%xmm0        movl  nb232nf_type(%ebp),%edx        movl  (%edx,%ebx,4),%ecx        shll  %ecx        movl  %ecx,%edx        movl nb232nf_p_ntype(%ebp),%edi        imull (%edi),%ecx     ## ecx = ntia = 2*ntype*type[ii0]         addl  %ecx,%edx        movl  nb232nf_vdwparam(%ebp),%eax        movlps (%eax,%edx,4),%xmm0        movaps %xmm0,%xmm1        shufps $0,%xmm0,%xmm0        shufps $85,%xmm1,%xmm1 ## constant 01010101        movaps %xmm0,nb232nf_c6(%esp)        movaps %xmm1,nb232nf_c12(%esp)        ## create constant floating-point factors on stack   

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?