From 22ab28be0a80878452836c08161a26005c460630 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Thu, 7 Apr 2016 18:57:07 +0200 Subject: [PATCH] Require Visual Studio 2010+ for AESNI --- .../crypto_aead/aes256gcm/aesni/aead_aes256gcm_aesni.c | 2 +- src/libsodium/sodium/runtime.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libsodium/crypto_aead/aes256gcm/aesni/aead_aes256gcm_aesni.c b/src/libsodium/crypto_aead/aes256gcm/aesni/aead_aes256gcm_aesni.c index 96f6441f..d0ad674c 100644 --- a/src/libsodium/crypto_aead/aes256gcm/aesni/aead_aes256gcm_aesni.c +++ b/src/libsodium/crypto_aead/aes256gcm/aesni/aead_aes256gcm_aesni.c @@ -14,7 +14,7 @@ #include "utils.h" #if defined(HAVE_WMMINTRIN_H) || \ - (defined(_MSC_VER) && (defined(_M_X64) || defined(_M_AMD64) || defined(_M_IX86))) + (defined(_MSC_VER) && _MSC_VER >= 1600 && (defined(_M_X64) || defined(_M_AMD64) || defined(_M_IX86))) #pragma GCC target("ssse3") #pragma GCC target("aes") diff --git a/src/libsodium/sodium/runtime.c b/src/libsodium/sodium/runtime.c index f6d7576f..ebcce9ca 100644 --- a/src/libsodium/sodium/runtime.c +++ b/src/libsodium/sodium/runtime.c @@ -173,7 +173,7 @@ _sodium_runtime_intel_cpu_features(CPUFeatures * const cpu_features) #endif #if defined(HAVE_WMMINTRIN_H) || \ - (defined(_MSC_VER) && (defined(_M_X64) || defined(_M_AMD64) || defined(_M_IX86))) + (defined(_MSC_VER) && _MSC_VER >= 1600 && (defined(_M_X64) || defined(_M_AMD64) || defined(_M_IX86))) cpu_features->has_pclmul = ((cpu_info[2] & CPUID_ECX_PCLMUL) != 0x0); cpu_features->has_aesni = ((cpu_info[2] & CPUID_ECX_AESNI) != 0x0); #else