⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 nb_kernel101_ia32_3dnow.intel_syntax.s

📁 最著名最快的分子模拟软件
💻 S
📖 第 1 页 / 共 2 页
字号:
	;# mm1 is fzH1 	;# mm3 is fzH2 		movq  mm6, [edi + ecx*4 + 12]       ;# increment iH1 force  	movd  mm7, [edi + ecx*4 + 20] 		pfadd mm6, mm0	pfadd mm7, mm1	movq  [edi + ecx*4 + 12],  mm6	movd  [edi + ecx*4 + 20],  mm7		movq  mm6, [edi + ecx*4 + 24]       ;# increment iH2 force 	movd  mm7, [edi + ecx*4 + 32] 		pfadd mm6, mm2	pfadd mm7, mm3	movq  [edi + ecx*4 + 24],  mm6	movd  [edi + ecx*4 + 32],  mm7		mov   ebx, [ebp + nb101_fshift]    ;# increment fshift force 	mov   edx, [esp + nb101_is3]	movq  mm6, [ebx + edx*4]		movd  mm7, [ebx + edx*4 + 8]		pfadd mm6, [esp + nb101_fixO]	pfadd mm7, [esp + nb101_fizO]	pfadd mm6, mm0	pfadd mm7, mm1	pfadd mm6, mm2	pfadd mm7, mm3	movq  [ebx + edx*4],     mm6	movd  [ebx + edx*4 + 8], mm7		;# get n from stack	mov esi, [esp + nb101_n]        ;# get group index for i particle         mov   edx, [ebp + nb101_gid]      	;# base of gid[]        mov   edx, [edx + esi*4]		;# ggid=gid[n]	movq  mm7, [esp + nb101_vctot]     	pfacc mm7,mm7	          ;# get and sum the two parts of total potential 		mov   eax, [ebp + nb101_Vc]	movd  mm6, [eax + edx*4] 	pfadd mm6, mm7	movd  [eax + edx*4], mm6          ;# increment vc[gid]        ;# finish if last         mov ecx, [esp + nb101_nn1]	;# esi already loaded with n	inc esi        sub ecx, esi        jecxz .nb101_outerend        ;# not last, iterate outer loop once more!          mov [esp + nb101_n], esi        jmp .nb101_outer.nb101_outerend:        ;# check if more outer neighborlists remain        mov   ecx, [esp + nb101_nri]	;# esi already loaded with n above        sub   ecx, esi        jecxz .nb101_end        ;# non-zero, do one more workunit        jmp   .nb101_threadloop.nb101_end:	femms	mov eax, [esp + nb101_nouter] 		mov ebx, [esp + nb101_ninner]	mov ecx, [ebp + nb101_outeriter]	mov edx, [ebp + nb101_inneriter]	mov [ecx], eax	mov [edx], ebx		add esp, 168	pop edi	pop esi    	pop edx    	pop ecx    	pop ebx    	pop eax	leave	ret						.globl nb_kernel101nf_ia32_3dnow.globl _nb_kernel101nf_ia32_3dnownb_kernel101nf_ia32_3dnow:	_nb_kernel101nf_ia32_3dnow:	.equiv		nb101nf_p_nri,		8.equiv		nb101nf_iinr,		12.equiv		nb101nf_jindex,		16.equiv		nb101nf_jjnr,		20.equiv		nb101nf_shift,		24.equiv		nb101nf_shiftvec,	28.equiv		nb101nf_fshift,		32.equiv		nb101nf_gid,		36.equiv		nb101nf_pos,		40		.equiv		nb101nf_faction,	44.equiv		nb101nf_charge,		48.equiv		nb101nf_p_facel,	52.equiv		nb101nf_p_krf,		56	.equiv		nb101nf_p_crf,		60	.equiv		nb101nf_Vc,		64	.equiv		nb101nf_type,		68.equiv		nb101nf_p_ntype,	72.equiv		nb101nf_vdwparam,	76	.equiv		nb101nf_Vvdw,		80	.equiv		nb101nf_p_tabscale,	84	.equiv		nb101nf_VFtab,		88.equiv		nb101nf_invsqrta,	92	.equiv		nb101nf_dvda,		96.equiv          nb101nf_p_gbtabscale,   100.equiv          nb101nf_GBtab,          104.equiv          nb101nf_p_nthreads,     108.equiv          nb101nf_count,          112.equiv          nb101nf_mtx,            116.equiv          nb101nf_outeriter,      120.equiv          nb101nf_inneriter,      124.equiv          nb101nf_work,           128			;# stack offsets for local variables .equiv		nb101nf_is3,		0.equiv		nb101nf_ii3,		4.equiv		nb101nf_ixO,		8.equiv		nb101nf_iyO,		12.equiv		nb101nf_izO,		16	.equiv		nb101nf_ixH,		20 .equiv		nb101nf_iyH,		28 .equiv		nb101nf_izH,		36 .equiv		nb101nf_iqO,		44	.equiv		nb101nf_iqH,		52		.equiv		nb101nf_vctot,		60 .equiv		nb101nf_innerjjnr,	68.equiv		nb101nf_innerk,		72   .equiv          nb101nf_n,              76 ;# idx for outer loop.equiv          nb101nf_nn1,            80 ;# number of outer iterations.equiv          nb101nf_nri,            84.equiv          nb101nf_nouter,         88.equiv          nb101nf_ninner,         92	push ebp	mov ebp,esp	    	push eax    	push ebx    	push ecx    	push edx	push esi	push edi	sub esp, 96		;# local stack space 	femms	mov ecx, [ebp + nb101nf_p_nri]	mov esi, [ebp + nb101nf_p_facel]	mov ecx, [ecx]	mov [esp + nb101nf_nri], ecx	;# zero iteration counters	mov eax, 0	mov [esp + nb101nf_nouter], eax	mov [esp + nb101nf_ninner], eax	;# assume we have at least one i particle - start directly 		mov   ecx, [ebp + nb101nf_iinr]       ;# ecx = pointer into iinr[] 		mov   ebx, [ecx]	    ;# ebx=ii 	mov   edx, [ebp + nb101nf_charge]	movd  mm1, [esi]	movd  mm2, [edx + ebx*4]    ;# mm2=charge[ii0] 	pfmul mm2, mm1			movq  [esp + nb101nf_iqO], mm2	    ;# iqO = facel*charge[ii] 		movd  mm2, [edx + ebx*4 + 4]    ;# mm2=charge[ii0+1] 	pfmul mm2, mm1	punpckldq mm2,mm2	    ;# spread to both halves 	movq  [esp + nb101nf_iqH], mm2	    ;# iqH = facel*charge[ii0+1] .nb101nf_threadloop:        mov   esi, [ebp + nb101nf_count]          ;# pointer to sync counter        mov   eax, [esi].nb101nf_spinlock:        mov   ebx, eax                          ;# ebx=*count=nn0        add   ebx, 1                           ;# ebx=nn1=nn0+10        lock        cmpxchg [esi], ebx                      ;# write nn1 to *counter,                                                ;# if it hasnt changed.                                                ;# or reread *counter to eax.        pause                                   ;# -> better p4 performance        jnz .nb101nf_spinlock        ;# if(nn1>nri) nn1=nri        mov ecx, [esp + nb101nf_nri]        mov edx, ecx        sub ecx, ebx        cmovle ebx, edx                         ;# if(nn1>nri) nn1=nri        ;# Cleared the spinlock if we got here.        ;# eax contains nn0, ebx contains nn1.        mov [esp + nb101nf_n], eax        mov [esp + nb101nf_nn1], ebx        sub ebx, eax                            ;# calc number of outer lists	mov esi, eax				;# copy n to esi        jg  .nb101nf_outerstart        jmp .nb101nf_end.nb101nf_outerstart:		;# ebx contains number of outer iterations	add ebx, [esp + nb101nf_nouter]        mov [esp + nb101nf_nouter], ebx	.nb101nf_outer:	mov   eax, [ebp + nb101nf_shift]      ;# eax = pointer into shift[] 	mov   ebx, [eax + esi*4]		;# ebx=shift[n] 		lea   ebx, [ebx + ebx*2]    ;# ebx=3*is 	mov   [esp + nb101nf_is3],ebx    	;# store is3 	mov   eax, [ebp + nb101nf_shiftvec]   ;# eax = base of shiftvec[] 		movq  mm5, [eax + ebx*4]	;# move shX/shY to mm5 and shZ to mm6 	movd  mm6, [eax + ebx*4 + 8]	movq  mm0, mm5	movq  mm1, mm5	movq  mm2, mm6	punpckldq mm0,mm0	    ;# also expand shX,Y,Z in mm0--mm2 	punpckhdq mm1,mm1	punpckldq mm2,mm2				mov   ecx, [ebp + nb101nf_iinr]       ;# ecx = pointer into iinr[] 		mov   ebx, [ecx + esi*4]	    ;# ebx=ii 	lea   ebx, [ebx + ebx*2]	;# ebx = 3*ii=ii3 	mov   eax, [ebp + nb101nf_pos]    ;# eax = base of pos[] 		pfadd mm5, [eax + ebx*4]    ;# ix = shX + posX (and iy too) 	movd  mm7, [eax + ebx*4 + 8]    ;# cant use direct memory add for 4 bytes (iz) 	mov   [esp + nb101nf_ii3], ebx	    ;# (use mm7 as temp storage for iz) 	pfadd mm6, mm7	movq  [esp + nb101nf_ixO], mm5		movq  [esp + nb101nf_izO], mm6	movd  mm3, [eax + ebx*4 + 12]	movd  mm4, [eax + ebx*4 + 16]	movd  mm5, [eax + ebx*4 + 20]	punpckldq  mm3, [eax + ebx*4 + 24]	punpckldq  mm4, [eax + ebx*4 + 28]	punpckldq  mm5, [eax + ebx*4 + 32] 	;# coords of H1 in low mm3-mm5, H2 in high 		pfadd mm0, mm3	pfadd mm1, mm4	pfadd mm2, mm5			movq [esp + nb101nf_ixH], mm0		movq [esp + nb101nf_iyH], mm1		movq [esp + nb101nf_izH], mm2							;# clear vctot 	pxor  mm7,mm7	movq  [esp + nb101nf_vctot], mm7	mov   eax, [ebp + nb101nf_jindex]	mov   ecx, [eax + esi*4]	     ;# jindex[n] 	mov   edx, [eax + esi*4 + 4]	     ;# jindex[n+1] 	sub   edx, ecx               ;# number of innerloop atoms 	mov   [esp + nb101nf_innerk], edx    ;# number of innerloop atoms 	add   edx, [esp + nb101nf_ninner]	mov   [esp + nb101nf_ninner], edx	mov   esi, [ebp + nb101nf_pos]	mov   eax, [ebp + nb101nf_jjnr]	shl   ecx, 2	add   eax, ecx	mov   [esp + nb101nf_innerjjnr], eax     ;# pointer to jjnr[nj0] .nb101nf_inner_loop:		;# a single j particle iteration here 	mov   eax, [esp + nb101nf_innerjjnr]	mov   eax, [eax]	;# eax=jnr offset     	add dword ptr [esp + nb101nf_innerjjnr],  4 ;# advance pointer 	;# prefetch data - trial and error says 16 is best 	prefetch [ecx + 16]	   	mov ecx, [ebp + nb101nf_charge]	movd mm7, [ecx + eax*4]	punpckldq mm7,mm7	movq mm6,mm7	pfmul mm6, [esp + nb101nf_iqO]	pfmul mm7, [esp + nb101nf_iqH]	;# mm6=qqO, mm7=qqH 		lea   eax, [eax + eax*2]		movq  mm0, [esi + eax*4]	movd  mm1, [esi + eax*4 + 8]	;# copy & expand to mm2-mm4 for the H interactions 	movq  mm2, mm0	movq  mm3, mm0	movq  mm4, mm1	punpckldq mm2,mm2	punpckhdq mm3,mm3	punpckldq mm4,mm4		pfsubr mm0, [esp + nb101nf_ixO]	pfsubr mm1, [esp + nb101nf_izO]			pfmul mm0,mm0	pfmul mm1,mm1	pfacc mm0, mm1	pfadd mm0, mm1		;# mm0=rsqO 		punpckldq mm2, mm2	punpckldq mm3, mm3	punpckldq mm4, mm4  ;# mm2-mm4 is jx-jz 	pfsubr mm2, [esp + nb101nf_ixH]	pfsubr mm3, [esp + nb101nf_iyH]	pfsubr mm4, [esp + nb101nf_izH] ;# mm2-mm4 is dxH-dzH 		pfmul mm2,mm2	pfmul mm3,mm3	pfmul mm4,mm4	pfadd mm3,mm2	pfadd mm3,mm4		;# mm3=rsqH     	pfrsqrt mm1,mm0    	movq mm2,mm1    	pfmul mm1,mm1    	pfrsqit1 mm1,mm0				    	pfrcpit2 mm1,mm2	;# mm1=invsqrt 	;# calculate potential and scalar force 	pfmul mm6, mm1		;# mm6=vcoul 	pfrsqrt mm5, mm3	pswapd mm3,mm3	pfrsqrt mm2, mm3	pswapd mm3,mm3	punpckldq mm5,mm2	;# seeds are in mm5 now, and rsq in mm3 	movq mm2, mm5	pfmul mm5,mm5    	pfrsqit1 mm5,mm3				    	pfrcpit2 mm5,mm2	;# mm5=invsqrt 	pfmul mm7, mm5		;# mm7=vcoul 	;# update vctot 	pfadd mm7, mm6	pfadd mm7, [esp + nb101nf_vctot]	movq [esp + nb101nf_vctot], mm7		;#  done  - one more? 	dec dword ptr [esp + nb101nf_innerk]	jz  .nb101nf_updateouterdata	jmp .nb101nf_inner_loop.nb101nf_updateouterdata:		;# get n from stack	mov esi, [esp + nb101nf_n]        ;# get group index for i particle         mov   edx, [ebp + nb101nf_gid]      	;# base of gid[]        mov   edx, [edx + esi*4]		;# ggid=gid[n]	movq  mm7, [esp + nb101nf_vctot]     	pfacc mm7,mm7	          ;# get and sum the two parts of total potential 		mov   eax, [ebp + nb101nf_Vc]	movd  mm6, [eax + edx*4] 	pfadd mm6, mm7	movd  [eax + edx*4], mm6          ;# increment vc[gid]        ;# finish if last         mov ecx, [esp + nb101nf_nn1]	;# esi already loaded with n	inc esi        sub ecx, esi        jecxz .nb101nf_outerend        ;# not last, iterate outer loop once more!          mov [esp + nb101nf_n], esi        jmp .nb101nf_outer.nb101nf_outerend:        ;# check if more outer neighborlists remain        mov   ecx, [esp + nb101nf_nri]	;# esi already loaded with n above        sub   ecx, esi        jecxz .nb101nf_end        ;# non-zero, do one more workunit        jmp   .nb101nf_threadloop.nb101nf_end:	femms	mov eax, [esp + nb101nf_nouter] 		mov ebx, [esp + nb101nf_ninner]	mov ecx, [ebp + nb101nf_outeriter]	mov edx, [ebp + nb101nf_inneriter]	mov [ecx], eax	mov [edx], ebx		add esp, 96	pop edi	pop esi    	pop edx    	pop ecx    	pop ebx    	pop eax	leave	ret			

⌨️ 快捷键说明

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