MIPS: start.S: fix boundary check in relocate_code
The loop code copies more data with one than necessary due to the 'ble' instuction. Use the 'blt' instruction instead to fix that. Due to the lack of suitable hardware the Xburst specific code is compile tested only. However the change is quite obvious. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Cc: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
This commit is contained in:
parent
14fdd1a8bf
commit
5b7dd8163d
|
@ -313,7 +313,7 @@ relocate_code:
|
||||||
lw t3, 0(t0)
|
lw t3, 0(t0)
|
||||||
sw t3, 0(t1)
|
sw t3, 0(t1)
|
||||||
addu t0, 4
|
addu t0, 4
|
||||||
ble t0, t2, 1b
|
blt t0, t2, 1b
|
||||||
addu t1, 4
|
addu t1, 4
|
||||||
|
|
||||||
/* If caches were enabled, we would have to flush them here. */
|
/* If caches were enabled, we would have to flush them here. */
|
||||||
|
|
|
@ -192,7 +192,7 @@ relocate_code:
|
||||||
lw t3, 0(t0)
|
lw t3, 0(t0)
|
||||||
sw t3, 0(t1)
|
sw t3, 0(t1)
|
||||||
daddu t0, 4
|
daddu t0, 4
|
||||||
ble t0, t2, 1b
|
blt t0, t2, 1b
|
||||||
daddu t1, 4
|
daddu t1, 4
|
||||||
|
|
||||||
/* If caches were enabled, we would have to flush them here. */
|
/* If caches were enabled, we would have to flush them here. */
|
||||||
|
|
|
@ -87,7 +87,7 @@ relocate_code:
|
||||||
lw t3, 0(t0)
|
lw t3, 0(t0)
|
||||||
sw t3, 0(t1)
|
sw t3, 0(t1)
|
||||||
addu t0, 4
|
addu t0, 4
|
||||||
ble t0, t2, 1b
|
blt t0, t2, 1b
|
||||||
addu t1, 4
|
addu t1, 4
|
||||||
|
|
||||||
/* If caches were enabled, we would have to flush them here. */
|
/* If caches were enabled, we would have to flush them here. */
|
||||||
|
|
Loading…
Reference in New Issue