From 74957884685c3c3df9ef9540d2ff517017497a89 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Thu, 16 Mar 2017 19:38:59 +0100 Subject: blake2s: add AVX implementation --- src/Kbuild | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/Kbuild') diff --git a/src/Kbuild b/src/Kbuild index 6425f6a..35dade7 100644 --- a/src/Kbuild +++ b/src/Kbuild @@ -6,6 +6,10 @@ wireguard-y := main.o noise.o device.o peer.o timers.o data.o send.o receive.o s wireguard-y += crypto/curve25519.o crypto/chacha20poly1305.o crypto/blake2s.o ifeq ($(CONFIG_X86_64),y) wireguard-y += crypto/chacha20-ssse3-x86_64.o crypto/poly1305-sse2-x86_64.o +avx_supported := $(call as-instr,vpxor %xmm0$(comma)%xmm0$(comma)%xmm0,yes,no) +ifeq ($(avx_supported),yes) + wireguard-y += crypto/blake2s-avx-x86_64.o +endif avx2_supported := $(call as-instr,vpgatherdd %ymm0$(comma)(%eax$(comma)%ymm1$(comma)4)$(comma)%ymm2,yes,no) ifeq ($(avx2_supported),yes) wireguard-y += crypto/chacha20-avx2-x86_64.o crypto/poly1305-avx2-x86_64.o -- cgit v1.2.3-59-g8ed1b