diff options
author | uros <uros@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-01-25 18:17:46 +0000 |
---|---|---|
committer | uros <uros@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-01-25 18:17:46 +0000 |
commit | f89563578ffa65b960c358bfa4b654522786b021 (patch) | |
tree | 3c8bca97d45d736dc6840d8b8fed8493f6285dc3 /libgcc | |
parent | 382295e8c11ca4815e537c9b7bb6b3b497134e27 (diff) | |
download | gcc-f89563578ffa65b960c358bfa4b654522786b021.tar.gz |
gcc/ChangeLog:
* config/i386/i386.c (get_builtin_code_for_version): Add
support for BMI and BMI2 multiversion functions.
(fold_builtin_cpu): Add F_BMI and F_BMI2.
libgcc/ChangeLog:
* config/i386/cpuinfo.c (enum processor_features): Add FEATURE_BMI and
FEATURE_BMI2.
(get_available_features): Detect FEATURE_BMI and FEATURE_BMI2.
testsuite/ChangeLog:
* gcc.target/i386/funcspec-5.c: Test new multiversion targets.
* g++.dg/ext/mv17.C: Test BMI/BMI2 multiversion dispatcher.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@220095 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgcc')
-rw-r--r-- | libgcc/ChangeLog | 6 | ||||
-rw-r--r-- | libgcc/config/i386/cpuinfo.c | 8 |
2 files changed, 13 insertions, 1 deletions
diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index 3949c0adbc7..be24ed4c9be 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,9 @@ +2015-01-25 Allan Sandfeld Jensen <sandfeld@kde.org> + + * config/i386/cpuinfo.c (enum processor_features): Add FEATURE_BMI and + FEATURE_BMI2. + (get_available_features): Detect FEATURE_BMI and FEATURE_BMI2. + 2015-01-24 H.J. Lu <hongjiu.lu@intel.com> * config/i386/cpuinfo.c (processor_subtypes): Add diff --git a/libgcc/config/i386/cpuinfo.c b/libgcc/config/i386/cpuinfo.c index c80083eec50..eaf2f100d59 100644 --- a/libgcc/config/i386/cpuinfo.c +++ b/libgcc/config/i386/cpuinfo.c @@ -98,7 +98,9 @@ enum processor_features FEATURE_FMA4, FEATURE_XOP, FEATURE_FMA, - FEATURE_AVX512F + FEATURE_AVX512F, + FEATURE_BMI, + FEATURE_BMI2 }; struct __processor_model @@ -289,8 +291,12 @@ get_available_features (unsigned int ecx, unsigned int edx, { unsigned int eax, ebx, ecx, edx; __cpuid_count (7, 0, eax, ebx, ecx, edx); + if (ebx & bit_BMI) + features |= (1 << FEATURE_BMI); if (ebx & bit_AVX2) features |= (1 << FEATURE_AVX2); + if (ebx & bit_BMI2) + features |= (1 << FEATURE_BMI2); if (ebx & bit_AVX512F) features |= (1 << FEATURE_AVX512F); } |