23#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
27#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
31#ifdef HAVE_XSAVE_INTRINSICS
43#ifdef HAVE_XSAVE_INTRINSICS
49#ifdef HAVE_XSAVE_INTRINSICS
50 return (
_xgetbv(0) & 0xe6) == 0xe6;
63 unsigned int exx[4] = {0, 0, 0, 0};
69#ifdef USE_SSE42_CRC32C_WITH_RUNTIME_CHECK
73#if defined(HAVE__GET_CPUID)
75#elif defined(HAVE__CPUID)
78#error cpuid instruction not available
81 if ((
exx[2] & (1 << 20)) != 0)
85 if (
exx[2] & (1 << 27) &&
92#if defined(HAVE__GET_CPUID_COUNT)
94#elif defined(HAVE__CPUIDEX)
98#ifdef USE_AVX512_CRC32C_WITH_RUNTIME_CHECK
99 if (
exx[2] & (1 << 10) &&
#define pg_attribute_target(...)
pg_crc32c pg_comp_crc32c_sb8(pg_crc32c crc, const void *data, size_t len)
static bool zmm_regs_available(void)
pg_crc32c(* pg_comp_crc32c)(pg_crc32c crc, const void *data, size_t len)
static pg_crc32c pg_comp_crc32c_choose(pg_crc32c crc, const void *data, size_t len)