Thread (38 messages) 38 messages, 12 authors, 2012-06-14

Re: [PATCH] powerpc: Optimise the 64bit optimised __clear_user

flat view

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2012-06-08 00:51:53

On Thu, 2012-06-07 at 12:51 -0500, Scott Wood wrote:
The assembler can't tell that you used r0 rather than 0, because
that's
handled by the preprocessor, but it seems like a bug (or at least lax
error checking) that it accepts %r0 there, and that objdump decodes it
as "dcbz r0,r3" rather than "dcbz 0,r3".
Well, this is the domain of bike shed painting :-) the syntax of the
instruction is:

	dcbz RA,RB

Now, of course, like other RA,RB pairs it has the semantic that

if RA = 0 then b <- 0
else           b <- (RA)
EA <- b + (RB)

If we were to be pendantic and our assembly could also enforce the use
of % for registers, I suppose it would make sense to require 0 rather
than %0 for those "RA" forms to make it absolutely clear that we are
talking about 0 and not r0 in this specific case, I agree, but in the
current shape of the asm, I don't think that's something to expect.

Cheers,
Ben.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help