nb_kernel132_x86_64_sse.intel_syntax.s

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

S
2,232
字号
	addps   xmm0, [rsp + nb132_fixO]	addps   xmm1, [rsp + nb132_fiyO]	addps   xmm2, [rsp + nb132_fizO]	movaps  [rsp + nb132_fixO], xmm0	movaps  [rsp + nb132_fiyO], xmm1	movaps  [rsp + nb132_fizO], xmm2	movaps  [rsp + nb132_fjxO], xmm3	movaps  [rsp + nb132_fjyO], xmm4	movaps  [rsp + nb132_fjzO], xmm5		;# done with i O Now do i H1 & H2 simultaneously first get i particle coords:     movaps  xmm0, [rsp + nb132_jxO]    movaps  xmm1, [rsp + nb132_jyO]    movaps  xmm2, [rsp + nb132_jzO]    movaps  xmm3, xmm0    movaps  xmm4, xmm1    movaps  xmm5, xmm2	subps  xmm0, [rsp + nb132_ixH1]	subps  xmm1, [rsp + nb132_iyH1]	subps  xmm2, [rsp + nb132_izH1]	subps  xmm3, [rsp + nb132_ixH2]	subps  xmm4, [rsp + nb132_iyH2]	subps  xmm5, [rsp + nb132_izH2]    movaps [rsp + nb132_dxH1O], xmm0	movaps [rsp + nb132_dyH1O], xmm1	movaps [rsp + nb132_dzH1O], xmm2	movaps [rsp + nb132_dxH2O], xmm3	movaps [rsp + nb132_dyH2O], xmm4	movaps [rsp + nb132_dzH2O], xmm5	mulps xmm0, xmm0	mulps xmm1, xmm1	mulps xmm2, xmm2	mulps xmm3, xmm3	mulps xmm4, xmm4	mulps xmm5, xmm5	addps xmm0, xmm1	addps xmm4, xmm3	addps xmm0, xmm2	;# have rsqH1 in xmm0 	addps xmm4, xmm5	;# have rsqH2 in xmm4 	;# do invsqrt 	rsqrtps xmm1, xmm0	rsqrtps xmm5, xmm4	movaps  xmm2, xmm1	movaps  xmm6, xmm5	mulps   xmm1, xmm1	mulps   xmm5, xmm5	movaps  xmm3, [rsp + nb132_three]	movaps  xmm7, xmm3	mulps   xmm1, xmm0	mulps   xmm5, xmm4	subps   xmm3, xmm1	subps   xmm7, xmm5	mulps   xmm3, xmm2	mulps   xmm7, xmm6	mulps   xmm3, [rsp + nb132_half] ;# rinv H1 - j water 	mulps   xmm7, [rsp + nb132_half] ;# rinv H2 - j water  	;# assemble charges in xmm6 	xorps   xmm6, xmm6	movss   xmm6, [rsp + nb132_qqOH]	movhps  xmm6, [rsp + nb132_qqHH]		movaps  xmm0, xmm3	movaps  xmm1, xmm7	mulps   xmm3, xmm6 ;# vcoul	mulps   xmm7, xmm6 ;# vcoul	mulps   xmm0, xmm0	mulps   xmm1, xmm1	mulps   xmm0, xmm3	addps   xmm3, xmm7	mulps   xmm7, xmm1	addps   xmm3, [rsp + nb132_vctot]	movaps  [rsp + nb132_vctot], xmm3	movaps  xmm1, xmm0	movaps  xmm2, xmm0	mulps   xmm0, [rsp + nb132_dxH1O]	mulps   xmm1, [rsp + nb132_dyH1O]	mulps   xmm2, [rsp + nb132_dzH1O]	;# update forces H1 - j water     movaps  xmm3, xmm0    movaps  xmm4, xmm1    movaps  xmm5, xmm2	addps   xmm0, [rsp + nb132_fixH1]	addps   xmm1, [rsp + nb132_fiyH1]	addps   xmm2, [rsp + nb132_fizH1]	addps   xmm3, [rsp + nb132_fjxO]	addps   xmm4, [rsp + nb132_fjyO]	addps   xmm5, [rsp + nb132_fjzO]	movaps  [rsp + nb132_fixH1], xmm0	movaps  [rsp + nb132_fiyH1], xmm1	movaps  [rsp + nb132_fizH1], xmm2	movaps  [rsp + nb132_fjxO], xmm3	movaps  [rsp + nb132_fjyO], xmm4	movaps  [rsp + nb132_fjzO], xmm5	;# do forces H2 - j water 	movaps xmm0, xmm7	movaps xmm1, xmm7	movaps xmm2, xmm7	mulps   xmm0, [rsp + nb132_dxH2O]	mulps   xmm1, [rsp + nb132_dyH2O]	mulps   xmm2, [rsp + nb132_dzH2O]    movaps  xmm3, xmm0    movaps  xmm4, xmm1    movaps  xmm5, xmm2	addps   xmm0, [rsp + nb132_fixH2]	addps   xmm1, [rsp + nb132_fiyH2]	addps   xmm2, [rsp + nb132_fizH2]	addps   xmm3, [rsp + nb132_fjxO]	addps   xmm4, [rsp + nb132_fjyO]	addps   xmm5, [rsp + nb132_fjzO]	movaps  [rsp + nb132_fixH2], xmm0	movaps  [rsp + nb132_fiyH2], xmm1	movaps  [rsp + nb132_fizH2], xmm2    ;# fjx/fjy/fjz in xmm3-xmm5	mov     rsi, [rbp + nb132_faction]	;# update j water forces from local variables 	movlps  xmm0, [rsi + rax*4]        ;# 	movlps  xmm1, [rsi + rax*4 + 12]	movhps  xmm1, [rsi + rax*4 + 24]	movaps  xmm6, xmm5	movaps  xmm7, xmm5	shufps  xmm6, xmm6, 2 ;# constant 00000010	shufps  xmm7, xmm7, 3 ;# constant 00000011	addss   xmm5, [rsi + rax*4 + 8]	addss   xmm6, [rsi + rax*4 + 20]	addss   xmm7, [rsi + rax*4 + 32]	movss   [rsi + rax*4 + 8], xmm5	movss   [rsi + rax*4 + 20], xmm6	movss   [rsi + rax*4 + 32], xmm7	movaps   xmm5, xmm3	unpcklps xmm3, xmm4	unpckhps xmm5, xmm4	addps    xmm0, xmm3	addps    xmm1, xmm5	movlps  [rsi + rax*4], xmm0 	movlps  [rsi + rax*4 + 12], xmm1 	movhps  [rsi + rax*4 + 24], xmm1 		dec dword ptr [rsp + nb132_innerk]	jz    .nb132_updateouterdata	jmp   .nb132_single_loop.nb132_updateouterdata:	mov   ecx, [rsp + nb132_ii3]	mov   rdi, [rbp + nb132_faction]	mov   rsi, [rbp + nb132_fshift]	mov   edx, [rsp + nb132_is3]	;# accumulate  Oi forces in xmm0, xmm1, xmm2 	movaps xmm0, [rsp + nb132_fixO]	movaps xmm1, [rsp + nb132_fiyO] 	movaps xmm2, [rsp + nb132_fizO]	movhlps xmm3, xmm0	movhlps xmm4, xmm1	movhlps xmm5, xmm2	addps  xmm0, xmm3	addps  xmm1, xmm4	addps  xmm2, xmm5 ;# sum is in 1/2 in xmm0-xmm2 	movaps xmm3, xmm0		movaps xmm4, xmm1		movaps xmm5, xmm2		shufps xmm3, xmm3, 1	shufps xmm4, xmm4, 1	shufps xmm5, xmm5, 1	addss  xmm0, xmm3	addss  xmm1, xmm4	addss  xmm2, xmm5	;# xmm0-xmm2 has single force in pos0 	;# increment i force 	movss  xmm3, [rdi + rcx*4]	movss  xmm4, [rdi + rcx*4 + 4]	movss  xmm5, [rdi + rcx*4 + 8]	subss  xmm3, xmm0	subss  xmm4, xmm1	subss  xmm5, xmm2	movss  [rdi + rcx*4],     xmm3	movss  [rdi + rcx*4 + 4], xmm4	movss  [rdi + rcx*4 + 8], xmm5	;# accumulate force in xmm6/xmm7 for fshift 	movaps xmm6, xmm0	movss xmm7, xmm2	movlhps xmm6, xmm1	shufps  xmm6, xmm6, 8 ;# constant 00001000	 	;# accumulate H1i forces in xmm0, xmm1, xmm2 	movaps xmm0, [rsp + nb132_fixH1]	movaps xmm1, [rsp + nb132_fiyH1]	movaps xmm2, [rsp + nb132_fizH1]	movhlps xmm3, xmm0	movhlps xmm4, xmm1	movhlps xmm5, xmm2	addps  xmm0, xmm3	addps  xmm1, xmm4	addps  xmm2, xmm5 ;# sum is in 1/2 in xmm0-xmm2 	movaps xmm3, xmm0		movaps xmm4, xmm1		movaps xmm5, xmm2		shufps xmm3, xmm3, 1	shufps xmm4, xmm4, 1	shufps xmm5, xmm5, 1	addss  xmm0, xmm3	addss  xmm1, xmm4	addss  xmm2, xmm5	;# xmm0-xmm2 has single force in pos0 	;# increment i force 	movss  xmm3, [rdi + rcx*4 + 12]	movss  xmm4, [rdi + rcx*4 + 16]	movss  xmm5, [rdi + rcx*4 + 20]	subss  xmm3, xmm0	subss  xmm4, xmm1	subss  xmm5, xmm2	movss  [rdi + rcx*4 + 12], xmm3	movss  [rdi + rcx*4 + 16], xmm4	movss  [rdi + rcx*4 + 20], xmm5	;# accumulate force in xmm6/xmm7 for fshift 	addss xmm7, xmm2	movlhps xmm0, xmm1	shufps  xmm0, xmm0, 8 ;# constant 00001000		addps   xmm6, xmm0	;# accumulate H2i forces in xmm0, xmm1, xmm2 	movaps xmm0, [rsp + nb132_fixH2]	movaps xmm1, [rsp + nb132_fiyH2]	movaps xmm2, [rsp + nb132_fizH2]	movhlps xmm3, xmm0	movhlps xmm4, xmm1	movhlps xmm5, xmm2	addps  xmm0, xmm3	addps  xmm1, xmm4	addps  xmm2, xmm5 ;# sum is in 1/2 in xmm0-xmm2 	movaps xmm3, xmm0		movaps xmm4, xmm1		movaps xmm5, xmm2		shufps xmm3, xmm3, 1	shufps xmm4, xmm4, 1	shufps xmm5, xmm5, 1	addss  xmm0, xmm3	addss  xmm1, xmm4	addss  xmm2, xmm5	;# xmm0-xmm2 has single force in pos0 	;# increment i force 	movss  xmm3, [rdi + rcx*4 + 24]	movss  xmm4, [rdi + rcx*4 + 28]	movss  xmm5, [rdi + rcx*4 + 32]	subss  xmm3, xmm0	subss  xmm4, xmm1	subss  xmm5, xmm2	movss  [rdi + rcx*4 + 24], xmm3	movss  [rdi + rcx*4 + 28], xmm4	movss  [rdi + rcx*4 + 32], xmm5	;# accumulate force in xmm6/xmm7 for fshift 	addss xmm7, xmm2	movlhps xmm0, xmm1	shufps  xmm0, xmm0, 8 ;# constant 00001000		addps   xmm6, xmm0	;# increment fshift force  	movlps  xmm3, [rsi + rdx*4]	movss  xmm4, [rsi + rdx*4 + 8]	subps  xmm3, xmm6	subss  xmm4, xmm7	movlps  [rsi + rdx*4],    xmm3	movss  [rsi + rdx*4 + 8], xmm4	;# get n from stack	mov esi, [rsp + nb132_n]        ;# get group index for i particle         mov   rdx, [rbp + nb132_gid]      	;# base of gid[]        mov   edx, [rdx + rsi*4]		;# ggid=gid[n]	;# accumulate total potential energy and update it 	movaps xmm7, [rsp + nb132_vctot]	;# accumulate 	movhlps xmm6, xmm7	addps  xmm7, xmm6	;# pos 0-1 in xmm7 have the sum now 	movaps xmm6, xmm7	shufps xmm6, xmm6, 1	addss  xmm7, xmm6			;# add earlier value from mem 	mov   rax, [rbp + nb132_Vc]	addss xmm7, [rax + rdx*4] 	;# move back to mem 	movss [rax + rdx*4], xmm7 		;# accumulate total lj energy and update it 	movaps xmm7, [rsp + nb132_Vvdwtot]	;# accumulate 	movhlps xmm6, xmm7	addps  xmm7, xmm6	;# pos 0-1 in xmm7 have the sum now 	movaps xmm6, xmm7	shufps xmm6, xmm6, 1	addss  xmm7, xmm6			;# add earlier value from mem 	mov   rax, [rbp + nb132_Vvdw]	addss xmm7, [rax + rdx*4] 	;# move back to mem 	movss [rax + rdx*4], xmm7 	        ;# finish if last         mov ecx, [rsp + nb132_nn1]	;# esi already loaded with n	inc esi        sub ecx, esi        jz .nb132_outerend        ;# not last, iterate outer loop once more!          mov [rsp + nb132_n], esi        jmp .nb132_outer.nb132_outerend:        ;# check if more outer neighborlists remain        mov   ecx, [rsp + nb132_nri]	;# esi already loaded with n above        sub   ecx, esi        jz .nb132_end        ;# non-zero, do one more workunit        jmp   .nb132_threadloop.nb132_end:	mov eax, [rsp + nb132_nouter]	mov ebx, [rsp + nb132_ninner]	mov rcx, [rbp + nb132_outeriter]	mov rdx, [rbp + nb132_inneriter]	mov [rcx], eax	mov [rdx], ebx	add rsp, 1624	emms        pop r15        pop r14        pop r13        pop r12	pop rbx	pop	rbp	ret.globl nb_kernel132nf_x86_64_sse.globl _nb_kernel132nf_x86_64_ssenb_kernel132nf_x86_64_sse:	_nb_kernel132nf_x86_64_sse:	;#	Room for return address and rbp (16 bytes).equiv          nb132nf_fshift,         16.equiv          nb132nf_gid,            24.equiv          nb132nf_pos,            32.equiv          nb132nf_faction,        40.equiv          nb132nf_charge,         48.equiv          nb132nf_p_facel,        56.equiv          nb132nf_argkrf,         64.equiv          nb132nf_argcrf,         72.equiv          nb132nf_Vc,             80.equiv          nb132nf_type,           88.equiv          nb132nf_p_ntype,        96.equiv          nb132nf_vdwparam,       104.equiv          nb132nf_Vvdw,           112.equiv          nb132nf_p_tabscale,     120.equiv          nb132nf_VFtab,          128.equiv          nb132nf_invsqrta,       136.equiv          nb132nf_dvda,           144.equiv          nb132nf_p_gbtabscale,   152.equiv          nb132nf_GBtab,          160.equiv          nb132nf_p_nthreads,     168.equiv          nb132nf_count,          176.equiv          nb132nf_mtx,            184.equiv          nb132nf_outeriter,      192.equiv          nb132nf_inneriter,      200.equiv          nb132nf_work,           208	;# stack offsets for local variables  	;# bottom of stack is cache-aligned for sse use .equiv          nb132nf_ixO,            0.equiv          nb132nf_iyO,            16.equiv          nb132nf_izO,            32.equiv          nb132nf_ixH1,           48.equiv          nb132nf_iyH1,           64.equiv          nb132nf_izH1,           80.equiv          nb132nf_ixH2,           96.equiv          nb132nf_iyH2,           112.equiv          nb132nf_izH2,           128.equiv          nb132nf_jxO,            144.equiv          nb132nf_jyO,            160.equiv          nb132nf_jzO,            176.equiv          nb132nf_jxH1,           192.equiv          nb132nf_jyH1,           208.equiv          nb132nf_jzH1,           224.equiv          nb132nf_jxH2,           240.equiv          nb132nf_jyH2,           256.equiv          nb132nf_jzH2,           272.equiv          nb132nf_qqOO,           288.equiv          nb132nf_qqOH,           304.equiv          nb132nf_qqHH,           320.equiv          nb132nf_c6,             336.equiv          nb132nf_c12,            352.equiv          nb132nf_vctot,          368.equiv          nb132nf_Vvdwtot,        384.equiv          nb132nf_half,           400.equiv          nb132nf_three,          416.equiv          nb132nf_rsqOO,          432.equiv          nb132nf_rsqOH1,         448.equiv          nb132nf_rsqOH2,         464.equiv          nb132nf_rsqH1O,         480.equiv          nb132nf_rsqH1H1,        496.equiv          nb132nf_rsqH1H2,        512.equiv          nb132nf_rsqH2O,         528.equiv          nb132nf_rsqH2H1,        544.equiv          nb132nf_rsqH2H2,        560.equiv          nb132nf_rinvOO,         576.equiv          nb132nf_rinvOH1,        592.equiv          nb132nf_rinvOH2,        608.equiv          nb132nf_rinvH1O,        624.equiv          nb132nf_rinvH1H1,       640.equiv          nb132nf_rinvH1H2,       656.equiv          nb132nf_rinvH2O,        672.equiv          nb132nf_rinvH2H1,       688.equiv          nb132nf_rinvH2H2,       704.equiv          nb132nf_krf,            720.equiv          nb132nf_crf,            736.equiv          nb132nf_tsc,            752.equiv          nb132nf_nri,            768.equiv          nb132nf_iinr,           776.equiv          nb132nf_jindex,         784.equiv          nb132nf_jjnr,           792.equiv          nb132nf_shift,          800.equiv          nb132nf_shiftvec,       808

⌨️ 快捷键说明

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