[PATCH] powerpc: New feature - HWCAP/HWCAP2 bits in the TCB
Segher Boessenkool
segher@kernel.crashing.org
Fri Jul 10 02:43:00 GMT 2015
On Fri, Jul 10, 2015 at 01:12:46AM +0300, Kalle Olavi Niemitalo wrote:
> Steven Munroe <munroesj@linux.vnet.ibm.comcom> writes:
>
> > if (__builtin_cpu_supports(ARCH_2_07) &&
> > __builtin_cpu_supports(VEC_CRYPTO))
> >
> > This is 3 instructions (lwz, andi., bc) as packed bits, but 5 or 6 as
> > byte Boolean.
>
> I would understand 3 instructions for "||" (test the zero flag) but
> how do you do it for "&&"? I have hardly any powerpc experience
> though, so perhaps there is some trick I don't realize.
There is no such trick, you're not missing anything. And there is no
need to write error-prone manually expanded things, GCC can handle it
just fine (the simpler cases, anyway ;-) )
Segher
More information about the Libc-alpha
mailing list