mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-12-05 20:24:01 +01:00
M1: Correctly detect core count.
This commit is contained in:
1 parent
20d579c3b8
commit
9c8feefcdc
2 files changed
+24
-4
No files matched your search
@@ -35,6 +35,7 @@
|
||||
#include "Common/StringUtils.h"
|
||||
|
||||
#if defined(_WIN32) && !defined(__MINGW32__)
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <Windows.h>
|
||||
#define _interlockedbittestandset workaround_ms_header_bug_platform_sdk6_set
|
||||
@@ -53,7 +54,8 @@ void do_cpuidex(u32 regs[4], u32 cpuid_leaf, u32 ecxval) {
|
||||
void do_cpuid(u32 regs[4], u32 cpuid_leaf) {
|
||||
__cpuid((int *)regs, cpuid_leaf);
|
||||
}
|
||||
#else
|
||||
|
||||
#else // _WIN32
|
||||
|
||||
#ifdef _M_SSE
|
||||
#include <emmintrin.h>
|
||||
@@ -68,7 +70,7 @@ static unsigned long long _xgetbv(unsigned int index)
|
||||
|
||||
#else
|
||||
#define _XCR_XFEATURE_ENABLED_MASK 0
|
||||
#endif
|
||||
#endif // _M_SSE
|
||||
|
||||
#if !defined(MIPS)
|
||||
|
||||
@@ -92,8 +94,10 @@ void do_cpuid(u32 regs[4], u32 cpuid_leaf)
|
||||
do_cpuidex(regs, cpuid_leaf, 0);
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
#endif // !defined(MIPS)
|
||||
|
||||
#endif // !win32
|
||||
|
||||
|
||||
CPUInfo cpu_info;
|
||||
|
||||
|
||||
Reference in new issue
Block a user