aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/Kbuild
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2017-05-21 17:51:58 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2017-05-30 18:07:28 +0200
commitfeffaa608b7e5e6802dabf55a2abb81662caa1c9 (patch)
tree9411a846a84754266906d8f7109efc9ceac39754 /src/Kbuild
parentchacha20poly1305: move constants to rodata (diff)
downloadwireguard-monolithic-historical-feffaa608b7e5e6802dabf55a2abb81662caa1c9.tar.xz
wireguard-monolithic-historical-feffaa608b7e5e6802dabf55a2abb81662caa1c9.zip
chacha20poly1305: add NEON versions for ARM and ARM64
Diffstat (limited to 'src/Kbuild')
-rw-r--r--src/Kbuild21
1 files changed, 15 insertions, 6 deletions
diff --git a/src/Kbuild b/src/Kbuild
index e2aa9de..4a36e25 100644
--- a/src/Kbuild
+++ b/src/Kbuild
@@ -4,18 +4,27 @@ ccflags-y += -Wframe-larger-than=8192
ccflags-y += -D'pr_fmt(fmt)=KBUILD_MODNAME ": " fmt'
wireguard-y := main.o noise.o device.o peer.o timers.o data.o send.o receive.o socket.o config.o hashtables.o routingtable.o ratelimiter.o cookie.o
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 crypto/curve25519-avx-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 crypto/curve25519-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
+ endif
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
+
+ifeq ($(CONFIG_ARM64),y)
+ wireguard-y += crypto/chacha20-neon-arm64.o
endif
+ifeq ($(CONFIG_ARM),y)
+ wireguard-y += crypto/chacha20-neon-arm.o
endif
+
include $(src)/compat/Kbuild.include
ifneq ($(KBUILD_EXTMOD),)