This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] powerpc: New feature - HWCAP/HWCAP2 bits in the TCB
- From: Roland McGrath <roland at hack dot frob dot com>
- To: Adhemerval Zanella <adhemerval dot zanella at linaro dot org>
- Cc: libc-alpha at sourceware dot org
- Date: Tue, 9 Jun 2015 11:33:20 -0700 (PDT)
- Subject: Re: [PATCH] powerpc: New feature - HWCAP/HWCAP2 bits in the TCB
- Authentication-results: sourceware.org; auth=none
- References: <55760314 dot 6070601 at linux dot vnet dot ibm dot com> <20150609163835 dot GI17573 at brightrain dot aerifal dot cx> <557726CA dot 9030100 at linaro dot org>
> I believe the idea is to provide a fast way to emulate a functionality
> similar to __builtin_cpu_supports for powerpc. For x86, this builtin
> will create 'cpuid' instruction, but since powerpc lacks a similar one
> it should rely on hardware capability information provided by kernel.
On x86 using cpuid is quite slow as instruction-level overheads go.
It's certainly nowhere near as fast as doing a direct load from memory.
So this analogue does not suggest anything like justification for the
kind of microoptimization being discussed.