* [PATCH] x86: Require AVX for F16C and VAES
@ 2022-06-10 18:27 H.J. Lu
2022-06-11 19:24 ` Uros Bizjak
0 siblings, 1 reply; 2+ messages in thread
From: H.J. Lu @ 2022-06-10 18:27 UTC (permalink / raw)
To: Uros Bizjak; +Cc: gcc-patches, liuhongt
Since F16C and VAES are only usable with AVX, require AVX for F16C and
VAES.
OK for master and release branches?
Thanks.
H.J.
---
libgcc/105920
* common/config/i386/cpuinfo.h (get_available_features): Require
AVX for F16C and VAES.
---
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 adc02bc3d98..bbced8a23b9 100644
--- a/gcc/common/config/i386/cpuinfo.h
+++ b/gcc/common/config/i386/cpuinfo.h
@@ -651,8 +651,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)
@@ -663,6 +661,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). */
@@ -683,6 +683,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);
@@ -705,8 +707,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)
--
2.36.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] x86: Require AVX for F16C and VAES
2022-06-10 18:27 [PATCH] x86: Require AVX for F16C and VAES H.J. Lu
@ 2022-06-11 19:24 ` Uros Bizjak
0 siblings, 0 replies; 2+ messages in thread
From: Uros Bizjak @ 2022-06-11 19:24 UTC (permalink / raw)
To: H.J. Lu; +Cc: gcc-patches, liuhongt
On Fri, Jun 10, 2022 at 8:28 PM H.J. Lu <hjl.tools@gmail.com> wrote:
>
> Since F16C and VAES are only usable with AVX, require AVX for F16C and
> VAES.
>
> OK for master and release branches?
>
> Thanks.
>
> H.J.
> ---
> libgcc/105920
> * common/config/i386/cpuinfo.h (get_available_features): Require
> AVX for F16C and VAES.
OK.
Thanks,
Uros.
> ---
> 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 adc02bc3d98..bbced8a23b9 100644
> --- a/gcc/common/config/i386/cpuinfo.h
> +++ b/gcc/common/config/i386/cpuinfo.h
> @@ -651,8 +651,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)
> @@ -663,6 +661,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). */
> @@ -683,6 +683,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);
> @@ -705,8 +707,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)
> --
> 2.36.1
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-06-11 19:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-10 18:27 [PATCH] x86: Require AVX for F16C and VAES H.J. Lu
2022-06-11 19:24 ` Uros Bizjak
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).