[U-Boot] [PATCH RFC 1/3] arm920t: do not set register useless

Albert ARIBAUD albert at aribaud.net
Tue Nov 30 09:07:05 CET 2010


Hi Andreas,

Le 30/11/2010 08:06, Andreas Bießmann a écrit :

> diff --git a/arch/arm/cpu/arm920t/start.S b/arch/arm/cpu/arm920t/start.S
> index 01edb9b..71de373 100644
> --- a/arch/arm/cpu/arm920t/start.S
> +++ b/arch/arm/cpu/arm920t/start.S
> @@ -208,15 +208,16 @@ stack_setup:
>   	mov	sp, r4
>
>   	adr	r0, _start
> +	cmp	r0, r6
> +	beq	clear_bss		/* skip relocation */
> +	mov	r1, r6

Why use r1?

>   	ldr	r2, _TEXT_BASE
>   	ldr	r3, _bss_start_ofs
>   	add	r2, r0, r3		/* r2<- source end address	    */
> -	cmp	r0, r6
> -	beq	clear_bss
>
>   copy_loop:
>   	ldmia	r0!, {r9-r10}		/* copy from source address [r0]    */
> -	stmia	r6!, {r9-r10}		/* copy to   target address [r1]    */
> +	stmia	r1!, {r9-r10}		/* copy to   target address [r1]    */

Ditto.

>   	cmp	r0, r2			/* until source end address [r2]    */
>   	blo	copy_loop

Amicalement,
-- 
Albert.


More information about the U-Boot mailing list