This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch, i386] Support BMI and BMI2 targets in multiversioning


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]