mirror of
https://github.com/shadps4-emu/ext-cryptopp.git
synced 2024-11-23 18:09:48 +00:00
Use fallback in detecting VIA cach line size
This commit is contained in:
parent
40e5891635
commit
c91813c0b4
8
cpu.cpp
8
cpu.cpp
@ -458,6 +458,14 @@ void DetectX86Features()
|
||||
CpuId(0xC0000005, 0, cpuid2);
|
||||
g_cacheLineSize = GETBYTE(cpuid2[2] /*ECX*/, 0);
|
||||
}
|
||||
#if defined(_SC_LEVEL1_DCACHE_LINESIZE)
|
||||
else
|
||||
{
|
||||
int cacheLineSize = sysconf(_SC_LEVEL1_DCACHE_LINESIZE);
|
||||
if (cacheLineSize > 0)
|
||||
g_cacheLineSize = cacheLineSize;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
if (g_cacheLineSize == 0)
|
||||
|
Loading…
Reference in New Issue
Block a user