Use _M_IX86 and _M_X64 to indicate MSVC x86/x64
_WIN32 is defined on ARM MinGW as well, which breaks current assumptions
This commit is contained in:
@@ -96,7 +96,7 @@ static int host_cpu_features(void)
|
||||
static int features = 0;
|
||||
static int features_detected = 0;
|
||||
/* 32-bit only */
|
||||
#if defined(__i386__) || (defined(_MSC_VER) && defined(_WIN32))
|
||||
#if defined(__i386__) || (defined(_MSC_VER) && defined(_M_IX86))
|
||||
unsigned long temp1, temp2;
|
||||
#endif
|
||||
|
||||
@@ -104,7 +104,7 @@ static int host_cpu_features(void)
|
||||
return features;
|
||||
features_detected = 1;
|
||||
|
||||
#if defined(_MSC_VER) && defined(_WIN32) /* MSVC compatible assembly appropriate for 32-bit Windows */
|
||||
#if defined(_MSC_VER) && defined(_M_IX86) /* MSVC compatible assembly appropriate for 32-bit Windows */
|
||||
/* see if we are dealing with a cpu that has the cpuid instruction */
|
||||
__asm {
|
||||
pushf
|
||||
@@ -127,7 +127,7 @@ static int host_cpu_features(void)
|
||||
:
|
||||
: "eax");
|
||||
#endif
|
||||
#if defined(__i386__) || (defined(_MSC_VER) && defined(_WIN32))
|
||||
#if defined(__i386__) || (defined(_MSC_VER) && defined(_M_IX86))
|
||||
temp1 &= 0x200000;
|
||||
temp2 &= 0x200000;
|
||||
if (temp1 == temp2) {
|
||||
|
||||
Reference in New Issue
Block a user