RE: [PATCH] powerpc: Optimise the 64bit optimised __clear_user
flat view
From: David Laight <hidden>
Date: 2012-06-07 08:46:11
=20
-----Original Message----- From: Linuxppc-dev=20 [mailto:linuxppc-dev-bounces+david.laight=3Daculab.com@lists.ozl
abs.org] On Behalf Of Benjamin Herrenschmidt
Sent: 07 June 2012 07:40 To: Michael Neuling Cc: michael@ellerman.id.au; paulus@samba.org; Anton=20 Blanchard; olof@lixom.net; linuxppc-dev@lists.ozlabs.org Subject: Re: [PATCH] powerpc: Optimise the 64bit optimised=20 __clear_user =20 On Thu, 2012-06-07 at 16:05 +1000, Michael Neuling wrote: =20quoted
One problem with this is when we construct the=20instructions, like usingquoted
anything from ppc-opcode.h. eg. using PPC_POPCNTB would=20need to go from:quoted
PPC_POPCNTB(r3,r3)=20 to: PPC_POPCNTB(3,3)=20 Which is less readable IMHO.=20 Yes, I know. Not much to do about this, but it might still be=20 worth it, how much time wasted due to mixing up or with ori in asm somewhere ? =20 One option would be to #define R3 (or _r3) for use in those macros so we still have something nicer than just "3"... oh well.
You then need to catch all the other bugs where a register is being used instead of a constant. Time to make the assembler require %r0 (etc) David