HWCAP is method to determine cpu features, not selection mechanism.
Adhemerval Zanella
adhemerval.zanella@linaro.org
Wed Jun 10 15:00:00 GMT 2015
On 10-06-2015 11:16, Szabolcs Nagy wrote:
> On 10/06/15 14:35, Adhemerval Zanella wrote:
>> I agree that adding an API to modify the current hwcap is not a good
>> approach. However the cost you are assuming here are *very* x86 biased,
>> where you have only on instruction (movl <variable>(%rip), %<destiny>)
>> to load an external variable defined in a shared library, where for
>> powerpc it is more costly:
>
> debian codesearch found 4 references to __builtin_cpu_supports
> all seem to avoid using it repeatedly.
>
> multiversioning dispatch only happens at startup (for a small
> number of functions according to existing practice).
>
> so why is hwcap expected to be used in hot loops?
>
Good question, I do not know and I believe Steve could answer this
better than me. I am only advocating here that assuming x86 costs
for powerpc is not the way to evaluate this patch.
More information about the Libc-alpha
mailing list