cs205-lecture-examples

Example codes used during Harvard CS205 lectures
git clone https://git.0xfab.ch/cs205-lecture-examples.git
Log | Files | Refs | README | LICENSE

saxpy_SSE.s (535B)


      1 	.file	"saxpy_SSE.c"
      2 	.intel_syntax noprefix
      3 	.text
      4 	.p2align 4
      5 	.globl	saxpy_SSE
      6 	.type	saxpy_SSE, @function
      7 saxpy_SSE:
      8 .LFB5667:
      9 	.cfi_startproc
     10 	shufps	xmm0, xmm0, 0
     11 	test	rdx, rdx
     12 	je	.L1
     13 	xor	eax, eax
     14 	.p2align 4,,10
     15 	.p2align 3
     16 .L3:
     17 	movaps	xmm1, XMMWORD PTR [rdi+rax*4]
     18 	mulps	xmm1, xmm0
     19 	addps	xmm1, XMMWORD PTR [rsi+rax*4]
     20 	movaps	XMMWORD PTR [rsi+rax*4], xmm1
     21 	add	rax, 4
     22 	cmp	rdx, rax
     23 	ja	.L3
     24 .L1:
     25 	ret
     26 	.cfi_endproc
     27 .LFE5667:
     28 	.size	saxpy_SSE, .-saxpy_SSE
     29 	.ident	"GCC: (GNU) 11.2.0"
     30 	.section	.note.GNU-stack,"",@progbits