[PATCH] powerpc: New feature - HWCAP/HWCAP2 bits in the TCB
Kalle Olavi Niemitalo
kon@iki.fi
Thu Jul 9 22:08:00 GMT 2015
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.
If not, and if "&&" is more common than "||" in HWCAP tests, then
would it be worthwhile to invert the HWCAP bits in TCB? I guess
it wouldn't, because such a format would increase the risk that
the program crashes if the bits were not properly initialized
before they were read.
More information about the Libc-alpha
mailing list