Thread (4 messages) flat view 4 messages, 3 authors, 2017-02-18

Re: [RFC PATCH] powerpc: Fix dubious r0 usage

From: Alan Modra <hidden>
Date: 2017-02-17 13:21:32

On Fri, Feb 17, 2017 at 11:08:53PM +1100, Michael Ellerman wrote:
Bleeding edge binutils no longer accepts r0 in places where the CPU
interprets the value as a literal 0.
Wow!  That was quite some cleanup.  I think I'd better turn the error
into a warning..
quoted hunk ↗ jump to hunk
--- a/arch/powerpc/purgatory/trampoline.S
+++ b/arch/powerpc/purgatory/trampoline.S
@@ -67,7 +67,7 @@ master:
 	mr	%r16,%r3	/* save dt address in reg16 */
 	li	%r4,20
 	LWZX_BE	%r6,%r3,%r4	/* fetch __be32 version number at byte 20 */
-	cmpwi	%r0,%r6,2	/* v2 or later? */
+	cmpwi	0,%r6,2		/* v2 or later? */
 	blt	1f
 	li	%r4,28
 	STWX_BE	%r17,%r3,%r4	/* Store my cpu as __be32 at byte 28 */
With this one, it would probably be better to omit the zero (BF
field).

-- 
Alan Modra
Australia Development Lab, IBM
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help