Skip to content

Commit af7d105

Browse files
committed
Fix CPU feature detection on older Celerons
1 parent 19f0e3a commit af7d105

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

cpu.cpp

+7-6
Original file line numberDiff line numberDiff line change
@@ -603,15 +603,16 @@ void DetectX86Features()
603603
(cpuid1[ECX_REG] & OSXSAVE_FLAG) != 0;
604604
#endif
605605

606-
#if defined(__sun)
607606
// Solaris 11 i86pc does not signal SSE support using
608-
// OSXSAVE. We need to probe for SSE support.
607+
// OSXSAVE. Additionally, Fedora 38 on a 2015 Celeron
608+
// N3700 does not set OSXSAVE. So we need to explicitly
609+
// probe for SSE support on rare occasions. Ugh...
609610
if (g_hasSSE2 == false)
611+
{
610612
g_hasSSE2 = CPU_ProbeSSE2();
611-
#endif
612-
613-
if (g_hasSSE2 == false)
614-
goto done;
613+
if (g_hasSSE2 == false)
614+
goto done;
615+
}
615616

616617
g_hasSSSE3 = (cpuid1[ECX_REG] & SSSE3_FLAG) != 0;
617618
g_hasSSE41 = (cpuid1[ECX_REG] & SSE41_FLAG) != 0;

0 commit comments

Comments
 (0)