summaryrefslogtreecommitdiff
path: root/arch/arm
diff options
context:
space:
mode:
authorJeroen Hofstee <jeroen@myspectrum.nl>2013-09-21 14:04:40 +0200
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>2013-09-23 17:58:24 +0200
commita81872ff27bb66578ae515ec5079cf191656b1c1 (patch)
tree49bfb2f57f6bb0cbc3e9049233240851a139d6b8 /arch/arm
parent3102274d8b88d91f59ad1b302c5fb98fa74b6554 (diff)
downloadu-boot-imx-a81872ff27bb66578ae515ec5079cf191656b1c1.zip
u-boot-imx-a81872ff27bb66578ae515ec5079cf191656b1c1.tar.gz
u-boot-imx-a81872ff27bb66578ae515ec5079cf191656b1c1.tar.bz2
ARM,relocate: do not use r9
r9 is a platform-specific register in ARM EABI and not per definition a general purpose register. Do not use it while relocating so it can be used for gd. cc: Albert ARIBAUD <albert.u.boot@aribaud.net> Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/lib/relocate.S6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/arm/lib/relocate.S b/arch/arm/lib/relocate.S
index ab90430..a62a556 100644
--- a/arch/arm/lib/relocate.S
+++ b/arch/arm/lib/relocate.S
@@ -22,7 +22,7 @@
ENTRY(relocate_code)
ldr r1, =__image_copy_start /* r1 <- SRC &__image_copy_start */
- subs r9, r0, r1 /* r9 <- relocation offset */
+ subs r4, r0, r1 /* r4 <- relocation offset */
beq relocate_done /* skip relocation */
ldr r2, =__image_copy_end /* r2 <- SRC &__image_copy_end */
@@ -44,9 +44,9 @@ fixloop:
bne fixnext
/* relative fix: increase location by offset */
- add r0, r0, r9
+ add r0, r0, r4
ldr r1, [r0]
- add r1, r1, r9
+ add r1, r1, r4
str r1, [r0]
fixnext:
cmp r2, r3