From: Kirill Yukhin Date: Fri, 2 Oct 2015 15:25:26 +0000 (+0000) Subject: AVX-512. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ab91c076b76cce3f0e8eb767765c314c633dfaff;p=gcc.git AVX-512. AVX-512. Add missing features to cpuinfo.c gcc/ * config/i386/i386.c (processor_features): Add F_AVX512VBMI, F_AVX512IFMA. (isa_names_table): Handle F_AVX512VBMI and F_AVX512IFMA. libgcc/ * config/i386/cpuinfo.c (processor_features): Add FEATURE_AVX512VBMI and FEATURE_AVX512VBMI. testsuite/ * gcc.target/i386/builtin_target.c: Handle "avx512ifma" and "avx512vbmi". From-SVN: r228399 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0f6875c87a2..493a4a8b47a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2015-10-02 Kirill Yukhin + * config/i386/i386.c (processor_features): Add F_AVX512VBMI, + F_AVX512IFMA. + (isa_names_table): Handle F_AVX512VBMI and F_AVX512IFMA. + 2015-10-02 Ramana Radhakrishnan * config/aarch64/aarch64-elf.h (TARGET_ASM_NAMED_SECTION): Delete. diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 1ccc33e525c..171917536a0 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -36591,6 +36591,8 @@ fold_builtin_cpu (tree fndecl, tree *args) F_AVX512CD, F_AVX512ER, F_AVX512PF, + F_AVX512VBMI, + F_AVX512IFMA, F_MAX }; @@ -36699,6 +36701,8 @@ fold_builtin_cpu (tree fndecl, tree *args) {"avx512cd",F_AVX512CD}, {"avx512er",F_AVX512ER}, {"avx512pf",F_AVX512PF}, + {"avx512vbmi",F_AVX512VBMI}, + {"avx512ifma",F_AVX512IFMA}, }; tree __processor_model_type = build_processor_model_struct (); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index bceeaaa8b31..943227a8df8 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2015-10-02 Kirill Yukhin + + * gcc.target/i386/builtin_target.c: Handle "avx512ifma" + and "avx512vbmi". + 2015-10-02 Vladimir Makarov PR rtl-optimization/67756 diff --git a/gcc/testsuite/gcc.target/i386/builtin_target.c b/gcc/testsuite/gcc.target/i386/builtin_target.c index aff4559845c..a9a8753ce04 100644 --- a/gcc/testsuite/gcc.target/i386/builtin_target.c +++ b/gcc/testsuite/gcc.target/i386/builtin_target.c @@ -200,6 +200,10 @@ check_features (unsigned int ecx, unsigned int edx, assert (__builtin_cpu_supports ("avx512bw")); if (ebx & bit_AVX512DQ) assert (__builtin_cpu_supports ("avx512dq")); + if (ebx & bit_AVX512IFMA) + assert (__builtin_cpu_supports ("avx512ifma")); + if (ebx & bit_AVX512VBMI) + assert (__builtin_cpu_supports ("avx512vbmi")); } } diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index a2d39c07dfa..e534c6db959 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,8 @@ +2015-10-02 Kirill Yukhin + + * config/i386/cpuinfo.c (processor_features): Add + FEATURE_AVX512VBMI and FEATURE_AVX512VBMI. + 2015-09-28 Joseph Myers * soft-fp/adddf3.c: Update from glibc. diff --git a/libgcc/config/i386/cpuinfo.c b/libgcc/config/i386/cpuinfo.c index ddb49e3ad9a..40ed84cf6cb 100644 --- a/libgcc/config/i386/cpuinfo.c +++ b/libgcc/config/i386/cpuinfo.c @@ -110,7 +110,9 @@ enum processor_features FEATURE_AVX512DQ, FEATURE_AVX512CD, FEATURE_AVX512ER, - FEATURE_AVX512PF + FEATURE_AVX512PF, + FEATURE_AVX512VBMI, + FEATURE_AVX512IFMA }; struct __processor_model @@ -336,6 +338,10 @@ get_available_features (unsigned int ecx, unsigned int edx, features |= (1 << FEATURE_AVX512PF); if (ebx & bit_AVX512ER) features |= (1 << FEATURE_AVX512ER); + if (ebx & bit_AVX512IFMA) + features |= (1 << FEATURE_AVX512IFMA); + if (ecx & bit_AVX512VBMI) + features |= (1 << FEATURE_AVX512VBMI); } unsigned int ext_level;