]> gcc.gnu.org Git - gcc.git/commitdiff
x86: Require AVX for F16C and VAES
authorH.J. Lu <hjl.tools@gmail.com>
Fri, 10 Jun 2022 18:22:00 +0000 (11:22 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Tue, 14 Jun 2022 13:49:50 +0000 (06:49 -0700)
Since F16C and VAES are only usable with AVX, require AVX for F16C and
VAES.

libgcc/105920
* common/config/i386/cpuinfo.h (get_available_features): Require
AVX for F16C and VAES.

(cherry picked from commit 751f306688508b08842d0ab967dee8e6c3b91351)

gcc/common/config/i386/cpuinfo.h

index 58294b7d7ac71161c10dcf089551ee8422b77af2..18ff71ac5ad03968bb36926c864a53de22328a86 100644 (file)
@@ -606,8 +606,6 @@ get_available_features (struct __processor_model *cpu_model,
     set_feature (FEATURE_MOVBE);
   if (ecx & bit_AES)
     set_feature (FEATURE_AES);
-  if (ecx & bit_F16C)
-    set_feature (FEATURE_F16C);
   if (ecx & bit_RDRND)
     set_feature (FEATURE_RDRND);
   if (ecx & bit_XSAVE)
@@ -618,6 +616,8 @@ get_available_features (struct __processor_model *cpu_model,
        set_feature (FEATURE_AVX);
       if (ecx & bit_FMA)
        set_feature (FEATURE_FMA);
+      if (ecx & bit_F16C)
+       set_feature (FEATURE_F16C);
     }
 
   /* Get Advanced Features at level 7 (eax = 7, ecx = 0/1). */
@@ -638,6 +638,8 @@ get_available_features (struct __processor_model *cpu_model,
            set_feature (FEATURE_AVX2);
          if (ecx & bit_VPCLMULQDQ)
            set_feature (FEATURE_VPCLMULQDQ);
+         if (ecx & bit_VAES)
+           set_feature (FEATURE_VAES);
        }
       if (ebx & bit_BMI2)
        set_feature (FEATURE_BMI2);
@@ -660,8 +662,6 @@ get_available_features (struct __processor_model *cpu_model,
        set_feature (FEATURE_PKU);
       if (ecx & bit_RDPID)
        set_feature (FEATURE_RDPID);
-      if (ecx & bit_VAES)
-       set_feature (FEATURE_VAES);
       if (ecx & bit_GFNI)
        set_feature (FEATURE_GFNI);
       if (ecx & bit_MOVDIRI)
This page took 0.057092 seconds and 5 git commands to generate.