summaryrefslogtreecommitdiff
path: root/arch/microblaze/cpu
diff options
context:
space:
mode:
authorMichal Simek <michal.simek@xilinx.com>2015-01-27 15:10:37 +0100
committerMichal Simek <michal.simek@xilinx.com>2015-02-09 15:12:46 +0100
commit7c4dd542551dc146b6e3da0c1b519d95dd124d6c (patch)
treeeb2d7e178d63b5af6765a13b6294afb065d55830 /arch/microblaze/cpu
parente945f6dc2814f5f0d30b5b7e23821b3fd4faff5b (diff)
downloadu-boot-imx-7c4dd542551dc146b6e3da0c1b519d95dd124d6c.zip
u-boot-imx-7c4dd542551dc146b6e3da0c1b519d95dd124d6c.tar.gz
u-boot-imx-7c4dd542551dc146b6e3da0c1b519d95dd124d6c.tar.bz2
microblaze: Speedup code copy
Remove one instruction in the loop which speedup code copying. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Diffstat (limited to 'arch/microblaze/cpu')
-rw-r--r--arch/microblaze/cpu/start.S12
1 files changed, 7 insertions, 5 deletions
diff --git a/arch/microblaze/cpu/start.S b/arch/microblaze/cpu/start.S
index 3de0e12..4023ec0 100644
--- a/arch/microblaze/cpu/start.S
+++ b/arch/microblaze/cpu/start.S
@@ -212,12 +212,14 @@ relocate_code:
/* Relocate text and data - r12 temp value */
addi r21, r0, _start
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 */
- addi r21, r21, 4 /* Increment to next loc - origin code */
- cmp r12, r21, r22 /* Check if we have reach the end */
+
+ rsub r6, r21, r22
+ or r5, r0, r0
+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
- 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. */
add r23, r0, r7 /* Move reloc addr to r23 */