summaryrefslogtreecommitdiffhomepage
path: root/src/Kbuild
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2017-03-16 19:38:59 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2017-03-19 23:11:31 +0100
commit2fc244a152cef280b88ca1c33a1258aec3bbdc4b (patch)
tree0ca3adef8e08db1db5f1e09ab5d54576d23d0635 /src/Kbuild
parentd43629d000c2367462bc61ab8c3685abac8f2227 (diff)
blake2s: add AVX implementation
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/Kbuild')
-rw-r--r--src/Kbuild4
1 files changed, 4 insertions, 0 deletions
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