nb_kernel314_ia32_sse.intel_syntax.s
来自「最著名最快的分子模拟软件」· S 代码 · 共 2,300 行 · 第 1/5 页
S
2,300 行
pslld mm6, 2 pslld mm7, 2 movd eax, mm6 psrlq mm6, 32 movd ecx, mm7 psrlq mm7, 32 movd ebx, mm6 movd edx, mm7 movlps xmm5, [esi + eax*4] movlps xmm7, [esi + ecx*4] movhps xmm5, [esi + ebx*4] movhps xmm7, [esi + edx*4] ;# got half coulomb table movaps xmm4, xmm5 shufps xmm4, xmm7, 136 ;# constant 10001000 shufps xmm5, xmm7, 221 ;# constant 11011101 movlps xmm7, [esi + eax*4 + 8] movlps xmm3, [esi + ecx*4 + 8] movhps xmm7, [esi + ebx*4 + 8] movhps xmm3, [esi + edx*4 + 8] ;# other half of coulomb table movaps xmm6, xmm7 shufps xmm6, xmm3, 136 ;# constant 10001000 shufps xmm7, xmm3, 221 ;# constant 11011101 ;# coulomb table ready, in xmm4-xmm7 mulps xmm6, xmm1 ;# xmm6=Geps mulps xmm7, xmm2 ;# xmm7=Heps2 addps xmm5, xmm6 addps xmm5, xmm7 ;# xmm5=Fp mulps xmm7, [esp + nb314_two] ;# two*Heps2 movaps xmm3, [esp + nb314_qqHH] addps xmm7, xmm6 addps xmm7, xmm5 ;# xmm7=FF mulps xmm5, xmm1 ;# xmm5=eps*Fp addps xmm5, xmm4 ;# xmm5=VV mulps xmm5, xmm3 ;# vcoul=qq*VV mulps xmm3, xmm7 ;# fijC=FF*qq ;# at this point mm5 contains vcoul and mm3 fijC addps xmm5, [esp + nb314_vctot] movaps [esp + nb314_vctot], xmm5 xorps xmm1, xmm1 mulps xmm3, [esp + nb314_tsc] mulps xmm3, xmm0 subps xmm1, xmm3 movaps xmm0, xmm1 movaps xmm2, xmm1 xorps xmm3, xmm3 movaps xmm4, xmm3 movaps xmm5, xmm3 mulps xmm0, [esp + nb314_dxH1H2] mulps xmm1, [esp + nb314_dyH1H2] mulps xmm2, [esp + nb314_dzH1H2] subps xmm3, xmm0 subps xmm4, xmm1 subps xmm5, xmm2 addps xmm0, [esp + nb314_fixH1] addps xmm1, [esp + nb314_fiyH1] addps xmm2, [esp + nb314_fizH1] movaps [esp + nb314_fjxH2], xmm3 movaps [esp + nb314_fjyH2], xmm4 movaps [esp + nb314_fjzH2], xmm5 movaps [esp + nb314_fixH1], xmm0 movaps [esp + nb314_fiyH1], xmm1 movaps [esp + nb314_fizH1], xmm2 ;# H1-M interaction movaps xmm0, [esp + nb314_rinvH1M] movaps xmm1, xmm0 mulps xmm1, [esp + nb314_rsqH1M] ;# xmm1=r mulps xmm1, [esp + nb314_tsc] movhlps xmm2, xmm1 cvttps2pi mm6, xmm1 cvttps2pi mm7, xmm2 ;# mm6/mm7 contain lu indices cvtpi2ps xmm3, mm6 cvtpi2ps xmm2, mm7 movlhps xmm3, xmm2 subps xmm1, xmm3 ;# xmm1=eps movaps xmm2, xmm1 mulps xmm2, xmm2 ;# xmm2=eps2 pslld mm6, 2 pslld mm7, 2 movd eax, mm6 psrlq mm6, 32 movd ecx, mm7 psrlq mm7, 32 movd ebx, mm6 movd edx, mm7 movlps xmm5, [esi + eax*4] movlps xmm7, [esi + ecx*4] movhps xmm5, [esi + ebx*4] movhps xmm7, [esi + edx*4] ;# got half coulomb table movaps xmm4, xmm5 shufps xmm4, xmm7, 136 ;# constant 10001000 shufps xmm5, xmm7, 221 ;# constant 11011101 movlps xmm7, [esi + eax*4 + 8] movlps xmm3, [esi + ecx*4 + 8] movhps xmm7, [esi + ebx*4 + 8] movhps xmm3, [esi + edx*4 + 8] ;# other half of coulomb table movaps xmm6, xmm7 shufps xmm6, xmm3, 136 ;# constant 10001000 shufps xmm7, xmm3, 221 ;# constant 11011101 ;# coulomb table ready, in xmm4-xmm7 mulps xmm6, xmm1 ;# xmm6=Geps mulps xmm7, xmm2 ;# xmm7=Heps2 addps xmm5, xmm6 addps xmm5, xmm7 ;# xmm5=Fp mulps xmm7, [esp + nb314_two] ;# two*Heps2 movaps xmm3, [esp + nb314_qqMH] addps xmm7, xmm6 addps xmm7, xmm5 ;# xmm7=FF mulps xmm5, xmm1 ;# xmm5=eps*Fp addps xmm5, xmm4 ;# xmm5=VV mulps xmm5, xmm3 ;# vcoul=qq*VV mulps xmm3, xmm7 ;# fijC=FF*qq ;# at this point mm5 contains vcoul and mm3 fijC addps xmm5, [esp + nb314_vctot] movaps [esp + nb314_vctot], xmm5 xorps xmm1, xmm1 mulps xmm3, [esp + nb314_tsc] mulps xmm3, xmm0 subps xmm1, xmm3 movaps xmm0, xmm1 movaps xmm2, xmm1 xorps xmm3, xmm3 movaps xmm4, xmm3 movaps xmm5, xmm3 mulps xmm0, [esp + nb314_dxH1M] mulps xmm1, [esp + nb314_dyH1M] mulps xmm2, [esp + nb314_dzH1M] subps xmm3, xmm0 subps xmm4, xmm1 subps xmm5, xmm2 addps xmm0, [esp + nb314_fixH1] addps xmm1, [esp + nb314_fiyH1] addps xmm2, [esp + nb314_fizH1] movaps [esp + nb314_fjxM], xmm3 movaps [esp + nb314_fjyM], xmm4 movaps [esp + nb314_fjzM], xmm5 movaps [esp + nb314_fixH1], xmm0 movaps [esp + nb314_fiyH1], xmm1 movaps [esp + nb314_fizH1], xmm2 ;# H2-H1 interaction movaps xmm0, [esp + nb314_rinvH2H1] movaps xmm1, xmm0 mulps xmm1, [esp + nb314_rsqH2H1] ;# xmm1=r mulps xmm1, [esp + nb314_tsc] movhlps xmm2, xmm1 cvttps2pi mm6, xmm1 cvttps2pi mm7, xmm2 ;# mm6/mm7 contain lu indices cvtpi2ps xmm3, mm6 cvtpi2ps xmm2, mm7 movlhps xmm3, xmm2 subps xmm1, xmm3 ;# xmm1=eps movaps xmm2, xmm1 mulps xmm2, xmm2 ;# xmm2=eps2 pslld mm6, 2 pslld mm7, 2 movd eax, mm6 psrlq mm6, 32 movd ecx, mm7 psrlq mm7, 32 movd ebx, mm6 movd edx, mm7 movlps xmm5, [esi + eax*4] movlps xmm7, [esi + ecx*4] movhps xmm5, [esi + ebx*4] movhps xmm7, [esi + edx*4] ;# got half coulomb table movaps xmm4, xmm5 shufps xmm4, xmm7, 136 ;# constant 10001000 shufps xmm5, xmm7, 221 ;# constant 11011101 movlps xmm7, [esi + eax*4 + 8] movlps xmm3, [esi + ecx*4 + 8] movhps xmm7, [esi + ebx*4 + 8] movhps xmm3, [esi + edx*4 + 8] ;# other half of coulomb table movaps xmm6, xmm7 shufps xmm6, xmm3, 136 ;# constant 10001000 shufps xmm7, xmm3, 221 ;# constant 11011101 ;# coulomb table ready, in xmm4-xmm7 mulps xmm6, xmm1 ;# xmm6=Geps mulps xmm7, xmm2 ;# xmm7=Heps2 addps xmm5, xmm6 addps xmm5, xmm7 ;# xmm5=Fp mulps xmm7, [esp + nb314_two] ;# two*Heps2 movaps xmm3, [esp + nb314_qqHH] addps xmm7, xmm6 addps xmm7, xmm5 ;# xmm7=FF mulps xmm5, xmm1 ;# xmm5=eps*Fp addps xmm5, xmm4 ;# xmm5=VV mulps xmm5, xmm3 ;# vcoul=qq*VV mulps xmm3, xmm7 ;# fijC=FF*qq ;# at this point mm5 contains vcoul and mm3 fijC addps xmm5, [esp + nb314_vctot] movaps [esp + nb314_vctot], xmm5 xorps xmm1, xmm1 mulps xmm3, [esp + nb314_tsc] mulps xmm3, xmm0 subps xmm1, xmm3 movaps xmm0, xmm1 movaps xmm2, xmm1 movaps xmm3, [esp + nb314_fjxH1] movaps xmm4, [esp + nb314_fjyH1] movaps xmm5, [esp + nb314_fjzH1] mulps xmm0, [esp + nb314_dxH2H1] mulps xmm1, [esp + nb314_dyH2H1] mulps xmm2, [esp + nb314_dzH2H1] subps xmm3, xmm0 subps xmm4, xmm1 subps xmm5, xmm2 addps xmm0, [esp + nb314_fixH2] addps xmm1, [esp + nb314_fiyH2] addps xmm2, [esp + nb314_fizH2] movaps [esp + nb314_fjxH1], xmm3 movaps [esp + nb314_fjyH1], xmm4 movaps [esp + nb314_fjzH1], xmm5 movaps [esp + nb314_fixH2], xmm0 movaps [esp + nb314_fiyH2], xmm1 movaps [esp + nb314_fizH2], xmm2 ;# H2-H2 interaction movaps xmm0, [esp + nb314_rinvH2H2] movaps xmm1, xmm0 mulps xmm1, [esp + nb314_rsqH2H2] ;# xmm1=r mulps xmm1, [esp + nb314_tsc] movhlps xmm2, xmm1 cvttps2pi mm6, xmm1 cvttps2pi mm7, xmm2 ;# mm6/mm7 contain lu indices cvtpi2ps xmm3, mm6 cvtpi2ps xmm2, mm7 movlhps xmm3, xmm2 subps xmm1, xmm3 ;# xmm1=eps movaps xmm2, xmm1 mulps xmm2, xmm2 ;# xmm2=eps2 pslld mm6, 2 pslld mm7, 2 movd eax, mm6 psrlq mm6, 32 movd ecx, mm7 psrlq mm7, 32 movd ebx, mm6 movd edx, mm7 movlps xmm5, [esi + eax*4] movlps xmm7, [esi + ecx*4] movhps xmm5, [esi + ebx*4] movhps xmm7, [esi + edx*4] ;# got half coulomb table movaps xmm4, xmm5 shufps xmm4, xmm7, 136 ;# constant 10001000 shufps xmm5, xmm7, 221 ;# constant 11011101 movlps xmm7, [esi + eax*4 + 8] movlps xmm3, [esi + ecx*4 + 8] movhps xmm7, [esi + ebx*4 + 8] movhps xmm3, [esi + edx*4 + 8] ;# other half of coulomb table movaps xmm6, xmm7 shufps xmm6, xmm3, 136 ;# constant 10001000 shufps xmm7, xmm3, 221 ;# constant 11011101 ;# coulomb table ready, in xmm4-xmm7 mulps xmm6, xmm1 ;# xmm6=Geps mulps xmm7, xmm2 ;# xmm7=Heps2 addps xmm5, xmm6 addps xmm5, xmm7 ;# xmm5=Fp mulps xmm7, [esp + nb314_two] ;# two*Heps2 movaps xmm3, [esp + nb314_qqHH] addps xmm7, xmm6 addps xmm7, xmm5 ;# xmm7=FF mulps xmm5, xmm1 ;# xmm5=eps*Fp addps xmm5, xmm4 ;# xmm5=VV mulps xmm5, xmm3 ;# vcoul=qq*VV mulps xmm3, xmm7 ;# fijC=FF*qq ;# at this point mm5 contains vcoul and mm3 fijC addps xmm5, [esp + nb314_vctot] movaps [esp + nb314_vctot], xmm5 xorps xmm1, xmm1 mulps xmm3, [esp + nb314_tsc] mulps xmm3, xmm0 subps xmm1, xmm3 movaps xmm0, xmm1 movaps xmm2, xmm1 movaps xmm3, [esp + nb314_fjxH2] movaps xmm4, [esp + nb314_fjyH2] movaps xmm5, [esp + nb314_fjzH2] mulps xmm0, [esp + nb314_dxH2H2] mulps xmm1, [esp + nb314_dyH2H2] mulps xmm2, [esp + nb314_dzH2H2] subps xmm3, xmm0 subps xmm4, xmm1 subps xmm5, xmm2 addps xmm0, [esp + nb314_fixH2] addps xmm1, [esp + nb314_fiyH2] addps xmm2, [esp + nb314_fizH2] movaps [esp + nb314_fjxH2], xmm3 movaps [esp + nb314_fjyH2], xmm4 movaps [esp + nb314_fjzH2], xmm5 movaps [esp + nb314_fixH2], xmm0 movaps [esp + nb314_fiyH2], xmm1 movaps [esp + nb314_fizH2], xmm2 ;# H2-M interaction movaps xmm0, [esp + nb314_rinvH2M] movaps xmm1, xmm0 mulps xmm1, [esp + nb314_rsqH2M] ;# xmm1=r mulps xmm1, [esp + nb314_tsc] movhlps xmm2, xmm1 cvttps2pi mm6, xmm1 cvttps2pi mm7, xmm2 ;# mm6/mm7 contain lu indices cvtpi2ps xmm3, mm6 cvtpi2ps xmm2, mm7 movlhps xmm3, xmm2 subps xmm1, xmm3 ;# xmm1=eps movaps xmm2, xmm1 mulps xmm2, xmm2 ;# xmm2=eps2 pslld mm6, 2 pslld mm7, 2 movd eax, mm6 psrlq mm6, 32 movd ecx, mm7 psrlq mm7, 32 movd ebx, mm6 movd edx, mm7 movlps xmm5, [esi + eax*4] movlps xmm7, [esi + ecx*4] movhps xmm5, [esi + ebx*4] movhps xmm7, [esi + edx*4] ;# got half coulomb table movaps xmm4, xmm5 shufps xmm4, xmm7, 136 ;# constant 10001000 shufps xmm5, xmm7, 221 ;# constant 11011101 movlps xmm7, [esi + eax*4 + 8] movlps xmm3, [esi + ecx*4 + 8] movhps xmm7, [esi + ebx*4 + 8] movhps xmm3, [esi + edx*4 + 8] ;# other half of coulomb table movaps xmm6, xmm7 shufps xmm6, xmm3, 136 ;# constant 10001000 shufps xmm7, xmm3, 221 ;# constant 11011101 ;# coulomb table ready, in xmm4-xmm7 mulps xmm6, xmm1 ;# xmm6=Geps mulps xmm7, xmm2 ;# xmm7=Heps2 addps xmm5, xmm6 addps xmm5, xmm7 ;# xmm5=Fp mulps xmm7, [esp + nb314_two] ;# two*Heps2 movaps xmm3, [esp + nb314_qqMH] addps xmm7, xmm6 addps xmm7, xmm5 ;# xmm7=FF mulps xmm5, xmm1 ;# xmm5=eps*Fp addps xmm5, xmm4 ;# xmm5=VV mulps xmm5, xmm3 ;# vcoul=qq*VV mulps xmm3, xmm7 ;# fijC=FF*qq ;# at this point mm5 contains vcoul and mm3 fijC addps xmm5, [esp + nb314_vctot] movaps [esp + nb314_vctot], xmm5 xorps xmm1, xmm1 mulps xmm3, [esp + nb314_tsc] mulps xmm3, xmm0 subps xmm1, xmm3 movaps xmm0, xmm1 movaps xmm2, xmm1 movaps xmm3, [esp + nb314_fjxM] movaps xmm4, [esp + nb314_fjyM] movaps xmm5, [esp + nb314_fjzM] mulps xmm0, [esp + nb314_dxH2M] mulps xmm1, [esp + nb314_dyH2M] mulps xmm2, [esp + nb314_dzH2M] subps xmm3, xmm0 subps xmm4, xmm1 subps xmm5, xmm2 addps xmm0, [esp + nb314_fixH2] addps xmm1, [esp + nb314_fiyH2] addps xmm2, [esp + nb314_fizH2] movaps [esp + nb314_fjxM], xmm3 movaps [esp + nb314_fjyM], xmm4 movaps [esp + nb314_fjzM], xmm5 movaps [esp + nb314_fixH2], xmm0 movaps [esp + nb314_fiyH2], xmm1 movaps [esp + nb314_fizH2], xmm2 ;# M-H1 interaction movaps xmm0, [esp + nb314_rinvMH1] movaps xmm1, xmm0 mulps xmm1, [esp + nb314_rsqMH1] ;# xmm1=r mulps xmm1, [esp + nb314_tsc] movhlps xmm2, xmm1 cvttps2pi mm6, xmm1 cvttps2pi mm7, xmm2 ;# mm6/mm7 contain lu indices cvtpi2ps xmm3, mm6 cvtpi2ps xmm2, mm7 movlhps xmm3, xmm2 subps xmm1, xmm3 ;# xmm1=eps movaps xmm2, xmm1 mulps xmm2, xmm2 ;# xmm2=eps2 pslld mm6, 2 pslld mm7, 2 movd eax, mm6 psrlq mm6, 32 movd ecx, mm7 psrlq mm7, 32 movd ebx, mm6 movd edx, mm7 movlps xmm5, [esi + eax*4] movlps xmm7, [esi + ecx*4] movhps xmm5, [esi + ebx*4] movhps xmm7, [esi + edx*4] ;# got half coulomb table movaps xmm4, xmm5 shufps xmm4, xmm7, 136 ;# constant 10001000 shufps xmm5, xmm7, 221 ;# constant 11011101 movlps xmm7, [esi + eax*4 + 8] movlps xmm3, [esi + ecx*4 + 8] movhps xmm7, [esi + ebx*4 + 8] movhps xmm3, [esi + edx*4 + 8] ;# other half of coulomb table movaps xmm6, xmm7 shufps xmm6, xmm3, 136 ;# constant 10001000 shufps xmm7, xmm3, 221 ;# constant 11011101 ;# coulomb table ready, in xmm4-xmm7 mulps xmm6, xmm1 ;# xmm6=Geps mulps xmm7, xmm2 ;# xmm7=Heps2
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?