x86: Update VPCLMULQDQ check
authorH.J. Lu <hjl.tools@gmail.com>
Wed, 20 May 2020 01:55:08 +0000 (18:55 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Wed, 20 May 2020 11:12:58 +0000 (04:12 -0700)
Update VPCLMULQDQ check to support processors with AVX version of
VPCLMULQDQ.

PR target/91695
* config/i386/cpuinfo.c (get_available_features): Fix VPCLMULQDQ
check.

libgcc/config/i386/cpuinfo.c

index 26c1bdca3618df9e7b7f203916ac31fab5857ed3..cf5f0884bb4b2f04de4e85ca1e198c009759894d 100644 (file)
@@ -346,6 +346,8 @@ get_available_features (unsigned int ecx, unsigned int edx,
        {
          if (ebx & bit_AVX2)
            set_feature (FEATURE_AVX2);
+         if (ecx & bit_VPCLMULQDQ)
+           set_feature (FEATURE_VPCLMULQDQ);
        }
       if (ebx & bit_BMI2)
        set_feature (FEATURE_BMI2);
@@ -373,8 +375,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_VPCLMULQDQ)
-           set_feature (FEATURE_VPCLMULQDQ);
          if (ecx & bit_AVX512VNNI)
            set_feature (FEATURE_AVX512VNNI);
          if (ecx & bit_AVX512BITALG)