public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r11-10063] x86: Require AVX for F16C and VAES
@ 2022-06-14 13:49 H.J. Lu
0 siblings, 0 replies; only message in thread
From: H.J. Lu @ 2022-06-14 13:49 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:30c1cde3adec938606cd49b1b4a262590b496719
commit r11-10063-g30c1cde3adec938606cd49b1b4a262590b496719
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Fri Jun 10 11:22:00 2022 -0700
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)
Diff:
---
gcc/common/config/i386/cpuinfo.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/gcc/common/config/i386/cpuinfo.h b/gcc/common/config/i386/cpuinfo.h
index 58294b7d7ac..18ff71ac5ad 100644
--- a/gcc/common/config/i386/cpuinfo.h
+++ b/gcc/common/config/i386/cpuinfo.h
@@ -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)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-06-14 13:49 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-14 13:49 [gcc r11-10063] x86: Require AVX for F16C and VAES H.J. Lu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).