forked from len0rd/rockbox
MIPS: make sure to fill 'jr' branch delay slot with 'nop'
Inline assembly in RoLO and the FiiO M3K bootloader used 'jr' to jump to a newly loaded Rockbox binary, but incorrectly left the branch delay slot open. That gives GCC an opening to place illegal instrutions, etc, which might cause an unhandled exception. Change-Id: Ia7a561fe530e94a41189d25f18a767c448177960
This commit is contained in:
parent
213d372c92
commit
4b26372591
3 changed files with 7 additions and 2 deletions
|
|
@ -204,6 +204,7 @@ void rolo_restart(const unsigned char* source, unsigned char* dest,
|
|||
commit_discard_idcache();
|
||||
asm volatile(
|
||||
"jr %0 \n"
|
||||
"nop\n"
|
||||
: : "r"(dest)
|
||||
);
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue