nb_kernel331_ia32_sse2.intel_syntax.s

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

S
2,337
字号
	movapd xmm6, [esp + nb331_izO]	;# calc dr 	subsd xmm4, xmm0	subsd xmm5, xmm1	subsd xmm6, xmm2	;# store dr 	movapd [esp + nb331_dxO], xmm4	movapd [esp + nb331_dyO], xmm5	movapd [esp + nb331_dzO], xmm6	;# square it 	mulsd xmm4,xmm4	mulsd xmm5,xmm5	mulsd xmm6,xmm6	addsd xmm4, xmm5	addsd xmm4, xmm6	movapd xmm7, xmm4	;# rsqO in xmm7 	;# move ixH1-izH1 to xmm4-xmm6 	movapd xmm4, [esp + nb331_ixH1]	movapd xmm5, [esp + nb331_iyH1]	movapd xmm6, [esp + nb331_izH1]	;# calc dr 	subsd xmm4, xmm0	subsd xmm5, xmm1	subsd xmm6, xmm2	;# store dr 	movapd [esp + nb331_dxH1], xmm4	movapd [esp + nb331_dyH1], xmm5	movapd [esp + nb331_dzH1], xmm6	;# square it 	mulsd xmm4,xmm4	mulsd xmm5,xmm5	mulsd xmm6,xmm6	addsd xmm6, xmm5	addsd xmm6, xmm4	;# rsqH1 in xmm6 	;# move ixH2-izH2 to xmm3-xmm5  	movapd xmm3, [esp + nb331_ixH2]	movapd xmm4, [esp + nb331_iyH2]	movapd xmm5, [esp + nb331_izH2]	;# calc dr 	subsd xmm3, xmm0	subsd xmm4, xmm1	subsd xmm5, xmm2	;# store dr 	movapd [esp + nb331_dxH2], xmm3	movapd [esp + nb331_dyH2], xmm4	movapd [esp + nb331_dzH2], xmm5	;# square it 	mulsd xmm3,xmm3	mulsd xmm4,xmm4	mulsd xmm5,xmm5	addsd xmm5, xmm4	addsd xmm5, xmm3	;# rsqH2 in xmm5, rsqH1 in xmm6, rsqO in xmm7 	;# start with rsqO - put seed in xmm2 	cvtsd2ss xmm2, xmm7		rsqrtss xmm2, xmm2	cvtss2sd xmm2, xmm2	movapd  xmm3, xmm2	mulsd   xmm2, xmm2	movapd  xmm4, [esp + nb331_three]	mulsd   xmm2, xmm7	;# rsq*lu*lu 	subsd   xmm4, xmm2	;# 30-rsq*lu*lu 	mulsd   xmm4, xmm3	;# lu*(3-rsq*lu*lu) 	mulsd   xmm4, [esp + nb331_half] ;# iter1 ( new lu) 	movapd xmm2, xmm7	movapd xmm3, xmm4	mulsd xmm4, xmm4	;# lu*lu 	mulsd xmm2, xmm4	;# rsq*lu*lu 	movapd xmm4, [esp + nb331_three]	subsd xmm4, xmm2	;# 3-rsq*lu*lu 	mulsd xmm4, xmm3	;# lu*(	3-rsq*lu*lu) 	mulsd xmm4, [esp + nb331_half] ;# rinv 	movapd  [esp + nb331_rinvO], xmm4	;# rinvO in xmm4 	mulsd   xmm7, xmm4	movapd  [esp + nb331_rO], xmm7	;# r in xmm7 	;# rsqH1 - seed in xmm2 	cvtsd2ss xmm2, xmm6		rsqrtss xmm2, xmm2	cvtss2sd xmm2, xmm2	movapd  xmm3, xmm2	mulsd   xmm2, xmm2	movapd  xmm4, [esp + nb331_three]	mulsd   xmm2, xmm6	;# rsq*lu*lu 	subsd   xmm4, xmm2	;# 30-rsq*lu*lu 	mulsd   xmm4, xmm3	;# lu*(3-rsq*lu*lu) 	mulsd   xmm4, [esp + nb331_half] ;# iter1 ( new lu) 	movapd xmm2, xmm6	movapd xmm3, xmm4	mulsd xmm4, xmm4	;# lu*lu 	mulsd xmm2, xmm4	;# rsq*lu*lu 	movapd xmm4, [esp + nb331_three]	subsd xmm4, xmm2	;# 3-rsq*lu*lu 	mulsd xmm4, xmm3	;# lu*(	3-rsq*lu*lu) 	mulsd xmm4, [esp + nb331_half] ;# rinv 	movapd [esp + nb331_rinvH1], xmm4	;# rinvH1 	mulsd  xmm6, xmm4	movapd [esp + nb331_rH1], xmm6	;# rH1 		;# rsqH2 - seed in xmm2 	cvtsd2ss xmm2, xmm5		rsqrtss xmm2, xmm2	cvtss2sd xmm2, xmm2	movapd  xmm3, xmm2	mulsd   xmm2, xmm2	movapd  xmm4, [esp + nb331_three]	mulsd   xmm2, xmm5	;# rsq*lu*lu 	subsd   xmm4, xmm2	;# 30-rsq*lu*lu 	mulsd   xmm4, xmm3	;# lu*(3-rsq*lu*lu) 	mulsd   xmm4, [esp + nb331_half] ;# iter1 ( new lu) 	movapd xmm2, xmm5	movapd xmm3, xmm4	mulsd xmm4, xmm4	;# lu*lu 	mulsd xmm2, xmm4	;# rsq*lu*lu 	movapd xmm4, [esp + nb331_three]	subsd xmm4, xmm2	;# 3-rsq*lu*lu 	mulsd xmm4, xmm3	;# lu*(	3-rsq*lu*lu) 	mulsd xmm4, [esp + nb331_half] ;# rinv 	movapd [esp + nb331_rinvH2], xmm4 ;# rinv 	mulsd xmm5, xmm4	movapd [esp + nb331_rH2], xmm5 ;# r 	;# do O interactions 	movd mm0, eax		;# rO is still in xmm7 	mulsd   xmm7, [esp + nb331_tsc]	cvttsd2si eax, xmm7	;# lu idx 	cvtsi2sd xmm6, eax	subsd xmm7, xmm6	movapd xmm1, xmm7	;# xmm1=eps 	movapd xmm2, xmm7	mulsd  xmm2, xmm2	;# xmm2=eps2 	 		shl eax, 2			mov  esi, [ebp + nb331_VFtab]	lea   eax, [eax + eax*2] ;# idx *= 3 (total *=12 now) 			movsd xmm4, [esi + eax*8 + 0]	;# Y1 		movsd xmm5, [esi + eax*8 + 8]	;# F1 		movsd xmm6, [esi + eax*8 + 16]	;# G1		movsd xmm7, [esi + eax*8 + 24]	;# H1 		;# coulomb table ready, in xmm4-xmm7      mulsd  xmm6, xmm1       ;# xmm6=Geps     mulsd  xmm7, xmm2       ;# xmm7=Heps2     addsd  xmm5, xmm6	;# F+Geps     addsd  xmm5, xmm7       ;# xmm5=Fp=F+Geps+Heps2            mulsd  xmm7, [esp + nb331_two]       ;# two*Heps2     addsd  xmm7, xmm6	;# Geps + 2*Heps2     addsd  xmm7, xmm5 ;# xmm7=FF     mulsd  xmm5, xmm1 ;# xmm5=eps*Fp     addsd  xmm5, xmm4 ;# xmm5=VV 	    movapd  xmm0, [esp + nb331_qqO]    mulsd  xmm5, xmm0 ;# vcoul=qq*VV      mulsd  xmm0, xmm7 ;# fijC=FF*qq 	;# at this point xmm5 contains vcoul and xmm0 fijC 	;# increment vcoul - then we can get rid of mm5 	;# update vctot 	addsd  xmm5, [esp + nb331_vctot]	movlpd [esp + nb331_vctot], xmm5 		;# Dispersion 	movsd xmm4, [esi + eax*8 + 32]	;# Y1 		movsd xmm5, [esi + eax*8 + 40]	;# F1 		movsd xmm6, [esi + eax*8 + 48]	;# G1		movsd xmm7, [esi + eax*8 + 56]	;# H1 		;# Dispersion table ready, in xmm4-xmm7  			mulsd  xmm6, xmm1	;# xmm6=Geps 	mulsd  xmm7, xmm2	;# xmm7=Heps2 	addsd  xmm5, xmm6	addsd  xmm5, xmm7	;# xmm5=Fp 		mulsd  xmm7, [esp + nb331_two]	;# two*Heps2 	addsd  xmm7, xmm6	addsd  xmm7, xmm5 ;# xmm7=FF 	mulsd  xmm5, xmm1 ;# xmm5=eps*Fp 	addsd  xmm5, xmm4 ;# xmm5=VV 	movapd xmm4, [esp + nb331_c6]	mulsd  xmm7, xmm4	 ;# fijD 	mulsd  xmm5, xmm4	 ;# Vvdw6 	addsd  xmm0, xmm7	;# fscal summation 			addsd  xmm5, [esp + nb331_Vvdwtot]	movsd [esp + nb331_Vvdwtot], xmm5		;# Repulsion 	movsd xmm4, [esi + eax*8 + 64]	;# Y1 		movsd xmm5, [esi + eax*8 + 72]	;# F1 		movsd xmm6, [esi + eax*8 + 80]	;# G1		movsd xmm7, [esi + eax*8 + 88]	;# H1 		;# Repulsion table ready, in xmm4-xmm7  			mulsd  xmm6, xmm1	;# xmm6=Geps 	mulsd  xmm7, xmm2	;# xmm7=Heps2 	addsd  xmm5, xmm6	addsd  xmm5, xmm7	;# xmm5=Fp 		mulsd  xmm7, [esp + nb331_two]	;# two*Heps2 	addsd  xmm7, xmm6	addsd  xmm7, xmm5 ;# xmm7=FF 	mulsd  xmm5, xmm1 ;# xmm5=eps*Fp 	addsd  xmm5, xmm4 ;# xmm5=VV 	movapd xmm4, [esp + nb331_c12]	mulsd  xmm7, xmm4 ;# fijR 	mulsd  xmm5, xmm4 ;# Vvdw12 	addsd  xmm7, xmm0	;# fscal summation 	mulsd xmm7, [esp + nb331_tsc]	mulsd xmm7, [esp + nb331_rinvO]	addsd  xmm5, [esp + nb331_Vvdwtot]	movsd [esp + nb331_Vvdwtot], xmm5	xorpd xmm4, xmm4	subsd xmm4, xmm7			movapd xmm0, [esp + nb331_dxO]	movapd xmm1, [esp + nb331_dyO]	movapd xmm2, [esp + nb331_dzO]	mulsd  xmm0, xmm4	mulsd  xmm1, xmm4	mulsd  xmm2, xmm4	;# tx in xmm0-xmm2 	;# update O forces 	movapd xmm3, [esp + nb331_fixO]	movapd xmm4, [esp + nb331_fiyO]	movapd xmm7, [esp + nb331_fizO]	addsd  xmm3, xmm0	addsd  xmm4, xmm1	addsd  xmm7, xmm2	movlpd [esp + nb331_fixO], xmm3	movlpd [esp + nb331_fiyO], xmm4	movlpd [esp + nb331_fizO], xmm7	;# update j forces with water O 	movlpd [esp + nb331_fjx], xmm0	movlpd [esp + nb331_fjy], xmm1	movlpd [esp + nb331_fjz], xmm2	;# Done with O interactions - now H1! 	movapd xmm7, [esp + nb331_rH1]	mulpd xmm7, [esp + nb331_tsc]	cvttsd2si eax, xmm7	;# mm6 = lu idx 	cvtsi2sd xmm6, eax	subpd xmm7, xmm6	movapd xmm1, xmm7	;# xmm1=eps 	movapd xmm2, xmm1		mulpd  xmm2, xmm2	;# xmm2=eps2 		shl eax, 2		;# idx *= 4 	mov  esi, [ebp + nb331_VFtab]	lea   eax, [eax + eax*2] ;# idx *= 3 (total *=12 now)		movsd xmm4, [esi + eax*8]	;# Y1 		movsd xmm5, [esi + eax*8 + 8]	;# F1 		movsd xmm6, [esi + eax*8 + 16]	;# G1		movsd xmm7, [esi + eax*8 + 24]	;# H1 		;# coulomb table ready, in xmm4-xmm7  			mulsd  xmm6, xmm1	;# xmm6=Geps 	mulsd  xmm7, xmm2	;# xmm7=Heps2 	addsd  xmm5, xmm6	addsd  xmm5, xmm7	;# xmm5=Fp 		mulsd  xmm7, [esp + nb331_two]	;# two*Heps2 	movapd xmm3, [esp + nb331_qqH]	addsd  xmm7, xmm6	addsd  xmm7, xmm5 ;# xmm7=FF 	mulsd  xmm5, xmm1 ;# xmm5=eps*Fp 	addsd  xmm5, xmm4 ;# xmm5=VV 	mulsd  xmm5, xmm3 ;# vcoul=qq*VV  	mulsd  xmm3, xmm7 ;# fijC=FF*qq     ;# at this point mm5 contains vcoul and xmm3 fijC     ;# increment vcoul 	xorpd  xmm4, xmm4    addsd  xmm5, [esp + nb331_vctot]	mulsd  xmm3, [esp + nb331_rinvH1]    movlpd [esp + nb331_vctot], xmm5 	mulsd  xmm3, [esp + nb331_tsc]	subsd xmm4, xmm3	movapd xmm0, [esp + nb331_dxH1]	movapd xmm1, [esp + nb331_dyH1]	movapd xmm2, [esp + nb331_dzH1]	mulsd  xmm0, xmm4	mulsd  xmm1, xmm4	mulsd  xmm2, xmm4	;# update H1 forces 	movapd xmm3, [esp + nb331_fixH1]	movapd xmm4, [esp + nb331_fiyH1]	movapd xmm7, [esp + nb331_fizH1]	addsd  xmm3, xmm0	addsd  xmm4, xmm1	addsd  xmm7, xmm2	movlpd [esp + nb331_fixH1], xmm3	movlpd [esp + nb331_fiyH1], xmm4	movlpd [esp + nb331_fizH1], xmm7	;# update j forces with water H1 	addsd  xmm0, [esp + nb331_fjx]	addsd  xmm1, [esp + nb331_fjy]	addsd  xmm2, [esp + nb331_fjz]	movlpd [esp + nb331_fjx], xmm0	movlpd [esp + nb331_fjy], xmm1	movlpd [esp + nb331_fjz], xmm2	;# Done with H1, finally we do H2 interactions 	movapd xmm7, [esp + nb331_rH2]	mulsd   xmm7, [esp + nb331_tsc]	cvttsd2si eax, xmm7	;# mm6 = lu idx 	cvtsi2sd xmm6, eax	subsd xmm7, xmm6	movapd xmm1, xmm7	;# xmm1=eps 	movapd xmm2, xmm1		mulsd  xmm2, xmm2	;# xmm2=eps2 		shl eax, 2		;# idx *= 4 	mov  esi, [ebp + nb331_VFtab]	lea   eax, [eax + eax*2] ;# idx *= 3 (total *=12 now)		movsd xmm4, [esi + eax*8]	;# Y1 		movsd xmm5, [esi + eax*8 + 8]	;# F1 		movsd xmm6, [esi + eax*8 + 16]	;# G1 		movsd xmm7, [esi + eax*8 + 24]	;# H1 		;# coulomb table ready, in xmm4-xmm7  			mulsd  xmm6, xmm1	;# xmm6=Geps 	mulsd  xmm7, xmm2	;# xmm7=Heps2 	addsd  xmm5, xmm6	addsd  xmm5, xmm7	;# xmm5=Fp 		mulsd  xmm7, [esp + nb331_two]	;# two*Heps2 	movapd xmm3, [esp + nb331_qqH]	addsd  xmm7, xmm6	addsd  xmm7, xmm5 ;# xmm7=FF 	mulsd  xmm5, xmm1 ;# xmm5=eps*Fp 	addsd  xmm5, xmm4 ;# xmm5=VV 	mulsd  xmm5, xmm3 ;# vcoul=qq*VV  	mulsd  xmm3, xmm7 ;# fijC=FF*qq     ;# at this point mm5 contains vcoul and xmm3 fijC     ;# increment vcoul 	xorpd  xmm4, xmm4    addsd  xmm5, [esp + nb331_vctot]	mulsd  xmm3, [esp + nb331_rinvH2]    movlpd [esp + nb331_vctot], xmm5 	mulsd  xmm3, [esp + nb331_tsc]	subsd  xmm4, xmm3	movapd xmm0, [esp + nb331_dxH2]	movapd xmm1, [esp + nb331_dyH2]	movapd xmm2, [esp + nb331_dzH2]	mulsd  xmm0, xmm4	mulsd  xmm1, xmm4	mulsd  xmm2, xmm4    movd eax, mm0   		;# update H2 forces 	movapd xmm3, [esp + nb331_fixH2]	movapd xmm4, [esp + nb331_fiyH2]	movapd xmm7, [esp + nb331_fizH2]	addsd  xmm3, xmm0	addsd  xmm4, xmm1	addsd  xmm7, xmm2	movlpd [esp + nb331_fixH2], xmm3	movlpd [esp + nb331_fiyH2], xmm4	movlpd [esp + nb331_fizH2], xmm7	mov edi, [ebp + nb331_faction]	;# update j forces 	addsd  xmm0, [esp + nb331_fjx]	addsd  xmm1, [esp + nb331_fjy]	addsd  xmm2, [esp + nb331_fjz]	;# the fj's - start by accumulating forces from memory 	movlpd xmm3, [edi + eax*8]	movlpd xmm4, [edi + eax*8 + 8]	movlpd xmm5, [edi + eax*8 + 16]	subsd xmm3, xmm0	subsd xmm4, xmm1	subsd xmm5, xmm2	movlpd [edi + eax*8], xmm3	movlpd [edi + eax*8 + 8], xmm4	movlpd [edi + eax*8 + 16], xmm5.nb331_updateouterdata:	mov   ecx, [esp + nb331_ii3]	mov   edi, [ebp + nb331_faction]	mov   esi, [ebp + nb331_fshift]	mov   edx, [esp + nb331_is3]	;# accumulate  Oi forces in xmm0, xmm1, xmm2 	movapd xmm0, [esp + nb331_fixO]	movapd xmm1, [esp + nb331_fiyO]	movapd xmm2, [esp + nb331_fizO]	movhlps xmm3, xmm0	movhlps xmm4, xmm1	movhlps xmm5, xmm2	addsd  xmm0, xmm3	addsd  xmm1, xmm4	addsd  xmm2, xmm5 ;# sum is in low xmm0-xmm2 	movapd xmm3, xmm0		movapd xmm4, xmm1		movapd xmm5, xmm2		;# increment i force 	movsd  xmm3, [edi + ecx*8]	movsd  xmm4, [edi + ecx*8 + 8]	movsd  xmm5, [edi + ecx*8 + 16]	addsd  xmm3, xmm0	addsd  xmm4, xmm1	addsd  xmm5, xmm2	movsd  [edi + ecx*8],     xmm3	movsd  [edi + ecx*8 + 8], xmm4	movsd  [edi + ecx*8 + 16], xmm5	;# accumulate force in xmm6/xmm7 for fshift 	movapd xmm6, xmm0	movsd xmm7, xmm2	unpcklpd xmm6, xmm1	;# accumulate H1i forces in xmm0, xmm1, xmm2 	movapd xmm0, [esp + nb331_fixH1]	movapd xmm1, [esp + nb331_fiyH1]	movapd xmm2, [esp + nb331_fizH1]	movhlps xmm3, xmm0	movhlps xmm4, xmm1	movhlps xmm5, xmm2	addsd  xmm0, xmm3	addsd  xmm1, xmm4	addsd  xmm2, xmm5 ;# sum is in low xmm0-xmm2 	;# increment i force 	movsd  xmm3, [edi + ecx*8 + 24]	movsd  xmm4, [edi + ecx*8 + 32]	movsd  xmm5, [edi + ecx*8 + 40]	addsd  xmm3, xmm0	addsd  xmm4, xmm1	addsd  xmm5, xmm2	movsd  [edi + ecx*8 + 24], xmm3	movsd  [edi + ecx*8 + 32], xmm4	movsd  [edi + ecx*8 + 40], xmm5	;# accumulate force in xmm6/xmm7 for fshift 	addsd xmm7, xmm2	unpcklpd xmm0, xmm1	addpd xmm6, xmm0	;# accumulate H2i forces in xmm0, xmm1, xmm2 	movapd xmm0, [esp + nb331_fixH2]	movapd xmm1, [esp + nb331_fiyH2]	movapd xmm2, [esp + nb331_fizH2]	movhlps xmm3, xmm0

⌨️ 快捷键说明

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