diff options
author | Jeffrey Walton <noloader@gmail.com> | 2020-01-23 02:46:30 -0500 |
---|---|---|
committer | Jeffrey Walton <noloader@gmail.com> | 2020-01-23 02:46:30 -0500 |
commit | eb67356732e666b84254ecb6a006d042708030f5 (patch) | |
tree | 546372548d8b71b8dce12d2850cfa501b987f412 /cpu.h | |
parent | 649648aba87303aaf29a063f406ce23b2ea7289a (diff) | |
download | cryptopp-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.h | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -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;
|