15#ifdef HAVE_X86_64_POPCNTQ
17#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
21#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
25#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
47#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
73 unsigned int exx[4] = {0, 0, 0, 0};
75#if defined(HAVE__GET_CPUID)
77#elif defined(HAVE__CPUID)
80#error cpuid instruction not available
83 return (
exx[2] & (1 << 23)) != 0;
86#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
94 unsigned int exx[4] = {0, 0, 0, 0};
96#if defined(HAVE__GET_CPUID)
98#elif defined(HAVE__CPUID)
101#error cpuid instruction not available
103 return (
exx[2] & (1 << 27)) != 0;
112#ifdef HAVE_XSAVE_INTRINSICS
118#ifdef HAVE_XSAVE_INTRINSICS
119 return (
_xgetbv(0) & 0xe6) == 0xe6;
132 unsigned int exx[4] = {0, 0, 0, 0};
134#if defined(HAVE__GET_CPUID_COUNT)
136#elif defined(HAVE__CPUIDEX)
139#error cpuid instruction not available
141 return (
exx[2] & (1 << 14)) != 0 &&
142 (
exx[1] & (1 << 30)) != 0;
183#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
220#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
384#if SIZEOF_VOID_P >= 8
396 buf = (
const char *) words;
410 buf = (
const char *) words;
430#if SIZEOF_VOID_P >= 8
444 buf = (
const char *) words;
460 buf = (
const char *) words;
#define TYPEALIGN(ALIGNVAL, LEN)
#define pg_attribute_target(...)
#define TYPEALIGN_DOWN(ALIGNVAL, LEN)
uint64 pg_popcount_portable(const char *buf, int bytes)
uint64 pg_popcount_masked_optimized(const char *buf, int bytes, bits8 mask)
PGDLLIMPORT const uint8 pg_number_of_ones[256]
uint64 pg_popcount_masked_portable(const char *buf, int bytes, bits8 mask)
uint64 pg_popcount_optimized(const char *buf, int bytes)
int pg_popcount64(uint64 word)
int pg_popcount32(uint32 word)
int pg_popcount32_portable(uint32 word)
static uint64 pg_popcount_masked(const char *buf, int bytes, bits8 mask)
int pg_popcount64_portable(uint64 word)
static bool zmm_regs_available(void)
static char buf[DEFAULT_XLOG_SEG_SIZE]
static void word(struct vars *v, int dir, struct state *lp, struct state *rp)