diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-10-19 00:03:49 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-10-31 17:25:23 +0100 |
commit | 3ea08d8f513c5f9a371f37221775980c1179a867 (patch) | |
tree | fc933e337580a444e16c07c584e86b8a8cf06049 /src/crypto/curve25519.c | |
parent | crypto/avx: make sure we can actually use ymm registers (diff) | |
download | wireguard-monolithic-historical-3ea08d8f513c5f9a371f37221775980c1179a867.tar.xz wireguard-monolithic-historical-3ea08d8f513c5f9a371f37221775980c1179a867.zip |
qemu: allow for cross compilation
Diffstat (limited to '')
-rw-r--r-- | src/crypto/curve25519.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/crypto/curve25519.c b/src/crypto/curve25519.c index a53841d..892da78 100644 --- a/src/crypto/curve25519.c +++ b/src/crypto/curve25519.c @@ -190,7 +190,7 @@ static void curve25519_sandy2x_base(u8 pub[CURVE25519_POINT_SIZE], const u8 secr memzero_explicit(x_51, sizeof(x_51)); memzero_explicit(z_51, sizeof(z_51)); } -#elif IS_ENABLED(CONFIG_KERNEL_MODE_NEON) && defined(CONFIG_ARM) +#elif IS_ENABLED(CONFIG_KERNEL_MODE_NEON) && defined(CONFIG_ARM) && !defined(CONFIG_CPU_THUMBONLY) #include <asm/hwcap.h> #include <asm/neon.h> #include <asm/simd.h> @@ -1416,7 +1416,7 @@ static void cmult(limb *resultx, limb *resultz, const u8 *n, const limb *q) bool curve25519(u8 mypublic[CURVE25519_POINT_SIZE], const u8 secret[CURVE25519_POINT_SIZE], const u8 basepoint[CURVE25519_POINT_SIZE]) { -#if IS_ENABLED(CONFIG_KERNEL_MODE_NEON) && defined(CONFIG_ARM) +#if IS_ENABLED(CONFIG_KERNEL_MODE_NEON) && defined(CONFIG_ARM) && !defined(CONFIG_CPU_THUMBONLY) if (curve25519_use_neon && may_use_simd()) { kernel_neon_begin(); curve25519_asm_neon(mypublic, secret, basepoint); @@ -1590,7 +1590,7 @@ static void cmult(struct other_stack *s, limb *resultx, limb *resultz, const u8 bool curve25519(u8 mypublic[CURVE25519_POINT_SIZE], const u8 secret[CURVE25519_POINT_SIZE], const u8 basepoint[CURVE25519_POINT_SIZE]) { -#if IS_ENABLED(CONFIG_KERNEL_MODE_NEON) && defined(CONFIG_ARM) +#if IS_ENABLED(CONFIG_KERNEL_MODE_NEON) && defined(CONFIG_ARM) && !defined(CONFIG_CPU_THUMBONLY) if (curve25519_use_neon && may_use_simd()) { kernel_neon_begin(); curve25519_asm_neon(mypublic, secret, basepoint); |