]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - arch/arm/cpu/s3c44b0/start.S
arm: fixloop(): do not use r8 for relocation
[karo-tx-uboot.git] / arch / arm / cpu / s3c44b0 / start.S
index 89e42b193702bd2f012420002719367e6ddefc04..50e3f21cf3e49bb3919af3012e8a215cbc1b45f6 100644 (file)
@@ -151,12 +151,12 @@ stack_setup:
        mov     sp, r4
 
        adr     r0, _start
+       cmp     r0, r6
+       beq     clear_bss               /* skip relocation */
        mov     r1, r6                  /* r1 <- scratch for copy_loop */
        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]    */
@@ -180,10 +180,10 @@ fixloop:
        ldr     r0, [r2]                /* r0 <- location to fix up, IN FLASH! */
        add     r0, r0, r9              /* r0 <- location to fix up in RAM */
        ldr     r1, [r2, #4]
-       and     r8, r1, #0xff
-       cmp     r8, #23                 /* relative fixup? */
+       and     r7, r1, #0xff
+       cmp     r7, #23                 /* relative fixup? */
        beq     fixrel
-       cmp     r8, #2                  /* absolute fixup? */
+       cmp     r7, #2                  /* absolute fixup? */
        beq     fixabs
        /* ignore unknown type of fixup */
        b       fixnext