mirror of
https://github.com/smaeul/u-boot.git
synced 2025-10-14 12:56:00 +01:00
microblaze: Speedup code copy
Remove one instruction in the loop which speedup code copying. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
This commit is contained in:
parent
e945f6dc28
commit
7c4dd54255
@ -212,12 +212,14 @@ relocate_code:
|
|||||||
/* Relocate text and data - r12 temp value */
|
/* Relocate text and data - r12 temp value */
|
||||||
addi r21, r0, _start
|
addi r21, r0, _start
|
||||||
addi r22, r0, __end - 4 /* Include BSS too */
|
addi r22, r0, __end - 4 /* Include BSS too */
|
||||||
1: lwi r12, r21, 0 /* Load u-boot data */
|
|
||||||
swi r12, r23, 0 /* Write zero to loc */
|
rsub r6, r21, r22
|
||||||
addi r21, r21, 4 /* Increment to next loc - origin code */
|
or r5, r0, r0
|
||||||
cmp r12, r21, r22 /* Check if we have reach the end */
|
1: lw r12, r21, r5 /* Load u-boot data */
|
||||||
|
sw r12, r23, r5 /* Write zero to loc */
|
||||||
|
cmp r12, r5, r6 /* Check if we have reach the end */
|
||||||
bneid r12, 1b
|
bneid r12, 1b
|
||||||
addi r23, r23, 4 /* Increment to next loc - relocate code */
|
addi r5, r5, 4 /* Increment to next loc - relocate code */
|
||||||
|
|
||||||
/* R23 points to the base address. */
|
/* R23 points to the base address. */
|
||||||
add r23, r0, r7 /* Move reloc addr to r23 */
|
add r23, r0, r7 /* Move reloc addr to r23 */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user