summaryrefslogtreecommitdiffhomepage
path: root/src/crypto/curve25519.c
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2017-10-20 19:00:50 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2017-10-31 17:22:49 +0100
commitcb71dee9a64ee3e18ce4002d9ca54d97d3d5a106 (patch)
tree31eb0334376b928558743b1d9296a0e2a0c59170 /src/crypto/curve25519.c
parentca0ecdcc7651ca41e40996ee0e377136e4a319bf (diff)
crypto/avx: make sure we can actually use ymm registers
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/crypto/curve25519.c')
-rw-r--r--src/crypto/curve25519.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/crypto/curve25519.c b/src/crypto/curve25519.c
index f236cf5..a53841d 100644
--- a/src/crypto/curve25519.c
+++ b/src/crypto/curve25519.c
@@ -33,7 +33,7 @@ static const u8 null_point[CURVE25519_POINT_SIZE] = { 0 };
static bool curve25519_use_avx __read_mostly = false;
void curve25519_fpu_init(void)
{
- curve25519_use_avx = boot_cpu_has(X86_FEATURE_AVX);
+ curve25519_use_avx = boot_cpu_has(X86_FEATURE_AVX) && cpu_has_xfeatures(XFEATURE_MASK_SSE | XFEATURE_MASK_YMM, NULL);
}
typedef u64 fe[10];