summaryrefslogtreecommitdiff
path: root/arch/mips/cpu/mips64
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2013-01-24 06:27:53 +0000
committerDaniel Schwierzeck <daniel.schwierzeck@gmail.com>2013-01-27 16:39:59 +0100
commitb2fe86f8873088391d77224fb33544bc1e3b2c0a (patch)
treed78f646c49690c15c3ce94f7ed4222a63d30588f /arch/mips/cpu/mips64
parentf321b0f99fa0ccf1f25b3d9ab2140b98baa6fdbd (diff)
downloadu-boot-imx-b2fe86f8873088391d77224fb33544bc1e3b2c0a.zip
u-boot-imx-b2fe86f8873088391d77224fb33544bc1e3b2c0a.tar.gz
u-boot-imx-b2fe86f8873088391d77224fb33544bc1e3b2c0a.tar.bz2
MIPS: start.S: save reused arguments earlier in relocate_code
Save the reused parameters at the beginning of the 'relocate_code' function. This makes the function a bit more readable. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Cc: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
Diffstat (limited to 'arch/mips/cpu/mips64')
-rw-r--r--arch/mips/cpu/mips64/start.S5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/mips/cpu/mips64/start.S b/arch/mips/cpu/mips64/start.S
index d3c5cea..3c0f1c3 100644
--- a/arch/mips/cpu/mips64/start.S
+++ b/arch/mips/cpu/mips64/start.S
@@ -158,11 +158,13 @@ reset:
relocate_code:
move sp, a0 # set new stack pointer
+ move s0, a1 # save gd in s0
+ move s2, a2 # save destination address in s2
+
dli t0, CONFIG_SYS_MONITOR_BASE
dla t3, in_ram
ld t2, -24(t3) # t2 <-- uboot_end_data
move t1, a2
- move s2, a2 # s2 <-- destination address
/*
* Fix $gp:
@@ -183,7 +185,6 @@ relocate_code:
/*
* Save destination address and size for dlater usage in flush_cache()
*/
- move s0, a1 # save gd in s0
move a0, t1 # a0 <-- destination addr
dsub a1, t2, t0 # a1 <-- size