Skip to content

Commit

Permalink
Avoid call to CPU_ProbeSSE2 in DetectX86Features (GH weidai11#1162)
Browse files Browse the repository at this point in the history
The call was a workaround for Solaris. Limit it to Solaris.
  • Loading branch information
noloader committed Jun 25, 2023
1 parent a23f78d commit 0d9cd94
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cpu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -599,10 +599,12 @@ 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.
if (g_hasSSE2 == false)
g_hasSSE2 = CPU_ProbeSSE2();
#endif

if (g_hasSSE2 == false)
goto done;
Expand Down

0 comments on commit 0d9cd94

Please sign in to comment.