summaryrefslogtreecommitdiff
path: root/cpu.h
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2020-01-23 02:46:30 -0500
committerJeffrey Walton <noloader@gmail.com>2020-01-23 02:46:30 -0500
commiteb67356732e666b84254ecb6a006d042708030f5 (patch)
tree546372548d8b71b8dce12d2850cfa501b987f412 /cpu.h
parent649648aba87303aaf29a063f406ce23b2ea7289a (diff)
downloadcryptopp-git-eb67356732e666b84254ecb6a006d042708030f5.tar.gz
Set g_x86DetectionDone when CRYPTOPP_DISABLE_ASM is in effect
Previously we were re-entering DetectX86Features when CpuId failed or CRYPTOPP_DISABLE_ASM was in effect
Diffstat (limited to 'cpu.h')
-rw-r--r--cpu.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/cpu.h b/cpu.h
index 1ab532e2..b2dd0ab1 100644
--- a/cpu.h
+++ b/cpu.h
@@ -115,9 +115,7 @@ CRYPTOPP_DLL bool CRYPTOPP_API CpuId(word32 func, word32 subfunc, word32 output[
/// \note This function is only available on Intel IA-32 platforms
inline bool HasSSE2()
{
-#if (CRYPTOPP_BOOL_X64 || CRYPTOPP_BOOL_X32)
- return true;
-#elif (CRYPTOPP_SSE2_ASM_AVAILABLE || CRYPTOPP_SSE2_INTRIN_AVAILABLE)
+#if (CRYPTOPP_SSE2_ASM_AVAILABLE || CRYPTOPP_SSE2_INTRIN_AVAILABLE)
if (!g_x86DetectionDone)
DetectX86Features();
return g_hasSSE2;