aboutsummaryrefslogtreecommitdiff
path: root/libgcc
diff options
context:
space:
mode:
authorKirill Yukhin <kirill.yukhin@intel.com>2015-09-22 11:10:21 +0000
committerKirill Yukhin <kyukhin@gcc.gnu.org>2015-09-22 11:10:21 +0000
commit06caf59d7ff9f9f97718a96cb23da50e5ba5edd8 (patch)
tree1c9c33c2bf4187c5dd8b7f478522a18fab88bd68 /libgcc
parent7095d6f2ebbc17713a5ce18c45455476b402d166 (diff)
downloadgcc-06caf59d7ff9f9f97718a96cb23da50e5ba5edd8.zip
gcc-06caf59d7ff9f9f97718a96cb23da50e5ba5edd8.tar.gz
gcc-06caf59d7ff9f9f97718a96cb23da50e5ba5edd8.tar.bz2
AVX-512. Introduce SKylake server CPU.
gcc/ * config.gcc: Support "skylake-avx512". * config/i386/i386-c.c (ix86_target_macros_internal): Handle PROCESSOR_SKYLAKE_AVX512. * config/i386/i386.c (m_SKYLAKE_AVX512): Define. (processor_target_table): Add "skylake-avx512". (PTA_SKYLAKE_AVX512): Define. (ix86_option_override_internal): Add "skylake_avx512". (fold_builtin_cpu): Handle "skylake_avx512", add F_AVX512VL F_AVX512BW, F_AVX512DQ, F_AVX512ER, F_AVX512PF, F_AVX512CD. * config/i386/i386.h (TARGET_SKYLAKE_AVX512): Define. (processor_type): Add PROCESSOR_SKYLAKE_AVX512. * doc/invoke.texi (skylake-avx512): New. libgcc/ * libgcc/config/i386/cpuinfo.c (enum processor_features): Add FEATURE_AVX512VL, FEATURE_AVX512BW, FEATURE_AVX512DQ, FEATURE_AVX512CD, FEATURE_AVX512ER, FEATURE_AVX512PF. (get_available_features): Habdle new features. gcc/testsuite/ * gcc.target/i386/funcspec-5.c: Test avx512vl, avx512bw, avx512dq, avx512cd, avx512er, avx512pf and skylake-avx512. * gcc.target/i386/builtin_target.c: Test avx512vl, avx512bw, avx512dq, avx512cd, avx512er and avx512pf. From-SVN: r228009
Diffstat (limited to 'libgcc')
-rw-r--r--libgcc/ChangeLog7
-rw-r--r--libgcc/config/i386/cpuinfo.c22
2 files changed, 27 insertions, 2 deletions
diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog
index 6d2d9eb..878c29f 100644
--- a/libgcc/ChangeLog
+++ b/libgcc/ChangeLog
@@ -1,3 +1,10 @@
+2015-09-22 Kirill Yukhin <kirill.yukhin@intel.com>
+
+ * libgcc/config/i386/cpuinfo.c (enum processor_features): Add
+ FEATURE_AVX512VL, FEATURE_AVX512BW, FEATURE_AVX512DQ,
+ FEATURE_AVX512CD, FEATURE_AVX512ER, FEATURE_AVX512PF.
+ (get_available_features): Habdle new features.
+
2015-09-21 James Bowman <james.bowman@ftdichip.com>
* config/ft32/crti-hw.S: Use __PMSIZE to allow configurable
diff --git a/libgcc/config/i386/cpuinfo.c b/libgcc/config/i386/cpuinfo.c
index 1436775..ddb49e3 100644
--- a/libgcc/config/i386/cpuinfo.c
+++ b/libgcc/config/i386/cpuinfo.c
@@ -81,7 +81,7 @@ enum processor_subtypes
CPU_SUBTYPE_MAX
};
-/* ISA Features supported. */
+/* ISA Features supported. New features have to be inserted at the end. */
enum processor_features
{
@@ -104,7 +104,13 @@ enum processor_features
FEATURE_BMI,
FEATURE_BMI2,
FEATURE_AES,
- FEATURE_PCLMUL
+ FEATURE_PCLMUL,
+ FEATURE_AVX512VL,
+ FEATURE_AVX512BW,
+ FEATURE_AVX512DQ,
+ FEATURE_AVX512CD,
+ FEATURE_AVX512ER,
+ FEATURE_AVX512PF
};
struct __processor_model
@@ -318,6 +324,18 @@ get_available_features (unsigned int ecx, unsigned int edx,
features |= (1 << FEATURE_BMI2);
if (ebx & bit_AVX512F)
features |= (1 << FEATURE_AVX512F);
+ if (ebx & bit_AVX512VL)
+ features |= (1 << FEATURE_AVX512VL);
+ if (ebx & bit_AVX512BW)
+ features |= (1 << FEATURE_AVX512BW);
+ if (ebx & bit_AVX512DQ)
+ features |= (1 << FEATURE_AVX512DQ);
+ if (ebx & bit_AVX512CD)
+ features |= (1 << FEATURE_AVX512CD);
+ if (ebx & bit_AVX512PF)
+ features |= (1 << FEATURE_AVX512PF);
+ if (ebx & bit_AVX512ER)
+ features |= (1 << FEATURE_AVX512ER);
}
unsigned int ext_level;