mirror of
https://github.com/cuberite/libdeflate.git
synced 2025-09-09 12:16:42 -04:00
lib/x86/cpu_features: rename PCLMULQDQ feature bit to PCLMUL
This is less unwieldy and is consistent with "DISPATCH_PCLMUL" and with the "-mno-pclmul" compiler flag.
This commit is contained in:
parent
82037908c7
commit
f23fd6ca7f
@ -97,7 +97,7 @@ void setup_cpu_features(void)
|
||||
features |= X86_CPU_FEATURE_SSE2;
|
||||
|
||||
if (IS_SET(features_2, 1))
|
||||
features |= X86_CPU_FEATURE_PCLMULQDQ;
|
||||
features |= X86_CPU_FEATURE_PCLMUL;
|
||||
|
||||
if (IS_SET(features_2, 27)) { /* OSXSAVE set? */
|
||||
u64 xcr0 = read_xcr(0);
|
||||
|
@ -17,7 +17,7 @@
|
||||
#if X86_CPU_FEATURES_ENABLED
|
||||
|
||||
#define X86_CPU_FEATURE_SSE2 0x00000001
|
||||
#define X86_CPU_FEATURE_PCLMULQDQ 0x00000002
|
||||
#define X86_CPU_FEATURE_PCLMUL 0x00000002
|
||||
#define X86_CPU_FEATURE_AVX 0x00000004
|
||||
#define X86_CPU_FEATURE_AVX2 0x00000008
|
||||
#define X86_CPU_FEATURE_BMI2 0x00000010
|
||||
|
@ -74,12 +74,12 @@ arch_select_crc32_func(void)
|
||||
u32 features = get_cpu_features();
|
||||
|
||||
#ifdef DISPATCH_PCLMUL_AVX
|
||||
if ((features & X86_CPU_FEATURE_PCLMULQDQ) &&
|
||||
if ((features & X86_CPU_FEATURE_PCLMUL) &&
|
||||
(features & X86_CPU_FEATURE_AVX))
|
||||
return crc32_pclmul_avx;
|
||||
#endif
|
||||
#ifdef DISPATCH_PCLMUL
|
||||
if (features & X86_CPU_FEATURE_PCLMULQDQ)
|
||||
if (features & X86_CPU_FEATURE_PCLMUL)
|
||||
return crc32_pclmul;
|
||||
#endif
|
||||
return NULL;
|
||||
|
Loading…
x
Reference in New Issue
Block a user