diff --git a/libs/pbd/fpu.cc b/libs/pbd/fpu.cc index a0013fee57..0d4a3f9a49 100644 --- a/libs/pbd/fpu.cc +++ b/libs/pbd/fpu.cc @@ -33,12 +33,15 @@ #include #endif -#ifdef PLATFORM_WINDOWS -#include -#elif defined(__GNUC__) || defined(__clang__) -#include -#else -#error "Unsupported compiler: need __cpuid and __cpuidex for CPU detection" +/* x86 CPU - need __cpuid to query flags */ +#if (defined __x86_64__) || (defined __i386__) || (defined _M_X64) || (defined _M_IX86) +# ifdef PLATFORM_WINDOWS +# include +# elif defined(__GNUC__) || defined(__clang__) +# include +# else +# error "Unsupported compiler: need __cpuid and __cpuidex for CPU detection" +# endif #endif #include "pbd/compose.h" @@ -52,8 +55,7 @@ using namespace std; FPU* FPU::_instance (0); -#if ( (defined __x86_64__) || (defined __i386__) || (defined _M_X64) || (defined _M_IX86) ) // ARCH_X86 - +#if (defined __x86_64__) || (defined __i386__) || (defined _M_X64) || (defined _M_IX86) #ifdef PLATFORM_WINDOWS /* Use MSVC/mingw intrinsic to get CPUID */ static void cpuid(int reg[4], int cpuid_leaf)