summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/source/misc/cpuid.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/source/misc/cpuid.cxx b/tools/source/misc/cpuid.cxx
index 41791be27897..e2a8e20a762a 100644
--- a/tools/source/misc/cpuid.cxx
+++ b/tools/source/misc/cpuid.cxx
@@ -15,7 +15,7 @@ namespace cpuid {
namespace {
-#if defined(_MSC_VER)
+#if defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_AMD64))
#include <intrin.h>
void getCpuId(uint32_t array[4], uint32_t nInfoType)
{
@@ -38,7 +38,7 @@ void getCpuId(uint32_t array[4], uint32_t /*nInfoType*/)
bool checkAVXSupportInOS()
{
uint32_t xcr0 = 0;
-#if defined(_MSC_VER)
+#if defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_AMD64))
xcr0 = uint32_t(_xgetbv(0));
#elif (defined(__i386__) || defined(__x86_64__))
__asm__("xgetbv" : "=a" (xcr0) : "c" (0) : "%edx");