This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch, i386] Support BMI and BMI2 targets in multiversioning
- From: Uros Bizjak <ubizjak at gmail dot com>
- To: Allan Sandfeld Jensen <allan at carewolf dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, Allan Sandfeld Jensen <carewolf at gmail dot com>, Jakub Jelinek <jakub at redhat dot com>, "H.J. Lu" <hjl dot tools at gmail dot com>
- Date: Sun, 25 Jan 2015 19:23:52 +0100
- Subject: Re: [Patch, i386] Support BMI and BMI2 targets in multiversioning
- Authentication-results: sourceware.org; auth=none
- References: <CAFULd4bw3icU8ASbvQ51qRXjkbpiO+Y7ZE_+Skr0UXoJP-4KyA at mail dot gmail dot com> <CAFULd4bz7637cj1ZZ7rwX92jg8rNSPNDNcn1V4g14VmEFXSZxQ at mail dot gmail dot com> <201501241149 dot 43588 dot allan at carewolf dot com>
On Sat, Jan 24, 2015 at 11:49 AM, Allan Sandfeld Jensen
<allan@carewolf.com> wrote:
> On Saturday 24 January 2015, Uros Bizjak wrote:
>> On Mon, Jan 12, 2015 at 6:02 PM, Uros Bizjak <ubizjak@gmail.com> wrote:
>> > Hello!
>> >
>> >>> On Wed, Dec 31, 2014 at 01:28:47PM +0100, Allan Sandfeld Jensen wrote:
>> >>> > I recently wanted to use multiversioning for BMI2 specific extensions
>> >>> > PDEP/PEXT, and noticed it wasn't there. So I wrote this patch to add
>> >>> > it, and also added AES, F16C and BMI1 for completeness.
>> >>>
>> >>> AES nor F16C doesn't make any sense IMHO for multiversioning, you need
>> >>> special intrinsics for that anyway and when you use them, the function
>> >>> will fail to compile without those features.
>> >>> Multiversioning only makes sense for ISA features the compiler uses for
>> >>> normal C/C++ code without any intrinsics.
>> >>
>> >> Patch reduced to just adding BMI and BMI2 multiversioning:
>> > +2014-12-29 Allan Sandfeld Jensen <sandfeld@kde.org>
>> > +
>> > + * config/i386/i386.c (get_builtin_code_for_version): Add
>> > + support for BMI and BMI2 multiversion functions.
>> >
>> > +2014-12-29 Allan Sandfeld Jensen <sandfeld@kde.org>
>> > +
>> > + * gcc.target/i386/funcspec-5.c: Test new multiversion targets.
>> > + * g++.dg/ext/mv17.C: Test BMI/BMI2 multiversion dispatcher.
>> >
>> > +2014-12-29 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.
>> >
>> > OK for mainline
>>
>> Allan, did you commit the patch to mainline? I don't see it in SVN logs.
>>
>> (If you don't have SVN commit access, please mention it in the patch
>> submission, so someone will commit the patch for you).
>>
> Sorry. I don't have SVN commit access.
Committed with a bunch of fixes (e.g. missing fold_builtin_cpu part in
gcc/config/i386/i386.c, and mv17.C test didn't compile at all due to
missing parenthesis).
Uros.