summaryrefslogtreecommitdiffstats
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
parentRISC-V: bitmanip: improve constant-loading for (1ULL << 31) in DImode (diff)
downloadgcc-4b06b7304066fb1016e017d15e189f2e745dceae.tar.gz
gcc-4b06b7304066fb1016e017d15e189f2e745dceae.tar.bz2
gcc-4b06b7304066fb1016e017d15e189f2e745dceae.tar.xz
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)
-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 239759dc766..4abd5480d28 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,
612 set_feature (FEATURE_MOVBE); 612 set_feature (FEATURE_MOVBE);
613 if (ecx & bit_AES) 613 if (ecx & bit_AES)
614 set_feature (FEATURE_AES); 614 set_feature (FEATURE_AES);
615 if (ecx & bit_F16C)
616 set_feature (FEATURE_F16C);
617 if (ecx & bit_RDRND) 615 if (ecx & bit_RDRND)
618 set_feature (FEATURE_RDRND); 616 set_feature (FEATURE_RDRND);
619 if (ecx & bit_XSAVE) 617 if (ecx & bit_XSAVE)
@@ -624,6 +622,8 @@ get_available_features (struct __processor_model *cpu_model,
624 set_feature (FEATURE_AVX); 622 set_feature (FEATURE_AVX);
625 if (ecx & bit_FMA) 623 if (ecx & bit_FMA)
626 set_feature (FEATURE_FMA); 624 set_feature (FEATURE_FMA);
625 if (ecx & bit_F16C)
626 set_feature (FEATURE_F16C);
627 } 627 }
628 628
629 /* Get Advanced Features at level 7 (eax = 7, ecx = 0/1). */ 629 /* Get Advanced Features at level 7 (eax = 7, ecx = 0/1). */
@@ -644,6 +644,8 @@ get_available_features (struct __processor_model *cpu_model,
644 set_feature (FEATURE_AVX2); 644 set_feature (FEATURE_AVX2);
645 if (ecx & bit_VPCLMULQDQ) 645 if (ecx & bit_VPCLMULQDQ)
646 set_feature (FEATURE_VPCLMULQDQ); 646 set_feature (FEATURE_VPCLMULQDQ);
647 if (ecx & bit_VAES)
648 set_feature (FEATURE_VAES);
647 } 649 }
648 if (ebx & bit_BMI2) 650 if (ebx & bit_BMI2)
649 set_feature (FEATURE_BMI2); 651 set_feature (FEATURE_BMI2);
@@ -666,8 +668,6 @@ get_available_features (struct __processor_model *cpu_model,
666 set_feature (FEATURE_PKU); 668 set_feature (FEATURE_PKU);
667 if (ecx & bit_RDPID) 669 if (ecx & bit_RDPID)
668 set_feature (FEATURE_RDPID); 670 set_feature (FEATURE_RDPID);
669 if (ecx & bit_VAES)
670 set_feature (FEATURE_VAES);
671 if (ecx & bit_GFNI) 671 if (ecx & bit_GFNI)
672 set_feature (FEATURE_GFNI); 672 set_feature (FEATURE_GFNI);
673 if (ecx & bit_MOVDIRI) 673 if (ecx & bit_MOVDIRI)