aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2020-05-19 14:42:12 -0700
committerH.J. Lu <hjl.tools@gmail.com>2020-05-19 14:42:22 -0700
commit453954451be68d22462442268a29f54809182d2b (patch)
tree6d6bc2e593ce79f784e3cb700200b96a4dc01374
parent74744bb1f2847b5b9ce3e97e0fec9c23bb0e499f (diff)
downloadgcc-453954451be68d22462442268a29f54809182d2b.zip
gcc-453954451be68d22462442268a29f54809182d2b.tar.gz
gcc-453954451be68d22462442268a29f54809182d2b.tar.bz2
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. 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.
-rw-r--r--libgcc/ChangeLog9
-rw-r--r--libgcc/config/i386/cpuinfo.c6
-rw-r--r--libgcc/config/i386/cpuinfo.h1
3 files changed, 14 insertions, 2 deletions
diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog
index 7343c77..64c3bb1 100644
--- a/libgcc/ChangeLog
+++ b/libgcc/ChangeLog
@@ -1,3 +1,12 @@
+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-15 H.J. Lu <hongjiu.lu@intel.com>
PR bootstrap/95147
diff --git a/libgcc/config/i386/cpuinfo.c b/libgcc/config/i386/cpuinfo.c
index 00322c5..26c1bdc 100644
--- a/libgcc/config/i386/cpuinfo.c
+++ b/libgcc/config/i386/cpuinfo.c
@@ -349,6 +349,8 @@ get_available_features (unsigned int ecx, unsigned int edx,
}
if (ebx & bit_BMI2)
set_feature (FEATURE_BMI2);
+ if (ecx & bit_GFNI)
+ set_feature (FEATURE_GFNI);
if (avx512_usable)
{
if (ebx & bit_AVX512F)
@@ -371,8 +373,6 @@ get_available_features (unsigned int ecx, unsigned int edx,
set_feature (FEATURE_AVX512VBMI);
if (ecx & bit_AVX512VBMI2)
set_feature (FEATURE_AVX512VBMI2);
- if (ecx & bit_GFNI)
- set_feature (FEATURE_GFNI);
if (ecx & bit_VPCLMULQDQ)
set_feature (FEATURE_VPCLMULQDQ);
if (ecx & bit_AVX512VNNI)
@@ -385,6 +385,8 @@ get_available_features (unsigned int ecx, unsigned int edx,
set_feature (FEATURE_AVX5124VNNIW);
if (edx & bit_AVX5124FMAPS)
set_feature (FEATURE_AVX5124FMAPS);
+ if (edx & bit_AVX512VP2INTERSECT)
+ set_feature (FEATURE_AVX512VP2INTERSECT);
__cpuid_count (7, 1, eax, ebx, ecx, edx);
if (eax & bit_AVX512BF16)
diff --git a/libgcc/config/i386/cpuinfo.h b/libgcc/config/i386/cpuinfo.h
index 41c4a49..fd6d12a 100644
--- a/libgcc/config/i386/cpuinfo.h
+++ b/libgcc/config/i386/cpuinfo.h
@@ -122,6 +122,7 @@ enum processor_features
FEATURE_VPCLMULQDQ,
FEATURE_AVX512VNNI,
FEATURE_AVX512BITALG,
+ FEATURE_AVX512VP2INTERSECT,
FEATURE_AVX512BF16
};