summaryrefslogtreecommitdiff
path: root/libgcc
diff options
context:
space:
mode:
authorkyukhin <kyukhin@138bc75d-0d04-0410-961f-82ee72b054a4>2015-09-22 11:10:21 +0000
committerkyukhin <kyukhin@138bc75d-0d04-0410-961f-82ee72b054a4>2015-09-22 11:10:21 +0000
commitf96d88a85ad6a83d5458bd9df238736722038939 (patch)
tree1c9c33c2bf4187c5dd8b7f478522a18fab88bd68 /libgcc
parent11bad4eec972e0b563350a23ac13916ac1f6373c (diff)
downloadgcc-f96d88a85ad6a83d5458bd9df238736722038939.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228009 138bc75d-0d04-0410-961f-82ee72b054a4
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 6d2d9eb53cf..878c29f56c4 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 14367754828..ddb49e3ad9a 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;