mirror of
https://github.com/Stichting-MINIX-Research-Foundation/u-boot.git
synced 2025-09-13 05:55:02 -04:00
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>
This commit is contained in:
parent
f321b0f99f
commit
b2fe86f887
@ -279,11 +279,13 @@ reset:
|
|||||||
relocate_code:
|
relocate_code:
|
||||||
move sp, a0 # set new stack pointer
|
move sp, a0 # set new stack pointer
|
||||||
|
|
||||||
|
move s0, a1 # save gd in s0
|
||||||
|
move s2, a2 # save destination address in s2
|
||||||
|
|
||||||
li t0, CONFIG_SYS_MONITOR_BASE
|
li t0, CONFIG_SYS_MONITOR_BASE
|
||||||
la t3, in_ram
|
la t3, in_ram
|
||||||
lw t2, -12(t3) # t2 <-- uboot_end_data
|
lw t2, -12(t3) # t2 <-- uboot_end_data
|
||||||
move t1, a2
|
move t1, a2
|
||||||
move s2, a2 # s2 <-- destination address
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Fix $gp:
|
* Fix $gp:
|
||||||
@ -304,7 +306,6 @@ relocate_code:
|
|||||||
/*
|
/*
|
||||||
* Save destination address and size for later usage in flush_cache()
|
* Save destination address and size for later usage in flush_cache()
|
||||||
*/
|
*/
|
||||||
move s0, a1 # save gd in s0
|
|
||||||
move a0, t1 # a0 <-- destination addr
|
move a0, t1 # a0 <-- destination addr
|
||||||
sub a1, t2, t0 # a1 <-- size
|
sub a1, t2, t0 # a1 <-- size
|
||||||
|
|
||||||
|
@ -158,11 +158,13 @@ reset:
|
|||||||
relocate_code:
|
relocate_code:
|
||||||
move sp, a0 # set new stack pointer
|
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
|
dli t0, CONFIG_SYS_MONITOR_BASE
|
||||||
dla t3, in_ram
|
dla t3, in_ram
|
||||||
ld t2, -24(t3) # t2 <-- uboot_end_data
|
ld t2, -24(t3) # t2 <-- uboot_end_data
|
||||||
move t1, a2
|
move t1, a2
|
||||||
move s2, a2 # s2 <-- destination address
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Fix $gp:
|
* Fix $gp:
|
||||||
@ -183,7 +185,6 @@ relocate_code:
|
|||||||
/*
|
/*
|
||||||
* Save destination address and size for dlater usage in flush_cache()
|
* Save destination address and size for dlater usage in flush_cache()
|
||||||
*/
|
*/
|
||||||
move s0, a1 # save gd in s0
|
|
||||||
move a0, t1 # a0 <-- destination addr
|
move a0, t1 # a0 <-- destination addr
|
||||||
dsub a1, t2, t0 # a1 <-- size
|
dsub a1, t2, t0 # a1 <-- size
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user