H1x0: rolo_restart() now uses the actual destination address to start the code. Some asm optimisation.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6811 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Jens Arnold 2005-06-22 16:53:12 +00:00
parent 4fd457a2bf
commit b7aaa641b8
1 changed files with 9 additions and 7 deletions

View File

@ -59,17 +59,19 @@ void rolo_restart(const unsigned char* source, unsigned char* dest,
long length)
{
long i;
unsigned char* localdest = dest;
for(i = 0;i < length;i++)
*dest++ = *source++;
*localdest++ = *source++;
#if CONFIG_CPU == MCF5249
asm volatile (" move.l #0,%d0");
asm volatile (" move.l #0x30000000,%d0");
asm volatile (" movec.l %d0,%vbr");
asm volatile (" move.l 0x30000000,%sp");
asm volatile (" move.l 0x30000004,%a0");
asm volatile (" jmp (%a0)");
asm (
"movec.l %0,%%vbr \n"
"move.l (%0)+,%%sp \n"
"move.l (%0),%0 \n"
"jmp (%0) \n"
: : "a"(dest)
);
#endif
}
#endif