1
0
Fork 0
forked from len0rd/rockbox

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

View file

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