diff --git a/src/bitutils.c b/src/bitutils.c index f11734b..578bcad 100644 --- a/src/bitutils.c +++ b/src/bitutils.c @@ -11,7 +11,7 @@ #ifdef BIT_DISPATCH #include -#if defined(HAVE__GET_CPUID) +#if defined(USE__GET_CPUID) #include #else #include @@ -173,7 +173,7 @@ SupportsAvx512Popcount() { unsigned int exx[4] = {0, 0, 0, 0}; -#if defined(HAVE__GET_CPUID) +#if defined(USE__GET_CPUID) __get_cpuid(1, &exx[0], &exx[1], &exx[2], &exx[3]); #else __cpuid(exx, 1); @@ -187,7 +187,7 @@ SupportsAvx512Popcount() if ((_xgetbv(0) & 0xe6) != 0xe6) return false; -#if defined(HAVE__GET_CPUID) +#if defined(USE__GET_CPUID) __get_cpuid_count(7, 0, &exx[0], &exx[1], &exx[2], &exx[3]); #else __cpuidex(exx, 7, 0); diff --git a/src/halfutils.c b/src/halfutils.c index 6f499dd..d169094 100644 --- a/src/halfutils.c +++ b/src/halfutils.c @@ -6,7 +6,7 @@ #ifdef HALFVEC_DISPATCH #include -#if defined(HAVE__GET_CPUID) +#if defined(USE__GET_CPUID) #include #else #include @@ -254,7 +254,7 @@ SupportsCpuFeature(unsigned int feature) { unsigned int exx[4] = {0, 0, 0, 0}; -#if defined(HAVE__GET_CPUID) +#if defined(USE__GET_CPUID) __get_cpuid(1, &exx[0], &exx[1], &exx[2], &exx[3]); #else __cpuid(exx, 1); diff --git a/src/halfvec.h b/src/halfvec.h index f1d4888..a15f077 100644 --- a/src/halfvec.h +++ b/src/halfvec.h @@ -24,8 +24,8 @@ #endif /* Needed for cross-compiling / universal binaries on Mac */ -#if defined(USE_DISPATCH) && !defined(HAVE__GET_CPUID) && defined(__APPLE_CC__) -#define HAVE__GET_CPUID +#if defined(USE_DISPATCH) && (defined(HAVE__GET_CPUID) || defined(__APPLE_CC__)) +#define USE__GET_CPUID #endif #if defined(USE_DISPATCH)