[U-Boot] [PATCH] mpc83xx: remove some dead code, saving space
Wolfgang Denk
wd at denx.de
Tue Nov 30 21:07:10 CET 2010
Dear Joakim Tjernlund,
In message <1290537223-12160-1-git-send-email-Joakim.Tjernlund at transmode.se> you wrote:
>
> Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund at transmode.se>
> ---
> arch/powerpc/cpu/mpc83xx/start.S | 7 -------
> 1 files changed, 0 insertions(+), 7 deletions(-)
>
> diff --git a/arch/powerpc/cpu/mpc83xx/start.S b/arch/powerpc/cpu/mpc83xx/start.S
> index f7da14b..121c276 100644
> --- a/arch/powerpc/cpu/mpc83xx/start.S
> +++ b/arch/powerpc/cpu/mpc83xx/start.S
> @@ -967,13 +967,6 @@ relocate_code:
> 30: li r3, 0
> blr
>
> -2: slwi r0,r0,2 /* re copy in reverse order ... y do we needed it? */
> - add r8,r4,r0
> - add r7,r3,r0
> -3: lwzu r0,-4(r8)
> - stwu r0,-4(r7)
> - bdnz 3b
> -
Why do you think this is dead code?
I see this about 30 lines above:
...
851 cmplw cr1,r3,r4
852 addi r0,r5,3
853 srwi. r0,r0,2
854 beq cr1,4f /* In place copy is not necessary
*/
855 beq 7f /* Protect against 0 count
*/
856 mtctr r0
857 bge cr1,2f
...
With your removal of the code, the "bge cr1,2f" will jump right
into the relocation loop. I don't think this is intended?
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Good manners are the settled medium of social, as specie is of
commercial, life; returns are equally expected for both.
- Lord Chesterfield _Letters to his Son_, 25 December 1753
More information about the U-Boot
mailing list