mirror of https://github.com/AxioDL/zeus.git
Merge branch 'master' of ssh+git://git.axiodl.com/AxioDL/zeus
This commit is contained in:
commit
97cec53046
|
@ -54,7 +54,8 @@ void detectCPU() {
|
||||||
*reinterpret_cast<int*>((char*)g_cpuFeatures.cpuVendor + 4) = regs[3];
|
*reinterpret_cast<int*>((char*)g_cpuFeatures.cpuVendor + 4) = regs[3];
|
||||||
*reinterpret_cast<int*>((char*)g_cpuFeatures.cpuVendor + 8) = regs[2];
|
*reinterpret_cast<int*>((char*)g_cpuFeatures.cpuVendor + 8) = regs[2];
|
||||||
getCpuInfo(0x80000000, regs);
|
getCpuInfo(0x80000000, regs);
|
||||||
if (regs[0] >= 0x80000004) {
|
int maxExtended = regs[0];
|
||||||
|
if (maxExtended >= 0x80000004) {
|
||||||
for (unsigned int i = 0x80000002; i <= 0x80000004; i++) {
|
for (unsigned int i = 0x80000002; i <= 0x80000004; i++) {
|
||||||
getCpuInfo(i, regs);
|
getCpuInfo(i, regs);
|
||||||
// Interpret CPU brand string and cache information.
|
// Interpret CPU brand string and cache information.
|
||||||
|
@ -84,6 +85,11 @@ void detectCPU() {
|
||||||
memset((bool*)&g_cpuFeatures.AVX2, ((regs[1] & 0x00000020) != 0), 1);
|
memset((bool*)&g_cpuFeatures.AVX2, ((regs[1] & 0x00000020) != 0), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (maxExtended >= 0x80000001) {
|
||||||
|
getCpuInfo(0x80000001, regs);
|
||||||
|
memset((bool*)&g_cpuFeatures.SSE4a, ((regs[2] & (1 << 6)) != 0), 1);
|
||||||
|
}
|
||||||
|
|
||||||
isCPUInit = true;
|
isCPUInit = true;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue