#include "../../zbuild.h"
#include "x86_features.h"
-#ifdef _WIN32
+#ifdef _MSC_VER
# include <intrin.h>
#else
// Newer versions of GCC and clang come with cpuid.h
#include <string.h>
static inline void cpuid(int info, unsigned* eax, unsigned* ebx, unsigned* ecx, unsigned* edx) {
-#ifdef _WIN32
+#ifdef _MSC_VER
unsigned int registers[4];
__cpuid((int *)registers, info);
}
static inline void cpuidex(int info, int subinfo, unsigned* eax, unsigned* ebx, unsigned* ecx, unsigned* edx) {
-#ifdef _WIN32
+#ifdef _MSC_VER
unsigned int registers[4];
__cpuidex((int *)registers, info, subinfo);
}
static inline uint64_t xgetbv(unsigned int xcr) {
-#ifdef _WIN32
+#ifdef _MSC_VER
return _xgetbv(xcr);
#else
uint32_t eax, edx;
check_xsave_intrinsics() {
# Check whether compiler supports XSAVE intrinsics
cat > $test.c << EOF
-#ifdef _WIN32
+#ifdef _MSC_VER
# include <intrin.h>
#else
# include <x86gprintrin.h>