Detect and enable LSX/LASX on LoongArch based on compiler predefined macros.

This commit is contained in:
Wang, Xiang
2025-07-06 21:49:59 +08:00
committed by GitHub
parent d094e22b65
commit 58770bd163
+8 -2
View File
@@ -81,9 +81,15 @@
//https://github.com/gcc-mirror/gcc/blob/master/gcc/config/loongarch/loongarch-c.cc //https://github.com/gcc-mirror/gcc/blob/master/gcc/config/loongarch/loongarch-c.cc
#define PPSSPP_ARCH_LOONGARCH64 1 #define PPSSPP_ARCH_LOONGARCH64 1
#define PPSSPP_ARCH_64BIT 1 #define PPSSPP_ARCH_64BIT 1
#define PPSSPP_ARCH_LOONGARCH64_LSX 1
#endif
#if defined(__loongarch_asx)
#define PPSSPP_ARCH_LOONGARCH64_LASX 1
#endif
#if defined(__loongarch_asx) || defined(__loongarch_sx)
#define PPSSPP_ARCH_LOONGARCH64_LSX 1
#endif
#endif
// PLATFORM defines // PLATFORM defines
#if defined(_WIN32) #if defined(_WIN32)
// Covers both 32 and 64bit Windows // Covers both 32 and 64bit Windows