Skip to content

Commit

Permalink
cryptopp: Fix CPU feature detection on older Celerons
Browse files Browse the repository at this point in the history
This merges weidai11/cryptopp@af7d105, as Celeron is relevant to our userbase (people be using outdated CPU's)
  • Loading branch information
Dutchman101 committed Nov 21, 2023
1 parent 6400e68 commit 0f41d36
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions vendor/cryptopp/cpu.cpp
Expand Up @@ -592,15 +592,16 @@ void DetectX86Features()
(cpuid1[ECX_REG] & OSXSAVE_FLAG) != 0;
#endif

#if defined(__sun)
// Solaris 11 i86pc does not signal SSE support using
// OSXSAVE. We need to probe for SSE support.
// OSXSAVE. Additionally, Fedora 38 on a 2015 Celeron
// N3700 does not set OSXSAVE. So we need to explicitly
// probe for SSE support on rare occasions. Ugh...
if (g_hasSSE2 == false)
{
g_hasSSE2 = CPU_ProbeSSE2();
#endif

if (g_hasSSE2 == false)
goto done;
if (g_hasSSE2 == false)
goto done;
}

g_hasSSSE3 = (cpuid1[ECX_REG] & SSSE3_FLAG) != 0;
g_hasSSE41 = (cpuid1[ECX_REG] & SSE41_FLAG) != 0;
Expand Down

0 comments on commit 0f41d36

Please sign in to comment.