From bab2461a4841c7cf271b3741843b18e4f0de780d Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sat, 29 Apr 2023 10:13:46 -0700 Subject: [PATCH] Windows: Use cpu_features on arm64. It's now supported. --- Common/ArmCPUDetect.cpp | 6 +++--- UWP/cpu_features_UWP/cpu_features_UWP.vcxproj | 1 + UWP/cpu_features_UWP/cpu_features_UWP.vcxproj.filters | 3 +++ ext/cpu_features.vcxproj | 1 + ext/cpu_features.vcxproj.filters | 3 +++ libretro/Makefile.common | 1 + 6 files changed, 12 insertions(+), 3 deletions(-) diff --git a/Common/ArmCPUDetect.cpp b/Common/ArmCPUDetect.cpp index 4742e2b862..f19d186c8b 100644 --- a/Common/ArmCPUDetect.cpp +++ b/Common/ArmCPUDetect.cpp @@ -32,10 +32,10 @@ #if defined(CPU_FEATURES_OS_LINUX) || defined(CPU_FEATURES_OS_ANDROID) #define USE_CPU_FEATURES 1 #endif -#elif PPSSPP_ARCH(ARM64) && defined(__aarch64__) +#elif PPSSPP_ARCH(ARM64) #include "ext/cpu_features/include/cpuinfo_aarch64.h" -#if defined(CPU_FEATURES_OS_LINUX) || defined(CPU_FEATURES_OS_ANDROID) +#if defined(CPU_FEATURES_OS_LINUX) || defined(CPU_FEATURES_OS_ANDROID) || defined(CPU_FEATURES_OS_WINDOWS) #define USE_CPU_FEATURES 1 #endif #endif @@ -54,7 +54,7 @@ std::string GetCPUBrandString(); #else // No CPUID on ARM, so we'll have to read the registry -#include +#include "Common/CommonWindows.h" std::string GetCPUBrandString() { std::string cpu_string; diff --git a/UWP/cpu_features_UWP/cpu_features_UWP.vcxproj b/UWP/cpu_features_UWP/cpu_features_UWP.vcxproj index 6dcea065c8..cea54495a9 100644 --- a/UWP/cpu_features_UWP/cpu_features_UWP.vcxproj +++ b/UWP/cpu_features_UWP/cpu_features_UWP.vcxproj @@ -296,6 +296,7 @@ + diff --git a/UWP/cpu_features_UWP/cpu_features_UWP.vcxproj.filters b/UWP/cpu_features_UWP/cpu_features_UWP.vcxproj.filters index d0acee9d45..d0b95fcfed 100644 --- a/UWP/cpu_features_UWP/cpu_features_UWP.vcxproj.filters +++ b/UWP/cpu_features_UWP/cpu_features_UWP.vcxproj.filters @@ -110,6 +110,9 @@ Source Files + + Source Files + Source Files diff --git a/ext/cpu_features.vcxproj b/ext/cpu_features.vcxproj index a0eddbd869..d5bb234278 100644 --- a/ext/cpu_features.vcxproj +++ b/ext/cpu_features.vcxproj @@ -359,6 +359,7 @@ + diff --git a/ext/cpu_features.vcxproj.filters b/ext/cpu_features.vcxproj.filters index b3ea5f4452..9deba5386e 100644 --- a/ext/cpu_features.vcxproj.filters +++ b/ext/cpu_features.vcxproj.filters @@ -111,6 +111,9 @@ Source Files + + Source Files + Source Files diff --git a/libretro/Makefile.common b/libretro/Makefile.common index e5d39bc963..f00e5cb46b 100644 --- a/libretro/Makefile.common +++ b/libretro/Makefile.common @@ -207,6 +207,7 @@ endif SOURCES_C += \ $(EXTDIR)/cpu_features/src/filesystem.c \ $(EXTDIR)/cpu_features/src/impl_aarch64_linux_or_android.c \ + $(EXTDIR)/cpu_features/src/impl_aarch64_windows.c \ $(EXTDIR)/cpu_features/src/impl_arm_linux_or_android.c \ $(EXTDIR)/cpu_features/src/impl_mips_linux_or_android.c \ $(EXTDIR)/cpu_features/src/impl_ppc_linux.c \