[RFC PATCH] powerpc: Fix dubious r0 usage
Alan Modra
amodra at gmail.com
Sat Feb 18 00:21:25 AEDT 2017
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..
> --- 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
More information about the Linuxppc-dev
mailing list