Fixed two more than 3 years old bugs in RoLo: (1) Read start address from image instead of using hard coded loadaddress+0x200. (2) Set desired stack pointer. The stack pointer used to remain wherever it was when invoking RoLo...

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8100 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Jens Arnold 2005-11-28 22:42:38 +00:00
parent 27c658c8a6
commit 4d66fc8dc2

View file

@ -104,8 +104,6 @@ _rolo_restart:
sub r4,r0 /* r0 = dest - source */ sub r4,r0 /* r0 = dest - source */
add #-4,r0 /* adjust for early increment */ add #-4,r0 /* adjust for early increment */
add r4,r6 /* r6 = source + len */ add r4,r6 /* r6 = source + len */
mov.w .offset,r1
add r1,r5 /* start_func() */
.copy: /* loop takes 6 cycles per longword */ .copy: /* loop takes 6 cycles per longword */
mov.l @r4+,r1 mov.l @r4+,r1
@ -113,11 +111,9 @@ _rolo_restart:
mov.l r1,@(r0,r4) mov.l r1,@(r0,r4)
bt .copy bt .copy
jmp @r5 mov.l @r5+,r0 /* start address from image */
nop jmp @r0
mov.l @r5+,r15 /* stack pointer from image */
.offset:
.word 0x200
.end: .end:
.size _descramble,.end-_descramble .size _descramble,.end-_descramble