[PATCH v6 2/4] powerpc/64: enhance memcmp() with VMX instruction for long bytes comparision
Segher Boessenkool
segher at kernel.crashing.org
Mon May 28 21:05:59 AEST 2018
On Fri, May 25, 2018 at 12:07:34PM +0800, wei.guo.simon at gmail.com wrote:
> + /* save and restore cr0 */
> + mfocrf r5,64
> + EXIT_VMX_OPS
> + mtocrf 64,r5
> + b .LcmpAB_lightweight
That's cr1, not cr0. You can use mcrf instead, it is cheaper (esp. if
you have it in a non-volatile CR field before so you need only one, if any).
> + vcmpequb. v7,v9,v10
> + bnl cr6,.Ldiffoffset_vmx_diff_found
In other places you say bf 24,... Dunno which is more readable, but
please pick one?
Segher
More information about the Linuxppc-dev
mailing list