This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, i386] Add new arg values for __builtin_cpu_supports
- From: Ilya Enkovich <enkovich dot gnu at gmail dot com>
- To: Jeff Law <law at redhat dot com>
- Cc: Jakub Jelinek <jakub at redhat dot com>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 21 Nov 2014 22:01:10 +0300
- Subject: Re: [PATCH, i386] Add new arg values for __builtin_cpu_supports
- Authentication-results: sourceware.org; auth=none
- References: <20141120163603 dot GA30483 at msticlxl57 dot ims dot intel dot com> <20141120164054 dot GS1745 at tucnak dot redhat dot com> <546F7A4F dot 8050800 at redhat dot com>
2014-11-21 20:45 GMT+03:00 Jeff Law <law@redhat.com>:
> On 11/20/14 09:40, Jakub Jelinek wrote:
>>
>> On Thu, Nov 20, 2014 at 07:36:03PM +0300, Ilya Enkovich wrote:
>>>
>>> Hi,
>>>
>>> MPX runtime checks some feature bits in order to check MPX is fully
>>> supported. Runtime does it by cpuid calls but there is a
>>> __builtin_cpu_supports which may be used for that. Unfortunately
>>> currently it doesn't support required bits. Will it be OK to add them
>>> for
>>> trunk?
>>
>>
>> I think using cpuid for that is just fine. __builtin_cpu_supports
>> is for ISA additions users might actually want to version code for,
>> MPX stuff, as the instructions are nops without hw support, are not
>> something one would multi-version a function for.
>> If anything, AVX512F and AVX512BW+VL might be good candidates for that,
>> not
>> MPX.
>
> SOrry, I didn't know the __builtin_cpu_supports was really only ment for
> user multi-versioning. In that case, it won't make any sense to put the MPX
> stuff in there.
>
> Sorry for sending you down a wrong path Ilya.
It's OK, AVX guys will just transform this MPX patch into AVX512 one :)
Ilya
>
> jeff