mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-08-29 18:41:37 +02:00
Nokia RX-51: Simplify copy kernel code
Expression (r + (r0 - r1)) produce same result as (r - (r1 - r0)). So it does not matter which one is called. Always call the first option and remove second one. Signed-off-by: Pali Rohár <pali@kernel.org>
This commit is contained in:
parent
c5be5f6f54
commit
04bd87c24c
@ -55,16 +55,13 @@ save_boot_params:
|
|||||||
copy_kernel_start:
|
copy_kernel_start:
|
||||||
adr r0, relocaddr /* r0 - address of section relocaddr */
|
adr r0, relocaddr /* r0 - address of section relocaddr */
|
||||||
ldr r1, relocaddr /* r1 - address of relocaddr after relocation */
|
ldr r1, relocaddr /* r1 - address of relocaddr after relocation */
|
||||||
cmp r0, r1
|
|
||||||
|
|
||||||
/* r4 - calculated offset */
|
/* r4 - calculated offset */
|
||||||
subhi r4, r0, r1
|
sub r4, r0, r1
|
||||||
sublo r4, r1, r0
|
|
||||||
|
|
||||||
/* r0 - start of kernel before */
|
/* r0 - start of kernel before */
|
||||||
ldr r0, startaddr
|
ldr r0, startaddr
|
||||||
addhi r0, r0, r4
|
add r0, r0, r4
|
||||||
sublo r0, r0, r4
|
|
||||||
ldr r1, kernoffs
|
ldr r1, kernoffs
|
||||||
add r0, r0, r1
|
add r0, r0, r1
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user