Commit e54fa81e by H.J. Lu

x86: Add FEATURE_AVX512VP2INTERSECT and update GFNI check

Add FEATURE_AVX512VP2INTERSECT to libgcc so that enum processor_features
in libgcc matches enum processor_features in i386-builtins.c.  Update
GFNI check to support processors with SSE and AVX versions of GFNI.

	Backport from master
	PR target/95212
	PR target/95220
	* config/i386/cpuinfo.c (get_available_features): Fix
	FEATURE_GFNI check.  Also check FEATURE_AVX512VP2INTERSECT.
	* config/i386/cpuinfo.h (processor_features): Add
	FEATURE_AVX512VP2INTERSECT.
parent 5ca86398
2020-05-19 H.J. Lu <hongjiu.lu@intel.com>
Backport from master
2020-05-19 H.J. Lu <hongjiu.lu@intel.com>
PR target/95212
PR target/95220
* config/i386/cpuinfo.c (get_available_features): Fix
FEATURE_GFNI check. Also check FEATURE_AVX512VP2INTERSECT.
* config/i386/cpuinfo.h (processor_features): Add
FEATURE_AVX512VP2INTERSECT.
2020-05-07 Release Manager 2020-05-07 Release Manager
* GCC 10.1.0 released. * GCC 10.1.0 released.
......
...@@ -349,6 +349,8 @@ get_available_features (unsigned int ecx, unsigned int edx, ...@@ -349,6 +349,8 @@ get_available_features (unsigned int ecx, unsigned int edx,
} }
if (ebx & bit_BMI2) if (ebx & bit_BMI2)
set_feature (FEATURE_BMI2); set_feature (FEATURE_BMI2);
if (ecx & bit_GFNI)
set_feature (FEATURE_GFNI);
if (avx512_usable) if (avx512_usable)
{ {
if (ebx & bit_AVX512F) if (ebx & bit_AVX512F)
...@@ -371,8 +373,6 @@ get_available_features (unsigned int ecx, unsigned int edx, ...@@ -371,8 +373,6 @@ get_available_features (unsigned int ecx, unsigned int edx,
set_feature (FEATURE_AVX512VBMI); set_feature (FEATURE_AVX512VBMI);
if (ecx & bit_AVX512VBMI2) if (ecx & bit_AVX512VBMI2)
set_feature (FEATURE_AVX512VBMI2); set_feature (FEATURE_AVX512VBMI2);
if (ecx & bit_GFNI)
set_feature (FEATURE_GFNI);
if (ecx & bit_VPCLMULQDQ) if (ecx & bit_VPCLMULQDQ)
set_feature (FEATURE_VPCLMULQDQ); set_feature (FEATURE_VPCLMULQDQ);
if (ecx & bit_AVX512VNNI) if (ecx & bit_AVX512VNNI)
...@@ -385,6 +385,8 @@ get_available_features (unsigned int ecx, unsigned int edx, ...@@ -385,6 +385,8 @@ get_available_features (unsigned int ecx, unsigned int edx,
set_feature (FEATURE_AVX5124VNNIW); set_feature (FEATURE_AVX5124VNNIW);
if (edx & bit_AVX5124FMAPS) if (edx & bit_AVX5124FMAPS)
set_feature (FEATURE_AVX5124FMAPS); set_feature (FEATURE_AVX5124FMAPS);
if (edx & bit_AVX512VP2INTERSECT)
set_feature (FEATURE_AVX512VP2INTERSECT);
__cpuid_count (7, 1, eax, ebx, ecx, edx); __cpuid_count (7, 1, eax, ebx, ecx, edx);
if (eax & bit_AVX512BF16) if (eax & bit_AVX512BF16)
......
...@@ -122,6 +122,7 @@ enum processor_features ...@@ -122,6 +122,7 @@ enum processor_features
FEATURE_VPCLMULQDQ, FEATURE_VPCLMULQDQ,
FEATURE_AVX512VNNI, FEATURE_AVX512VNNI,
FEATURE_AVX512BITALG, FEATURE_AVX512BITALG,
FEATURE_AVX512VP2INTERSECT,
FEATURE_AVX512BF16 FEATURE_AVX512BF16
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment