This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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] power: Fix VSCR position on ucontext


On Mon, 10 Dec 2018, Tulio Magno Quites Machado Filho wrote:

>"Gabriel F. T. Gomes" <gabriel@inconstante.eti.br> writes:
>
>> [ text/plain ]
>> On Fri, 07 Dec 2018, Rogerio Alves wrote:
>>  
>>>+/* This test is supported only on POWER 5 or higher.  */
>>>+#define PPC_CPU_SUPPORTED (PPC_FEATURE_POWER5 | PPC_FEATURE_POWER5_PLUS | \
>>>+                           PPC_FEATURE_ARCH_2_05 | PPC_FEATURE_ARCH_2_06 | \
>>>+                           PPC_FEATURE2_ARCH_2_07)  
>>
>> Is this actually needed?  Glibc has code to fill all the bits for older
>> architectures in sysdeps/powerpc/hwcapinfo.c [1].  So, as far as I can
>> see, you only need to test for AT_HWCAP & PPC_FEATURE_POWER5.  
>
>Yes, it's indeed required to check all these bits when using getauxval().
>
>> [1] https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/powerpc/hwcapinfo.c;h=a09b18309324423d0cdf04e88367899a4396bab7;hb=HEAD#l47  
>
>This code is preparing the data for __builtin_cpu_supports().
>So, when using this built-in, it wouldn't be necessary to check for all those
>AT_HWCAP bits.

Oh, I see.  Thanks for the explanation.  :)


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