aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2022-06-10 11:22:00 -0700
committerH.J. Lu <hjl.tools@gmail.com>2022-06-14 06:48:55 -0700
commit4b06b7304066fb1016e017d15e189f2e745dceae (patch)
treeb12980d6682d365c26bb46c2d7aa93ad18a42d94 /gcc
parent65d121507de7c2bf711b383befd2ba7af8115de1 (diff)
downloadgcc-4b06b7304066fb1016e017d15e189f2e745dceae.zip
gcc-4b06b7304066fb1016e017d15e189f2e745dceae.tar.gz
gcc-4b06b7304066fb1016e017d15e189f2e745dceae.tar.bz2
x86: Require AVX for F16C and VAES
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)
Diffstat (limited to 'gcc')
-rw-r--r--gcc/common/config/i386/cpuinfo.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/common/config/i386/cpuinfo.h b/gcc/common/config/i386/cpuinfo.h
index 239759d..4abd548 100644
--- a/gcc/common/config/i386/cpuinfo.h
+++ b/gcc/common/config/i386/cpuinfo.h
@@ -612,8 +612,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)
@@ -624,6 +622,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). */
@@ -644,6 +644,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);
@@ -666,8 +668,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)