This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, rs6000] Add support to __builtin_cpu_supports() for new HWCAP2 bit
- From: Peter Bergner <bergner at vnet dot ibm dot com>
- To: Segher Boessenkool <segher at kernel dot crashing dot org>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Tulio Magno Quites Machado Filho <tuliom at linux dot vnet dot ibm dot com>
- Date: Mon, 6 Nov 2017 17:07:23 -0600
- Subject: Re: [PATCH, rs6000] Add support to __builtin_cpu_supports() for new HWCAP2 bit
- Authentication-results: sourceware.org; auth=none
- References: <903b4414-f737-4da0-ba20-d7c5745c5166@vnet.ibm.com> <20171106225216.GG4108@gate.crashing.org>
On 11/6/17 4:52 PM, Segher Boessenkool wrote:
> Hi!
>
> On Mon, Nov 06, 2017 at 11:41:39AM -0600, Peter Bergner wrote:
>> There is a new HWCAP2 bit added to the AUXV here:
>>
>> http://patchwork.ozlabs.org/patch/824764/
>>
>> This patch adds __builtin_cpu_supports() support for it.
>
>> --- gcc/config/rs6000/rs6000.c (revision 254453)
>> +++ gcc/config/rs6000/rs6000.c (working copy)
>> @@ -387,6 +387,7 @@ static const struct
>> { "ebb", PPC_FEATURE2_HAS_EBB, 1 },
>> { "htm", PPC_FEATURE2_HAS_HTM, 1 },
>> { "htm-nosc", PPC_FEATURE2_HTM_NOSC, 1 },
>> + { "htm-no-suspend", PPC_FEATURE2_HTM_NO_SUSPEND, 1 },
>> { "isel", PPC_FEATURE2_HAS_ISEL, 1 },
>> { "tar", PPC_FEATURE2_HAS_TAR, 1 },
>> { "vcrypto", PPC_FEATURE2_HAS_VEC_CRYPTO, 1 },
>
> Is this (user-visible) name the same as used elsewhere? Kernel, libc?
>
> It's not in the same style as "htm-nosc".
Tulio can correct me if I'm wrong, but I believe these stings are
owned by GLIBC. The kernel just defines the macro name and bit mask
that is used in the AUXV. That said, I'm not sure the GLIBC patch
adding the above string has been submitted yet, so I guess we could
change it still? Tulio?
That said, I'm not sure I like "htm-nosuspend" better than what the
patch has, but then again, I don't care enough to argue. :-)
Peter