From 92d4dde3cf20e52bad9fb2d17cf0d059c8f68fef Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Thu, 3 Mar 2016 11:28:42 +0000 Subject: [Fix] Don't use _memcpy in assembly --- src/libcryptobox/siphash/avx2.S | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/libcryptobox/siphash/avx2.S b/src/libcryptobox/siphash/avx2.S index 995fc7636..070419c60 100644 --- a/src/libcryptobox/siphash/avx2.S +++ b/src/libcryptobox/siphash/avx2.S @@ -103,7 +103,12 @@ LBB0_5: ## %for.end movq %rbx, %rdx subq %rax, %rdx leaq -16(%rbp), %rdi - callq _memcpy + movq %rdx, %rcx + shrq $2, %rcx + rep; movsl + movq %rdx, %rcx + andq $3, %rcx + rep; movsb movb %bl, -9(%rbp) vmovq -16(%rbp), %xmm4 ## xmm4 = mem[0],zero vpslldq $8, %xmm4, %xmm0 ## xmm0 = zero,zero,zero,zero,zero,zero,zero,zero,xmm4[0,1,2,3,4,5,6,7] -- cgit v1.2.3