From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1039) id C5ABC385780F; Mon, 13 Jun 2022 20:27:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C5ABC385780F MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: H.J. Lu To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-1074] x86: Require AVX for F16C and VAES X-Act-Checkin: gcc X-Git-Author: H.J. Lu X-Git-Refname: refs/heads/master X-Git-Oldrev: 254e88b3d7e8abcc236be3451609834371cf4d5d X-Git-Newrev: 751f306688508b08842d0ab967dee8e6c3b91351 Message-Id: <20220613202755.C5ABC385780F@sourceware.org> Date: Mon, 13 Jun 2022 20:27:55 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jun 2022 20:27:55 -0000 https://gcc.gnu.org/g:751f306688508b08842d0ab967dee8e6c3b91351 commit r13-1074-g751f306688508b08842d0ab967dee8e6c3b91351 Author: H.J. Lu 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. 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 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)