From 1f7ab970e83984d2704d4a4278b3e6fa2e445bea Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 29 Oct 2015 20:48:31 -0400 Subject: [PATCH] [RSP] Disable __cpuid() detection for non-MSVC compiles. --- Source/RSP/Main.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Source/RSP/Main.cpp b/Source/RSP/Main.cpp index 25dd4f6d7..82e00ac73 100644 --- a/Source/RSP/Main.cpp +++ b/Source/RSP/Main.cpp @@ -272,8 +272,9 @@ void DetectCpuSpecs(void) DWORD Intel_Features = 0; DWORD AMD_Features = 0; +#if defined(_MSC_VER) __try { -#if defined(_M_IX86) && defined(_MSC_VER) +#ifdef _M_IX86 _asm { /* Intel features */ mov eax, 1 @@ -296,6 +297,13 @@ void DetectCpuSpecs(void) __except (EXCEPTION_EXECUTE_HANDLER) { AMD_Features = Intel_Features = 0; } +#else +/* + * To do: With GCC, there is , but __cpuid() there is a macro and + * needs five arguments, not two. Also, GCC lacks SEH. + */ + AMD_Features = Intel_Features = 0; +#endif if (Intel_Features & 0x02000000) {